From owner-dev-commits-src-all@freebsd.org Mon Jun 28 04:00:29 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon Jun 28 04:02:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon Jun 28 08:15:34 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D7DA651F23; Mon, 28 Jun 2021 08:15: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 4GD0m60pGmz4bdk; Mon, 28 Jun 2021 08:15:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 044A621EB4; Mon, 28 Jun 2021 08:15:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15S8FXd7014454; Mon, 28 Jun 2021 08:15:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15S8FXVK014453; Mon, 28 Jun 2021 08:15:33 GMT (envelope-from git) Date: Mon, 28 Jun 2021 08:15:33 GMT Message-Id: <202106280815.15S8FXVK014453@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: e0893890eb60 - main - ipsec: globalize lft zone and zero out buffers at allocation time MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e0893890eb6080e92f7e7fd9da319536bb5fe64e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 08:15:34 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e0893890eb6080e92f7e7fd9da319536bb5fe64e commit e0893890eb6080e92f7e7fd9da319536bb5fe64e Author: Mateusz Guzik AuthorDate: 2021-06-24 11:19:09 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-28 08:14:26 +0000 ipsec: globalize lft zone and zero out buffers at allocation time Creation of a zone is expensive and there is no need to have one for every vnet. Moreover, this wastes memory as these separate zones cannot use the same per-cpu caches. Finally, this is a step towards replacing the custom zone with pcpu-16. Two counter_u64_zero calls induce back-to-back IPIs to zero everything out. Instead, pass the M_ZERO flag to let uma just iterate all buffers. The counter(9) API abstraction is already violated by not using counter_u64_alloc. Reviewed by: ae Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30916 --- sys/netipsec/key.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/sys/netipsec/key.c b/sys/netipsec/key.c index 86dc9ea41024..4ca65979d5b2 100644 --- a/sys/netipsec/key.c +++ b/sys/netipsec/key.c @@ -534,8 +534,7 @@ MALLOC_DEFINE(M_IPSEC_SAQ, "ipsec-saq", "ipsec sa acquire"); MALLOC_DEFINE(M_IPSEC_SAR, "ipsec-reg", "ipsec sa acquire"); MALLOC_DEFINE(M_IPSEC_SPDCACHE, "ipsec-spdcache", "ipsec SPD cache"); -VNET_DEFINE_STATIC(uma_zone_t, key_lft_zone); -#define V_key_lft_zone VNET(key_lft_zone) +static uma_zone_t __read_mostly ipsec_key_lft_zone; /* * set parameters into secpolicyindex buffer. @@ -2939,13 +2938,11 @@ key_newsav(const struct sadb_msghdr *mhp, struct secasindex *saidx, goto done; } mtx_init(sav->lock, "ipsec association", NULL, MTX_DEF); - sav->lft_c = uma_zalloc_pcpu(V_key_lft_zone, M_NOWAIT); + sav->lft_c = uma_zalloc_pcpu(ipsec_key_lft_zone, M_NOWAIT | M_ZERO); if (sav->lft_c == NULL) { *errp = ENOBUFS; goto done; } - counter_u64_zero(sav->lft_c_allocations); - counter_u64_zero(sav->lft_c_bytes); sav->spi = spi; sav->seq = mhp->msg->sadb_msg_seq; @@ -3031,7 +3028,7 @@ done: free(sav->lock, M_IPSEC_MISC); } if (sav->lft_c != NULL) - uma_zfree_pcpu(V_key_lft_zone, sav->lft_c); + uma_zfree_pcpu(ipsec_key_lft_zone, sav->lft_c); free(sav, M_IPSEC_SA), sav = NULL; } if (sah != NULL) @@ -3109,7 +3106,7 @@ key_delsav(struct secasvar *sav) if ((sav->flags & SADB_X_EXT_F_CLONED) == 0) { mtx_destroy(sav->lock); free(sav->lock, M_IPSEC_MISC); - uma_zfree_pcpu(V_key_lft_zone, sav->lft_c); + uma_zfree_pcpu(ipsec_key_lft_zone, sav->lft_c); } free(sav, M_IPSEC_SA); } @@ -8269,10 +8266,6 @@ key_init(void) TAILQ_INIT(&V_sptree_ifnet[i]); } - V_key_lft_zone = uma_zcreate("IPsec SA lft_c", - sizeof(uint64_t) * 2, NULL, NULL, NULL, NULL, - UMA_ALIGN_PTR, UMA_ZONE_PCPU); - TAILQ_INIT(&V_sahtree); V_sphashtbl = hashinit(SPHASH_NHASH, M_IPSEC_SP, &V_sphash_mask); V_savhashtbl = hashinit(SAVHASH_NHASH, M_IPSEC_SA, &V_savhash_mask); @@ -8294,6 +8287,10 @@ key_init(void) if (!IS_DEFAULT_VNET(curvnet)) return; + ipsec_key_lft_zone = uma_zcreate("IPsec SA lft_c", + sizeof(uint64_t) * 2, NULL, NULL, NULL, NULL, + UMA_ALIGN_PTR, UMA_ZONE_PCPU); + SPTREE_LOCK_INIT(); REGTREE_LOCK_INIT(); SAHTREE_LOCK_INIT(); @@ -8409,10 +8406,12 @@ key_destroy(void) SPACQ_UNLOCK(); hashdestroy(V_acqaddrhashtbl, M_IPSEC_SAQ, V_acqaddrhash_mask); hashdestroy(V_acqseqhashtbl, M_IPSEC_SAQ, V_acqseqhash_mask); - uma_zdestroy(V_key_lft_zone); if (!IS_DEFAULT_VNET(curvnet)) return; + + uma_zdestroy(ipsec_key_lft_zone); + #ifndef IPSEC_DEBUG2 callout_drain(&key_timer); #endif From owner-dev-commits-src-all@freebsd.org Mon Jun 28 09:11:45 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon Jun 28 12:07:54 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon Jun 28 12:12:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 98AD5655710; Mon, 28 Jun 2021 12:12: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 4GD60w3v2Cz4tk5; Mon, 28 Jun 2021 12:12: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 6DF5525386; Mon, 28 Jun 2021 12:12: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 15SCC0ww035314; Mon, 28 Jun 2021 12:12:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SCC0fu035313; Mon, 28 Jun 2021 12:12:00 GMT (envelope-from git) Date: Mon, 28 Jun 2021 12:12:00 GMT Message-Id: <202106281212.15SCC0fu035313@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 539228d372fa - main - LinuxKPI: pci re-add pci_free_irq_vectors() MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 539228d372fae8c4cc401b7ba4620f27783be5a4 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 12:12:00 -0000 The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=539228d372fae8c4cc401b7ba4620f27783be5a4 commit 539228d372fae8c4cc401b7ba4620f27783be5a4 Author: Bjoern A. Zeeb AuthorDate: 2021-06-28 12:09:16 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-06-28 12:09:16 +0000 LinuxKPI: pci re-add pci_free_irq_vectors() Re-add pci_free_irq_vectors() accidentally removed in d4a4960c6559caa890af0901a21296e75b961210 and now needed by drm-kmod v5.5. Reported by: wulf Sponsored by: The FreeBSD Foundation MFC after: 3 days X-MFC with: d4a4960c6559caa890af0901a21296e75b961210 --- sys/compat/linuxkpi/common/include/linux/pci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 007665730353..85278356dfea 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -572,6 +572,7 @@ lkpi_pci_disable_msi(struct pci_dev *pdev) pdev->msi_enabled = false; } #define pci_disable_msi(pdev) lkpi_pci_disable_msi(pdev) +#define pci_free_irq_vectors(pdev) lkpi_pci_disable_msi(pdev) unsigned long pci_resource_start(struct pci_dev *pdev, int bar); unsigned long pci_resource_len(struct pci_dev *pdev, int bar); From owner-dev-commits-src-all@freebsd.org Mon Jun 28 12:15:47 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AED736553DD; Mon, 28 Jun 2021 12:15: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 4GD65H4Symz4tkv; Mon, 28 Jun 2021 12:15: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 819DD25314; Mon, 28 Jun 2021 12:15: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 15SCFlnp036786; Mon, 28 Jun 2021 12:15:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SCFlOD036785; Mon, 28 Jun 2021 12:15:47 GMT (envelope-from git) Date: Mon, 28 Jun 2021 12:15:47 GMT Message-Id: <202106281215.15SCFlOD036785@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 399da52fff81 - main - LinuxKPI: firmware, implement deferred loading for "nowait" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 399da52fff81a33b1f2c0cee3e8574bc3c63166f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 12:15:47 -0000 The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=399da52fff81a33b1f2c0cee3e8574bc3c63166f commit 399da52fff81a33b1f2c0cee3e8574bc3c63166f Author: Bjoern A. Zeeb AuthorDate: 2021-06-20 13:49:46 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-06-28 12:13:43 +0000 LinuxKPI: firmware, implement deferred loading for "nowait" Change linuxkpi_request_firmware_nowait() to deferred firmware loading scheduling a task. This changes behaviour in some cases that we return from loading the driver before the driver is finished initialising if the driver does not deal with it (wait). This brings the behaviour one would expect from when this function is called and I implemented it to see if it would help a specific case. Sponsored by: The FreeBSD Foundation MFC after: 12 days Reviewed by: hselasky, imp (earlier version) Differential Revision: https://reviews.freebsd.org/D30830 --- sys/compat/linuxkpi/common/src/linux_firmware.c | 74 +++++++++++++++++++------ 1 file changed, 58 insertions(+), 16 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_firmware.c b/sys/compat/linuxkpi/common/src/linux_firmware.c index 289779c5246c..d779b509105e 100644 --- a/sys/compat/linuxkpi/common/src/linux_firmware.c +++ b/sys/compat/linuxkpi/common/src/linux_firmware.c @@ -30,9 +30,13 @@ * $FreeBSD$ */ +#include +#include #include #include #include +#include +#include #include #include @@ -42,6 +46,16 @@ MALLOC_DEFINE(M_LKPI_FW, "lkpifw", "LinuxKPI firmware"); +struct lkpi_fw_task { + /* Task and arguments for the "nowait" callback. */ + struct task fw_task; + gfp_t gfp; + const char *fw_name; + struct device *dev; + void *drv; + void(*cont)(const struct linuxkpi_firmware *, void *); +}; + static int _linuxkpi_request_firmware(const char *fw_name, const struct linuxkpi_firmware **fw, struct device *dev, gfp_t gfp __unused, bool enoentok, bool warn) @@ -52,8 +66,10 @@ _linuxkpi_request_firmware(const char *fw_name, const struct linuxkpi_firmware * char *p; uint32_t flags; - if (fw_name == NULL || fw == NULL || dev == NULL) + if (fw_name == NULL || fw == NULL || dev == NULL) { + *fw = NULL; return (-EINVAL); + } /* Set independent on "warn". To debug, bootverbose is avail. */ flags = FIRMWARE_GET_NOWARN; @@ -129,28 +145,54 @@ _linuxkpi_request_firmware(const char *fw_name, const struct linuxkpi_firmware * return (0); } -int -linuxkpi_request_firmware_nowait(struct module *mod __unused, bool _t __unused, - const char *fw_name, struct device *dev, gfp_t gfp, void *drv, - void(*cont)(const struct linuxkpi_firmware *, void *)) +static void +lkpi_fw_task(void *ctx, int pending) { - const struct linuxkpi_firmware *lfw; + struct lkpi_fw_task *lfwt; + const struct linuxkpi_firmware *fw; int error; + KASSERT(ctx != NULL && pending == 1, ("%s: lfwt %p, pending %d\n", + __func__, ctx, pending)); + + lfwt = ctx; + if (lfwt->cont == NULL) + goto out; + + error = _linuxkpi_request_firmware(lfwt->fw_name, &fw, lfwt->dev, + lfwt->gfp, true, true); + /* * Linux seems to run the callback if it cannot find the firmware. - * The fact that this is "_nowait()" and has a callback seems to - * imply that this is run in a deferred conext which we currently - * do not do. Should it become necessary (a driver actually requiring - * it) we would need to implement it here. + * We call it in all cases as it is the only feedback to the requester. */ - error = _linuxkpi_request_firmware(fw_name, &lfw, dev, gfp, true, true); - if (error == -ENOENT) - error = 0; - if (error == 0) - cont(lfw, drv); + lfwt->cont(fw, lfwt->drv); + /* Do not assume fw is still valid! */ - return (error); +out: + free(lfwt, M_LKPI_FW); +} + +int +linuxkpi_request_firmware_nowait(struct module *mod __unused, bool _t __unused, + const char *fw_name, struct device *dev, gfp_t gfp, void *drv, + void(*cont)(const struct linuxkpi_firmware *, void *)) +{ + struct lkpi_fw_task *lfwt; + int error; + + lfwt = malloc(sizeof(*lfwt), M_LKPI_FW, M_WAITOK | M_ZERO); + lfwt->gfp = gfp; + lfwt->fw_name = fw_name; + lfwt->dev = dev; + lfwt->drv = drv; + lfwt->cont = cont; + TASK_INIT(&lfwt->fw_task, 0, lkpi_fw_task, lfwt); + error = taskqueue_enqueue(taskqueue_thread, &lfwt->fw_task); + + if (error) + return (-error); + return (0); } int From owner-dev-commits-src-all@freebsd.org Mon Jun 28 12:18:50 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7F70C655B0C; Mon, 28 Jun 2021 12:18: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 4GD68p39lCz4ttC; Mon, 28 Jun 2021 12:18: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 5653425392; Mon, 28 Jun 2021 12:18: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 15SCIoWS037339; Mon, 28 Jun 2021 12:18:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SCIoM7037338; Mon, 28 Jun 2021 12:18:50 GMT (envelope-from git) Date: Mon, 28 Jun 2021 12:18:50 GMT Message-Id: <202106281218.15SCIoM7037338@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 243b95978deb - main - net80211: ieee80211_probereq_ie fix length calculation for hw scans MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 243b95978debac3db06df6d26ca9f8d84f6cbd83 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 12:18:50 -0000 The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=243b95978debac3db06df6d26ca9f8d84f6cbd83 commit 243b95978debac3db06df6d26ca9f8d84f6cbd83 Author: Bjoern A. Zeeb AuthorDate: 2021-06-18 09:57:16 +0000 Commit: Bjoern A. Zeeb CommitDate: 2021-06-28 12:17:11 +0000 net80211: ieee80211_probereq_ie fix length calculation for hw scans c338cf2c6d5eacdee813191d5976aa531d450ee7 split up ieee80211_probereq_ie(). For HW scans we usually do not want to add a SSID to the IEs. During that split we allocate memory based on the length which will always include the length of the SSID and only later we reduced the length but never updated the value passed back to the caller. Split the SSID handling up and reduce the length before malloc(). This not only makes us not over-allocate in these situatoins but also fixes the length returned to the caller and with that usually directly passed to firmware. Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D30813 --- sys/net80211/ieee80211_output.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/sys/net80211/ieee80211_output.c b/sys/net80211/ieee80211_output.c index 07f7349461ac..ab3e3142ad2c 100644 --- a/sys/net80211/ieee80211_output.c +++ b/sys/net80211/ieee80211_output.c @@ -2472,6 +2472,10 @@ ieee80211_probereq_ie(struct ieee80211vap *vap, struct ieee80211com *ic, if (!alloc && len > *frmlen) return (ENOBUFS); + /* For HW scans we usually do not pass in the SSID as IE. */ + if (ssidlen == -1) + len -= (2 + IEEE80211_NWID_LEN); + if (alloc) { frm = malloc(len, M_80211_VAP, M_WAITOK | M_ZERO); *frmp = frm; @@ -2479,10 +2483,7 @@ ieee80211_probereq_ie(struct ieee80211vap *vap, struct ieee80211com *ic, } else frm = *frmp; - /* For HW scans we usually do not pass in the SSID as IE. */ - if (ssidlen == -1) - len -= (2 + IEEE80211_NWID_LEN); - else + if (ssidlen != -1) frm = ieee80211_add_ssid(frm, ssid, ssidlen); rs = ieee80211_get_suprates(ic, ic->ic_curchan); frm = ieee80211_add_rates(frm, rs); From owner-dev-commits-src-all@freebsd.org Mon Jun 28 15:16:57 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon Jun 28 15:37:39 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7255D657F16; Mon, 28 Jun 2021 15:37:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDBZC2ZgPz3P7D; Mon, 28 Jun 2021 15:37:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3CCBE27E80; Mon, 28 Jun 2021 15:37:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SFbdeo002781; Mon, 28 Jun 2021 15:37:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SFbdiG002780; Mon, 28 Jun 2021 15:37:39 GMT (envelope-from git) Date: Mon, 28 Jun 2021 15:37:39 GMT Message-Id: <202106281537.15SFbdiG002780@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 175841285e28 - main - Add deprecation notice for WITH_PROFILE option MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 175841285e289edebb6603da39f02549521ce950 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 15:37:39 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=175841285e289edebb6603da39f02549521ce950 commit 175841285e289edebb6603da39f02549521ce950 Author: Ed Maste AuthorDate: 2021-06-27 17:21:26 +0000 Commit: Ed Maste CommitDate: 2021-06-28 15:36:59 +0000 Add deprecation notice for WITH_PROFILE option As discussed on freebsd-current [1] and freebsd-arch [2] and review D30833, FreeBSD 14 will ship without the _p.a libraries built with -pg. Both upstream and base system (in commit b762974cf4b9) Clang have been modified to remove the special case for linking against these libraries. Clang's -pg support and mcount() remain, so building with -pg can still be used on code that the user builds; we just do not provide prebuilt libraries compiled with -pg. A similar change is still needed for GCC. [1] https://lists.freebsd.org/pipermail/freebsd-current/2020-January/075105.html [2] https://lists.freebsd.org/archives/freebsd-arch/2021-June/000016.html MFC after: 1 week Sponsored by: The FreeBSD Foundation --- tools/build/options/WITHOUT_PROFILE | 2 ++ tools/build/options/WITH_PROFILE | 2 ++ 2 files changed, 4 insertions(+) diff --git a/tools/build/options/WITHOUT_PROFILE b/tools/build/options/WITHOUT_PROFILE index 7fdb12c94cdd..5cc8dbb027c8 100644 --- a/tools/build/options/WITHOUT_PROFILE +++ b/tools/build/options/WITHOUT_PROFILE @@ -1,3 +1,5 @@ .\" $FreeBSD$ Do not build profiled libraries for use with .Xr gprof 8 . +This option is enabled by default as of +.Fx 14 . diff --git a/tools/build/options/WITH_PROFILE b/tools/build/options/WITH_PROFILE index 51814a1ea856..3f91c4394911 100644 --- a/tools/build/options/WITH_PROFILE +++ b/tools/build/options/WITH_PROFILE @@ -1,3 +1,5 @@ .\" $FreeBSD$ Build profiled libraries for use with .Xr gprof 8 . +This option is deprecated and is not present in +.Fx 14 . From owner-dev-commits-src-all@freebsd.org Mon Jun 28 15:49:25 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1217365805F; Mon, 28 Jun 2021 15:49: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 4GDBqm6wbVz3PpL; Mon, 28 Jun 2021 15:49: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 D5E9A4D; Mon, 28 Jun 2021 15:49: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 15SFnOtD016052; Mon, 28 Jun 2021 15:49:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SFnOvQ016051; Mon, 28 Jun 2021 15:49:24 GMT (envelope-from git) Date: Mon, 28 Jun 2021 15:49:24 GMT Message-Id: <202106281549.15SFnOvQ016051@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: d09388d01330 - main - pf: add pf_release_staten and use it in pf_unlink_state MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d09388d013300fc4aa1ee1a6bc24260cd400aff3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 15:49:25 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=d09388d013300fc4aa1ee1a6bc24260cd400aff3 commit d09388d013300fc4aa1ee1a6bc24260cd400aff3 Author: Mateusz Guzik AuthorDate: 2021-06-28 12:18:43 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-28 15:49:20 +0000 pf: add pf_release_staten and use it in pf_unlink_state Saves one atomic op. Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 11 +++++++++++ sys/netpfil/pf/pf.c | 7 ++----- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index e07016f7b66c..9578ec0a701f 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1510,6 +1510,17 @@ pf_release_state(struct pf_state *s) return (0); } +static __inline int +pf_release_staten(struct pf_state *s, u_int n) +{ + + if (refcount_releasen(&s->refs, n)) { + pf_free_state(s); + return (1); + } else + return (0); +} + extern struct pf_state *pf_find_state_byid(uint64_t, uint32_t); extern struct pf_state *pf_find_state_all(struct pf_state_key_cmp *, u_int, int *); diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 7e187a358783..02d0809f738d 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1732,11 +1732,8 @@ pf_unlink_state(struct pf_state *s, u_int flags) PF_HASHROW_UNLOCK(ih); pf_detach_state(s); - /* pf_state_insert() initialises refs to 2, so we can never release the - * last reference here, only in pf_release_state(). */ - (void)refcount_release(&s->refs); - - return (pf_release_state(s)); + /* pf_state_insert() initialises refs to 2 */ + return (pf_release_staten(s, 2)); } void From owner-dev-commits-src-all@freebsd.org Mon Jun 28 15:49:26 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 44DB1657C75; Mon, 28 Jun 2021 15:49: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 4GDBqp0Xtzz3PrP; Mon, 28 Jun 2021 15:49:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EF96E277F5; Mon, 28 Jun 2021 15:49:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SFnPv2016076; Mon, 28 Jun 2021 15:49:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SFnPV8016075; Mon, 28 Jun 2021 15:49:25 GMT (envelope-from git) Date: Mon, 28 Jun 2021 15:49:25 GMT Message-Id: <202106281549.15SFnPV8016075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: ccb17a21041e - main - pf: factor out state allocation into pf_alloc_state MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ccb17a21041e9206b80fa9f64b6ec20233df6403 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 15:49:26 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=ccb17a21041e9206b80fa9f64b6ec20233df6403 commit ccb17a21041e9206b80fa9f64b6ec20233df6403 Author: Mateusz Guzik AuthorDate: 2021-06-28 12:22:31 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-28 15:49:20 +0000 pf: factor out state allocation into pf_alloc_state Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 02d0809f738d..26989adfb613 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1736,6 +1736,28 @@ pf_unlink_state(struct pf_state *s, u_int flags) return (pf_release_staten(s, 2)); } +static struct pf_state * +pf_alloc_state(int flags) +{ + struct pf_state *s; + + s = uma_zalloc(V_pf_state_z, flags | M_ZERO); + if (__predict_false(s == NULL)) + return (NULL); + + for (int i = 0; i < 2; i++) { + s->bytes[i] = counter_u64_alloc(M_NOWAIT); + s->packets[i] = counter_u64_alloc(M_NOWAIT); + + if (s->bytes[i] == NULL || s->packets[i] == NULL) { + pf_free_state(s); + return (NULL); + } + } + + return (s); +} + void pf_free_state(struct pf_state *cur) { @@ -3730,21 +3752,11 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, REASON_SET(&reason, PFRES_SRCLIMIT); goto csfailed; } - s = uma_zalloc(V_pf_state_z, M_NOWAIT | M_ZERO); + s = pf_alloc_state(M_NOWAIT); if (s == NULL) { REASON_SET(&reason, PFRES_MEMORY); goto csfailed; } - for (int i = 0; i < 2; i++) { - s->bytes[i] = counter_u64_alloc(M_NOWAIT); - s->packets[i] = counter_u64_alloc(M_NOWAIT); - - if (s->bytes[i] == NULL || s->packets[i] == NULL) { - pf_free_state(s); - REASON_SET(&reason, PFRES_MEMORY); - goto csfailed; - } - } s->rule.ptr = r; s->nat_rule.ptr = nr; s->anchor.ptr = a; From owner-dev-commits-src-all@freebsd.org Mon Jun 28 15:49:27 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 53947657ED3; Mon, 28 Jun 2021 15:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDBqq1rfBz3Q2V; Mon, 28 Jun 2021 15:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2711D27EC6; Mon, 28 Jun 2021 15:49:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SFnR4o016106; Mon, 28 Jun 2021 15:49:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SFnRVX016105; Mon, 28 Jun 2021 15:49:27 GMT (envelope-from git) Date: Mon, 28 Jun 2021 15:49:27 GMT Message-Id: <202106281549.15SFnRVX016105@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: e6dd0e2e8d4f - main - pf: assert that sizeof(struct pf_state) <= 312 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6dd0e2e8d4f59275fb576a9ccb9d356d36457bb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 15:49:27 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=e6dd0e2e8d4f59275fb576a9ccb9d356d36457bb commit e6dd0e2e8d4f59275fb576a9ccb9d356d36457bb Author: Mateusz Guzik AuthorDate: 2021-06-28 12:49:40 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-28 15:49:20 +0000 pf: assert that sizeof(struct pf_state) <= 312 To prevent accidentally going over a threshold which makes UMA fit only 12 objects per page instead of 13. Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 9578ec0a701f..9f0bf002b631 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -551,6 +551,11 @@ struct pf_state { u_int8_t sync_updates; u_int8_t _tail[3]; }; + +/* + * Size <= fits 13 objects per page on LP64. Try to not grow the struct beyond that. + */ +_Static_assert(sizeof(struct pf_state) <= 312, "pf_state size crosses 312 bytes"); #endif /* From owner-dev-commits-src-all@freebsd.org Mon Jun 28 16:02:19 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon Jun 28 16:04:19 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon Jun 28 16:04:20 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon Jun 28 16:14:47 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon Jun 28 16:14:49 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 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-all@freebsd.org Mon Jun 28 16:30:11 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2A705658B10; Mon, 28 Jun 2021 16:30:11 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDCkp5fT8z3jL9; Mon, 28 Jun 2021 16:30:10 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 15SGU2pX097042; Mon, 28 Jun 2021 09:30:02 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 15SGU2j0097041; Mon, 28 Jun 2021 09:30:02 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202106281630.15SGU2j0097041@gndrsh.dnsmgr.net> Subject: Re: git: b762974cf4b9 - main - clang: stop linking _p libs for -pg as of FreeBSD 14 In-Reply-To: <202106271712.15RHConb019042@gitrepo.freebsd.org> To: Ed Maste Date: Mon, 28 Jun 2021 09:30:02 -0700 (PDT) CC: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4GDCkp5fT8z3jL9 X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 16:30:11 -0000 > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=b762974cf4b9ea77f1decf4a6d829372f0a97f75 > > commit b762974cf4b9ea77f1decf4a6d829372f0a97f75 > Author: Ed Maste > AuthorDate: 2021-06-26 23:58:16 +0000 > Commit: Ed Maste > CommitDate: 2021-06-27 17:12:12 +0000 > > clang: stop linking _p libs for -pg as of FreeBSD 14 > > In FreeBSD 14 we will stop providing _p libraries (compiled with -pg). So if this is being done in 14 only, why is there a MFC marker? Should that of been MFC: never? > Reviewed by: dim (upstream) > Obtained from: LLVM 699d47472c3f > MFC after: 2 weeks > Sponsored by: The FreeBSD Foundation > Differential Revision: https://reviews.freebsd.org/D30861 > --- > .../clang/lib/Driver/ToolChains/FreeBSD.cpp | 17 ++++++++++------- > 1 file changed, 10 insertions(+), 7 deletions(-) > > diff --git a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp > index 37c0a68234ed..652e5c4cb9e6 100644 > --- a/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp > +++ b/contrib/llvm-project/clang/lib/Driver/ToolChains/FreeBSD.cpp > @@ -293,6 +293,8 @@ void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, > addLinkerCompressDebugSectionsOption(ToolChain, Args, CmdArgs); > AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA); > > + bool Profiling = Args.hasArg(options::OPT_pg) && > + ToolChain.getTriple().getOSMajorVersion() < 14; > if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) { > // Use the static OpenMP runtime with -static-openmp > bool StaticOpenMP = Args.hasArg(options::OPT_static_openmp) && > @@ -302,7 +304,7 @@ void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, > if (D.CCCIsCXX()) { > if (ToolChain.ShouldLinkCXXStdlib(Args)) > ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs); > - if (Args.hasArg(options::OPT_pg)) > + if (Profiling) > CmdArgs.push_back("-lm_p"); > else > CmdArgs.push_back("-lm"); > @@ -313,13 +315,13 @@ void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, > linkXRayRuntimeDeps(ToolChain, CmdArgs); > // FIXME: For some reason GCC passes -lgcc and -lgcc_s before adding > // the default system libraries. Just mimic this for now. > - if (Args.hasArg(options::OPT_pg)) > + if (Profiling) > CmdArgs.push_back("-lgcc_p"); > else > CmdArgs.push_back("-lgcc"); > if (Args.hasArg(options::OPT_static)) { > CmdArgs.push_back("-lgcc_eh"); > - } else if (Args.hasArg(options::OPT_pg)) { > + } else if (Profiling) { > CmdArgs.push_back("-lgcc_eh_p"); > } else { > CmdArgs.push_back("--as-needed"); > @@ -328,13 +330,13 @@ void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, > } > > if (Args.hasArg(options::OPT_pthread)) { > - if (Args.hasArg(options::OPT_pg)) > + if (Profiling) > CmdArgs.push_back("-lpthread_p"); > else > CmdArgs.push_back("-lpthread"); > } > > - if (Args.hasArg(options::OPT_pg)) { > + if (Profiling) { > if (Args.hasArg(options::OPT_shared)) > CmdArgs.push_back("-lc"); > else > @@ -347,7 +349,7 @@ void freebsd::Linker::ConstructJob(Compilation &C, const JobAction &JA, > > if (Args.hasArg(options::OPT_static)) { > CmdArgs.push_back("-lgcc_eh"); > - } else if (Args.hasArg(options::OPT_pg)) { > + } else if (Profiling) { > CmdArgs.push_back("-lgcc_eh_p"); > } else { > CmdArgs.push_back("--as-needed"); > @@ -416,7 +418,8 @@ void FreeBSD::addLibStdCxxIncludePaths( > void FreeBSD::AddCXXStdlibLibArgs(const ArgList &Args, > ArgStringList &CmdArgs) const { > CXXStdlibType Type = GetCXXStdlibType(Args); > - bool Profiling = Args.hasArg(options::OPT_pg); > + bool Profiling = > + Args.hasArg(options::OPT_pg) && getTriple().getOSMajorVersion() < 14; > > switch (Type) { > case ToolChain::CST_Libcxx: > -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-all@freebsd.org Mon Jun 28 17:26:52 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 63A496594D6; Mon, 28 Jun 2021 17:26:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDF0D2MbXz3lgK; Mon, 28 Jun 2021 17:26:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f54.google.com (mail-qv1-f54.google.com [209.85.219.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 35023B59E; Mon, 28 Jun 2021 17:26:52 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f54.google.com with SMTP id p7so6458217qvn.5; Mon, 28 Jun 2021 10:26:52 -0700 (PDT) X-Gm-Message-State: AOAM532HnVKm+k8iAv6F8dsM3odbZh5YPtG31LYNycJV4aAw/ewfT5YB dUzfNwW00DGqkzdKKj0Yy5u9eAoL0Rjpegm07lM= X-Google-Smtp-Source: ABdhPJyN0u0HNPYFKP48OGNi2LsP9Giq9W58ENAmd+BcApJYvNl+xE0OxhaNRC++qA8jz9+tLYOvIIMtqHb4b+7HIOA= X-Received: by 2002:ad4:4b22:: with SMTP id s2mr26711256qvw.22.1624901211885; Mon, 28 Jun 2021 10:26:51 -0700 (PDT) MIME-Version: 1.0 References: <202106281537.15SFbdiG002780@gitrepo.freebsd.org> In-Reply-To: <202106281537.15SFbdiG002780@gitrepo.freebsd.org> From: Kyle Evans Date: Mon, 28 Jun 2021 10:26:40 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 175841285e28 - main - Add deprecation notice for WITH_PROFILE option To: Ed Maste Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 17:26:52 -0000 On Mon, Jun 28, 2021 at 8:37 AM Ed Maste wrote: > > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=175841285e289edebb6603da39f02549521ce950 > > commit 175841285e289edebb6603da39f02549521ce950 > Author: Ed Maste > AuthorDate: 2021-06-27 17:21:26 +0000 > Commit: Ed Maste > CommitDate: 2021-06-28 15:36:59 +0000 > > Add deprecation notice for WITH_PROFILE option > > As discussed on freebsd-current [1] and freebsd-arch [2] and review > D30833, FreeBSD 14 will ship without the _p.a libraries built with -pg. > Both upstream and base system (in commit b762974cf4b9) Clang have been > modified to remove the special case for linking against these libraries. > > Clang's -pg support and mcount() remain, so building with -pg can still > be used on code that the user builds; we just do not provide prebuilt > libraries compiled with -pg. A similar change is still needed for GCC. > > [1] https://lists.freebsd.org/pipermail/freebsd-current/2020-January/075105.html > [2] https://lists.freebsd.org/archives/freebsd-arch/2021-June/000016.html > > MFC after: 1 week > Sponsored by: The FreeBSD Foundation > --- > tools/build/options/WITHOUT_PROFILE | 2 ++ > tools/build/options/WITH_PROFILE | 2 ++ > 2 files changed, 4 insertions(+) > > diff --git a/tools/build/options/WITHOUT_PROFILE b/tools/build/options/WITHOUT_PROFILE > index 7fdb12c94cdd..5cc8dbb027c8 100644 > --- a/tools/build/options/WITHOUT_PROFILE > +++ b/tools/build/options/WITHOUT_PROFILE > @@ -1,3 +1,5 @@ > .\" $FreeBSD$ > Do not build profiled libraries for use with > .Xr gprof 8 . > +This option is enabled by default as of > +.Fx 14 . I know we could bikeshed this all day, but I think this verbiage is a little too casual; "enabled by default" makes it sound like it can be turned off, when it's really becoming non-optional. > diff --git a/tools/build/options/WITH_PROFILE b/tools/build/options/WITH_PROFILE > index 51814a1ea856..3f91c4394911 100644 > --- a/tools/build/options/WITH_PROFILE > +++ b/tools/build/options/WITH_PROFILE > @@ -1,3 +1,5 @@ > .\" $FreeBSD$ > Build profiled libraries for use with > .Xr gprof 8 . > +This option is deprecated and is not present in > +.Fx 14 From owner-dev-commits-src-all@freebsd.org Mon Jun 28 18:31:56 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0920465A31C; Mon, 28 Jun 2021 18:31: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 4GDGRH6Sgmz3sch; Mon, 28 Jun 2021 18:31: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 C63CC251D; Mon, 28 Jun 2021 18:31: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 15SIVtgv041606; Mon, 28 Jun 2021 18:31:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SIVt3p041605; Mon, 28 Jun 2021 18:31:55 GMT (envelope-from git) Date: Mon, 28 Jun 2021 18:31:55 GMT Message-Id: <202106281831.15SIVt3p041605@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: c7a7e547a5ad - main - vn_isdisk(9): update after r364372 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7a7e547a5ad2c699fed4c011c65bcd7c0d5f859 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 18:31:56 -0000 The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=c7a7e547a5ad2c699fed4c011c65bcd7c0d5f859 commit c7a7e547a5ad2c699fed4c011c65bcd7c0d5f859 Author: Robert Wing AuthorDate: 2021-06-28 18:27:27 +0000 Commit: Robert Wing CommitDate: 2021-06-28 18:27:27 +0000 vn_isdisk(9): update after r364372 Reviewed by: mjg Differential Revision: https://reviews.freebsd.org/D30874 --- share/man/man9/vn_isdisk.9 | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/share/man/man9/vn_isdisk.9 b/share/man/man9/vn_isdisk.9 index 76cdf96810cb..5de75e53e1e7 100644 --- a/share/man/man9/vn_isdisk.9 +++ b/share/man/man9/vn_isdisk.9 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd July 9, 2001 +.Dd June 28, 2021 .Dt VN_ISDISK 9 .Os .Sh NAME @@ -35,12 +35,16 @@ .Sh SYNOPSIS .In sys/param.h .In sys/vnode.h -.Ft int -.Fn vn_isdisk "struct vnode *vp" "int *errp" +.Ft bool +.Fn vn_isdisk "struct vnode *vp" +.Ft bool +.Fn vn_isdisk_error "struct vnode *vp" "int *errp" .Sh DESCRIPTION The .Fn vn_isdisk -function checks to see if +and +.Fn vn_isdisk_error +functions check to see if .Fa vp represents a disk. In order for @@ -56,7 +60,7 @@ must have .Dv D_DISK set. .Pp -Its arguments are: +The arguments are: .Bl -tag -width ".Fa errp" .It Fa vp The vnode to check. @@ -64,7 +68,7 @@ The vnode to check. An integer pointer to store the error number in if the call fails. .El .Sh RETURN VALUES -If the vnode represents a disk, 1 is returned; otherwise, 0 +If the vnode represents a disk, true is returned; otherwise, false is returned and .Fa errp will contain the error number. From owner-dev-commits-src-all@freebsd.org Mon Jun 28 19:57:15 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3D3A65B414; Mon, 28 Jun 2021 19:57:14 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lf1-f43.google.com (mail-lf1-f43.google.com [209.85.167.43]) (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 4GDJKk309Bz4SNK; Mon, 28 Jun 2021 19:57:14 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-lf1-f43.google.com with SMTP id h15so34703322lfv.12; Mon, 28 Jun 2021 12:57:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=aErUdnzt8iYvC10nZiSIQDvcniVNWVYuk9qF+pYji2M=; b=pSxHt4h5O4pIEMy6uo0h/Ijmm9GmFKUNWZyQnY7GZ+dJdRgnoXIgycRjrwHEluMo+n pWb77cJntYI/n0ucSAsS4GmUF0tTsva1S2wOP1BOv7KQ0eFOd16d4NTr8iCe1XdL6sko ipxiqIKScPTIFN9ih3q9XQHrltVn1tbyICBU9akQcuujs3CMw+pVZI1QHR/etGp6UMKL rynFoRtiNpiH8YCJf97vcggT1m5pDq94GLX4PQub3sLn+0/joVuno5XpGfS9RTWG0LBf V/xN2L04GzpTkCx2vsLjSOGAEOmY2nubQ0skaF92O4hyDONCK/A9PWRZ6a2/vGXMQiRz qi+Q== X-Gm-Message-State: AOAM532zWyn9BkmVIkpavmJBkTiRJhJt5Im5Qui9w0ubiPXzKbE1mG8X /GNDNFDkxELlCB9Eh+jNZ7QS+lZOQOSJGEeDie5rdAub X-Google-Smtp-Source: ABdhPJwBrXd9zpqkWAJ4TpdpZSHXd0P06Ll/iv7Y3kbA05kyOHpNCH5ws1jqKSyRxWQP31Fq9toNBAZKsnmZK8ixawg= X-Received: by 2002:ac2:4310:: with SMTP id l16mr5971903lfh.481.1624910232172; Mon, 28 Jun 2021 12:57:12 -0700 (PDT) MIME-Version: 1.0 References: <202106281537.15SFbdiG002780@gitrepo.freebsd.org> In-Reply-To: From: Ed Maste Date: Mon, 28 Jun 2021 15:56:50 -0400 Message-ID: Subject: Re: git: 175841285e28 - main - Add deprecation notice for WITH_PROFILE option To: Kyle Evans Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4GDJKk309Bz4SNK X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 19:57:15 -0000 On Mon, 28 Jun 2021 at 13:26, Kyle Evans wrote: > > I know we could bikeshed this all day, but I think this verbiage is a > little too casual; "enabled by default" makes it sound like it can be > turned off, when it's really becoming non-optional. That's a good point; I wanted to make sure some notice is in and can be MFC'd soon. Anyhow PROFILE will at least default to off for 14, but will probably be removed entirely. How about "The PROFILE functionality is not available in .Fx 14."? From owner-dev-commits-src-all@freebsd.org Mon Jun 28 20:00:07 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0C73165B23A; Mon, 28 Jun 2021 20:00:07 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDJP26yKRz4SfR; Mon, 28 Jun 2021 20:00:06 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-lf1-f42.google.com with SMTP id f30so34878490lfj.1; Mon, 28 Jun 2021 13:00:06 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=il9R1eWAYma3gXtN3ScdR9SJc8DYFCMTzclVIosvEj0=; b=JyGO4Vqkk1g7t2FNYz0KO6ad8bxYAyqYhyPyQxu+JIbJIleXIuln0zT6ZsugEzkIk2 MuFBBzvomwBzdcYCWmsoivdKEW1P5cKAdy/HXiVkmp5VW0QBLgwLNBYGXn+o/eCF1No/ 0k6MrTWohU2SIGHpv9of8jdeoY9De8G6FeLZUfISJO8ULV1riot4OpyagVPbwp6wT9m3 1Z/w0uCY8YZDw0qf09uBW/3tmbwy+T2D/dUVEGflE/xq6oBQ+YDyOk0qBT1G+iV3YL7s qBytbqpDisopcE5buqhAg/EGsl6sf19H0UQcQEEeeSpD8QbOfQ7ZGiYq3PY/VPbJP6ml oO2A== X-Gm-Message-State: AOAM5333Fa7MosQ3yLkzaA2FsNydC0ack1T/WeRbxrdS4bvHlPGFw7MM wjcf6M/c5zAPoUFMwB2jVNxnWWvqAUPxrtLmOA9w78Vt X-Google-Smtp-Source: ABdhPJyzfqLvheniKRmXtX+yXBlxjhseE5+CKnmcSNgVpVahI9BaOTcR3sEacR0s9FAJl/QMxjd7G4S2ehQruPa7BH4= X-Received: by 2002:ac2:4310:: with SMTP id l16mr5978972lfh.481.1624910403829; Mon, 28 Jun 2021 13:00:03 -0700 (PDT) MIME-Version: 1.0 References: <202106271712.15RHConb019042@gitrepo.freebsd.org> <202106281630.15SGU2j0097041@gndrsh.dnsmgr.net> In-Reply-To: <202106281630.15SGU2j0097041@gndrsh.dnsmgr.net> From: Ed Maste Date: Mon, 28 Jun 2021 15:59:42 -0400 Message-ID: Subject: Re: git: b762974cf4b9 - main - clang: stop linking _p libs for -pg as of FreeBSD 14 To: "Rodney W. Grimes" Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4GDJP26yKRz4SfR X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 20:00:07 -0000 > > clang: stop linking _p libs for -pg as of FreeBSD 14 > > > > In FreeBSD 14 we will stop providing _p libraries (compiled with -pg). > > So if this is being done in 14 only, why is there a MFC marker? > Should that of been MFC: never? ... > > + bool Profiling = Args.hasArg(options::OPT_pg) && > > + ToolChain.getTriple().getOSMajorVersion() < 14; The compiler applies this logic only to 14 and later. MFCing will allow a FreeBSD 13 Clang to build a FreeBSD 14 binary with -pg. From owner-dev-commits-src-all@freebsd.org Mon Jun 28 20:01:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 551AA65B72F; Mon, 28 Jun 2021 20:01:30 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDJQf14Tvz4T7T; Mon, 28 Jun 2021 20:01:30 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qv1-f53.google.com (mail-qv1-f53.google.com [209.85.219.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id 0A1D6CA7A; Mon, 28 Jun 2021 20:01:30 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qv1-f53.google.com with SMTP id g14so2325718qvo.7; Mon, 28 Jun 2021 13:01:30 -0700 (PDT) X-Gm-Message-State: AOAM532USCvFdoP+O4fkB3DDiBD+nxIiuTdpRBpXOy20Kaa07OcA5ZiL e/HE/tgoliw3JTuNfxRdw8U8YdQXfX1O7SKDyjo= X-Google-Smtp-Source: ABdhPJw95uDJ5NXC35iXrSD8NziBVvzB6gXbCD+RKiMrroo2xri3nrKrBSD4U0aNh5lUm57RCfTcEDTSoUZHnD7xMKc= X-Received: by 2002:a05:6214:12c7:: with SMTP id s7mr11792502qvv.60.1624910489516; Mon, 28 Jun 2021 13:01:29 -0700 (PDT) MIME-Version: 1.0 References: <202106281537.15SFbdiG002780@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Mon, 28 Jun 2021 13:01:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 175841285e28 - main - Add deprecation notice for WITH_PROFILE option To: Ed Maste Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 20:01:30 -0000 On Mon, Jun 28, 2021 at 12:57 PM Ed Maste wrote: > > On Mon, 28 Jun 2021 at 13:26, Kyle Evans wrote: > > > > I know we could bikeshed this all day, but I think this verbiage is a > > little too casual; "enabled by default" makes it sound like it can be > > turned off, when it's really becoming non-optional. > > That's a good point; I wanted to make sure some notice is in and can > be MFC'd soon. Anyhow PROFILE will at least default to off for 14, but > will probably be removed entirely. > > How about "The PROFILE functionality is not available in .Fx 14."? +1, I like that. From owner-dev-commits-src-all@freebsd.org Mon Jun 28 21:40:11 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1066965C7EC; Mon, 28 Jun 2021 21:40:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDLcV74Bdz4gNm; Mon, 28 Jun 2021 21:40: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 DB0B44F0D; Mon, 28 Jun 2021 21:40: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 15SLeAtp085475; Mon, 28 Jun 2021 21:40:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SLeAI0085472; Mon, 28 Jun 2021 21:40:10 GMT (envelope-from git) Date: Mon, 28 Jun 2021 21:40:10 GMT Message-Id: <202106282140.15SLeAI0085472@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: c5d3206ac6e1 - main - cam: kill trailing white space in two spots MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c5d3206ac6e15ace5862b190acf2d6dbd4c87e2c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 21:40:11 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c5d3206ac6e15ace5862b190acf2d6dbd4c87e2c commit c5d3206ac6e15ace5862b190acf2d6dbd4c87e2c Author: Warner Losh AuthorDate: 2021-06-25 21:33:31 +0000 Commit: Warner Losh CommitDate: 2021-06-28 21:36:19 +0000 cam: kill trailing white space in two spots --- sys/cam/cam_xpt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index b0e112868383..d2aa5952459d 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -5573,7 +5573,7 @@ camisr_runqueue(void) } } -struct kv +struct kv { uint32_t v; const char *name; @@ -5625,7 +5625,7 @@ static struct kv map[] = { }; const char * -xpt_action_name(uint32_t action) +xpt_action_name(uint32_t action) { static char buffer[32]; /* Only for unknown messages -- racy */ struct kv *walker = map; From owner-dev-commits-src-all@freebsd.org Mon Jun 28 21:43:16 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1A7AD65CE0C; Mon, 28 Jun 2021 21:43:16 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-il1-f170.google.com (mail-il1-f170.google.com [209.85.166.170]) (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 4GDLh40BRjz4gpc; Mon, 28 Jun 2021 21:43:15 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: by mail-il1-f170.google.com with SMTP id s19so18895139ilj.1; Mon, 28 Jun 2021 14:43:15 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=d9Yy2YA9gIfwdsuOGolyNa3TzVpMEO/12CGQMRiSJAI=; b=gvpaeW1d9ltFDcjTjh7CitLGHZjvtZ/cuH9gobjqb13jPDsA5RUyECC8Zyvgm7SL41 ykAf8znEPmK1bOYqq5LFe1dx9TIH8UxBJkHmV+npRN42HfifmWSywbVZrD+DW4ZxAC5Q +uq/OUvy7MoiNYD9PzmWUPpfYDesBfYf/wEDo6O00k4mxQSKH3/LvJ1nQ3lv5ngNGxcn XrPJVbVltbTfPTxpBmXqS40Aal7gWZZl6E3awd0YNPF2pqCdMzENC8t4lbfNE34L7tHo K4qsnKxPo8fZpXSsOvUoBoUZ6aIa7a+FfAB/Yb3pNdHRTAgqK+W7G//EYIo7P8JEbqpO uNvg== X-Gm-Message-State: AOAM530ds2kZKm+YRwl1GfmD+nAocnFR9wvDx7fF7rrDRvhpHW6UEDz8 PBDUgRRQidTzJVapdDvnf4f7dMnxkRrDmdyhwPwxy1Jj+p0= X-Google-Smtp-Source: ABdhPJyyvC4s4govB3aUgM/yEUk0YkJaAcQIHc1CJo9vMOqKIf3ScDX2KGaJttRUwYlSCgNCnMctjlye4bvBUDUGntg= X-Received: by 2002:a92:d0d1:: with SMTP id y17mr10464257ila.256.1624916594271; Mon, 28 Jun 2021 14:43:14 -0700 (PDT) MIME-Version: 1.0 References: <202106281537.15SFbdiG002780@gitrepo.freebsd.org> In-Reply-To: From: Ed Maste Date: Mon, 28 Jun 2021 17:42:52 -0400 Message-ID: Subject: Re: git: 175841285e28 - main - Add deprecation notice for WITH_PROFILE option To: Kyle Evans Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4GDLh40BRjz4gpc X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 21:43:16 -0000 On Mon, 28 Jun 2021 at 16:01, Kyle Evans wrote: > > On Mon, Jun 28, 2021 at 12:57 PM Ed Maste wrote: > > > > How about "The PROFILE functionality is not available in .Fx 14."? > > +1, I like that. Hrm, I think I don't need a note in WITHOUT_PROFILE in fact. I added it originally because I thought PROFILE was on by default for all archs on stable branches, which would have only WITHOUT_PROFILE in src.conf.5. However, mips64 lacks PROFILE support so both are listed - thus with a note in WITH_PROFILE only we'd have: WITHOUT_PROFILE Do not build profiled libraries for use with gprof(8). This is a default setting on mips/mips64. WITH_PROFILE Build profiled libraries for use with gprof(8). This option is deprecated and is not present in FreeBSD 14. This is a default setting on amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mips, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. which I think is sufficient. From owner-dev-commits-src-all@freebsd.org Mon Jun 28 22:16:29 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E2A9E65D4C5; Mon, 28 Jun 2021 22:16:29 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMQP5v9wz4jCn; Mon, 28 Jun 2021 22:16:29 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: from mail-qt1-f176.google.com (mail-qt1-f176.google.com [209.85.160.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) (Authenticated sender: kevans) by smtp.freebsd.org (Postfix) with ESMTPSA id AD2A5E0D2; Mon, 28 Jun 2021 22:16:29 +0000 (UTC) (envelope-from kevans@freebsd.org) Received: by mail-qt1-f176.google.com with SMTP id g3so10430824qth.11; Mon, 28 Jun 2021 15:16:29 -0700 (PDT) X-Gm-Message-State: AOAM530DL3GkUnEmwylmf75sfJUqR7nlDVHPU2OSCv4IT5vpFDd6EV36 14nQApozkiB4O+DZxEV9/jJbhvnD4fIPVM2ravc= X-Google-Smtp-Source: ABdhPJzolJ9P847TuH8gcOHrmG9VdWZREZ7bBSh14BNfdX+8dI6XuwWATr7k/58w6y9AQBFh6sZDP/NjM+/UrolUmK4= X-Received: by 2002:ac8:6c6:: with SMTP id j6mr23332705qth.242.1624918589299; Mon, 28 Jun 2021 15:16:29 -0700 (PDT) MIME-Version: 1.0 References: <202106281537.15SFbdiG002780@gitrepo.freebsd.org> In-Reply-To: From: Kyle Evans Date: Mon, 28 Jun 2021 15:16:18 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: git: 175841285e28 - main - Add deprecation notice for WITH_PROFILE option To: Ed Maste Cc: src-committers , "" , dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:16:30 -0000 On Mon, Jun 28, 2021 at 2:43 PM Ed Maste wrote: > > On Mon, 28 Jun 2021 at 16:01, Kyle Evans wrote: > > > > On Mon, Jun 28, 2021 at 12:57 PM Ed Maste wrote: > > > > > > How about "The PROFILE functionality is not available in .Fx 14."? > > > > +1, I like that. > > Hrm, I think I don't need a note in WITHOUT_PROFILE in fact. I added > it originally because I thought PROFILE was on by default for all > archs on stable branches, which would have only WITHOUT_PROFILE in > src.conf.5. However, mips64 lacks PROFILE support so both are listed - > thus with a note in WITH_PROFILE only we'd have: > > WITHOUT_PROFILE > Do not build profiled libraries for use with gprof(8). > > This is a default setting on mips/mips64. > > WITH_PROFILE > Build profiled libraries for use with gprof(8). This option is > deprecated and is not present in FreeBSD 14. > > This is a default setting on amd64/amd64, arm/armv6, arm/armv7, > arm64/aarch64, i386/i386, mips/mips, powerpc/powerpc, > powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. > > which I think is sufficient. Oh yeah, totally; +1 to omitting it based on this. From owner-dev-commits-src-all@freebsd.org Mon Jun 28 22:24:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7766A65DA80; Mon, 28 Jun 2021 22: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 4GDMb42nsvz4k6c; Mon, 28 Jun 2021 22: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 3B8A756F2; Mon, 28 Jun 2021 22:24: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 15SMO05Q048695; Mon, 28 Jun 2021 22: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 15SMO08S048694; Mon, 28 Jun 2021 22:24:00 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:00 GMT Message-Id: <202106282224.15SMO08S048694@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 56e1161b09c3 - main - cam: fix UB behavior MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 56e1161b09c38c90d27182414f49d042046dded8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:00 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=56e1161b09c38c90d27182414f49d042046dded8 commit 56e1161b09c38c90d27182414f49d042046dded8 Author: Warner Losh AuthorDate: 2021-06-28 21:56:08 +0000 Commit: Warner Losh CommitDate: 2021-06-28 21:56:08 +0000 cam: fix UB behavior The trick of subtracting one from the poitner returned from malloc results in undefined behavior: >>C89: 3.3.6 Unless both the pointer operand and the result point to a >>member of the same array object, or one past the last member of the >>array object, the behavior is undefined. Instead, allocate 1 extra element and stop adjusting the pointer. While a little wasteful, the extra is in the noise on today's systems. Reviewed by: scottl@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30847 --- sys/cam/cam_queue.c | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/sys/cam/cam_queue.c b/sys/cam/cam_queue.c index 074b0545a1fd..1bb1713d65c5 100644 --- a/sys/cam/cam_queue.c +++ b/sys/cam/cam_queue.c @@ -60,17 +60,16 @@ camq_init(struct camq *camq, int size) bzero(camq, sizeof(*camq)); camq->array_size = size; if (camq->array_size != 0) { - camq->queue_array = (cam_pinfo**)malloc(size*sizeof(cam_pinfo*), - M_CAMQ, M_NOWAIT); + /* + * Heap algorithms like everything numbered from 1, so + * allocate one more to account for 0 base. + */ + camq->queue_array = malloc((size + 1) * sizeof(cam_pinfo*), + M_CAMQ, M_NOWAIT); if (camq->queue_array == NULL) { printf("camq_init: - cannot malloc array!\n"); return (1); } - /* - * Heap algorithms like everything numbered from 1, so - * offset our pointer into the heap array by one element. - */ - camq->queue_array--; } return (0); } @@ -85,11 +84,6 @@ void camq_fini(struct camq *queue) { if (queue->queue_array != NULL) { - /* - * Heap algorithms like everything numbered from 1, so - * our pointer into the heap array is offset by one element. - */ - queue->queue_array++; free(queue->queue_array, M_CAMQ); } } @@ -102,8 +96,8 @@ camq_resize(struct camq *queue, int new_size) KASSERT(new_size >= queue->entries, ("camq_resize: " "New queue size can't accommodate queued entries (%d < %d).", new_size, queue->entries)); - new_array = (cam_pinfo **)malloc(new_size * sizeof(cam_pinfo *), - M_CAMQ, M_NOWAIT); + new_array = malloc((new_size + 1) * sizeof(cam_pinfo *), M_CAMQ, + M_NOWAIT); if (new_array == NULL) { /* Couldn't satisfy request */ return (CAM_RESRC_UNAVAIL); @@ -114,12 +108,11 @@ camq_resize(struct camq *queue, int new_size) * by one element. */ if (queue->queue_array != NULL) { - queue->queue_array++; bcopy(queue->queue_array, new_array, - queue->entries * sizeof(cam_pinfo *)); + (queue->entries + 1) * sizeof(cam_pinfo *)); free(queue->queue_array, M_CAMQ); } - queue->queue_array = new_array-1; + queue->queue_array = new_array; queue->array_size = new_size; return (CAM_REQ_CMP); } From owner-dev-commits-src-all@freebsd.org Mon Jun 28 22:23:59 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3CAF365D7D2; Mon, 28 Jun 2021 22:23: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 4GDMb318S9z4jwp; Mon, 28 Jun 2021 22:23: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 0FC9257F5; Mon, 28 Jun 2021 22: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 15SMNxE2048671; Mon, 28 Jun 2021 22: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 15SMNwf6048670; Mon, 28 Jun 2021 22:23:58 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:23:58 GMT Message-Id: <202106282223.15SMNwf6048670@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 40990d54834b - main - cam: save parent_dev in xpt_bus_register MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 40990d54834bb319eb3d3b5e7192d799b41946fc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:23:59 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=40990d54834bb319eb3d3b5e7192d799b41946fc commit 40990d54834bb319eb3d3b5e7192d799b41946fc Author: Warner Losh AuthorDate: 2021-06-28 21:55:02 +0000 Commit: Warner Losh CommitDate: 2021-06-28 21:55:02 +0000 cam: save parent_dev in xpt_bus_register Reviewed by: scottl@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30846 --- sys/cam/cam_xpt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index d2aa5952459d..81d5d98fb9d4 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -4024,6 +4024,7 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) new_bus->flags = 0; new_bus->refcount = 1; /* Held until a bus_deregister event */ new_bus->generation = 0; + new_bus->parent_dev = parent; xpt_lock_buses(); sim->path_id = new_bus->path_id = From owner-dev-commits-src-all@freebsd.org Mon Jun 28 22:24:03 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DC5C465D83E; Mon, 28 Jun 2021 22: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 4GDMb64v4Jz4jx1; Mon, 28 Jun 2021 22: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 8646E57F7; Mon, 28 Jun 2021 22: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 15SMO2jS048749; Mon, 28 Jun 2021 22: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 15SMO2NT048748; Mon, 28 Jun 2021 22:24:02 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:02 GMT Message-Id: <202106282224.15SMO2NT048748@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1ed401626792 - main - cam: add xpt_path_sim_device to return device_t associated with a path MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1ed401626792b2888e2e29befb13c23ff2273c4e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:03 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1ed401626792b2888e2e29befb13c23ff2273c4e commit 1ed401626792b2888e2e29befb13c23ff2273c4e Author: Warner Losh AuthorDate: 2021-06-28 21:57:51 +0000 Commit: Warner Losh CommitDate: 2021-06-28 21:57:51 +0000 cam: add xpt_path_sim_device to return device_t associated with a path Return the device associated with the sim's bus when it called xpt_bus_register, if any. Most real SIMs in the tree set this device, but some virtual ones do not have a device_t assocaited with them. Reviewed by: scottl@, mav@ (earlier version) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30853 --- sys/cam/cam_xpt.c | 18 +++++++++++++++++- sys/cam/cam_xpt.h | 1 + 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 81d5d98fb9d4..ee216451bd6d 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -5574,7 +5574,23 @@ camisr_runqueue(void) } } -struct kv +/** + * @brief Return the device_t associated with the path + * + * When a SIM is created, it registers a bus with a NEWBUS device_t. This is + * stored in the internal cam_eb bus structure. There is no guarnatee any given + * path will have a @c device_t associated with it (it's legal to call @c + * xpt_bus_register with a @c NULL @c device_t. + * + * @param path Path to return the device_t for. + */ +device_t +xpt_path_sim_device(const struct cam_path *path) +{ + return (path->bus->parent_dev); +} + +struct kv { uint32_t v; const char *name; diff --git a/sys/cam/cam_xpt.h b/sys/cam/cam_xpt.h index 7e7e6ac5880a..c8494d04234a 100644 --- a/sys/cam/cam_xpt.h +++ b/sys/cam/cam_xpt.h @@ -113,6 +113,7 @@ target_id_t xpt_path_target_id(struct cam_path *path); lun_id_t xpt_path_lun_id(struct cam_path *path); struct cam_sim *xpt_path_sim(struct cam_path *path); struct cam_periph *xpt_path_periph(struct cam_path *path); +device_t xpt_path_sim_device(const struct cam_path *path); void xpt_print_path(struct cam_path *path); void xpt_print_device(struct cam_ed *device); void xpt_print(struct cam_path *path, const char *fmt, ...); From owner-dev-commits-src-all@freebsd.org Mon Jun 28 22:24:05 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 067AB65DA1C; Mon, 28 Jun 2021 22: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 4GDMb86dbDz4kCb; Mon, 28 Jun 2021 22: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 BEFC856F3; Mon, 28 Jun 2021 22: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 15SMO4HM048798; Mon, 28 Jun 2021 22: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 15SMO4IU048797; Mon, 28 Jun 2021 22:24:04 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:04 GMT Message-Id: <202106282224.15SMO4IU048797@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: fdd60a97dad5 - main - sdiob: get the device_t from periph's path MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fdd60a97dad5a0e81905a5d97cbc4b496638b06f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:05 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fdd60a97dad5a0e81905a5d97cbc4b496638b06f commit fdd60a97dad5a0e81905a5d97cbc4b496638b06f Author: Warner Losh AuthorDate: 2021-06-28 22:00:09 +0000 Commit: Warner Losh CommitDate: 2021-06-28 22:13:02 +0000 sdiob: get the device_t from periph's path Use the new xpt_path_device to get the device_t using the periph's path. Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30855 --- sys/dev/sdio/sdiob.c | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/sys/dev/sdio/sdiob.c b/sys/dev/sdio/sdiob.c index afa111971bf5..6209aa1f242e 100644 --- a/sys/dev/sdio/sdiob.c +++ b/sys/dev/sdio/sdiob.c @@ -112,7 +112,7 @@ struct sdiob_softc { #define NB_STATE_SIM_ADDED 0x0002 #define NB_STATE_READY 0x0004 - /* CAM side (including sim_dev). */ + /* CAM side. */ struct card_info cardinfo; struct cam_periph *periph; union ccb *ccb; @@ -923,23 +923,21 @@ sdio_newbus_sim_add(struct sdiob_softc *sc) /* Add ourselves to our parent (SIM) device. */ /* Add ourselves to our parent. That way we can become a parent. */ - KASSERT(sc->periph->sim->sim_dev != NULL, ("%s: sim_dev is NULL, sc %p " - "periph %p sim %p\n", __func__, sc, sc->periph, sc->periph->sim)); + pdev = xpt_path_sim_device(sc->periph->path); + KASSERT(pdev != NULL, + ("%s: pdev is NULL, sc %p periph %p sim %p\n", + __func__, sc, sc->periph, sc->periph->sim)); if (sc->dev == NULL) - sc->dev = BUS_ADD_CHILD(sc->periph->sim->sim_dev, 0, - SDIOB_NAME_S, -1); + sc->dev = BUS_ADD_CHILD(pdev, 0, SDIOB_NAME_S, -1); if (sc->dev == NULL) return (ENXIO); device_set_softc(sc->dev, sc); + /* * Don't set description here; devclass_add_driver() -> * device_probe_child() -> device_set_driver() will nuke it again. */ - - pdev = device_get_parent(sc->dev); - KASSERT(pdev != NULL, ("%s: sc %p dev %p (%s) parent is NULL\n", - __func__, sc, sc->dev, device_get_nameunit(sc->dev))); bus_devclass = device_get_devclass(pdev); if (bus_devclass == NULL) { printf("%s: Failed to get devclass from %s.\n", __func__, @@ -1032,9 +1030,8 @@ sdiobregister(struct cam_periph *periph, void *arg) __func__, periph); return(CAM_REQ_CMP_ERR); } - if (periph->sim == NULL || periph->sim->sim_dev == NULL) { - printf("%s: no sim %p or sim_dev %p\n", __func__, periph->sim, - (periph->sim != NULL) ? periph->sim->sim_dev : NULL); + if (xpt_path_sim_device(periph->path) == NULL) { + printf("%s: no device_t for sim %p\n", __func__, periph->sim); return(CAM_REQ_CMP_ERR); } From owner-dev-commits-src-all@freebsd.org Mon Jun 28 22:24:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E22C865DA18; Mon, 28 Jun 2021 22:24: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 4GDMb53Q20z4jwt; Mon, 28 Jun 2021 22: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 5D1CF57F6; Mon, 28 Jun 2021 22: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 15SMO1ar048719; Mon, 28 Jun 2021 22:24:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMO1HR048718; Mon, 28 Jun 2021 22:24:01 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:01 GMT Message-Id: <202106282224.15SMO1HR048718@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9f1e411ae8cf - main - cam: Group all xpt_path*() functions together in cam_xpt.h MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f1e411ae8cf84ebf53391288b5b6bac8df23a96 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:02 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9f1e411ae8cf84ebf53391288b5b6bac8df23a96 commit 9f1e411ae8cf84ebf53391288b5b6bac8df23a96 Author: Warner Losh AuthorDate: 2021-06-28 21:56:55 +0000 Commit: Warner Losh CommitDate: 2021-06-28 21:56:55 +0000 cam: Group all xpt_path*() functions together in cam_xpt.h Reviewed by: scottl@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30852 --- sys/cam/cam_xpt.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/cam/cam_xpt.h b/sys/cam/cam_xpt.h index 1d3fd9d315a1..7e7e6ac5880a 100644 --- a/sys/cam/cam_xpt.h +++ b/sys/cam/cam_xpt.h @@ -105,9 +105,6 @@ int xpt_path_comp(struct cam_path *path1, struct cam_path *path2); int xpt_path_comp_dev(struct cam_path *path, struct cam_ed *dev); -void xpt_print_path(struct cam_path *path); -void xpt_print_device(struct cam_ed *device); -void xpt_print(struct cam_path *path, const char *fmt, ...); int xpt_path_string(struct cam_path *path, char *str, size_t str_len); int xpt_path_sbuf(struct cam_path *path, struct sbuf *sb); @@ -116,6 +113,9 @@ target_id_t xpt_path_target_id(struct cam_path *path); lun_id_t xpt_path_lun_id(struct cam_path *path); struct cam_sim *xpt_path_sim(struct cam_path *path); struct cam_periph *xpt_path_periph(struct cam_path *path); +void xpt_print_path(struct cam_path *path); +void xpt_print_device(struct cam_ed *device); +void xpt_print(struct cam_path *path, const char *fmt, ...); void xpt_async(u_int32_t async_code, struct cam_path *path, void *async_arg); void xpt_rescan(union ccb *ccb); From owner-dev-commits-src-all@freebsd.org Mon Jun 28 22:24:04 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 40A1465DA92; Mon, 28 Jun 2021 22:24:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMb80x1yz4jtF; Mon, 28 Jun 2021 22: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 A256958E7; Mon, 28 Jun 2021 22: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 15SMO3VH048774; Mon, 28 Jun 2021 22: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 15SMO3Yi048773; Mon, 28 Jun 2021 22:24:03 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:03 GMT Message-Id: <202106282224.15SMO3Yi048773@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: d6e7349254e3 - main - cam mmc: Assert that the xpt_bus_register registered a device_t MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d6e7349254e3d26bbecf105be28686a5eb976537 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:04 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=d6e7349254e3d26bbecf105be28686a5eb976537 commit d6e7349254e3d26bbecf105be28686a5eb976537 Author: Warner Losh AuthorDate: 2021-06-28 21:59:04 +0000 Commit: Warner Losh CommitDate: 2021-06-28 21:59:04 +0000 cam mmc: Assert that the xpt_bus_register registered a device_t Reviewed by: scottl@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30854 --- sys/cam/mmc/mmc_xpt.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c index 6b2fecdab0fb..c94e74876ed7 100644 --- a/sys/cam/mmc/mmc_xpt.c +++ b/sys/cam/mmc/mmc_xpt.c @@ -406,8 +406,6 @@ mmccam_start_discovery(struct cam_sim *sim) union ccb *ccb; uint32_t pathid; - KASSERT(sim->sim_dev != NULL, ("mmccam_start_discovery(%s): sim_dev is not initialized," - " has cam_sim_alloc_dev() been used?", cam_sim_name(sim))); pathid = cam_sim_path(sim); ccb = xpt_alloc_ccb(); @@ -420,6 +418,10 @@ mmccam_start_discovery(struct cam_sim *sim) xpt_free_ccb(ccb); return; } + + KASSERT(xpt_path_sim_device(&ccb->ccb_h.path) != NULL, + ("%s(%s): device is not initialized on sim's path", + __func__, cam_sim_name(sim))); xpt_rescan(ccb); } From owner-dev-commits-src-all@freebsd.org Mon Jun 28 22:24:06 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 94B8765DA95; Mon, 28 Jun 2021 22: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 4GDMbB28Jyz4kCf; Mon, 28 Jun 2021 22:24:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E837355B3; Mon, 28 Jun 2021 22: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 15SMO5lk048822; Mon, 28 Jun 2021 22: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 15SMO55N048821; Mon, 28 Jun 2021 22:24:05 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:05 GMT Message-Id: <202106282224.15SMO55N048821@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: bd69852be14c - main - mmc_sim: stop using cam_sim_alloc_dev MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bd69852be14cac4ff24d3cf31c4f9e90f6e0ded8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:06 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bd69852be14cac4ff24d3cf31c4f9e90f6e0ded8 commit bd69852be14cac4ff24d3cf31c4f9e90f6e0ded8 Author: Warner Losh AuthorDate: 2021-06-28 22:00:20 +0000 Commit: Warner Losh CommitDate: 2021-06-28 22:13:02 +0000 mmc_sim: stop using cam_sim_alloc_dev Use the vanilla flavor of cam_sim_alloc. Now that sdiob has been converted to get the device_t from the cam_path, this data is no longer necessary. Reviewed by: scottl@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30856 --- sys/cam/mmc/mmc_sim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/cam/mmc/mmc_sim.c b/sys/cam/mmc/mmc_sim.c index b9a6a852c07f..2aae157c9542 100644 --- a/sys/cam/mmc/mmc_sim.c +++ b/sys/cam/mmc/mmc_sim.c @@ -204,9 +204,9 @@ mmc_cam_sim_alloc(device_t dev, const char *name, struct mmc_sim *mmc_sim) snprintf(mtx_name, sizeof(mtx_name), "%s_mtx", name); mtx_init(&mmc_sim->mtx, sim_name, NULL, MTX_DEF); - mmc_sim->sim = cam_sim_alloc_dev(mmc_cam_sim_default_action, + mmc_sim->sim = cam_sim_alloc(mmc_cam_sim_default_action, mmc_cam_default_poll, - name, mmc_sim, dev, + name, mmc_sim, &mmc_sim->mtx, 1, 1, mmc_sim->devq); if (mmc_sim->sim == NULL) { From owner-dev-commits-src-all@freebsd.org Mon Jun 28 22:24:11 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3535B65DB1D; Mon, 28 Jun 2021 22:24:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMbG56kFz4kFm; Mon, 28 Jun 2021 22:24: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 83F5758E8; Mon, 28 Jun 2021 22:24: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 15SMOAK9048924; Mon, 28 Jun 2021 22:24:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMOASU048923; Mon, 28 Jun 2021 22:24:10 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:10 GMT Message-Id: <202106282224.15SMOASU048923@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 2b0987023804 - main - cam: Remove CAM_TRUE and CAM_FALSE, they are unused and duplicate bool MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2b09870238048cb2bd911b2e3dfb281c72ef1fb8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:11 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2b09870238048cb2bd911b2e3dfb281c72ef1fb8 commit 2b09870238048cb2bd911b2e3dfb281c72ef1fb8 Author: Warner Losh AuthorDate: 2021-06-28 22:03:01 +0000 Commit: Warner Losh CommitDate: 2021-06-28 22:13:03 +0000 cam: Remove CAM_TRUE and CAM_FALSE, they are unused and duplicate bool These were in the original CAM commit in 3.0, but were not used there, nor have they been used since then. They also duplicate the now-standard bool type. Remove them. Reviewed by: scottl@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30879 --- sys/cam/cam_ccb.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h index f0150d680d2f..5b5e24904996 100644 --- a/sys/cam/cam_ccb.h +++ b/sys/cam/cam_ccb.h @@ -1300,9 +1300,6 @@ struct ccb_eng_exec { /* This structure must match SCSIIO size */ #define CAM_SUCCESS 0 /* For signaling general success */ -#define CAM_FALSE 0 -#define CAM_TRUE 1 - #define XPT_CCB_INVALID -1 /* for signaling a bad CCB to free */ /* From owner-dev-commits-src-all@freebsd.org Mon Jun 28 22:24:08 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8864F65D777; Mon, 28 Jun 2021 22:24:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMbD2rQXz4k7G; Mon, 28 Jun 2021 22:24:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 397EF5990; Mon, 28 Jun 2021 22:24:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SMO8E0048874; Mon, 28 Jun 2021 22:24:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMO86E048873; Mon, 28 Jun 2021 22:24:08 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:08 GMT Message-Id: <202106282224.15SMO86E048873@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: dcd5dea96509 - main - cam: delete cam_sim_alloc_dev MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dcd5dea96509f6e483861350c9ef1d6a85b44ff6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:09 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=dcd5dea96509f6e483861350c9ef1d6a85b44ff6 commit dcd5dea96509f6e483861350c9ef1d6a85b44ff6 Author: Warner Losh AuthorDate: 2021-06-28 22:00:44 +0000 Commit: Warner Losh CommitDate: 2021-06-28 22:13:03 +0000 cam: delete cam_sim_alloc_dev cam_sim_alloc_dev was only used internally by the MMC system. That has been convered to using xpt_path_device() and has stopped using this interface, so this can be retired. Reviewed by: scottl@, mav@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30858 --- sys/cam/cam_sim.c | 28 ---------------------------- sys/cam/cam_sim.h | 1 - 2 files changed, 29 deletions(-) diff --git a/sys/cam/cam_sim.c b/sys/cam/cam_sim.c index 20bed83fac86..e7a7348d0c44 100644 --- a/sys/cam/cam_sim.c +++ b/sys/cam/cam_sim.c @@ -116,7 +116,6 @@ cam_sim_alloc(sim_action_func sim_action, sim_poll_func sim_poll, sim->sim_name = sim_name; sim->softc = softc; sim->path_id = CAM_PATH_ANY; - sim->sim_dev = NULL; /* set only by cam_sim_alloc_dev */ sim->unit_number = unit; sim->bus_id = 0; /* set in xpt_bus_register */ sim->max_tagged_dev_openings = max_tagged_dev_transactions; @@ -128,33 +127,6 @@ cam_sim_alloc(sim_action_func sim_action, sim_poll_func sim_poll, return (sim); } -/** - * @brief allocate a new sim and fill in the details with a device_t - * - * Just like @c cam_sim_alloc, but with an additional paramter. - * - * @param dev A newbus device that's associated with the - * sim. Must be non-NULL. - */ -struct cam_sim * -cam_sim_alloc_dev(sim_action_func sim_action, sim_poll_func sim_poll, - const char *sim_name, void *softc, device_t dev, struct mtx *mtx, - int max_dev_transactions, int max_tagged_dev_transactions, - struct cam_devq *queue) -{ - struct cam_sim *sim; - - KASSERT(dev != NULL, ("%s: dev is null for sim_name %s softc %p\n", - __func__, sim_name, softc)); - - sim = cam_sim_alloc(sim_action, sim_poll, sim_name, softc, - device_get_unit(dev), mtx, max_dev_transactions, - max_tagged_dev_transactions, queue); - if (sim != NULL) - sim->sim_dev = dev; - return (sim); -} - void cam_sim_free(struct cam_sim *sim, int free_devq) { diff --git a/sys/cam/cam_sim.h b/sys/cam/cam_sim.h index 4becc715f13e..47f395854c01 100644 --- a/sys/cam/cam_sim.h +++ b/sys/cam/cam_sim.h @@ -104,7 +104,6 @@ struct cam_sim { u_int32_t flags; struct cam_devq *devq; /* Device Queue to use for this SIM */ int refcount; /* References to the SIM. */ - device_t sim_dev; /* For attached peripherals. */ }; static __inline u_int32_t From owner-dev-commits-src-all@freebsd.org Mon Jun 28 22:24:10 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 15FC765D7E8; Mon, 28 Jun 2021 22:24: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 4GDMbF6F3zz4jrd; Mon, 28 Jun 2021 22:24:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6016656F5; Mon, 28 Jun 2021 22:24:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SMO9Su048900; Mon, 28 Jun 2021 22:24:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMO9Nq048899; Mon, 28 Jun 2021 22:24:09 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:09 GMT Message-Id: <202106282224.15SMO9Nq048899@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 30f8afd0270e - main - cam: fix xpt_bus_register and xpt_bus_deregister return errno MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 30f8afd0270e0bb70e1e0df1cf8de7a841797a30 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:10 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=30f8afd0270e0bb70e1e0df1cf8de7a841797a30 commit 30f8afd0270e0bb70e1e0df1cf8de7a841797a30 Author: Warner Losh AuthorDate: 2021-06-28 22:01:30 +0000 Commit: Warner Losh CommitDate: 2021-06-28 22:13:03 +0000 cam: fix xpt_bus_register and xpt_bus_deregister return errno xpt_bus_register and xpt_bus_deregister returns a hybrid error that's neither a cam_status, nor an errno, but a mix of both. Update xpt_bus_register and xpt_bus_deregister to return an errno. The vast majority of current users compare against zero, which can also be spelled CAM_SUCCESS. Nobody uses CAM_FAILURE, so remove that symbol to prevent comfusion (nothing returns it either). Where the return value is saved, ensure that the variable 'error' is used to store an errno and 'status' is used to store a cam_status where it makes the code clearer (usually just in functions that already mix and match). Where the return value isn't used at all, avoid storing it at all. Reviewed by: scottl@, mav@ (earlier version) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30860 --- sys/cam/cam_ccb.h | 1 - sys/cam/cam_xpt.c | 22 +++++++++++----------- sys/cam/cam_xpt_sim.h | 6 +++--- sys/dev/iscsi/iscsi.c | 3 +-- sys/dev/smartpqi/smartpqi_cam.c | 8 ++++---- sys/dev/usb/storage/umass.c | 10 +++++----- sys/dev/vmware/pvscsi/pvscsi.c | 8 ++++---- 7 files changed, 28 insertions(+), 30 deletions(-) diff --git a/sys/cam/cam_ccb.h b/sys/cam/cam_ccb.h index 3a01cde1a442..f0150d680d2f 100644 --- a/sys/cam/cam_ccb.h +++ b/sys/cam/cam_ccb.h @@ -1299,7 +1299,6 @@ struct ccb_eng_exec { /* This structure must match SCSIIO size */ #define CAM_TIME_INFINITY 0xFFFFFFFF /* Infinite timeout */ #define CAM_SUCCESS 0 /* For signaling general success */ -#define CAM_FAILURE 1 /* For signaling general failure */ #define CAM_FALSE 0 #define CAM_TRUE 1 diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index ee216451bd6d..016f0e6a38be 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -930,9 +930,9 @@ xpt_init(void *dummy) if (xpt_sim == NULL) return (ENOMEM); - if ((status = xpt_bus_register(xpt_sim, NULL, 0)) != CAM_SUCCESS) { - printf("xpt_init: xpt_bus_register failed with status %#x," - " failing attach\n", status); + if ((error = xpt_bus_register(xpt_sim, NULL, 0)) != CAM_SUCCESS) { + printf("xpt_init: xpt_bus_register failed with errno %d," + " failing attach\n", error); return (EINVAL); } @@ -3999,8 +3999,8 @@ CAM_XPT_XPORT(xport_default); * information specified by the user. Once interrupt services are * available, the bus will be probed. */ -int32_t -xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) +int +xpt_bus_register(struct cam_sim *sim, device_t parent, uint32_t bus) { struct cam_eb *new_bus; struct cam_eb *old_bus; @@ -4013,7 +4013,7 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) M_CAMXPT, M_NOWAIT|M_ZERO); if (new_bus == NULL) { /* Couldn't satisfy request */ - return (CAM_RESRC_UNAVAIL); + return (ENOMEM); } mtx_init(&new_bus->eb_mtx, "CAM bus lock", NULL, MTX_DEF); @@ -4051,7 +4051,7 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); if (status != CAM_REQ_CMP) { xpt_release_bus(new_bus); - return (CAM_RESRC_UNAVAIL); + return (ENOMEM); } xpt_path_inq(&cpi, path); @@ -4070,7 +4070,7 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) "No transport found for %d\n", cpi.transport); xpt_release_bus(new_bus); free(path, M_CAMXPT); - return (CAM_RESRC_UNAVAIL); + return (EINVAL); } } @@ -4099,7 +4099,7 @@ xpt_bus_register(struct cam_sim *sim, device_t parent, u_int32_t bus) return (CAM_SUCCESS); } -int32_t +int xpt_bus_deregister(path_id_t pathid) { struct cam_path bus_path; @@ -4108,7 +4108,7 @@ xpt_bus_deregister(path_id_t pathid) status = xpt_compile_path(&bus_path, NULL, pathid, CAM_TARGET_WILDCARD, CAM_LUN_WILDCARD); if (status != CAM_REQ_CMP) - return (status); + return (ENOMEM); xpt_async(AC_LOST_DEVICE, &bus_path, NULL); xpt_async(AC_PATH_DEREGISTERED, &bus_path, NULL); @@ -4117,7 +4117,7 @@ xpt_bus_deregister(path_id_t pathid) xpt_release_bus(bus_path.bus); xpt_release_path(&bus_path); - return (CAM_REQ_CMP); + return (CAM_SUCCESS); } static path_id_t diff --git a/sys/cam/cam_xpt_sim.h b/sys/cam/cam_xpt_sim.h index aa9746019981..569ed09c23d2 100644 --- a/sys/cam/cam_xpt_sim.h +++ b/sys/cam/cam_xpt_sim.h @@ -39,9 +39,9 @@ /* Functions accessed by SIM drivers */ #ifdef _KERNEL -int32_t xpt_bus_register(struct cam_sim *sim, device_t parent, - u_int32_t bus); -int32_t xpt_bus_deregister(path_id_t path_id); +int xpt_bus_register(struct cam_sim *sim, device_t parent, + uint32_t bus); +int xpt_bus_deregister(path_id_t path_id); u_int32_t xpt_freeze_simq(struct cam_sim *sim, u_int count); void xpt_release_simq(struct cam_sim *sim, int run_queue); u_int32_t xpt_freeze_devq(struct cam_path *path, u_int count); diff --git a/sys/dev/iscsi/iscsi.c b/sys/dev/iscsi/iscsi.c index 7ddb5a9ce1ec..9a1b539e539b 100644 --- a/sys/dev/iscsi/iscsi.c +++ b/sys/dev/iscsi/iscsi.c @@ -1506,8 +1506,7 @@ iscsi_ioctl_daemon_handoff(struct iscsi_softc *sc, return (ENOMEM); } - error = xpt_bus_register(is->is_sim, NULL, 0); - if (error != 0) { + if (xpt_bus_register(is->is_sim, NULL, 0) != 0) { ISCSI_SESSION_UNLOCK(is); ISCSI_SESSION_WARN(is, "failed to register bus"); iscsi_session_terminate(is); diff --git a/sys/dev/smartpqi/smartpqi_cam.c b/sys/dev/smartpqi/smartpqi_cam.c index e389eb143e4a..1278434131d9 100644 --- a/sys/dev/smartpqi/smartpqi_cam.c +++ b/sys/dev/smartpqi/smartpqi_cam.c @@ -1204,7 +1204,7 @@ register_sim(struct pqisrc_softstate *softs, int card_index) { int max_transactions; union ccb *ccb = NULL; - cam_status status = 0; + int error; struct ccb_setasync csa; struct cam_sim *sim; @@ -1231,9 +1231,9 @@ register_sim(struct pqisrc_softstate *softs, int card_index) softs->os_specific.sim = sim; mtx_lock(&softs->os_specific.cam_lock); - status = xpt_bus_register(sim, softs->os_specific.pqi_dev, 0); - if (status != CAM_SUCCESS) { - DBG_ERR("xpt_bus_register failed status=%d\n", status); + error = xpt_bus_register(sim, softs->os_specific.pqi_dev, 0); + if (error != CAM_SUCCESS) { + DBG_ERR("xpt_bus_register failed errno %d\n", error); cam_sim_free(softs->os_specific.sim, FALSE); cam_simq_free(softs->os_specific.devq); mtx_unlock(&softs->os_specific.cam_lock); diff --git a/sys/dev/usb/storage/umass.c b/sys/dev/usb/storage/umass.c index bc07fe50b6ab..65c72b06e244 100644 --- a/sys/dev/usb/storage/umass.c +++ b/sys/dev/usb/storage/umass.c @@ -2129,11 +2129,11 @@ umass_cam_attach(struct umass_softc *sc) static void umass_cam_detach_sim(struct umass_softc *sc) { - cam_status status; + int error; if (sc->sc_sim != NULL) { - status = xpt_bus_deregister(cam_sim_path(sc->sc_sim)); - if (status == CAM_REQ_CMP) { + error = xpt_bus_deregister(cam_sim_path(sc->sc_sim)); + if (error == 0) { /* accessing the softc is not possible after this */ sc->sc_sim->softc = NULL; DPRINTF(sc, UDMASS_SCSI, "%s: %s:%d:%d caling " @@ -2143,8 +2143,8 @@ umass_cam_detach_sim(struct umass_softc *sc) sc->sc_sim->refcount, sc->sc_sim->mtx); cam_sim_free(sc->sc_sim, /* free_devq */ TRUE); } else { - panic("%s: %s: CAM layer is busy: %#x\n", - __func__, sc->sc_name, status); + panic("%s: %s: CAM layer is busy: errno %d\n", + __func__, sc->sc_name, error); } sc->sc_sim = NULL; } diff --git a/sys/dev/vmware/pvscsi/pvscsi.c b/sys/dev/vmware/pvscsi/pvscsi.c index ad32d2ab4959..f64b20863f60 100644 --- a/sys/dev/vmware/pvscsi/pvscsi.c +++ b/sys/dev/vmware/pvscsi/pvscsi.c @@ -1548,16 +1548,16 @@ pvscsi_free_all(struct pvscsi_softc *sc) { if (sc->sim) { - int32_t status; + int error; if (sc->bus_path) { xpt_free_path(sc->bus_path); } - status = xpt_bus_deregister(cam_sim_path(sc->sim)); - if (status != CAM_REQ_CMP) { + error = xpt_bus_deregister(cam_sim_path(sc->sim)); + if (error != 0) { device_printf(sc->dev, - "Error deregistering bus, status=%d\n", status); + "Error deregistering bus, error %d\n", error); } cam_sim_free(sc->sim, TRUE); From owner-dev-commits-src-all@freebsd.org Mon Jun 28 22:24:13 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AE85165DB99; Mon, 28 Jun 2021 22:24: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 4GDMbK0pgpz4kFy; Mon, 28 Jun 2021 22:24: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 D397258E9; Mon, 28 Jun 2021 22:24: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 15SMOC00048972; Mon, 28 Jun 2021 22:24:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMOCcM048971; Mon, 28 Jun 2021 22:24:12 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:12 GMT Message-Id: <202106282224.15SMOCcM048971@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 9f0febd6a44c - main - cam_sim: remove unused sim_doneq member MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f0febd6a44cab90659f2a1b98a8bb3f766e18fd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:14 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=9f0febd6a44cab90659f2a1b98a8bb3f766e18fd commit 9f0febd6a44cab90659f2a1b98a8bb3f766e18fd Author: Warner Losh AuthorDate: 2021-06-28 22:04:54 +0000 Commit: Warner Losh CommitDate: 2021-06-28 22:13:03 +0000 cam_sim: remove unused sim_doneq member Its use was removed in 227d67aa54 by mav when locking was revamped. Reviewed by: scottl@, mav@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30890 --- sys/cam/cam_sim.h | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/cam/cam_sim.h b/sys/cam/cam_sim.h index 47f395854c01..54e0ae3ed8d4 100644 --- a/sys/cam/cam_sim.h +++ b/sys/cam/cam_sim.h @@ -94,7 +94,6 @@ struct cam_sim { const char *sim_name; void *softc; struct mtx *mtx; - TAILQ_HEAD(, ccb_hdr) sim_doneq; TAILQ_ENTRY(cam_sim) links; u_int32_t path_id;/* The Boot device may set this to 0? */ u_int32_t unit_number; From owner-dev-commits-src-all@freebsd.org Mon Jun 28 22:24:12 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AB0465DB23; Mon, 28 Jun 2021 22:24: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 4GDMbH5p00z4jxN; Mon, 28 Jun 2021 22:24: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 A76CB56F6; Mon, 28 Jun 2021 22:24: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 15SMOBxf048948; Mon, 28 Jun 2021 22:24:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMOBYn048947; Mon, 28 Jun 2021 22:24:11 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:11 GMT Message-Id: <202106282224.15SMOBYn048947@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 50aa1daf1468 - main - cam: change xpt_clone_path to return int MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 50aa1daf14688a6f85f324a8efa8708a25b46a86 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:12 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=50aa1daf14688a6f85f324a8efa8708a25b46a86 commit 50aa1daf14688a6f85f324a8efa8708a25b46a86 Author: Warner Losh AuthorDate: 2021-06-28 22:04:02 +0000 Commit: Warner Losh CommitDate: 2021-06-28 22:13:03 +0000 cam: change xpt_clone_path to return int xpt_clone_path originally returned a cam_status, but it doesn't do I/O and should return an errno instead. I added it last year and it's only used in one place. It's not yet documented, so no doc changes are nneeded. Reviewed by: scottl@, mav@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30884 --- sys/cam/cam_xpt.c | 8 ++++---- sys/cam/cam_xpt.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 016f0e6a38be..b76d6f5adde7 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -3669,14 +3669,14 @@ xpt_compile_path(struct cam_path *new_path, struct cam_periph *perph, return (status); } -cam_status +int xpt_clone_path(struct cam_path **new_path_ptr, struct cam_path *path) { struct cam_path *new_path; new_path = (struct cam_path *)malloc(sizeof(*path), M_CAMPATH, M_NOWAIT); if (new_path == NULL) - return(CAM_RESRC_UNAVAIL); + return (ENOMEM); *new_path = *path; if (path->bus != NULL) xpt_acquire_bus(path->bus); @@ -3685,7 +3685,7 @@ xpt_clone_path(struct cam_path **new_path_ptr, struct cam_path *path) if (path->device != NULL) xpt_acquire_device(path->device); *new_path_ptr = new_path; - return (CAM_REQ_CMP); + return (0); } void @@ -4397,7 +4397,7 @@ xpt_async(u_int32_t async_code, struct cam_path *path, void *async_arg) return; } - if (xpt_clone_path(&ccb->ccb_h.path, path) != CAM_REQ_CMP) { + if (xpt_clone_path(&ccb->ccb_h.path, path) != 0) { xpt_print(path, "Can't allocate path to send %s\n", xpt_async_string(async_code)); xpt_free_ccb(ccb); diff --git a/sys/cam/cam_xpt.h b/sys/cam/cam_xpt.h index c8494d04234a..b75025dbd4d3 100644 --- a/sys/cam/cam_xpt.h +++ b/sys/cam/cam_xpt.h @@ -138,7 +138,7 @@ cam_status xpt_compile_path(struct cam_path *new_path, path_id_t path_id, target_id_t target_id, lun_id_t lun_id); -cam_status xpt_clone_path(struct cam_path **new_path, +int xpt_clone_path(struct cam_path **new_path, struct cam_path *path); void xpt_release_path(struct cam_path *path); From owner-dev-commits-src-all@freebsd.org Mon Jun 28 22:24:07 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E1E865DA2A; Mon, 28 Jun 2021 22:24:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDMbC27Lnz4jrK; Mon, 28 Jun 2021 22:24:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1964257FA; Mon, 28 Jun 2021 22:24:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SMO6Od048846; Mon, 28 Jun 2021 22:24:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SMO6Ye048845; Mon, 28 Jun 2021 22:24:06 GMT (envelope-from git) Date: Mon, 28 Jun 2021 22:24:06 GMT Message-Id: <202106282224.15SMO6Ye048845@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: aeb04e88f51a - main - sdhci: stop using cam_sim_alloc_dev MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aeb04e88f51a706ef4b6a380bf5e82d15203fb6a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 22:24:07 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=aeb04e88f51a706ef4b6a380bf5e82d15203fb6a commit aeb04e88f51a706ef4b6a380bf5e82d15203fb6a Author: Warner Losh AuthorDate: 2021-06-28 22:00:37 +0000 Commit: Warner Losh CommitDate: 2021-06-28 22:13:02 +0000 sdhci: stop using cam_sim_alloc_dev Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30857 --- sys/dev/sdhci/sdhci.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/sdhci/sdhci.c b/sys/dev/sdhci/sdhci.c index 22df56672c4b..1ed521da8a70 100644 --- a/sys/dev/sdhci/sdhci.c +++ b/sys/dev/sdhci/sdhci.c @@ -2483,8 +2483,8 @@ sdhci_start_slot(struct sdhci_slot *slot) goto fail; mtx_init(&slot->sim_mtx, "sdhcisim", NULL, MTX_DEF); - slot->sim = cam_sim_alloc_dev(sdhci_cam_action, sdhci_cam_poll, - "sdhci_slot", slot, slot->bus, + slot->sim = cam_sim_alloc(sdhci_cam_action, sdhci_cam_poll, + "sdhci_slot", slot, &slot->sim_mtx, 1, 1, slot->devq); if (slot->sim == NULL) { From owner-dev-commits-src-all@freebsd.org Mon Jun 28 23:24:46 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7BA4465ECC4; Mon, 28 Jun 2021 23:24: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 4GDNxB2qGSz4n2r; Mon, 28 Jun 2021 23:24: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 490F95DF8; Mon, 28 Jun 2021 23:24: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 15SNOkkv028680; Mon, 28 Jun 2021 23:24:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SNOkrs028679; Mon, 28 Jun 2021 23:24:46 GMT (envelope-from git) Date: Mon, 28 Jun 2021 23:24:46 GMT Message-Id: <202106282324.15SNOkrs028679@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: a72af82e3169 - main - cam: Fix GENERIC-MMCCAM build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a72af82e3169fcacfedf9047120679300a4296f8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 23:24:46 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a72af82e3169fcacfedf9047120679300a4296f8 commit a72af82e3169fcacfedf9047120679300a4296f8 Author: Warner Losh AuthorDate: 2021-06-28 23:22:35 +0000 Commit: Warner Losh CommitDate: 2021-06-28 23:22:35 +0000 cam: Fix GENERIC-MMCCAM build Fix forgotten argument and type error. MMCCAM isn't enabled by default, and I'd mistakenly thought it was, so these went undetected precommit. Sponsored by: Netflix --- sys/cam/mmc/mmc_sim.c | 2 +- sys/cam/mmc/mmc_xpt.c | 2 +- sys/dev/sdhci/sdhci.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/cam/mmc/mmc_sim.c b/sys/cam/mmc/mmc_sim.c index 2aae157c9542..0bb4c850f8eb 100644 --- a/sys/cam/mmc/mmc_sim.c +++ b/sys/cam/mmc/mmc_sim.c @@ -206,7 +206,7 @@ mmc_cam_sim_alloc(device_t dev, const char *name, struct mmc_sim *mmc_sim) mtx_init(&mmc_sim->mtx, sim_name, NULL, MTX_DEF); mmc_sim->sim = cam_sim_alloc(mmc_cam_sim_default_action, mmc_cam_default_poll, - name, mmc_sim, + name, mmc_sim, device_get_unit(dev), &mmc_sim->mtx, 1, 1, mmc_sim->devq); if (mmc_sim->sim == NULL) { diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c index c94e74876ed7..a649946f096f 100644 --- a/sys/cam/mmc/mmc_xpt.c +++ b/sys/cam/mmc/mmc_xpt.c @@ -419,7 +419,7 @@ mmccam_start_discovery(struct cam_sim *sim) return; } - KASSERT(xpt_path_sim_device(&ccb->ccb_h.path) != NULL, + KASSERT(xpt_path_sim_device(ccb->ccb_h.path) != NULL, ("%s(%s): device is not initialized on sim's path", __func__, cam_sim_name(sim))); xpt_rescan(ccb); diff --git a/sys/dev/sdhci/sdhci.c b/sys/dev/sdhci/sdhci.c index 1ed521da8a70..bd30175e9f86 100644 --- a/sys/dev/sdhci/sdhci.c +++ b/sys/dev/sdhci/sdhci.c @@ -2484,7 +2484,7 @@ sdhci_start_slot(struct sdhci_slot *slot) mtx_init(&slot->sim_mtx, "sdhcisim", NULL, MTX_DEF); slot->sim = cam_sim_alloc(sdhci_cam_action, sdhci_cam_poll, - "sdhci_slot", slot, + "sdhci_slot", slot, device_get_unit(slot->dev), &slot->sim_mtx, 1, 1, slot->devq); if (slot->sim == NULL) { From owner-dev-commits-src-all@freebsd.org Mon Jun 28 23:25:21 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE50465EAA3; Mon, 28 Jun 2021 23:25: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 4GDNxs55YBz4mrP; Mon, 28 Jun 2021 23:25: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 97302668A; Mon, 28 Jun 2021 23:25:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15SNPL5F028850; Mon, 28 Jun 2021 23:25:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15SNPLn9028849; Mon, 28 Jun 2021 23:25:21 GMT (envelope-from git) Date: Mon, 28 Jun 2021 23:25:21 GMT Message-Id: <202106282325.15SNPLn9028849@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: f94360971e64 - main - Clarify notice for profiled libraries in FreeBSD 14 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: emaste X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f94360971e649fa684ef3b7e72839b59c7242bdb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Jun 2021 23:25:21 -0000 The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f94360971e649fa684ef3b7e72839b59c7242bdb commit f94360971e649fa684ef3b7e72839b59c7242bdb Author: Ed Maste AuthorDate: 2021-06-28 21:30:48 +0000 Commit: Ed Maste CommitDate: 2021-06-28 23:24:56 +0000 Clarify notice for profiled libraries in FreeBSD 14 Reported by: kevans Fixes: 175841285e28 ("Add deprecation notice for...") Sponsored by: The FreeBSD Foundation --- share/man/man5/src.conf.5 | 4 +++- tools/build/options/WITHOUT_PROFILE | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index 342c9f92b234..e9265df9051a 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,6 +1,6 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. .\" $FreeBSD$ -.Dd June 27, 2021 +.Dd June 28, 2021 .Dt SRC.CONF 5 .Os .Sh NAME @@ -1362,6 +1362,8 @@ mips/mips64. .It Va WITH_PROFILE Build profiled libraries for use with .Xr gprof 8 . +This option is deprecated and is not present in +.Fx 14 . .Pp This is a default setting on amd64/amd64, arm/armv6, arm/armv7, arm64/aarch64, i386/i386, mips/mips, powerpc/powerpc, powerpc/powerpc64, riscv/riscv64 and riscv/riscv64sf. diff --git a/tools/build/options/WITHOUT_PROFILE b/tools/build/options/WITHOUT_PROFILE index 5cc8dbb027c8..7fdb12c94cdd 100644 --- a/tools/build/options/WITHOUT_PROFILE +++ b/tools/build/options/WITHOUT_PROFILE @@ -1,5 +1,3 @@ .\" $FreeBSD$ Do not build profiled libraries for use with .Xr gprof 8 . -This option is enabled by default as of -.Fx 14 . From owner-dev-commits-src-all@freebsd.org Tue Jun 29 01:10:37 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 05E7565F96D; Tue, 29 Jun 2021 01:10:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDRHJ6Vd6z4tXx; Tue, 29 Jun 2021 01:10:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C77B37BB5; Tue, 29 Jun 2021 01:10:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15T1AaIG070159; Tue, 29 Jun 2021 01:10:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15T1AaMe070158; Tue, 29 Jun 2021 01:10:36 GMT (envelope-from git) Date: Tue, 29 Jun 2021 01:10:36 GMT Message-Id: <202106290110.15T1AaMe070158@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John-Mark Gurney Subject: git: 3d5104182c2e - main - ued may be NULL here which will cause a panic... reproducable by simply doing a usbconfig reset on a device which doesn't reset itself properly... MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jmg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3d5104182c2eb4336905e89aa0d089b67aa746e3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 01:10:37 -0000 The branch main has been updated by jmg: URL: https://cgit.FreeBSD.org/src/commit/?id=3d5104182c2eb4336905e89aa0d089b67aa746e3 commit 3d5104182c2eb4336905e89aa0d089b67aa746e3 Author: John-Mark Gurney AuthorDate: 2021-06-29 01:09:14 +0000 Commit: John-Mark Gurney CommitDate: 2021-06-29 01:09:14 +0000 ued may be NULL here which will cause a panic... reproducable by simply doing a usbconfig reset on a device which doesn't reset itself properly... --- sys/dev/usb/net/if_cdce.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sys/dev/usb/net/if_cdce.c b/sys/dev/usb/net/if_cdce.c index 64c31896d417..24813ea305e4 100644 --- a/sys/dev/usb/net/if_cdce.c +++ b/sys/dev/usb/net/if_cdce.c @@ -709,18 +709,18 @@ alloc_transfers: if ((ued == NULL) || (ued->bLength < sizeof(*ued))) { error = USB_ERR_INVAL; } else { + /* + * ECM 1.2 doesn't say it excludes the CRC, but states that it's + * normally 1514, which excludes the CRC. + */ + DPRINTF("max segsize: %d\n", UGETW(ued->wMaxSegmentSize)); + if (UGETW(ued->wMaxSegmentSize) >= (ETHER_MAX_LEN - ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN)) + sc->sc_flags |= CDCE_FLAG_VLAN; + error = usbd_req_get_string_any(uaa->device, NULL, eaddr_str, sizeof(eaddr_str), ued->iMacAddress); } - /* - * ECM 1.2 doesn't say it excludes the CRC, but states that it's - * normally 1514, which excludes the CRC. - */ - DPRINTF("max segsize: %d\n", UGETW(ued->wMaxSegmentSize)); - if (UGETW(ued->wMaxSegmentSize) >= (ETHER_MAX_LEN - ETHER_CRC_LEN + ETHER_VLAN_ENCAP_LEN)) - sc->sc_flags |= CDCE_FLAG_VLAN; - if (error) { /* fake MAC address */ From owner-dev-commits-src-all@freebsd.org Tue Jun 29 02:10:53 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9FAF6640F28; Tue, 29 Jun 2021 02:10: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 4GDScs3xlkz3Hgx; Tue, 29 Jun 2021 02:10: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 6FDE110D05; Tue, 29 Jun 2021 02:10: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 15T2ArYJ051264; Tue, 29 Jun 2021 02:10:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15T2ArG9051263; Tue, 29 Jun 2021 02:10:53 GMT (envelope-from git) Date: Tue, 29 Jun 2021 02:10:53 GMT Message-Id: <202106290210.15T2ArG9051263@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 857cde693f26 - main - UPDATING: Fix typos / improve langauge MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 857cde693f26ba558fbacf86aa2f2313d29a02cd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 02:10:53 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=857cde693f26ba558fbacf86aa2f2313d29a02cd commit 857cde693f26ba558fbacf86aa2f2313d29a02cd Author: Maigurs Stalidzans AuthorDate: 2021-06-29 01:27:30 +0000 Commit: Warner Losh CommitDate: 2021-06-29 01:42:17 +0000 UPDATING: Fix typos / improve langauge This fixes a couple of typos in older entries, and clarifies the language of a newer one. It also removes a joke that trips up foreign readers due its use of faux archaic English. Reviewed by: imp@ --- UPDATING | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/UPDATING b/UPDATING index dbedcd058585..35994b25a2f1 100644 --- a/UPDATING +++ b/UPDATING @@ -593,8 +593,8 @@ https://lists.freebsd.org/archives/freebsd-current/2021-June/000153.html r342286 modifies the NFSv4 server so that it obeys vfs.nfsd.nfs_privport in the same as it is applied to NFSv2 and 3. This implies that NFSv4 servers that have vfs.nfsd.nfs_privport set will only allow mounts - from clients using a reserved port#. Since both the FreeBSD and Linux - NFSv4 clients use reserved port#s by default, this should not affect + from clients using a reserved port. Since both the FreeBSD and Linux + NFSv4 clients use reserved ports by default, this should not affect most NFSv4 mounts. 20181219: @@ -1036,7 +1036,7 @@ https://lists.freebsd.org/archives/freebsd-current/2021-June/000153.html Newer versions of loader can boot old kernels without issue. 20171110: - The LOADER_FIREWIRE_SUPPORT build variable as been renamed to + The LOADER_FIREWIRE_SUPPORT build variable has been renamed to WITH/OUT_LOADER_FIREWIRE. LOADER_{NO_,}GELI_SUPPORT has been renamed to WITH/OUT_LOADER_GELI. @@ -1220,7 +1220,7 @@ https://lists.freebsd.org/archives/freebsd-current/2021-June/000153.html If you have if_ath_pci in /boot/loader.conf, ensure it is after if_ath or it will not load any HAL chipset support. - If you want to selectively load things (eg on ye cheape ARM/MIPS + If you want to selectively load things (eg on cheaper ARM/MIPS platforms where RAM is at a premium) you should: * load ath_hal @@ -1444,7 +1444,7 @@ https://lists.freebsd.org/archives/freebsd-current/2021-June/000153.html kernel. 20160527: - CAM will now strip leading spaces from SCSI disks' serial numbers. + CAM now strips the leading spaces from each SCSI disk's serial number. This will affect users who create UFS filesystems on SCSI disks using those disk's diskid device nodes. For example, if /etc/fstab previously contained a line like From owner-dev-commits-src-all@freebsd.org Tue Jun 29 03:23:11 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7930B642014; Tue, 29 Jun 2021 03:23:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDVDH1gKGz3PTF; Tue, 29 Jun 2021 03:23: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 22F0211EF4; Tue, 29 Jun 2021 03:23: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 15T3NBXe048217; Tue, 29 Jun 2021 03:23:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15T3NBK8048216; Tue, 29 Jun 2021 03:23:11 GMT (envelope-from git) Date: Tue, 29 Jun 2021 03:23:11 GMT Message-Id: <202106290323.15T3NBK8048216@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: 26a357245f21 - main - arm64: a few simplications to pmap_remove_{all, write} MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 26a357245f2197eea4dbbae0956d5c71ef8ba4f1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 03:23:11 -0000 The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=26a357245f2197eea4dbbae0956d5c71ef8ba4f1 commit 26a357245f2197eea4dbbae0956d5c71ef8ba4f1 Author: Alan Cox AuthorDate: 2021-06-29 02:57:04 +0000 Commit: Alan Cox CommitDate: 2021-06-29 03:21:24 +0000 arm64: a few simplications to pmap_remove_{all,write} Eliminate some unnecessary unlocking and relocking when we have to retry the operation to avoid deadlock. (All of the other pmap functions that iterate over a PV list already implemented retries without these same unlocking and relocking operations.) Avoid a pointer dereference by using an existing local variable that already holds the desired value. Eliminate some unnecessary repetition of code on a failed fcmpset. Specifically, there is no point in retesting the DBM bit because it cannot change state while the pmap lock is held. Reviewed by: kib, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30931 --- sys/arm64/arm64/pmap.c | 20 +++++++------------- 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 76ca8eab70ff..79b9d20231aa 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -3130,8 +3130,8 @@ pmap_remove_all(vm_page_t m) SLIST_INIT(&free); lock = VM_PAGE_TO_PV_LIST_LOCK(m); pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : page_to_pvh(m); -retry: rw_wlock(lock); +retry: while ((pv = TAILQ_FIRST(&pvh->pv_list)) != NULL) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { @@ -3140,7 +3140,6 @@ retry: PMAP_LOCK(pmap); rw_wlock(lock); if (pvh_gen != pvh->pv_gen) { - rw_wunlock(lock); PMAP_UNLOCK(pmap); goto retry; } @@ -3151,7 +3150,6 @@ retry: ("pmap_remove_all: no page table entry found")); KASSERT(lvl == 2, ("pmap_remove_all: invalid pte level %d", lvl)); - pmap_demote_l2_locked(pmap, pte, va, &lock); PMAP_UNLOCK(pmap); } @@ -3165,7 +3163,6 @@ retry: PMAP_LOCK(pmap); rw_wlock(lock); if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { - rw_wunlock(lock); PMAP_UNLOCK(pmap); goto retry; } @@ -5224,8 +5221,8 @@ pmap_remove_write(vm_page_t m) return; lock = VM_PAGE_TO_PV_LIST_LOCK(m); pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : page_to_pvh(m); -retry_pv_loop: rw_wlock(lock); +retry: TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { pmap = PV_PMAP(pv); PMAP_ASSERT_STAGE1(pmap); @@ -5236,12 +5233,11 @@ retry_pv_loop: rw_wlock(lock); if (pvh_gen != pvh->pv_gen) { PMAP_UNLOCK(pmap); - rw_wunlock(lock); - goto retry_pv_loop; + goto retry; } } va = pv->pv_va; - pte = pmap_pte(pmap, pv->pv_va, &lvl); + pte = pmap_pte(pmap, va, &lvl); if ((pmap_load(pte) & ATTR_SW_DBM) != 0) (void)pmap_demote_l2_locked(pmap, pte, va, &lock); KASSERT(lock == VM_PAGE_TO_PV_LIST_LOCK(m), @@ -5261,17 +5257,15 @@ retry_pv_loop: if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { PMAP_UNLOCK(pmap); - rw_wunlock(lock); - goto retry_pv_loop; + goto retry; } } pte = pmap_pte(pmap, pv->pv_va, &lvl); oldpte = pmap_load(pte); -retry: if ((oldpte & ATTR_SW_DBM) != 0) { - if (!atomic_fcmpset_long(pte, &oldpte, + while (!atomic_fcmpset_64(pte, &oldpte, (oldpte | ATTR_S1_AP_RW_BIT) & ~ATTR_SW_DBM)) - goto retry; + cpu_spinwait(); if ((oldpte & ATTR_S1_AP_RW_BIT) == ATTR_S1_AP(ATTR_S1_AP_RW)) vm_page_dirty(m); From owner-dev-commits-src-all@freebsd.org Tue Jun 29 07:22:39 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F1CD645055; Tue, 29 Jun 2021 07:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDbXb3wGMz4Rh3; Tue, 29 Jun 2021 07:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6E78D14E3C; Tue, 29 Jun 2021 07:22:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15T7MdZr067862; Tue, 29 Jun 2021 07:22:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15T7Mdev067861; Tue, 29 Jun 2021 07:22:39 GMT (envelope-from git) Date: Tue, 29 Jun 2021 07:22:39 GMT Message-Id: <202106290722.15T7Mdev067861@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: b33d1898c1b0 - main - md5: Improve compatibility with coreutils and format fix 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/main X-Git-Reftype: branch X-Git-Commit: b33d1898c1b0e6d76b52eb48078260588802dc95 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 07:22:39 -0000 The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=b33d1898c1b0e6d76b52eb48078260588802dc95 commit b33d1898c1b0e6d76b52eb48078260588802dc95 Author: Stefan Eßer AuthorDate: 2021-06-29 07:01:13 +0000 Commit: Stefan Eßer CommitDate: 2021-06-29 07:21:57 +0000 md5: Improve compatibility with coreutils and format fix The previous changes that added support for the coreutils -c option modified the output generated by passing -r to match that of the coreutils versions. The difference is that coreutils separates the hash from the file name by two blanks " " (or a blank followed by an asterisk " *" with the -b option denoting). While most scripts or users will not notice the difference, it might be considered a violation of POLA and this commit reverts the change for the non-sum programs. These will print a single blank " " as the separator, as they die before the previous commit. In order to still generate output that is identical to that of the coreutils programs, this commit generates the " " or " *" separator used by them for the -sum versions, depending on the presence of the -b option. MFC after: 3 days --- sbin/md5/md5.1 | 25 ++++++++++++++++--------- sbin/md5/md5.c | 10 +++++++++- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/sbin/md5/md5.1 b/sbin/md5/md5.1 index da034d1298c5..2b1da85c080f 100644 --- a/sbin/md5/md5.1 +++ b/sbin/md5/md5.1 @@ -1,5 +1,5 @@ .\" $FreeBSD$ -.Dd June 24, 2021 +.Dd June 29, 2021 .Dt MD5 1 .Os .Sh NAME @@ -77,9 +77,11 @@ 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 +Make the .Nm -sum -programs. +programs separate hash and digest with a blank followed by an asterisk instead +of by 2 blank characters for full compatibility with the output generated by the +coreutils versions of these programs. .It Fl c Ar string If the program was called with a name that does not end in .Nm sum , @@ -88,13 +90,13 @@ compare the digest of the file against this string. .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 +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 : +A line with the file name followed by a colon +.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. @@ -157,8 +159,13 @@ $ 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 +.Pd +The +.Nm -sum +variants put 2 blank characters between hash and file name for full compatibilty +with the coreutils versions of these commands. .Ed .Pp Write the digest for diff --git a/sbin/md5/md5.c b/sbin/md5/md5.c index 43a76227a9d2..7235e6e0a39f 100644 --- a/sbin/md5/md5.c +++ b/sbin/md5/md5.c @@ -54,6 +54,7 @@ __FBSDID("$FreeBSD$"); #define TEST_BLOCK_COUNT 100000 #define MDTESTCOUNT 8 +static int bflag; static int cflag; static int pflag; static int qflag; @@ -301,6 +302,7 @@ main(int argc, char *argv[]) while ((ch = getopt(argc, argv, "bc:pqrs:tx")) != -1) switch (ch) { case 'b': + bflag = 1; break; case 'c': cflag = 1; @@ -436,7 +438,13 @@ MDOutput(const Algorithm_t *alg, char *p, char *argv[]) printf("%s\n", p); } else { if (rflag) - printf("%s %s", p, *argv); + if (gnu_emu) + if (bflag) + printf("%s *%s", p, *argv); + else + printf("%s %s", p, *argv); + else + printf("%s %s", p, *argv); else printf("%s (%s) = %s", alg->name, *argv, p); if (checkAgainst) { From owner-dev-commits-src-all@freebsd.org Tue Jun 29 07:24:57 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BE21B644EBB; Tue, 29 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 4GDbbF54LWz4RqW; Tue, 29 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 9692E14ED7; Tue, 29 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 15T7OvE4068135; Tue, 29 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 15T7OvwR068134; Tue, 29 Jun 2021 07:24:57 GMT (envelope-from git) Date: Tue, 29 Jun 2021 07:24:57 GMT Message-Id: <202106290724.15T7OvwR068134@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 7f025db57c78 - main - pf: fix error-case leaks in pf_create_state MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7f025db57c7879bfa43ac74ecd95903439fdd1d0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 07:24:57 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=7f025db57c7879bfa43ac74ecd95903439fdd1d0 commit 7f025db57c7879bfa43ac74ecd95903439fdd1d0 Author: Mateusz Guzik AuthorDate: 2021-06-28 18:29:58 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-29 07:24:52 +0000 pf: fix error-case leaks in pf_create_state The hand-rolled clean up failed to free counters. Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 26989adfb613..f05dc69b3dbb 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -3827,7 +3827,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, REASON_SET(&reason, PFRES_MAPFAILED); pf_src_tree_remove_state(s); STATE_DEC_COUNTERS(s); - uma_zfree(V_pf_state_z, s); + pf_free_state(s); goto csfailed; } s->rt_kif = r->rpool.cur->kif; @@ -3849,7 +3849,7 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, REASON_SET(&reason, PFRES_MEMORY); pf_src_tree_remove_state(s); STATE_DEC_COUNTERS(s); - uma_zfree(V_pf_state_z, s); + pf_free_state(s); return (PF_DROP); } if ((pd->flags & PFDESC_TCP_NORM) && s->src.scrub && @@ -3859,10 +3859,9 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, DPFPRINTF(PF_DEBUG_URGENT, ("pf_normalize_tcp_stateful failed on first " "pkt\n")); - pf_normalize_tcp_cleanup(s); pf_src_tree_remove_state(s); STATE_DEC_COUNTERS(s); - uma_zfree(V_pf_state_z, s); + pf_free_state(s); return (PF_DROP); } } @@ -3886,12 +3885,10 @@ pf_create_state(struct pf_krule *r, struct pf_krule *nr, struct pf_krule *a, if (pf_state_insert(BOUND_IFACE(r, kif), kif, (pd->dir == PF_IN) ? sk : nk, (pd->dir == PF_IN) ? nk : sk, s)) { - if (pd->proto == IPPROTO_TCP) - pf_normalize_tcp_cleanup(s); REASON_SET(&reason, PFRES_STATEINS); pf_src_tree_remove_state(s); STATE_DEC_COUNTERS(s); - uma_zfree(V_pf_state_z, s); + pf_free_state(s); return (PF_DROP); } else *sm = s; From owner-dev-commits-src-all@freebsd.org Tue Jun 29 07:24:59 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 186EB64506D; Tue, 29 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 4GDbbG71g1z4Rn9; Tue, 29 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 B0ECF14D4E; Tue, 29 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 15T7Owaa068164; Tue, 29 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 15T7OwLL068163; Tue, 29 Jun 2021 07:24:58 GMT (envelope-from git) Date: Tue, 29 Jun 2021 07:24:58 GMT Message-Id: <202106290724.15T7OwLL068163@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 803dfe3da0e3 - main - pf: deduplicate V_pf_state_z handling with pfsync MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 803dfe3da0e30520227a791ba5c2b93da16e1cf5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 07:24:59 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=803dfe3da0e30520227a791ba5c2b93da16e1cf5 commit 803dfe3da0e30520227a791ba5c2b93da16e1cf5 Author: Mateusz Guzik AuthorDate: 2021-06-28 18:18:26 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-29 07:24:53 +0000 pf: deduplicate V_pf_state_z handling with pfsync Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 1 + sys/netpfil/pf/if_pfsync.c | 20 +++----------------- sys/netpfil/pf/pf.c | 2 +- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 9f0bf002b631..2ce47f926091 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1495,6 +1495,7 @@ extern int pf_state_insert(struct pfi_kkif *, struct pf_state_key *, struct pf_state_key *, struct pf_state *); +extern struct pf_state *pf_alloc_state(int); extern void pf_free_state(struct pf_state *); static __inline void diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 3514c922c361..16878fe87750 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -504,16 +504,10 @@ pfsync_state_import(struct pfsync_state *sp, u_int8_t flags) /* * XXXGL: consider M_WAITOK in ioctl path after. */ - if ((st = uma_zalloc(V_pf_state_z, M_NOWAIT | M_ZERO)) == NULL) + st = pf_alloc_state(M_NOWAIT); + if (__predict_false(st == NULL)) goto cleanup; - for (int i = 0; i < 2; i++) { - st->packets[i] = counter_u64_alloc(M_NOWAIT); - st->bytes[i] = counter_u64_alloc(M_NOWAIT); - if (st->packets[i] == NULL || st->bytes[i] == NULL) - goto cleanup; - } - if ((skw = uma_zalloc(V_pf_state_key_z, M_NOWAIT)) == NULL) goto cleanup; @@ -623,15 +617,7 @@ cleanup: cleanup_state: /* pf_state_insert() frees the state keys. */ if (st) { - for (int i = 0; i < 2; i++) { - counter_u64_free(st->packets[i]); - counter_u64_free(st->bytes[i]); - } - if (st->dst.scrub) - uma_zfree(V_pf_state_scrub_z, st->dst.scrub); - if (st->src.scrub) - uma_zfree(V_pf_state_scrub_z, st->src.scrub); - uma_zfree(V_pf_state_z, st); + pf_free_state(st); } return (error); } diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index f05dc69b3dbb..7579b6bbebb0 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1736,7 +1736,7 @@ pf_unlink_state(struct pf_state *s, u_int flags) return (pf_release_staten(s, 2)); } -static struct pf_state * +struct pf_state * pf_alloc_state(int flags) { struct pf_state *s; From owner-dev-commits-src-all@freebsd.org Tue Jun 29 07:25:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8425F644E57; Tue, 29 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 4GDbbK1jbsz4RVw; Tue, 29 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 0D0EE14F3D; Tue, 29 Jun 2021 07:25: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 15T7P0xH068220; Tue, 29 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 15T7P0Gt068219; Tue, 29 Jun 2021 07:25:00 GMT (envelope-from git) Date: Tue, 29 Jun 2021 07:25:00 GMT Message-Id: <202106290725.15T7P0Gt068219@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: d26ef5c7ac83 - main - pf: make sure the dtrace probe has safe access to state MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d26ef5c7ac830812f07a02787f25fed5d6f8609e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 07:25:01 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=d26ef5c7ac830812f07a02787f25fed5d6f8609e commit d26ef5c7ac830812f07a02787f25fed5d6f8609e Author: Mateusz Guzik AuthorDate: 2021-06-28 19:32:20 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-29 07:24:53 +0000 pf: make sure the dtrace probe has safe access to state Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 69cdc75f0f41..39b032962e84 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -6297,11 +6297,12 @@ done: } break; } - if (s) - PF_STATE_UNLOCK(s); SDT_PROBE4(pf, ip, test, done, action, reason, r, s); + if (s) + PF_STATE_UNLOCK(s); + return (action); } #endif /* INET */ From owner-dev-commits-src-all@freebsd.org Tue Jun 29 07:25:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 117816450B1; Tue, 29 Jun 2021 07:25: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 4GDbbH6rCwz4RnG; Tue, 29 Jun 2021 07:24: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 D1D4314D4F; Tue, 29 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 15T7Ox9n068190; Tue, 29 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 15T7OxIF068189; Tue, 29 Jun 2021 07:24:59 GMT (envelope-from git) Date: Tue, 29 Jun 2021 07:24:59 GMT Message-Id: <202106290724.15T7OxIF068189@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 55cc305dfcad - main - pf: revert: Use counter(9) for pf_state byte/packet tracking MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 55cc305dfcad0ad7c4f528fa47f7473927e8223a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 07:25:00 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=55cc305dfcad0ad7c4f528fa47f7473927e8223a commit 55cc305dfcad0ad7c4f528fa47f7473927e8223a Author: Mateusz Guzik AuthorDate: 2021-06-28 18:50:56 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-29 07:24:53 +0000 pf: revert: Use counter(9) for pf_state byte/packet tracking stats are not shared and consequently per-CPU counters only waste memory. No slowdown was measured when passing over 20M pps. Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 4 ++-- sys/netpfil/pf/pf.c | 39 +++++++++------------------------------ sys/netpfil/pf/pf_ioctl.c | 10 ++++------ sys/netpfil/pf/pf_nv.c | 4 ++-- 4 files changed, 17 insertions(+), 40 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 2ce47f926091..c97fffea845f 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -536,8 +536,8 @@ struct pf_state { struct pfi_kkif *rt_kif; struct pf_ksrc_node *src_node; struct pf_ksrc_node *nat_src_node; - counter_u64_t packets[2]; - counter_u64_t bytes[2]; + u_int64_t packets[2]; + u_int64_t bytes[2]; u_int32_t creation; u_int32_t expire; u_int32_t pfsync_time; diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 7579b6bbebb0..69cdc75f0f41 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -1739,23 +1739,8 @@ pf_unlink_state(struct pf_state *s, u_int flags) struct pf_state * pf_alloc_state(int flags) { - struct pf_state *s; - - s = uma_zalloc(V_pf_state_z, flags | M_ZERO); - if (__predict_false(s == NULL)) - return (NULL); - - for (int i = 0; i < 2; i++) { - s->bytes[i] = counter_u64_alloc(M_NOWAIT); - s->packets[i] = counter_u64_alloc(M_NOWAIT); - - if (s->bytes[i] == NULL || s->packets[i] == NULL) { - pf_free_state(s); - return (NULL); - } - } - return (s); + return (uma_zalloc(V_pf_state_z, flags | M_ZERO)); } void @@ -1766,11 +1751,6 @@ pf_free_state(struct pf_state *cur) KASSERT(cur->timeout == PFTM_UNLINKED, ("%s: timeout %u", __func__, cur->timeout)); - for (int i = 0; i < 2; i++) { - counter_u64_free(cur->bytes[i]); - counter_u64_free(cur->packets[i]); - } - pf_normalize_tcp_cleanup(cur); uma_zfree(V_pf_state_z, cur); counter_u64_add(V_pf_status.fcounters[FCNT_STATE_REMOVALS], 1); @@ -4313,9 +4293,8 @@ pf_tcp_track_full(struct pf_state_peer *src, struct pf_state_peer *dst, pf_print_flags(th->th_flags); printf(" seq=%u (%u) ack=%u len=%u ackskew=%d " "pkts=%llu:%llu dir=%s,%s\n", seq, orig_seq, ack, - pd->p_len, ackskew, - (unsigned long long)counter_u64_fetch((*state)->packets[0]), - (unsigned long long)counter_u64_fetch((*state)->packets[1]), + pd->p_len, ackskew, (unsigned long long)(*state)->packets[0], + (unsigned long long)(*state)->packets[1], pd->dir == PF_IN ? "in" : "out", pd->dir == (*state)->direction ? "fwd" : "rev"); } @@ -4370,8 +4349,8 @@ pf_tcp_track_full(struct pf_state_peer *src, struct pf_state_peer *dst, printf(" seq=%u (%u) ack=%u len=%u ackskew=%d " "pkts=%llu:%llu dir=%s,%s\n", seq, orig_seq, ack, pd->p_len, ackskew, - (unsigned long long)counter_u64_fetch((*state)->packets[0]), - (unsigned long long)counter_u64_fetch((*state)->packets[1]), + (unsigned long long)(*state)->packets[0], + (unsigned long long)(*state)->packets[1], pd->dir == PF_IN ? "in" : "out", pd->dir == (*state)->direction ? "fwd" : "rev"); printf("pf: State failure on: %c %c %c %c | %c %c\n", @@ -6276,8 +6255,8 @@ done: pd.tot_len); } dirndx = (dir == s->direction) ? 0 : 1; - counter_u64_add(s->packets[dirndx], 1); - counter_u64_add(s->bytes[dirndx], pd.tot_len); + s->packets[dirndx]++; + s->bytes[dirndx] += pd.tot_len; } tr = r; nr = (s != NULL) ? s->nat_rule.ptr : pd.nat_rule; @@ -6673,8 +6652,8 @@ done: pd.tot_len); } dirndx = (dir == s->direction) ? 0 : 1; - counter_u64_add(s->packets[dirndx], 1); - counter_u64_add(s->bytes[dirndx], pd.tot_len); + s->packets[dirndx]++; + s->bytes[dirndx] += pd.tot_len; } tr = r; nr = (s != NULL) ? s->nat_rule.ptr : pd.nat_rule; diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 7a8d12ee4c3f..928e4a1259cc 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -4584,12 +4584,10 @@ pfsync_state_export(struct pfsync_state *sp, struct pf_state *st) else sp->nat_rule = htonl(st->nat_rule.ptr->nr); - pf_state_counter_hton(counter_u64_fetch(st->packets[0]), - sp->packets[0]); - pf_state_counter_hton(counter_u64_fetch(st->packets[1]), - sp->packets[1]); - pf_state_counter_hton(counter_u64_fetch(st->bytes[0]), sp->bytes[0]); - pf_state_counter_hton(counter_u64_fetch(st->bytes[1]), sp->bytes[1]); + pf_state_counter_hton(st->packets[0], sp->packets[0]); + pf_state_counter_hton(st->packets[1], sp->packets[1]); + pf_state_counter_hton(st->bytes[0], sp->bytes[0]); + pf_state_counter_hton(st->bytes[1], sp->bytes[1]); } diff --git a/sys/netpfil/pf/pf_nv.c b/sys/netpfil/pf/pf_nv.c index 31943ba69687..553290c88586 100644 --- a/sys/netpfil/pf/pf_nv.c +++ b/sys/netpfil/pf/pf_nv.c @@ -982,9 +982,9 @@ pf_state_to_nvstate(const struct pf_state *s) for (int i = 0; i < 2; i++) { nvlist_append_number_array(nvl, "packets", - counter_u64_fetch(s->packets[i])); + s->packets[i]); nvlist_append_number_array(nvl, "bytes", - counter_u64_fetch(s->bytes[i])); + s->bytes[i]); } nvlist_add_number(nvl, "creatorid", s->creatorid); From owner-dev-commits-src-all@freebsd.org Tue Jun 29 07:58:05 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5B459645F10; Tue, 29 Jun 2021 07:58: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 4GDcKT0jZYz4TFP; Tue, 29 Jun 2021 07:58: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 0113A15924; Tue, 29 Jun 2021 07:58: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 15T7w49o008233; Tue, 29 Jun 2021 07:58:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15T7w4GB008232; Tue, 29 Jun 2021 07:58:04 GMT (envelope-from git) Date: Tue, 29 Jun 2021 07:58:04 GMT Message-Id: <202106290758.15T7w4GB008232@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 435754a59ee2 - main - Add infrastructure required for Linux coredump support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 435754a59ee203c3369f47ff9103f269c81581b7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 07:58:05 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=435754a59ee203c3369f47ff9103f269c81581b7 commit 435754a59ee203c3369f47ff9103f269c81581b7 Author: Edward Tomasz Napierala AuthorDate: 2021-06-29 07:49:04 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-06-29 07:49:12 +0000 Add infrastructure required for Linux coredump support This adds `sv_elf_core_osabi`, `sv_elf_core_abi_vendor`, and `sv_elf_core_prepare_notes` fields to `struct sysentvec`, and modifies imgact_elf.c to make use of them instead of hardcoding FreeBSD-specific values. It also updates all of the ABI definitions to preserve current behaviour. This makes it possible to implement non-native ELF coredump support without unnecessary code duplication. It will be used for Linux coredumps. Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30921 --- sys/amd64/amd64/elf_machdep.c | 6 +++ sys/amd64/cloudabi32/cloudabi32_sysvec.c | 3 ++ sys/amd64/cloudabi64/cloudabi64_sysvec.c | 3 ++ sys/amd64/linux/linux_sysvec.c | 3 ++ sys/amd64/linux32/linux32_sysvec.c | 3 ++ sys/arm/arm/elf_machdep.c | 3 ++ sys/arm/cloudabi32/cloudabi32_sysvec.c | 3 ++ sys/arm64/arm64/elf32_machdep.c | 3 ++ sys/arm64/arm64/elf_machdep.c | 3 ++ sys/arm64/cloudabi32/cloudabi32_sysvec.c | 3 ++ sys/arm64/cloudabi64/cloudabi64_sysvec.c | 3 ++ sys/arm64/linux/linux_sysvec.c | 3 ++ sys/compat/ia32/ia32_sysvec.c | 3 ++ sys/i386/i386/elf_machdep.c | 3 ++ sys/i386/linux/linux_sysvec.c | 3 ++ sys/kern/imgact_elf.c | 66 ++++++++++++++++---------------- sys/mips/mips/elf_machdep.c | 2 + sys/mips/mips/freebsd32_machdep.c | 3 ++ sys/powerpc/powerpc/elf32_machdep.c | 3 ++ sys/powerpc/powerpc/elf64_machdep.c | 6 +++ sys/riscv/riscv/elf_machdep.c | 3 ++ sys/sys/imgact_elf.h | 11 +++++- sys/sys/sysent.h | 5 +++ 23 files changed, 113 insertions(+), 34 deletions(-) diff --git a/sys/amd64/amd64/elf_machdep.c b/sys/amd64/amd64/elf_machdep.c index a3fb1184bb05..a7cef2a8d92a 100644 --- a/sys/amd64/amd64/elf_machdep.c +++ b/sys/amd64/amd64/elf_machdep.c @@ -59,6 +59,9 @@ struct sysentvec elf64_freebsd_sysvec_la48 = { .sv_szsigcode = &szsigcode, .sv_name = "FreeBSD ELF64", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, @@ -94,6 +97,9 @@ struct sysentvec elf64_freebsd_sysvec_la57 = { .sv_szsigcode = &szsigcode, .sv_name = "FreeBSD ELF64", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/amd64/cloudabi32/cloudabi32_sysvec.c b/sys/amd64/cloudabi32/cloudabi32_sysvec.c index 5f04c35a5c72..164f87e90e91 100644 --- a/sys/amd64/cloudabi32/cloudabi32_sysvec.c +++ b/sys/amd64/cloudabi32/cloudabi32_sysvec.c @@ -209,6 +209,9 @@ static struct sysentvec cloudabi32_elf_sysvec = { .sv_fixup = cloudabi32_fixup_tcb, .sv_name = "CloudABI ELF32", .sv_coredump = elf32_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf32_prepare_notes, .sv_minuser = FREEBSD32_MINUSER, .sv_maxuser = FREEBSD32_MAXUSER, .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, diff --git a/sys/amd64/cloudabi64/cloudabi64_sysvec.c b/sys/amd64/cloudabi64/cloudabi64_sysvec.c index 34ad0aedfe8b..d3893902b08e 100644 --- a/sys/amd64/cloudabi64/cloudabi64_sysvec.c +++ b/sys/amd64/cloudabi64/cloudabi64_sysvec.c @@ -197,6 +197,9 @@ static struct sysentvec cloudabi64_elf_sysvec = { .sv_fixup = cloudabi64_fixup_tcb, .sv_name = "CloudABI ELF64", .sv_coredump = elf64_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf64_prepare_notes, .sv_minuser = VM_MIN_ADDRESS, /* Keep top page reserved to work around AMD Ryzen stability issues. */ .sv_maxuser = VM_MAXUSER_ADDRESS - PAGE_SIZE, diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index 32db8399ad42..655214b10047 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -740,6 +740,9 @@ struct sysentvec elf_linux_sysvec = { .sv_szsigcode = &linux_szsigcode, .sv_name = "Linux ELF64", .sv_coredump = elf64_coredump, + .sv_elf_core_osabi = ELFOSABI_NONE, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf64_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index 8e3e728161ce..740e8a54a4da 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -912,6 +912,9 @@ struct sysentvec elf_linux_sysvec = { .sv_szsigcode = &linux_szsigcode, .sv_name = "Linux ELF32", .sv_coredump = elf32_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf32_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/arm/arm/elf_machdep.c b/sys/arm/arm/elf_machdep.c index d32dbb5baf90..c67cd225a1af 100644 --- a/sys/arm/arm/elf_machdep.c +++ b/sys/arm/arm/elf_machdep.c @@ -72,6 +72,9 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_szsigcode = &szsigcode, .sv_name = "FreeBSD ELF32", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/arm/cloudabi32/cloudabi32_sysvec.c b/sys/arm/cloudabi32/cloudabi32_sysvec.c index c6dfe0661b7c..a8c5da47d265 100644 --- a/sys/arm/cloudabi32/cloudabi32_sysvec.c +++ b/sys/arm/cloudabi32/cloudabi32_sysvec.c @@ -173,6 +173,9 @@ static struct sysentvec cloudabi32_elf_sysvec = { .sv_fixup = cloudabi32_fixup, .sv_name = "CloudABI ELF32", .sv_coredump = elf32_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf32_prepare_notes, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c index b9669616e1dd..7792374f865b 100644 --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -87,6 +87,9 @@ static struct sysentvec elf32_freebsd_sysvec = { .sv_szsigcode = &sz_aarch32_sigcode, .sv_name = "FreeBSD ELF32", .sv_coredump = elf32_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf32_prepare_notes, .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = FREEBSD32_MINUSER, diff --git a/sys/arm64/arm64/elf_machdep.c b/sys/arm64/arm64/elf_machdep.c index cd12d40c37df..82ecdf894911 100644 --- a/sys/arm64/arm64/elf_machdep.c +++ b/sys/arm64/arm64/elf_machdep.c @@ -68,6 +68,9 @@ static struct sysentvec elf64_freebsd_sysvec = { .sv_szsigcode = &szsigcode, .sv_name = "FreeBSD ELF64", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/arm64/cloudabi32/cloudabi32_sysvec.c b/sys/arm64/cloudabi32/cloudabi32_sysvec.c index eb8c51742dc7..889393560ede 100644 --- a/sys/arm64/cloudabi32/cloudabi32_sysvec.c +++ b/sys/arm64/cloudabi32/cloudabi32_sysvec.c @@ -181,6 +181,9 @@ static struct sysentvec cloudabi32_elf_sysvec = { .sv_fixup = cloudabi32_fixup, .sv_name = "CloudABI ELF32", .sv_coredump = elf32_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf32_prepare_notes, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = (uintmax_t)1 << 32, .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, diff --git a/sys/arm64/cloudabi64/cloudabi64_sysvec.c b/sys/arm64/cloudabi64/cloudabi64_sysvec.c index 92deb356a112..bdbd828b7b62 100644 --- a/sys/arm64/cloudabi64/cloudabi64_sysvec.c +++ b/sys/arm64/cloudabi64/cloudabi64_sysvec.c @@ -165,6 +165,9 @@ static struct sysentvec cloudabi64_elf_sysvec = { .sv_fixup = cloudabi64_fixup, .sv_name = "CloudABI ELF64", .sv_coredump = elf64_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf64_prepare_notes, .sv_minuser = VM_MIN_ADDRESS, .sv_maxuser = VM_MAXUSER_ADDRESS, .sv_stackprot = VM_PROT_READ | VM_PROT_WRITE, diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index afcca9f7e948..33bc303b5ada 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -416,6 +416,9 @@ struct sysentvec elf_linux_sysvec = { .sv_szsigcode = &linux_szsigcode, .sv_name = "Linux ELF64", .sv_coredump = elf64_coredump, + .sv_elf_core_osabi = ELFOSABI_NONE, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf64_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/compat/ia32/ia32_sysvec.c b/sys/compat/ia32/ia32_sysvec.c index f5a2c1200fc6..2b019e3b0323 100644 --- a/sys/compat/ia32/ia32_sysvec.c +++ b/sys/compat/ia32/ia32_sysvec.c @@ -105,6 +105,9 @@ struct sysentvec ia32_freebsd_sysvec = { .sv_szsigcode = &sz_ia32_sigcode, .sv_name = "FreeBSD ELF32", .sv_coredump = elf32_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf32_prepare_notes, .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = FREEBSD32_MINUSER, diff --git a/sys/i386/i386/elf_machdep.c b/sys/i386/i386/elf_machdep.c index 0d870748967e..cb7b5617715c 100644 --- a/sys/i386/i386/elf_machdep.c +++ b/sys/i386/i386/elf_machdep.c @@ -61,6 +61,9 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_szsigcode = &szsigcode, .sv_name = "FreeBSD ELF32", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/i386/linux/linux_sysvec.c b/sys/i386/linux/linux_sysvec.c index 9cc15bbfd5c3..adb70fded6dc 100644 --- a/sys/i386/linux/linux_sysvec.c +++ b/sys/i386/linux/linux_sysvec.c @@ -854,6 +854,9 @@ struct sysentvec elf_linux_sysvec = { .sv_szsigcode = &linux_szsigcode, .sv_name = "Linux ELF32", .sv_coredump = elf32_coredump, + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf32_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 4a649664c917..8c56660b1fe4 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -197,8 +197,6 @@ static Elf_Brandinfo *elf_brand_list[MAX_BRANDS]; #define aligned(a, t) (rounddown2((u_long)(a), sizeof(t)) == (u_long)(a)) -static const char FREEBSD_ABI_VENDOR[] = "FreeBSD"; - Elf_Brandnote __elfN(freebsd_brandnote) = { .hdr.n_namesz = sizeof(FREEBSD_ABI_VENDOR), .hdr.n_descsz = sizeof(int32_t), @@ -1434,8 +1432,6 @@ struct phdr_closure { Elf_Off offset; /* Offset of segment in core file */ }; -typedef void (*outfunc_t)(void *, struct sbuf *, size_t *); - struct note_info { int type; /* Note type. */ outfunc_t outfunc; /* Output function. */ @@ -1455,10 +1451,7 @@ static void each_dumpable_segment(struct thread *, segment_callback, void *, int); static int __elfN(corehdr)(struct coredump_params *, int, void *, size_t, struct note_info_list *, size_t, int); -static void __elfN(prepare_notes)(struct thread *, struct note_info_list *, - size_t *); -static void __elfN(putnote)(struct note_info *, struct sbuf *); -static size_t register_note(struct note_info_list *, int, outfunc_t, void *); +static void __elfN(putnote)(struct thread *td, struct note_info *, struct sbuf *); static void __elfN(note_fpregset)(void *, struct sbuf *, size_t *); static void __elfN(note_prpsinfo)(void *, struct sbuf *, size_t *); @@ -1509,7 +1502,7 @@ __elfN(coredump)(struct thread *td, struct vnode *vp, off_t limit, int flags) hdrsize = sizeof(Elf_Ehdr) + sizeof(Elf_Phdr) * (1 + seginfo.count); if (seginfo.count + 1 >= PN_XNUM) hdrsize += sizeof(Elf_Shdr); - __elfN(prepare_notes)(td, ¬elst, ¬esz); + td->td_proc->p_sysent->sv_elf_core_prepare_notes(td, ¬elst, ¬esz); coresize = round_page(hdrsize + notesz) + seginfo.size; /* Set up core dump parameters. */ @@ -1735,7 +1728,7 @@ __elfN(corehdr)(struct coredump_params *p, int numsegs, void *hdr, sbuf_start_section(sb, NULL); sbuf_bcat(sb, hdr, hdrsize); TAILQ_FOREACH(ninfo, notelst, link) - __elfN(putnote)(ninfo, sb); + __elfN(putnote)(p->td, ninfo, sb); /* Align up to a page boundary for the program segments. */ sbuf_end_section(sb, -1, PAGE_SIZE, 0); error = sbuf_finish(sb); @@ -1744,7 +1737,7 @@ __elfN(corehdr)(struct coredump_params *p, int numsegs, void *hdr, return (error); } -static void +void __elfN(prepare_notes)(struct thread *td, struct note_info_list *list, size_t *sizep) { @@ -1755,7 +1748,7 @@ __elfN(prepare_notes)(struct thread *td, struct note_info_list *list, p = td->td_proc; size = 0; - size += register_note(list, NT_PRPSINFO, __elfN(note_prpsinfo), p); + size += __elfN(register_note)(td, list, NT_PRPSINFO, __elfN(note_prpsinfo), p); /* * To have the debugger select the right thread (LWP) as the initial @@ -1765,15 +1758,15 @@ __elfN(prepare_notes)(struct thread *td, struct note_info_list *list, */ thr = td; while (thr != NULL) { - size += register_note(list, NT_PRSTATUS, + size += __elfN(register_note)(td, list, NT_PRSTATUS, __elfN(note_prstatus), thr); - size += register_note(list, NT_FPREGSET, + size += __elfN(register_note)(td, list, NT_FPREGSET, __elfN(note_fpregset), thr); - size += register_note(list, NT_THRMISC, + size += __elfN(register_note)(td, list, NT_THRMISC, __elfN(note_thrmisc), thr); - size += register_note(list, NT_PTLWPINFO, + size += __elfN(register_note)(td, list, NT_PTLWPINFO, __elfN(note_ptlwpinfo), thr); - size += register_note(list, -1, + size += __elfN(register_note)(td, list, -1, __elfN(note_threadmd), thr); thr = thr == td ? TAILQ_FIRST(&p->p_threads) : @@ -1782,23 +1775,23 @@ __elfN(prepare_notes)(struct thread *td, struct note_info_list *list, thr = TAILQ_NEXT(thr, td_plist); } - size += register_note(list, NT_PROCSTAT_PROC, + size += __elfN(register_note)(td, list, NT_PROCSTAT_PROC, __elfN(note_procstat_proc), p); - size += register_note(list, NT_PROCSTAT_FILES, + size += __elfN(register_note)(td, list, NT_PROCSTAT_FILES, note_procstat_files, p); - size += register_note(list, NT_PROCSTAT_VMMAP, + size += __elfN(register_note)(td, list, NT_PROCSTAT_VMMAP, note_procstat_vmmap, p); - size += register_note(list, NT_PROCSTAT_GROUPS, + size += __elfN(register_note)(td, list, NT_PROCSTAT_GROUPS, note_procstat_groups, p); - size += register_note(list, NT_PROCSTAT_UMASK, + size += __elfN(register_note)(td, list, NT_PROCSTAT_UMASK, note_procstat_umask, p); - size += register_note(list, NT_PROCSTAT_RLIMIT, + size += __elfN(register_note)(td, list, NT_PROCSTAT_RLIMIT, note_procstat_rlimit, p); - size += register_note(list, NT_PROCSTAT_OSREL, + size += __elfN(register_note)(td, list, NT_PROCSTAT_OSREL, note_procstat_osrel, p); - size += register_note(list, NT_PROCSTAT_PSSTRINGS, + size += __elfN(register_note)(td, list, NT_PROCSTAT_PSSTRINGS, __elfN(note_procstat_psstrings), p); - size += register_note(list, NT_PROCSTAT_AUXV, + size += __elfN(register_note)(td, list, NT_PROCSTAT_AUXV, __elfN(note_procstat_auxv), p); *sizep = size; @@ -1822,7 +1815,7 @@ __elfN(puthdr)(struct thread *td, void *hdr, size_t hdrsize, int numsegs, ehdr->e_ident[EI_CLASS] = ELF_CLASS; ehdr->e_ident[EI_DATA] = ELF_DATA; ehdr->e_ident[EI_VERSION] = EV_CURRENT; - ehdr->e_ident[EI_OSABI] = ELFOSABI_FREEBSD; + ehdr->e_ident[EI_OSABI] = td->td_proc->p_sysent->sv_elf_core_osabi; ehdr->e_ident[EI_ABIVERSION] = 0; ehdr->e_ident[EI_PAD] = 0; ehdr->e_type = ET_CORE; @@ -1888,12 +1881,15 @@ __elfN(puthdr)(struct thread *td, void *hdr, size_t hdrsize, int numsegs, each_dumpable_segment(td, cb_put_phdr, &phc, flags); } -static size_t -register_note(struct note_info_list *list, int type, outfunc_t out, void *arg) +size_t +__elfN(register_note)(struct thread *td, struct note_info_list *list, + int type, outfunc_t out, void *arg) { + const struct sysentvec *sv; struct note_info *ninfo; size_t size, notesize; + sv = td->td_proc->p_sysent; size = 0; out(arg, NULL, &size); ninfo = malloc(sizeof(*ninfo), M_TEMP, M_ZERO | M_WAITOK); @@ -1907,7 +1903,7 @@ register_note(struct note_info_list *list, int type, outfunc_t out, void *arg) return (size); notesize = sizeof(Elf_Note) + /* note header */ - roundup2(sizeof(FREEBSD_ABI_VENDOR), ELF_NOTE_ROUNDSIZE) + + roundup2(strlen(sv->sv_elf_core_abi_vendor) + 1, ELF_NOTE_ROUNDSIZE) + /* note name */ roundup2(size, ELF_NOTE_ROUNDSIZE); /* note description */ @@ -1957,9 +1953,10 @@ __elfN(populate_note)(int type, void *src, void *dst, size_t size, void **descp) } static void -__elfN(putnote)(struct note_info *ninfo, struct sbuf *sb) +__elfN(putnote)(struct thread *td, struct note_info *ninfo, struct sbuf *sb) { Elf_Note note; + const struct sysentvec *sv; ssize_t old_len, sect_len; size_t new_len, descsz, i; @@ -1968,13 +1965,16 @@ __elfN(putnote)(struct note_info *ninfo, struct sbuf *sb) return; } - note.n_namesz = sizeof(FREEBSD_ABI_VENDOR); + sv = td->td_proc->p_sysent; + + note.n_namesz = strlen(sv->sv_elf_core_abi_vendor) + 1; note.n_descsz = ninfo->outsize; note.n_type = ninfo->type; sbuf_bcat(sb, ¬e, sizeof(note)); sbuf_start_section(sb, &old_len); - sbuf_bcat(sb, FREEBSD_ABI_VENDOR, sizeof(FREEBSD_ABI_VENDOR)); + sbuf_bcat(sb, sv->sv_elf_core_abi_vendor, + strlen(sv->sv_elf_core_abi_vendor) + 1); sbuf_end_section(sb, old_len, ELF_NOTE_ROUNDSIZE, 0); if (note.n_descsz == 0) return; diff --git a/sys/mips/mips/elf_machdep.c b/sys/mips/mips/elf_machdep.c index 9e27e5e7f2a4..9df6d1d36436 100644 --- a/sys/mips/mips/elf_machdep.c +++ b/sys/mips/mips/elf_machdep.c @@ -65,6 +65,8 @@ static struct sysentvec elf_freebsd_sysvec = { .sv_name = "FreeBSD ELF32", #endif .sv_coredump = __elfN(coredump), + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/mips/mips/freebsd32_machdep.c b/sys/mips/mips/freebsd32_machdep.c index 5d7fd4719efb..e30753e7a59c 100644 --- a/sys/mips/mips/freebsd32_machdep.c +++ b/sys/mips/mips/freebsd32_machdep.c @@ -85,6 +85,9 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_szsigcode = &szsigcode32, .sv_name = "FreeBSD ELF32", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/powerpc/powerpc/elf32_machdep.c b/sys/powerpc/powerpc/elf32_machdep.c index 04150f02bb9c..2c4928f7d9df 100644 --- a/sys/powerpc/powerpc/elf32_machdep.c +++ b/sys/powerpc/powerpc/elf32_machdep.c @@ -98,6 +98,9 @@ struct sysentvec elf32_freebsd_sysvec = { .sv_szsigcode = &szsigcode32, .sv_name = "FreeBSD ELF32", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/powerpc/powerpc/elf64_machdep.c b/sys/powerpc/powerpc/elf64_machdep.c index 1bca857d9ca5..38f76c158793 100644 --- a/sys/powerpc/powerpc/elf64_machdep.c +++ b/sys/powerpc/powerpc/elf64_machdep.c @@ -69,6 +69,9 @@ struct sysentvec elf64_freebsd_sysvec_v1 = { .sv_szsigcode = &szsigcode64, .sv_name = "FreeBSD ELF64", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, @@ -105,6 +108,9 @@ struct sysentvec elf64_freebsd_sysvec_v2 = { .sv_szsigcode = &szsigcode64, .sv_name = "FreeBSD ELF64 V2", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/riscv/riscv/elf_machdep.c b/sys/riscv/riscv/elf_machdep.c index 06d117128ef7..ee80e04e8c31 100644 --- a/sys/riscv/riscv/elf_machdep.c +++ b/sys/riscv/riscv/elf_machdep.c @@ -72,6 +72,9 @@ struct sysentvec elf64_freebsd_sysvec = { .sv_szsigcode = &szsigcode, .sv_name = "FreeBSD ELF64", .sv_coredump = __elfN(coredump), + .sv_elf_core_osabi = ELFOSABI_FREEBSD, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = __elfN(prepare_notes), .sv_imgact_try = NULL, .sv_minsigstksz = MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h index f0c112b2bcdc..44a860359a75 100644 --- a/sys/sys/imgact_elf.h +++ b/sys/sys/imgact_elf.h @@ -50,6 +50,8 @@ struct image_params; struct thread; struct vnode; +struct note_info_list; +struct sbuf; /* * Structure used to pass information from the loader to the @@ -98,7 +100,10 @@ typedef struct { __ElfType(Auxargs); __ElfType(Brandinfo); -#define MAX_BRANDS 8 +#define MAX_BRANDS 8 +#define FREEBSD_ABI_VENDOR "FreeBSD" + +typedef void (*outfunc_t)(void *, struct sbuf *, size_t *); /* Closure for __elfN(size_segments)(). */ struct sseg_closure { @@ -115,7 +120,11 @@ size_t __elfN(populate_note)(int, void *, void *, size_t, void **); void __elfN(stackgap)(struct image_params *, uintptr_t *); int __elfN(freebsd_copyout_auxargs)(struct image_params *, uintptr_t); void __elfN(puthdr)(struct thread *, void *, size_t, int, size_t, int); +void __elfN(prepare_notes)(struct thread *, struct note_info_list *, + size_t *); void __elfN(size_segments)(struct thread *, struct sseg_closure *, int); +size_t __elfN(register_note)(struct thread *, struct note_info_list *, + int, outfunc_t, void *); /* Machine specific function to dump per-thread information. */ void __elfN(dump_thread)(struct thread *, void *, size_t *); diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index 8b0903f7dcc0..e0e5e351ae20 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -98,6 +98,7 @@ struct proc; struct __sigset; struct trapframe; struct vnode; +struct note_info_list; struct sysentvec { int sv_size; /* number of entries */ @@ -113,6 +114,10 @@ struct sysentvec { char *sv_name; /* name of binary type */ int (*sv_coredump)(struct thread *, struct vnode *, off_t, int); /* function to dump core, or NULL */ + int sv_elf_core_osabi; + const char *sv_elf_core_abi_vendor; + void (*sv_elf_core_prepare_notes)(struct thread *, + struct note_info_list *, size_t *); int (*sv_imgact_try)(struct image_params *); void (*sv_stackgap)(struct image_params *, uintptr_t *); int (*sv_copyout_auxargs)(struct image_params *, From owner-dev-commits-src-all@freebsd.org Tue Jun 29 13:01:03 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 68C5364BD50; Tue, 29 Jun 2021 13:01: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 4GDl332RtGz4pHH; Tue, 29 Jun 2021 13:01: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 3C5F01963F; Tue, 29 Jun 2021 13:01: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 15TD13Sw015953; Tue, 29 Jun 2021 13:01:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TD13Bn015952; Tue, 29 Jun 2021 13:01:03 GMT (envelope-from git) Date: Tue, 29 Jun 2021 13:01:03 GMT Message-Id: <202106291301.15TD13Bn015952@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Jason A. Harmening" Subject: git: 372691a7ae18 - main - unionfs: release parent vnodes in deferred context MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jah X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 372691a7ae1878ecdf707195b0854750f07bf44e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 13:01:03 -0000 The branch main has been updated by jah: URL: https://cgit.FreeBSD.org/src/commit/?id=372691a7ae1878ecdf707195b0854750f07bf44e commit 372691a7ae1878ecdf707195b0854750f07bf44e Author: Jason A. Harmening AuthorDate: 2021-06-12 19:45:18 +0000 Commit: Jason A. Harmening CommitDate: 2021-06-29 13:02:01 +0000 unionfs: release parent vnodes in deferred context Each unionfs node holds a reference to its parent directory vnode. A single open file reference can therefore end up keeping an arbitrarily deep vnode hierarchy in place. When that reference is released, the resulting VOP_RECLAIM call chain can then exhaust the kernel stack. This is easily reproducible by running the unionfs.sh stress2 test. Fix it by deferring recursive unionfs vnode release to taskqueue context. PR: 238883 Reviewed By: kib (earlier version), markj Differential Revision: https://reviews.freebsd.org/D30748 --- sys/fs/unionfs/union.h | 6 ++++- sys/fs/unionfs/union_subr.c | 55 ++++++++++++++++++++++++++++++++++++++++----- 2 files changed, 55 insertions(+), 6 deletions(-) diff --git a/sys/fs/unionfs/union.h b/sys/fs/unionfs/union.h index ba0318bf185c..64706b2b21a2 100644 --- a/sys/fs/unionfs/union.h +++ b/sys/fs/unionfs/union.h @@ -89,7 +89,11 @@ struct unionfs_node { /* unionfs status head */ LIST_HEAD(unionfs_node_hashhead, unionfs_node) *un_hashtbl; /* dir vnode hash table */ - LIST_ENTRY(unionfs_node) un_hash; /* hash list entry */ + union { + LIST_ENTRY(unionfs_node) un_hash; /* hash list entry */ + STAILQ_ENTRY(unionfs_node) un_rele; /* deferred release list */ + }; + u_long un_hashmask; /* bit mask */ char *un_path; /* path */ int un_flag; /* unionfs node flag */ diff --git a/sys/fs/unionfs/union_subr.c b/sys/fs/unionfs/union_subr.c index 93e4f50d98c5..04d00fd77e39 100644 --- a/sys/fs/unionfs/union_subr.c +++ b/sys/fs/unionfs/union_subr.c @@ -53,6 +53,8 @@ #include #include #include +#include +#include #include #include @@ -67,6 +69,18 @@ static MALLOC_DEFINE(M_UNIONFSHASH, "UNIONFS hash", "UNIONFS hash table"); MALLOC_DEFINE(M_UNIONFSNODE, "UNIONFS node", "UNIONFS vnode private part"); MALLOC_DEFINE(M_UNIONFSPATH, "UNIONFS path", "UNIONFS path private part"); +static struct task unionfs_deferred_rele_task; +static struct mtx unionfs_deferred_rele_lock; +static STAILQ_HEAD(, unionfs_node) unionfs_deferred_rele_list = + STAILQ_HEAD_INITIALIZER(unionfs_deferred_rele_list); +static TASKQUEUE_DEFINE_THREAD(unionfs_rele); + +unsigned int unionfs_ndeferred = 0; +SYSCTL_UINT(_vfs, OID_AUTO, unionfs_ndeferred, CTLFLAG_RD, + &unionfs_ndeferred, 0, "unionfs deferred vnode release"); + +static void unionfs_deferred_rele(void *, int); + /* * Initialize */ @@ -74,6 +88,8 @@ int unionfs_init(struct vfsconf *vfsp) { UNIONFSDEBUG("unionfs_init\n"); /* printed during system boot */ + TASK_INIT(&unionfs_deferred_rele_task, 0, unionfs_deferred_rele, NULL); + mtx_init(&unionfs_deferred_rele_lock, "uniondefr", NULL, MTX_DEF); return (0); } @@ -83,9 +99,35 @@ unionfs_init(struct vfsconf *vfsp) int unionfs_uninit(struct vfsconf *vfsp) { + taskqueue_quiesce(taskqueue_unionfs_rele); + taskqueue_free(taskqueue_unionfs_rele); + mtx_destroy(&unionfs_deferred_rele_lock); return (0); } +static void +unionfs_deferred_rele(void *arg __unused, int pending __unused) +{ + STAILQ_HEAD(, unionfs_node) local_rele_list; + struct unionfs_node *unp, *tunp; + unsigned int ndeferred; + + ndeferred = 0; + STAILQ_INIT(&local_rele_list); + mtx_lock(&unionfs_deferred_rele_lock); + STAILQ_CONCAT(&local_rele_list, &unionfs_deferred_rele_list); + mtx_unlock(&unionfs_deferred_rele_lock); + STAILQ_FOREACH_SAFE(unp, &local_rele_list, un_rele, tunp) { + ++ndeferred; + MPASS(unp->un_dvp != NULL); + vrele(unp->un_dvp); + free(unp, M_UNIONFSNODE); + } + + /* We expect this function to be single-threaded, thus no atomic */ + unionfs_ndeferred += ndeferred; +} + static struct unionfs_node_hashhead * unionfs_get_hashhead(struct vnode *dvp, char *path) { @@ -375,10 +417,6 @@ unionfs_noderem(struct vnode *vp, struct thread *td) vrele(lvp); if (uvp != NULLVP) vrele(uvp); - if (dvp != NULLVP) { - vrele(dvp); - unp->un_dvp = NULLVP; - } if (unp->un_path != NULL) { free(unp->un_path, M_UNIONFSPATH); unp->un_path = NULL; @@ -400,7 +438,14 @@ unionfs_noderem(struct vnode *vp, struct thread *td) LIST_REMOVE(unsp, uns_list); free(unsp, M_TEMP); } - free(unp, M_UNIONFSNODE); + if (dvp != NULLVP) { + mtx_lock(&unionfs_deferred_rele_lock); + STAILQ_INSERT_TAIL(&unionfs_deferred_rele_list, unp, un_rele); + mtx_unlock(&unionfs_deferred_rele_lock); + taskqueue_enqueue(taskqueue_unionfs_rele, + &unionfs_deferred_rele_task); + } else + free(unp, M_UNIONFSNODE); } /* From owner-dev-commits-src-all@freebsd.org Tue Jun 29 14:02:57 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue Jun 29 14:26:43 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 824A064C93A; Tue, 29 Jun 2021 14:26:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDmxv3By6z3CK2; Tue, 29 Jun 2021 14:26:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 52DC61AC01; Tue, 29 Jun 2021 14:26:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15TEQh3R026882; Tue, 29 Jun 2021 14:26:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TEQhof026881; Tue, 29 Jun 2021 14:26:43 GMT (envelope-from git) Date: Tue, 29 Jun 2021 14:26:43 GMT Message-Id: <202106291426.15TEQhof026881@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: f77697dd9f31 - main - mac: cheaper check for ifnet_create_mbuf and ifnet_check_transmit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f77697dd9f31df85cd86370888606c81833f7c8a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 14:26:43 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=f77697dd9f31df85cd86370888606c81833f7c8a commit f77697dd9f31df85cd86370888606c81833f7c8a Author: Mateusz Guzik AuthorDate: 2021-06-29 12:56:19 +0000 Commit: Mateusz Guzik CommitDate: 2021-06-29 13:06:45 +0000 mac: cheaper check for ifnet_create_mbuf and ifnet_check_transmit Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/security/mac/mac_framework.c | 6 ++++++ sys/security/mac/mac_framework.h | 34 ++++++++++++++++++++++++++++++++-- sys/security/mac/mac_net.c | 10 ++-------- 3 files changed, 40 insertions(+), 10 deletions(-) diff --git a/sys/security/mac/mac_framework.c b/sys/security/mac/mac_framework.c index f0b4f89db7ca..e773a3840464 100644 --- a/sys/security/mac/mac_framework.c +++ b/sys/security/mac/mac_framework.c @@ -145,6 +145,8 @@ FPFLAG_RARE(vnode_check_access); FPFLAG_RARE(vnode_check_readlink); FPFLAG_RARE(pipe_check_stat); FPFLAG_RARE(pipe_check_poll); +FPFLAG_RARE(ifnet_create_mbuf); +FPFLAG_RARE(ifnet_check_transmit); #undef FPFLAG #undef FPFLAG_RARE @@ -445,6 +447,10 @@ struct mac_policy_fastpath_elem mac_policy_fastpath_array[] = { .flag = &mac_pipe_check_stat_fp_flag }, { .offset = FPO(pipe_check_poll), .flag = &mac_pipe_check_poll_fp_flag }, + { .offset = FPO(ifnet_create_mbuf), + .flag = &mac_ifnet_create_mbuf_fp_flag }, + { .offset = FPO(ifnet_check_transmit), + .flag = &mac_ifnet_check_transmit_fp_flag }, }; static void diff --git a/sys/security/mac/mac_framework.h b/sys/security/mac/mac_framework.h index 481f90a04801..7a46fbedb28d 100644 --- a/sys/security/mac/mac_framework.h +++ b/sys/security/mac/mac_framework.h @@ -143,9 +143,39 @@ void mac_devfs_update(struct mount *mp, struct devfs_dirent *de, void mac_devfs_vnode_associate(struct mount *mp, struct devfs_dirent *de, struct vnode *vp); -int mac_ifnet_check_transmit(struct ifnet *ifp, struct mbuf *m); +int mac_ifnet_check_transmit_impl(struct ifnet *ifp, struct mbuf *m); +#ifdef MAC +extern bool mac_ifnet_check_transmit_fp_flag; +#else +#define mac_ifnet_check_transmit_fp_flag 0 +#endif +#define mac_ifnet_check_transmit_enabled() __predict_false(mac_ifnet_check_transmit_fp_flag) +static inline int +mac_ifnet_check_transmit(struct ifnet *ifp, struct mbuf *m) +{ + + if (mac_ifnet_check_transmit_enabled()) + return (mac_ifnet_check_transmit_impl(ifp, m)); + return (0); +} + void mac_ifnet_create(struct ifnet *ifp); -void mac_ifnet_create_mbuf(struct ifnet *ifp, struct mbuf *m); + +void mac_ifnet_create_mbuf_impl(struct ifnet *ifp, struct mbuf *m); +#ifdef MAC +extern bool mac_ifnet_create_mbuf_fp_flag; +#else +#define mac_ifnet_create_mbuf_fp_flag 0 +#endif +#define mac_ifnet_create_mbuf_enabled() __predict_false(mac_ifnet_create_mbuf_fp_flag) +static inline void +mac_ifnet_create_mbuf(struct ifnet *ifp, struct mbuf *m) +{ + + if (mac_ifnet_create_mbuf_enabled()) + mac_ifnet_create_mbuf_impl(ifp, m); +} + void mac_ifnet_destroy(struct ifnet *); void mac_ifnet_init(struct ifnet *); int mac_ifnet_ioctl_get(struct ucred *cred, struct ifreq *ifr, diff --git a/sys/security/mac/mac_net.c b/sys/security/mac/mac_net.c index 161040edf84f..372619c7b583 100644 --- a/sys/security/mac/mac_net.c +++ b/sys/security/mac/mac_net.c @@ -337,14 +337,11 @@ mac_bpfdesc_create_mbuf(struct bpf_d *d, struct mbuf *m) } void -mac_ifnet_create_mbuf(struct ifnet *ifp, struct mbuf *m) +mac_ifnet_create_mbuf_impl(struct ifnet *ifp, struct mbuf *m) { struct label *label; int locked; - if (mac_policy_count == 0) - return; - label = mac_mbuf_to_label(m); MAC_IFNET_LOCK(ifp, locked); @@ -380,16 +377,13 @@ MAC_CHECK_PROBE_DEFINE2(ifnet_check_transmit, "struct ifnet *", "struct mbuf *"); int -mac_ifnet_check_transmit(struct ifnet *ifp, struct mbuf *m) +mac_ifnet_check_transmit_impl(struct ifnet *ifp, struct mbuf *m) { struct label *label; int error, locked; M_ASSERTPKTHDR(m); - if (mac_policy_count == 0) - return (0); - label = mac_mbuf_to_label(m); MAC_IFNET_LOCK(ifp, locked); From owner-dev-commits-src-all@freebsd.org Tue Jun 29 17:20:22 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1077164F317; Tue, 29 Jun 2021 17:20:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDrpF6nqJz3Pcl; Tue, 29 Jun 2021 17:20: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 CDAAC1CDCA; Tue, 29 Jun 2021 17:20:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15THKL1b062255; Tue, 29 Jun 2021 17:20:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15THKLZM062245; Tue, 29 Jun 2021 17:20:21 GMT (envelope-from git) Date: Tue, 29 Jun 2021 17:20:21 GMT Message-Id: <202106291720.15THKLZM062245@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 615f22b2fb6d - main - Add a link to the Elf_Brandinfo into the struc proc. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 615f22b2fb6d999005473abcb771c6bf25118dfe Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 17:20:22 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=615f22b2fb6d999005473abcb771c6bf25118dfe commit 615f22b2fb6d999005473abcb771c6bf25118dfe Author: Dmitry Chagin AuthorDate: 2021-06-29 17:15:08 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-29 17:15:08 +0000 Add a link to the Elf_Brandinfo into the struc proc. To allow the ABI to make a dicision based on the Brandinfo add a link to the Elf_Brandinfo into the struct proc. Add a note that the high 8 bits of Elf_Brandinfo flags is private to the ABI. Note to MFC: it breaks KBI. Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D30918 MFC after: 2 weeks --- sys/kern/imgact_elf.c | 1 + sys/kern/kern_exec.c | 4 ++++ sys/kern/kern_thread.c | 4 ++-- sys/sys/imgact_elf.h | 1 + sys/sys/proc.h | 2 ++ 5 files changed, 10 insertions(+), 2 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 8c56660b1fe4..98ce5460e360 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1246,6 +1246,7 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) map = &vmspace->vm_map; imgp->proc->p_sysent = sv; + imgp->proc->p_elf_brandinfo = brand_info; maxv = vm_map_max(map) - lim_max(td, RLIMIT_STACK); if (et_dyn_addr == ET_DYN_ADDR_RAND) { diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index b091d6061616..aff030cd432e 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -397,6 +397,7 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p, #endif int error, i, orig_osrel; uint32_t orig_fctl0; + Elf_Brandinfo *orig_brandinfo; static const char fexecv_proc_title[] = "(fexecv)"; imgp = &image_params; @@ -427,6 +428,7 @@ do_execve(struct thread *td, struct image_args *args, struct mac *mac_p, oldcred = p->p_ucred; orig_osrel = p->p_osrel; orig_fctl0 = p->p_fctl0; + orig_brandinfo = p->p_elf_brandinfo; #ifdef MAC error = mac_execve_enter(imgp, mac_p); @@ -499,6 +501,7 @@ interpret: imgp->proc->p_osrel = 0; imgp->proc->p_fctl0 = 0; + imgp->proc->p_elf_brandinfo = NULL; /* * Implement image setuid/setgid. @@ -894,6 +897,7 @@ exec_fail_dealloc: if (error != 0) { p->p_osrel = orig_osrel; p->p_fctl0 = orig_fctl0; + p->p_elf_brandinfo = orig_brandinfo; } if (imgp->firstpage != NULL) diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 949095a4d34e..3afcf2d3f0ef 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -100,7 +100,7 @@ _Static_assert(offsetof(struct proc, p_filemon) == 0x3b8, "struct proc KBI p_filemon"); _Static_assert(offsetof(struct proc, p_comm) == 0x3d0, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x4b0, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x4b8, "struct proc KBI p_emuldata"); #endif #ifdef __i386__ @@ -120,7 +120,7 @@ _Static_assert(offsetof(struct proc, p_filemon) == 0x268, "struct proc KBI p_filemon"); _Static_assert(offsetof(struct proc, p_comm) == 0x27c, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x308, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x30c, "struct proc KBI p_emuldata"); #endif diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h index 44a860359a75..97383c6eeeb8 100644 --- a/sys/sys/imgact_elf.h +++ b/sys/sys/imgact_elf.h @@ -91,6 +91,7 @@ typedef struct { Elf_Brandnote *brand_note; boolean_t (*header_supported)(struct image_params *, int32_t *, uint32_t *); + /* High 8 bits of flags is private to the ABI */ #define BI_CAN_EXEC_DYN 0x0001 #define BI_BRAND_NOTE 0x0002 /* May have note.ABI-tag section. */ #define BI_BRAND_NOTE_MANDATORY 0x0004 /* Must have note.ABI-tag section. */ diff --git a/sys/sys/proc.h b/sys/sys/proc.h index ef27691ae4cd..36c07b3b5e78 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -702,6 +702,8 @@ struct proc { our subtree. */ uint16_t p_elf_machine; /* (x) ELF machine type */ uint64_t p_elf_flags; /* (x) ELF flags */ + void *p_elf_brandinfo; /* (x) Elf_Brandinfo, NULL for + non ELF binaries. */ /* End area that is copied on creation. */ #define p_endcopy p_xexit From owner-dev-commits-src-all@freebsd.org Tue Jun 29 17:20:24 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F99764F319; Tue, 29 Jun 2021 17: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 4GDrpJ1JGqz3PZB; Tue, 29 Jun 2021 17: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 157631CB59; Tue, 29 Jun 2021 17: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 15THKN1C062340; Tue, 29 Jun 2021 17:20:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15THKNZI062339; Tue, 29 Jun 2021 17:20:23 GMT (envelope-from git) Date: Tue, 29 Jun 2021 17:20:23 GMT Message-Id: <202106291720.15THKNZI062339@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 5d9f790191fe - main - Eliminate p_elf_machine from struct proc. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5d9f790191fe7cd003e92f8b0fa93571d885bf5e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 17:20:24 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=5d9f790191fe7cd003e92f8b0fa93571d885bf5e commit 5d9f790191fe7cd003e92f8b0fa93571d885bf5e Author: Dmitry Chagin AuthorDate: 2021-06-29 17:18:29 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-29 17:18:29 +0000 Eliminate p_elf_machine from struct proc. Instead of p_elf_machine use machine member of the Elf_Brandinfo which is now cached in the struct proc at p_elf_brandinfo member. Note to MFC: D30918, KBI Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D30926 MFC after: 2 weeks --- sys/kern/imgact_elf.c | 5 +++-- sys/kern/kern_thread.c | 2 +- sys/sys/proc.h | 1 - 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index 98ce5460e360..42d922e9f002 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1333,7 +1333,6 @@ __CONCAT(exec_, __elfN(imgact))(struct image_params *imgp) imgp->reloc_base = addr; imgp->proc->p_osrel = osrel; imgp->proc->p_fctl0 = fctl0; - imgp->proc->p_elf_machine = hdr->e_machine; imgp->proc->p_elf_flags = hdr->e_flags; ret: @@ -1806,8 +1805,10 @@ __elfN(puthdr)(struct thread *td, void *hdr, size_t hdrsize, int numsegs, Elf_Phdr *phdr; Elf_Shdr *shdr; struct phdr_closure phc; + Elf_Brandinfo *bi; ehdr = (Elf_Ehdr *)hdr; + bi = td->td_proc->p_elf_brandinfo; ehdr->e_ident[EI_MAG0] = ELFMAG0; ehdr->e_ident[EI_MAG1] = ELFMAG1; @@ -1820,7 +1821,7 @@ __elfN(puthdr)(struct thread *td, void *hdr, size_t hdrsize, int numsegs, ehdr->e_ident[EI_ABIVERSION] = 0; ehdr->e_ident[EI_PAD] = 0; ehdr->e_type = ET_CORE; - ehdr->e_machine = td->td_proc->p_elf_machine; + ehdr->e_machine = bi->machine; ehdr->e_version = EV_CURRENT; ehdr->e_entry = 0; ehdr->e_phoff = sizeof(Elf_Ehdr); diff --git a/sys/kern/kern_thread.c b/sys/kern/kern_thread.c index 3afcf2d3f0ef..7d971d295cba 100644 --- a/sys/kern/kern_thread.c +++ b/sys/kern/kern_thread.c @@ -120,7 +120,7 @@ _Static_assert(offsetof(struct proc, p_filemon) == 0x268, "struct proc KBI p_filemon"); _Static_assert(offsetof(struct proc, p_comm) == 0x27c, "struct proc KBI p_comm"); -_Static_assert(offsetof(struct proc, p_emuldata) == 0x30c, +_Static_assert(offsetof(struct proc, p_emuldata) == 0x308, "struct proc KBI p_emuldata"); #endif diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 36c07b3b5e78..19e8d76c6f99 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -700,7 +700,6 @@ struct proc { pid_t p_reapsubtree; /* (e) Pid of the direct child of the reaper which spawned our subtree. */ - uint16_t p_elf_machine; /* (x) ELF machine type */ uint64_t p_elf_flags; /* (x) ELF flags */ void *p_elf_brandinfo; /* (x) Elf_Brandinfo, NULL for non ELF binaries. */ From owner-dev-commits-src-all@freebsd.org Tue Jun 29 17:20:23 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 15D2664F53B; Tue, 29 Jun 2021 17:20: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 4GDrpH000hz3PTG; Tue, 29 Jun 2021 17:20: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 DD11C1CE51; Tue, 29 Jun 2021 17:20: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 15THKMM6062316; Tue, 29 Jun 2021 17:20:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15THKM1D062315; Tue, 29 Jun 2021 17:20:22 GMT (envelope-from git) Date: Tue, 29 Jun 2021 17:20:22 GMT Message-Id: <202106291720.15THKM1D062315@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 945accf502db - main - LinuxKPI: Use the proper API to determine the ABI of the running process. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 945accf502db0dd44522489857f461e29ef17d30 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 17:20:23 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=945accf502db0dd44522489857f461e29ef17d30 commit 945accf502db0dd44522489857f461e29ef17d30 Author: Dmitry Chagin AuthorDate: 2021-06-29 17:17:16 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-29 17:17:16 +0000 LinuxKPI: Use the proper API to determine the ABI of the running process. Reviewed by: markj, hselasky, kib Differential Revision: https://reviews.freebsd.org/D30924 MFC after: 2 weeks --- sys/compat/linuxkpi/common/src/linux_compat.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 217c4081c603..4e949cdb91c4 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -964,7 +965,7 @@ linux_file_ioctl_sub(struct file *fp, struct linux_file *filp, data = *(void **)data; } #if defined(__amd64__) - if (td->td_proc->p_elf_machine == EM_386) { + if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) { /* try the compat IOCTL handler first */ if (fop->compat_ioctl != NULL) { error = -OPW(fp, td, fop->compat_ioctl(filp, From owner-dev-commits-src-all@freebsd.org Tue Jun 29 17:20:25 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A83FA64F603; Tue, 29 Jun 2021 17:20: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 4GDrpK2kR8z3Pqm; Tue, 29 Jun 2021 17:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 310721CDCB; Tue, 29 Jun 2021 17:20:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15THKPZE062364; Tue, 29 Jun 2021 17:20:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15THKP09062363; Tue, 29 Jun 2021 17:20:25 GMT (envelope-from git) Date: Tue, 29 Jun 2021 17:20:25 GMT Message-Id: <202106291720.15THKP09062363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 1fd26da926d5 - main - LinuxKPI: Put compat code under appropriate condition. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1fd26da926d55bc0923b1218af65720dfaa4ca28 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 17:20:25 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=1fd26da926d55bc0923b1218af65720dfaa4ca28 commit 1fd26da926d55bc0923b1218af65720dfaa4ca28 Author: Dmitry Chagin AuthorDate: 2021-06-29 17:19:17 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-29 17:19:17 +0000 LinuxKPI: Put compat code under appropriate condition. Reviewed by: hselasky, emaste, kib Differential Revision: https://reviews.freebsd.org/D30927 MFC after: 2 weeks --- sys/compat/linuxkpi/common/src/linux_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 4e949cdb91c4..3e1b2e517141 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -964,7 +964,7 @@ linux_file_ioctl_sub(struct file *fp, struct linux_file *filp, /* fetch user-space pointer */ data = *(void **)data; } -#if defined(__amd64__) +#ifdef COMPAT_FREEBSD32 if (SV_PROC_FLAG(td->td_proc, SV_ILP32)) { /* try the compat IOCTL handler first */ if (fop->compat_ioctl != NULL) { From owner-dev-commits-src-all@freebsd.org Tue Jun 29 17:20:27 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0B8E564F605; Tue, 29 Jun 2021 17:20:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDrpL40M3z3Pt3; Tue, 29 Jun 2021 17:20:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 57E8F1CDCC; Tue, 29 Jun 2021 17:20:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15THKQV1062388; Tue, 29 Jun 2021 17:20:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15THKQZB062387; Tue, 29 Jun 2021 17:20:26 GMT (envelope-from git) Date: Tue, 29 Jun 2021 17:20:26 GMT Message-Id: <202106291720.15THKQZB062387@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Chagin Subject: git: 5ca9d4170007 - main - LinuxKPI: Rename a short description of the kmalloc type. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dchagin X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5ca9d41700078aa0757ee49aafbdd8f52fc96aae Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 17:20:27 -0000 The branch main has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=5ca9d41700078aa0757ee49aafbdd8f52fc96aae commit 5ca9d41700078aa0757ee49aafbdd8f52fc96aae Author: Dmitry Chagin AuthorDate: 2021-06-29 17:20:01 +0000 Commit: Dmitry Chagin CommitDate: 2021-06-29 17:20:01 +0000 LinuxKPI: Rename a short description of the kmalloc type. To avoid duplication in the vmstat -m output rename the kmalloc type short description to 'lkpikmalloc' as the Linux emulation layer historically names its linux malloc type as 'linux'. Reviewed by: hselasky, kib, emaste Differential Revision: https://reviews.freebsd.org/D30928 MFC after: 2 weeks --- sys/compat/linuxkpi/common/src/linux_compat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_compat.c b/sys/compat/linuxkpi/common/src/linux_compat.c index 3e1b2e517141..7ea33c9a0d8d 100644 --- a/sys/compat/linuxkpi/common/src/linux_compat.c +++ b/sys/compat/linuxkpi/common/src/linux_compat.c @@ -108,7 +108,7 @@ static int lkpi_net_maxpps = 99; SYSCTL_INT(_compat_linuxkpi, OID_AUTO, net_ratelimit, CTLFLAG_RWTUN, &lkpi_net_maxpps, 0, "Limit number of LinuxKPI net messages per second."); -MALLOC_DEFINE(M_KMALLOC, "linux", "Linux kmalloc compat"); +MALLOC_DEFINE(M_KMALLOC, "lkpikmalloc", "Linux kmalloc compat"); #include /* Undo Linux compat changes. */ From owner-dev-commits-src-all@freebsd.org Tue Jun 29 18:01:23 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 56012650353; Tue, 29 Jun 2021 18:01: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 4GDsjb22JMz3hVq; Tue, 29 Jun 2021 18:01: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 2452E1DA33; Tue, 29 Jun 2021 18:01: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 15TI1NgH016732; Tue, 29 Jun 2021 18:01:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TI1NfL016731; Tue, 29 Jun 2021 18:01:23 GMT (envelope-from git) Date: Tue, 29 Jun 2021 18:01:23 GMT Message-Id: <202106291801.15TI1NfL016731@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: a9f5512f072d - main - portsnap: Shorten 'Skipping' output lines MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a9f5512f072d1b4e7a6bd8c3418df1213131efb1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 18:01:23 -0000 The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=a9f5512f072d1b4e7a6bd8c3418df1213131efb1 commit a9f5512f072d1b4e7a6bd8c3418df1213131efb1 Author: Colin Percival AuthorDate: 2021-06-29 17:45:46 +0000 Commit: Colin Percival CommitDate: 2021-06-29 18:00:54 +0000 portsnap: Shorten 'Skipping' output lines Portsnap uses patches opportunistically to reduce download bandwidth: It attempts to fetch patches which could be useful, and then makes use of whichever patches it actually gets. (This solves the otherwise O(n^2) issue for the server to build patches between every pair of versions.) During the process of applying patches, portsnap prints lines of the form "Skipping XXX-YYY (123 of 4567).\r", where the \r serves to allow each of these (potentially many) lines to overwrite the previous one on the console. Unfortunately, XXX and YYY here are SHA256 hashes, resulting in these lines wrapping on reasonable-width consoles. Replace the hashes with abbreviations of the form "0123...cdef" (cutting 64 characters down to 11) in order to keep lines to a reasonable length. The rather ugly shell code here is used to avoid forking additional processes; it would be much cleaner using sed(1), but in my testing the sed-based alternative increases CPU time consumption by 50%. Requested by: des --- usr.sbin/portsnap/portsnap/portsnap.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr.sbin/portsnap/portsnap/portsnap.sh b/usr.sbin/portsnap/portsnap/portsnap.sh index 9db381e99f86..2edc51460642 100644 --- a/usr.sbin/portsnap/portsnap/portsnap.sh +++ b/usr.sbin/portsnap/portsnap/portsnap.sh @@ -838,6 +838,11 @@ fetch_update() { I=$(($I + 1)) F="${X}-${Y}" if [ ! -f "${F}" ]; then + XS=${X%[0-9a-f][0-9a-f][0-9a-f][0-9a-f]} + XE=${X#[0-9a-f][0-9a-f][0-9a-f][0-9a-f]} + YS=${Y%[0-9a-f][0-9a-f][0-9a-f][0-9a-f]} + YE=${Y#[0-9a-f][0-9a-f][0-9a-f][0-9a-f]} + F="${X%${XE}}...${X#${XS}}-${Y%${YE}}...${Y#${YS}}" printf " Skipping ${F} (${I} of ${PATCHCNT}).\r" continue; fi From owner-dev-commits-src-all@freebsd.org Tue Jun 29 18:01:24 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 880E264FE59; Tue, 29 Jun 2021 18:01: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 4GDsjc2SwTz3hYN; Tue, 29 Jun 2021 18:01: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 3AFF31D8B1; Tue, 29 Jun 2021 18:01: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 15TI1OL4016756; Tue, 29 Jun 2021 18:01:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TI1OkP016755; Tue, 29 Jun 2021 18:01:24 GMT (envelope-from git) Date: Tue, 29 Jun 2021 18:01:24 GMT Message-Id: <202106291801.15TI1OkP016755@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 2ef5995f49c9 - main - portsnap: Remove superfluous semicolons MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ef5995f49c9558ddad4d50810d4528b79afff4a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 18:01:24 -0000 The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=2ef5995f49c9558ddad4d50810d4528b79afff4a commit 2ef5995f49c9558ddad4d50810d4528b79afff4a Author: Colin Percival AuthorDate: 2021-06-29 17:59:59 +0000 Commit: Colin Percival CommitDate: 2021-06-29 18:00:54 +0000 portsnap: Remove superfluous semicolons Submitted by: des --- usr.sbin/portsnap/portsnap/portsnap.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/usr.sbin/portsnap/portsnap/portsnap.sh b/usr.sbin/portsnap/portsnap/portsnap.sh index 2edc51460642..ad40e3c9c95c 100644 --- a/usr.sbin/portsnap/portsnap/portsnap.sh +++ b/usr.sbin/portsnap/portsnap/portsnap.sh @@ -411,7 +411,7 @@ fetch_pick_server() { SRV_PRIORITY=`cut -f 1 -d ' ' serverlist | sort -n | head -1` # Add up the weights of the response lines at that priority level. - SRV_WSUM=0; + SRV_WSUM=0 while read X; do case "$X" in ${SRV_PRIORITY}\ *) @@ -771,7 +771,7 @@ fetch_update() { cut -f 2 -d '|' /dev/stdin patchlist | while read Y; do if [ ! -f "files/${Y}.gz" ]; then - echo ${Y}; + echo ${Y} fi done > filelist echo -n "Fetching `wc -l < filelist | tr -d ' '` " @@ -844,7 +844,7 @@ fetch_update() { YE=${Y#[0-9a-f][0-9a-f][0-9a-f][0-9a-f]} F="${X%${XE}}...${X#${XS}}-${Y%${YE}}...${Y#${YS}}" printf " Skipping ${F} (${I} of ${PATCHCNT}).\r" - continue; + continue fi echo " Processing ${F}..." 1>${QUIETREDIR} gunzip -c < files/${X}.gz > OLD @@ -863,7 +863,7 @@ fetch_update() { cut -f 2 -d '|' /dev/stdin patchlist | while read Y; do if [ ! -f "files/${Y}.gz" ]; then - echo ${Y}; + echo ${Y} fi done > filelist echo -n "Fetching `wc -l < filelist | tr -d ' '` " @@ -990,7 +990,7 @@ extract_run() { return 1 fi if [ ! -z "${EXTRACTPATH}" ]; then - return 0; + return 0 fi IFS="$oldifs" From owner-dev-commits-src-all@freebsd.org Tue Jun 29 19:58:56 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue Jun 29 19:59:16 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue Jun 29 19:59:21 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue Jun 29 20:24:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue Jun 29 20:24:02 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue Jun 29 20:24:03 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue Jun 29 20:24:06 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue Jun 29 20:24:05 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue Jun 29 20:24:06 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue Jun 29 20:24:23 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 20:24:23 -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-all@freebsd.org Tue Jun 29 20:24:25 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue Jun 29 20:24:26 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue Jun 29 20:24:31 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 20:24:32 -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-all@freebsd.org Tue Jun 29 20:24:31 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 20:24:33 -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-all@freebsd.org Tue Jun 29 20:24:34 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue Jun 29 20:24:33 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 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-all@freebsd.org Tue Jun 29 21:29:38 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 232E565317E; Tue, 29 Jun 2021 21:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GDyKt0SDrz4WPL; Tue, 29 Jun 2021 21:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id EBDCA20904; Tue, 29 Jun 2021 21:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15TLTb07087765; Tue, 29 Jun 2021 21:29:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TLTbrR087764; Tue, 29 Jun 2021 21:29:37 GMT (envelope-from git) Date: Tue, 29 Jun 2021 21:29:37 GMT Message-Id: <202106292129.15TLTbrR087764@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chuck Silvers Subject: git: ed1a156b038d - main - fsck_ffs: don't try to write in read-only mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: chs X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ed1a156b038dee0e7a02c2935186ad5d8f4c36c1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 21:29:38 -0000 The branch main has been updated by chs: URL: https://cgit.FreeBSD.org/src/commit/?id=ed1a156b038dee0e7a02c2935186ad5d8f4c36c1 commit ed1a156b038dee0e7a02c2935186ad5d8f4c36c1 Author: Chuck Silvers AuthorDate: 2021-06-29 21:29:15 +0000 Commit: Chuck Silvers CommitDate: 2021-06-29 21:29:15 +0000 fsck_ffs: don't try to write in read-only mode Skip trying to change fs_mtime for SU+J if we are running read-only. Reviewed by: mckusick Sponsored by: Netflix --- sbin/fsck_ffs/main.c | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/sbin/fsck_ffs/main.c b/sbin/fsck_ffs/main.c index 67aff2dde73c..edda3d785f09 100644 --- a/sbin/fsck_ffs/main.c +++ b/sbin/fsck_ffs/main.c @@ -441,17 +441,19 @@ checkfilesys(char *filesys) sujrecovery = 0; printf("** Skipping journal, falling through to full fsck\n\n"); } - /* - * Write the superblock so we don't try to recover the - * journal on another pass. If this is the only change - * to the filesystem, we do not want it to be called - * out as modified. - */ - sblock.fs_mtime = time(NULL); - sbdirty(); - ofsmodified = fsmodified; - flush(fswritefd, &sblk); - fsmodified = ofsmodified; + if (fswritefd != -1) { + /* + * Write the superblock so we don't try to recover the + * journal on another pass. If this is the only change + * to the filesystem, we do not want it to be called + * out as modified. + */ + sblock.fs_mtime = time(NULL); + sbdirty(); + ofsmodified = fsmodified; + flush(fswritefd, &sblk); + fsmodified = ofsmodified; + } } /* * If the filesystem was run on an old kernel that did not From owner-dev-commits-src-all@freebsd.org Tue Jun 29 23:41:19 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DD54D65686E; Tue, 29 Jun 2021 23:41: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 4GF1Fq5zS1z4j5F; Tue, 29 Jun 2021 23:41: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 B584F21DE9; Tue, 29 Jun 2021 23:41: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 15TNfJG4067722; Tue, 29 Jun 2021 23:41:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TNfJV5067721; Tue, 29 Jun 2021 23:41:19 GMT (envelope-from git) Date: Tue, 29 Jun 2021 23:41:19 GMT Message-Id: <202106292341.15TNfJV5067721@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 849dcdb1c0c5 - main - Change strmode argument type to mode_t MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 849dcdb1c0c50b13f97d67c912f0edac82688281 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 23:41:19 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=849dcdb1c0c50b13f97d67c912f0edac82688281 commit 849dcdb1c0c50b13f97d67c912f0edac82688281 Author: Alfonso Gregory AuthorDate: 2021-06-25 15:35:14 +0000 Commit: Warner Losh CommitDate: 2021-06-29 23:38:45 +0000 Change strmode argument type to mode_t Finally, we have the correct function definition for strmode. NetBSD/OpenBSD did this many years ago. This code is weird sign extension safe. Reviewed by: imp@ Pull Request: https://github.com/freebsd/freebsd-src/pull/493 --- include/string.h | 8 +++++++- lib/libc/string/strmode.c | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/include/string.h b/include/string.h index 774cf5fe9756..540258cfcf4f 100644 --- a/include/string.h +++ b/include/string.h @@ -96,7 +96,13 @@ size_t strlcpy(char * __restrict, const char * __restrict, size_t); #endif size_t strlen(const char *) __pure; #if __BSD_VISIBLE -void strmode(int, char *); + +#ifndef _MODE_T_DECLARED +typedef __mode_t mode_t; +#define _MODE_T_DECLARED +#endif + +void strmode(mode_t, char *); #endif char *strncat(char * __restrict, const char * __restrict, size_t); int strncmp(const char *, const char *, size_t) __pure; diff --git a/lib/libc/string/strmode.c b/lib/libc/string/strmode.c index 50016be21ea1..d601bd0430e1 100644 --- a/lib/libc/string/strmode.c +++ b/lib/libc/string/strmode.c @@ -40,7 +40,7 @@ __FBSDID("$FreeBSD$"); #include void -strmode(/* mode_t */ int mode, char *p) +strmode(mode_t mode, char *p) { /* print type */ switch (mode & S_IFMT) { From owner-dev-commits-src-all@freebsd.org Tue Jun 29 23:41:21 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 600026569B2; Tue, 29 Jun 2021 23:41: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 4GF1Fs07vKz4j7L; Tue, 29 Jun 2021 23:41: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 CF350220C8; Tue, 29 Jun 2021 23:41: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 15TNfKYE067748; Tue, 29 Jun 2021 23:41:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TNfK5F067747; Tue, 29 Jun 2021 23:41:20 GMT (envelope-from git) Date: Tue, 29 Jun 2021 23:41:20 GMT Message-Id: <202106292341.15TNfK5F067747@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 0d9e8c286df6 - main - Change strmode argument type to mode_t for crossbuild MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0d9e8c286df6cdda1fe53baf3339f0db7acdaafd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 23:41:21 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0d9e8c286df6cdda1fe53baf3339f0db7acdaafd commit 0d9e8c286df6cdda1fe53baf3339f0db7acdaafd Author: Alfonso Gregory AuthorDate: 2021-06-25 15:30:57 +0000 Commit: Warner Losh CommitDate: 2021-06-29 23:39:55 +0000 Change strmode argument type to mode_t for crossbuild To match the libc changes. Reviewed by: imp@ Pull Request: https://github.com/freebsd/freebsd-src/pull/493 --- tools/build/cross-build/include/linux/string.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build/cross-build/include/linux/string.h b/tools/build/cross-build/include/linux/string.h index 485cc2b680b5..1d173974a5bd 100644 --- a/tools/build/cross-build/include/linux/string.h +++ b/tools/build/cross-build/include/linux/string.h @@ -52,7 +52,7 @@ __BEGIN_DECLS size_t strlcpy(char *dst, const char *src, size_t siz); size_t strlcat(char *dst, const char *src, size_t siz); char *strnstr(const char *str, const char *find, size_t str_len); -void strmode(/* mode_t*/ int mode, char *str); +void strmode(mode_t mode, char *str); #if !defined(__GLIBC__) || \ (defined(__GLIBC__) && (!__GLIBC_PREREQ(2, 25) || !defined(_GNU_SOURCE))) From owner-dev-commits-src-all@freebsd.org Tue Jun 29 23:52:39 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 94A8F657138; Tue, 29 Jun 2021 23:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GF1Vv3jfbz4k3l; Tue, 29 Jun 2021 23:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6882C2264E; Tue, 29 Jun 2021 23:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15TNqd80084827; Tue, 29 Jun 2021 23:52:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15TNqdmX084826; Tue, 29 Jun 2021 23:52:39 GMT (envelope-from git) Date: Tue, 29 Jun 2021 23:52:39 GMT Message-Id: <202106292352.15TNqdmX084826@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: a00d703f2f43 - main - top(1): support command name and argument grepping MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a00d703f2f438b199d3933d19d535540586b7792 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2021 23:52:39 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a00d703f2f438b199d3933d19d535540586b7792 commit a00d703f2f438b199d3933d19d535540586b7792 Author: John Grafton AuthorDate: 2021-06-16 19:40:21 +0000 Commit: Warner Losh CommitDate: 2021-06-29 23:51:18 +0000 top(1): support command name and argument grepping Obtained from: OpenBSD Reviewed by: imp@ Pull Request: https://github.com/freebsd/freebsd-src/pull/479 --- usr.bin/top/commands.c | 1 + usr.bin/top/commands.h | 1 + usr.bin/top/machine.c | 35 +++++++++++++++++++++++++++++++++++ usr.bin/top/machine.h | 2 +- usr.bin/top/top.1 | 5 +++++ usr.bin/top/top.c | 15 +++++++++++++++ usr.bin/top/top.h | 2 ++ 7 files changed, 60 insertions(+), 1 deletion(-) diff --git a/usr.bin/top/commands.c b/usr.bin/top/commands.c index 88f4b0867d47..9efc693020ba 100644 --- a/usr.bin/top/commands.c +++ b/usr.bin/top/commands.c @@ -59,6 +59,7 @@ const struct command all_commands[] = {'H', "toggle the displaying of threads", false, CMD_thrtog}, {'h', "show this help text", true, CMD_help}, {'?', NULL, true, CMD_help}, + {'/', "filter on command name (+ selects all commands)", false, CMD_grep}, {'i', "toggle the displaying of idle processes", false, CMD_idletog}, {'I', NULL, false, CMD_idletog}, {'j', "toggle the displaying of jail ID", false, CMD_jidtog}, diff --git a/usr.bin/top/commands.h b/usr.bin/top/commands.h index 0071fbe62fc6..863effd2ddd9 100644 --- a/usr.bin/top/commands.h +++ b/usr.bin/top/commands.h @@ -24,6 +24,7 @@ enum cmd_id { CMD_update, CMD_quit, CMD_help, + CMD_grep, CMD_errors, CMD_number, CMD_delay, diff --git a/usr.bin/top/machine.c b/usr.bin/top/machine.c index c7b3e13c700b..1fe2a91a655c 100644 --- a/usr.bin/top/machine.c +++ b/usr.bin/top/machine.c @@ -224,6 +224,7 @@ static void getsysctl(const char *name, void *ptr, size_t len); static int swapmode(int *retavail, int *retfree); static void update_layout(void); static int find_uid(uid_t needle, int *haystack); +static int cmd_matches(struct kinfo_proc *, const char *); static int find_uid(uid_t needle, int *haystack) @@ -869,6 +870,10 @@ get_process_info(struct system_info *si, struct process_select *sel, if (sel->pid != -1 && pp->ki_pid != sel->pid) continue; + if (!cmd_matches(pp, sel->command)) + /* skip proc. that doesn't match grep string */ + continue; + *prefp++ = pp; active_procs++; } @@ -887,6 +892,36 @@ get_process_info(struct system_info *si, struct process_select *sel, return (&handle); } +static int +cmd_matches(struct kinfo_proc *proc, const char *term) +{ + extern int show_args; + char **args = NULL; + + if (!term) { + /* No command filter set */ + return 1; + } else { + /* Filter set, does process name contain term? */ + if (strstr(proc->ki_comm, term)) + return 1; + /* Search arguments only if arguments are displayed */ + if (show_args) { + args = kvm_getargv(kd, proc, 1024); + if (args == NULL) { + /* Failed to get arguments so can't search them */ + return 0; + } + while (*args != NULL) { + if (strstr(*args, term)) + return 1; + args++; + } + } + } + return 0; +} + char * format_next_process(struct handle * xhandle, char *(*get_userid)(int), int flags) { diff --git a/usr.bin/top/machine.h b/usr.bin/top/machine.h index c2616e9052e3..af66eaead76b 100644 --- a/usr.bin/top/machine.h +++ b/usr.bin/top/machine.h @@ -75,7 +75,7 @@ struct process_select bool swap; /* show swap usage */ bool kidle; /* show per-CPU idle threads */ int pid; /* only this pid (unless pid == -1) */ - const char *command; /* only this command (unless == NULL) */ + char *command; /* only this command (unless == NULL) */ }; /* routines defined by the machine dependent module */ diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index 03301b2f89fc..42282bebdafe 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -243,6 +243,11 @@ Remember that the next display counts as one, so typing will make .Nm show one final display and then immediately exit. +.It / +Display only processes that contain the specified string in their +command name. +If displaying arguments is enabled, the arguments are searched +too. '+' shows all processes. .It m Toggle the display between 'cpu' and 'io' modes. .It n or # diff --git a/usr.bin/top/top.c b/usr.bin/top/top.c index 9853ecf914b0..4fbf11b50299 100644 --- a/usr.bin/top/top.c +++ b/usr.bin/top/top.c @@ -53,6 +53,7 @@ typedef void sigret_t; static char stdoutbuf[Buffersize]; static int fmt_flags = 0; +int show_args = false; int pcpu_stats = false; /* signal handling routines */ @@ -907,6 +908,19 @@ restart: } break; + case CMD_grep: /* grep command name */ + new_message(MT_standout, + "Grep command name: "); + if (readline(tempbuf1, sizeof(tempbuf1), false) > 0) { + free(ps.command); + if (tempbuf1[0] == '+' && tempbuf1[1] == '\0') { + ps.command = NULL; + } else if ((ps.command = strdup(tempbuf1)) == NULL) + quit(1); + } + clear_message(); + break; + case CMD_displays: /* change display count */ new_message(MT_standout, "Displays to show (currently %s): ", @@ -1025,6 +1039,7 @@ restart: break; case CMD_showargs: fmt_flags ^= FMT_SHOWARGS; + show_args = fmt_flags & FMT_SHOWARGS; new_message(MT_standout | MT_delayed, " %sisplaying process arguments.", fmt_flags & FMT_SHOWARGS ? "D" : "Not d"); diff --git a/usr.bin/top/top.h b/usr.bin/top/top.h index 7ec2d7f2c199..2f31d5812ee4 100644 --- a/usr.bin/top/top.h +++ b/usr.bin/top/top.h @@ -37,6 +37,8 @@ extern pid_t mypid; extern int (*compares[])(const void*, const void*); +extern int show_args; + const char* kill_procs(char *); const char* renice_procs(char *); From owner-dev-commits-src-all@freebsd.org Wed Jun 30 01:19:57 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 05:08:12 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 05:08:14 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 05:08:13 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 06:00:55 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 702D165B3A7 for ; Wed, 30 Jun 2021 06:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GF9gq2Nrqz4SMl; Wed, 30 Jun 2021 06:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A5FF26BFA; Wed, 30 Jun 2021 06:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15U60tgu073579; Wed, 30 Jun 2021 06:00:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U60tcP073578; Wed, 30 Jun 2021 06:00:55 GMT (envelope-from git) Date: Wed, 30 Jun 2021 06:00:55 GMT Message-Id: <202106300600.15U60tcP073578@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: 5e2c8338bf17..4694131a0a05 - vendor/openzfs/master - vendor branch updated MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openzfs/master X-Git-Reftype: branch X-Git-Commit: 4694131a0a05b6db2727c9801f9729b9378d3064 X-Git-Oldrev: 5e2c8338bf17d31b44eb1dbbb3c9b6a0f64e96ee X-Git-Newrev: 4694131a0a05b6db2727c9801f9729b9378d3064 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 06:00:55 -0000 The branch vendor/openzfs/master has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=5e2c8338bf17..4694131a0a05 2084e9f7483a Fix build with KASAN f20fb199e607 Fix plymouth passphrase prompt with dracut 5b7053a9a5a6 Avoid 64bit division in multilist index functions 6a19dea7f68e module/zfs: simplify ddt_stat_add() loop 3482c2b79ae0 zed: fix sending emails (#12292) 4694131a0a05 Linux 5.13 compat: META From owner-dev-commits-src-all@freebsd.org Wed Jun 30 06:01:27 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 964CE65B0AB for ; Wed, 30 Jun 2021 06:01:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GF9hR3vfvz4SXy; Wed, 30 Jun 2021 06:01:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 6EF9727626; Wed, 30 Jun 2021 06:01:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15U61RPu074646; Wed, 30 Jun 2021 06:01:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U61Rfa074633; Wed, 30 Jun 2021 06:01:27 GMT (envelope-from git) Date: Wed, 30 Jun 2021 06:01:27 GMT Message-Id: <202106300601.15U61Rfa074633@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Martin Matuska Subject: git: aee26af277c9..508fff0e4b06 - vendor/openzfs/zfs-2.1-release - vendor branch updated MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/vendor/openzfs/zfs-2.1-release X-Git-Reftype: branch X-Git-Commit: 508fff0e4b0653744fd6ae7857cc860e4d0d80af X-Git-Oldrev: aee26af277c91abeb0e1cfe27cc48cc328fdb881 X-Git-Newrev: 508fff0e4b0653744fd6ae7857cc860e4d0d80af Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 06:01:27 -0000 The branch vendor/openzfs/zfs-2.1-release has been updated by mm: URL: https://cgit.FreeBSD.org/src/log/?id=aee26af277c9..508fff0e4b06 da6c288dfc9c Help compiller optimize out abd_verify() 57ce66d293de Fix build with KASAN 4ebda5d4d32d Fix plymouth passphrase prompt with dracut ea478570908b Avoid 64bit division in multilist index functions 0584ad8f94f7 zed: fix sending emails (#12292) d3942963eeda Linux 5.13 compat: META 508fff0e4b06 Tag 2.1.0-rc8 From owner-dev-commits-src-all@freebsd.org Wed Jun 30 06:34:08 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BB8D565BAE0; Wed, 30 Jun 2021 06:34:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFBQ84dZ8z4VpT; Wed, 30 Jun 2021 06:34:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 87C7327E73; Wed, 30 Jun 2021 06:34:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15U6Y8W3016930; Wed, 30 Jun 2021 06:34:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U6Y8m8016927; Wed, 30 Jun 2021 06:34:08 GMT (envelope-from git) Date: Wed, 30 Jun 2021 06:34:08 GMT Message-Id: <202106300634.15U6Y8m8016927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: 2617128a21bf - main - zfs: merge openzfs/zfs@4694131a0 (master) into main MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2617128a21bfb1b1e3065e54d46f9982d37c0bf8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 06:34:08 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=2617128a21bfb1b1e3065e54d46f9982d37c0bf8 commit 2617128a21bfb1b1e3065e54d46f9982d37c0bf8 Merge: a00d703f2f43 4694131a0a05 Author: Martin Matuska AuthorDate: 2021-06-30 06:02:44 +0000 Commit: Martin Matuska CommitDate: 2021-06-30 06:02:44 +0000 zfs: merge openzfs/zfs@4694131a0 (master) into main Notable upstream pull request merges: #12253 module/zfs: simplify ddt_stat_add() loop #12288 Avoid 64bit division in multilist index functions Obtained from: OpenZFS OpenZFS commit: 4694131a0a05b6db2727c9801f9729b9378d3064 sys/contrib/openzfs/META | 2 +- 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/arc.c | 5 +++-- sys/contrib/openzfs/module/zfs/dbuf.c | 5 +++-- sys/contrib/openzfs/module/zfs/ddt.c | 4 ++-- 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 +++++++++++++++++++ 9 files changed, 46 insertions(+), 12 deletions(-) From owner-dev-commits-src-all@freebsd.org Wed Jun 30 06:35:16 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16B8E65BDAB; Wed, 30 Jun 2021 06:35: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 4GFBRS0BZvz4WKD; Wed, 30 Jun 2021 06:35: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 E3E8C27D1C; Wed, 30 Jun 2021 06:35:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15U6ZF5R017142; Wed, 30 Jun 2021 06:35:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U6ZF7s017141; Wed, 30 Jun 2021 06:35:15 GMT (envelope-from git) Date: Wed, 30 Jun 2021 06:35:15 GMT Message-Id: <202106300635.15U6ZF7s017141@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Matuska Subject: git: c0149d030023 - main - zfs: update zfs_config.h (missing in 2617128a2) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0149d030023a8e4f7c4d668e95ad413ea7ac9db Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 06:35:16 -0000 The branch main has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=c0149d030023a8e4f7c4d668e95ad413ea7ac9db commit c0149d030023a8e4f7c4d668e95ad413ea7ac9db Author: Martin Matuska AuthorDate: 2021-06-30 06:34:36 +0000 Commit: Martin Matuska CommitDate: 2021-06-30 06:34:36 +0000 zfs: update zfs_config.h (missing in 2617128a2) --- sys/modules/zfs/zfs_config.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/modules/zfs/zfs_config.h b/sys/modules/zfs/zfs_config.h index ae32a588b104..7983ac8959e7 100644 --- a/sys/modules/zfs/zfs_config.h +++ b/sys/modules/zfs/zfs_config.h @@ -734,7 +734,7 @@ /* #undef ZFS_IS_GPL_COMPATIBLE */ /* Define the project alias string. */ -#define ZFS_META_ALIAS "zfs-2.1.99-FreeBSD_g5e2c8338b" +#define ZFS_META_ALIAS "zfs-2.1.99-FreeBSD_g4694131a0" /* Define the project author. */ #define ZFS_META_AUTHOR "OpenZFS" @@ -743,7 +743,7 @@ /* #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" @@ -764,7 +764,7 @@ #define ZFS_META_NAME "zfs" /* Define the project release. */ -#define ZFS_META_RELEASE "FreeBSD_g5e2c8338b" +#define ZFS_META_RELEASE "FreeBSD_g4694131a0" /* Define the project version. */ #define ZFS_META_VERSION "2.1.99" From owner-dev-commits-src-all@freebsd.org Wed Jun 30 07:24:50 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 07:24:52 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 07:24:53 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 07:24:54 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 07:24:55 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 07:24:57 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 07:24:58 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 07:25:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 07:24:59 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 07:25:01 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 07:25:03 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 07:25:02 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 07:25:06 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 07:25:05 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 07:27:18 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 08:06:51 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4456165F9E4; Wed, 30 Jun 2021 08:06:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFDT71WRzz4htg; Wed, 30 Jun 2021 08:06: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 1C52FFAB; Wed, 30 Jun 2021 08:06: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 15U86pNO037943; Wed, 30 Jun 2021 08:06:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15U86pGq037942; Wed, 30 Jun 2021 08:06:51 GMT (envelope-from git) Date: Wed, 30 Jun 2021 08:06:51 GMT Message-Id: <202106300806.15U86pGq037942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Fernando Apestegu=C3=ADa?= Subject: git: 0a0f7486413c - main - man: Build manpages for all architectures MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: fernape X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0a0f7486413c147d56808b38055c40c64cff61f5 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 08:06:51 -0000 The branch main has been updated by fernape (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=0a0f7486413c147d56808b38055c40c64cff61f5 commit 0a0f7486413c147d56808b38055c40c64cff61f5 Author: Fernando Apesteguía AuthorDate: 2021-06-09 10:58:04 +0000 Commit: Fernando Apesteguía CommitDate: 2021-06-30 07:57:51 +0000 man: Build manpages for all architectures Building and installing architecture-specific man pages only raises a number of problems: * The https://www.freebsd.org/cgi/man.cgi is incomplete. As an example, it does not show results for pae(4). The reason for this is that the cgi interface runs on FreeBSD amd64. * In FreeBSD amd64 some manual pages have broken X-refs. See hptrr(4) for an example. * Also, we have broken links in our Release Notes. This is a consequence of the first point. See https://www.freebsd.org/releases/13.0R/hardware/#proc-i386. Make MAN_ARCH default to 'all' so we build all the man pages for all the architectures. The difference in disk space is negligible. Also link architecture-specific man pages to their own section while keeping their own namespace. PR: 212290 Reported by: mj@bsdops.com Approved by: ceri@, wosch@ MFC after: 4 weeks --- sbin/Makefile | 6 ++++++ share/man/man4/Makefile | 4 +--- share/man/man4/man4.aarch64/Makefile | 5 +++++ share/man/man4/man4.arm/Makefile | 5 +++++ share/man/man4/man4.i386/Makefile | 5 +++++ share/man/man4/man4.powerpc/Makefile | 5 +++++ share/man/man5/make.conf.5 | 2 +- usr.sbin/Makefile | 7 +++++++ usr.sbin/apm/Makefile | 4 ++++ 9 files changed, 39 insertions(+), 4 deletions(-) diff --git a/sbin/Makefile b/sbin/Makefile index 64840bae82bb..f53e2f037ebe 100644 --- a/sbin/Makefile +++ b/sbin/Makefile @@ -90,6 +90,12 @@ SUBDIR.${MK_ZFS}+= zfsbootcfg SUBDIR.${MK_TESTS}+= tests +# Add architecture-specific manpages +# to be included anyway +MAN= sconfig/sconfig.8 + +.include + .include SUBDIR_PARALLEL= diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 5051470edc71..9027fe7df841 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -895,9 +895,7 @@ _cgem.4= cgem.4 MLINKS+=cgem.4 if_cgem.4 .endif -.if empty(MAN_ARCH) -__arches= ${MACHINE} ${MACHINE_ARCH} ${MACHINE_CPUARCH} -.elif ${MAN_ARCH} == "all" +.if empty(MAN_ARCH) || ${MAN_ARCH} == "all" __arches= ${:!/bin/sh -c "/bin/ls -d ${.CURDIR}/man4.*"!:E} .else __arches= ${MAN_ARCH} diff --git a/share/man/man4/man4.aarch64/Makefile b/share/man/man4/man4.aarch64/Makefile index 6714a47011ef..ef5fcd84ccd4 100644 --- a/share/man/man4/man4.aarch64/Makefile +++ b/share/man/man4/man4.aarch64/Makefile @@ -17,6 +17,11 @@ MAN= \ rk_i2c.4 \ rk_pinctrl.4 \ +# Link files to the parent directory +.for _manpage in ${MAN} +MLINKS+=${_manpage} ../${_manpage} +.endfor + MANSUBDIR=/aarch64 .include diff --git a/share/man/man4/man4.arm/Makefile b/share/man/man4/man4.arm/Makefile index 0b3eec427934..2ac8dbb5fd81 100644 --- a/share/man/man4/man4.arm/Makefile +++ b/share/man/man4/man4.arm/Makefile @@ -18,6 +18,11 @@ MAN= \ MLINKS= imx_wdog.4 imxwdt.4 MLINKS+= mge.4 if_mge.4 +# Link files to the parent directory +.for _manpage in ${MAN} +MLINKS+=${_manpage} ../${_manpage} +.endfor + MANSUBDIR=/arm .include diff --git a/share/man/man4/man4.i386/Makefile b/share/man/man4/man4.i386/Makefile index a21b3cd6302b..e3d2e66ca78d 100644 --- a/share/man/man4/man4.i386/Makefile +++ b/share/man/man4/man4.i386/Makefile @@ -21,6 +21,11 @@ MLINKS= CPU_ELAN.4 CPU_SOEKRIS.4 MLINKS+=pae.4 PAE.4 MLINKS+=sbni.4 if_sbni.4 +# Link files to the parent directory +.for _manpage in ${MAN} +MLINKS+=${_manpage} ../${_manpage} +.endfor + MANSUBDIR=/i386 .include diff --git a/share/man/man4/man4.powerpc/Makefile b/share/man/man4/man4.powerpc/Makefile index 05c5d4012fe8..aa0e137fcedd 100644 --- a/share/man/man4/man4.powerpc/Makefile +++ b/share/man/man4/man4.powerpc/Makefile @@ -15,6 +15,11 @@ MAN= adb.4 \ snd_davbus.4 \ tsec.4 +# Link files to the parent directory +.for _manpage in ${MAN} +MLINKS+=${_manpage} ../${_manpage} +.endfor + MANSUBDIR=/powerpc .include diff --git a/share/man/man5/make.conf.5 b/share/man/man5/make.conf.5 index 5885d9476d71..b3623b29a950 100644 --- a/share/man/man5/make.conf.5 +++ b/share/man/man5/make.conf.5 @@ -385,7 +385,7 @@ for which section 4 man pages will be installed. The special value .Sq all installs all available architectures. -The default is the MACHINE and MACHINE_ARCH being built. +It is also the default value. .It Va MODULES_WITH_WORLD .Pq Vt bool Set to build modules with the system instead of the kernel. diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index 6acef31cc23a..f19af2a5566d 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -213,6 +213,13 @@ SUBDIR.${MK_TESTS}+= tests .include +# Add architecture-specific manpages +# to be included anyway +MAN= apmd/apmd.8 \ + nvram/nvram.8 + +.include + SUBDIR_PARALLEL= .include diff --git a/usr.sbin/apm/Makefile b/usr.sbin/apm/Makefile index f52453c62522..27fa0c37d5cf 100644 --- a/usr.sbin/apm/Makefile +++ b/usr.sbin/apm/Makefile @@ -5,6 +5,10 @@ MAN= apm.8 MLINKS= apm.8 apmconf.8 MANSUBDIR= /${MACHINE_CPUARCH} +# Link files to the parent directory +MLINKS+= apm.8 ../apm.8 +MLINKS+= apmconf.8 ../apmconf.8 + PACKAGE=apm .include From owner-dev-commits-src-all@freebsd.org Wed Jun 30 08:11:15 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4181465FD0C for ; Wed, 30 Jun 2021 08:11:15 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: from mail-yb1-xb2b.google.com (mail-yb1-xb2b.google.com [IPv6:2607:f8b0:4864:20::b2b]) (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 4GFDZB1Jrtz4jwK for ; Wed, 30 Jun 2021 08:11:13 +0000 (UTC) (envelope-from fernando.apesteguia@gmail.com) Received: by mail-yb1-xb2b.google.com with SMTP id g5so3552043ybu.10 for ; Wed, 30 Jun 2021 01:11:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=QdlDV11CyDkCbML9I7C74JVstTgoXs/A3LP/9/g78PA=; b=VTjC8trgFNYIWII00qCQoR1hggfnkVjQIServNrofdBIo2jnL/rb0jWYe2BcFkW56Z tn6TN/CbETRCLEgdGcHliGl9xX0yPZC+ASihGPlUEYgQEGFLs77rJEyZX/A5lj6i9YeP huyReV27luzJONHUKzURrCv7RbpUlI7SZNT2voZL5pYjm0BrqG1b0pYo/TkS3QUWVB6M RwHm12eGmuEjlH1WooTD8MOBZkh2NavIFRrVjnCEw+zSBaPVcJMLe/LY+HnsTR/fFiJ3 nsgWKEtUU/L2GipxNO3mgoXVJZZVezuZO5FoHST7PsV90+UWWFYP61BJTjNjDNTsv7AQ 8mVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=QdlDV11CyDkCbML9I7C74JVstTgoXs/A3LP/9/g78PA=; b=hF6aIwjLOqFDKocGXYlbE1cpMSZVhL3QOQc7onUlvduRYVU8lRJUHX+nNpd2G+H0WR mr6llOuFTPWglJyO+3sdQuGcVMumenphp3ju/yUZEf3gP8RhD9LiYN86zPopdUS3jMI+ 5WaySpmdnbQek9UFjkxlpzCFe3mEc3QOBxyG7LCPdjeoMLtiPIBXYHq+geHUBT3DVBRW eUIVRG4jnSoDS3Z3lmbTLJRTV4V2qf5UQ8Xc/T0lT36wzgMefGu9T+TuCFozaD01Fflg ZSHdWyH++ui8s8fO1Sg1YYZTLxRH8libyb75Z+5PEsVKNJmSpZvUQd7jMjw77T45EWZU sm1A== X-Gm-Message-State: AOAM5307zAlvKAbmk9m4rGnvAChOC8+5auQrRrPrdO6309qKRz2MtHmY HmmGhf6z2VZBh0qCFn1o1uFHPwboYbXJwRK5/XMtR9vyuWY= X-Google-Smtp-Source: ABdhPJzH54KVVN7bWqslNs1MUnPfOYfdp0cvjBQwpQ1Isx1xbH2uEf+fgkOsySloaGIhcqhA7Fyi8yN1RJCb2NfUDaM= X-Received: by 2002:a25:bb08:: with SMTP id z8mr45583748ybg.188.1625040673002; Wed, 30 Jun 2021 01:11:13 -0700 (PDT) MIME-Version: 1.0 From: =?UTF-8?Q?Fernando_Apestegu=C3=ADa?= Date: Wed, 30 Jun 2021 10:07:10 +0200 Message-ID: Subject: Follow-up for 0a0f7486413c147d56808b38055c40c64cff61f5 To: dev-commits-src-all@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4GFDZB1Jrtz4jwK X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=VTjC8trg; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (mx1.freebsd.org: domain of fernandoapesteguia@gmail.com designates 2607:f8b0:4864:20::b2b as permitted sender) smtp.mailfrom=fernandoapesteguia@gmail.com X-Spamd-Result: default: False [0.66 / 15.00]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; FREEMAIL_FROM(0.00)[gmail.com]; TO_DN_NONE(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; DMARC_POLICY_ALLOW(-0.50)[gmail.com,none]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; R_MIXED_CHARSET(0.83)[subject]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; DWL_DNSWL_NONE(0.00)[gmail.com:dkim]; ARC_NA(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::b2b:from]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; FROM_HAS_DN(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; NEURAL_SPAM_MEDIUM(0.83)[0.829]; RCPT_COUNT_ONE(0.00)[1]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::b2b:from:127.0.2.255]; NEURAL_SPAM_SHORT(1.00)[1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b2b:from]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MAILMAN_DEST(0.00)[dev-commits-src-all] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 08:11:15 -0000 The message commit for https://cgit.freebsd.org/src/commit/?id=0a0f7486413c147d56808b38055c40c64cff61f5 missed the review reference: Differential Revision: https://reviews.freebsd.org/D30715 Apologies for the inconvenience. From owner-dev-commits-src-all@freebsd.org Wed Jun 30 09:08:46 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 12:18:17 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 12:18:18 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 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-all@freebsd.org Wed Jun 30 12:56:12 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6781F664613; Wed, 30 Jun 2021 12:56: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 4GFLv02T8Wz3pTZ; Wed, 30 Jun 2021 12:56:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3E81A503E; Wed, 30 Jun 2021 12:56: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 15UCuCJt025348; Wed, 30 Jun 2021 12:56:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UCuC2C025347; Wed, 30 Jun 2021 12:56:12 GMT (envelope-from git) Date: Wed, 30 Jun 2021 12:56:12 GMT Message-Id: <202106301256.15UCuC2C025347@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Houchard Subject: git: c1da17a86cdb - main - arm: Garbage collect _arm_memcpy/_arm_bzero. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cognet X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c1da17a86cdbb364f1c946b8346601e72643daf1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 12:56:12 -0000 The branch main has been updated by cognet: URL: https://cgit.FreeBSD.org/src/commit/?id=c1da17a86cdbb364f1c946b8346601e72643daf1 commit c1da17a86cdbb364f1c946b8346601e72643daf1 Author: Olivier Houchard AuthorDate: 2021-06-25 23:06:26 +0000 Commit: Olivier Houchard CommitDate: 2021-06-30 12:53:57 +0000 arm: Garbage collect _arm_memcpy/_arm_bzero. Remove any attempt to use _arm_memcpy and _arm_bzero. It was used by some xscale platforms to provide functions to use the DMA engine for big zeroing/copying work, but those platforms are long gone, and it's unlikely anything else will use those. --- sys/arm/arm/bcopyinout.S | 5 ----- sys/arm/arm/bcopyinout_xscale.S | 44 ----------------------------------------- sys/arm/arm/machdep.c | 5 ----- sys/arm/arm/support.S | 41 -------------------------------------- sys/arm/include/md_var.h | 10 ---------- 5 files changed, 105 deletions(-) diff --git a/sys/arm/arm/bcopyinout.S b/sys/arm/arm/bcopyinout.S index 2a9d48f989ea..dcdf8ed5af0c 100644 --- a/sys/arm/arm/bcopyinout.S +++ b/sys/arm/arm/bcopyinout.S @@ -41,11 +41,6 @@ #include #include -.L_arm_memcpy: - .word _C_LABEL(_arm_memcpy) -.L_min_memcpy_size: - .word _C_LABEL(_min_memcpy_size) - __FBSDID("$FreeBSD$"); #include diff --git a/sys/arm/arm/bcopyinout_xscale.S b/sys/arm/arm/bcopyinout_xscale.S index e592b901201f..4849ab9e794a 100644 --- a/sys/arm/arm/bcopyinout_xscale.S +++ b/sys/arm/arm/bcopyinout_xscale.S @@ -67,28 +67,6 @@ ENTRY(copyin) movcs r0, #EFAULT RETc(cs) - ldr r3, .L_arm_memcpy - ldr r3, [r3] - cmp r3, #0 - beq .Lnormal - ldr r3, .L_min_memcpy_size - ldr r3, [r3] - cmp r2, r3 - blt .Lnormal - stmfd sp!, {r0-r2, r4, lr} - mov r3, r0 - mov r0, r1 - mov r1, r3 - mov r3, #2 /* SRC_IS_USER */ - ldr r4, .L_arm_memcpy - mov lr, pc - ldr pc, [r4] - cmp r0, #0 - ldmfd sp!, {r0-r2, r4, lr} - moveq r0, #0 - RETeq - -.Lnormal: stmfd sp!, {r10-r11, lr} GET_PCB(r10) @@ -452,28 +430,6 @@ ENTRY(copyout) movcs r0, #EFAULT RETc(cs) - ldr r3, .L_arm_memcpy - ldr r3, [r3] - cmp r3, #0 - beq .Lnormale - ldr r3, .L_min_memcpy_size - ldr r3, [r3] - cmp r2, r3 - blt .Lnormale - stmfd sp!, {r0-r2, r4, lr} - mov r3, r0 - mov r0, r1 - mov r1, r3 - mov r3, #1 /* DST_IS_USER */ - ldr r4, .L_arm_memcpy - mov lr, pc - ldr pc, [r4] - cmp r0, #0 - ldmfd sp!, {r0-r2, r4, lr} - moveq r0, #0 - RETeq - -.Lnormale: stmfd sp!, {r10-r11, lr} GET_PCB(r10) diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c index 3d966527599d..4f26c6e9ebf9 100644 --- a/sys/arm/arm/machdep.c +++ b/sys/arm/arm/machdep.c @@ -122,11 +122,6 @@ vm_offset_t vector_page; /* The address at which the kernel was loaded. Set early in initarm(). */ vm_paddr_t arm_physmem_kernaddr; -int (*_arm_memcpy)(void *, void *, int, int) = NULL; -int (*_arm_bzero)(void *, int, int) = NULL; -int _min_memcpy_size = 0; -int _min_bzero_size = 0; - extern int *end; #ifdef FDT diff --git a/sys/arm/arm/support.S b/sys/arm/arm/support.S index a3ee3c3b93ba..7a39c283aed1 100644 --- a/sys/arm/arm/support.S +++ b/sys/arm/arm/support.S @@ -93,14 +93,6 @@ __FBSDID("$FreeBSD$"); .syntax unified -.L_arm_memcpy: - .word _C_LABEL(_arm_memcpy) -.L_arm_bzero: - .word _C_LABEL(_arm_bzero) -.L_min_memcpy_size: - .word _C_LABEL(_min_memcpy_size) -.L_min_bzero_size: - .word _C_LABEL(_min_bzero_size) /* * memset: Sets a block of memory to the specified value * @@ -114,22 +106,6 @@ __FBSDID("$FreeBSD$"); */ /* LINTSTUB: Func: void bzero(void *, size_t) */ ENTRY(bzero) - ldr r3, .L_arm_bzero - ldr r3, [r3] - cmp r3, #0 - beq .Lnormal0 - ldr r2, .L_min_bzero_size - ldr r2, [r2] - cmp r1, r2 - blt .Lnormal0 - stmfd sp!, {r0, r1, lr} - mov r2, #0 - mov lr, pc - mov pc, r3 - cmp r0, #0 - ldmfd sp!, {r0, r1, lr} - RETeq -.Lnormal0: mov r3, #0x00 b do_memset END(bzero) @@ -779,23 +755,6 @@ ENTRY(memcpy) bhi .Lnormal #endif #endif - ldr r3, .L_arm_memcpy - ldr r3, [r3] - cmp r3, #0 - beq .Lnormal - ldr r3, .L_min_memcpy_size - ldr r3, [r3] - cmp r2, r3 - blt .Lnormal - stmfd sp!, {r0-r2, r4, lr} - mov r3, #0 - ldr r4, .L_arm_memcpy - mov lr, pc - ldr pc, [r4] - cmp r0, #0 - ldmfd sp!, {r0-r2, r4, lr} - RETeq -.Lnormal: mov r3, r0 /* We must not clobber r0 */ /* Word-align the destination buffer */ diff --git a/sys/arm/include/md_var.h b/sys/arm/include/md_var.h index d60992f104e1..19468bd30e02 100644 --- a/sys/arm/include/md_var.h +++ b/sys/arm/include/md_var.h @@ -42,16 +42,6 @@ extern u_long elf_hwcap; extern u_long elf_hwcap2; extern vm_paddr_t arm_physmem_kernaddr; -extern int (*_arm_memcpy)(void *, void *, int, int); -extern int (*_arm_bzero)(void *, int, int); - -extern int _min_memcpy_size; -extern int _min_bzero_size; - -#define DST_IS_USER 0x1 -#define SRC_IS_USER 0x2 -#define IS_PHYSICAL 0x4 - enum cpu_class { CPU_CLASS_NONE, CPU_CLASS_CORTEXA, From owner-dev-commits-src-all@freebsd.org Wed Jun 30 12:56:13 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9794E66470C; Wed, 30 Jun 2021 12:56: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 4GFLv13T5zz3pgc; Wed, 30 Jun 2021 12:56: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 5F53D52A7; Wed, 30 Jun 2021 12:56:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UCuDSU025372; Wed, 30 Jun 2021 12:56:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UCuDeQ025371; Wed, 30 Jun 2021 12:56:13 GMT (envelope-from git) Date: Wed, 30 Jun 2021 12:56:13 GMT Message-Id: <202106301256.15UCuDeQ025371@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Houchard Subject: git: 712c060c94fd - main - arm64: Make sure COMPAT_FREEBSD32 handles thumb entry point. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cognet X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 712c060c94fd447c91b0e6218c12a431206b487a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 12:56:13 -0000 The branch main has been updated by cognet: URL: https://cgit.FreeBSD.org/src/commit/?id=712c060c94fd447c91b0e6218c12a431206b487a commit 712c060c94fd447c91b0e6218c12a431206b487a Author: Olivier Houchard AuthorDate: 2021-06-30 12:50:47 +0000 Commit: Olivier Houchard CommitDate: 2021-06-30 12:55:18 +0000 arm64: Make sure COMPAT_FREEBSD32 handles thumb entry point. If the entry point for the binary executed is a thumb 2 entry point, make sure we set the PSR_T bit, or the CPU will interpret it as arm32 code and bad things will happen. PR: 256899 MFC after: 1 week --- sys/arm64/arm64/elf32_machdep.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/arm64/arm64/elf32_machdep.c b/sys/arm64/arm64/elf32_machdep.c index 7792374f865b..5321e12d74e9 100644 --- a/sys/arm64/arm64/elf32_machdep.c +++ b/sys/arm64/arm64/elf32_machdep.c @@ -258,6 +258,8 @@ freebsd32_setregs(struct thread *td, struct image_params *imgp, tf->tf_x[14] = imgp->entry_addr; tf->tf_elr = imgp->entry_addr; tf->tf_spsr = PSR_M_32; + if ((uint32_t)imgp->entry_addr & 1) + tf->tf_spsr |= PSR_T; #ifdef VFP vfp_reset_state(td, pcb); From owner-dev-commits-src-all@freebsd.org Wed Jun 30 17:09:21 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F505648386; Wed, 30 Jun 2021 17:09: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 4GFSW519Cqz4v6G; Wed, 30 Jun 2021 17:09: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 0C9B3107F3; Wed, 30 Jun 2021 17:09:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UH9KKY058056; Wed, 30 Jun 2021 17:09:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UH9K9e058055; Wed, 30 Jun 2021 17:09:20 GMT (envelope-from git) Date: Wed, 30 Jun 2021 17:09:20 GMT Message-Id: <202106301709.15UH9K9e058055@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 91604330e607 - main - sysbuild: Also copy /var/db/zoneinfo MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 91604330e6073e49805849efdb34e7fdfdbe845b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 17:09:21 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=91604330e6073e49805849efdb34e7fdfdbe845b commit 91604330e6073e49805849efdb34e7fdfdbe845b Author: Jose Luis Duran AuthorDate: 2021-06-20 02:19:00 +0000 Commit: Warner Losh CommitDate: 2021-06-30 17:08:26 +0000 sysbuild: Also copy /var/db/zoneinfo Per tzsetup(8), /etc/localtime and /var/db/zoneinfo go hand in hand. Remove extra white spaces as well. Reviewed by: imp@, phk@ (informal no objection email) Pull Request: https://github.com/freebsd/freebsd-src/pull/486 --- tools/tools/sysbuild/sysbuild.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tools/tools/sysbuild/sysbuild.sh b/tools/tools/sysbuild/sysbuild.sh index 2ad19b75659f..3b4502014642 100644 --- a/tools/tools/sysbuild/sysbuild.sh +++ b/tools/tools/sysbuild/sysbuild.sh @@ -243,7 +243,7 @@ ports_recurse() ( ports_build() ( - ports_recurse . $PORTS_WE_WANT + ports_recurse . $PORTS_WE_WANT if [ "x${PKG_DIR}" != "x" ] ; then mkdir -p ${PKG_DIR} @@ -262,7 +262,7 @@ ports_build() ( ( cd $p - ports_make clean all install + ports_make clean all install ) > _.$b 2>&1 < /dev/null continue fi @@ -340,7 +340,7 @@ ports_prefetch() ( ) > /${ldir}/_.prefetch.$b 2>&1 done echo "Done" >> /${ldir}/_.prefetch - ) + ) ) ####################################################################### @@ -442,7 +442,7 @@ if $do_prefetch ; then mkdir -p /tmp/sysbuild/ports ln -s ${distfile_cache} /tmp/sysbuild/ports/distfiles export PORTS_OPTS=CD_MOUNTPTS=/tmp/sysbuild - ports_prefetch /tmp + ports_prefetch /tmp exit 0 fi @@ -602,14 +602,18 @@ fi if [ -f /etc/localtime ] ; then log_it copy localtime cp /etc/localtime ${SBMNT}/etc + if [ -f /var/db/zoneinfo ] ; then + log_it copy zoneinfo + cp /var/db/zoneinfo ${SBMNT}/var/db + fi fi log_it ldconfig in chroot chroot ${SBMNT} sh /etc/rc.d/ldconfig start log_it before_ports -( - before_ports +( + before_ports ) log_it fixing fstab @@ -623,14 +627,14 @@ cp /tmp/_sb_log ${SBMNT}/tmp b=`basename $0` if [ "x$c_arg" != "x" ] ; then cp $c_arg ${SBMNT}/root - chroot ${SBMNT} sh /root/$0 -c /root/`basename $c_arg` $use_pkg chroot_script + chroot ${SBMNT} sh /root/$0 -c /root/`basename $c_arg` $use_pkg chroot_script else chroot ${SBMNT} sh /root/$0 $use_pkg chroot_script fi cp ${SBMNT}/tmp/_sb_log /tmp log_it create all mountpoints -grep -v '^[ ]*#' ${SBMNT}/etc/fstab | +grep -v '^[ ]*#' ${SBMNT}/etc/fstab | while read a b c do mkdir -p ${SBMNT}/$b From owner-dev-commits-src-all@freebsd.org Wed Jun 30 17:09:22 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6542F648132; Wed, 30 Jun 2021 17:09:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFSW61lB1z4v6J; Wed, 30 Jun 2021 17:09: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 1B15610CC2; Wed, 30 Jun 2021 17:09: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 15UH9Mai058080; Wed, 30 Jun 2021 17:09:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UH9MOE058079; Wed, 30 Jun 2021 17:09:22 GMT (envelope-from git) Date: Wed, 30 Jun 2021 17:09:22 GMT Message-Id: <202106301709.15UH9MOE058079@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6ce785c50bfa - main - bsdinstall: Also copy /var/db/zoneinfo MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ce785c50bfacf4fc8f7529e1bf6e2966dc5fac1 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 17:09:22 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6ce785c50bfacf4fc8f7529e1bf6e2966dc5fac1 commit 6ce785c50bfacf4fc8f7529e1bf6e2966dc5fac1 Author: Jose Luis Duran AuthorDate: 2021-06-20 02:22:48 +0000 Commit: Warner Losh CommitDate: 2021-06-30 17:08:26 +0000 bsdinstall: Also copy /var/db/zoneinfo Per tzsetup(8), /etc/localtime and /var/db/zoneinfo go hand in hand. Reviewed by: imp@ Pull Request: https://github.com/freebsd/freebsd-src/pull/486 --- usr.sbin/bsdinstall/scripts/jail | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail index d9b5c8eb3cb4..3110f744207c 100755 --- a/usr.sbin/bsdinstall/scripts/jail +++ b/usr.sbin/bsdinstall/scripts/jail @@ -137,6 +137,7 @@ trap error SIGINT # SIGINT is bad again bsdinstall config || error "Failed to save config" cp /etc/resolv.conf $1/etc cp /etc/localtime $1/etc +cp /var/db/zoneinfo $1/var/db # Run post-install script if [ -f $TMPDIR/bsdinstall-installscript-ab ]; then From owner-dev-commits-src-all@freebsd.org Wed Jun 30 17:20:46 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7418B667E6A; Wed, 30 Jun 2021 17:20: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 4GFSmG2mtLz3Bxg; Wed, 30 Jun 2021 17:20: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 476BC10B51; Wed, 30 Jun 2021 17:20: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 15UHKkoG079378; Wed, 30 Jun 2021 17:20:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UHKkUQ079377; Wed, 30 Jun 2021 17:20:46 GMT (envelope-from git) Date: Wed, 30 Jun 2021 17:20:46 GMT Message-Id: <202106301720.15UHKkUQ079377@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 3f197b101f71 - main - release: Remove C-like string comparison operator MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3f197b101f71ee4f4949c53bf330f61b43749ce9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 17:20:46 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3f197b101f71ee4f4949c53bf330f61b43749ce9 commit 3f197b101f71ee4f4949c53bf330f61b43749ce9 Author: Jose Luis Duran AuthorDate: 2021-06-20 00:00:19 +0000 Commit: Warner Losh CommitDate: 2021-06-30 17:13:51 +0000 release: Remove C-like string comparison operator Per [(1), i.e. test(1), the string comparison operator should be `=`, not `==` in sh(1) scripts. No functional change. FreeBSD's test accepts `==` as an alias for `=` for compatibility with gnu test's `==` extension. Reviewed by: imp@, gjb@ Pull Request: https://github.com/freebsd/freebsd-src/pull/485 --- release/tools/arm.subr | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/release/tools/arm.subr b/release/tools/arm.subr index 811d6ddb402d..89b52077e836 100644 --- a/release/tools/arm.subr +++ b/release/tools/arm.subr @@ -65,13 +65,13 @@ umount_loop() { arm_create_disk() { # Create the target raw file and temporary work directory. chroot ${CHROOTDIR} gpart create -s ${PART_SCHEME} ${mddev} - if [ "${PART_SCHEME}" == "GPT" ]; then + if [ "${PART_SCHEME}" = "GPT" ]; then chroot ${CHROOTDIR} gpart add -t efi -l efi -a 512k -s ${FAT_SIZE} ${mddev} chroot ${CHROOTDIR} newfs_msdos -L efi -F ${FAT_TYPE} /dev/${mddev}p1 chroot ${CHROOTDIR} gpart add -t freebsd-ufs -l rootfs -a 64k ${mddev} chroot ${CHROOTDIR} newfs -U -L rootfs /dev/${mddev}p2 fi - if [ "${PART_SCHEME}" == "MBR" ]; then + if [ "${PART_SCHEME}" = "MBR" ]; then chroot ${CHROOTDIR} gpart add -t '!12' -a 512k -s ${FAT_SIZE} ${mddev} chroot ${CHROOTDIR} gpart set -a active -i 1 ${mddev} chroot ${CHROOTDIR} newfs_msdos -L msdosboot -F ${FAT_TYPE} /dev/${mddev}s1 @@ -169,10 +169,10 @@ arm_setup_minimal_loader() { } arm_install_base() { - if [ "${PART_SCHEME}" == "GPT" ]; then + if [ "${PART_SCHEME}" = "GPT" ]; then chroot ${CHROOTDIR} mount /dev/${mddev}p2 ${DESTDIR} fi - if [ "${PART_SCHEME}" == "MBR" ]; then + if [ "${PART_SCHEME}" = "MBR" ]; then chroot ${CHROOTDIR} mount /dev/${mddev}s2a ${DESTDIR} fi _OSVERSION=$(chroot ${CHROOTDIR} /usr/bin/uname -U) @@ -196,13 +196,13 @@ arm_install_base() { echo '# Custom /etc/fstab for FreeBSD embedded images' \ > ${CHROOTDIR}/${DESTDIR}/etc/fstab - if [ "${PART_SCHEME}" == "GPT" ]; then + if [ "${PART_SCHEME}" = "GPT" ]; then echo "/dev/ufs/rootfs / ufs rw 1 1" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab echo "/dev/msdosfs/EFI /boot/efi msdosfs rw,noatime 0 0" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab fi - if [ "${PART_SCHEME}" == "MBR" ]; then + if [ "${PART_SCHEME}" = "MBR" ]; then echo "/dev/ufs/rootfs / ufs rw 1 1" \ >> ${CHROOTDIR}/${DESTDIR}/etc/fstab echo "/dev/msdosfs/MSDOSBOOT /boot/msdos msdosfs rw,noatime 0 0" \ @@ -232,11 +232,11 @@ arm_install_boot() { FATMOUNT="${DESTDIR%${KERNEL}}/fat" UFSMOUNT="${DESTDIR%${KERNEL}}/ufs" chroot ${CHROOTDIR} mkdir -p "${FATMOUNT}" "${UFSMOUNT}" - if [ "${PART_SCHEME}" == "GPT" ]; then + if [ "${PART_SCHEME}" = "GPT" ]; then dospart="/dev/${mddev}p1" ufspart="/dev/${mddev}p2" fi - if [ "${PART_SCHEME}" == "MBR" ]; then + if [ "${PART_SCHEME}" = "MBR" ]; then dospart="/dev/${mddev}s1" ufspart="/dev/${mddev}s2a" fi @@ -244,7 +244,7 @@ arm_install_boot() { chroot ${CHROOTDIR} mount_msdosfs ${dospart} ${FATMOUNT} chroot ${CHROOTDIR} mount ${ufspart} ${UFSMOUNT} - if [ "${EMBEDDED_TARGET}" == "arm" ]; then + if [ "${EMBEDDED_TARGET}" = "arm" ]; then chroot ${CHROOTDIR} cp -p ${UFSMOUNT}/boot/ubldr.bin \ ${FATMOUNT}/ubldr.bin fi From owner-dev-commits-src-all@freebsd.org Wed Jun 30 17:59:47 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7FB68649002; Wed, 30 Jun 2021 17:59:47 +0000 (UTC) (envelope-from danfe@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2610:1c1:1:6074::16:84]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFTdH2v8tz3JcY; Wed, 30 Jun 2021 17:59:47 +0000 (UTC) (envelope-from danfe@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1625075987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b+QamJfr0Fc4bKSp9o0jHh7BaUb/z72LkNinusfxpVQ=; b=x7/bDVzH1GHgK17yNzYJl/IDFZLu4MVvQxm/uRzSFy26uqm7caGZOMilMGvWq2Nbv5NntY txeKymGiEaFZxSkzTIViwVmwErGR6pfd/ymg+dWU5zZh5a2wKyekzOG3YCGcF/CyR8RCoS F21ZBYP2+GxMkY4OccfeDvDT1DWEl7IGSueIb9Pu+smt+3etFY4u6vmskoGIhXC06wJleb 44ZIaoo84pxPkRZotg7wgRyTgS1SPXz9jI+01Zoo+YsPBAOOz7QxgVhTkIgpCAdynqtxAe qKA7xT9q5gqBnTiJn6BLMUnuMpiDB9Pi8QkzZrOVXygJp5OIPlumGbUvmwfY0g== Received: by freefall.freebsd.org (Postfix, from userid 1033) id 2927A5F79; Wed, 30 Jun 2021 17:59:47 +0000 (UTC) Date: Wed, 30 Jun 2021 17:59:47 +0000 From: Alexey Dokuchaev To: Warner Losh Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 3f197b101f71 - main - release: Remove C-like string comparison operator Message-ID: References: <202106301720.15UHKkUQ079377@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202106301720.15UHKkUQ079377@gitrepo.freebsd.org> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1625075987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=b+QamJfr0Fc4bKSp9o0jHh7BaUb/z72LkNinusfxpVQ=; b=uzaVvsrnlCqHeGqQx9jsPf/FnmLosXywWOa5ud3ZadVAuIjdy62vF+nZPnApZGLAmUnQVh 3yO/tmLVZrtIv/ANQtA6JtzPM03e1pKQQCNBv6LEW9wKnNelO8o11kOgH9EXJBYFFtW6WY uVhtBhjoqfgEjM0qJDd86M4Q92TejE85nSYqvEuUOj/06Fv1arEShp2fJqVJNfc/6HdNz9 g6Dy6JpUO3hku6k9NWESlOn4dgN9vZu52uNtKw1i/4eESyDQQHsymxUsmIErvgaw3sAhCb 90tkzOt9aJEnXZ6iLmTOzsISxbfbeG/UQ4JxH7XkMI/VR/Z4YfvHeZIJu9DG8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1625075987; a=rsa-sha256; cv=none; b=n3CHS6Hd/qrg2bCFd0fakPfl0epWPivOWI/fGKSqikedEquaN1888XBxtbBE14N7CkDjT5 +e53HEAfx78ZMFWtAnY/VkzvmOKeG8Ss0yODm5Q2LJqXgeNb6yZA0Si8gpH5guIJYDcw22 VyI7cswMKSeL2Fcj9B3Lgg3GNlvd/cRKVYB41CDo85Wv/i1qubgZeZ87BZr9k9nAI4qrHY j4DNb/X0sDlg60N1C1ExQEvTqJfLtf73Eq2gXnc3fOWNOkM4rwe919VZiCKXe/R/Ct7OO2 f0SVeLUWmibV8PSSUeZwM2OncROBaahWeYS39HMFciqVMe4NswvSMceAXBKBAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 17:59:47 -0000 On Wed, Jun 30, 2021 at 05:20:46PM +0000, Warner Losh wrote: > commit 3f197b101f71ee4f4949c53bf330f61b43749ce9 > > release: Remove C-like string comparison operator > > Per [(1), i.e. test(1), the string comparison operator should be `=`, > not `==` in sh(1) scripts. > > No functional change. FreeBSD's test accepts `==` as an alias for `=` > for compatibility with gnu test's `==` extension. Nice, thanks, but why didn't you remove those needless quotes around static stings, e.g. "GPT" -> GPT? ./danfe From owner-dev-commits-src-all@freebsd.org Wed Jun 30 18:15:32 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E62126493BB; Wed, 30 Jun 2021 18:15:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFTzS5zZZz3Mfw; Wed, 30 Jun 2021 18:15: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 B4CB711B3D; Wed, 30 Jun 2021 18:15:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UIFWeh051026; Wed, 30 Jun 2021 18:15:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UIFWDU051025; Wed, 30 Jun 2021 18:15:32 GMT (envelope-from git) Date: Wed, 30 Jun 2021 18:15:32 GMT Message-Id: <202106301815.15UIFWDU051025@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: 1a8bcf30f97e - main - amd64: a simplication to pmap_remove_{all, write} MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1a8bcf30f97e6153def2af781db2fe54f5c0d106 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 18:15:33 -0000 The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=1a8bcf30f97e6153def2af781db2fe54f5c0d106 commit 1a8bcf30f97e6153def2af781db2fe54f5c0d106 Author: Alan Cox AuthorDate: 2021-06-30 05:59:21 +0000 Commit: Alan Cox CommitDate: 2021-06-30 18:12:25 +0000 amd64: a simplication to pmap_remove_{all,write} Eliminate some unnecessary unlocking and relocking when we have to retry the operation to avoid deadlock. (All of the other pmap functions that iterate over a PV list already implemented retries without these same unlocking and relocking operations.) Reviewed by: kib, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30951 --- sys/amd64/amd64/pmap.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index a4046cc1f687..ea017b8a61a8 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -6307,8 +6307,8 @@ pmap_remove_all(vm_page_t m) lock = VM_PAGE_TO_PV_LIST_LOCK(m); pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : pa_to_pvh(VM_PAGE_TO_PHYS(m)); -retry: rw_wlock(lock); +retry: while ((pv = TAILQ_FIRST(&pvh->pv_list)) != NULL) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { @@ -6317,7 +6317,6 @@ retry: PMAP_LOCK(pmap); rw_wlock(lock); if (pvh_gen != pvh->pv_gen) { - rw_wunlock(lock); PMAP_UNLOCK(pmap); goto retry; } @@ -6336,7 +6335,6 @@ retry: PMAP_LOCK(pmap); rw_wlock(lock); if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { - rw_wunlock(lock); PMAP_UNLOCK(pmap); goto retry; } @@ -8460,8 +8458,8 @@ pmap_remove_write(vm_page_t m) lock = VM_PAGE_TO_PV_LIST_LOCK(m); pvh = (m->flags & PG_FICTITIOUS) != 0 ? &pv_dummy : pa_to_pvh(VM_PAGE_TO_PHYS(m)); -retry_pv_loop: rw_wlock(lock); +retry_pv_loop: TAILQ_FOREACH_SAFE(pv, &pvh->pv_list, pv_next, next_pv) { pmap = PV_PMAP(pv); if (!PMAP_TRYLOCK(pmap)) { @@ -8471,7 +8469,6 @@ retry_pv_loop: rw_wlock(lock); if (pvh_gen != pvh->pv_gen) { PMAP_UNLOCK(pmap); - rw_wunlock(lock); goto retry_pv_loop; } } @@ -8496,7 +8493,6 @@ retry_pv_loop: if (pvh_gen != pvh->pv_gen || md_gen != m->md.pv_gen) { PMAP_UNLOCK(pmap); - rw_wunlock(lock); goto retry_pv_loop; } } From owner-dev-commits-src-all@freebsd.org Wed Jun 30 18:20:29 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B901649771 for ; Wed, 30 Jun 2021 18:20:29 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x82a.google.com (mail-qt1-x82a.google.com [IPv6:2607:f8b0:4864:20::82a]) (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 4GFV585P5Xz3MKF for ; Wed, 30 Jun 2021 18:20:28 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x82a.google.com with SMTP id w13so2202688qtc.0 for ; Wed, 30 Jun 2021 11:20:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=VRAyvI2zrUF0l9CQ72dPQjQ8fxz7QaJlEDtDxyGEQ9E=; b=szoRE6GIwL+DJkuRsHb30I+oraQlDTIYhLdsW9EUNYvWv8rUsy6sEYSfolKd1U6xQw XnfaQcLzMejAmJwX99BDKk0kGQ6gkFRReQWzus6DQlO5nB/W5jBABFc1nz4A3I6AtEdc Mw8FiqNh5qkn/cJL7b8adhr+MPoyCg4dOc5ZJfele21qPkCTmU224oCIFrdWfyx5h1iY umwoMHcnuTpYVINtxF/zCFkkD8Yp+od/Gz8FJX6yzSupgq5zxCeQnDaWJF1FcJYVg8QP HByAI1iM9whMWmYm/j39lkEhEU+fwcXB9x8gK0ActqvRcPyK9Sn0gkcYJweEbadcVgGa 5i/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=VRAyvI2zrUF0l9CQ72dPQjQ8fxz7QaJlEDtDxyGEQ9E=; b=Naqc/DTzwdd3YfOTxnym3HsOy2lRTkueTGft42LB/Lj09ZZabyyUiQ9CpOwGrQvp31 4s+iIAcMZjaG18DIwGJLwz9Z6yHBjh2dNTGA7KzhThZRusa70cayEOgQh/SKIhZDC5Mf xIJkiql+BMREzMAbHUn137vFW+NEVG5Jgm7SlrEh9dyoFwzGe7fRLdD+2R3iN8yTAsth KvqcIB8vi8yE2t782qCgb58MUwPoUalL1i1t/61SJ7uW2FUhqssinVtJpGyp8Kaq6F9s HCfkSDpm1UYTBv0pxik9lBFAf1rtZOnyc7QGllAE8FmTLf98W+GoPlGH6CzwKV2tSakc zzsg== X-Gm-Message-State: AOAM532PMM2q6+u+ABY+6T9H3daFsJx9wcPjiSMm0YNuhLb0w3fs5k9c 8m+jn+QHeACpuH5mo+cFgczSPeB+nAjIIlFQsK5rsQ== X-Google-Smtp-Source: ABdhPJwlYfYskREbtAyT9Hh9aMH2LOT7HlN5TqXClzjHSP7b34ZsKJcrerqksnYzFiirlKhmFL/gTvfmKI66NPYo3p4= X-Received: by 2002:a05:622a:164d:: with SMTP id y13mr33005191qtj.244.1625077227725; Wed, 30 Jun 2021 11:20:27 -0700 (PDT) MIME-Version: 1.0 References: <202106301720.15UHKkUQ079377@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Wed, 30 Jun 2021 12:20:17 -0600 Message-ID: Subject: Re: git: 3f197b101f71 - main - release: Remove C-like string comparison operator To: Alexey Dokuchaev Cc: Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4GFV585P5Xz3MKF X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=szoRE6GI; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::82a) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.95 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.95)[-0.945]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::82a:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::82a:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::82a:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[dev-commits-src-all]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 18:20:29 -0000 On Wed, Jun 30, 2021 at 11:59 AM Alexey Dokuchaev wrote: > On Wed, Jun 30, 2021 at 05:20:46PM +0000, Warner Losh wrote: > > commit 3f197b101f71ee4f4949c53bf330f61b43749ce9 > > > > release: Remove C-like string comparison operator > > > > Per [(1), i.e. test(1), the string comparison operator should be `=`, > > not `==` in sh(1) scripts. > > > > No functional change. FreeBSD's test accepts `==` as an alias for `=` > > for compatibility with gnu test's `==` extension. > > Nice, thanks, but why didn't you remove those needless quotes around > static stings, e.g. "GPT" -> GPT? > Sure, that could also be done. However, I'll leave it to the re@ team. It works either way, and I've seen both styles in the tree (and outside it as well). Warner From owner-dev-commits-src-all@freebsd.org Wed Jun 30 19:49:12 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6ED5D64A996; Wed, 30 Jun 2021 19:49: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 4GFX3X2GwJz3nWb; Wed, 30 Jun 2021 19:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3433512AC5; Wed, 30 Jun 2021 19:49: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 15UJnCTB070928; Wed, 30 Jun 2021 19:49:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UJnCcF070927; Wed, 30 Jun 2021 19:49:12 GMT (envelope-from git) Date: Wed, 30 Jun 2021 19:49:12 GMT Message-Id: <202106301949.15UJnCcF070927@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 2129c8f6771a - main - hwpmc_arm64.c: fix return style MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2129c8f6771a9a33253a1fe2d4e9d3494bc77f10 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 19:49:12 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=2129c8f6771a9a33253a1fe2d4e9d3494bc77f10 commit 2129c8f6771a9a33253a1fe2d4e9d3494bc77f10 Author: Mitchell Horne AuthorDate: 2021-06-14 15:21:08 +0000 Commit: Mitchell Horne CommitDate: 2021-06-30 19:26:07 +0000 hwpmc_arm64.c: fix return style In accordance to style(9). MFC after: 3 days Sponsored by: The FreeBSD Foundation --- sys/dev/hwpmc/hwpmc_arm64.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index 050f861a74fe..ba98eaefcc9a 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -188,7 +188,7 @@ arm64_allocate_pmc(int cpu, int ri, struct pmc *pm, PMCDBG2(MDP, ALL, 2, "arm64-allocate ri=%d -> config=0x%x", ri, config); - return 0; + return (0); } @@ -231,7 +231,7 @@ arm64_read_pmc(int cpu, int ri, pmc_value_t *v) else *v = tmp; - return 0; + return (0); } static int @@ -254,7 +254,7 @@ arm64_write_pmc(int cpu, int ri, pmc_value_t v) pm->pm_pcpu_state[cpu].pps_overflowcnt = v >> 32; arm64_pmcn_write(ri, v); - return 0; + return (0); } static int @@ -277,7 +277,7 @@ arm64_config_pmc(int cpu, int ri, struct pmc *pm) phw->phw_pmc = pm; - return 0; + return (0); } static int @@ -305,7 +305,7 @@ arm64_start_pmc(int cpu, int ri) arm64_interrupt_enable(ri); arm64_counter_enable(ri); - return 0; + return (0); } static int @@ -323,7 +323,7 @@ arm64_stop_pmc(int cpu, int ri) arm64_counter_disable(ri); arm64_interrupt_disable(ri); - return 0; + return (0); } static int @@ -340,7 +340,7 @@ arm64_release_pmc(int cpu, int ri, struct pmc *pmc) KASSERT(phw->phw_pmc == NULL, ("[arm64,%d] PHW pmc %p non-NULL", __LINE__, phw->phw_pmc)); - return 0; + return (0); } static int From owner-dev-commits-src-all@freebsd.org Wed Jun 30 19:49:15 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2C2EE64AC0A; Wed, 30 Jun 2021 19:49:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFX3Z6rwdz3nPB; Wed, 30 Jun 2021 19:49: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 7C9FD12B69; Wed, 30 Jun 2021 19:49: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 15UJnE5A070983; Wed, 30 Jun 2021 19:49:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UJnEGt070982; Wed, 30 Jun 2021 19:49:14 GMT (envelope-from git) Date: Wed, 30 Jun 2021 19:49:14 GMT Message-Id: <202106301949.15UJnEGt070982@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 8cc3815f02be - main - hwpmc_arm64: accept raw event codes for PMC_OP_PMCALLOCATE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8cc3815f02be9fa2a96e47713ad989e6d787e12a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 19:49:15 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=8cc3815f02be9fa2a96e47713ad989e6d787e12a commit 8cc3815f02be9fa2a96e47713ad989e6d787e12a Author: Mitchell Horne AuthorDate: 2021-05-19 16:11:33 +0000 Commit: Mitchell Horne CommitDate: 2021-06-30 19:47:09 +0000 hwpmc_arm64: accept raw event codes for PMC_OP_PMCALLOCATE Make it possible to specify event codes without an offset of PMC_EV_ARMV8_FIRST, by setting a machine-dependent flag. This is required to make use of event definitions from pmu-events. Reviewed by: ray (slightly earlier version) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30602 --- sys/arm64/include/pmc_mdep.h | 5 ++++- sys/dev/hwpmc/hwpmc_arm64.c | 11 +++++++---- 2 files changed, 11 insertions(+), 5 deletions(-) diff --git a/sys/arm64/include/pmc_mdep.h b/sys/arm64/include/pmc_mdep.h index bcf08a7f9551..f4f31aba6305 100644 --- a/sys/arm64/include/pmc_mdep.h +++ b/sys/arm64/include/pmc_mdep.h @@ -38,7 +38,10 @@ #include union pmc_md_op_pmcallocate { - uint64_t __pad[4]; + uint32_t pm_md_flags; +#define PM_MD_RAW_EVENT 0x1 + uint32_t __pad32; + uint64_t __pad[3]; }; /* Logging */ diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index be26605bad51..6b98fb46e7f1 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -181,11 +181,14 @@ arm64_allocate_pmc(int cpu, int ri, struct pmc *pm, } pe = a->pm_ev; - config = (uint32_t)pe - PMC_EV_ARMV8_FIRST; - if (config > (PMC_EV_ARMV8_LAST - PMC_EV_ARMV8_FIRST)) - return (EINVAL); + /* Adjust the config value if needed. */ + config = (uint32_t)pe; + if ((a->pm_md.pm_md_flags & PM_MD_RAW_EVENT) == 0) { + config -= PMC_EV_ARMV8_FIRST; + if (config > (PMC_EV_ARMV8_LAST - PMC_EV_ARMV8_FIRST)) + return (EINVAL); + } pm->pm_md.pm_arm64.pm_arm64_evsel = config; - PMCDBG2(MDP, ALL, 2, "arm64-allocate ri=%d -> config=0x%x", ri, config); return (0); From owner-dev-commits-src-all@freebsd.org Wed Jun 30 19:49:16 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8A4E464AB5A; Wed, 30 Jun 2021 19:49: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 4GFX3c0Crlz3nZY; Wed, 30 Jun 2021 19:49:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 9EF2D12E33; Wed, 30 Jun 2021 19:49:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UJnF5J071009; Wed, 30 Jun 2021 19:49:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UJnFg3071008; Wed, 30 Jun 2021 19:49:15 GMT (envelope-from git) Date: Wed, 30 Jun 2021 19:49:15 GMT Message-Id: <202106301949.15UJnFg3071008@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 28dd6730a5d6 - main - libpmc: enable pmu_utils on arm64 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 28dd6730a5d6bc73aca4c015c0ff875a9def25ac Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 19:49:16 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=28dd6730a5d6bc73aca4c015c0ff875a9def25ac commit 28dd6730a5d6bc73aca4c015c0ff875a9def25ac Author: Mitchell Horne AuthorDate: 2021-05-27 20:02:04 +0000 Commit: Mitchell Horne CommitDate: 2021-06-30 19:47:18 +0000 libpmc: enable pmu_utils on arm64 This allows supported libpmc to query/select from the pmu-events table, which may have a more complete set of events than what we define manually. A future update to these definitions should greatly improve this support. The alias table is empty for now, until this future import is complete. Add the Foundation's copyright for recent work on this file. Reviewed by: ray (slightly earlier version) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30603 --- lib/libpmc/libpmc_pmu_util.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/lib/libpmc/libpmc_pmu_util.c b/lib/libpmc/libpmc_pmu_util.c index 81320a3dc954..d33abdb50acc 100644 --- a/lib/libpmc/libpmc_pmu_util.c +++ b/lib/libpmc/libpmc_pmu_util.c @@ -2,6 +2,10 @@ * SPDX-License-Identifier: BSD-2-Clause-FreeBSD * * Copyright (c) 2018, Matthew Macy + * Copyright (c) 2021, The FreeBSD Foundation + * + * Portions of this software were developed by Mitchell Horne + * under sponsorship from the FreeBSD Foundation. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -139,6 +143,24 @@ pmu_alias_get(const char *name) return (name); } +#elif defined(__aarch64__) + +static struct pmu_alias pmu_armv8_alias_table[] = { + {NULL, NULL}, +}; + +static const char * +pmu_alias_get(const char *name) +{ + struct pmu_alias *pa; + + for (pa = pmu_armv8_alias_table; pa->pa_alias != NULL; pa++) + if (strcasecmp(name, pa->pa_alias) == 0) + return (pa->pa_name); + + return (name); +} + #else static const char * @@ -549,6 +571,28 @@ pmc_pmu_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm) return (pmc_pmu_amd_pmcallocate(event_name, pm, &ped)); } +#elif defined(__aarch64__) + +int +pmc_pmu_pmcallocate(const char *event_name, struct pmc_op_pmcallocate *pm) +{ + const struct pmu_event *pe; + int idx = -1; + + event_name = pmu_alias_get(event_name); + if ((pe = pmu_event_get(NULL, event_name, &idx)) == NULL) + return (ENOENT); + if (pe->event == NULL) + return (ENOENT); + + assert(idx >= 0); + pm->pm_md.pm_md_flags |= PM_MD_RAW_EVENT; + pm->pm_class = PMC_CLASS_ARMV8; + pm->pm_caps |= (PMC_CAP_READ | PMC_CAP_WRITE); + + return (0); +} + #else int From owner-dev-commits-src-all@freebsd.org Wed Jun 30 19:49:14 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 18A0E64AB45; Wed, 30 Jun 2021 19:49: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 4GFX3Y41bLz3nFQ; Wed, 30 Jun 2021 19:49: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 5984A12CFA; Wed, 30 Jun 2021 19:49:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UJnDVd070958; Wed, 30 Jun 2021 19:49:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UJnD5Y070956; Wed, 30 Jun 2021 19:49:13 GMT (envelope-from git) Date: Wed, 30 Jun 2021 19:49:13 GMT Message-Id: <202106301949.15UJnD5Y070956@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 5867cccdc49d - main - hwpmc_arm64: fill kern.hwpmc.cpuid MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5867cccdc49df3e7eb3147d6516b488dd8384afe Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 19:49:14 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=5867cccdc49df3e7eb3147d6516b488dd8384afe commit 5867cccdc49df3e7eb3147d6516b488dd8384afe Author: Mitchell Horne AuthorDate: 2021-04-01 13:19:43 +0000 Commit: Mitchell Horne CommitDate: 2021-06-30 19:26:07 +0000 hwpmc_arm64: fill kern.hwpmc.cpuid This will be used to detect supported pmu events. The expected format is the MIDR register with the revision and variant fields masked. See also: lib/libpmc/pmu-events/arch/arm64/mapfile.csv. MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D30601 --- sys/dev/hwpmc/hwpmc_arm64.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index ba98eaefcc9a..be26605bad51 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -505,6 +505,7 @@ pmc_arm64_initialize() struct pmc_classdep *pcd; int idcode, impcode; int reg; + uint64_t midr; reg = arm64_pmcr_read(); arm64_npmcs = (reg & PMCR_N_MASK) >> PMCR_N_SHIFT; @@ -513,6 +514,18 @@ pmc_arm64_initialize() PMCDBG1(MDP, INI, 1, "arm64-init npmcs=%d", arm64_npmcs); + /* + * Write the CPU model to kern.hwpmc.cpuid. + * + * We zero the variant and revision fields. + * + * TODO: how to handle differences between cores due to big.LITTLE? + * For now, just use MIDR from CPU 0. + */ + midr = (uint64_t)(pcpu_find(0)->pc_midr); + midr &= ~(CPU_VAR_MASK | CPU_REV_MASK); + snprintf(pmc_cpuid, sizeof(pmc_cpuid), "0x%016lx", midr); + /* * Allocate space for pointers to PMC HW descriptors and for * the MDEP structure used by MI code. From owner-dev-commits-src-all@freebsd.org Wed Jun 30 20:09:59 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AF3064BBFE; Wed, 30 Jun 2021 20:09: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 4GFXWW2cVkz3qtq; Wed, 30 Jun 2021 20:09: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 420D813293; Wed, 30 Jun 2021 20:09: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 15UK9xp1098815; Wed, 30 Jun 2021 20:09:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UK9xb6098814; Wed, 30 Jun 2021 20:09:59 GMT (envelope-from git) Date: Wed, 30 Jun 2021 20:09:59 GMT Message-Id: <202106302009.15UK9xb6098814@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Allan Jude Subject: git: 781c3b51193e - main - Add Thomas Munro to the committers graph MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: allanjude X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 781c3b51193e5bd99773439192ca68fdfdd9c330 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 20:09:59 -0000 The branch main has been updated by allanjude: URL: https://cgit.FreeBSD.org/src/commit/?id=781c3b51193e5bd99773439192ca68fdfdd9c330 commit 781c3b51193e5bd99773439192ca68fdfdd9c330 Author: Allan Jude AuthorDate: 2021-06-30 20:09:18 +0000 Commit: Allan Jude CommitDate: 2021-06-30 20:09:18 +0000 Add Thomas Munro to the committers graph Reported by: gnn --- share/misc/committers-src.dot | 3 +++ 1 file changed, 3 insertions(+) diff --git a/share/misc/committers-src.dot b/share/misc/committers-src.dot index fcb6f6b800dd..677b12a41e72 100644 --- a/share/misc/committers-src.dot +++ b/share/misc/committers-src.dot @@ -353,6 +353,7 @@ thj [label="Tom Jones\nthj@FreeBSD.org\n2018/04/07"] thompsa [label="Andrew Thompson\nthompsa@FreeBSD.org\n2005/05/25"] ticso [label="Bernd Walter\nticso@FreeBSD.org\n2002/01/31"] tijl [label="Tijl Coosemans\ntijl@FreeBSD.org\n2010/07/16"] +tmunro [label="Thomas Munro\ntmunro@FreeBSD.org\n2018/10/15"] tsoome [label="Toomas Soome\ntsoome@FreeBSD.org\n2016/08/10"] trasz [label="Edward Tomasz Napierala\ntrasz@FreeBSD.org\n2008/08/22"] trhodes [label="Tom Rhodes\ntrhodes@FreeBSD.org\n2002/05/28"] @@ -410,6 +411,7 @@ adrian -> sgalabov ae -> melifaro allanjude -> rew +allanjude -> tmunro allanjude -> tsoome alc -> davide @@ -745,6 +747,7 @@ mdodd -> jake mike -> das mjg -> kaktus +mjg -> tmunro mlaier -> benjsc mlaier -> dhartmei From owner-dev-commits-src-all@freebsd.org Wed Jun 30 20:35:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E13D064C542; Wed, 30 Jun 2021 20:35: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 4GFY4N5yWLz3t1G; Wed, 30 Jun 2021 20:35: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 B0AB51365D; Wed, 30 Jun 2021 20:35: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 15UKZ0PZ038168; Wed, 30 Jun 2021 20:35:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UKZ0m3038167; Wed, 30 Jun 2021 20:35:00 GMT (envelope-from git) Date: Wed, 30 Jun 2021 20:35:00 GMT Message-Id: <202106302035.15UKZ0m3038167@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Antoine Brodin Subject: git: d75d33870df1 - main - ObsoleteFiles.inc: add a few missed files MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: antoine X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d75d33870df197309e40d07541b8547447e20286 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 20:35:00 -0000 The branch main has been updated by antoine: URL: https://cgit.FreeBSD.org/src/commit/?id=d75d33870df197309e40d07541b8547447e20286 commit d75d33870df197309e40d07541b8547447e20286 Author: Antoine Brodin AuthorDate: 2021-06-30 20:34:01 +0000 Commit: Antoine Brodin CommitDate: 2021-06-30 20:34:36 +0000 ObsoleteFiles.inc: add a few missed files --- ObsoleteFiles.inc | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 38cbbd7807ca..60707faebefc 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -3967,6 +3967,9 @@ OLD_FILES+=usr/libexec/kgdb OLD_FILES+=usr/share/man/man4/hme.4.gz OLD_FILES+=usr/share/man/man4/if_hme.4.gz +# 20201129: RADIX_MPATH removed +OLD_FILES+=usr/include/net/radix_mpath.h + # 20201124: ping6(8) was merged into ping(8) OLD_FILES+=usr/lib/debug/sbin/ping6.debug OLD_FILES+=usr/share/man/man8/ping6.8.gz @@ -4048,6 +4051,9 @@ OLD_FILES+=boot/lua/logo-fbsdbw.lua OLD_FILES+=boot/lua/logo-orb.lua OLD_FILES+=boot/lua/logo-orbbw.lua +# 20200828: net/route/shared.h moved to net/route/route_var.h +OLD_FILES+=usr/include/net/route/shared.h + # 20200825: merged OpenZFS support OLD_LIBS+=lib/libzfs.so.3 OLD_LIBS+=usr/lib32/libzfs.so.3 @@ -4323,6 +4329,9 @@ OLD_FILES+=usr/share/man/man4/cy.4.gz OLD_FILES+=usr/share/man/man4/rc.4.gz OLD_FILES+=usr/share/man/man4/rp.4.gz +# 20200721: sys/iommu.h moved to dev/iommu/ +OLD_FILES+=usr/include/sys/iommu.h + # 20200715: rework of devstat(9) man page OLD_FILES+=usr/share/man/man9/devstat_add_entry.9.gz @@ -5782,6 +5791,37 @@ OLD_FILES+=usr/libexec/cc1plus OLD_FILES+=usr/share/man/man1/gcpp.1.gz OLD_FILES+=usr/share/man/man1/gperf.1.gz OLD_FILES+=usr/share/man/man7/gperf.7.gz +OLD_DIRS+=usr/include/c++/4.2/tr1 +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/unordered_iterator +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/trie_policy +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/tree_policy +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/thin_heap_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/splay_tree_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/resize_policy +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/rc_binomial_heap_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/rb_tree_map_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/pat_trie_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/pairing_heap_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/ov_tree_map_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_policy +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/list_update_map_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/left_child_next_sibling_heap_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/hash_fn +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/gp_hash_table_map_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/eq_fn +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/cc_hash_table_map_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/binomial_heap_base_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/binomial_heap_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/binary_heap_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/bin_search_tree_ +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail/basic_tree_policy +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds/detail +OLD_DIRS+=usr/include/c++/4.2/ext/pb_ds +OLD_DIRS+=usr/include/c++/4.2/ext +OLD_DIRS+=usr/include/c++/4.2/debug +OLD_DIRS+=usr/include/c++/4.2/bits +OLD_DIRS+=usr/include/c++/4.2/backward +OLD_DIRS+=usr/include/c++/4.2 # 20200220: Upgrade of ncurses, shlib bumped to version 9 OLD_LIBS+=lib/libncurses.so.8 @@ -5797,6 +5837,7 @@ OLD_FILES+=usr/share/man/man1/elf2aout.1.gz OLD_FILES+=usr/sbin/simple_httpd # 20200127: vpo removed +OLD_FILES+=usr/include/dev/ppbus/vpoio.h OLD_FILES+=usr/share/man/man4/imm.4.gz OLD_FILES+=usr/share/man/man4/vpo.4.gz From owner-dev-commits-src-all@freebsd.org Wed Jun 30 21:00:26 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E143650310; Wed, 30 Jun 2021 21:00: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 4GFYdk2kK4z4TRr; Wed, 30 Jun 2021 21:00:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 45DCB13F07; Wed, 30 Jun 2021 21:00:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15UL0Q54082568; Wed, 30 Jun 2021 21:00:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UL0QbN082567; Wed, 30 Jun 2021 21:00:26 GMT (envelope-from git) Date: Wed, 30 Jun 2021 21:00:26 GMT Message-Id: <202106302100.15UL0QbN082567@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Houchard Subject: git: 8c3bd133dd52 - main - arm: Make sure we can handle a thumb entry point. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cognet X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c3bd133dd52824e427e350c65eae1fd9eb5a3cd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 21:00:26 -0000 The branch main has been updated by cognet: URL: https://cgit.FreeBSD.org/src/commit/?id=8c3bd133dd52824e427e350c65eae1fd9eb5a3cd commit 8c3bd133dd52824e427e350c65eae1fd9eb5a3cd Author: Olivier Houchard AuthorDate: 2021-06-30 20:56:50 +0000 Commit: Olivier Houchard CommitDate: 2021-06-30 20:56:50 +0000 arm: Make sure we can handle a thumb entry point. Similarly to what's been done on arm64 with commit 712c060c94fd447c91b0e6218c12a431206b487a, when executing a binary, if the entry point is a thumb symbol, then make sure we set the PSL_T flag, otherwise the CPU will interpret it in ARM mode, and that will likely leads to an undefined instruction. PR: 256899 MFC after: 1 week --- sys/arm/arm/machdep.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/arm/arm/machdep.c b/sys/arm/arm/machdep.c index 4f26c6e9ebf9..c852187087b3 100644 --- a/sys/arm/arm/machdep.c +++ b/sys/arm/arm/machdep.c @@ -346,6 +346,8 @@ exec_setregs(struct thread *td, struct image_params *imgp, uintptr_t stack) tf->tf_svc_lr = 0x77777777; tf->tf_pc = imgp->entry_addr; tf->tf_spsr = PSR_USR32_MODE; + if ((register_t)imgp->entry_addr & 1) + tf->tf_spsr |= PSR_T; } #ifdef VFP From owner-dev-commits-src-all@freebsd.org Wed Jun 30 21:22:15 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E659A650745; Wed, 30 Jun 2021 21:22:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFZ6v6G1wz4WJx; Wed, 30 Jun 2021 21:22:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BF5821436C; Wed, 30 Jun 2021 21:22:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15ULMFps013498; Wed, 30 Jun 2021 21:22:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ULMF70013497; Wed, 30 Jun 2021 21:22:15 GMT (envelope-from git) Date: Wed, 30 Jun 2021 21:22:15 GMT Message-Id: <202106302122.15ULMF70013497@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 13f5a3076bc8 - main - hwpmc_arm64: add a PMCDBG to the interrupt handler MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 13f5a3076bc8f3774b82f2d5ca29e2e0e2af997b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 21:22:16 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=13f5a3076bc8f3774b82f2d5ca29e2e0e2af997b commit 13f5a3076bc8f3774b82f2d5ca29e2e0e2af997b Author: Mitchell Horne AuthorDate: 2021-05-19 16:29:59 +0000 Commit: Mitchell Horne CommitDate: 2021-06-30 21:21:23 +0000 hwpmc_arm64: add a PMCDBG to the interrupt handler MFC after: 3 days Sponsored by: The FreeBSD Foundation --- sys/dev/hwpmc/hwpmc_arm64.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/hwpmc/hwpmc_arm64.c b/sys/dev/hwpmc/hwpmc_arm64.c index 6b98fb46e7f1..84a8791287f7 100644 --- a/sys/dev/hwpmc/hwpmc_arm64.c +++ b/sys/dev/hwpmc/hwpmc_arm64.c @@ -359,6 +359,9 @@ arm64_intr(struct trapframe *tf) KASSERT(cpu >= 0 && cpu < pmc_cpu_max(), ("[arm64,%d] CPU %d out of range", __LINE__, cpu)); + PMCDBG3(MDP,INT,1, "cpu=%d tf=%p um=%d", cpu, (void *)tf, + TRAPF_USERMODE(tf)); + retval = 0; pc = arm64_pcpu[cpu]; From owner-dev-commits-src-all@freebsd.org Wed Jun 30 21:22:17 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 16010650A6B; Wed, 30 Jun 2021 21:22: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 4GFZ6w71sCz4WJf; Wed, 30 Jun 2021 21:22: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 CA3081436D; Wed, 30 Jun 2021 21:22: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 15ULMGbw013528; Wed, 30 Jun 2021 21:22:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ULMGHD013525; Wed, 30 Jun 2021 21:22:16 GMT (envelope-from git) Date: Wed, 30 Jun 2021 21:22:16 GMT Message-Id: <202106302122.15ULMGHD013525@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 8c2dd68caa96 - main - libpmc: Import AMD Zen 3 PMU events MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c2dd68caa963f1900a8228b0732b04f5d530ffa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 21:22:17 -0000 The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=8c2dd68caa963f1900a8228b0732b04f5d530ffa commit 8c2dd68caa963f1900a8228b0732b04f5d530ffa Author: Greg V AuthorDate: 2021-06-30 21:15:21 +0000 Commit: Mitchell Horne CommitDate: 2021-06-30 21:21:23 +0000 libpmc: Import AMD Zen 3 PMU events Reviewed by: mav, mhorne MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D30965 --- lib/libpmc/pmu-events/arch/x86/amdzen3/branch.json | 53 +++ lib/libpmc/pmu-events/arch/x86/amdzen3/cache.json | 402 +++++++++++++++++++ lib/libpmc/pmu-events/arch/x86/amdzen3/core.json | 137 +++++++ .../pmu-events/arch/x86/amdzen3/data-fabric.json | 98 +++++ .../arch/x86/amdzen3/floating-point.json | 139 +++++++ lib/libpmc/pmu-events/arch/x86/amdzen3/memory.json | 428 +++++++++++++++++++++ lib/libpmc/pmu-events/arch/x86/amdzen3/other.json | 103 +++++ .../pmu-events/arch/x86/amdzen3/recommended.json | 214 +++++++++++ lib/libpmc/pmu-events/arch/x86/mapfile.csv | 1 + 9 files changed, 1575 insertions(+) diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen3/branch.json b/lib/libpmc/pmu-events/arch/x86/amdzen3/branch.json new file mode 100644 index 000000000000..018a7fe94fb9 --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen3/branch.json @@ -0,0 +1,53 @@ +[ + { + "EventName": "bp_l1_btb_correct", + "EventCode": "0x8a", + "BriefDescription": "L1 Branch Prediction Overrides Existing Prediction (speculative)." + }, + { + "EventName": "bp_l2_btb_correct", + "EventCode": "0x8b", + "BriefDescription": "L2 Branch Prediction Overrides Existing Prediction (speculative)." + }, + { + "EventName": "bp_dyn_ind_pred", + "EventCode": "0x8e", + "BriefDescription": "Dynamic Indirect Predictions.", + "PublicDescription": "The number of times a branch used the indirect predictor to make a prediction." + }, + { + "EventName": "bp_de_redirect", + "EventCode": "0x91", + "BriefDescription": "Decode Redirects", + "PublicDescription": "The number of times the instruction decoder overrides the predicted target." + }, + { + "EventName": "bp_l1_tlb_fetch_hit", + "EventCode": "0x94", + "BriefDescription": "The number of instruction fetches that hit in the L1 ITLB.", + "UMask": "0xff" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if1g", + "EventCode": "0x94", + "BriefDescription": "The number of instruction fetches that hit in the L1 ITLB. L1 Instruction TLB hit (1G page size).", + "UMask": "0x04" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if2m", + "EventCode": "0x94", + "BriefDescription": "The number of instruction fetches that hit in the L1 ITLB. L1 Instruction TLB hit (2M page size).", + "UMask": "0x02" + }, + { + "EventName": "bp_l1_tlb_fetch_hit.if4k", + "EventCode": "0x94", + "BriefDescription": "The number of instruction fetches that hit in the L1 ITLB. L1 Instrcution TLB hit (4K or 16K page size).", + "UMask": "0x01" + }, + { + "EventName": "bp_tlb_rel", + "EventCode": "0x99", + "BriefDescription": "The number of ITLB reload requests." + } +] diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen3/cache.json b/lib/libpmc/pmu-events/arch/x86/amdzen3/cache.json new file mode 100644 index 000000000000..fa1d7499a2e3 --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen3/cache.json @@ -0,0 +1,402 @@ +[ + { + "EventName": "l2_request_g1.rd_blk_l", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). Data cache reads (including hardware and software prefetch).", + "UMask": "0x80" + }, + { + "EventName": "l2_request_g1.rd_blk_x", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). Data cache stores.", + "UMask": "0x40" + }, + { + "EventName": "l2_request_g1.ls_rd_blk_c_s", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). Data cache shared reads.", + "UMask": "0x20" + }, + { + "EventName": "l2_request_g1.cacheable_ic_read", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). Instruction cache reads.", + "UMask": "0x10" + }, + { + "EventName": "l2_request_g1.change_to_x", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). Data cache state change requests. Request change to writable, check L2 for current state.", + "UMask": "0x08" + }, + { + "EventName": "l2_request_g1.prefetch_l2_cmd", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). PrefetchL2Cmd.", + "UMask": "0x04" + }, + { + "EventName": "l2_request_g1.l2_hw_pf", + "EventCode": "0x60", + "BriefDescription": "All L2 Cache Requests (Breakdown 1 - Common). L2 Prefetcher. All prefetches accepted by L2 pipeline, hit or miss. Types of PF and L2 hit/miss broken out in a separate perfmon event.", + "UMask": "0x02" + }, + { + "EventName": "l2_request_g1.group2", + "EventCode": "0x60", + "BriefDescription": "Miscellaneous events covered in more detail by l2_request_g2 (PMCx061).", + "UMask": "0x01" + }, + { + "EventName": "l2_request_g1.all_no_prefetch", + "EventCode": "0x60", + "UMask": "0xf9" + }, + { + "EventName": "l2_request_g2.group1", + "EventCode": "0x61", + "BriefDescription": "Miscellaneous events covered in more detail by l2_request_g1 (PMCx060).", + "UMask": "0x80" + }, + { + "EventName": "l2_request_g2.ls_rd_sized", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Data cache read sized.", + "UMask": "0x40" + }, + { + "EventName": "l2_request_g2.ls_rd_sized_nc", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Data cache read sized non-cacheable.", + "UMask": "0x20" + }, + { + "EventName": "l2_request_g2.ic_rd_sized", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Instruction cache read sized.", + "UMask": "0x10" + }, + { + "EventName": "l2_request_g2.ic_rd_sized_nc", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Instruction cache read sized non-cacheable.", + "UMask": "0x08" + }, + { + "EventName": "l2_request_g2.smc_inval", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Self-modifying code invalidates.", + "UMask": "0x04" + }, + { + "EventName": "l2_request_g2.bus_locks_originator", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Bus locks.", + "UMask": "0x02" + }, + { + "EventName": "l2_request_g2.bus_locks_responses", + "EventCode": "0x61", + "BriefDescription": "All L2 Cache Requests (Breakdown 2 - Rare). Bus lock response.", + "UMask": "0x01" + }, + { + "EventName": "l2_latency.l2_cycles_waiting_on_fills", + "EventCode": "0x62", + "BriefDescription": "Total cycles spent waiting for L2 fills to complete from L3 or memory, divided by four. Event counts are for both threads. To calculate average latency, the number of fills from both threads must be used.", + "UMask": "0x01" + }, + { + "EventName": "l2_wcb_req.wcb_write", + "EventCode": "0x63", + "BriefDescription": "LS to L2 WCB write requests. LS (Load/Store unit) to L2 WCB (Write Combining Buffer) write requests.", + "UMask": "0x40" + }, + { + "EventName": "l2_wcb_req.wcb_close", + "EventCode": "0x63", + "BriefDescription": "LS to L2 WCB close requests. LS (Load/Store unit) to L2 WCB (Write Combining Buffer) close requests.", + "UMask": "0x20" + }, + { + "EventName": "l2_wcb_req.zero_byte_store", + "EventCode": "0x63", + "BriefDescription": "LS to L2 WCB zero byte store requests. LS (Load/Store unit) to L2 WCB (Write Combining Buffer) zero byte store requests.", + "UMask": "0x04" + }, + { + "EventName": "l2_wcb_req.cl_zero", + "EventCode": "0x63", + "BriefDescription": "LS to L2 WCB cache line zeroing requests. LS (Load/Store unit) to L2 WCB (Write Combining Buffer) cache line zeroing requests.", + "UMask": "0x01" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_cs", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Data cache shared read hit in L2", + "UMask": "0x80" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_l_hit_x", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Data cache read hit in L2. Modifiable.", + "UMask": "0x40" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_l_hit_s", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Data cache read hit non-modifiable line in L2.", + "UMask": "0x20" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_x", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Data cache store or state change hit in L2.", + "UMask": "0x10" + }, + { + "EventName": "l2_cache_req_stat.ls_rd_blk_c", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Data cache request miss in L2 (all types). Use l2_cache_misses_from_dc_misses instead.", + "UMask": "0x08" + }, + { + "EventName": "l2_cache_req_stat.ic_fill_hit_x", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache hit modifiable line in L2.", + "UMask": "0x04" + }, + { + "EventName": "l2_cache_req_stat.ic_fill_hit_s", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache hit non-modifiable line in L2.", + "UMask": "0x02" + }, + { + "EventName": "l2_cache_req_stat.ic_fill_miss", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache request miss in L2. Use l2_cache_misses_from_ic_miss instead.", + "UMask": "0x01" + }, + { + "EventName": "l2_cache_req_stat.ic_access_in_l2", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache requests in L2.", + "UMask": "0x07" + }, + { + "EventName": "l2_cache_req_stat.ic_dc_miss_in_l2", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache request miss in L2 and Data cache request miss in L2 (all types).", + "UMask": "0x09" + }, + { + "EventName": "l2_cache_req_stat.ic_dc_hit_in_l2", + "EventCode": "0x64", + "BriefDescription": "Core to L2 cacheable request access status (not including L2 Prefetch). Instruction cache request hit in L2 and Data cache request hit in L2 (all types).", + "UMask": "0xf6" + }, + { + "EventName": "l2_fill_pending.l2_fill_busy", + "EventCode": "0x6d", + "BriefDescription": "Cycles with fill pending from L2. Total cycles spent with one or more fill requests in flight from L2.", + "UMask": "0x01" + }, + { + "EventName": "l2_pf_hit_l2", + "EventCode": "0x70", + "BriefDescription": "L2 prefetch hit in L2. Use l2_cache_hits_from_l2_hwpf instead.", + "UMask": "0xff" + }, + { + "EventName": "l2_pf_miss_l2_hit_l3", + "EventCode": "0x71", + "BriefDescription": "L2 prefetcher hits in L3. Counts all L2 prefetches accepted by the L2 pipeline which miss the L2 cache and hit the L3.", + "UMask": "0xff" + }, + { + "EventName": "l2_pf_miss_l2_l3", + "EventCode": "0x72", + "BriefDescription": "L2 prefetcher misses in L3. Counts all L2 prefetches accepted by the L2 pipeline which miss the L2 and the L3 caches.", + "UMask": "0xff" + }, + { + "EventName": "ic_fw32", + "EventCode": "0x80", + "BriefDescription": "The number of 32B fetch windows transferred from IC pipe to DE instruction decoder (includes non-cacheable and cacheable fill responses)." + }, + { + "EventName": "ic_fw32_miss", + "EventCode": "0x81", + "BriefDescription": "The number of 32B fetch windows tried to read the L1 IC and missed in the full tag." + }, + { + "EventName": "ic_cache_fill_l2", + "EventCode": "0x82", + "BriefDescription": "Instruction Cache Refills from L2. The number of 64 byte instruction cache line was fulfilled from the L2 cache." + }, + { + "EventName": "ic_cache_fill_sys", + "EventCode": "0x83", + "BriefDescription": "Instruction Cache Refills from System. The number of 64 byte instruction cache line fulfilled from system memory or another cache." + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_hit", + "EventCode": "0x84", + "BriefDescription": "L1 ITLB Miss, L2 ITLB Hit. The number of instruction fetches that miss in the L1 ITLB but hit in the L2 ITLB." + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss", + "EventCode": "0x85", + "BriefDescription": "The number of instruction fetches that miss in both the L1 and L2 TLBs.", + "UMask": "0xff" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.coalesced_4k", + "EventCode": "0x85", + "BriefDescription": "The number of valid fills into the ITLB originating from the LS Page-Table Walker. Tablewalk requests are issued for L1-ITLB and L2-ITLB misses. Walk for >4K Coalesced page.", + "UMask": "0x08" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.if1g", + "EventCode": "0x85", + "BriefDescription": "The number of valid fills into the ITLB originating from the LS Page-Table Walker. Tablewalk requests are issued for L1-ITLB and L2-ITLB misses. Walk for 1G page.", + "UMask": "0x04" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.if2m", + "EventCode": "0x85", + "BriefDescription": "The number of valid fills into the ITLB originating from the LS Page-Table Walker. Tablewalk requests are issued for L1-ITLB and L2-ITLB misses. Walk for 2M page.", + "UMask": "0x02" + }, + { + "EventName": "bp_l1_tlb_miss_l2_tlb_miss.if4k", + "EventCode": "0x85", + "BriefDescription": "The number of valid fills into the ITLB originating from the LS Page-Table Walker. Tablewalk requests are issued for L1-ITLB and L2-ITLB misses. Walk to 4K page.", + "UMask": "0x01" + }, + { + "EventName": "bp_snp_re_sync", + "EventCode": "0x86", + "BriefDescription": "The number of pipeline restarts caused by invalidating probes that hit on the instruction stream currently being executed. This would happen if the active instruction stream was being modified by another processor in an MP system - typically a highly unlikely event." + }, + { + "EventName": "ic_fetch_stall.ic_stall_any", + "EventCode": "0x87", + "BriefDescription": "Instruction Pipe Stall. IC pipe was stalled during this clock cycle for any reason (nothing valid in pipe ICM1).", + "UMask": "0x04" + }, + { + "EventName": "ic_fetch_stall.ic_stall_dq_empty", + "EventCode": "0x87", + "BriefDescription": "Instruction Pipe Stall. IC pipe was stalled during this clock cycle (including IC to OC fetches) due to DQ empty.", + "UMask": "0x02" + }, + { + "EventName": "ic_fetch_stall.ic_stall_back_pressure", + "EventCode": "0x87", + "BriefDescription": "Instruction Pipe Stall. IC pipe was stalled during this clock cycle (including IC to OC fetches) due to back-pressure.", + "UMask": "0x01" + }, + { + "EventName": "ic_cache_inval.l2_invalidating_probe", + "EventCode": "0x8c", + "BriefDescription": "IC line invalidated due to L2 invalidating probe (external or LS). The number of instruction cache lines invalidated. A non-SMC event is CMC (cross modifying code), either from the other thread of the core or another core.", + "UMask": "0x02" + }, + { + "EventName": "ic_cache_inval.fill_invalidated", + "EventCode": "0x8c", + "BriefDescription": "IC line invalidated due to overwriting fill response. The number of instruction cache lines invalidated. A non-SMC event is CMC (cross modifying code), either from the other thread of the core or another core.", + "UMask": "0x01" + }, + { + "EventName": "ic_tag_hit_miss.all_instruction_cache_accesses", + "EventCode": "0x18e", + "BriefDescription": "All Instruction Cache Accesses. Counts various IC tag related hit and miss events.", + "UMask": "0x1f" + }, + { + "EventName": "ic_tag_hit_miss.instruction_cache_miss", + "EventCode": "0x18e", + "BriefDescription": "Instruction Cache Miss. Counts various IC tag related hit and miss events.", + "UMask": "0x18" + }, + { + "EventName": "ic_tag_hit_miss.instruction_cache_hit", + "EventCode": "0x18e", + "BriefDescription": "Instruction Cache Hit. Counts various IC tag related hit and miss events.", + "UMask": "0x07" + }, + { + "EventName": "ic_oc_mode_switch.oc_ic_mode_switch", + "EventCode": "0x28a", + "BriefDescription": "OC Mode Switch. OC to IC mode switch.", + "UMask": "0x02" + }, + { + "EventName": "ic_oc_mode_switch.ic_oc_mode_switch", + "EventCode": "0x28a", + "BriefDescription": "OC Mode Switch. IC to OC mode switch.", + "UMask": "0x01" + }, + { + "EventName": "op_cache_hit_miss.all_op_cache_accesses", + "EventCode": "0x28f", + "BriefDescription": "All Op Cache accesses. Counts Op Cache micro-tag hit/miss events", + "UMask": "0x07" + }, + { + "EventName": "op_cache_hit_miss.op_cache_miss", + "EventCode": "0x28f", + "BriefDescription": "Op Cache Miss. Counts Op Cache micro-tag hit/miss events", + "UMask": "0x04" + }, + { + "EventName": "op_cache_hit_miss.op_cache_hit", + "EventCode": "0x28f", + "BriefDescription": "Op Cache Hit. Counts Op Cache micro-tag hit/miss events", + "UMask": "0x03" + }, + { + "EventName": "l3_request_g1.caching_l3_cache_accesses", + "EventCode": "0x01", + "BriefDescription": "Caching: L3 cache accesses", + "UMask": "0x80", + "Unit": "L3PMC" + }, + { + "EventName": "l3_lookup_state.all_l3_req_typs", + "EventCode": "0x04", + "BriefDescription": "All L3 Request Types. All L3 cache Requests", + "UMask": "0xff", + "Unit": "L3PMC" + }, + { + "EventName": "l3_comb_clstr_state.other_l3_miss_typs", + "EventCode": "0x06", + "BriefDescription": "Other L3 Miss Request Types", + "UMask": "0xfe", + "Unit": "L3PMC" + }, + { + "EventName": "l3_comb_clstr_state.request_miss", + "EventCode": "0x06", + "BriefDescription": "L3 cache misses", + "UMask": "0x01", + "Unit": "L3PMC" + }, + { + "EventName": "xi_sys_fill_latency", + "EventCode": "0x90", + "BriefDescription": "L3 Cache Miss Latency. Total cycles for all transactions divided by 16. Ignores SliceMask and ThreadMask.", + "Unit": "L3PMC" + }, + { + "EventName": "xi_ccx_sdp_req1", + "EventCode": "0x9a", + "BriefDescription": "L3 Misses by Request Type. Ignores SliceID, EnAllSlices, CoreID, EnAllCores and ThreadMask. Requires unit mask 0xFF to engage event for counting.", + "UMask": "0xff", + "Unit": "L3PMC" + } +] diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen3/core.json b/lib/libpmc/pmu-events/arch/x86/amdzen3/core.json new file mode 100644 index 000000000000..4e27a2be359e --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen3/core.json @@ -0,0 +1,137 @@ +[ + { + "EventName": "ex_ret_instr", + "EventCode": "0xc0", + "BriefDescription": "Retired Instructions." + }, + { + "EventName": "ex_ret_ops", + "EventCode": "0xc1", + "BriefDescription": "Retired Ops. Use macro_ops_retired instead.", + "PublicDescription": "The number of macro-ops retired." + }, + { + "EventName": "ex_ret_brn", + "EventCode": "0xc2", + "BriefDescription": "Retired Branch Instructions.", + "PublicDescription": "The number of branch instructions retired. This includes all types of architectural control flow changes, including exceptions and interrupts." + }, + { + "EventName": "ex_ret_brn_misp", + "EventCode": "0xc3", + "BriefDescription": "Retired Branch Instructions Mispredicted.", + "PublicDescription": "The number of retired branch instructions, that were mispredicted." + }, + { + "EventName": "ex_ret_brn_tkn", + "EventCode": "0xc4", + "BriefDescription": "Retired Taken Branch Instructions.", + "PublicDescription": "The number of taken branches that were retired. This includes all types of architectural control flow changes, including exceptions and interrupts." + }, + { + "EventName": "ex_ret_brn_tkn_misp", + "EventCode": "0xc5", + "BriefDescription": "Retired Taken Branch Instructions Mispredicted.", + "PublicDescription": "The number of retired taken branch instructions that were mispredicted." + }, + { + "EventName": "ex_ret_brn_far", + "EventCode": "0xc6", + "BriefDescription": "Retired Far Control Transfers.", + "PublicDescription": "The number of far control transfers retired including far call/jump/return, IRET, SYSCALL and SYSRET, plus exceptions and interrupts. Far control transfers are not subject to branch prediction." + }, + { + "EventName": "ex_ret_brn_resync", + "EventCode": "0xc7", + "BriefDescription": "Retired Branch Resyncs.", + "PublicDescription": "The number of resync branches. These reflect pipeline restarts due to certain microcode assists and events such as writes to the active instruction stream, among other things. Each occurrence reflects a restart penalty similar to a branch mispredict. This is relatively rare." + }, + { + "EventName": "ex_ret_near_ret", + "EventCode": "0xc8", + "BriefDescription": "Retired Near Returns.", + "PublicDescription": "The number of near return instructions (RET or RET Iw) retired." + }, + { + "EventName": "ex_ret_near_ret_mispred", + "EventCode": "0xc9", + "BriefDescription": "Retired Near Returns Mispredicted.", + "PublicDescription": "The number of near returns retired that were not correctly predicted by the return address predictor. Each such mispredict incurs the same penalty as a mispredicted conditional branch instruction." + }, + { + "EventName": "ex_ret_brn_ind_misp", + "EventCode": "0xca", + "BriefDescription": "Retired Indirect Branch Instructions Mispredicted.", + "PublicDescription": "The number of indirect branches retired that were not correctly predicted. Each such mispredict incurs the same penalty as a mispredicted conditional branch instruction. Note that only EX mispredicts are counted." + }, + { + "EventName": "ex_ret_mmx_fp_instr.sse_instr", + "EventCode": "0xcb", + "BriefDescription": "SSE instructions (SSE, SSE2, SSE3, SSSE3, SSE4A, SSE41, SSE42, AVX).", + "PublicDescription": "The number of MMX, SSE or x87 instructions retired. The UnitMask allows the selection of the individual classes of instructions as given in the table. Each increment represents one complete instruction. Since this event includes non-numeric instructions it is not suitable for measuring MFLOPS.", + "UMask": "0x04" + }, + { + "EventName": "ex_ret_mmx_fp_instr.mmx_instr", + "EventCode": "0xcb", + "BriefDescription": "MMX instructions.", + "PublicDescription": "The number of MMX, SSE or x87 instructions retired. The UnitMask allows the selection of the individual classes of instructions as given in the table. Each increment represents one complete instruction. Since this event includes non-numeric instructions it is not suitable for measuring MFLOPS. MMX instructions.", + "UMask": "0x02" + }, + { + "EventName": "ex_ret_mmx_fp_instr.x87_instr", + "EventCode": "0xcb", + "BriefDescription": "x87 instructions.", + "PublicDescription": "The number of MMX, SSE or x87 instructions retired. The UnitMask allows the selection of the individual classes of instructions as given in the table. Each increment represents one complete instruction. Since this event includes non-numeric instructions it is not suitable for measuring MFLOPS. x87 instructions.", + "UMask": "0x01" + }, + { + "EventName": "ex_ret_ind_brch_instr", + "EventCode": "0xcc", + "BriefDescription": "Retired Indirect Branch Instructions. The number of indirect branches retired." + }, + { + "EventName": "ex_ret_cond", + "EventCode": "0xd1", + "BriefDescription": "Retired Conditional Branch Instructions." + }, + { + "EventName": "ex_div_busy", + "EventCode": "0xd3", + "BriefDescription": "Div Cycles Busy count." + }, + { + "EventName": "ex_div_count", + "EventCode": "0xd4", + "BriefDescription": "Div Op Count." + }, + { + "EventName": "ex_ret_msprd_brnch_instr_dir_msmtch", + "EventCode": "0x1c7", + "BriefDescription": "Retired Mispredicted Branch Instructions due to Direction Mismatch", + "PublicDescription": "The number of retired conditional branch instructions that were not correctly predicted because of a branch direction mismatch." + }, + { + "EventName": "ex_tagged_ibs_ops.ibs_count_rollover", + "EventCode": "0x1cf", + "BriefDescription": "Tagged IBS Ops. Number of times an op could not be tagged by IBS because of a previous tagged op that has not retired.", + "UMask": "0x04" + }, + { + "EventName": "ex_tagged_ibs_ops.ibs_tagged_ops_ret", + "EventCode": "0x1cf", + "BriefDescription": "Tagged IBS Ops. Number of Ops tagged by IBS that retired.", + "UMask": "0x02" + }, + { + "EventName": "ex_tagged_ibs_ops.ibs_tagged_ops", + "EventCode": "0x1cf", + "BriefDescription": "Tagged IBS Ops. Number of Ops tagged by IBS.", + "UMask": "0x01" + }, + { + "EventName": "ex_ret_fused_instr", + "EventCode": "0x1d0", + "BriefDescription": "Counts retired Fused Instructions." + } +] diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen3/data-fabric.json b/lib/libpmc/pmu-events/arch/x86/amdzen3/data-fabric.json new file mode 100644 index 000000000000..40271df40015 --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen3/data-fabric.json @@ -0,0 +1,98 @@ +[ + { + "EventName": "remote_outbound_data_controller_0", + "PublicDescription": "Remote Link Controller Outbound Packet Types: Data (32B): Remote Link Controller 0", + "EventCode": "0x7c7", + "UMask": "0x02", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_outbound_data_controller_1", + "PublicDescription": "Remote Link Controller Outbound Packet Types: Data (32B): Remote Link Controller 1", + "EventCode": "0x807", + "UMask": "0x02", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_outbound_data_controller_2", + "PublicDescription": "Remote Link Controller Outbound Packet Types: Data (32B): Remote Link Controller 2", + "EventCode": "0x847", + "UMask": "0x02", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "remote_outbound_data_controller_3", + "PublicDescription": "Remote Link Controller Outbound Packet Types: Data (32B): Remote Link Controller 3", + "EventCode": "0x887", + "UMask": "0x02", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "dram_channel_data_controller_0", + "PublicDescription": "DRAM Channel Controller Request Types: Requests with Data (64B): DRAM Channel Controller 0", + "EventCode": "0x07", + "UMask": "0x38", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "dram_channel_data_controller_1", + "PublicDescription": "DRAM Channel Controller Request Types: Requests with Data (64B): DRAM Channel Controller 0", + "EventCode": "0x47", + "UMask": "0x38", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "dram_channel_data_controller_2", + "PublicDescription": "DRAM Channel Controller Request Types: Requests with Data (64B): DRAM Channel Controller 0", + "EventCode": "0x87", + "UMask": "0x38", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "dram_channel_data_controller_3", + "PublicDescription": "DRAM Channel Controller Request Types: Requests with Data (64B): DRAM Channel Controller 0", + "EventCode": "0xc7", + "UMask": "0x38", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "dram_channel_data_controller_4", + "PublicDescription": "DRAM Channel Controller Request Types: Requests with Data (64B): DRAM Channel Controller 0", + "EventCode": "0x107", + "UMask": "0x38", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "dram_channel_data_controller_5", + "PublicDescription": "DRAM Channel Controller Request Types: Requests with Data (64B): DRAM Channel Controller 0", + "EventCode": "0x147", + "UMask": "0x38", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "dram_channel_data_controller_6", + "PublicDescription": "DRAM Channel Controller Request Types: Requests with Data (64B): DRAM Channel Controller 0", + "EventCode": "0x187", + "UMask": "0x38", + "PerPkg": "1", + "Unit": "DFPMC" + }, + { + "EventName": "dram_channel_data_controller_7", + "PublicDescription": "DRAM Channel Controller Request Types: Requests with Data (64B): DRAM Channel Controller 0", + "EventCode": "0x1c7", + "UMask": "0x38", + "PerPkg": "1", + "Unit": "DFPMC" + } +] diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen3/floating-point.json b/lib/libpmc/pmu-events/arch/x86/amdzen3/floating-point.json new file mode 100644 index 000000000000..98cfcb9c78ec --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen3/floating-point.json @@ -0,0 +1,139 @@ +[ + { + "EventName": "fpu_pipe_assignment.total", + "EventCode": "0x00", + "BriefDescription": "Total number of fp uOps.", + "PublicDescription": "Total number of fp uOps. The number of operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS.", + "UMask": "0x0f" + }, + { + "EventName": "fpu_pipe_assignment.total3", + "EventCode": "0x00", + "BriefDescription": "Total number uOps assigned to pipe 3.", + "PublicDescription": "The number of operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one-cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number uOps assigned to pipe 3.", + "UMask": "0x08" + }, + { + "EventName": "fpu_pipe_assignment.total2", + "EventCode": "0x00", + "BriefDescription": "Total number uOps assigned to pipe 2.", + "PublicDescription": "The number of operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number uOps assigned to pipe 2.", + "UMask": "0x04" + }, + { + "EventName": "fpu_pipe_assignment.total1", + "EventCode": "0x00", + "BriefDescription": "Total number uOps assigned to pipe 1.", + "PublicDescription": "The number of operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number uOps assigned to pipe 1.", + "UMask": "0x02" + }, + { + "EventName": "fpu_pipe_assignment.total0", + "EventCode": "0x00", + "BriefDescription": "Total number of fp uOps on pipe 0.", + "PublicDescription": "The number of operations (uOps) dispatched to each of the 4 FPU execution pipelines. This event reflects how busy the FPU pipelines are and may be used for workload characterization. This includes all operations performed by x87, MMX, and SSE instructions, including moves. Each increment represents a one- cycle dispatch event. This event is a speculative event. Since this event includes non-numeric operations it is not suitable for measuring MFLOPS. Total number uOps assigned to pipe 0.", + "UMask": "0x01" + }, + { + "EventName": "fp_ret_sse_avx_ops.all", + "EventCode": "0x03", + "BriefDescription": "All FLOPS. This is a retire-based event. The number of retired SSE/AVX FLOPS. The number of events logged per cycle can vary from 0 to 64. This event can count above 15.", + "UMask": "0xff" + }, + { + "EventName": "fp_ret_sse_avx_ops.mac_flops", + "EventCode": "0x03", + "BriefDescription": "Multiply-Accumulate FLOPs. Each MAC operation is counted as 2 FLOPS. This is a retire-based event. The number of retired SSE/AVX FLOPs. The number of events logged per cycle can vary from 0 to 64. This event requires the use of the MergeEvent since it can count above 15 events per cycle. See 2.1.17.3 [Large Increment per Cycle Events]. It does not provide a useful count without the use of the MergeEvent.", + "UMask": "0x08" + }, + { + "EventName": "fp_ret_sse_avx_ops.div_flops", + "EventCode": "0x03", + "BriefDescription": "Divide/square root FLOPs. This is a retire-based event. The number of retired SSE/AVX FLOPs. The number of events logged per cycle can vary from 0 to 64. This event requires the use of the MergeEvent since it can count above 15 events per cycle. See 2.1.17.3 [Large Increment per Cycle Events]. It does not provide a useful count without the use of the MergeEvent.", + "UMask": "0x04" + }, + { + "EventName": "fp_ret_sse_avx_ops.mult_flops", + "EventCode": "0x03", + "BriefDescription": "Multiply FLOPs. This is a retire-based event. The number of retired SSE/AVX FLOPs. The number of events logged per cycle can vary from 0 to 64. This event requires the use of the MergeEvent since it can count above 15 events per cycle. See 2.1.17.3 [Large Increment per Cycle Events]. It does not provide a useful count without the use of the MergeEvent.", + "UMask": "0x02" + }, + { + "EventName": "fp_ret_sse_avx_ops.add_sub_flops", + "EventCode": "0x03", + "BriefDescription": "Add/subtract FLOPs. This is a retire-based event. The number of retired SSE/AVX FLOPs. The number of events logged per cycle can vary from 0 to 64. This event requires the use of the MergeEvent since it can count above 15 events per cycle. See 2.1.17.3 [Large Increment per Cycle Events]. It does not provide a useful count without the use of the MergeEvent.", + "UMask": "0x01" + }, + { + "EventName": "fp_num_mov_elim_scal_op.optimized", + "EventCode": "0x04", + "BriefDescription": "Number of Scalar Ops optimized. This is a dispatch based speculative event, and is useful for measuring the effectiveness of the Move elimination and Scalar code optimization schemes.", + "UMask": "0x08" + }, + { + "EventName": "fp_num_mov_elim_scal_op.opt_potential", + "EventCode": "0x04", + "BriefDescription": "Number of Ops that are candidates for optimization (have Z-bit either set or pass). This is a dispatch based speculative event, and is useful for measuring the effectiveness of the Move elimination and Scalar code optimization schemes.", + "UMask": "0x04" + }, + { + "EventName": "fp_num_mov_elim_scal_op.sse_mov_ops_elim", + "EventCode": "0x04", + "BriefDescription": "Number of SSE Move Ops eliminated. This is a dispatch based speculative event, and is useful for measuring the effectiveness of the Move elimination and Scalar code optimization schemes.", + "UMask": "0x02" + }, + { + "EventName": "fp_num_mov_elim_scal_op.sse_mov_ops", + "EventCode": "0x04", + "BriefDescription": "Number of SSE Move Ops. This is a dispatch based speculative event, and is useful for measuring the effectiveness of the Move elimination and Scalar code optimization schemes.", + "UMask": "0x01" + }, + { + "EventName": "fp_retired_ser_ops.sse_bot_ret", + "EventCode": "0x05", + "BriefDescription": "SSE/AVX bottom-executing ops retired. The number of serializing Ops retired.", + "UMask": "0x08" + }, + { + "EventName": "fp_retired_ser_ops.sse_ctrl_ret", + "EventCode": "0x05", + "BriefDescription": "SSE/AVX control word mispredict traps. The number of serializing Ops retired.", + "UMask": "0x04" + }, + { + "EventName": "fp_retired_ser_ops.x87_bot_ret", + "EventCode": "0x05", + "BriefDescription": "x87 bottom-executing ops retired. The number of serializing Ops retired.", + "UMask": "0x02" + }, + { + "EventName": "fp_retired_ser_ops.x87_ctrl_ret", + "EventCode": "0x05", + "BriefDescription": "x87 control word mispredict traps due to mispredictions in RC or PC, or changes in mask bits. The number of serializing Ops retired.", + "UMask": "0x01" + }, + { + "EventName": "fp_disp_faults.ymm_spill_fault", + "EventCode": "0x0e", + "BriefDescription": "Floating Point Dispatch Faults. YMM spill fault.", + "UMask": "0x08" + }, + { + "EventName": "fp_disp_faults.ymm_fill_fault", + "EventCode": "0x0e", + "BriefDescription": "Floating Point Dispatch Faults. YMM fill fault.", + "UMask": "0x04" + }, + { + "EventName": "fp_disp_faults.xmm_fill_fault", + "EventCode": "0x0e", + "BriefDescription": "Floating Point Dispatch Faults. XMM fill fault.", + "UMask": "0x02" + }, + { + "EventName": "fp_disp_faults.x87_fill_fault", + "EventCode": "0x0e", + "BriefDescription": "Floating Point Dispatch Faults. x87 fill fault.", + "UMask": "0x01" + } +] diff --git a/lib/libpmc/pmu-events/arch/x86/amdzen3/memory.json b/lib/libpmc/pmu-events/arch/x86/amdzen3/memory.json new file mode 100644 index 000000000000..a2833955dcd2 --- /dev/null +++ b/lib/libpmc/pmu-events/arch/x86/amdzen3/memory.json @@ -0,0 +1,428 @@ +[ + { + "EventName": "ls_bad_status2.stli_other", + "EventCode": "0x24", + "BriefDescription": "Non-forwardable conflict; used to reduce STLI's via software. All reasons. Store To Load Interlock (STLI) are loads that were unable to complete because of a possible match with an older store, and the older store could not do STLF for some reason.", + "PublicDescription" : "Store-to-load conflicts: A load was unable to complete due to a non-forwardable conflict with an older store. Most commonly, a load's address range partially but not completely overlaps with an uncompleted older store. Software can avoid this problem by using same-size and same-alignment loads and stores when accessing the same data. Vector/SIMD code is particularly susceptible to this problem; software should construct wide vector stores by manipulating vector elements in registers using shuffle/blend/swap instructions prior to storing to memory, instead of using narrow element-by-element stores.", + "UMask": "0x02" + }, + { + "EventName": "ls_locks.spec_lock_hi_spec", + "EventCode": "0x25", + "BriefDescription": "Retired lock instructions. High speculative cacheable lock speculation succeeded.", + "UMask": "0x08" + }, + { + "EventName": "ls_locks.spec_lock_lo_spec", + "EventCode": "0x25", + "BriefDescription": "Retired lock instructions. Low speculative cacheable lock speculation succeeded.", + "UMask": "0x04" + }, + { + "EventName": "ls_locks.non_spec_lock", + "EventCode": "0x25", + "BriefDescription": "Retired lock instructions. Non-speculative lock succeeded.", + "UMask": "0x02" + }, + { + "EventName": "ls_locks.bus_lock", + "EventCode": "0x25", + "BriefDescription": "Retired lock instructions. Comparable to legacy bus lock.", + "UMask": "0x01" + }, + { + "EventName": "ls_ret_cl_flush", + "EventCode": "0x26", + "BriefDescription": "The number of retired CLFLUSH instructions. This is a non-speculative event." + }, + { + "EventName": "ls_ret_cpuid", + "EventCode": "0x27", + "BriefDescription": "The number of CPUID instructions retired." + }, + { + "EventName": "ls_dispatch.ld_st_dispatch", + "EventCode": "0x29", + "BriefDescription": "Load-op-Store Dispatch. Dispatch of a single op that performs a load from and store to the same memory address. Counts the number of operations dispatched to the LS unit. Unit Masks ADDed.", + "UMask": "0x04" + }, + { + "EventName": "ls_dispatch.store_dispatch", + "EventCode": "0x29", + "BriefDescription": "Dispatch of a single op that performs a memory store. Counts the number of operations dispatched to the LS unit. Unit Masks ADDed.", + "UMask": "0x02" + }, + { + "EventName": "ls_dispatch.ld_dispatch", + "EventCode": "0x29", + "BriefDescription": "Dispatch of a single op that performs a memory load. Counts the number of operations dispatched to the LS unit. Unit Masks ADDed.", + "UMask": "0x01" + }, + { + "EventName": "ls_smi_rx", + "EventCode": "0x2b", + "BriefDescription": "Counts the number of SMIs received." + }, + { + "EventName": "ls_int_taken", + "EventCode": "0x2c", + "BriefDescription": "Counts the number of interrupts taken." + }, + { + "EventName": "ls_rdtsc", + "EventCode": "0x2d", + "BriefDescription": "Number of reads of the TSC (RDTSC instructions). The count is speculative." + }, + { + "EventName": "ls_stlf", + "EventCode": "0x35", + "BriefDescription": "Number of STLF hits." + }, + { + "EventName": "ls_st_commit_cancel2.st_commit_cancel_wcb_full", + "EventCode": "0x37", + "BriefDescription": "A non-cacheable store and the non-cacheable commit buffer is full.", + "UMask": "0x01" + }, + { + "EventName": "ls_dc_accesses", + "EventCode": "0x40", + "BriefDescription": "Number of accesses to the dcache for load/store references.", + "PublicDescription": "The number of accesses to the data cache for load and store references. This may include certain microcode scratchpad accesses, although these are generally rare. Each increment represents an eight-byte access, although the instruction may only be accessing a portion of that. This event is a speculative event." + }, + { + "EventName": "ls_mab_alloc.all_allocations", + "EventCode": "0x41", *** 672 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Wed Jun 30 21:50:09 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F33B9650DB9; Wed, 30 Jun 2021 21:50:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GFZl56YD8z4XFq; Wed, 30 Jun 2021 21:50:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C65B614661; Wed, 30 Jun 2021 21:50:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 15ULo9ZT043840; Wed, 30 Jun 2021 21:50:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15ULo96s043836; Wed, 30 Jun 2021 21:50:09 GMT (envelope-from git) Date: Wed, 30 Jun 2021 21:50:09 GMT Message-Id: <202106302150.15ULo96s043836@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 447636e43c08 - main - linux(4): implement coredump support MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 447636e43c08d697664512a50f00f93f41c0a79f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 21:50:10 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=447636e43c08d697664512a50f00f93f41c0a79f commit 447636e43c08d697664512a50f00f93f41c0a79f Author: Edward Tomasz Napierala AuthorDate: 2021-06-30 16:45:21 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-06-30 21:45:06 +0000 linux(4): implement coredump support Implement dumping core for Linux binaries on amd64, for both 32- and 64-bit executables. Some bits are still missing. This is based on a prototype by chuck@. Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30019 --- sys/amd64/linux/linux_machdep.c | 34 +++++ sys/amd64/linux/linux_ptrace.c | 33 ----- sys/amd64/linux/linux_sysvec.c | 4 +- sys/amd64/linux32/linux32_sysvec.c | 6 +- sys/arm64/linux/linux_sysvec.c | 4 +- sys/compat/linux/linux_elf.c | 294 +++++++++++++++++++++++++++++++++++++ sys/compat/linux/linux_elf.h | 56 +++++++ sys/compat/linux/linux_elf32.c | 38 +++++ sys/compat/linux/linux_elf64.c | 38 +++++ sys/compat/linux/linux_emul.h | 6 + sys/modules/linux/Makefile | 1 + sys/modules/linux64/Makefile | 1 + 12 files changed, 475 insertions(+), 40 deletions(-) diff --git a/sys/amd64/linux/linux_machdep.c b/sys/amd64/linux/linux_machdep.c index d2f9d0cacd3c..b54674e793c8 100644 --- a/sys/amd64/linux/linux_machdep.c +++ b/sys/amd64/linux/linux_machdep.c @@ -79,6 +79,7 @@ __FBSDID("$FreeBSD$"); #include #include +#include #include #include @@ -347,3 +348,36 @@ DEFINE_IFUNC(, int, futex_xorl, (int, uint32_t *, int *)) return ((cpu_stdext_feature & CPUID_STDEXT_SMAP) != 0 ? futex_xorl_smap : futex_xorl_nosmap); } + +void +bsd_to_linux_regset(struct reg *b_reg, struct linux_pt_regset *l_regset) +{ + + l_regset->r15 = b_reg->r_r15; + l_regset->r14 = b_reg->r_r14; + l_regset->r13 = b_reg->r_r13; + l_regset->r12 = b_reg->r_r12; + l_regset->rbp = b_reg->r_rbp; + l_regset->rbx = b_reg->r_rbx; + l_regset->r11 = b_reg->r_r11; + l_regset->r10 = b_reg->r_r10; + l_regset->r9 = b_reg->r_r9; + l_regset->r8 = b_reg->r_r8; + l_regset->rax = b_reg->r_rax; + l_regset->rcx = b_reg->r_rcx; + l_regset->rdx = b_reg->r_rdx; + l_regset->rsi = b_reg->r_rsi; + l_regset->rdi = b_reg->r_rdi; + l_regset->orig_rax = b_reg->r_rax; + l_regset->rip = b_reg->r_rip; + l_regset->cs = b_reg->r_cs; + l_regset->eflags = b_reg->r_rflags; + l_regset->rsp = b_reg->r_rsp; + l_regset->ss = b_reg->r_ss; + l_regset->fs_base = 0; + l_regset->gs_base = 0; + l_regset->ds = b_reg->r_ds; + l_regset->es = b_reg->r_es; + l_regset->fs = b_reg->r_fs; + l_regset->gs = b_reg->r_gs; +} diff --git a/sys/amd64/linux/linux_ptrace.c b/sys/amd64/linux/linux_ptrace.c index 67d8b121fbf1..9386ba1e6ae3 100644 --- a/sys/amd64/linux/linux_ptrace.c +++ b/sys/amd64/linux/linux_ptrace.c @@ -205,39 +205,6 @@ map_regs_to_linux(struct reg *b_reg, struct linux_pt_reg *l_reg) l_reg->ss = b_reg->r_ss; } -void -bsd_to_linux_regset(struct reg *b_reg, struct linux_pt_regset *l_regset) -{ - - l_regset->r15 = b_reg->r_r15; - l_regset->r14 = b_reg->r_r14; - l_regset->r13 = b_reg->r_r13; - l_regset->r12 = b_reg->r_r12; - l_regset->rbp = b_reg->r_rbp; - l_regset->rbx = b_reg->r_rbx; - l_regset->r11 = b_reg->r_r11; - l_regset->r10 = b_reg->r_r10; - l_regset->r9 = b_reg->r_r9; - l_regset->r8 = b_reg->r_r8; - l_regset->rax = b_reg->r_rax; - l_regset->rcx = b_reg->r_rcx; - l_regset->rdx = b_reg->r_rdx; - l_regset->rsi = b_reg->r_rsi; - l_regset->rdi = b_reg->r_rdi; - l_regset->orig_rax = b_reg->r_rax; - l_regset->rip = b_reg->r_rip; - l_regset->cs = b_reg->r_cs; - l_regset->eflags = b_reg->r_rflags; - l_regset->rsp = b_reg->r_rsp; - l_regset->ss = b_reg->r_ss; - l_regset->fs_base = 0; - l_regset->gs_base = 0; - l_regset->ds = b_reg->r_ds; - l_regset->es = b_reg->r_es; - l_regset->fs = b_reg->r_fs; - l_regset->gs = b_reg->r_gs; -} - static void map_regs_from_linux(struct reg *b_reg, struct linux_pt_reg *l_reg) { diff --git a/sys/amd64/linux/linux_sysvec.c b/sys/amd64/linux/linux_sysvec.c index 655214b10047..c5538932b1e3 100644 --- a/sys/amd64/linux/linux_sysvec.c +++ b/sys/amd64/linux/linux_sysvec.c @@ -741,8 +741,8 @@ struct sysentvec elf_linux_sysvec = { .sv_name = "Linux ELF64", .sv_coredump = elf64_coredump, .sv_elf_core_osabi = ELFOSABI_NONE, - .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, - .sv_elf_core_prepare_notes = elf64_prepare_notes, + .sv_elf_core_abi_vendor = LINUX_ABI_VENDOR, + .sv_elf_core_prepare_notes = linux64_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/amd64/linux32/linux32_sysvec.c b/sys/amd64/linux32/linux32_sysvec.c index 740e8a54a4da..504d57e418a5 100644 --- a/sys/amd64/linux32/linux32_sysvec.c +++ b/sys/amd64/linux32/linux32_sysvec.c @@ -912,9 +912,9 @@ struct sysentvec elf_linux_sysvec = { .sv_szsigcode = &linux_szsigcode, .sv_name = "Linux ELF32", .sv_coredump = elf32_coredump, - .sv_elf_core_osabi = ELFOSABI_FREEBSD, - .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, - .sv_elf_core_prepare_notes = elf32_prepare_notes, + .sv_elf_core_osabi = ELFOSABI_NONE, + .sv_elf_core_abi_vendor = LINUX_ABI_VENDOR, + .sv_elf_core_prepare_notes = linux32_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index 33bc303b5ada..e1d3708b70e9 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -417,8 +417,8 @@ struct sysentvec elf_linux_sysvec = { .sv_name = "Linux ELF64", .sv_coredump = elf64_coredump, .sv_elf_core_osabi = ELFOSABI_NONE, - .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, - .sv_elf_core_prepare_notes = elf64_prepare_notes, + .sv_elf_core_abi_vendor = LINUX_ABI_VENDOR, + .sv_elf_core_prepare_notes = linux64_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/compat/linux/linux_elf.c b/sys/compat/linux/linux_elf.c new file mode 100644 index 000000000000..077e0c93c884 --- /dev/null +++ b/sys/compat/linux/linux_elf.c @@ -0,0 +1,294 @@ +/*- + * SPDX-License-Identifier: BSD-3-Clause + * + * Copyright (c) 2021 Edward Tomasz Napierala + * Copyright (c) 2018 Chuck Tuffli + * Copyright (c) 2017 Dell EMC + * Copyright (c) 2000 David O'Brien + * Copyright (c) 1995-1996 Søren Schmidt + * Copyright (c) 1996 Peter Wemm + * All rights reserved. + * + * This software was developed by the University of Cambridge Computer + * Laboratory as part of the CHERI for Hypervisors and Operating Systems + * (CHaOS) project, funded by EPSRC grant EP/V000292/1. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer + * in this position and unchanged. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#if __ELF_WORD_SIZE == 32 +#define linux_pt_regset linux_pt_regset32 +#define bsd_to_linux_regset bsd_to_linux_regset32 +#include +#else +#include +#endif +#include +#include +#include + +/* This adds "linux32_" and "linux64_" prefixes. */ +#define __linuxN(x) __CONCAT(__CONCAT(__CONCAT(linux,__ELF_WORD_SIZE),_),x) + +#define LINUX_NT_AUXV 6 + +static void __linuxN(note_fpregset)(void *, struct sbuf *, size_t *); +static void __linuxN(note_prpsinfo)(void *, struct sbuf *, size_t *); +static void __linuxN(note_prstatus)(void *, struct sbuf *, size_t *); +static void __linuxN(note_threadmd)(void *, struct sbuf *, size_t *); +static void __linuxN(note_nt_auxv)(void *, struct sbuf *, size_t *); + +void +__linuxN(prepare_notes)(struct thread *td, struct note_info_list *list, + size_t *sizep) +{ + struct proc *p; + struct thread *thr; + size_t size; + + p = td->td_proc; + size = 0; + + /* + * To have the debugger select the right thread (LWP) as the initial + * thread, we dump the state of the thread passed to us in td first. + * This is the thread that causes the core dump and thus likely to + * be the right thread one wants to have selected in the debugger. + */ + thr = td; + while (thr != NULL) { + size += __elfN(register_note)(td, list, + NT_PRSTATUS, __linuxN(note_prstatus), thr); + size += __elfN(register_note)(td, list, + NT_PRPSINFO, __linuxN(note_prpsinfo), p); + size += __elfN(register_note)(td, list, + LINUX_NT_AUXV, __linuxN(note_nt_auxv), p); + size += __elfN(register_note)(td, list, + NT_FPREGSET, __linuxN(note_fpregset), thr); + size += __elfN(register_note)(td, list, + -1, __linuxN(note_threadmd), thr); + + thr = thr == td ? TAILQ_FIRST(&p->p_threads) : + TAILQ_NEXT(thr, td_plist); + if (thr == td) + thr = TAILQ_NEXT(thr, td_plist); + } + + *sizep = size; +} + +typedef struct linux_elf_prstatus linux_elf_prstatus_t; +#if __ELF_WORD_SIZE == 32 +typedef struct prpsinfo32 linux_elf_prpsinfo_t; +typedef struct fpreg32 linux_elf_prfpregset_t; +#else +typedef prpsinfo_t linux_elf_prpsinfo_t; +typedef prfpregset_t linux_elf_prfpregset_t; +#endif + +static void +__linuxN(note_prpsinfo)(void *arg, struct sbuf *sb, size_t *sizep) +{ + struct sbuf sbarg; + size_t len; + char *cp, *end; + struct proc *p; + linux_elf_prpsinfo_t *psinfo; + int error; + + p = arg; + if (sb != NULL) { + KASSERT(*sizep == sizeof(*psinfo), ("invalid size")); + psinfo = malloc(sizeof(*psinfo), M_TEMP, M_ZERO | M_WAITOK); + psinfo->pr_version = PRPSINFO_VERSION; + psinfo->pr_psinfosz = sizeof(linux_elf_prpsinfo_t); + strlcpy(psinfo->pr_fname, p->p_comm, sizeof(psinfo->pr_fname)); + PROC_LOCK(p); + if (p->p_args != NULL) { + len = sizeof(psinfo->pr_psargs) - 1; + if (len > p->p_args->ar_length) + len = p->p_args->ar_length; + memcpy(psinfo->pr_psargs, p->p_args->ar_args, len); + PROC_UNLOCK(p); + error = 0; + } else { + _PHOLD(p); + PROC_UNLOCK(p); + sbuf_new(&sbarg, psinfo->pr_psargs, + sizeof(psinfo->pr_psargs), SBUF_FIXEDLEN); + error = proc_getargv(curthread, p, &sbarg); + PRELE(p); + if (sbuf_finish(&sbarg) == 0) + len = sbuf_len(&sbarg) - 1; + else + len = sizeof(psinfo->pr_psargs) - 1; + sbuf_delete(&sbarg); + } + if (error || len == 0) + strlcpy(psinfo->pr_psargs, p->p_comm, + sizeof(psinfo->pr_psargs)); + else { + KASSERT(len < sizeof(psinfo->pr_psargs), + ("len is too long: %zu vs %zu", len, + sizeof(psinfo->pr_psargs))); + cp = psinfo->pr_psargs; + end = cp + len - 1; + for (;;) { + cp = memchr(cp, '\0', end - cp); + if (cp == NULL) + break; + *cp = ' '; + } + } + psinfo->pr_pid = p->p_pid; + sbuf_bcat(sb, psinfo, sizeof(*psinfo)); + free(psinfo, M_TEMP); + } + *sizep = sizeof(*psinfo); +} + +static void +__linuxN(note_prstatus)(void *arg, struct sbuf *sb, size_t *sizep) +{ + struct thread *td; + linux_elf_prstatus_t *status; +#if __ELF_WORD_SIZE == 32 + struct reg32 pr_reg; +#else + struct reg pr_reg; +#endif + + td = arg; + if (sb != NULL) { + KASSERT(*sizep == sizeof(*status), ("invalid size")); + status = malloc(sizeof(*status), M_TEMP, M_ZERO | M_WAITOK); + + /* + * XXX: Some fields missing. + */ + status->pr_cursig = td->td_proc->p_sig; + status->pr_pid = td->td_tid; + +#if __ELF_WORD_SIZE == 32 + fill_regs32(td, &pr_reg); +#else + fill_regs(td, &pr_reg); +#endif + bsd_to_linux_regset(&pr_reg, &status->pr_reg); + sbuf_bcat(sb, status, sizeof(*status)); + free(status, M_TEMP); + } + *sizep = sizeof(*status); +} + +static void +__linuxN(note_fpregset)(void *arg, struct sbuf *sb, size_t *sizep) +{ + struct thread *td; + linux_elf_prfpregset_t *fpregset; + + td = arg; + if (sb != NULL) { + KASSERT(*sizep == sizeof(*fpregset), ("invalid size")); + fpregset = malloc(sizeof(*fpregset), M_TEMP, M_ZERO | M_WAITOK); +#if __ELF_WORD_SIZE == 32 + fill_fpregs32(td, fpregset); +#else + fill_fpregs(td, fpregset); +#endif + sbuf_bcat(sb, fpregset, sizeof(*fpregset)); + free(fpregset, M_TEMP); + } + *sizep = sizeof(*fpregset); +} + +/* + * Allow for MD specific notes, as well as any MD + * specific preparations for writing MI notes. + */ +static void +__linuxN(note_threadmd)(void *arg, struct sbuf *sb, size_t *sizep) +{ + struct thread *td; + void *buf; + size_t size; + + td = arg; + size = *sizep; + if (size != 0 && sb != NULL) + buf = malloc(size, M_TEMP, M_ZERO | M_WAITOK); + else + buf = NULL; + size = 0; + __elfN(dump_thread)(td, buf, &size); + KASSERT(sb == NULL || *sizep == size, ("invalid size")); + if (size != 0 && sb != NULL) + sbuf_bcat(sb, buf, size); + free(buf, M_TEMP); + *sizep = size; +} + +static void +__linuxN(note_nt_auxv)(void *arg, struct sbuf *sb, size_t *sizep) +{ + struct proc *p; + size_t size; + + p = arg; + if (sb == NULL) { + size = 0; + sb = sbuf_new(NULL, NULL, LINUX_AT_COUNT * sizeof(Elf_Auxinfo), + SBUF_FIXEDLEN); + sbuf_set_drain(sb, sbuf_count_drain, &size); + PHOLD(p); + proc_getauxv(curthread, p, sb); + PRELE(p); + sbuf_finish(sb); + sbuf_delete(sb); + *sizep = size; + } else { + PHOLD(p); + proc_getauxv(curthread, p, sb); + PRELE(p); + } +} diff --git a/sys/compat/linux/linux_elf.h b/sys/compat/linux/linux_elf.h new file mode 100644 index 000000000000..4bb9318e360b --- /dev/null +++ b/sys/compat/linux/linux_elf.h @@ -0,0 +1,56 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Chuck Tuffli + * + * 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. + */ + +#ifndef _COMPAT_LINUX_ELF_H_ +#define _COMPAT_LINUX_ELF_H_ + +struct l_elf_siginfo { + l_int si_signo; + l_int si_code; + l_int si_errno; +}; + +typedef struct linux_pt_regset l_elf_gregset_t; + +struct linux_elf_prstatus { + struct l_elf_siginfo pr_info; + l_short pr_cursig; + l_ulong pr_sigpend; + l_ulong pr_sighold; + l_pid_t pr_pid; + l_pid_t pr_ppid; + l_pid_t pr_pgrp; + l_pid_t pr_sid; + l_timeval pr_utime; + l_timeval pr_stime; + l_timeval pr_cutime; + l_timeval pr_cstime; + l_elf_gregset_t pr_reg; + l_int pr_fpvalid; +}; + +#endif diff --git a/sys/compat/linux/linux_elf32.c b/sys/compat/linux/linux_elf32.c new file mode 100644 index 000000000000..17ee4b6baa0a --- /dev/null +++ b/sys/compat/linux/linux_elf32.c @@ -0,0 +1,38 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Edward Tomasz Napierala + * Copyright (c) 2002 Doug Rabson + * All rights reserved. + * + * This software was developed by the University of Cambridge Computer + * Laboratory as part of the CHERI for Hypervisors and Operating Systems + * (CHaOS) project, funded by EPSRC grant EP/V000292/1. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#define __ELF_WORD_SIZE 32 +#include diff --git a/sys/compat/linux/linux_elf64.c b/sys/compat/linux/linux_elf64.c new file mode 100644 index 000000000000..2e283d763bbc --- /dev/null +++ b/sys/compat/linux/linux_elf64.c @@ -0,0 +1,38 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2021 Edward Tomasz Napierala + * Copyright (c) 2002 Doug Rabson + * All rights reserved. + * + * This software was developed by the University of Cambridge Computer + * Laboratory as part of the CHERI for Hypervisors and Operating Systems + * (CHaOS) project, funded by EPSRC grant EP/V000292/1. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#define __ELF_WORD_SIZE 64 +#include diff --git a/sys/compat/linux/linux_emul.h b/sys/compat/linux/linux_emul.h index de66a7a4c82a..d5f37c918b6c 100644 --- a/sys/compat/linux/linux_emul.h +++ b/sys/compat/linux/linux_emul.h @@ -33,6 +33,10 @@ #define _LINUX_EMUL_H_ struct image_params; +struct note_info_list; + +/* Linux core notes are labeled "CORE" */ +#define LINUX_ABI_VENDOR "CORE" /* * modeled after similar structure in NetBSD @@ -58,6 +62,8 @@ void linux_on_exec(struct proc *, struct image_params *); void linux_thread_dtor(struct thread *); void linux_thread_detach(struct thread *); int linux_common_execve(struct thread *, struct image_args *); +void linux32_prepare_notes(struct thread *, struct note_info_list *, size_t *); +void linux64_prepare_notes(struct thread *, struct note_info_list *, size_t *); /* process emuldata flags */ #define LINUX_XDEPR_REQUEUEOP 0x00000001 /* uses deprecated diff --git a/sys/modules/linux/Makefile b/sys/modules/linux/Makefile index 49d787e2cb99..b2a5816c6919 100644 --- a/sys/modules/linux/Makefile +++ b/sys/modules/linux/Makefile @@ -26,6 +26,7 @@ SRCS+= linux_dummy_x86.c .endif .if ${MACHINE_CPUARCH} == "amd64" SRCS+= linux${SFX}_support.s +SRCS+= linux_elf32.c .else SRCS+= linux_copyout.c .endif diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile index c081151e3fc5..d70983354407 100644 --- a/sys/modules/linux64/Makefile +++ b/sys/modules/linux64/Makefile @@ -18,6 +18,7 @@ SRCS= linux_fork.c linux_dummy_machdep.c linux_file.c linux_event.c \ linux_support.s .if ${MACHINE_CPUARCH} == "amd64" SRCS+= linux_dummy_x86.c +SRCS+= linux_elf64.c .endif DPSRCS= assym.inc linux_genassym.c From owner-dev-commits-src-all@freebsd.org Wed Jun 30 22:19:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A47F26515E9; Wed, 30 Jun 2021 22:19: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 4GFbNy3x4yz4YqL; Wed, 30 Jun 2021 22:19: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 6B16D14D45; Wed, 30 Jun 2021 22:19: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 15UMJU2o080957; Wed, 30 Jun 2021 22:19:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 15UMJU5j080956; Wed, 30 Jun 2021 22:19:30 GMT (envelope-from git) Date: Wed, 30 Jun 2021 22:19:30 GMT Message-Id: <202106302219.15UMJU5j080956@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: c5f4772c66d2 - main - nfscl: Improve "Consider increasing kern.ipc.maxsockbuf" message 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/main X-Git-Reftype: branch X-Git-Commit: c5f4772c66d2eb31b84a84a89c8a284043f03452 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jun 2021 22:19:30 -0000 The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=c5f4772c66d2eb31b84a84a89c8a284043f03452 commit c5f4772c66d2eb31b84a84a89c8a284043f03452 Author: Rick Macklem AuthorDate: 2021-06-30 22:15:41 +0000 Commit: Rick Macklem CommitDate: 2021-06-30 22:15:41 +0000 nfscl: Improve "Consider increasing kern.ipc.maxsockbuf" message When the setting of kern.ipc.maxsockbuf is less than what is desired for I/O based on vfs.maxbcachebuf and vfs.nfs.bufpackets, a console message of "Consider increasing kern.ipc.maxsockbuf". is printed. This patch modifies the message to provide a suggested value for kern.ipc.maxsockbuf. Note that the setting is only needed when the NFS rsize/wsize is set to vfs.maxbcachebuf. While here, make nfs_bufpackets global, so that it can be used by a future patch that adds a sysctl to set the NFS server's maximum I/O size. Also, remove "sizeof(u_int32_t)" from the maximum packet length, since NFS_MAXXDR is already an "overestimate" of the actual length. MFC after: 2 weeks --- sys/fs/nfs/nfs_commonkrpc.c | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/sys/fs/nfs/nfs_commonkrpc.c b/sys/fs/nfs/nfs_commonkrpc.c index 04ef04955ce0..63ff02331a0e 100644 --- a/sys/fs/nfs/nfs_commonkrpc.c +++ b/sys/fs/nfs/nfs_commonkrpc.c @@ -101,8 +101,8 @@ extern int nfscl_debuglevel; extern int nfsrv_lease; SVCPOOL *nfscbd_pool; +int nfs_bufpackets = 4; static int nfsrv_gsscallbackson = 0; -static int nfs_bufpackets = 4; static int nfs_reconnects; static int nfs3_jukebox_delay = 10; static int nfs_skip_wcc_data_onerr = 1; @@ -180,6 +180,7 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq *nrp, struct thread *td = curthread; SVCXPRT *xprt; struct timeval timo; + uint64_t tval; /* * We need to establish the socket using the credentials of @@ -238,8 +239,21 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq *nrp, do { if (error != 0 && pktscale > 2) { if (nmp != NULL && nrp->nr_sotype == SOCK_STREAM && - pktscale == pktscalesav) - printf("Consider increasing kern.ipc.maxsockbuf\n"); + pktscale == pktscalesav) { + /* + * Suggest vfs.nfs.bufpackets * maximum RPC message, + * adjusted for the sb_max->sb_max_adj conversion of + * MCLBYTES / (MSIZE + MCLBYTES) as the minimum setting + * for kern.ipc.maxsockbuf. + */ + tval = (NFS_MAXBSIZE + NFS_MAXXDR) * nfs_bufpackets; + tval *= MSIZE + MCLBYTES; + tval += MCLBYTES - 1; /* Round up divide by MCLBYTES. */ + tval /= MCLBYTES; + printf("Consider increasing kern.ipc.maxsockbuf to a " + "minimum of %ju to support %ubyte NFS I/O\n", + (uintmax_t)tval, NFS_MAXBSIZE); + } pktscale--; } if (nrp->nr_sotype == SOCK_DGRAM) { @@ -255,10 +269,10 @@ newnfs_connect(struct nfsmount *nmp, struct nfssockreq *nrp, if (nrp->nr_sotype != SOCK_STREAM) panic("nfscon sotype"); if (nmp != NULL) { - sndreserve = (NFS_MAXBSIZE + NFS_MAXXDR + - sizeof (u_int32_t)) * pktscale; - rcvreserve = (NFS_MAXBSIZE + NFS_MAXXDR + - sizeof (u_int32_t)) * pktscale; + sndreserve = (NFS_MAXBSIZE + NFS_MAXXDR) * + pktscale; + rcvreserve = (NFS_MAXBSIZE + NFS_MAXXDR) * + pktscale; } else { sndreserve = rcvreserve = 1024 * pktscale; } From owner-dev-commits-src-all@freebsd.org Thu Jul 1 08:29:45 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 438B765FD83; Thu, 1 Jul 2021 08:29: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 4GFrx51VN4z4rQ8; Thu, 1 Jul 2021 08:29: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 1C3D61CF55; Thu, 1 Jul 2021 08:29: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 1618Tjls094286; Thu, 1 Jul 2021 08:29:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1618Tjwp094285; Thu, 1 Jul 2021 08:29:45 GMT (envelope-from git) Date: Thu, 1 Jul 2021 08:29:45 GMT Message-Id: <202107010829.1618Tjwp094285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 93c3453f11c9 - main - linux(4): revert arm64 part of 447636e43c0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93c3453f11c9bc99ae482565b3a3f29b39ab8f62 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 08:29:45 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=93c3453f11c9bc99ae482565b3a3f29b39ab8f62 commit 93c3453f11c9bc99ae482565b3a3f29b39ab8f62 Author: Edward Tomasz Napierala AuthorDate: 2021-07-01 08:28:01 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-07-01 08:29:23 +0000 linux(4): revert arm64 part of 447636e43c0 The arm64 part of the patch was incomplete and prevented linux64.ko from loading due to missing symbol. Sponsored By: EPSRC --- sys/arm64/linux/linux_sysvec.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index e1d3708b70e9..33bc303b5ada 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -417,8 +417,8 @@ struct sysentvec elf_linux_sysvec = { .sv_name = "Linux ELF64", .sv_coredump = elf64_coredump, .sv_elf_core_osabi = ELFOSABI_NONE, - .sv_elf_core_abi_vendor = LINUX_ABI_VENDOR, - .sv_elf_core_prepare_notes = linux64_prepare_notes, + .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, + .sv_elf_core_prepare_notes = elf64_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, From owner-dev-commits-src-all@freebsd.org Thu Jul 1 08:42:24 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9C9CA660205; Thu, 1 Jul 2021 08:42: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 4GFsCh3l3qz4st8; Thu, 1 Jul 2021 08:42: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 680461D562; Thu, 1 Jul 2021 08:42: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 1618gOvr021093; Thu, 1 Jul 2021 08:42:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1618gO0A021092; Thu, 1 Jul 2021 08:42:24 GMT (envelope-from git) Date: Thu, 1 Jul 2021 08:42:24 GMT Message-Id: <202107010842.1618gO0A021092@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: db8d680ebe9b - main - procctl(2): add PROC_NO_NEW_PRIVS_CTL, PROC_NO_NEW_PRIVS_STATUS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db8d680ebe9b12c7d9e0eb8bf9940fcef709f5ec Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 08:42:24 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=db8d680ebe9b12c7d9e0eb8bf9940fcef709f5ec commit db8d680ebe9b12c7d9e0eb8bf9940fcef709f5ec Author: Edward Tomasz Napierala AuthorDate: 2021-07-01 08:11:11 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-07-01 08:42:07 +0000 procctl(2): add PROC_NO_NEW_PRIVS_CTL, PROC_NO_NEW_PRIVS_STATUS This introduces a new, per-process flag, "NO_NEW_PRIVS", which is inherited, preserved on exec, and cannot be cleared. The flag, when set, makes subsequent execs ignore any SUID and SGID bits, instead executing those binaries as if they not set. The main purpose of the flag is implementation of Linux PROC_SET_NO_NEW_PRIVS prctl(2), and possibly also unpriviledged chroot. Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30939 --- lib/libc/sys/procctl.2 | 27 ++++++++++++++++++++++++++- sys/compat/freebsd32/freebsd32_misc.c | 3 +++ sys/kern/kern_exec.c | 5 +++-- sys/kern/kern_fork.c | 2 +- sys/kern/kern_procctl.c | 32 ++++++++++++++++++++++++++++++++ sys/sys/proc.h | 1 + sys/sys/procctl.h | 5 +++++ 7 files changed, 71 insertions(+), 4 deletions(-) diff --git a/lib/libc/sys/procctl.2 b/lib/libc/sys/procctl.2 index f85825d8cc6f..432ed5919a81 100644 --- a/lib/libc/sys/procctl.2 +++ b/lib/libc/sys/procctl.2 @@ -29,7 +29,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 13, 2020 +.Dd July 1, 2021 .Dt PROCCTL 2 .Os .Sh NAME @@ -564,6 +564,31 @@ Stack gaps are enabled in the process after Stack gaps are disabled in the process after .Xr execve 2 . .El +.It Dv PROC_NO_NEW_PRIVS_CTL +Allows one to ignore the SUID and SGID bits on the program +images activated by +.Xr execve 2 +in the specified process and its future descendants. +The +.Fa data +parameter must point to the integer variable holding the following +value: +.Bl -tag -width PROC_NO_NEW_PRIVS_ENABLE +.It Dv PROC_NO_NEW_PRIVS_ENABLE +Request SUID and SGID bits to be ignored. +.El +.Pp +It is not possible to disable it once it has been enabled. +.It Dv PROC_NO_NEW_PRIVS_STATUS +Returns the current status of SUID/SGID enablement for the target process. +The +.Fa data +parameter must point to the integer variable, where one of the +following values is written: +.Bl -tag -width PROC_NO_NEW_PRIVS_DISABLE +.It Dv PROC_NO_NEW_PRIVS_ENABLE +.It Dv PROC_NO_NEW_PRIVS_DISABLE +.El .El .Sh x86 MACHINE-SPECIFIC REQUESTS .Bl -tag -width PROC_KPTI_STATUS diff --git a/sys/compat/freebsd32/freebsd32_misc.c b/sys/compat/freebsd32/freebsd32_misc.c index f221397e91dc..950631352f12 100644 --- a/sys/compat/freebsd32/freebsd32_misc.c +++ b/sys/compat/freebsd32/freebsd32_misc.c @@ -3643,6 +3643,7 @@ freebsd32_procctl(struct thread *td, struct freebsd32_procctl_args *uap) case PROC_STACKGAP_CTL: case PROC_TRACE_CTL: case PROC_TRAPCAP_CTL: + case PROC_NO_NEW_PRIVS_CTL: error = copyin(PTRIN(uap->data), &flags, sizeof(flags)); if (error != 0) return (error); @@ -3676,6 +3677,7 @@ freebsd32_procctl(struct thread *td, struct freebsd32_procctl_args *uap) case PROC_STACKGAP_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: + case PROC_NO_NEW_PRIVS_STATUS: data = &flags; break; case PROC_PDEATHSIG_CTL: @@ -3707,6 +3709,7 @@ freebsd32_procctl(struct thread *td, struct freebsd32_procctl_args *uap) case PROC_STACKGAP_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: + case PROC_NO_NEW_PRIVS_STATUS: if (error == 0) error = copyout(&flags, uap->data, sizeof(flags)); break; diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index aff030cd432e..c3c23f44189e 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -781,8 +781,9 @@ interpret: signotify(td); } - if (imgp->sysent->sv_setid_allowed != NULL && - !(*imgp->sysent->sv_setid_allowed)(td, imgp)) + if ((imgp->sysent->sv_setid_allowed != NULL && + !(*imgp->sysent->sv_setid_allowed)(td, imgp)) || + (p->p_flag2 & P2_NO_NEW_PRIVS) != 0) execve_nosetid(imgp); /* diff --git a/sys/kern/kern_fork.c b/sys/kern/kern_fork.c index 0d0659b432fe..7a80f7de85d8 100644 --- a/sys/kern/kern_fork.c +++ b/sys/kern/kern_fork.c @@ -492,7 +492,7 @@ do_fork(struct thread *td, struct fork_req *fr, struct proc *p2, struct thread * p2->p_flag2 = p1->p_flag2 & (P2_ASLR_DISABLE | P2_ASLR_ENABLE | P2_ASLR_IGNSTART | P2_NOTRACE | P2_NOTRACE_EXEC | P2_PROTMAX_ENABLE | P2_PROTMAX_DISABLE | P2_TRAPCAP | - P2_STKGAP_DISABLE | P2_STKGAP_DISABLE_EXEC); + P2_STKGAP_DISABLE | P2_STKGAP_DISABLE_EXEC | P2_NO_NEW_PRIVS); p2->p_swtick = ticks; if (p1->p_flag & P_PROFIL) startprofclock(p2); diff --git a/sys/kern/kern_procctl.c b/sys/kern/kern_procctl.c index b6f6f1b772b2..4eb226c6b1b3 100644 --- a/sys/kern/kern_procctl.c +++ b/sys/kern/kern_procctl.c @@ -419,6 +419,27 @@ trapcap_status(struct thread *td, struct proc *p, int *data) return (0); } +static int +no_new_privs_ctl(struct thread *td, struct proc *p, int state) +{ + + PROC_LOCK_ASSERT(p, MA_OWNED); + + if (state != PROC_NO_NEW_PRIVS_ENABLE) + return (EINVAL); + p->p_flag2 |= P2_NO_NEW_PRIVS; + return (0); +} + +static int +no_new_privs_status(struct thread *td, struct proc *p, int *data) +{ + + *data = (p->p_flag2 & P2_NO_NEW_PRIVS) != 0 ? + PROC_NO_NEW_PRIVS_ENABLE : PROC_NO_NEW_PRIVS_DISABLE; + return (0); +} + static int protmax_ctl(struct thread *td, struct proc *p, int state) { @@ -600,6 +621,7 @@ sys_procctl(struct thread *td, struct procctl_args *uap) case PROC_STACKGAP_CTL: case PROC_TRACE_CTL: case PROC_TRAPCAP_CTL: + case PROC_NO_NEW_PRIVS_CTL: error = copyin(uap->data, &flags, sizeof(flags)); if (error != 0) return (error); @@ -631,6 +653,7 @@ sys_procctl(struct thread *td, struct procctl_args *uap) case PROC_STACKGAP_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: + case PROC_NO_NEW_PRIVS_STATUS: data = &flags; break; case PROC_PDEATHSIG_CTL: @@ -661,6 +684,7 @@ sys_procctl(struct thread *td, struct procctl_args *uap) case PROC_STACKGAP_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: + case PROC_NO_NEW_PRIVS_STATUS: if (error == 0) error = copyout(&flags, uap->data, sizeof(flags)); break; @@ -710,6 +734,10 @@ kern_procctl_single(struct thread *td, struct proc *p, int com, void *data) return (trapcap_ctl(td, p, *(int *)data)); case PROC_TRAPCAP_STATUS: return (trapcap_status(td, p, data)); + case PROC_NO_NEW_PRIVS_CTL: + return (no_new_privs_ctl(td, p, *(int *)data)); + case PROC_NO_NEW_PRIVS_STATUS: + return (no_new_privs_status(td, p, data)); default: return (EINVAL); } @@ -740,6 +768,8 @@ kern_procctl(struct thread *td, idtype_t idtype, id_t id, int com, void *data) case PROC_TRAPCAP_STATUS: case PROC_PDEATHSIG_CTL: case PROC_PDEATHSIG_STATUS: + case PROC_NO_NEW_PRIVS_CTL: + case PROC_NO_NEW_PRIVS_STATUS: if (idtype != P_PID) return (EINVAL); } @@ -772,6 +802,7 @@ kern_procctl(struct thread *td, idtype_t idtype, id_t id, int com, void *data) case PROC_REAP_KILL: case PROC_TRACE_CTL: case PROC_TRAPCAP_CTL: + case PROC_NO_NEW_PRIVS_CTL: sx_slock(&proctree_lock); tree_locked = true; break; @@ -788,6 +819,7 @@ kern_procctl(struct thread *td, idtype_t idtype, id_t id, int com, void *data) case PROC_STACKGAP_STATUS: case PROC_TRACE_STATUS: case PROC_TRAPCAP_STATUS: + case PROC_NO_NEW_PRIVS_STATUS: tree_locked = false; break; default: diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 19e8d76c6f99..9813324bfa69 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -835,6 +835,7 @@ struct proc { after exec */ #define P2_ITSTOPPED 0x00002000 #define P2_PTRACEREQ 0x00004000 /* Active ptrace req */ +#define P2_NO_NEW_PRIVS 0x00008000 /* Ignore setuid */ /* Flags protected by proctree_lock, kept in p_treeflags. */ #define P_TREE_ORPHANED 0x00000001 /* Reparented, on orphan list */ diff --git a/sys/sys/procctl.h b/sys/sys/procctl.h index 90fb149830dc..cc0279fb0d08 100644 --- a/sys/sys/procctl.h +++ b/sys/sys/procctl.h @@ -63,6 +63,8 @@ #define PROC_PROTMAX_STATUS 16 /* query implicit PROT_MAX status */ #define PROC_STACKGAP_CTL 17 /* en/dis stack gap on MAP_STACK */ #define PROC_STACKGAP_STATUS 18 /* query stack gap */ +#define PROC_NO_NEW_PRIVS_CTL 19 /* disable setuid/setgid */ +#define PROC_NO_NEW_PRIVS_STATUS 20 /* query suid/sgid disabled status */ /* Operations for PROC_SPROTECT (passed in integer arg). */ #define PPROT_OP(x) ((x) & 0xf) @@ -141,6 +143,9 @@ struct procctl_reaper_kill { #define PROC_STACKGAP_ENABLE_EXEC 0x0004 #define PROC_STACKGAP_DISABLE_EXEC 0x0008 +#define PROC_NO_NEW_PRIVS_ENABLE 1 +#define PROC_NO_NEW_PRIVS_DISABLE 2 + #ifndef _KERNEL __BEGIN_DECLS int procctl(idtype_t, id_t, int, void *); From owner-dev-commits-src-all@freebsd.org Thu Jul 1 13:13:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C73DA6642D9; Thu, 1 Jul 2021 13:13: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 4GFzCw5H6Lz3nv4; Thu, 1 Jul 2021 13:13: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 9983220E70; Thu, 1 Jul 2021 13:13: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 161DD0O2081112; Thu, 1 Jul 2021 13:13:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161DD0Uo081111; Thu, 1 Jul 2021 13:13:00 GMT (envelope-from git) Date: Thu, 1 Jul 2021 13:13:00 GMT Message-Id: <202107011313.161DD0Uo081111@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: d93a2f5d675a - main - fortune: correct documentation of default FORTUNE_PATH. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d93a2f5d675a3dfcc8176826fa5904b206fde30d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 13:13:00 -0000 The branch main has been updated by ceri (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=d93a2f5d675a3dfcc8176826fa5904b206fde30d commit d93a2f5d675a3dfcc8176826fa5904b206fde30d Author: Ceri Davies AuthorDate: 2021-07-01 13:00:06 +0000 Commit: Ceri Davies CommitDate: 2021-07-01 13:02:00 +0000 fortune: correct documentation of default FORTUNE_PATH. While here, fix a typo in a comment relating to FORTUNE_PATH --- usr.bin/fortune/fortune/fortune.6 | 4 ++-- usr.bin/fortune/fortune/fortune.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.bin/fortune/fortune/fortune.6 b/usr.bin/fortune/fortune/fortune.6 index 2660cf8bf20c..c04d5838941a 100644 --- a/usr.bin/fortune/fortune/fortune.6 +++ b/usr.bin/fortune/fortune/fortune.6 @@ -31,7 +31,7 @@ .\" @(#)fortune.6 8.3 (Berkeley) 4/19/94 .\" $FreeBSD$ .\" -.Dd January 3, 2021 +.Dd July 1, 2021 .Dt FORTUNE 6 .Os .Sh NAME @@ -168,7 +168,7 @@ It is a colon-separated list of directories in which .Nm looks for data files. If not set it will default to -.Pa /usr/share/games/fortune . +.Pa /usr/share/games/fortune:/usr/local/share/games/fortune . If none of the directories specified exist, it will print a warning and exit. .It Ev FORTUNE_SAVESTATE If set, fortune will save some state about what fortune diff --git a/usr.bin/fortune/fortune/fortune.c b/usr.bin/fortune/fortune/fortune.c index 724fb4a2372e..f375ec645ede 100644 --- a/usr.bin/fortune/fortune/fortune.c +++ b/usr.bin/fortune/fortune/fortune.c @@ -1380,7 +1380,7 @@ usage(void) /* * getpath - * Set up file search patch from environment var FORTUNE_PATH; + * Set up file search path from environment var FORTUNE_PATH; * if not set, use the compiled in FORTDIR. */ From owner-dev-commits-src-all@freebsd.org Thu Jul 1 14:34:57 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A8A8A6654E6; Thu, 1 Jul 2021 14:34:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG12T4GSGz3v2l; Thu, 1 Jul 2021 14:34:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7B21622244; Thu, 1 Jul 2021 14:34:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161EYvBr088134; Thu, 1 Jul 2021 14:34:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161EYvcH088133; Thu, 1 Jul 2021 14:34:57 GMT (envelope-from git) Date: Thu, 1 Jul 2021 14:34:57 GMT Message-Id: <202107011434.161EYvcH088133@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 244002b48257 - main - Switch the order of the ID_AA64PFR1_EL1 fields MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 244002b48257a8e4d3b4772872981c0d7a467923 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 14:34:57 -0000 The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=244002b48257a8e4d3b4772872981c0d7a467923 commit 244002b48257a8e4d3b4772872981c0d7a467923 Author: Andrew Turner AuthorDate: 2021-07-01 00:45:39 +0000 Commit: Andrew Turner CommitDate: 2021-07-01 00:48:56 +0000 Switch the order of the ID_AA64PFR1_EL1 fields This makes them consistent with the fields in other registers. Sponsored by: The FreeBSD Foundation --- sys/arm64/arm64/identcpu.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/arm64/arm64/identcpu.c b/sys/arm64/arm64/identcpu.c index c3544e9de9aa..bae5770b4b04 100644 --- a/sys/arm64/arm64/identcpu.c +++ b/sys/arm64/arm64/identcpu.c @@ -901,9 +901,10 @@ static struct mrs_field id_aa64pfr0_fields[] = { /* ID_AA64PFR1_EL1 */ -static struct mrs_field_value id_aa64pfr1_bt[] = { - MRS_FIELD_VALUE(ID_AA64PFR1_BT_NONE, ""), - MRS_FIELD_VALUE(ID_AA64PFR1_BT_IMPL, "BTI"), +static struct mrs_field_value id_aa64pfr1_mte[] = { + MRS_FIELD_VALUE(ID_AA64PFR1_MTE_NONE, ""), + MRS_FIELD_VALUE(ID_AA64PFR1_MTE_IMPL_EL0, "MTE EL0"), + MRS_FIELD_VALUE(ID_AA64PFR1_MTE_IMPL, "MTE"), MRS_FIELD_VALUE_END, }; @@ -914,17 +915,16 @@ static struct mrs_field_value id_aa64pfr1_ssbs[] = { MRS_FIELD_VALUE_END, }; -static struct mrs_field_value id_aa64pfr1_mte[] = { - MRS_FIELD_VALUE(ID_AA64PFR1_MTE_NONE, ""), - MRS_FIELD_VALUE(ID_AA64PFR1_MTE_IMPL_EL0, "MTE EL0"), - MRS_FIELD_VALUE(ID_AA64PFR1_MTE_IMPL, "MTE"), +static struct mrs_field_value id_aa64pfr1_bt[] = { + MRS_FIELD_VALUE(ID_AA64PFR1_BT_NONE, ""), + MRS_FIELD_VALUE(ID_AA64PFR1_BT_IMPL, "BTI"), MRS_FIELD_VALUE_END, }; static struct mrs_field id_aa64pfr1_fields[] = { - MRS_FIELD(ID_AA64PFR1, BT, false, MRS_EXACT, id_aa64pfr1_bt), - MRS_FIELD(ID_AA64PFR1, SSBS, false, MRS_LOWER, id_aa64pfr1_ssbs), MRS_FIELD(ID_AA64PFR1, MTE, false, MRS_EXACT, id_aa64pfr1_mte), + MRS_FIELD(ID_AA64PFR1, SSBS, false, MRS_LOWER, id_aa64pfr1_ssbs), + MRS_FIELD(ID_AA64PFR1, BT, false, MRS_EXACT, id_aa64pfr1_bt), MRS_FIELD_END, }; From owner-dev-commits-src-all@freebsd.org Thu Jul 1 15:22:21 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 42FD0665E14; Thu, 1 Jul 2021 15:22: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 4GG2591Ps4z4SHt; Thu, 1 Jul 2021 15:22: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 18D3822BB9; Thu, 1 Jul 2021 15:22:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161FMLNa054330; Thu, 1 Jul 2021 15:22:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161FMKlM054329; Thu, 1 Jul 2021 15:22:20 GMT (envelope-from git) Date: Thu, 1 Jul 2021 15:22:20 GMT Message-Id: <202107011522.161FMKlM054329@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 5def4c47d4bd - main - Import device-tree files from Linux 5.11 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/main X-Git-Reftype: branch X-Git-Commit: 5def4c47d4bd90b209b9b4a4ba9faec15846d8fd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 15:22:21 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=5def4c47d4bd90b209b9b4a4ba9faec15846d8fd commit 5def4c47d4bd90b209b9b4a4ba9faec15846d8fd Merge: 244002b48257 f544df78d0a1 Author: Emmanuel Vadot AuthorDate: 2021-07-01 15:20:05 +0000 Commit: Emmanuel Vadot CommitDate: 2021-07-01 15:21:47 +0000 Import device-tree files from Linux 5.11 Sponsored by: Diablotin Systems sys/contrib/device-tree/Bindings/Makefile | 20 +- sys/contrib/device-tree/Bindings/arm/amlogic.yaml | 6 +- .../arm/amlogic/amlogic,meson-mx-secbus2.yaml | 42 + sys/contrib/device-tree/Bindings/arm/arm,scmi.txt | 42 + .../device-tree/Bindings/arm/atmel-sysregs.txt | 7 +- .../device-tree/Bindings/arm/bcm/brcm,bcm4908.yaml | 40 + sys/contrib/device-tree/Bindings/arm/coresight.txt | 5 +- sys/contrib/device-tree/Bindings/arm/cpus.yaml | 2 +- .../device-tree/Bindings/arm/freescale/fsl,scu.txt | 12 +- sys/contrib/device-tree/Bindings/arm/fsl.yaml | 383 +- .../device-tree/Bindings/arm/idle-states.yaml | 2 +- .../arm/marvell/ap80x-system-controller.txt | 8 + sys/contrib/device-tree/Bindings/arm/mediatek.yaml | 8 +- .../device-tree/Bindings/arm/msm/qcom,llcc.yaml | 2 + .../Bindings/arm/mstar/mstar,smpctrl.yaml | 40 + .../device-tree/Bindings/arm/mstar/mstar.yaml | 6 + sys/contrib/device-tree/Bindings/arm/pmu.yaml | 1 + sys/contrib/device-tree/Bindings/arm/qcom.yaml | 12 + sys/contrib/device-tree/Bindings/arm/renesas.yaml | 3 + sys/contrib/device-tree/Bindings/arm/rockchip.yaml | 29 + .../Bindings/arm/samsung/samsung-boards.yaml | 21 + .../socionext/socionext,uniphier-system-cache.yaml | 4 +- .../Bindings/arm/stm32/st,stm32-syscon.yaml | 5 + .../device-tree/Bindings/arm/stm32/stm32.yaml | 23 +- sys/contrib/device-tree/Bindings/arm/sunxi.yaml | 42 +- sys/contrib/device-tree/Bindings/arm/tegra.yaml | 11 + .../Bindings/arm/tegra/nvidia,tegra30-actmon.txt | 25 + sys/contrib/device-tree/Bindings/arm/vt8500.yaml | 3 +- sys/contrib/device-tree/Bindings/arm/xilinx.yaml | 6 +- .../device-tree/Bindings/ata/sata_highbank.yaml | 1 + .../Bindings/auxdisplay/holtek,ht16k33.yaml | 77 + .../Bindings/auxdisplay/modtronix,lcd2s.yaml | 58 + .../Bindings/bus/allwinner,sun50i-a64-de2.yaml | 2 +- .../Bindings/bus/allwinner,sun8i-a23-rsb.yaml | 4 +- .../device-tree/Bindings/bus/baikal,bt1-axi.yaml | 2 +- .../Bindings/bus/nvidia,tegra210-aconnect.yaml | 82 + .../device-tree/Bindings/clock/adi,axi-clkgen.yaml | 54 + .../Bindings/clock/allwinner,sun4i-a10-ccu.yaml | 4 + .../clock/allwinner,sun9i-a80-usb-clks.yaml | 59 + .../Bindings/clock/arm,syscon-icst.yaml | 4 +- .../Bindings/clock/canaan,k210-clk.yaml | 55 + .../Bindings/clock/fsl,flexspi-clock.yaml | 55 + .../Bindings/clock/idt,versaclock5.yaml | 6 + .../device-tree/Bindings/clock/imx27-clock.yaml | 2 +- .../device-tree/Bindings/clock/imx31-clock.yaml | 2 +- .../device-tree/Bindings/clock/imx5-clock.yaml | 2 +- .../device-tree/Bindings/clock/imx8qxp-lpcg.yaml | 79 +- .../device-tree/Bindings/clock/ingenic,cgu.yaml | 2 +- .../Bindings/clock/intel,easic-n5x.yaml | 46 + .../Bindings/clock/mstar,msc313-mpll.yaml | 46 + .../device-tree/Bindings/clock/qcom,a7pll.yaml | 51 + .../Bindings/clock/qcom,aoncc-sm8250.yaml | 58 + .../Bindings/clock/qcom,audiocc-sm8250.yaml | 58 + .../Bindings/clock/qcom,gcc-sc7280.yaml | 92 + .../Bindings/clock/qcom,gcc-sc8180x.yaml | 76 + .../device-tree/Bindings/clock/qcom,gcc-sdx55.yaml | 77 + .../Bindings/clock/qcom,gcc-sm8350.yaml | 96 + .../Bindings/clock/qcom,gpucc-sdm660.yaml | 76 + .../device-tree/Bindings/clock/qcom,mmcc.yaml | 2 + .../device-tree/Bindings/clock/qcom,rpmhcc.yaml | 4 + .../Bindings/clock/qcom,sc7180-camcc.yaml | 73 + .../clock/renesas,rcar-usb2-clock-sel.yaml | 103 + .../Bindings/clock/sifive/fu740-prci.yaml | 60 + .../device-tree/Bindings/clock/silabs,si570.txt | 2 + .../Bindings/connector/usb-connector.yaml | 80 +- .../Bindings/crypto/allwinner,sun8i-ce.yaml | 3 +- .../Bindings/crypto/intel,keembay-ocs-aes.yaml | 45 + .../Bindings/crypto/intel,keembay-ocs-hcu.yaml | 46 + .../Bindings/crypto/samsung-slimsss.yaml | 1 - .../device-tree/Bindings/crypto/samsung-sss.yaml | 1 - .../device-tree/Bindings/crypto/ti,sa2ul.yaml | 2 +- .../device-tree/Bindings/devfreq/exynos-bus.txt | 71 +- .../allwinner,sun4i-a10-display-backend.yaml | 23 +- .../allwinner,sun4i-a10-display-frontend.yaml | 19 +- .../Bindings/display/allwinner,sun4i-a10-hdmi.yaml | 19 +- .../Bindings/display/allwinner,sun4i-a10-tcon.yaml | 25 +- .../display/allwinner,sun4i-a10-tv-encoder.yaml | 6 +- .../Bindings/display/allwinner,sun6i-a31-drc.yaml | 19 +- .../display/allwinner,sun6i-a31-mipi-dsi.yaml | 6 +- .../display/allwinner,sun8i-a83t-de2-mixer.yaml | 19 +- .../display/allwinner,sun8i-a83t-dw-hdmi.yaml | 19 +- .../display/allwinner,sun8i-r40-tcon-top.yaml | 110 +- .../Bindings/display/allwinner,sun9i-a80-deu.yaml | 19 +- .../Bindings/display/amlogic,meson-dw-hdmi.yaml | 4 +- .../Bindings/display/amlogic,meson-vpu.yaml | 4 +- .../Bindings/display/brcm,bcm2711-hdmi.yaml | 19 + .../Bindings/display/brcm,bcm2835-dpi.yaml | 7 +- .../Bindings/display/brcm,bcm2835-dsi0.yaml | 1 + .../Bindings/display/brcm,bcm2835-hdmi.yaml | 1 + .../Bindings/display/brcm,bcm2835-hvs.yaml | 2 +- .../Bindings/display/bridge/analogix,anx7625.yaml | 95 + .../Bindings/display/bridge/analogix,anx7814.yaml | 19 +- .../Bindings/display/bridge/anx6345.yaml | 20 +- .../Bindings/display/bridge/cdns,mhdp8546.yaml | 22 +- .../Bindings/display/bridge/chrontel,ch7033.yaml | 6 +- .../Bindings/display/bridge/intel,keembay-dsi.yaml | 93 + .../Bindings/display/bridge/ite,it6505.yaml | 4 +- .../Bindings/display/bridge/lontium,lt9611.yaml | 75 +- .../Bindings/display/bridge/lvds-codec.yaml | 21 +- .../Bindings/display/bridge/nwl-dsi.yaml | 41 +- .../Bindings/display/bridge/ps8640.yaml | 26 +- .../Bindings/display/bridge/renesas,lvds.yaml | 24 +- .../Bindings/display/bridge/sii902x.txt | 6 +- .../Bindings/display/bridge/simple-bridge.yaml | 19 +- .../Bindings/display/bridge/snps,dw-mipi-dsi.yaml | 7 +- .../display/bridge/thine,thc63lvd1024.yaml | 36 +- .../Bindings/display/bridge/ti,sn65dsi86.yaml | 45 +- .../Bindings/display/bridge/ti,tfp410.yaml | 24 +- .../Bindings/display/bridge/toshiba,tc358762.yaml | 52 +- .../Bindings/display/bridge/toshiba,tc358768.yaml | 48 +- .../Bindings/display/bridge/toshiba,tc358775.yaml | 21 +- .../display/connector/analog-tv-connector.yaml | 1 + .../Bindings/display/connector/dp-connector.yaml | 55 + .../Bindings/display/connector/dvi-connector.yaml | 1 + .../Bindings/display/connector/hdmi-connector.yaml | 1 + .../Bindings/display/connector/vga-connector.yaml | 1 + .../Bindings/display/imx/fsl-imx-drm.txt | 2 +- .../Bindings/display/imx/nxp,imx8mq-dcss.yaml | 2 +- .../device-tree/Bindings/display/ingenic,ipu.yaml | 5 +- .../device-tree/Bindings/display/ingenic,lcd.yaml | 10 +- .../Bindings/display/intel,keembay-display.yaml | 72 + .../Bindings/display/intel,keembay-msscam.yaml | 43 + .../Bindings/display/mediatek/mediatek,disp.txt | 18 +- .../Bindings/display/mediatek/mediatek,dpi.yaml | 98 + .../Bindings/display/mediatek/mediatek,dsi.txt | 18 +- .../Bindings/display/mediatek/mediatek,hdmi.txt | 18 +- .../device-tree/Bindings/display/msm/gpu.txt | 7 + .../Bindings/display/panel/abt,y030xx067a.yaml | 62 + .../display/panel/advantech,idk-2121wr.yaml | 21 +- .../Bindings/display/panel/jdi,lt070me05000.yaml | 1 + .../display/panel/mantix,mlaf057we51-x.yaml | 4 +- .../Bindings/display/panel/novatek,nt36672a.yaml | 88 + .../Bindings/display/panel/panel-common.yaml | 11 +- .../Bindings/display/panel/panel-simple-dsi.yaml | 9 + .../Bindings/display/panel/panel-simple.yaml | 25 +- .../Bindings/display/panel/samsung,s6e63m0.yaml | 4 +- .../display/rockchip/rockchip,rk3066-hdmi.yaml | 16 +- .../Bindings/display/rockchip/rockchip-vop.yaml | 5 +- .../device-tree/Bindings/display/st,stm32-dsi.yaml | 12 +- .../Bindings/display/st,stm32-ltdc.yaml | 8 +- .../device-tree/Bindings/display/ste,mcde.yaml | 168 + .../display/tegra/nvidia,tegra20-host1x.txt | 72 +- .../Bindings/display/ti/ti,am65x-dss.yaml | 30 +- .../Bindings/display/ti/ti,j721e-dss.yaml | 34 +- .../Bindings/display/ti/ti,k2g-dss.yaml | 3 +- .../Bindings/display/xlnx/xlnx,zynqmp-dpsub.yaml | 1 - .../Bindings/dma/allwinner,sun50i-a64-dma.yaml | 5 +- .../device-tree/Bindings/dma/atmel-xdma.txt | 3 +- .../device-tree/Bindings/dma/dma-common.yaml | 4 +- .../device-tree/Bindings/dma/dma-router.yaml | 2 +- .../device-tree/Bindings/dma/ingenic,dma.yaml | 4 +- .../device-tree/Bindings/dma/intel,ldma.yaml | 116 + .../device-tree/Bindings/dma/mtk-uart-apdma.txt | 1 + .../Bindings/dma/nvidia,tegra210-adma.yaml | 99 + sys/contrib/device-tree/Bindings/dma/owl-dma.yaml | 7 +- sys/contrib/device-tree/Bindings/dma/qcom,gpi.yaml | 88 + .../Bindings/dma/renesas,rcar-dmac.yaml | 77 +- .../Bindings/dma/snps,dma-spear1340.yaml | 10 +- .../device-tree/Bindings/dma/snps,dw-axi-dmac.yaml | 126 + .../device-tree/Bindings/dma/ti/k3-bcdma.yaml | 166 + .../device-tree/Bindings/dma/ti/k3-pktdma.yaml | 174 + .../device-tree/Bindings/dma/ti/k3-udma.yaml | 4 +- sys/contrib/device-tree/Bindings/dsp/fsl,dsp.yaml | 2 +- .../Bindings/edac/aspeed-sdram-edac.txt | 9 +- sys/contrib/device-tree/Bindings/eeprom/at24.yaml | 13 +- sys/contrib/device-tree/Bindings/eeprom/at25.yaml | 7 +- .../Bindings/extcon/extcon-ptn5150.yaml | 2 + .../Bindings/extcon/extcon-usbc-tusb320.yaml | 41 + .../device-tree/Bindings/extcon/fcs,fsa880.yaml | 52 + .../device-tree/Bindings/extcon/wlf,arizona.yaml | 1 - .../device-tree/Bindings/firmware/qcom,scm.txt | 2 + .../device-tree/Bindings/fsi/ibm,p9-occ.txt | 12 +- .../device-tree/Bindings/gpio/gpio-davinci.txt | 1 + .../device-tree/Bindings/gpio/gpio-pca95xx.yaml | 5 +- .../device-tree/Bindings/gpio/gpio-xilinx.txt | 2 + .../Bindings/gpio/mediatek,mt7621-gpio.yaml | 72 + .../device-tree/Bindings/gpio/mrvl-gpio.yaml | 3 +- .../Bindings/gpio/mstar,msc313-gpio.yaml | 59 + .../Bindings/gpio/renesas,rcar-gpio.yaml | 3 + .../device-tree/Bindings/gpio/sifive,gpio.yaml | 29 +- .../Bindings/gpio/toshiba,gpio-visconti.yaml | 70 + .../device-tree/Bindings/gpu/arm,mali-bifrost.yaml | 17 + .../device-tree/Bindings/gpu/arm,mali-midgard.yaml | 17 + .../device-tree/Bindings/gpu/brcm,bcm-v3d.yaml | 75 + .../device-tree/Bindings/gpu/nvidia,gk20a.txt | 4 +- sys/contrib/device-tree/Bindings/graph.txt | 129 +- .../Bindings/hwlock/ti,omap-hwspinlock.yaml | 1 + .../device-tree/Bindings/hwmon/adi,ad741x.yaml | 39 + .../device-tree/Bindings/hwmon/adi,adm1275.yaml | 57 + .../device-tree/Bindings/hwmon/adi,ltc2947.yaml | 1 - .../device-tree/Bindings/hwmon/adi,ltc2992.yaml | 80 + .../device-tree/Bindings/hwmon/amd,sbtsi.yaml | 54 + .../device-tree/Bindings/hwmon/baikal,bt1-pvt.yaml | 8 +- .../Bindings/hwmon/moortec,mr75203.yaml | 2 +- sys/contrib/device-tree/Bindings/hwmon/pwm-fan.txt | 28 +- .../Bindings/hwmon/sensirion,shtc1.yaml | 4 +- .../device-tree/Bindings/hwmon/ti,ads7828.yaml | 57 + .../device-tree/Bindings/hwmon/ti,ina2xx.yaml | 55 + .../device-tree/Bindings/hwmon/ti,tmp513.yaml | 3 +- .../device-tree/Bindings/hwmon/ti,tps23861.yaml | 51 + sys/contrib/device-tree/Bindings/i2c/i2c-gate.yaml | 39 + sys/contrib/device-tree/Bindings/i2c/i2c-gpio.yaml | 2 - .../device-tree/Bindings/i2c/i2c-ocores.txt | 8 +- sys/contrib/device-tree/Bindings/i2c/i2c-omap.txt | 1 + sys/contrib/device-tree/Bindings/i2c/i2c-owl.yaml | 62 + .../Bindings/i2c/marvell,mv64xxx-i2c.yaml | 21 +- .../Bindings/i2c/mellanox,i2c-mlxbf.yaml | 78 + .../Bindings/i2c/nuvoton,npcm7xx-i2c.yaml | 2 +- .../device-tree/Bindings/i2c/renesas,i2c.txt | 1 + .../Bindings/i2c/snps,designware-i2c.yaml | 11 - sys/contrib/device-tree/Bindings/i3c/i3c.yaml | 179 + .../device-tree/Bindings/i3c/mipi-i3c-hci.yaml | 52 + .../Bindings/i3c/silvaco,i3c-master.yaml | 60 + .../Bindings/iio/accel/bosch,bma180.yaml | 62 + .../Bindings/iio/accel/bosch,bma255.yaml | 73 + .../Bindings/iio/accel/fsl,mma8452.yaml | 65 + .../Bindings/iio/accel/kionix,kxcjk1013.yaml | 49 + sys/contrib/device-tree/Bindings/iio/adc/adc.yaml | 42 + .../device-tree/Bindings/iio/adc/adi,ad7124.yaml | 14 +- .../device-tree/Bindings/iio/adc/adi,ad7192.yaml | 2 +- .../device-tree/Bindings/iio/adc/adi,ad7292.yaml | 8 +- .../device-tree/Bindings/iio/adc/adi,ad7768-1.yaml | 34 + .../Bindings/iio/adc/aspeed,ast2400-adc.yaml | 1 + .../Bindings/iio/adc/atmel,sama5d2-adc.yaml | 101 + .../Bindings/iio/adc/atmel,sama9260-adc.yaml | 121 + .../Bindings/iio/adc/brcm,iproc-static-adc.yaml | 70 + .../Bindings/iio/adc/envelope-detector.yaml | 86 + .../device-tree/Bindings/iio/adc/lltc,ltc2496.yaml | 5 +- .../Bindings/iio/adc/maxim,max1027.yaml | 65 + .../Bindings/iio/adc/maxim,max9611.yaml | 1 - .../Bindings/iio/adc/mediatek,mt2701-auxadc.yaml | 77 + .../Bindings/iio/adc/mediatek,mt6360-adc.yaml | 31 + .../Bindings/iio/adc/qcom,pm8018-adc.yaml | 166 + .../Bindings/iio/adc/qcom,spmi-iadc.yaml | 60 + .../Bindings/iio/adc/qcom,spmi-vadc.yaml | 4 +- .../Bindings/iio/adc/renesas,rcar-gyroadc.yaml | 143 + .../Bindings/iio/adc/samsung,exynos-adc.yaml | 4 - .../device-tree/Bindings/iio/adc/st,stm32-adc.yaml | 3 +- .../Bindings/iio/adc/st,stm32-dfsdm-adc.yaml | 7 +- .../Bindings/iio/adc/ti,adc084s021.yaml | 58 + .../device-tree/Bindings/iio/adc/ti,ads124s08.yaml | 52 + .../Bindings/iio/adc/ti,palmas-gpadc.yaml | 85 + .../Bindings/iio/adc/x-powers,axp209-adc.yaml | 71 + .../device-tree/Bindings/iio/adc/xilinx-xadc.txt | 49 +- .../Bindings/iio/afe/current-sense-amplifier.yaml | 54 + .../Bindings/iio/afe/current-sense-shunt.yaml | 64 + .../Bindings/iio/afe/voltage-divider.yaml | 86 + .../device-tree/Bindings/iio/dac/adi,ad5592r.yaml | 204 + .../device-tree/Bindings/iio/dac/adi,ad5696.yaml | 57 + .../device-tree/Bindings/iio/dac/adi,ad5758.yaml | 140 + .../device-tree/Bindings/iio/dac/adi,ad5766.yaml | 63 + .../device-tree/Bindings/iio/dac/adi,ad7303.yaml | 50 + .../device-tree/Bindings/iio/dac/dpot-dac.yaml | 64 + .../Bindings/iio/dac/fsl,vf610-dac.yaml | 55 + .../device-tree/Bindings/iio/dac/maxim,ds4424.yaml | 45 + .../Bindings/iio/dac/maxim,max5821.yaml | 44 + .../Bindings/iio/dac/microchip,mcp4725.yaml | 90 + .../Bindings/iio/dac/nxp,lpc1850-dac.yaml | 58 + .../device-tree/Bindings/iio/dac/ti,dac5571.yaml | 52 + .../device-tree/Bindings/iio/dac/ti,dac7311.yaml | 49 + .../device-tree/Bindings/iio/dac/ti,dac7512.yaml | 42 + .../device-tree/Bindings/iio/dac/ti,dac7612.yaml | 53 + .../Bindings/iio/frequency/adi,adf4350.yaml | 190 + .../Bindings/iio/gyroscope/bosch,bmg160.yaml | 49 + .../Bindings/iio/gyroscope/invensense,mpu3050.yaml | 70 + .../Bindings/iio/gyroscope/nxp,fxas21002c.yaml | 95 + .../Bindings/iio/health/maxim,max30100.yaml | 51 + .../Bindings/iio/health/maxim,max30102.yaml | 72 + .../Bindings/iio/health/ti,afe4403.yaml | 54 + .../Bindings/iio/health/ti,afe4404.yaml | 51 + .../device-tree/Bindings/iio/humidity/dht11.yaml | 41 + .../Bindings/iio/humidity/st,hts221.yaml | 54 + .../Bindings/iio/humidity/ti,hdc2010.yaml | 3 +- .../iio/impedance-analyzer/adi,ad5933.yaml | 59 + .../Bindings/iio/imu/adi,adis16480.yaml | 130 + .../Bindings/iio/imu/invensense,mpu6050.yaml | 104 + .../device-tree/Bindings/iio/imu/st,lsm6dsx.yaml | 93 + .../Bindings/iio/light/avago,apds9300.yaml | 44 + .../Bindings/iio/light/avago,apds9960.yaml | 44 + .../Bindings/iio/light/capella,cm3605.yaml | 79 + .../Bindings/iio/light/capella,cm36651.yaml | 48 + .../Bindings/iio/light/maxim,max44009.yaml | 45 + .../Bindings/iio/light/sharp,gp2ap020a00f.yaml | 48 + .../device-tree/Bindings/iio/light/st,uvis25.yaml | 42 + .../device-tree/Bindings/iio/light/st,vl6180.yaml | 45 + .../device-tree/Bindings/iio/light/ti,opt3001.yaml | 47 + .../Bindings/iio/light/upisemi,us5182.yaml | 78 + .../Bindings/iio/light/vishay,vcnl4035.yaml | 45 + .../iio/magnetometer/asahi-kasei,ak8974.yaml | 57 + .../iio/magnetometer/asahi-kasei,ak8975.yaml | 1 + .../iio/magnetometer/bosch,bmc150_magn.yaml | 58 + .../Bindings/iio/magnetometer/fsl,mag3110.yaml | 48 + .../iio/magnetometer/honeywell,hmc5843.yaml | 43 + .../Bindings/iio/magnetometer/pni,rm3100.yaml | 42 + .../Bindings/iio/magnetometer/yamaha,yas530.yaml | 112 + .../Bindings/iio/potentiometer/adi,ad5272.yaml | 51 + .../iio/potentiometer/microchip,mcp41010.yaml | 48 + .../iio/potentiometer/microchip,mcp4131.yaml | 103 + .../iio/potentiometer/microchip,mcp4531.yaml | 116 + .../Bindings/iio/potentiostat/ti,lmp91000.yaml | 68 + .../Bindings/iio/pressure/hoperf,hp03.yaml | 47 + .../Bindings/iio/pressure/meas,ms5611.yaml | 57 + .../Bindings/iio/pressure/murata,zpa2326.yaml | 62 + .../Bindings/iio/proximity/ams,as3935.yaml | 71 + .../Bindings/iio/proximity/semtech,sx9310.yaml | 63 + .../Bindings/iio/proximity/semtech,sx9500.yaml | 50 + .../Bindings/iio/proximity/st,vl53l0x.yaml | 42 + .../Bindings/iio/resolver/adi,ad2s90.yaml | 60 + .../Bindings/iio/samsung,sensorhub-rinato.yaml | 72 + .../device-tree/Bindings/iio/st,st-sensors.yaml | 123 + .../Bindings/iio/temperature/maxim,max31855k.yaml | 76 + .../Bindings/iio/temperature/maxim,max31856.yaml | 54 + .../Bindings/iio/temperature/melexis,mlx90614.yaml | 50 + .../Bindings/iio/temperature/melexis,mlx90632.yaml | 55 + .../Bindings/iio/temperature/ti,tmp007.yaml | 57 + .../device-tree/Bindings/input/adc-keys.txt | 22 +- .../Bindings/input/ariel-pwrbutton.yaml | 57 + .../device-tree/Bindings/input/atmel,maxtouch.yaml | 81 + .../Bindings/input/cypress,tm2-touchkey.yaml | 73 + .../device-tree/Bindings/input/dlg,da7280.txt | 108 + .../Bindings/input/fsl,mpr121-touchkey.yaml | 3 +- .../device-tree/Bindings/input/goodix,gt7375p.yaml | 65 + .../Bindings/input/google,cros-ec-keyb.yaml | 24 + .../device-tree/Bindings/input/gpio-keys.yaml | 12 +- .../Bindings/input/sprd,sc27xx-vibrator.yaml | 48 + .../Bindings/input/touchscreen/edt-ft5x06.yaml | 3 +- .../Bindings/input/touchscreen/ektf2127.txt | 2 +- .../input/touchscreen/elan,elants_i2c.yaml | 1 + .../Bindings/input/touchscreen/goodix.yaml | 1 + .../Bindings/input/touchscreen/touchscreen.yaml | 2 - .../Bindings/interconnect/qcom,rpm.yaml | 85 + .../Bindings/interconnect/qcom,rpmh.yaml | 6 +- .../allwinner,sun6i-a31-r-intc.yaml | 67 + .../allwinner,sun7i-a20-sc-nmi.yaml | 11 +- .../Bindings/interrupt-controller/arm,gic.yaml | 9 +- .../Bindings/interrupt-controller/fsl,intmux.yaml | 2 +- .../interrupt-controller/fsl,ls-extirq.txt | 8 +- .../interrupt-controller/ingenic,intc.yaml | 1 + .../mscc,ocelot-icpu-intr.yaml | 64 + .../Bindings/interrupt-controller/mti,gic.yaml | 4 +- .../Bindings/interrupt-controller/qcom,pdc.txt | 2 + .../interrupt-controller/realtek,rtl-intc.yaml | 57 + .../interrupt-controller/sifive,plic-1.0.0.yaml | 13 +- .../interrupt-controller/st,stm32-exti.yaml | 2 + .../interrupt-controller/ti,pruss-intc.yaml | 5 +- .../Bindings/interrupt-controller/ti,sci-inta.yaml | 2 +- .../device-tree/Bindings/iommu/arm,smmu.yaml | 11 +- .../device-tree/Bindings/iommu/mediatek,iommu.yaml | 183 + .../Bindings/iommu/renesas,ipmmu-vmsa.yaml | 14 +- .../Bindings/leds/backlight/common.yaml | 4 +- sys/contrib/device-tree/Bindings/leds/common.yaml | 16 +- .../device-tree/Bindings/leds/leds-lgm.yaml | 113 + .../device-tree/Bindings/leds/leds-lp55xx.yaml | 10 +- .../device-tree/Bindings/leds/leds-pwm.yaml | 70 + .../device-tree/Bindings/leds/richtek,rt8515.yaml | 111 + .../device-tree/Bindings/leds/ti,tca6507.yaml | 1 + .../device-tree/Bindings/mailbox/arm,mhu.yaml | 1 - .../device-tree/Bindings/mailbox/arm,mhuv2.yaml | 209 + .../device-tree/Bindings/mailbox/omap-mailbox.txt | 4 + .../Bindings/mailbox/qcom,apcs-kpss-global.yaml | 34 + .../device-tree/Bindings/media/allegro,al5e.yaml | 105 + .../Bindings/media/allwinner,sun4i-a10-csi.yaml | 11 +- .../media/allwinner,sun4i-a10-video-engine.yaml | 3 + .../Bindings/media/allwinner,sun6i-a31-csi.yaml | 12 +- .../media/allwinner,sun8i-h3-deinterlace.yaml | 3 + .../Bindings/media/amlogic,axg-ge2d.yaml | 47 + sys/contrib/device-tree/Bindings/media/coda.yaml | 108 + .../device-tree/Bindings/media/i2c/adv7180.yaml | 36 +- .../device-tree/Bindings/media/i2c/adv7604.yaml | 159 + .../Bindings/media/i2c/aptina,mt9v111.yaml | 75 + .../Bindings/media/i2c/imi,rdacm2x-gmsl.yaml | 30 +- .../device-tree/Bindings/media/i2c/imx219.yaml | 22 +- .../device-tree/Bindings/media/i2c/imx258.yaml | 134 + .../Bindings/media/i2c/maxim,max9286.yaml | 118 +- .../device-tree/Bindings/media/i2c/mipi-ccs.yaml | 132 + .../device-tree/Bindings/media/i2c/ov8856.yaml | 22 +- .../Bindings/media/i2c/ovti,ov02a10.yaml | 154 + .../Bindings/media/i2c/ovti,ov2680.yaml | 97 + .../Bindings/media/i2c/ovti,ov5647.yaml | 75 + .../Bindings/media/i2c/ovti,ov5648.yaml | 109 + .../Bindings/media/i2c/ovti,ov772x.yaml | 133 + .../Bindings/media/i2c/ovti,ov8865.yaml | 118 + .../Bindings/media/i2c/sony,imx214.yaml | 125 + .../Bindings/media/i2c/sony,imx274.yaml | 6 +- .../Bindings/media/i2c/sony,imx334.yaml | 90 + .../Bindings/media/marvell,mmp2-ccic.yaml | 20 +- .../Bindings/media/mediatek-jpeg-decoder.txt | 2 +- .../Bindings/media/mediatek-jpeg-encoder.txt | 2 +- .../device-tree/Bindings/media/mediatek-mdp.txt | 2 +- .../device-tree/Bindings/media/nxp,imx7-csi.yaml | 68 + .../Bindings/media/nxp,imx7-mipi-csi2.yaml | 153 + .../device-tree/Bindings/media/qcom,camss.txt | 7 + sys/contrib/device-tree/Bindings/media/rc.yaml | 2 + .../device-tree/Bindings/media/renesas,ceu.yaml | 17 +- .../device-tree/Bindings/media/renesas,csi2.yaml | 54 +- .../device-tree/Bindings/media/renesas,vin.yaml | 113 +- .../device-tree/Bindings/media/rockchip-isp1.yaml | 185 + .../device-tree/Bindings/media/st,stm32-dcmi.yaml | 40 +- sys/contrib/device-tree/Bindings/media/ti,cal.yaml | 55 +- .../Bindings/media/video-interface-devices.yaml | 406 ++ .../Bindings/media/video-interfaces.txt | 640 +-- .../Bindings/media/video-interfaces.yaml | 344 ++ .../Bindings/media/xilinx/xlnx,csi2rxss.yaml | 39 +- .../Bindings/memory-controllers/exynos-srom.yaml | 2 + .../memory-controllers/mediatek,smi-common.yaml | 142 + .../memory-controllers/mediatek,smi-larb.yaml | 132 + .../memory-controllers/nvidia,tegra124-emc.yaml | 19 + .../memory-controllers/nvidia,tegra124-mc.yaml | 5 + .../memory-controllers/nvidia,tegra20-emc.txt | 28 +- .../memory-controllers/nvidia,tegra20-mc.txt | 3 + .../memory-controllers/nvidia,tegra30-emc.yaml | 18 + .../memory-controllers/nvidia,tegra30-mc.yaml | 5 + .../memory-controllers/renesas,rpc-if.yaml | 6 +- .../device-tree/Bindings/mfd/aspeed-lpc.txt | 8 +- .../device-tree/Bindings/mfd/aspeed-scu.txt | 26 + sys/contrib/device-tree/Bindings/mfd/bd9571mwv.txt | 4 +- .../Bindings/mfd/canaan,k210-sysctl.yaml | 109 + .../device-tree/Bindings/mfd/ene-kb930.yaml | 65 + .../device-tree/Bindings/mfd/gateworks-gsc.yaml | 3 +- sys/contrib/device-tree/Bindings/mfd/iqs62x.yaml | 2 +- .../Bindings/mfd/rohm,bd71837-pmic.yaml | 6 + .../device-tree/Bindings/mfd/st,stm32-timers.yaml | 6 +- sys/contrib/device-tree/Bindings/mfd/st,stmfx.yaml | 3 +- sys/contrib/device-tree/Bindings/mfd/syscon.yaml | 4 + .../Bindings/mips/lantiq/lantiq,cgu.yaml | 32 + .../Bindings/mips/lantiq/lantiq,dma-xway.yaml | 32 + .../Bindings/mips/lantiq/lantiq,ebu.yaml | 32 + .../Bindings/mips/lantiq/lantiq,pmu.yaml | 32 + sys/contrib/device-tree/Bindings/mips/mscc.txt | 2 +- .../device-tree/Bindings/mips/realtek-rtl.yaml | 24 + .../device-tree/Bindings/misc/eeprom-93xx46.txt | 1 + .../Bindings/misc/fsl,dpaa2-console.yaml | 26 + .../Bindings/mmc/allwinner,sun4i-a10-mmc.yaml | 8 + .../device-tree/Bindings/mmc/arasan,sdhci.yaml | 2 +- .../device-tree/Bindings/mmc/arm,pl18x.yaml | 223 + .../device-tree/Bindings/mmc/fsl-imx-esdhc.yaml | 1 + .../Bindings/mmc/marvell,xenon-sdhci.txt | 1 + .../device-tree/Bindings/mmc/mmc-controller.yaml | 3 +- .../Bindings/mmc/mmc-pwrseq-simple.yaml | 2 - sys/contrib/device-tree/Bindings/mmc/mtk-sd.yaml | 176 + sys/contrib/device-tree/Bindings/mmc/owl-mmc.yaml | 4 +- .../device-tree/Bindings/mmc/renesas,sdhi.yaml | 3 +- .../device-tree/Bindings/mmc/sdhci-am654.yaml | 19 +- sys/contrib/device-tree/Bindings/mmc/sdhci-msm.txt | 8 +- .../device-tree/Bindings/mtd/gpmi-nand.yaml | 76 +- .../device-tree/Bindings/mtd/intel,lgm-nand.yaml | 99 + .../device-tree/Bindings/mtd/jedec,spi-nor.yaml | 102 + .../device-tree/Bindings/mtd/nand-controller.yaml | 11 +- sys/contrib/device-tree/Bindings/mtd/partition.txt | 131 +- .../mtd/partitions/brcm,bcm4908-partitions.yaml | 70 + .../Bindings/mtd/partitions/fixed-partitions.yaml | 121 + .../Bindings/mtd/partitions/partition.yaml | 47 + .../Bindings/mtd/partitions/qcom,smem-part.yaml | 33 + .../device-tree/Bindings/mtd/qcom_nandc.txt | 4 + .../Bindings/mtd/rockchip,nand-controller.yaml | 161 + .../Bindings/net/allwinner,sun8i-a83t-emac.yaml | 6 +- .../Bindings/net/amlogic,meson-dwmac.yaml | 57 +- .../Bindings/net/brcm,bcm4908-enet.yaml | 48 + .../Bindings/net/brcm,bcm7445-switch-v4.0.txt | 101 +- sys/contrib/device-tree/Bindings/net/btusb.txt | 4 +- .../device-tree/Bindings/net/can/fsl,flexcan.yaml | 16 +- .../device-tree/Bindings/net/can/rcar_canfd.txt | 2 +- .../Bindings/net/dsa/arrow,xrs700x.yaml | 73 + .../device-tree/Bindings/net/dsa/brcm,b53.yaml | 249 ++ .../device-tree/Bindings/net/dsa/brcm,sf2.yaml | 173 + sys/contrib/device-tree/Bindings/net/dsa/dsa.yaml | 12 +- .../Bindings/net/dsa/hirschmann,hellcreek.yaml | 127 + .../Bindings/net/dsa/microchip,ksz.yaml | 148 + .../device-tree/Bindings/net/dsa/mt7530.txt | 6 + .../Bindings/net/ethernet-controller.yaml | 33 +- .../device-tree/Bindings/net/ethernet-phy.yaml | 20 +- .../Bindings/net/fsl,qoriq-mc-dpmac.yaml | 60 + sys/contrib/device-tree/Bindings/net/ftgmac100.txt | 25 + sys/contrib/device-tree/Bindings/net/macb.txt | 4 +- .../device-tree/Bindings/net/marvell-pp2.txt | 6 +- sys/contrib/device-tree/Bindings/net/mdio.yaml | 2 +- .../Bindings/net/mediatek,star-emac.yaml | 2 +- .../device-tree/Bindings/net/nfc/nxp-nci.txt | 2 +- .../Bindings/net/nfc/samsung,s3fwrn5.yaml | 33 +- .../device-tree/Bindings/net/qca,ar803x.yaml | 16 + sys/contrib/device-tree/Bindings/net/qcom,ipa.yaml | 16 +- .../device-tree/Bindings/net/renesas,etheravb.yaml | 3 + .../device-tree/Bindings/net/snps,dwmac.yaml | 45 +- .../Bindings/net/socionext,uniphier-ave4.yaml | 2 +- .../device-tree/Bindings/net/ti,cpsw-switch.yaml | 2 +- .../device-tree/Bindings/net/ti,dp83867.yaml | 12 +- .../device-tree/Bindings/net/ti,dp83869.yaml | 8 +- .../Bindings/net/ti,k3-am654-cpsw-nuss.yaml | 55 +- .../device-tree/Bindings/net/ti,k3-am654-cpts.yaml | 8 + .../Bindings/net/toshiba,visconti-dwmac.yaml | 85 + .../Bindings/net/wireless/qcom,ath11k.yaml | 8 +- .../device-tree/Bindings/net/xilinx_axienet.txt | 4 + .../device-tree/Bindings/nvmem/mtk-efuse.txt | 1 + .../device-tree/Bindings/nvmem/qcom,qfprom.yaml | 17 +- sys/contrib/device-tree/Bindings/nvmem/rmem.yaml | 49 + sys/contrib/device-tree/Bindings/opp/opp.txt | 54 +- .../device-tree/Bindings/pci/brcm,stb-pcie.yaml | 37 +- .../device-tree/Bindings/pci/cdns-pcie-ep.yaml | 3 - .../device-tree/Bindings/pci/layerscape-pci.txt | 1 + .../Bindings/pci/microchip,pcie-host.yaml | 92 + sys/contrib/device-tree/Bindings/pci/qcom,pcie.txt | 19 +- .../device-tree/Bindings/pci/rcar-pci-ep.yaml | 9 + .../device-tree/Bindings/pci/rcar-pci-host.yaml | 115 + .../Bindings/pci/samsung,exynos-pcie.yaml | 119 + .../device-tree/Bindings/pci/ti,j721e-pci-ep.yaml | 23 +- .../Bindings/pci/ti,j721e-pci-host.yaml | 27 +- .../device-tree/Bindings/perf/fsl-imx-ddr.yaml | 3 + .../Bindings/phy/allwinner,sun4i-a10-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun50i-a64-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun50i-h6-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun5i-a13-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun6i-a31-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun8i-a23-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun8i-a83t-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun8i-h3-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun8i-r40-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun8i-v3s-usb-phy.yaml | 2 + .../Bindings/phy/allwinner,sun9i-a80-usb-phy.yaml | 19 +- .../Bindings/phy/amlogic,axg-mipi-dphy.yaml | 70 + .../phy/amlogic,meson-axg-mipi-pcie-analog.yaml | 21 +- .../Bindings/phy/brcm,brcmstb-usb-phy.yaml | 196 + .../device-tree/Bindings/phy/brcm,sata-phy.yaml | 147 + .../device-tree/Bindings/phy/ingenic,phy-usb.yaml | 58 + .../Bindings/phy/intel,phy-keembay-usb.yaml | 44 + .../Bindings/phy/marvell,mmp3-hsic-phy.yaml | 9 +- .../device-tree/Bindings/phy/mediatek,dsi-phy.yaml | 85 + .../Bindings/phy/mediatek,hdmi-phy.yaml | 92 + .../Bindings/phy/mediatek,mt7621-pci-phy.yaml | 36 + .../device-tree/Bindings/phy/mediatek,tphy.yaml | 260 ++ .../device-tree/Bindings/phy/mediatek,ufs-phy.yaml | 64 + .../device-tree/Bindings/phy/mediatek,xsphy.yaml | 199 + .../Bindings/phy/phy-cadence-sierra.yaml | 152 + .../Bindings/phy/phy-stm32-usbphyc.yaml | 136 + .../device-tree/Bindings/phy/qcom,qmp-phy.yaml | 103 + .../device-tree/Bindings/phy/qcom,qusb2-phy.yaml | 2 + .../device-tree/Bindings/phy/qcom,usb-hs-28nm.yaml | 1 + .../Bindings/phy/qcom,usb-snps-femto-v2.yaml | 2 + .../device-tree/Bindings/phy/renesas,usb2-phy.yaml | 5 +- .../device-tree/Bindings/phy/rockchip-emmc-phy.txt | 5 + .../Bindings/phy/samsung,exynos-pcie-phy.yaml | 51 + .../device-tree/Bindings/phy/samsung-phy.txt | 1 + .../Bindings/phy/socionext,uniphier-ahci-phy.yaml | 2 +- .../Bindings/phy/socionext,uniphier-pcie-phy.yaml | 2 +- .../phy/socionext,uniphier-usb3hs-phy.yaml | 2 +- .../phy/socionext,uniphier-usb3ss-phy.yaml | 2 +- .../device-tree/Bindings/phy/ti,omap-usb2.yaml | 4 +- .../device-tree/Bindings/phy/ti,phy-gmii-sel.yaml | 2 +- .../device-tree/Bindings/phy/ti,phy-j721e-wiz.yaml | 2 +- .../pinctrl/allwinner,sun4i-a10-pinctrl.yaml | 17 +- .../Bindings/pinctrl/aspeed,ast2400-pinctrl.yaml | 5 +- .../Bindings/pinctrl/aspeed,ast2500-pinctrl.yaml | 6 +- .../Bindings/pinctrl/aspeed,ast2600-pinctrl.yaml | 2 +- .../Bindings/pinctrl/atmel,at91-pio4-pinctrl.txt | 8 +- .../Bindings/pinctrl/brcm,ns2-pinmux.txt | 2 +- .../Bindings/pinctrl/brcm,nsp-pinmux.txt | 2 +- .../Bindings/pinctrl/canaan,k210-fpioa.yaml | 171 + .../Bindings/pinctrl/fsl,imx7d-pinctrl.txt | 2 +- .../Bindings/pinctrl/microchip,sparx5-sgpio.yaml | 161 + .../Bindings/pinctrl/mscc,ocelot-pinctrl.txt | 3 +- .../Bindings/pinctrl/nvidia,tegra194-pinmux.txt | 2 +- .../Bindings/pinctrl/pinctrl-bindings.txt | 4 +- .../Bindings/pinctrl/pinctrl-mcp23s08.txt | 2 +- .../Bindings/pinctrl/pinctrl-mt65xx.txt | 2 +- .../Bindings/pinctrl/pinctrl-single.txt | 12 +- .../Bindings/pinctrl/qcom,lpass-lpi-pinctrl.yaml | 130 + .../Bindings/pinctrl/qcom,msm8953-pinctrl.yaml | 167 + .../Bindings/pinctrl/qcom,pmic-gpio.txt | 3 + .../device-tree/Bindings/pinctrl/qcom,pmic-mpp.txt | 1 + .../Bindings/pinctrl/qcom,sc7280-pinctrl.yaml | 158 + .../Bindings/pinctrl/qcom,sc8180x-pinctrl.yaml | 152 + .../Bindings/pinctrl/qcom,sdx55-pinctrl.yaml | 154 + .../Bindings/pinctrl/qcom,sm8350-pinctrl.yaml | 145 + .../Bindings/pinctrl/qcom,tlmm-common.yaml | 85 + .../Bindings/pinctrl/ralink,rt2880-pinmux.yaml | 64 + .../device-tree/Bindings/pinctrl/renesas,pfc.yaml | 12 +- .../Bindings/pinctrl/samsung-pinctrl.txt | 2 +- .../device-tree/Bindings/power/brcm,bcm-pmb.yaml | 50 + .../Bindings/power/mediatek,power-controller.yaml | 304 ++ .../device-tree/Bindings/power/qcom,rpmpd.yaml | 5 + .../device-tree/Bindings/power/renesas,apmu.yaml | 2 +- .../Bindings/power/reset/ocelot-reset.txt | 4 +- .../Bindings/power/reset/regulator-poweroff.yaml | 37 + .../device-tree/Bindings/power/supply/battery.yaml | 3 - .../device-tree/Bindings/power/supply/bq2515x.yaml | 1 - .../device-tree/Bindings/power/supply/bq256xx.yaml | 110 + .../device-tree/Bindings/power/supply/bq25980.yaml | 1 + .../Bindings/power/supply/cw2015_battery.yaml | 2 +- .../Bindings/power/supply/ltc4162-l.yaml | 69 + .../device-tree/Bindings/powerpc/sleep.yaml | 2 +- .../device-tree/Bindings/ptp/ptp-idtcm.yaml | 4 +- .../Bindings/pwm/intel,keembay-pwm.yaml | 47 + .../device-tree/Bindings/pwm/intel,lgm-pwm.yaml | 44 + .../device-tree/Bindings/pwm/pwm-mediatek.txt | 1 + .../device-tree/Bindings/pwm/pwm-mtk-disp.txt | 1 + .../device-tree/Bindings/pwm/pwm-sifive.yaml | 9 +- .../Bindings/regulator/anatop-regulator.yaml | 1 - .../device-tree/Bindings/regulator/dlg,da9121.yaml | 188 + .../Bindings/regulator/fixed-regulator.yaml | 49 +- .../Bindings/regulator/max8997-regulator.txt | 1 + .../Bindings/regulator/mcp16502-regulator.txt | 5 +- .../Bindings/regulator/mt6315-regulator.yaml | 69 + .../Bindings/regulator/nxp,pca9450-regulator.yaml | 5 + .../Bindings/regulator/nxp,pf8x00-regulator.yaml | 206 + .../Bindings/regulator/qcom,rpmh-regulator.txt | 9 + .../Bindings/regulator/qcom-labibb-regulator.yaml | 30 +- .../regulator/richtek,rt4831-regulator.yaml | 35 + .../Bindings/regulator/rohm,bd71837-regulator.yaml | 48 + .../Bindings/regulator/rohm,bd71847-regulator.yaml | 49 + .../Bindings/remoteproc/ingenic,vpu.yaml | 2 +- .../device-tree/Bindings/remoteproc/mtk,scp.txt | 8 +- .../device-tree/Bindings/remoteproc/qcom,adsp.txt | 12 + .../device-tree/Bindings/remoteproc/qcom,q6v5.txt | 12 +- .../Bindings/remoteproc/qcom,wcnss-pil.txt | 21 +- .../Bindings/remoteproc/st,stm32-rproc.yaml | 21 +- .../Bindings/remoteproc/ti,k3-r5f-rproc.yaml | 2 + .../Bindings/remoteproc/ti,omap-remoteproc.yaml | 3 + .../Bindings/remoteproc/ti,pru-rproc.yaml | 214 + .../reset/brcm,bcm4908-misc-pcie-reset.yaml | 39 + .../Bindings/reset/brcm,bcm6345-reset.yaml | 37 + .../Bindings/reset/canaan,k210-rst.yaml | 40 + .../Bindings/reset/hisilicon,hi3660-reset.yaml | 77 + .../device-tree/Bindings/reset/snps,dw-reset.txt | 2 +- sys/contrib/device-tree/Bindings/riscv/canaan.yaml | 47 + sys/contrib/device-tree/Bindings/riscv/cpus.yaml | 8 + .../Bindings/riscv/sifive-l2-cache.yaml | 35 +- sys/contrib/device-tree/Bindings/riscv/sifive.yaml | 17 +- .../Bindings/rtc/allwinner,sun6i-a31-rtc.yaml | 1 - .../Bindings/rtc/atmel,at91rm9200-rtc.yaml | 1 + .../device-tree/Bindings/rtc/nxp,pcf2127.yaml | 51 + sys/contrib/device-tree/Bindings/rtc/pcf8563.txt | 3 +- sys/contrib/device-tree/Bindings/rtc/rtc.yaml | 7 +- .../device-tree/Bindings/rtc/trivial-rtc.yaml | 6 +- sys/contrib/device-tree/Bindings/serial/8250.yaml | 6 +- .../device-tree/Bindings/serial/fsl-imx-uart.yaml | 2 +- .../device-tree/Bindings/serial/fsl-mxs-auart.yaml | 2 +- .../Bindings/serial/litex,liteuart.yaml | 40 + .../device-tree/Bindings/serial/omap_serial.txt | 1 + sys/contrib/device-tree/Bindings/serial/pl011.yaml | 4 - .../device-tree/Bindings/serial/renesas,hscif.yaml | 3 + .../device-tree/Bindings/serial/renesas,scif.yaml | 3 + .../device-tree/Bindings/serial/renesas,scifa.yaml | 2 + .../device-tree/Bindings/serial/renesas,scifb.yaml | 2 + .../device-tree/Bindings/serial/sifive-serial.yaml | 5 +- .../device-tree/Bindings/serial/st,stm32-uart.yaml | 13 +- .../device-tree/Bindings/soc/imx/imx8m-soc.yaml | 86 + .../Bindings/soc/litex/litex,soc-controller.yaml | 41 + .../device-tree/Bindings/soc/mediatek/devapc.yaml | 60 + .../soc/microchip/atmel,at91rm9200-tcb.yaml | 34 +- .../Bindings/soc/qcom/qcom,aoss-qmp.txt | 1 + .../device-tree/Bindings/soc/qcom/qcom,smem.yaml | 72 + .../device-tree/Bindings/soc/ti/k3-ringacc.yaml | 2 +- .../device-tree/Bindings/soc/ti/ti,pruss.yaml | 76 + .../Bindings/soc/xilinx/xlnx,vcu-settings.yaml | 43 + .../device-tree/Bindings/soc/xilinx/xlnx,vcu.txt | 9 +- .../device-tree/Bindings/sound/adi,adau1372.yaml | 67 + .../device-tree/Bindings/sound/adi,adau1977.yaml | 92 + .../Bindings/sound/allwinner,sun4i-a10-codec.yaml | 3 +- .../Bindings/sound/allwinner,sun4i-a10-i2s.yaml | 6 +- .../Bindings/sound/audio-graph-card.yaml | 57 + .../Bindings/sound/audio-graph-port.yaml | 81 + .../device-tree/Bindings/sound/audio-graph.yaml | 45 + .../device-tree/Bindings/sound/fsl,aud2htx.yaml | 66 + .../device-tree/Bindings/sound/fsl,spdif.yaml | 5 + .../device-tree/Bindings/sound/fsl,xcvr.yaml | 104 + .../device-tree/Bindings/sound/fsl-asoc-card.txt | 2 + .../Bindings/sound/google,sc7180-trogdor.yaml | 139 + .../device-tree/Bindings/sound/imx-audio-hdmi.yaml | 52 + .../device-tree/Bindings/sound/ingenic,codec.yaml | 11 +- .../Bindings/sound/intel,keembay-i2s.yaml | 13 + .../Bindings/sound/marvell,mmp-sspa.yaml | 25 +- .../sound/mt8192-mt6359-rt1015-rt5682.yaml | 49 + sys/contrib/device-tree/Bindings/sound/nau8315.txt | 18 + .../sound/nvidia,tegra-audio-graph-card.yaml | 190 + .../Bindings/sound/nvidia,tegra186-dspk.yaml | 18 +- .../Bindings/sound/nvidia,tegra210-admaif.yaml | 13 +- .../Bindings/sound/nvidia,tegra210-ahub.yaml | 13 +- .../Bindings/sound/nvidia,tegra210-dmic.yaml | 18 +- .../Bindings/sound/nvidia,tegra210-i2s.yaml | 18 +- .../Bindings/sound/nvidia,tegra30-hda.yaml | 110 + .../Bindings/sound/qcom,lpass-rx-macro.yaml | 62 + .../Bindings/sound/qcom,lpass-tx-macro.yaml | 67 + .../Bindings/sound/qcom,lpass-va-macro.yaml | 67 + .../Bindings/sound/qcom,lpass-wsa-macro.yaml | 69 + .../device-tree/Bindings/sound/qcom,sm8250.yaml | 159 + .../device-tree/Bindings/sound/renesas,rsnd.txt | 520 --- .../device-tree/Bindings/sound/renesas,rsnd.yaml | 447 ++ sys/contrib/device-tree/Bindings/sound/rt5659.txt | 11 + sys/contrib/device-tree/Bindings/sound/rt5682.txt | 2 + .../Bindings/sound/samsung,aries-wm8994.yaml | 3 + .../Bindings/sound/samsung,midas-audio.yaml | 2 + .../device-tree/Bindings/sound/sgtl5000.yaml | 2 - .../Bindings/sound/simple-audio-mux.yaml | 41 + .../device-tree/Bindings/sound/simple-card.yaml | 6 +- .../device-tree/Bindings/sound/st,stm32-i2s.yaml | 4 + .../device-tree/Bindings/sound/st,stm32-sai.yaml | 200 + .../device-tree/Bindings/sound/tas2562.yaml | 2 + .../device-tree/Bindings/sound/tas2770.yaml | 2 + .../Bindings/sound/ti,j721e-cpb-audio.yaml | 4 +- .../Bindings/sound/ti,j721e-cpb-ivi-audio.yaml | 4 +- .../device-tree/Bindings/sound/tlv320adcx140.yaml | 1 + sys/contrib/device-tree/Bindings/sound/wm8962.txt | 4 + .../Bindings/spi/allwinner,sun6i-a31-spi.yaml | 1 + .../device-tree/Bindings/spi/cadence-quadspi.txt | 68 + .../Bindings/spi/nvidia,tegra210-quad.yaml | 117 + .../device-tree/Bindings/spi/realtek,rtl-spi.yaml | 41 + .../device-tree/Bindings/spi/renesas,rspi.yaml | 2 + .../device-tree/Bindings/spi/renesas,sh-msiof.yaml | 1 + .../device-tree/Bindings/spi/snps,dw-apb-ssi.yaml | 2 + .../device-tree/Bindings/spi/spi-controller.yaml | 33 +- .../device-tree/Bindings/spi/spi-sifive.yaml | 10 +- .../device-tree/Bindings/spi/xlnx,zynq-qspi.yaml | 59 + .../sram/allwinner,sun4i-a10-system-control.yaml | 1 + sys/contrib/device-tree/Bindings/sram/sram.yaml | 4 + .../device-tree/Bindings/submitting-patches.rst | 3 +- .../Bindings/thermal/allwinner,sun8i-a83t-ths.yaml | 12 +- .../Bindings/thermal/mediatek-thermal.txt | 3 +- .../Bindings/thermal/qcom-spmi-adc-tm5.yaml | 153 + .../Bindings/thermal/rcar-gen3-thermal.yaml | 17 +- .../device-tree/Bindings/thermal/rcar-thermal.yaml | 48 +- .../Bindings/timer/allwinner,sun4i-a10-timer.yaml | 2 + .../timer/allwinner,sun5i-a13-hstimer.yaml | 3 +- .../Bindings/timer/intel,ixp4xx-timer.yaml | 2 +- .../Bindings/timer/nuvoton,npcm7xx-timer.txt | 3 +- .../device-tree/Bindings/timer/renesas,tmu.yaml | 99 + .../device-tree/Bindings/timer/sifive,clint.yaml | 12 +- .../Bindings/timer/snps,dw-apb-timer.yaml | 10 +- .../device-tree/Bindings/trivial-devices.yaml | 208 +- .../Bindings/usb/allwinner,sun4i-a10-musb.yaml | 2 +- .../Bindings/usb/amlogic,meson-g12a-usb-ctrl.yaml | 6 +- .../device-tree/Bindings/usb/brcm,usb-pinmap.yaml | 73 + .../device-tree/Bindings/usb/cdns,usb3.yaml | 5 + sys/contrib/device-tree/Bindings/usb/dwc3-st.txt | 4 +- .../device-tree/Bindings/usb/dwc3-xilinx.txt | 2 +- .../device-tree/Bindings/usb/exynos-usb.txt | 2 +- .../device-tree/Bindings/usb/fsl,imx8mp-dwc3.yaml | 105 + .../device-tree/Bindings/usb/generic-ehci.yaml | 53 +- .../device-tree/Bindings/usb/generic-ohci.yaml | 36 +- .../device-tree/Bindings/usb/generic-xhci.yaml | 65 + .../device-tree/Bindings/usb/ingenic,musb.yaml | 2 +- .../Bindings/usb/intel,keembay-dwc3.yaml | 9 +- .../device-tree/Bindings/usb/maxim,max33359.yaml | 75 + .../Bindings/usb/mediatek,mtk-xhci.yaml | 188 + .../device-tree/Bindings/usb/mediatek,mtu3.yaml | 287 ++ .../device-tree/Bindings/usb/mediatek,musb.yaml | 114 + sys/contrib/device-tree/Bindings/usb/omap-usb.txt | 2 +- .../device-tree/Bindings/usb/qcom,dwc3.yaml | 13 +- .../device-tree/Bindings/usb/renesas,usb-xhci.yaml | 5 +- .../Bindings/usb/renesas,usb3-peri.yaml | 7 +- .../device-tree/Bindings/usb/renesas,usbhs.yaml | 4 +- .../device-tree/Bindings/usb/rockchip,dwc3.yaml | 108 + .../device-tree/Bindings/usb/snps,dwc3.yaml | 332 ++ .../device-tree/Bindings/usb/st,stusb160x.yaml | 87 + .../device-tree/Bindings/usb/ti,hd3ss3220.yaml | 8 +- .../device-tree/Bindings/usb/ti,j721e-usb.yaml | 13 +- .../device-tree/Bindings/usb/ti,keystone-dwc3.yaml | 6 +- .../device-tree/Bindings/usb/usb-device.yaml | 124 + sys/contrib/device-tree/Bindings/usb/usb-drd.yaml | 78 + sys/contrib/device-tree/Bindings/usb/usb-hcd.yaml | 36 +- sys/contrib/device-tree/Bindings/usb/usb-xhci.yaml | 42 + sys/contrib/device-tree/Bindings/usb/usb.yaml | 63 + .../device-tree/Bindings/usb/usbmisc-imx.txt | 2 +- .../device-tree/Bindings/vendor-prefixes.yaml | 64 +- .../Bindings/watchdog/allwinner,sun4i-a10-wdt.yaml | 9 +- .../device-tree/Bindings/watchdog/fsl-imx-wdt.yaml | 16 + .../Bindings/watchdog/intel,keembay-wdt.yaml | 57 + .../device-tree/Bindings/watchdog/mtk-wdt.txt | 5 +- .../device-tree/Bindings/watchdog/qcom-wdt.yaml | 1 + .../device-tree/Bindings/watchdog/renesas,wdt.yaml | 1 + .../device-tree/Bindings/watchdog/snps,dw-wdt.yaml | 16 +- .../device-tree/Bindings/watchdog/ti,rti-wdt.yaml | 4 +- .../device-tree/Bindings/watchdog/watchdog.yaml | 1 - .../device-tree/include/dt-bindings/clock/at91.h | 11 + .../include/dt-bindings/clock/axg-clkc.h | 26 +- .../device-tree/include/dt-bindings/clock/dra7.h | 4 + .../include/dt-bindings/clock/fsl,qoriq-clockgen.h | 15 + .../include/dt-bindings/clock/g12a-clkc.h | 2 + .../include/dt-bindings/clock/imx8-clock.h | 2 + .../include/dt-bindings/clock/imx8-lpcg.h | 14 + .../include/dt-bindings/clock/imx8mm-clock.h | 10 +- .../include/dt-bindings/clock/imx8mn-clock.h | 9 +- .../include/dt-bindings/clock/imx8mq-clock.h | 16 +- .../include/dt-bindings/clock/ingenic,sysost.h | 10 +- .../include/dt-bindings/clock/k210-clk.h | 55 +- .../include/dt-bindings/clock/meson8b-clkc.h | 2 - .../include/dt-bindings/clock/mstar-msc313-mpll.h | 19 + .../include/dt-bindings/clock/qcom,camcc-sc7180.h | 121 + .../include/dt-bindings/clock/qcom,gcc-msm8998.h | 2 + .../include/dt-bindings/clock/qcom,gcc-sc7280.h | 226 + .../include/dt-bindings/clock/qcom,gcc-sc8180x.h | 309 ++ .../include/dt-bindings/clock/qcom,gcc-sdx55.h | 117 + .../include/dt-bindings/clock/qcom,gcc-sm8350.h | 266 ++ .../include/dt-bindings/clock/qcom,gpucc-sdm660.h | 28 + .../include/dt-bindings/clock/qcom,mmcc-sdm660.h | 162 + .../include/dt-bindings/clock/qcom,rpmh.h | 10 + .../dt-bindings/clock/qcom,sm8250-lpass-aoncc.h | 11 + .../dt-bindings/clock/qcom,sm8250-lpass-audiocc.h | 13 + .../dt-bindings/clock/qcom,videocc-sm8250.h | 2 + .../include/dt-bindings/clock/rk3368-cru.h | 3 + .../include/dt-bindings/clock/sifive-fu740-prci.h | 23 + .../include/dt-bindings/clock/sun50i-h6-r-ccu.h | 2 + .../include/dt-bindings/clock/sun50i-h616-ccu.h | 115 + .../include/dt-bindings/clock/tegra210-car.h | 2 +- .../include/dt-bindings/clock/xlnx-vcu.h | 15 + .../include/dt-bindings/dma/jz4775-dma.h | 44 + .../device-tree/include/dt-bindings/dma/qcom-gpi.h | 11 + .../include/dt-bindings/dma/x2000-dma.h | 54 + .../include/dt-bindings/firmware/imx/rsrc.h | 1 + .../include/dt-bindings/gpio/msc313-gpio.h | 53 + .../include/dt-bindings/gpio/tegra186-gpio.h | 4 +- .../include/dt-bindings/input/cros-ec-keyboard.h | 103 + .../dt-bindings/interconnect/qcom,msm8939.h | 105 + .../include/dt-bindings/interconnect/qcom,sdm845.h | 2 + .../include/dt-bindings/interconnect/qcom,sdx55.h | 76 + .../include/dt-bindings/memory/mt2701-larb-port.h | 4 +- .../include/dt-bindings/memory/mt2712-larb-port.h | 6 +- .../include/dt-bindings/memory/mt6779-larb-port.h | 6 +- .../include/dt-bindings/memory/mt8167-larb-port.h | 6 +- .../include/dt-bindings/memory/mt8173-larb-port.h | 6 +- .../include/dt-bindings/memory/mt8183-larb-port.h | 6 +- .../include/dt-bindings/memory/mt8192-larb-port.h | 243 ++ .../include/dt-bindings/memory/mtk-memory-port.h | 15 + .../include/dt-bindings/memory/tegra124-mc.h | 68 + .../include/dt-bindings/memory/tegra20-mc.h | 53 + .../include/dt-bindings/memory/tegra210-mc.h | 10 + .../include/dt-bindings/memory/tegra30-mc.h | 67 + .../include/dt-bindings/pinctrl/k210-fpioa.h | 276 ++ .../include/dt-bindings/power/mt8167-power.h | 17 + .../include/dt-bindings/power/mt8183-power.h | 26 + .../include/dt-bindings/power/mt8192-power.h | 32 + .../include/dt-bindings/power/qcom-rpmpd.h | 43 + .../dt-bindings/regulator/dlg,da9121-regulator.h | 22 + .../dt-bindings/reset-controller/mt8192-resets.h | 30 + .../include/dt-bindings/reset/bcm6318-reset.h | 20 + .../include/dt-bindings/reset/bcm63268-reset.h | 26 + .../include/dt-bindings/reset/bcm6328-reset.h | 18 + .../include/dt-bindings/reset/bcm6358-reset.h | 15 + .../include/dt-bindings/reset/bcm6362-reset.h | 22 + .../include/dt-bindings/reset/bcm6368-reset.h | 16 + .../include/dt-bindings/reset/k210-rst.h | 42 + .../include/dt-bindings/reset/sun50i-h6-r-ccu.h | 1 + .../include/dt-bindings/reset/sun50i-h616-ccu.h | 70 + .../device-tree/include/dt-bindings/soc/bcm-pmb.h | 11 + .../include/dt-bindings/sound/adi,adau1977.h | 15 + .../include/dt-bindings/sound/apq8016-lpass.h | 7 +- .../include/dt-bindings/sound/qcom,lpass.h | 15 + .../include/dt-bindings/sound/sc7180-lpass.h | 6 +- .../device-tree/include/dt-bindings/usb/pd.h | 319 +- sys/contrib/device-tree/src/arm/am335x-baltos.dtsi | 2 +- .../device-tree/src/arm/am335x-boneblue.dts | 54 + sys/contrib/device-tree/src/arm/am335x-cm-t335.dts | 2 +- sys/contrib/device-tree/src/arm/am335x-evm.dts | 15 +- sys/contrib/device-tree/src/arm/am335x-evmsk.dts | 14 +- sys/contrib/device-tree/src/arm/am335x-icev2.dts | 14 +- .../device-tree/src/arm/am335x-igep0033.dtsi | 2 +- .../device-tree/src/arm/am335x-myirtech-myc.dtsi | 267 ++ .../device-tree/src/arm/am335x-myirtech-myd.dts | 536 +++ sys/contrib/device-tree/src/arm/am335x-nano.dts | 1 - sys/contrib/device-tree/src/arm/am33xx-l4.dtsi | 151 +- sys/contrib/device-tree/src/arm/am33xx.dtsi | 185 +- sys/contrib/device-tree/src/arm/am4372.dtsi | 175 +- sys/contrib/device-tree/src/arm/am437x-l4.dtsi | 83 +- sys/contrib/device-tree/src/arm/am574x-idk.dts | 4 + sys/contrib/device-tree/src/arm/armada-375.dtsi | 2 +- .../src/arm/armada-382-rd-ac3x-48g4x2xl.dts | 112 + .../device-tree/src/arm/armada-385-linksys.dtsi | 2 + .../src/arm/armada-385-turris-omnia.dts | 179 +- .../device-tree/src/arm/armada-388-clearfog.dts | 4 +- .../device-tree/src/arm/armada-388-clearfog.dtsi | 10 +- .../device-tree/src/arm/armada-388-helios4.dts | 34 +- .../device-tree/src/arm/armada-xp-98dx3236.dtsi | 12 +- .../src/arm/armada-xp-crs305-1g-4s-bit.dts | 43 + .../device-tree/src/arm/armada-xp-crs305-1g-4s.dts | 17 + .../src/arm/armada-xp-crs305-1g-4s.dtsi | 104 + .../src/arm/armada-xp-crs326-24g-2s-bit.dts | 43 + .../src/arm/armada-xp-crs326-24g-2s.dts | 17 + .../src/arm/armada-xp-crs326-24g-2s.dtsi | 104 + .../src/arm/armada-xp-crs328-4c-20s-4s-bit.dts | 43 + .../src/arm/armada-xp-crs328-4c-20s-4s.dts | 17 + .../src/arm/armada-xp-crs328-4c-20s-4s.dtsi | 104 + .../device-tree/src/arm/aspeed-ast2600-evb.dts | 28 + .../src/arm/aspeed-bmc-amd-ethanolx.dts | 79 +- .../src/arm/aspeed-bmc-ampere-mtjade.dts | 558 +++ .../src/arm/aspeed-bmc-bytedance-g220a.dts | 928 ++++ .../src/arm/aspeed-bmc-facebook-galaxy100.dts | 57 + .../src/arm/aspeed-bmc-facebook-minipack.dts | 888 ++++ .../src/arm/aspeed-bmc-facebook-tiogapass.dts | 13 +- .../src/arm/aspeed-bmc-facebook-wedge100.dts | 120 +- .../src/arm/aspeed-bmc-facebook-wedge40.dts | 112 +- .../src/arm/aspeed-bmc-facebook-wedge400.dts | 4 +- .../device-tree/src/arm/aspeed-bmc-ibm-everest.dts | 775 ++++ .../src/arm/aspeed-bmc-ibm-rainier-4u.dts | 37 + .../device-tree/src/arm/aspeed-bmc-ibm-rainier.dts | 42 +- .../src/arm/aspeed-bmc-inspur-fp5280g2.dts | 37 +- .../src/arm/aspeed-bmc-intel-s2600wf.dts | 4 +- .../device-tree/src/arm/aspeed-bmc-opp-mihawk.dts | 16 +- .../device-tree/src/arm/aspeed-bmc-opp-mowgli.dts | 5 + .../device-tree/src/arm/aspeed-bmc-opp-tacoma.dts | 11 +- .../src/arm/aspeed-bmc-portwell-neptune.dts | 2 + .../src/arm/aspeed-bmc-supermicro-x11spi.dts | 137 + sys/contrib/device-tree/src/arm/aspeed-g4.dtsi | 6 + sys/contrib/device-tree/src/arm/aspeed-g5.dtsi | 6 + sys/contrib/device-tree/src/arm/aspeed-g6.dtsi | 14 +- .../src/arm/ast2400-facebook-netbmc-common.dtsi | 117 + sys/contrib/device-tree/src/arm/at91-kizbox.dts | 55 +- .../device-tree/src/arm/at91-kizbox2-common.dtsi | 8 +- .../device-tree/src/arm/at91-kizbox3-hs.dts | 16 +- .../device-tree/src/arm/at91-kizbox3_common.dtsi | 11 +- .../src/arm/at91-kizboxmini-common.dtsi | 8 +- sys/contrib/device-tree/src/arm/at91-sam9x60ek.dts | 13 +- .../device-tree/src/arm/at91-sama5d27_som1.dtsi | 2 +- .../device-tree/src/arm/at91-sama5d27_som1_ek.dts | 1 - .../device-tree/src/arm/at91-sama5d27_wlsom1.dtsi | 22 +- .../src/arm/at91-sama5d27_wlsom1_ek.dts | 1 - .../device-tree/src/arm/at91-sama5d2_icp.dts | 1 - .../device-tree/src/arm/at91-sama5d2_ptc_ek.dts | 1 - .../device-tree/src/arm/at91-sama5d2_xplained.dts | 1 - .../device-tree/src/arm/at91-sama5d3_xplained.dts | 7 + .../device-tree/src/arm/at91-sama5d4_xplained.dts | 7 + sys/contrib/device-tree/src/arm/at91-smartkiz.dts | 6 +- sys/contrib/device-tree/src/arm/at91sam9260.dtsi | 25 - sys/contrib/device-tree/src/arm/at91sam9g45.dtsi | 27 - .../device-tree/src/arm/at91sam9m10g45ek.dts | 10 +- sys/contrib/device-tree/src/arm/at91sam9rl.dtsi | 25 - sys/contrib/device-tree/src/arm/at91sam9rlek.dts | 10 +- sys/contrib/device-tree/src/arm/at91sam9x5.dtsi | 28 - sys/contrib/device-tree/src/arm/bcm-cygnus.dtsi | 1 - sys/contrib/device-tree/src/arm/bcm-nsp.dtsi | 8 +- sys/contrib/device-tree/src/arm/bcm21664.dtsi | 2 +- .../device-tree/src/arm/bcm2711-rpi-4-b.dts | 19 + sys/contrib/device-tree/src/arm/bcm2711.dtsi | 31 + .../device-tree/src/arm/bcm283x-rpi-usb-otg.dtsi | 2 +- .../src/arm/bcm283x-rpi-usb-peripheral.dtsi | 2 +- .../device-tree/src/arm/bcm4708-luxul-xap-1510.dts | 7 - .../device-tree/src/arm/bcm4708-luxul-xwc-1000.dts | 7 - .../src/arm/bcm4708-smartrg-sr400ac.dts | 3 - .../src/arm/bcm47081-buffalo-wzr-600dhp2.dts | 4 - .../src/arm/bcm47081-luxul-xap-1410.dts | 7 - .../src/arm/bcm47081-luxul-xwr-1200.dts | 7 - .../src/arm/bcm47081-tplink-archer-c5-v2.dts | 4 - sys/contrib/device-tree/src/arm/bcm4709.dtsi | 4 + .../src/arm/bcm47094-linksys-panamera.dts | 94 +- .../src/arm/bcm47094-luxul-xap-1610.dts | 3 - .../src/arm/bcm47094-luxul-xwc-2000.dts | 3 - .../src/arm/bcm47094-luxul-xwr-3100.dts | 3 - .../src/arm/bcm47094-luxul-xwr-3150-v1.dts | 7 +- sys/contrib/device-tree/src/arm/bcm47094.dtsi | 13 + sys/contrib/device-tree/src/arm/bcm5301x.dtsi | 67 +- sys/contrib/device-tree/src/arm/bcm53573.dtsi | 4 +- sys/contrib/device-tree/src/arm/bcm953012er.dts | 3 - sys/contrib/device-tree/src/arm/bcm958522er.dts | 4 + sys/contrib/device-tree/src/arm/bcm958525er.dts | 4 + sys/contrib/device-tree/src/arm/bcm958525xmc.dts | 4 + sys/contrib/device-tree/src/arm/bcm958622hr.dts | 3 - sys/contrib/device-tree/src/arm/bcm958623hr.dts | 3 - sys/contrib/device-tree/src/arm/bcm958625hr.dts | 3 - sys/contrib/device-tree/src/arm/bcm958625k.dts | 3 - sys/contrib/device-tree/src/arm/bcm988312hr.dts | 3 - sys/contrib/device-tree/src/arm/berlin2.dtsi | 12 +- .../src/arm/berlin2cd-google-chromecast.dts | 6 +- sys/contrib/device-tree/src/arm/berlin2cd.dtsi | 12 +- sys/contrib/device-tree/src/arm/berlin2q.dtsi | 12 +- .../device-tree/src/arm/cros-ec-keyboard.dtsi | 93 +- sys/contrib/device-tree/src/arm/dove-sbc-a510.dts | 1 + sys/contrib/device-tree/src/arm/dra7.dtsi | 185 +- sys/contrib/device-tree/src/arm/dra71-evm.dts | 2 + sys/contrib/device-tree/src/arm/dra76x.dtsi | 36 + sys/contrib/device-tree/src/arm/dra7xx-clocks.dtsi | 14 + sys/contrib/device-tree/src/arm/e60k02.dtsi | 6 + .../src/arm/exynos-mfc-reserved-memory.dtsi | 4 +- .../device-tree/src/arm/exynos3250-artik5-eval.dts | 26 + .../device-tree/src/arm/exynos3250-artik5.dtsi | 4 +- .../device-tree/src/arm/exynos3250-monk.dts | 10 +- *** 3469 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Thu Jul 1 15:34:03 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 27332665FD7; Thu, 1 Jul 2021 15:34: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 4GG2Lg0Td3z4T3s; Thu, 1 Jul 2021 15:34: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 ED08022EAE; Thu, 1 Jul 2021 15:34: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 161FY28u067621; Thu, 1 Jul 2021 15:34:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161FY2BC067620; Thu, 1 Jul 2021 15:34:02 GMT (envelope-from git) Date: Thu, 1 Jul 2021 15:34:02 GMT Message-Id: <202107011534.161FY2BC067620@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1426907f4dd0 - main - hz.9: update stathz for current usage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1426907f4dd017d978caf7d946d2d398d68673fd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 15:34:03 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1426907f4dd017d978caf7d946d2d398d68673fd commit 1426907f4dd017d978caf7d946d2d398d68673fd Author: Warner Losh AuthorDate: 2021-07-01 15:32:40 +0000 Commit: Warner Losh CommitDate: 2021-07-01 15:33:03 +0000 hz.9: update stathz for current usage Update the stathz description to reflect reality. profhz is the only thing we should deprecate. Add some implementation notes that describe the optimizations made to date. Discusssed with: emaste Reviewed by: kib (prior), jhb (prior), gbe Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30815 --- share/man/man9/hz.9 | 99 ++++++++++++++++++++++++++++++++++++++--------------- 1 file changed, 72 insertions(+), 27 deletions(-) diff --git a/share/man/man9/hz.9 b/share/man/man9/hz.9 index d0e5d1b1ff3e..73efcf3b0da3 100644 --- a/share/man/man9/hz.9 +++ b/share/man/man9/hz.9 @@ -22,7 +22,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd June 18, 2021 +.Dd July 1, 2021 .Dt HZ 9 .Os .Sh NAME @@ -36,7 +36,7 @@ .Pp .Vt extern int hz; .Vt extern int tick; -.Vt extern int stathz; /* deprecated */ +.Vt extern int stathz; .Vt extern int profhz; /* deprecated */ .Sh DESCRIPTION .Fx @@ -44,37 +44,34 @@ utilizes periodic, one-shot, global or per-CPU timing hardware using .Xr eventtimers 9 to produce traditional clock behavior. +These clocks regulate periodic events in the system. .Pp The main clock is used to update the system's notion of time via .Xr timecounters 9 -and to pace periodic system callbacks via -.Xr callout 9 , -.Xr epoch 9 , -and other methods documented in +and to pace periodic system processing as documented in .Xr hardclock 9 . -That routine will be called approximately +That routine may be called once every 1 / .Va hz -times per second. +seconds, though the call is omitted if no work is needed in the next tick and it +has not been 0.5 seconds since the last call. .Pp -The second clock, running at either +The stat clock running at .Va stathz -or -.Va profhz -was used to gather timing statistics, but has been replaced with the more -functional -.Xr hwpmc 4 . -These values are returned for -.Qq compatibility -with -.Bx 4.4 , -.St -p1003.1-2001 -and the -.Xr setitimer 2 -.Va ITIMER_PROF -flag, which were deprecated in -.St -p1003.1-2008 -in favor of -.Xr timer_settime 2 . +gathers statistics on the system and its processes. +It computes values for +.Xr getrusage 2 +and statistics displayed by +.Xr ps 1 +and +.Xr top 1 . +.Pp +Finally, a profiling clock may run at +.Vt profhz +to sample user program counter values for profiling purposes. +This profiling mechanism has been replaced by the more functional +.Xr hwpmc 4 +and may be removed in a future version of +.Fx . .Pp .Va tick is the length of time in microseconds of one system tick. @@ -88,6 +85,15 @@ and from .Xr sysctl 8 . .Pp +The current global and per-CPU CPU time usage is returned to the user in units +of 1 / +.Va stathz +ticks in the +.Sy kern.cp_time +and +.Sy kern.cp_times +sysctl MIBs. +.Pp The .Va hz rate may be overridden by defining @@ -103,12 +109,51 @@ Only override the default value if you really know what you are doing. Due to the adaptive nature of timeouts, changing this value has less effect than it had in the past. .Sh SEE ALSO +.Xr ps 1 , +.Xr top 1 , .Xr setitimer 2 , .Xr timer_settime 2 , .Xr loader.conf 5 , -.Xr callout 9 , .Xr eventtimers 9 , .Xr hardclock 9 , .Xr microtime 9 , .Xr time_second 9 , .Xr timecounters 9 +.Sh IMPLEMENTATION NOTES +Historically, both the +.Va stathz +and +.Va profhz +clocks have run off the same physical timer running at the slower rate when no +process is using the profile features, or at the higher rate when at least one +process is using it. +Although the interface is deprecated by +.St -p1003.1-2008 +in favor of +.Xr timer_settime 2 , +several programs still use +.Xr setitimer 2 +and +.Va ITIMER_PROF +for a higher-resolution periodic interrupt than has been traditionally +available. +.Pp +Historically, +.Xr hardclock 9 +has also been run off a separate interrupt, except on constrained platforms that +lack enough periodic interrupt sources. +.Fx +uses +.Xr eventtimers 9 +to abstract these details away, though some old code may still harbor +assumptions that are an imperfect fit to this abstraction. +.Pp +.Xr timecounters 9 +are limited to 32-bits and wrap after about a second, so we must update the +time hands they maintain at least every half second to get the proper wrapping +math. +In addition, +.Va kern.cp_times +needs to updated at least once a second so that the values displayed by +.Xr top 1 +update every second. From owner-dev-commits-src-all@freebsd.org Thu Jul 1 15:40:48 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3A2DB6662B3 for ; Thu, 1 Jul 2021 15:40:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG2VS1FKHz4TWK; Thu, 1 Jul 2021 15:40: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 0F7462308D; Thu, 1 Jul 2021 15:40: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 161Fel2T076405; Thu, 1 Jul 2021 15:40:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161Feldx076404; Thu, 1 Jul 2021 15:40:47 GMT (envelope-from git) Date: Thu, 1 Jul 2021 15:40:47 GMT Message-Id: <202107011540.161Feldx076404@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Emmanuel Vadot Subject: git: fcdf9a28231b - Create tag vendor/device-tree/5.12 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/tags/vendor/device-tree/5.12 X-Git-Reftype: annotated tag X-Git-Commit: fcdf9a28231b266f27a59285d55e1484f35a07e3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 15:40:48 -0000 The annotated tag vendor/device-tree/5.12 has been created by manu: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/device-tree/5.12 tag vendor/device-tree/5.12 Tagger: Emmanuel Vadot TaggerDate: 2021-07-01 15:40:16 +0000 Tag device-tree files from Linux v5.12 commit c7a3c7298ff5bdae6341330a1d94ab10e010beac Author: Emmanuel Vadot AuthorDate: 2021-07-01 15:39:42 +0000 Commit: Emmanuel Vadot CommitDate: 2021-07-01 15:39:42 +0000 Import device-tree files from Linux 5.12 From owner-dev-commits-src-all@freebsd.org Thu Jul 1 15:40:48 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 35185666394 for ; Thu, 1 Jul 2021 15:40:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG2VS0sZBz4TT4; Thu, 1 Jul 2021 15:40: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 F0A6022DF9; Thu, 1 Jul 2021 15:40: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 161Felw6076381; Thu, 1 Jul 2021 15:40:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161Fel0v076380; Thu, 1 Jul 2021 15:40:47 GMT (envelope-from git) Date: Thu, 1 Jul 2021 15:40:47 GMT Message-Id: <202107011540.161Fel0v076380@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Emmanuel Vadot Subject: git: f544df78d0a1..c7a3c7298ff5 - vendor/device-tree - vendor branch updated 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/vendor/device-tree X-Git-Reftype: branch X-Git-Commit: c7a3c7298ff5bdae6341330a1d94ab10e010beac X-Git-Oldrev: f544df78d0a1769b32c231209e7a5c4e7d4d2d1d X-Git-Newrev: c7a3c7298ff5bdae6341330a1d94ab10e010beac Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 15:40:48 -0000 The branch vendor/device-tree has been updated by manu: URL: https://cgit.FreeBSD.org/src/log/?id=f544df78d0a1..c7a3c7298ff5 c7a3c7298ff5 Import device-tree files from Linux 5.12 From owner-dev-commits-src-all@freebsd.org Thu Jul 1 15:43:36 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3335F6660DB; Thu, 1 Jul 2021 15:43:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG2Yh0wX8z4TqD; Thu, 1 Jul 2021 15:43:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 07F9C2311F; Thu, 1 Jul 2021 15:43:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161FhZM9081384; Thu, 1 Jul 2021 15:43:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161FhZUA081383; Thu, 1 Jul 2021 15:43:35 GMT (envelope-from git) Date: Thu, 1 Jul 2021 15:43:35 GMT Message-Id: <202107011543.161FhZUA081383@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 82ea1a07b489 - main - Import device-tree files from Linux 5.12 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/main X-Git-Reftype: branch X-Git-Commit: 82ea1a07b4894bea20c61afbf702cc46f0711ead Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 15:43:36 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=82ea1a07b4894bea20c61afbf702cc46f0711ead commit 82ea1a07b4894bea20c61afbf702cc46f0711ead Merge: 1426907f4dd0 c7a3c7298ff5 Author: Emmanuel Vadot AuthorDate: 2021-07-01 15:41:47 +0000 Commit: Emmanuel Vadot CommitDate: 2021-07-01 15:41:57 +0000 Import device-tree files from Linux 5.12 Sponsored by: Diablotin Systems .../device-tree/Bindings/hwmon/ntc_thermistor.txt | 2 +- sys/contrib/device-tree/Bindings/i2c/i2c-gpio.yaml | 2 +- sys/contrib/device-tree/Bindings/i2c/i2c-imx.yaml | 2 +- .../device-tree/Bindings/iio/adc/ingenic,adc.yaml | 5 +- .../device-tree/Bindings/input/adc-joystick.yaml | 4 +- .../input/touchscreen/resistive-adc-touch.txt | 5 +- .../Bindings/leds/cznic,turris-omnia-leds.yaml | 2 +- sys/contrib/device-tree/Bindings/mfd/ab8500.txt | 4 +- .../device-tree/Bindings/mfd/motorola-cpcap.txt | 16 ++-- .../Bindings/net/brcm,bcm4908-enet.yaml | 2 +- .../Bindings/net/ethernet-controller.yaml | 2 +- .../device-tree/Bindings/net/micrel-ksz90x1.txt | 96 +++++++++++++++++++++- .../device-tree/include/dt-bindings/bus/moxtet.h | 2 +- sys/contrib/device-tree/src/arc/haps_hs.dts | 2 +- sys/contrib/device-tree/src/arm/am33xx.dtsi | 3 + .../src/arm/armada-385-turris-omnia.dts | 4 +- sys/contrib/device-tree/src/arm/at91-sam9x60ek.dts | 8 -- .../device-tree/src/arm/at91-sama5d27_som1.dtsi | 4 +- sys/contrib/device-tree/src/arm/bcm2711.dtsi | 12 --- .../device-tree/src/arm/imx6qdl-phytec-pfla02.dtsi | 2 + .../device-tree/src/arm/imx6ul-14x14-evk.dtsi | 22 +++-- .../src/arm/imx6ull-myir-mys-6ulx-eval.dts | 1 + sys/contrib/device-tree/src/arm/omap3.dtsi | 3 + sys/contrib/device-tree/src/arm/omap4.dtsi | 5 ++ .../device-tree/src/arm/omap44xx-clocks.dtsi | 8 -- sys/contrib/device-tree/src/arm/omap5.dtsi | 5 ++ sys/contrib/device-tree/src/arm/sam9x60.dtsi | 9 ++ .../src/arm64/allwinner/sun50i-a64-pine64-lts.dts | 4 + .../src/arm64/allwinner/sun50i-a64-sopine.dtsi | 2 +- .../src/arm64/allwinner/sun50i-h6-beelink-gs1.dts | 4 - .../device-tree/src/arm64/allwinner/sun50i-h6.dtsi | 4 +- .../src/arm64/freescale/fsl-ls1012a.dtsi | 1 + .../src/arm64/freescale/fsl-ls1043a.dtsi | 1 + .../src/arm64/freescale/fsl-ls1046a.dtsi | 1 + .../src/arm64/freescale/imx8mm-pinfunc.h | 2 +- .../arm64/freescale/imx8mp-phyboard-pollux-rdk.dts | 2 +- .../src/arm64/freescale/imx8mp-phycore-som.dtsi | 2 +- .../src/arm64/freescale/imx8mq-pinfunc.h | 2 +- .../src/arm64/marvell/armada-3720-turris-mox.dts | 2 +- .../src/arm64/marvell/armada-cp11x.dtsi | 6 +- .../src/arm64/nvidia/tegra186-p2771-0000.dts | 2 +- .../src/arm64/nvidia/tegra186-p3310.dtsi | 2 +- .../device-tree/src/arm64/nvidia/tegra186.dtsi | 2 +- .../src/arm64/nvidia/tegra194-p2972-0000.dts | 3 +- .../src/arm64/nvidia/tegra194-p3668-0000.dtsi | 4 + .../src/arm64/nvidia/tegra194-p3668-0001.dtsi | 4 + .../src/arm64/nvidia/tegra194-p3668.dtsi | 1 - 47 files changed, 203 insertions(+), 80 deletions(-) From owner-dev-commits-src-all@freebsd.org Thu Jul 1 15:50:39 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0D77866659E for ; Thu, 1 Jul 2021 15:50:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG2jp73LYz4VM6; Thu, 1 Jul 2021 15:50:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id CFE7C23219; Thu, 1 Jul 2021 15:50:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161FocvR091135; Thu, 1 Jul 2021 15:50:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161FocKg091134; Thu, 1 Jul 2021 15:50:38 GMT (envelope-from git) Date: Thu, 1 Jul 2021 15:50:38 GMT Message-Id: <202107011550.161FocKg091134@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Emmanuel Vadot Subject: git: c7a3c7298ff5..71ca10f8bbe6 - vendor/device-tree - vendor branch updated 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/vendor/device-tree X-Git-Reftype: branch X-Git-Commit: 71ca10f8bbe6096fb8f641e138cd06d189f2b4e3 X-Git-Oldrev: c7a3c7298ff5bdae6341330a1d94ab10e010beac X-Git-Newrev: 71ca10f8bbe6096fb8f641e138cd06d189f2b4e3 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 15:50:39 -0000 The branch vendor/device-tree has been updated by manu: URL: https://cgit.FreeBSD.org/src/log/?id=c7a3c7298ff5..71ca10f8bbe6 71ca10f8bbe6 Import device-tree files from Linux 5.13 From owner-dev-commits-src-all@freebsd.org Thu Jul 1 15:50:39 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 19258666470 for ; Thu, 1 Jul 2021 15:50:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG2jq08Sxz4VDR; Thu, 1 Jul 2021 15:50:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E284B2304E; Thu, 1 Jul 2021 15:50:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161FocD6091159; Thu, 1 Jul 2021 15:50:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161FocrK091158; Thu, 1 Jul 2021 15:50:38 GMT (envelope-from git) Date: Thu, 1 Jul 2021 15:50:38 GMT Message-Id: <202107011550.161FocrK091158@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Emmanuel Vadot Subject: git: f85fdb33261f - Create tag vendor/device-tree/5.13 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/tags/vendor/device-tree/5.13 X-Git-Reftype: annotated tag X-Git-Commit: f85fdb33261f3766e2abcc049c9e20a7102b154c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 15:50:39 -0000 The annotated tag vendor/device-tree/5.13 has been created by manu: URL: https://cgit.FreeBSD.org/src/tag/?h=vendor/device-tree/5.13 tag vendor/device-tree/5.13 Tagger: Emmanuel Vadot TaggerDate: 2021-07-01 15:50:21 +0000 Tag device-tree files from Linux 5.13 commit 71ca10f8bbe6096fb8f641e138cd06d189f2b4e3 Author: Emmanuel Vadot AuthorDate: 2021-07-01 15:50:17 +0000 Commit: Emmanuel Vadot CommitDate: 2021-07-01 15:50:17 +0000 Import device-tree files from Linux 5.13 From owner-dev-commits-src-all@freebsd.org Thu Jul 1 15:51:23 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3CD476663F6; Thu, 1 Jul 2021 15:51: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 4GG2kg01Vfz4VKG; Thu, 1 Jul 2021 15:51: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 DCBD323227; Thu, 1 Jul 2021 15:51: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 161FpMnC094484; Thu, 1 Jul 2021 15:51:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161FpMD5094483; Thu, 1 Jul 2021 15:51:22 GMT (envelope-from git) Date: Thu, 1 Jul 2021 15:51:22 GMT Message-Id: <202107011551.161FpMD5094483@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 2eb4d8dc723d - main - Import device-tree files from Linux 5.13 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/main X-Git-Reftype: branch X-Git-Commit: 2eb4d8dc723da3cf7d735a3226ae49da4c8c5dbc Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 15:51:23 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=2eb4d8dc723da3cf7d735a3226ae49da4c8c5dbc commit 2eb4d8dc723da3cf7d735a3226ae49da4c8c5dbc Merge: 82ea1a07b489 71ca10f8bbe6 Author: Emmanuel Vadot AuthorDate: 2021-07-01 15:50:54 +0000 Commit: Emmanuel Vadot CommitDate: 2021-07-01 15:51:01 +0000 Import device-tree files from Linux 5.13 Sponsored by: Diablotin Systems sys/contrib/device-tree/Bindings/.gitignore | 4 +- sys/contrib/device-tree/Bindings/Makefile | 7 +- sys/contrib/device-tree/Bindings/arm/amlogic.yaml | 3 + sys/contrib/device-tree/Bindings/arm/apple.yaml | 64 + .../device-tree/Bindings/arm/bcm/brcm,bcm4908.yaml | 1 + .../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 25 +- sys/contrib/device-tree/Bindings/arm/cpus.yaml | 4 +- sys/contrib/device-tree/Bindings/arm/ete.yaml | 75 + sys/contrib/device-tree/Bindings/arm/fsl.yaml | 16 + .../arm/marvell/cp110-system-controller.txt | 4 +- sys/contrib/device-tree/Bindings/arm/mediatek.yaml | 36 + .../Bindings/arm/mediatek/mediatek,mmsys.txt | 1 + .../device-tree/Bindings/arm/msm/qcom,llcc.yaml | 1 + .../device-tree/Bindings/arm/mstar/mstar.yaml | 1 + .../device-tree/Bindings/arm/npcm/npcm.yaml | 29 + sys/contrib/device-tree/Bindings/arm/qcom.yaml | 20 + sys/contrib/device-tree/Bindings/arm/rockchip.yaml | 1 + .../device-tree/Bindings/arm/stm32/stm32.yaml | 21 + sys/contrib/device-tree/Bindings/arm/sunxi.yaml | 5 + sys/contrib/device-tree/Bindings/arm/ti/k3.yaml | 9 + sys/contrib/device-tree/Bindings/arm/trbe.yaml | 49 + sys/contrib/device-tree/Bindings/ata/ahci-ceva.txt | 4 + .../Bindings/ata/nvidia,tegra-ahci.yaml | 176 ++ .../clock/allwinner,sun4i-a10-pll1-clk.yaml | 2 +- .../Bindings/clock/armada3700-tbg-clock.txt | 2 +- .../Bindings/clock/idt,versaclock5.yaml | 2 - .../device-tree/Bindings/clock/imx8qxp-lpcg.yaml | 6 +- .../Bindings/clock/mediatek,mt7621-sysc.yaml | 68 + .../device-tree/Bindings/clock/milbeaut-clock.yaml | 12 +- .../Bindings/clock/qcom,gcc-sdm845.yaml | 82 + .../device-tree/Bindings/clock/qcom,gcc.yaml | 2 - .../Bindings/clock/rockchip,rk3568-cru.yaml | 60 + .../Bindings/connector/usb-connector.yaml | 25 + .../Bindings/counter/interrupt-counter.yaml | 62 + .../device-tree/Bindings/crypto/ti,sa2ul.yaml | 24 +- sys/contrib/device-tree/Bindings/ddr/lpddr3.txt | 5 + .../device-tree/Bindings/devfreq/rk3399_dmc.txt | 75 +- .../Bindings/display/allwinner,sun4i-a10-tcon.yaml | 1 - .../display/allwinner,sun8i-a83t-dw-hdmi.yaml | 4 +- .../Bindings/display/brcm,bcm2835-dsi0.yaml | 6 - .../Bindings/display/bridge/analogix,anx7625.yaml | 15 + .../Bindings/display/bridge/chipone,icn6211.yaml | 99 ++ .../Bindings/display/bridge/lontium,lt8912b.yaml | 102 ++ .../Bindings/display/bridge/renesas,dw-hdmi.yaml | 125 ++ .../Bindings/display/bridge/synopsys,dw-hdmi.yaml | 55 + .../device-tree/Bindings/display/fsl,lcdif.yaml | 110 ++ .../Bindings/display/imx/fsl,imx6-hdmi.yaml | 126 ++ .../Bindings/display/mediatek/mediatek,disp.txt | 2 +- .../Bindings/display/mediatek/mediatek,dpi.yaml | 12 +- .../device-tree/Bindings/display/msm/dpu.txt | 4 +- .../display/panel/kingdisplay,kd035g6-54nt.yaml | 1 - .../Bindings/display/panel/panel-dpi.yaml | 2 +- .../Bindings/display/panel/panel-simple.yaml | 2 + .../device-tree/Bindings/display/renesas,du.yaml | 834 ++++++++++ .../display/rockchip/rockchip,dw-hdmi.yaml | 156 ++ .../Bindings/display/simple-framebuffer.yaml | 5 + sys/contrib/device-tree/Bindings/dma/qcom,gpi.yaml | 3 +- .../Bindings/extcon/qcom,pm8941-misc.yaml | 62 + .../device-tree/Bindings/firmware/qcom,scm.txt | 2 + .../device-tree/Bindings/fpga/fpga-region.txt | 187 +-- .../Bindings/fpga/xilinx-pr-decoupler.txt | 24 +- .../Bindings/gpio/brcm,bcm6345-gpio.yaml | 86 + .../Bindings/gpio/fairchild,74hc595.yaml | 77 + .../Bindings/gpio/realtek,otto-gpio.yaml | 78 + .../Bindings/gpio/rockchip,gpio-bank.yaml | 82 + .../Bindings/gpio/socionext,uniphier-gpio.yaml | 3 +- .../device-tree/Bindings/gpu/arm,mali-bifrost.yaml | 2 + .../device-tree/Bindings/hwmon/ti,ads7828.yaml | 2 +- sys/contrib/device-tree/Bindings/i2c/i2c-mpc.yaml | 98 ++ .../Bindings/i2c/xlnx,xps-iic-2.00.a.yaml | 2 +- .../device-tree/Bindings/i3c/cdns,i3c-master.txt | 6 +- sys/contrib/device-tree/Bindings/i3c/i3c.yaml | 7 +- .../Bindings/i3c/silvaco,i3c-master.yaml | 2 +- .../Bindings/i3c/snps,dw-i3c-master.txt | 6 +- .../Bindings/iio/accel/bosch,bmi088.yaml | 68 + .../Bindings/iio/adc/brcm,iproc-static-adc.yaml | 5 - .../Bindings/iio/adc/mediatek,mt2701-auxadc.yaml | 1 + .../Bindings/iio/adc/st,stm32-dfsdm-adc.yaml | 1 - .../device-tree/Bindings/iio/adc/ti,ads131e08.yaml | 181 ++ .../device-tree/Bindings/iio/cdc/adi,ad7150.yaml | 69 + .../Bindings/iio/gyroscope/nxp,fxas21002c.yaml | 2 +- .../Bindings/iio/imu/adi,adis16475.yaml | 9 - .../Bindings/iio/light/capella,cm3605.yaml | 1 - .../Bindings/iio/light/upisemi,us5182.yaml | 4 +- .../proximity/google,cros-ec-mkbp-proximity.yaml | 37 + .../device-tree/Bindings/iio/st,st-sensors.yaml | 1 + sys/contrib/device-tree/Bindings/index.rst | 7 +- .../Bindings/infiniband/hisilicon-hns-roce.txt | 2 +- .../device-tree/Bindings/input/atmel,maxtouch.yaml | 32 + sys/contrib/device-tree/Bindings/input/input.yaml | 7 +- .../device-tree/Bindings/input/iqs626a.yaml | 843 ++++++++++ .../Bindings/input/touchscreen/azoteq,iqs5xx.yaml | 75 + .../Bindings/input/touchscreen/hycon,hy46xx.yaml | 119 ++ .../Bindings/input/touchscreen/ilitek_ts_i2c.yaml | 73 + .../Bindings/input/touchscreen/melfas,mms114.yaml | 87 + .../Bindings/input/touchscreen/mstar,msg2638.yaml | 69 + .../Bindings/interconnect/qcom,rpmh.yaml | 11 +- .../Bindings/interconnect/qcom,sdm660.yaml | 147 ++ .../Bindings/interrupt-controller/apple,aic.yaml | 88 + .../interrupt-controller/idt,32434-pic.yaml | 52 + .../interrupt-controller/loongson,htpic.yaml | 2 +- .../interrupt-controller/loongson,liointc.yaml | 36 +- .../interrupt-controller/nuvoton,wpcm450-aic.yaml | 39 + .../Bindings/interrupt-controller/qcom,pdc.txt | 1 + .../device-tree/Bindings/iommu/arm,smmu.yaml | 1 + .../device-tree/Bindings/iommu/sprd,iommu.yaml | 57 + .../Bindings/leds/backlight/kinetic,ktd253.yaml | 9 +- .../Bindings/leds/backlight/qcom-wled.yaml | 1 + .../device-tree/Bindings/leds/leds-bcm6328.txt | 4 +- .../device-tree/Bindings/leds/leds-bcm6358.txt | 2 +- .../device-tree/Bindings/leds/leds-lgm.yaml | 26 +- .../device-tree/Bindings/leds/leds-rt4505.yaml | 57 + .../device-tree/Bindings/mailbox/fsl,mu.yaml | 5 +- .../device-tree/Bindings/mailbox/qcom-ipcc.yaml | 2 + .../device-tree/Bindings/mailbox/sprd-mailbox.yaml | 13 +- .../Bindings/mailbox/ti,secure-proxy.yaml | 79 + .../Bindings/media/allwinner,sun4i-a10-ir.yaml | 16 +- .../Bindings/media/mediatek-jpeg-decoder.txt | 2 +- .../Bindings/media/mediatek-jpeg-encoder.txt | 2 +- .../device-tree/Bindings/media/mediatek-mdp.txt | 2 +- .../device-tree/Bindings/media/mediatek-vcodec.txt | 57 +- .../Bindings/media/nxp,imx7-mipi-csi2.yaml | 108 +- .../device-tree/Bindings/media/nxp,imx8-jpeg.yaml | 84 + .../Bindings/media/qcom,msm8916-camss.yaml | 256 +++ .../Bindings/media/qcom,msm8996-camss.yaml | 387 +++++ .../Bindings/media/qcom,sdm660-camss.yaml | 398 +++++ .../Bindings/media/qcom,sdm845-camss.yaml | 371 +++++ .../Bindings/media/qcom,sm8250-venus.yaml | 167 ++ sys/contrib/device-tree/Bindings/media/rc.yaml | 5 + .../device-tree/Bindings/media/renesas,drif.yaml | 271 +++ .../device-tree/Bindings/media/renesas,vin.yaml | 46 +- .../Bindings/media/video-interfaces.yaml | 127 -- .../device-tree/Bindings/media/video-mux.yaml | 106 ++ .../memory-controllers/nvidia,tegra124-emc.yaml | 7 +- .../memory-controllers/nvidia,tegra20-emc.txt | 4 +- .../memory-controllers/nvidia,tegra20-mc.yaml | 79 + .../memory-controllers/nvidia,tegra210-emc.yaml | 2 +- .../memory-controllers/nvidia,tegra30-emc.yaml | 7 +- .../device-tree/Bindings/mfd/actions,atc260x.yaml | 183 ++ .../device-tree/Bindings/mfd/aspeed-lpc.txt | 100 +- .../Bindings/mfd/brcm,bcm6318-gpio-sysctl.yaml | 177 ++ .../Bindings/mfd/brcm,bcm63268-gpio-sysctl.yaml | 194 +++ .../Bindings/mfd/brcm,bcm6328-gpio-sysctl.yaml | 162 ++ .../Bindings/mfd/brcm,bcm6358-gpio-sysctl.yaml | 130 ++ .../Bindings/mfd/brcm,bcm6362-gpio-sysctl.yaml | 236 +++ .../Bindings/mfd/brcm,bcm6368-gpio-sysctl.yaml | 246 +++ .../device-tree/Bindings/mfd/google,cros-ec.yaml | 7 + .../device-tree/Bindings/mfd/netronix,ntxec.yaml | 76 + .../device-tree/Bindings/mfd/qcom-pm8xxx.yaml | 54 + .../device-tree/Bindings/mfd/ricoh,rn5t618.yaml | 111 ++ .../Bindings/mfd/rohm,bd71815-pmic.yaml | 201 +++ .../Bindings/mfd/rohm,bd71828-pmic.yaml | 6 + .../device-tree/Bindings/mfd/rohm,bd9576-pmic.yaml | 123 ++ .../device-tree/Bindings/mfd/ti,lp87524-q1.yaml | 4 + .../device-tree/Bindings/mfd/ti,lp87561-q1.yaml | 4 + .../device-tree/Bindings/mfd/ti,lp87565-q1.yaml | 4 + .../device-tree/Bindings/mmc/brcm,iproc-sdhci.yaml | 63 + .../device-tree/Bindings/mmc/fsl-imx-esdhc.yaml | 20 + .../device-tree/Bindings/mmc/mmc-spi-slot.txt | 6 +- sys/contrib/device-tree/Bindings/mmc/mtk-sd.yaml | 1 + .../Bindings/mmc/snps,dwcmshc-sdhci.yaml | 87 + .../device-tree/Bindings/mtd/nand-controller.yaml | 7 + .../mtd/partitions/linksys,ns-partitions.yaml | 74 + .../Bindings/mtd/partitions/nvmem-cells.yaml | 99 ++ .../device-tree/Bindings/mtd/qcom,nandc.yaml | 196 +++ .../device-tree/Bindings/net/actions,owl-emac.yaml | 92 ++ .../Bindings/net/brcm,bcm4908-enet.yaml | 17 +- .../Bindings/net/brcm,bcm6368-mdio-mux.yaml | 76 + .../Bindings/net/broadcom-bluetooth.yaml | 118 ++ .../device-tree/Bindings/net/can/fsl,flexcan.yaml | 1 - .../device-tree/Bindings/net/can/rcar_can.txt | 5 +- sys/contrib/device-tree/Bindings/net/dsa/dsa.yaml | 9 + .../device-tree/Bindings/net/dsa/lantiq-gswip.txt | 4 + .../Bindings/net/dsa/microchip,ksz.yaml | 2 + sys/contrib/device-tree/Bindings/net/fsl-enetc.txt | 15 + .../device-tree/Bindings/net/idt,3243x-emac.yaml | 73 + .../Bindings/net/intel,ixp4xx-ethernet.yaml | 102 ++ sys/contrib/device-tree/Bindings/net/mdio-gpio.txt | 1 + sys/contrib/device-tree/Bindings/net/qcom,ipa.yaml | 27 +- .../device-tree/Bindings/net/renesas,ether.yaml | 2 +- .../device-tree/Bindings/net/renesas,etheravb.yaml | 11 +- .../device-tree/Bindings/net/rockchip-dwmac.yaml | 120 ++ .../device-tree/Bindings/net/snps,dwmac.yaml | 13 +- .../Bindings/net/wireless/brcm,bcm4329-fmac.yaml | 109 ++ .../Bindings/net/wireless/ieee80211.yaml | 45 + .../Bindings/net/wireless/mediatek,mt76.yaml | 228 +++ .../device-tree/Bindings/net/xilinx_axienet.txt | 25 +- .../device-tree/Bindings/nvmem/brcm,nvram.yaml | 34 + .../device-tree/Bindings/nvmem/mtk-efuse.txt | 1 + .../device-tree/Bindings/nvmem/nvmem-consumer.yaml | 4 +- sys/contrib/device-tree/Bindings/nvmem/nvmem.yaml | 3 - .../device-tree/Bindings/nvmem/qcom,qfprom.yaml | 1 + .../Bindings/pci/mediatek-pcie-gen3.yaml | 181 ++ .../device-tree/Bindings/pci/rcar-pci-host.yaml | 12 +- .../Bindings/pci/sifive,fu740-pcie.yaml | 113 ++ .../device-tree/Bindings/pci/ti,j721e-pci-ep.yaml | 9 +- .../Bindings/pci/ti,j721e-pci-host.yaml | 20 +- .../device-tree/Bindings/pci/xilinx-nwl-pcie.txt | 2 + .../device-tree/Bindings/phy/bcm-ns-usb2-phy.yaml | 59 + .../device-tree/Bindings/phy/bcm-ns-usb3-phy.yaml | 62 + .../Bindings/phy/brcm,brcmstb-usb-phy.yaml | 3 + .../Bindings/phy/marvell,armada-3700-utmi-phy.yaml | 57 + .../phy/marvell,armada-cp110-utmi-phy.yaml | 109 ++ .../device-tree/Bindings/phy/mediatek,dsi-phy.yaml | 13 +- .../Bindings/phy/mediatek,hdmi-phy.yaml | 11 +- .../device-tree/Bindings/phy/mediatek,tphy.yaml | 3 +- .../device-tree/Bindings/phy/mediatek,ufs-phy.yaml | 7 +- .../Bindings/phy/microchip,sparx5-serdes.yaml | 100 ++ .../Bindings/phy/nvidia,tegra124-xusb-padctl.txt | 1 + .../Bindings/phy/phy-cadence-sierra.yaml | 17 +- .../Bindings/phy/phy-cadence-torrent.yaml | 24 +- .../Bindings/phy/phy-stm32-usbphyc.yaml | 5 + .../device-tree/Bindings/phy/qcom,qmp-phy.yaml | 2 + .../Bindings/phy/qcom,qmp-usb3-dp-phy.yaml | 3 +- .../Bindings/phy/qcom,usb-snps-femto-v2.yaml | 1 + .../device-tree/Bindings/phy/ti,phy-j721e-wiz.yaml | 6 +- .../Bindings/pinctrl/brcm,bcm6318-pinctrl.yaml | 143 ++ .../Bindings/pinctrl/brcm,bcm63268-pinctrl.yaml | 164 ++ .../Bindings/pinctrl/brcm,bcm6328-pinctrl.yaml | 127 ++ .../Bindings/pinctrl/brcm,bcm6358-pinctrl.yaml | 93 ++ .../Bindings/pinctrl/brcm,bcm6362-pinctrl.yaml | 206 +++ .../Bindings/pinctrl/brcm,bcm6368-pinctrl.yaml | 217 +++ .../Bindings/pinctrl/ingenic,pinctrl.yaml | 23 +- .../Bindings/pinctrl/pinctrl-mt8195.yaml | 151 ++ .../Bindings/pinctrl/qcom,pmic-gpio.txt | 14 + .../Bindings/pinctrl/rockchip,pinctrl.txt | 59 +- .../Bindings/pinctrl/xlnx,zynqmp-pinctrl.yaml | 336 ++++ .../device-tree/Bindings/power/brcm,bcm-pmb.yaml | 1 + .../device-tree/Bindings/power/qcom,rpmpd.yaml | 2 + .../Bindings/power/reset/ltc2952-poweroff.txt | 4 + .../power/supply/active-semi,act8945a-charger.yaml | 76 + .../device-tree/Bindings/power/supply/bq2415x.yaml | 98 ++ .../device-tree/Bindings/power/supply/bq24190.yaml | 92 ++ .../device-tree/Bindings/power/supply/bq24257.yaml | 124 ++ .../device-tree/Bindings/power/supply/bq24735.yaml | 89 + .../device-tree/Bindings/power/supply/bq256xx.yaml | 1 - .../device-tree/Bindings/power/supply/bq25890.yaml | 123 ++ .../device-tree/Bindings/power/supply/bq27xxx.yaml | 3 +- .../Bindings/power/supply/cpcap-battery.yaml | 87 + .../Bindings/power/supply/cpcap-charger.yaml | 106 ++ .../Bindings/power/supply/cw2015_battery.yaml | 2 +- .../Bindings/power/supply/dlg,da9150-charger.yaml | 52 + .../power/supply/dlg,da9150-fuel-gauge.yaml | 51 + .../device-tree/Bindings/power/supply/isp1704.yaml | 42 + .../Bindings/power/supply/lego,ev3-battery.yaml | 55 + .../Bindings/power/supply/lltc,lt3651-charger.yaml | 44 + .../Bindings/power/supply/lltc,ltc294x.yaml | 66 + .../Bindings/power/supply/ltc4162-l.yaml | 2 - .../Bindings/power/supply/maxim,ds2760.yaml | 43 + .../Bindings/power/supply/maxim,max14656.yaml | 45 + .../Bindings/power/supply/maxim,max17040.yaml | 95 ++ .../Bindings/power/supply/maxim,max17042.yaml | 78 + .../Bindings/power/supply/maxim,max8903.yaml | 67 + .../Bindings/power/supply/microchip,ucs1002.yaml | 51 + .../Bindings/power/supply/nokia,n900-battery.yaml | 49 + .../Bindings/power/supply/olpc-battery.yaml | 27 + .../Bindings/power/supply/power-supply.yaml | 22 - .../Bindings/power/supply/qcom,pm8941-charger.yaml | 169 ++ .../power/supply/qcom,pm8941-coincell.yaml | 57 + .../Bindings/power/supply/richtek,rt9455.yaml | 90 + .../Bindings/power/supply/rohm,bd99954.yaml | 2 +- .../Bindings/power/supply/sbs,sbs-battery.yaml | 7 +- .../Bindings/power/supply/sbs,sbs-charger.yaml | 55 + .../Bindings/power/supply/sbs,sbs-manager.yaml | 107 ++ .../Bindings/power/supply/sc2731-charger.yaml | 53 + .../Bindings/power/supply/sc27xx-fg.yaml | 98 ++ .../power/supply/stericsson,ab8500-battery.txt | 34 + .../power/supply/stericsson,ab8500-btemp.yaml | 73 + .../power/supply/stericsson,ab8500-chargalg.yaml | 37 + .../power/supply/stericsson,ab8500-charger.yaml | 123 ++ .../power/supply/stericsson,ab8500-fg.yaml | 72 + .../Bindings/power/supply/ti,lp8727.yaml | 90 + .../Bindings/power/supply/tps65090-charger.yaml | 36 + .../Bindings/power/supply/tps65217-charger.yaml | 43 + .../Bindings/power/supply/twl4030-charger.yaml | 68 + .../supply/x-powers,axp20x-ac-power-supply.yaml | 32 + .../x-powers,axp20x-battery-power-supply.yaml | 30 + .../supply/x-powers,axp20x-usb-power-supply.yaml | 33 + .../device-tree/Bindings/pwm/pwm-rockchip.yaml | 100 ++ .../Bindings/pwm/toshiba,pwm-visconti.yaml | 43 + .../device-tree/Bindings/regulator/fan53555.txt | 4 +- .../Bindings/regulator/qcom,rpmh-regulator.yaml | 162 ++ .../Bindings/regulator/qcom-labibb-regulator.yaml | 1 - .../Bindings/regulator/rohm,bd71815-regulator.yaml | 116 ++ .../Bindings/remoteproc/fsl,imx-rproc.yaml | 90 + .../device-tree/Bindings/remoteproc/qcom,adsp.txt | 4 + .../device-tree/Bindings/remoteproc/qcom,q6v5.txt | 15 + .../Bindings/remoteproc/qcom,wcnss-pil.txt | 6 + .../Bindings/remoteproc/st,stm32-rproc.yaml | 11 +- .../Bindings/remoteproc/ti,omap-remoteproc.yaml | 2 +- .../Bindings/reserved-memory/ramoops.txt | 10 +- .../device-tree/Bindings/riscv/microchip.yaml | 27 + .../device-tree/Bindings/rng/brcm,bcm2835.yaml | 21 + .../device-tree/Bindings/rtc/qcom-pm8xxx-rtc.yaml | 62 + sys/contrib/device-tree/Bindings/serial/8250.yaml | 35 +- .../Bindings/serial/brcm,bcm7271-uart.yaml | 95 ++ .../device-tree/Bindings/serial/ingenic,uart.yaml | 2 +- .../device-tree/Bindings/serial/mtk-uart.txt | 1 + .../device-tree/Bindings/serial/samsung_uart.yaml | 18 +- .../device-tree/Bindings/serial/serial.yaml | 12 +- .../device-tree/Bindings/serial/st,stm32-uart.yaml | 59 +- .../device-tree/Bindings/soc/mediatek/pwrap.txt | 1 + .../Bindings/soc/qcom/qcom,aoss-qmp.txt | 1 + .../device-tree/Bindings/soc/qcom/qcom,wcnss.txt | 7 + sys/contrib/device-tree/Bindings/sound/ak4642.yaml | 2 - sys/contrib/device-tree/Bindings/sound/ak5558.txt | 2 +- .../Bindings/sound/amlogic,gx-sound-card.yaml | 4 +- .../Bindings/sound/audio-graph-port.yaml | 104 +- .../device-tree/Bindings/sound/fsl,rpmsg.yaml | 108 ++ .../device-tree/Bindings/sound/fsl-asoc-card.txt | 2 + .../Bindings/sound/google,cros-ec-codec.yaml | 2 +- .../Bindings/sound/intel,keembay-i2s.yaml | 2 +- .../Bindings/sound/marvell,mmp-sspa.yaml | 6 +- .../device-tree/Bindings/sound/mchp,i2s-mcc.yaml | 108 ++ .../sound/mt8183-mt6358-ts3a227-max98357.txt | 1 + .../Bindings/sound/nvidia,tegra186-dspk.yaml | 11 +- .../Bindings/sound/nvidia,tegra210-admaif.yaml | 11 +- .../Bindings/sound/nvidia,tegra210-ahub.yaml | 27 +- .../Bindings/sound/nvidia,tegra210-dmic.yaml | 11 +- .../Bindings/sound/nvidia,tegra210-i2s.yaml | 11 +- .../device-tree/Bindings/sound/renesas,rsnd.yaml | 6 +- sys/contrib/device-tree/Bindings/sound/rt1019.yaml | 35 + sys/contrib/device-tree/Bindings/sound/rt5682.txt | 2 +- .../Bindings/sound/socionext,uniphier-aio.yaml | 8 +- .../Bindings/sound/socionext,uniphier-evea.yaml | 8 +- .../device-tree/Bindings/sound/tlv320aic3x.txt | 21 +- .../device-tree/Bindings/soundwire/qcom,sdw.txt | 20 + .../Bindings/spi/amlogic,meson-gx-spicc.yaml | 4 +- .../Bindings/spi/brcm,spi-bcm-qspi.yaml | 198 +++ .../device-tree/Bindings/spi/cdns,qspi-nor.yaml | 143 ++ .../device-tree/Bindings/spi/fsl,spi-fsl-qspi.yaml | 96 ++ .../Bindings/spi/mediatek,spi-mtk-nor.yaml | 1 + .../device-tree/Bindings/spi/spi-controller.yaml | 21 +- .../device-tree/Bindings/spi/spi-mt65xx.txt | 2 + sys/contrib/device-tree/Bindings/spi/spi-mux.yaml | 10 +- .../device-tree/Bindings/spi/spi-nxp-fspi.txt | 2 + .../device-tree/Bindings/spi/spi-slave-mt27xx.txt | 1 + .../device-tree/Bindings/spi/st,stm32-spi.yaml | 6 - .../device-tree/Bindings/submitting-patches.rst | 10 +- .../Bindings/thermal/brcm,ns-thermal.yaml | 60 + .../Bindings/thermal/qcom-spmi-adc-tm5.yaml | 2 - .../device-tree/Bindings/thermal/qcom-tsens.yaml | 59 +- .../Bindings/thermal/rcar-gen3-thermal.yaml | 43 +- .../Bindings/thermal/thermal-sensor.yaml | 3 + .../device-tree/Bindings/timer/arm,arch_timer.yaml | 19 + .../device-tree/Bindings/timer/ingenic,tcu.yaml | 30 +- .../Bindings/timer/mediatek,mtk-timer.txt | 1 + .../Bindings/timer/nuvoton,npcm7xx-timer.txt | 3 +- .../device-tree/Bindings/timer/renesas,cmt.yaml | 4 + .../device-tree/Bindings/timer/renesas,tmu.yaml | 6 + .../device-tree/Bindings/trivial-devices.yaml | 9 + .../device-tree/Bindings/ufs/ufshcd-pltfrm.txt | 2 + .../device-tree/Bindings/usb/dwc3-xilinx.txt | 28 +- .../device-tree/Bindings/usb/fsl,imx8mp-dwc3.yaml | 9 +- .../device-tree/Bindings/usb/generic-ehci.yaml | 6 + .../Bindings/usb/mediatek,mtk-xhci.yaml | 29 +- .../device-tree/Bindings/usb/mediatek,mtu3.yaml | 12 +- .../device-tree/Bindings/usb/qcom,dwc3.yaml | 1 + .../device-tree/Bindings/usb/snps,dwc3.yaml | 8 +- .../device-tree/Bindings/usb/usb-device.yaml | 6 +- .../device-tree/Bindings/usb/usb-nop-xceiv.yaml | 64 + sys/contrib/device-tree/Bindings/usb/usb.yaml | 1 - .../device-tree/Bindings/vendor-prefixes.yaml | 24 + .../Bindings/watchdog/nuvoton,npcm-wdt.txt | 3 +- .../device-tree/Bindings/writing-schema.rst | 183 ++ .../include/dt-bindings/clock/imx8mp-clock.h | 3 - .../include/dt-bindings/clock/mt7621-clk.h | 41 + .../device-tree/include/dt-bindings/clock/omap5.h | 2 + .../include/dt-bindings/clock/rk3568-cru.h | 926 +++++++++++ .../include/dt-bindings/clock/sifive-fu740-prci.h | 1 + .../include/dt-bindings/input/atmel-maxtouch.h | 10 + .../include/dt-bindings/input/linux-event-codes.h | 1 + .../include/dt-bindings/interconnect/qcom,sdm660.h | 116 ++ .../include/dt-bindings/interconnect/qcom,sm8350.h | 172 ++ .../dt-bindings/interrupt-controller/apple-aic.h | 15 + .../include/dt-bindings/mux/ti-serdes.h | 5 + .../include/dt-bindings/phy/phy-cadence.h | 20 + .../device-tree/include/dt-bindings/phy/phy-ti.h | 21 + .../device-tree/include/dt-bindings/pinctrl/k3.h | 5 +- .../include/dt-bindings/pinctrl/mt8195-pinfunc.h | 962 +++++++++++ .../include/dt-bindings/pinctrl/pinctrl-zynqmp.h | 19 + .../include/dt-bindings/power/qcom-rpmpd.h | 26 + .../dt-bindings/pwm/raspberrypi,firmware-poe-pwm.h | 13 + .../device-tree/include/dt-bindings/soc/bcm-pmb.h | 1 + .../device-tree/include/dt-bindings/usb/pd.h | 89 +- .../device-tree/src/arm/am335x-boneblack.dts | 132 +- .../device-tree/src/arm/am335x-pocketbeagle.dts | 140 +- sys/contrib/device-tree/src/arm/am33xx-l4.dtsi | 28 +- .../device-tree/src/arm/armada-385-atl-x530.dts | 235 +++ .../src/arm/aspeed-bmc-amd-ethanolx.dts | 30 + .../src/arm/aspeed-bmc-asrock-e3c246d4i.dts | 202 +++ .../src/arm/aspeed-bmc-facebook-tiogapass.dts | 5 + .../device-tree/src/arm/aspeed-bmc-ibm-everest.dts | 1747 ++++++++++++++++++-- .../src/arm/aspeed-bmc-ibm-rainier-1s4u.dts | 14 + .../src/arm/aspeed-bmc-ibm-rainier-4u.dts | 14 + .../device-tree/src/arm/aspeed-bmc-ibm-rainier.dts | 748 ++++++++- .../device-tree/src/arm/aspeed-bmc-opp-mihawk.dts | 33 + sys/contrib/device-tree/src/arm/aspeed-g4.dtsi | 76 +- sys/contrib/device-tree/src/arm/aspeed-g5.dtsi | 137 +- sys/contrib/device-tree/src/arm/aspeed-g6.dtsi | 137 +- sys/contrib/device-tree/src/arm/at91-sam9x60ek.dts | 3 +- .../device-tree/src/arm/at91-sama5d27_som1_ek.dts | 3 +- .../src/arm/at91-sama5d27_wlsom1_ek.dts | 3 +- .../device-tree/src/arm/at91-sama5d2_icp.dts | 3 +- .../device-tree/src/arm/at91-sama5d2_ptc_ek.dts | 3 +- .../device-tree/src/arm/at91-sama5d2_xplained.dts | 3 +- .../device-tree/src/arm/at91-sama5d3_xplained.dts | 3 +- sys/contrib/device-tree/src/arm/at91sam9260ek.dts | 3 +- .../device-tree/src/arm/at91sam9g20ek_common.dtsi | 3 +- .../device-tree/src/arm/bcm4708-asus-rt-ac56u.dts | 4 +- .../device-tree/src/arm/bcm4708-asus-rt-ac68u.dts | 4 +- .../src/arm/bcm4708-buffalo-wzr-1750dhp.dts | 4 +- .../src/arm/bcm4708-linksys-ea6300-v1.dts | 5 + .../device-tree/src/arm/bcm4708-netgear-r6250.dts | 4 +- .../src/arm/bcm4708-netgear-r6300-v2.dts | 4 +- .../src/arm/bcm4708-smartrg-sr400ac.dts | 4 +- .../device-tree/src/arm/bcm47081-asus-rt-n18u.dts | 4 +- .../src/arm/bcm47081-buffalo-wzr-600dhp2.dts | 4 +- .../src/arm/bcm47081-buffalo-wzr-900dhp.dts | 4 +- .../src/arm/bcm47081-luxul-xwr-1200.dts | 5 + .../device-tree/src/arm/bcm4709-asus-rt-ac87u.dts | 4 +- .../src/arm/bcm4709-buffalo-wxr-1900dhp.dts | 4 +- .../device-tree/src/arm/bcm4709-linksys-ea9200.dts | 9 +- .../device-tree/src/arm/bcm4709-netgear-r7000.dts | 4 +- .../device-tree/src/arm/bcm4709-netgear-r8000.dts | 4 +- .../src/arm/bcm47094-dlink-dir-885l.dts | 4 +- .../src/arm/bcm47094-linksys-panamera.dts | 26 +- .../src/arm/bcm47094-luxul-abr-4500.dts | 9 +- .../src/arm/bcm47094-luxul-xbr-4500.dts | 9 +- .../src/arm/bcm47094-luxul-xwc-2000.dts | 4 +- .../src/arm/bcm47094-luxul-xwr-3100.dts | 9 +- .../src/arm/bcm47094-luxul-xwr-3150-v1.dts | 9 +- .../device-tree/src/arm/bcm47094-netgear-r8500.dts | 4 +- .../device-tree/src/arm/bcm47094-phicomm-k3.dts | 4 +- sys/contrib/device-tree/src/arm/dra7-l4.dtsi | 79 +- sys/contrib/device-tree/src/arm/dra7.dtsi | 240 ++- sys/contrib/device-tree/src/arm/ep7209.dtsi | 18 +- sys/contrib/device-tree/src/arm/ep7211-edb7211.dts | 2 +- .../device-tree/src/arm/exynos3250-monk.dts | 4 +- .../device-tree/src/arm/exynos3250-rinato.dts | 4 +- .../device-tree/src/arm/exynos4210-i9100.dts | 56 +- .../device-tree/src/arm/exynos4412-midas.dtsi | 6 +- .../src/arm/exynos4412-odroid-common.dtsi | 5 +- .../device-tree/src/arm/exynos4412-odroidx.dts | 3 +- .../device-tree/src/arm/exynos4412-p4note.dtsi | 4 +- .../src/arm/exynos4412-ppmu-common.dtsi | 48 +- .../device-tree/src/arm/exynos5250-smdk5250.dts | 2 +- .../src/arm/exynos5250-snow-common.dtsi | 2 +- .../device-tree/src/arm/exynos5410-pinctrl.dtsi | 28 +- .../device-tree/src/arm/imx50-kobo-aura.dts | 16 +- sys/contrib/device-tree/src/arm/imx51.dtsi | 2 +- .../device-tree/src/arm/imx53-qsb-common.dtsi | 2 + sys/contrib/device-tree/src/arm/imx53.dtsi | 2 +- sys/contrib/device-tree/src/arm/imx6dl-plybas.dts | 6 +- .../device-tree/src/arm/imx6dl-yapp4-common.dtsi | 6 +- sys/contrib/device-tree/src/arm/imx6q-b450v3.dts | 5 + sys/contrib/device-tree/src/arm/imx6q-b650v3.dts | 5 + sys/contrib/device-tree/src/arm/imx6q-b850v3.dts | 5 + sys/contrib/device-tree/src/arm/imx6q-ba16.dtsi | 21 + sys/contrib/device-tree/src/arm/imx6q-bx50v3.dtsi | 12 +- .../device-tree/src/arm/imx6q-dhcom-som.dtsi | 12 + .../device-tree/src/arm/imx6qdl-emcon-avari.dtsi | 2 +- .../device-tree/src/arm/imx6qdl-gw52xx.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw53xx.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw54xx.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw551x.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw552x.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw560x.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw5903.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw5904.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw5907.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw5910.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw5912.dtsi | 2 - .../device-tree/src/arm/imx6qdl-gw5913.dtsi | 2 - .../device-tree/src/arm/imx6qdl-phytec-pbab01.dtsi | 6 +- .../device-tree/src/arm/imx6qdl-phytec-pfla02.dtsi | 38 +- .../device-tree/src/arm/imx6qdl-ts7970.dtsi | 1 - .../device-tree/src/arm/imx6qdl-wandboard.dtsi | 24 +- .../device-tree/src/arm/imx6sl-tolino-shine2hd.dts | 7 +- .../device-tree/src/arm/imx6ull-colibri.dtsi | 12 +- sys/contrib/device-tree/src/arm/imx7d-mba7.dts | 2 - .../device-tree/src/arm/imx7d-meerkat96.dts | 2 +- sys/contrib/device-tree/src/arm/imx7d-pico.dtsi | 2 +- .../device-tree/src/arm/imx7d-remarkable2.dts | 146 ++ .../device-tree/src/arm/iwg20d-q7-common.dtsi | 4 +- sys/contrib/device-tree/src/arm/ls1021a.dtsi | 3 +- .../src/arm/motorola-cpcap-mapphone.dtsi | 59 +- .../src/arm/mstar-infinity2m-ssd202d-unitv2.dts | 25 + sys/contrib/device-tree/src/arm/mstar-v7.dtsi | 23 + sys/contrib/device-tree/src/arm/mt2701.dtsi | 19 +- sys/contrib/device-tree/src/arm/mt6589.dtsi | 1 + sys/contrib/device-tree/src/arm/mt7623.dtsi | 26 +- sys/contrib/device-tree/src/arm/mt7623n.dtsi | 4 +- sys/contrib/device-tree/src/arm/mt7629.dtsi | 12 +- .../device-tree/src/arm/nuvoton-npcm730-gbs.dts | 1135 +++++++++++++ .../device-tree/src/arm/nuvoton-npcm750-evb.dts | 2 +- .../arm/nuvoton-wpcm450-supermicro-x9sci-ln4f.dts | 40 + .../device-tree/src/arm/nuvoton-wpcm450.dtsi | 76 + sys/contrib/device-tree/src/arm/omap3-echo.dts | 476 ++++-- sys/contrib/device-tree/src/arm/omap4-l4.dtsi | 43 +- sys/contrib/device-tree/src/arm/omap4.dtsi | 169 +- sys/contrib/device-tree/src/arm/omap4460.dtsi | 13 +- sys/contrib/device-tree/src/arm/omap5-l4.dtsi | 67 +- sys/contrib/device-tree/src/arm/omap5.dtsi | 204 ++- .../device-tree/src/arm/owl-s500-roseapplepi.dts | 132 +- sys/contrib/device-tree/src/arm/qcom-ipq4019.dtsi | 2 +- .../src/arm/qcom-msm8974-lge-nexus5-hammerhead.dts | 6 +- .../src/arm/qcom-msm8974-samsung-klte.dts | 52 +- sys/contrib/device-tree/src/arm/qcom-msm8974.dtsi | 9 + sys/contrib/device-tree/src/arm/qcom-sdx55-t55.dts | 281 ++++ .../src/arm/qcom-sdx55-telit-fn980-tlb.dts | 282 ++++ sys/contrib/device-tree/src/arm/qcom-sdx55.dtsi | 207 ++- .../device-tree/src/arm/r7s9210-rza2mevb.dts | 55 +- .../src/arm/r8a7742-iwg21d-q7-dbcm-ca.dts | 159 +- .../arm/r8a7742-iwg21d-q7-dbcm-ov5640-single.dtsi | 32 + .../arm/r8a7742-iwg21d-q7-dbcm-ov7725-single.dtsi | 29 + .../device-tree/src/arm/r8a7742-iwg21d-q7.dts | 4 +- sys/contrib/device-tree/src/arm/r8a7742.dtsi | 4 +- .../device-tree/src/arm/r8a7743-sk-rzg1m.dts | 2 +- sys/contrib/device-tree/src/arm/r8a7743.dtsi | 2 +- sys/contrib/device-tree/src/arm/r8a7744.dtsi | 2 +- .../device-tree/src/arm/r8a7745-iwg22d-sodimm.dts | 4 +- .../device-tree/src/arm/r8a7745-sk-rzg1e.dts | 2 +- sys/contrib/device-tree/src/arm/r8a7745.dtsi | 2 +- sys/contrib/device-tree/src/arm/r8a77470.dtsi | 2 +- sys/contrib/device-tree/src/arm/r8a7790-lager.dts | 11 +- sys/contrib/device-tree/src/arm/r8a7790-stout.dts | 4 +- sys/contrib/device-tree/src/arm/r8a7790.dtsi | 4 +- .../device-tree/src/arm/r8a7791-koelsch.dts | 19 +- sys/contrib/device-tree/src/arm/r8a7791-porter.dts | 6 +- sys/contrib/device-tree/src/arm/r8a7791.dtsi | 2 +- .../device-tree/src/arm/r8a7792-blanche.dts | 2 +- sys/contrib/device-tree/src/arm/r8a7792-wheat.dts | 2 +- sys/contrib/device-tree/src/arm/r8a7792.dtsi | 2 +- sys/contrib/device-tree/src/arm/r8a7793-gose.dts | 11 +- sys/contrib/device-tree/src/arm/r8a7793.dtsi | 2 +- sys/contrib/device-tree/src/arm/r8a7794-alt.dts | 5 +- sys/contrib/device-tree/src/arm/r8a7794-silk.dts | 8 +- sys/contrib/device-tree/src/arm/r8a7794.dtsi | 2 +- sys/contrib/device-tree/src/arm/rk3036.dtsi | 4 - sys/contrib/device-tree/src/arm/rk3228-evb.dts | 4 + sys/contrib/device-tree/src/arm/rk3229-evb.dts | 4 + sys/contrib/device-tree/src/arm/rk3229-xms6.dts | 6 + sys/contrib/device-tree/src/arm/rk322x.dtsi | 5 +- sys/contrib/device-tree/src/arm/rk3288.dtsi | 4 - .../device-tree/src/arm/rv1108-elgin-r1.dts | 4 + sys/contrib/device-tree/src/arm/rv1108-evb.dts | 4 + sys/contrib/device-tree/src/arm/rv1108.dtsi | 6 +- .../device-tree/src/arm/s5pv210-fascinate4g.dts | 2 +- sys/contrib/device-tree/src/arm/sama5d2.dtsi | 6 +- sys/contrib/device-tree/src/arm/sama5d3.dtsi | 2 +- sys/contrib/device-tree/src/arm/ste-ab8500.dtsi | 4 +- .../src/arm/ste-href-tvk1281618-r2.dtsi | 214 ++- .../src/arm/ste-href-tvk1281618-r3.dtsi | 210 ++- .../device-tree/src/arm/ste-href520-tvk.dts | 4 +- .../device-tree/src/arm/ste-hrefprev60-tvk.dts | 2 +- .../device-tree/src/arm/ste-hrefv60plus-tvk.dts | 4 +- .../src/arm/ste-ux500-samsung-janice.dts | 48 +- .../device-tree/src/arm/stm32h7-pinctrl.dtsi | 275 +++ sys/contrib/device-tree/src/arm/stm32h743.dtsi | 177 +- .../device-tree/src/arm/stm32h743i-disco.dts | 2 +- .../device-tree/src/arm/stm32h743i-eval.dts | 2 +- sys/contrib/device-tree/src/arm/stm32h750.dtsi | 6 + .../device-tree/src/arm/stm32h750i-art-pi.dts | 229 +++ .../device-tree/src/arm/stm32mp15-pinctrl.dtsi | 21 +- sys/contrib/device-tree/src/arm/stm32mp151.dtsi | 32 +- .../src/arm/stm32mp153c-dhcom-drc02.dts | 4 + .../src/arm/stm32mp157a-icore-stm32mp1-ctouch2.dts | 47 + .../arm/stm32mp157a-icore-stm32mp1-edimm2.2.dts | 47 + .../src/arm/stm32mp157a-icore-stm32mp1.dtsi | 196 +++ ...m32mp157a-microgea-stm32mp1-microdev2.0-of7.dts | 154 ++ .../stm32mp157a-microgea-stm32mp1-microdev2.0.dts | 55 + .../src/arm/stm32mp157a-microgea-stm32mp1.dtsi | 148 ++ .../device-tree/src/arm/stm32mp157c-dhcom-pdk2.dts | 4 + .../src/arm/stm32mp157c-dhcom-picoitx.dts | 4 + .../src/arm/stm32mp15xx-dhcom-drc02.dtsi | 12 +- .../src/arm/stm32mp15xx-dhcom-picoitx.dtsi | 12 +- .../device-tree/src/arm/stm32mp15xx-dhcom-som.dtsi | 64 + .../src/arm/stm32mp15xx-dhcor-avenger96.dtsi | 35 + .../device-tree/src/arm/stm32mp15xx-dhcor-som.dtsi | 4 + .../device-tree/src/arm/sun4i-a10-topwise-a721.dts | 242 +++ .../device-tree/src/arm/sun6i-a31-hummingbird.dts | 2 +- sys/contrib/device-tree/src/arm/sun6i-a31-m9.dts | 2 +- .../src/arm/sun6i-a31-mele-a1000g-quad.dts | 2 +- sys/contrib/device-tree/src/arm/sun6i-a31.dtsi | 6 +- .../device-tree/src/arm/sun6i-a31s-primo81.dts | 2 +- .../src/arm/sun6i-a31s-sina31s-core.dtsi | 2 +- .../src/arm/sun6i-a31s-sinovoip-bpi-m2.dts | 2 +- .../src/arm/sun6i-a31s-yones-toptech-bs1078-v2.dts | 2 +- .../src/arm/sun6i-reference-design-tablet.dtsi | 2 +- sys/contrib/device-tree/src/arm/sun8i-a23-a33.dtsi | 6 +- .../device-tree/src/arm/sun8i-a33-olinuxino.dts | 2 +- .../src/arm/sun8i-a33-sinlinx-sina33.dts | 2 +- .../src/arm/sun8i-a83t-allwinner-h8homlet-v2.dts | 4 +- .../device-tree/src/arm/sun8i-a83t-bananapi-m3.dts | 4 +- .../src/arm/sun8i-a83t-cubietruck-plus.dts | 4 +- .../device-tree/src/arm/sun8i-a83t-tbs-a711.dts | 4 +- sys/contrib/device-tree/src/arm/sun8i-a83t.dtsi | 5 +- .../src/arm/sun8i-h2-plus-bananapi-m2-zero.dts | 25 + .../device-tree/src/arm/sun8i-h3-beelink-x2.dts | 11 + .../device-tree/src/arm/sun8i-r16-bananapi-m2m.dts | 2 +- .../device-tree/src/arm/sun8i-r16-parrot.dts | 2 +- .../src/arm/sun8i-reference-design-tablet.dtsi | 2 +- sys/contrib/device-tree/src/arm/sunxi-h3-h5.dtsi | 12 + .../src/arm/tegra124-peripherals-opp.dtsi | 5 + .../src/arm/tegra20-acer-a500-picasso.dts | 16 +- .../device-tree/src/arm/tegra20-cpu-opp.dtsi | 2 + sys/contrib/device-tree/src/arm/tegra20-paz00.dts | 14 +- .../src/arm/tegra20-peripherals-opp.dtsi | 1 + .../device-tree/src/arm/tegra20-ventana.dts | 78 +- .../device-tree/src/arm/tegra30-apalis.dtsi | 1 + .../arm/tegra30-asus-nexus7-grouper-common.dtsi | 14 +- .../arm/tegra30-asus-nexus7-grouper-ti-pmic.dtsi | 1 + sys/contrib/device-tree/src/arm/tegra30-beaver.dts | 1 + .../device-tree/src/arm/tegra30-cardhu-a04.dts | 48 - .../device-tree/src/arm/tegra30-cardhu.dtsi | 84 +- .../device-tree/src/arm/tegra30-colibri.dtsi | 1 + .../device-tree/src/arm/tegra30-cpu-opp.dtsi | 3 + sys/contrib/device-tree/src/arm/tegra30-ouya.dts | 16 +- .../src/arm/tegra30-peripherals-opp.dtsi | 3 + sys/contrib/device-tree/src/arm/uniphier-pxs2.dtsi | 2 +- .../arm64/allwinner/sun50i-a64-amarula-relic.dts | 2 +- .../arm64/allwinner/sun50i-a64-bananapi-m64.dts | 2 +- .../src/arm64/allwinner/sun50i-a64-nanopi-a64.dts | 2 +- .../src/arm64/allwinner/sun50i-a64-olinuxino.dts | 2 +- .../arm64/allwinner/sun50i-a64-orangepi-win.dts | 2 +- .../src/arm64/allwinner/sun50i-a64-pine64.dts | 2 +- .../src/arm64/allwinner/sun50i-a64-pinebook.dts | 2 +- .../src/arm64/allwinner/sun50i-a64-pinephone.dtsi | 2 +- .../src/arm64/allwinner/sun50i-a64-pinetab.dts | 2 +- .../src/arm64/allwinner/sun50i-a64-sopine.dtsi | 2 +- .../src/arm64/allwinner/sun50i-a64-teres-i.dts | 2 +- .../src/arm64/allwinner/sun50i-a64.dtsi | 6 +- .../src/arm64/allwinner/sun50i-h6-beelink-gs1.dts | 40 +- .../src/arm64/allwinner/sun50i-h6-orangepi-3.dts | 16 +- .../src/arm64/allwinner/sun50i-h6-orangepi.dtsi | 24 +- .../src/arm64/allwinner/sun50i-h6-pine-h64.dts | 4 +- .../device-tree/src/arm64/allwinner/sun50i-h6.dtsi | 8 +- .../device-tree/src/arm64/amlogic/meson-a1.dtsi | 4 +- .../device-tree/src/arm64/amlogic/meson-axg.dtsi | 1 - .../src/arm64/amlogic/meson-g12-common.dtsi | 20 +- .../src/arm64/amlogic/meson-g12b-gsking-x.dts | 2 +- .../src/arm64/amlogic/meson-g12b-gtking-pro.dts | 4 +- .../src/arm64/amlogic/meson-g12b-gtking.dts | 2 +- .../src/arm64/amlogic/meson-g12b-odroid-n2.dtsi | 56 +- .../device-tree/src/arm64/amlogic/meson-gx.dtsi | 6 + .../src/arm64/amlogic/meson-gxbb-odroidc2.dts | 2 +- .../amlogic/meson-gxl-s905d-mecool-kii-pro.dts | 86 + .../arm64/amlogic/meson-gxl-s905d-sml5442tw.dts | 8 +- .../arm64/amlogic/meson-gxm-mecool-kiii-pro.dts | 113 ++ .../src/arm64/amlogic/meson-gxm-minix-neo-u9h.dts | 120 ++ .../src/arm64/amlogic/meson-gxm-wetek-core2.dts | 2 +- .../src/arm64/amlogic/meson-khadas-vim3.dtsi | 4 +- .../src/arm64/amlogic/meson-sm1-odroid-c4.dts | 2 +- .../device-tree/src/arm64/apple/t8103-j274.dts | 45 + sys/contrib/device-tree/src/arm64/apple/t8103.dtsi | 135 ++ .../device-tree/src/arm64/arm/juno-base.dtsi | 5 +- sys/contrib/device-tree/src/arm64/arm/juno-r1.dts | 4 + sys/contrib/device-tree/src/arm64/arm/juno-r2.dts | 4 + .../broadcom/bcm4908/bcm4906-netgear-r8000p.dts | 107 +- .../bcm4908/bcm4906-tplink-archer-c2300-v1.dts | 182 ++ .../broadcom/bcm4908/bcm4908-asus-gt-ac5300.dts | 44 +- .../src/arm64/broadcom/bcm4908/bcm4908.dtsi | 47 +- .../src/arm64/exynos/exynos5433-tm2-common.dtsi | 2 +- .../device-tree/src/arm64/exynos/exynos5433.dtsi | 6 +- .../freescale/fsl-ls1028a-kontron-sl28-var1.dts | 3 +- .../freescale/fsl-ls1028a-kontron-sl28-var4.dts | 5 +- .../arm64/freescale/fsl-ls1028a-kontron-sl28.dts | 80 +- .../src/arm64/freescale/fsl-ls1028a-qds.dts | 1 + .../src/arm64/freescale/fsl-ls1028a-rdb.dts | 1 + .../src/arm64/freescale/fsl-ls1028a.dtsi | 22 +- .../src/arm64/freescale/fsl-lx2160a-cex7.dtsi | 24 + .../arm64/freescale/fsl-lx2160a-clearfog-itx.dtsi | 64 + .../src/arm64/freescale/imx8-ss-adma.dtsi | 8 + .../src/arm64/freescale/imx8-ss-audio.dtsi | 68 + .../src/arm64/freescale/imx8-ss-conn.dtsi | 184 +++ .../src/arm64/freescale/imx8-ss-ddr.dtsi | 18 + .../src/arm64/freescale/imx8-ss-dma.dtsi | 202 +++ .../src/arm64/freescale/imx8-ss-lsio.dtsi | 311 ++++ .../arm64/freescale/imx8mm-icore-mx8mm-ctouch2.dts | 97 ++ .../freescale/imx8mm-icore-mx8mm-edimm2.2.dts | 97 ++ .../src/arm64/freescale/imx8mm-icore-mx8mm.dtsi | 232 +++ .../src/arm64/freescale/imx8mm-nitrogen-r2.dts | 314 +++- .../device-tree/src/arm64/freescale/imx8mm.dtsi | 2 +- .../src/arm64/freescale/imx8mn-beacon-som.dtsi | 6 +- .../device-tree/src/arm64/freescale/imx8mn.dtsi | 2 +- .../device-tree/src/arm64/freescale/imx8mp-evk.dts | 2 + .../arm64/freescale/imx8mp-phyboard-pollux-rdk.dts | 56 +- .../device-tree/src/arm64/freescale/imx8mp.dtsi | 43 +- .../arm64/freescale/imx8mq-kontron-pitx-imx8m.dts | 613 +++++++ .../src/arm64/freescale/imx8mq-librem5-devkit.dts | 70 +- .../src/arm64/freescale/imx8mq-librem5-r2.dts | 2 +- .../src/arm64/freescale/imx8mq-librem5-r3.dts | 4 + .../src/arm64/freescale/imx8mq-librem5.dtsi | 24 +- .../src/arm64/freescale/imx8mq-zii-ultra-rmb3.dts | 10 +- .../src/arm64/freescale/imx8mq-zii-ultra.dtsi | 23 +- .../device-tree/src/arm64/freescale/imx8qm-mek.dts | 144 ++ .../src/arm64/freescale/imx8qm-ss-conn.dtsi | 21 + .../src/arm64/freescale/imx8qm-ss-dma.dtsi | 51 + .../src/arm64/freescale/imx8qm-ss-lsio.dtsi | 61 + .../device-tree/src/arm64/freescale/imx8qm.dtsi | 176 ++ .../src/arm64/freescale/imx8qxp-ai_ml.dts | 20 +- .../arm64/freescale/imx8qxp-colibri-eval-v3.dtsi | 8 +- .../src/arm64/freescale/imx8qxp-colibri.dtsi | 12 +- .../src/arm64/freescale/imx8qxp-mek.dts | 50 +- .../src/arm64/freescale/imx8qxp-ss-adma.dtsi | 37 + .../src/arm64/freescale/imx8qxp-ss-conn.dtsi | 25 + .../src/arm64/freescale/imx8qxp-ss-lsio.dtsi | 61 + .../device-tree/src/arm64/freescale/imx8qxp.dtsi | 423 +---- .../src/arm64/intel/socfpga_agilex.dtsi | 222 +-- .../src/arm64/intel/socfpga_agilex_socdk.dts | 14 +- .../src/arm64/intel/socfpga_agilex_socdk_nand.dts | 18 +- .../src/arm64/intel/socfpga_n5x_socdk.dts | 12 +- .../device-tree/src/arm64/marvell/armada-37xx.dtsi | 3 +- .../src/arm64/marvell/armada-7040-db.dts | 14 +- .../arm64/marvell/armada-8040-clearfog-gt-8k.dts | 127 ++ .../src/arm64/marvell/armada-8040-db.dts | 21 +- .../src/arm64/marvell/armada-8040-mcbin.dtsi | 19 +- .../src/arm64/marvell/armada-cp11x.dtsi | 19 + .../device-tree/src/arm64/marvell/cn9130-db.dts | 12 +- .../device-tree/src/arm64/marvell/cn9131-db.dts | 9 +- .../device-tree/src/arm64/marvell/cn9132-db.dts | 11 +- .../device-tree/src/arm64/mediatek/mt2712e.dtsi | 8 +- .../device-tree/src/arm64/mediatek/mt7622-rfb1.dts | 12 + .../device-tree/src/arm64/mediatek/mt7622.dtsi | 9 +- .../device-tree/src/arm64/mediatek/mt8173-evb.dts | 6 +- .../device-tree/src/arm64/mediatek/mt8173.dtsi | 15 +- .../device-tree/src/arm64/mediatek/mt8183-evb.dts | 4 + .../arm64/mediatek/mt8183-kukui-jacuzzi-damu.dts | 31 + .../mt8183-kukui-jacuzzi-juniper-sku16.dts | 13 + .../mediatek/mt8183-kukui-jacuzzi-juniper.dtsi | 27 + .../src/arm64/mediatek/mt8183-kukui-jacuzzi.dtsi | 474 ++++++ .../src/arm64/mediatek/mt8183-kukui-kakadu.dts | 13 + .../src/arm64/mediatek/mt8183-kukui-kakadu.dtsi | 378 +++++ .../arm64/mediatek/mt8183-kukui-kodama-sku16.dts | 21 + .../arm64/mediatek/mt8183-kukui-kodama-sku272.dts | 21 + .../arm64/mediatek/mt8183-kukui-kodama-sku288.dts | 21 + .../arm64/mediatek/mt8183-kukui-kodama-sku32.dts | 21 + .../src/arm64/mediatek/mt8183-kukui-kodama.dtsi | 343 ++++ .../src/arm64/mediatek/mt8183-pumpkin.dts | 378 +++++ .../device-tree/src/arm64/mediatek/mt8183.dtsi | 160 +- .../device-tree/src/arm64/mediatek/mt8516.dtsi | 9 +- .../src/arm64/mediatek/pumpkin-common.dtsi | 3 +- .../device-tree/src/arm64/qcom/apq8016-sbc.dts | 2 +- .../device-tree/src/arm64/qcom/msm8916.dtsi | 8 +- .../device-tree/src/arm64/qcom/msm8994.dtsi | 4 +- .../src/arm64/qcom/msm8998-clamshell.dtsi | 4 + .../device-tree/src/arm64/qcom/msm8998-mtp.dtsi | 4 + .../arm64/qcom/msm8998-oneplus-cheeseburger.dts | 42 + .../src/arm64/qcom/msm8998-oneplus-common.dtsi | 514 ++++++ .../src/arm64/qcom/msm8998-oneplus-dumpling.dts | 25 + .../device-tree/src/arm64/qcom/msm8998.dtsi | 2 + sys/contrib/device-tree/src/arm64/qcom/pm8150.dtsi | 4 +- sys/contrib/device-tree/src/arm64/qcom/pm8350.dtsi | 25 + .../device-tree/src/arm64/qcom/pm8350b.dtsi | 25 + .../device-tree/src/arm64/qcom/pm8350c.dtsi | 25 + .../device-tree/src/arm64/qcom/pmk8350.dtsi | 25 + .../device-tree/src/arm64/qcom/pmr735a.dtsi | 25 + .../device-tree/src/arm64/qcom/pmr735b.dtsi | 25 + .../device-tree/src/arm64/qcom/qrb5165-rb5.dts | 18 +- .../arm64/qcom/sc7180-trogdor-coachz-r1-lte.dts | 18 + .../src/arm64/qcom/sc7180-trogdor-coachz-r1.dts | 141 ++ .../arm64/qcom/sc7180-trogdor-coachz-r2-lte.dts | 18 + .../src/arm64/qcom/sc7180-trogdor-coachz-r2.dts | 15 + .../src/arm64/qcom/sc7180-trogdor-coachz.dtsi | 266 +++ .../qcom/sc7180-trogdor-lazor-limozeen-nots-r4.dts | 34 + .../qcom/sc7180-trogdor-lazor-limozeen-nots.dts | 26 + .../arm64/qcom/sc7180-trogdor-lazor-limozeen.dts | 42 + .../src/arm64/qcom/sc7180-trogdor-lazor-r0.dts | 9 + .../src/arm64/qcom/sc7180-trogdor-lazor-r1.dts | 9 + .../src/arm64/qcom/sc7180-trogdor-lazor-r3-kb.dts | 5 +- .../src/arm64/qcom/sc7180-trogdor-lazor-r3-lte.dts | 4 +- .../src/arm64/qcom/sc7180-trogdor-lazor-r3.dts | 10 + .../src/arm64/qcom/sc7180-trogdor-lazor.dtsi | 39 +- .../arm64/qcom/sc7180-trogdor-pompom-r1-lte.dts | 14 + .../src/arm64/qcom/sc7180-trogdor-pompom-r1.dts | 26 + .../arm64/qcom/sc7180-trogdor-pompom-r2-lte.dts | 14 + .../src/arm64/qcom/sc7180-trogdor-pompom-r2.dts | 44 + .../src/arm64/qcom/sc7180-trogdor-pompom.dtsi | 295 ++++ .../src/arm64/qcom/sc7180-trogdor-r1.dts | 35 +- .../device-tree/src/arm64/qcom/sc7180-trogdor.dtsi | 222 ++- sys/contrib/device-tree/src/arm64/qcom/sc7180.dtsi | 58 +- .../device-tree/src/arm64/qcom/sc7280-idp.dts | 259 +++ sys/contrib/device-tree/src/arm64/qcom/sc7280.dtsi | 1128 +++++++++++++ .../device-tree/src/arm64/qcom/sdm845-db845c.dts | 31 +- .../src/arm64/qcom/sdm845-xiaomi-beryllium.dts | 71 + sys/contrib/device-tree/src/arm64/qcom/sdm845.dtsi | 155 +- sys/contrib/device-tree/src/arm64/qcom/sm8150.dtsi | 555 ++++++- .../device-tree/src/arm64/qcom/sm8250-mtp.dts | 4 - sys/contrib/device-tree/src/arm64/qcom/sm8250.dtsi | 676 ++++---- .../device-tree/src/arm64/qcom/sm8350-hdk.dts | 319 ++++ .../device-tree/src/arm64/qcom/sm8350-mtp.dts | 116 ++ sys/contrib/device-tree/src/arm64/qcom/sm8350.dtsi | 1637 +++++++++++++++++- .../arm64/renesas/beacon-renesom-baseboard.dtsi | 4 +- .../src/arm64/renesas/hihope-common.dtsi | 3 + .../device-tree/src/arm64/renesas/hihope-rev4.dtsi | 2 +- ...hope-rzg2-ex-aistarvision-mipi-adapter-2.1.dtsi | 2 - .../arm64/renesas/r8a774a1-beacon-rzg2m-kit.dts | 3 + .../device-tree/src/arm64/renesas/r8a774a1.dtsi | 8 + .../arm64/renesas/r8a774b1-beacon-rzg2n-kit.dts | 3 + .../device-tree/src/arm64/renesas/r8a774b1.dtsi | 8 + .../src/arm64/renesas/r8a774c0-cat874.dts | 6 +- .../src/arm64/renesas/r8a774c0-ek874-mipi-2.1.dts | 2 +- .../device-tree/src/arm64/renesas/r8a774c0.dtsi | 4 + .../arm64/renesas/r8a774e1-beacon-rzg2h-kit.dts | 3 + .../device-tree/src/arm64/renesas/r8a774e1.dtsi | 8 + .../src/arm64/renesas/r8a77950-salvator-x.dts | 37 +- .../device-tree/src/arm64/renesas/r8a77950.dtsi | 9 + .../src/arm64/renesas/r8a77951-salvator-x.dts | 37 +- .../src/arm64/renesas/r8a77951-salvator-xs.dts | 37 +- .../device-tree/src/arm64/renesas/r8a77951.dtsi | 12 + .../src/arm64/renesas/r8a77960-salvator-x.dts | 46 - .../src/arm64/renesas/r8a77960-salvator-xs.dts | 46 - .../device-tree/src/arm64/renesas/r8a77960.dtsi | 8 + .../src/arm64/renesas/r8a77961-salvator-xs.dts | 46 - .../src/arm64/renesas/r8a77961-ulcb.dts | 11 + .../device-tree/src/arm64/renesas/r8a77961.dtsi | 348 +++- .../src/arm64/renesas/r8a77965-salvator-x.dts | 45 - .../src/arm64/renesas/r8a77965-salvator-xs.dts | 45 - .../device-tree/src/arm64/renesas/r8a77965.dtsi | 8 + .../device-tree/src/arm64/renesas/r8a77970.dtsi | 4 + .../device-tree/src/arm64/renesas/r8a77980.dtsi | 24 +- .../src/arm64/renesas/r8a77990-ebisu.dts | 11 +- .../device-tree/src/arm64/renesas/r8a77990.dtsi | 4 + .../src/arm64/renesas/r8a779a0-falcon-cpu.dtsi | 79 +- .../src/arm64/renesas/r8a779a0-falcon-csi-dsi.dtsi | 15 + .../arm64/renesas/r8a779a0-falcon-ethernet.dtsi | 15 + .../src/arm64/renesas/r8a779a0-falcon.dts | 50 +- .../device-tree/src/arm64/renesas/r8a779a0.dtsi | 263 ++- .../src/arm64/renesas/salvator-common.dtsi | 55 +- .../device-tree/src/arm64/renesas/ulcb-kf.dtsi | 1 + .../device-tree/src/arm64/renesas/ulcb.dtsi | 12 +- .../src/arm64/rockchip/px30-engicam-common.dtsi | 5 + .../src/arm64/rockchip/px30-engicam-px30-core.dtsi | 4 + .../device-tree/src/arm64/rockchip/px30-evb.dts | 6 + .../device-tree/src/arm64/rockchip/px30.dtsi | 27 +- .../src/arm64/rockchip/rk3308-roc-cc.dts | 6 + .../device-tree/src/arm64/rockchip/rk3308.dtsi | 5 +- .../src/arm64/rockchip/rk3318-a95x-z2.dts | 11 + .../src/arm64/rockchip/rk3326-odroid-go2.dts | 4 + .../device-tree/src/arm64/rockchip/rk3328-a1.dts | 5 + .../device-tree/src/arm64/rockchip/rk3328-evb.dts | 6 + .../src/arm64/rockchip/rk3328-nanopi-r2s.dts | 4 + .../src/arm64/rockchip/rk3328-roc-cc.dts | 5 + .../src/arm64/rockchip/rk3328-rock-pi-e.dts | 5 + .../src/arm64/rockchip/rk3328-rock64.dts | 5 + .../device-tree/src/arm64/rockchip/rk3328.dtsi | 28 +- .../device-tree/src/arm64/rockchip/rk3368-evb.dtsi | 4 + .../src/arm64/rockchip/rk3368-geekbox.dts | 4 + .../src/arm64/rockchip/rk3368-lion-haikou.dts | 4 + .../src/arm64/rockchip/rk3368-lion.dtsi | 4 + .../src/arm64/rockchip/rk3368-orion-r68-meta.dts | 5 + .../src/arm64/rockchip/rk3368-px5-evb.dts | 5 + .../device-tree/src/arm64/rockchip/rk3368-r88.dts | 5 + .../device-tree/src/arm64/rockchip/rk3368.dtsi | 9 +- .../device-tree/src/arm64/rockchip/rk3399-evb.dts | 4 + .../src/arm64/rockchip/rk3399-firefly.dts | 6 + .../device-tree/src/arm64/rockchip/rk3399-gru.dtsi | 5 + .../src/arm64/rockchip/rk3399-hugsun-x99.dts | 6 + .../src/arm64/rockchip/rk3399-khadas-edge.dtsi | 6 + .../src/arm64/rockchip/rk3399-kobol-helios64.dts | 5 + .../src/arm64/rockchip/rk3399-leez-p710.dts | 6 + .../src/arm64/rockchip/rk3399-nanopi-r4s.dts | 133 ++ .../src/arm64/rockchip/rk3399-nanopi4.dtsi | 6 + .../device-tree/src/arm64/rockchip/rk3399-opp.dtsi | 40 +- .../src/arm64/rockchip/rk3399-orangepi.dts | 6 + .../src/arm64/rockchip/rk3399-pinebook-pro.dts | 6 + .../src/arm64/rockchip/rk3399-puma-haikou.dts | 4 + .../src/arm64/rockchip/rk3399-puma.dtsi | 55 +- .../src/arm64/rockchip/rk3399-roc-pc-mezzanine.dts | 4 + .../src/arm64/rockchip/rk3399-roc-pc.dtsi | 5 + .../src/arm64/rockchip/rk3399-rock-pi-4.dtsi | 5 + .../src/arm64/rockchip/rk3399-rock-pi-4b.dts | 4 + .../src/arm64/rockchip/rk3399-rock-pi-4c.dts | 4 + .../src/arm64/rockchip/rk3399-rock960.dtsi | 6 + .../src/arm64/rockchip/rk3399-rockpro64.dtsi | 19 + .../arm64/rockchip/rk3399-sapphire-excavator.dts | 4 + .../src/arm64/rockchip/rk3399-sapphire.dtsi | 5 + .../device-tree/src/arm64/rockchip/rk3399.dtsi | 9 +- .../src/arm64/rockchip/rk3399pro-vmarc-som.dtsi | 5 + .../src/arm64/socionext/uniphier-ld20.dtsi | 2 +- .../src/arm64/socionext/uniphier-pxs3.dtsi | 4 +- .../device-tree/src/arm64/ti/k3-am64-main.dtsi | 676 ++++++++ .../device-tree/src/arm64/ti/k3-am64-mcu.dtsi | 104 ++ sys/contrib/device-tree/src/arm64/ti/k3-am64.dtsi | 105 ++ .../device-tree/src/arm64/ti/k3-am642-evm.dts | 468 ++++++ .../device-tree/src/arm64/ti/k3-am642-sk.dts | 334 ++++ sys/contrib/device-tree/src/arm64/ti/k3-am642.dtsi | 65 + .../src/arm64/ti/k3-am65-iot2050-common.dtsi | 655 ++++++++ .../device-tree/src/arm64/ti/k3-am65-main.dtsi | 405 ++++- .../device-tree/src/arm64/ti/k3-am65-mcu.dtsi | 13 +- .../device-tree/src/arm64/ti/k3-am65-wakeup.dtsi | 13 +- .../src/arm64/ti/k3-am6528-iot2050-basic.dts | 61 + .../src/arm64/ti/k3-am654-base-board.dts | 35 +- .../src/arm64/ti/k3-am6548-iot2050-advanced.dts | 60 + .../src/arm64/ti/k3-j7200-common-proc-board.dts | 94 ++ .../device-tree/src/arm64/ti/k3-j7200-main.dtsi | 94 +- .../src/arm64/ti/k3-j7200-mcu-wakeup.dtsi | 58 +- .../device-tree/src/arm64/ti/k3-j7200-som-p0.dtsi | 36 + .../device-tree/src/arm64/ti/k3-j721e-main.dtsi | 289 +++- .../src/arm64/ti/k3-j721e-mcu-wakeup.dtsi | 15 +- .../device-tree/src/arm64/ti/k3-j721e-som-p0.dtsi | 4 +- .../src/arm64/xilinx/zynqmp-zcu102-revA.dts | 20 +- .../src/arm64/xilinx/zynqmp-zcu106-revA.dts | 20 +- .../device-tree/src/arm64/xilinx/zynqmp.dtsi | 1 + .../src/mips/brcm/bcm3368-netgear-cvg834g.dts | 2 +- sys/contrib/device-tree/src/mips/brcm/bcm3368.dtsi | 5 +- .../src/mips/brcm/bcm63268-comtrend-vr-3032u.dts | 2 +- .../device-tree/src/mips/brcm/bcm63268.dtsi | 137 +- sys/contrib/device-tree/src/mips/brcm/bcm6328.dtsi | 124 +- .../src/mips/brcm/bcm6358-neufbox4-sercomm.dts | 2 +- sys/contrib/device-tree/src/mips/brcm/bcm6358.dtsi | 89 +- .../src/mips/brcm/bcm6362-neufbox6-sercomm.dts | 2 +- sys/contrib/device-tree/src/mips/brcm/bcm6362.dtsi | 134 +- sys/contrib/device-tree/src/mips/brcm/bcm6368.dtsi | 133 +- .../device-tree/src/mips/brcm/bcm93384wvg.dts | 2 +- .../src/mips/brcm/bcm93384wvg_viper.dts | 2 +- .../device-tree/src/mips/brcm/bcm96368mvwg.dts | 2 +- .../device-tree/src/mips/brcm/bcm97125cbmb.dts | 2 +- .../device-tree/src/mips/brcm/bcm97346dbsmb.dts | 4 +- .../device-tree/src/mips/brcm/bcm97358svmb.dts | 4 +- .../device-tree/src/mips/brcm/bcm97360svmb.dts | 2 +- .../device-tree/src/mips/brcm/bcm97362svmb.dts | 4 +- .../device-tree/src/mips/brcm/bcm97420c.dts | 2 +- .../device-tree/src/mips/brcm/bcm97425svmb.dts | 4 +- .../device-tree/src/mips/brcm/bcm97435svmb.dts | 4 +- .../device-tree/src/mips/brcm/bcm9ejtagprb.dts | 2 +- sys/contrib/device-tree/src/mips/ingenic/gcw0.dts | 1 - .../src/mips/loongson/loongson64-2k1000.dtsi | 243 +++ .../src/mips/loongson/loongson64_2core_2k1000.dts | 10 + .../src/powerpc/fsl/bsc9131si-post.dtsi | 4 - .../src/powerpc/fsl/bsc9132si-post.dtsi | 4 - .../device-tree/src/powerpc/fsl/c293si-post.dtsi | 4 - .../device-tree/src/powerpc/fsl/p1010si-post.dtsi | 29 +- .../device-tree/src/powerpc/fsl/p2041si-post.dtsi | 16 + sys/contrib/device-tree/src/powerpc/icon.dts | 7 - .../riscv/microchip/microchip-mpfs-icicle-kit.dts | 72 + .../src/riscv/microchip/microchip-mpfs.dtsi | 329 ++++ .../device-tree/src/riscv/sifive/fu740-c000.dtsi | 35 +- 939 files changed, 49981 insertions(+), 4582 deletions(-) diff --cc sys/contrib/device-tree/Bindings/arm/apple.yaml index 000000000000,1e772c85206c..1e772c85206c mode 000000,100644..100644 --- a/sys/contrib/device-tree/Bindings/arm/apple.yaml +++ b/sys/contrib/device-tree/Bindings/arm/apple.yaml diff --cc sys/contrib/device-tree/Bindings/arm/ete.yaml index 000000000000,7f9b2d1e1147..7f9b2d1e1147 mode 000000,100644..100644 --- a/sys/contrib/device-tree/Bindings/arm/ete.yaml +++ b/sys/contrib/device-tree/Bindings/arm/ete.yaml diff --cc sys/contrib/device-tree/Bindings/arm/npcm/npcm.yaml index 000000000000,95e51378089c..95e51378089c mode 000000,100644..100644 --- a/sys/contrib/device-tree/Bindings/arm/npcm/npcm.yaml +++ b/sys/contrib/device-tree/Bindings/arm/npcm/npcm.yaml diff --cc sys/contrib/device-tree/Bindings/arm/trbe.yaml index 000000000000,4402d7bfd1fc..4402d7bfd1fc mode 000000,100644..100644 --- a/sys/contrib/device-tree/Bindings/arm/trbe.yaml +++ b/sys/contrib/device-tree/Bindings/arm/trbe.yaml diff --cc sys/contrib/device-tree/Bindings/ata/nvidia,tegra-ahci.yaml index 000000000000,a75e9a8f539a..a75e9a8f539a mode 000000,100644..100644 --- a/sys/contrib/device-tree/Bindings/ata/nvidia,tegra-ahci.yaml +++ b/sys/contrib/device-tree/Bindings/ata/nvidia,tegra-ahci.yaml diff --cc sys/contrib/device-tree/Bindings/clock/mediatek,mt7621-sysc.yaml index 000000000000,915f84efd763..915f84efd763 mode 000000,100644..100644 --- a/sys/contrib/device-tree/Bindings/clock/mediatek,mt7621-sysc.yaml +++ b/sys/contrib/device-tree/Bindings/clock/mediatek,mt7621-sysc.yaml diff --cc sys/contrib/device-tree/Bindings/clock/qcom,gcc-sdm845.yaml *** 1264 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Thu Jul 1 15:52:40 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A9D9066681D; Thu, 1 Jul 2021 15:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG2m844f1z4Vmy; Thu, 1 Jul 2021 15:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 7449B232A3; Thu, 1 Jul 2021 15:52:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161Fqewt094769; Thu, 1 Jul 2021 15:52:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161FqeER094768; Thu, 1 Jul 2021 15:52:40 GMT (envelope-from git) Date: Thu, 1 Jul 2021 15:52:40 GMT Message-Id: <202107011552.161FqeER094768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: 1f7d11e636ab - main - build.7: remove documentation of "make update" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f7d11e636abf68d92b052fefe63b687d84c966a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 15:52:40 -0000 The branch main has been updated by ceri (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=1f7d11e636abf68d92b052fefe63b687d84c966a commit 1f7d11e636abf68d92b052fefe63b687d84c966a Author: Ceri Davies AuthorDate: 2021-07-01 15:04:33 +0000 Commit: Ceri Davies CommitDate: 2021-07-01 15:52:32 +0000 build.7: remove documentation of "make update" update target was removed in e290182bcf3895ca659dff111bca6a077c4708b1 --- share/man/man7/build.7 | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index 62c24eaed0dc..9d311a2f2f6c 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd May 15, 2021 +.Dd July 1, 2021 .Dt BUILD 7 .Os .Sh NAME @@ -310,9 +310,6 @@ Like with .Va WITHOUT_KERNELS defined so only the worlds for each architecture are built. -.It Cm update -Get updated sources as configured in -.Xr make.conf 5 . .It Cm targets Print a list of supported .Va TARGET @@ -760,26 +757,12 @@ If set, the build process does not run as part of the .Cm buildkernel target. -.It Va NO_DOCUPDATE -If set, the update process does not update the source of the -.Fx -documentation as part of the -.Dq make update -target. .It Va NO_LIBS If set, the libraries phase will be skipped. .It Va NO_OBJWALK If set, no object directories will be created. This should only be used if object directories were created in a previous build and no new directories are connected. -.It Va NO_PORTSUPDATE -If set, the update process does not update the Ports tree as part of the -.Dq make update -target. -.It Va NO_WWWUPDATE -If set, the update process does not update the www tree as part of the -.Dq make update -target. .It Va WORLDFAST If set, the build target .Cm buildworld From owner-dev-commits-src-all@freebsd.org Thu Jul 1 16:47:09 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4A3936675B4; Thu, 1 Jul 2021 16:47:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG3z11gJ5z4bGy; Thu, 1 Jul 2021 16:47:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 2179B23E7D; Thu, 1 Jul 2021 16:47:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161Gl96I062530; Thu, 1 Jul 2021 16:47:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161Gl9MM062529; Thu, 1 Jul 2021 16:47:09 GMT (envelope-from git) Date: Thu, 1 Jul 2021 16:47:09 GMT Message-Id: <202107011647.161Gl9MM062529@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 993e8236c30a - main - arm64: allwinner: Add r_intc driver 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/main X-Git-Reftype: branch X-Git-Commit: 993e8236c30a03980a563c63d1e6eae6b6dfbf59 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 16:47:09 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=993e8236c30a03980a563c63d1e6eae6b6dfbf59 commit 993e8236c30a03980a563c63d1e6eae6b6dfbf59 Author: Emmanuel Vadot AuthorDate: 2021-07-01 16:41:05 +0000 Commit: Emmanuel Vadot CommitDate: 2021-07-01 16:46:38 +0000 arm64: allwinner: Add r_intc driver The r intc interrupt controller seems to do a lot of things : - It can handle the NMI interrupt - It have local interrupts for some device that also can be muxed with GIC - It can serve as an forwarder for the GIC It's mostly used for deepsleep/wakeup if I understood correctly and we do not support this on arm64. For now just forward everything to the GIC so interrupts works again for device which now have this interrupts controller set since dts v5.12 Sponsored by: Diablotin Systems --- sys/arm/allwinner/aw_r_intc.c | 299 ++++++++++++++++++++++++++++++++++++++++++ sys/arm64/conf/GENERIC | 1 + sys/conf/files.arm64 | 1 + 3 files changed, 301 insertions(+) diff --git a/sys/arm/allwinner/aw_r_intc.c b/sys/arm/allwinner/aw_r_intc.c new file mode 100644 index 000000000000..6d9369e12dca --- /dev/null +++ b/sys/arm/allwinner/aw_r_intc.c @@ -0,0 +1,299 @@ +/*- + * Copyright (c) 2021 Emmanuel Vadot + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include "opt_platform.h" + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include "pic_if.h" + +struct aw_r_intc_gicp_softc { + device_t dev; + device_t parent; + struct resource *res; + + struct intr_map_data_fdt *parent_map_data; +}; + +static struct ofw_compat_data compat_data[] = { + {"allwinner,sun6i-a31-r-intc", 1}, + {NULL, 0} +}; + +static int +aw_r_intc_gicp_probe(device_t dev) +{ + + if (!ofw_bus_status_okay(dev)) + return (ENXIO); + + if (ofw_bus_search_compatible(dev, compat_data)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Allwinner R INTC"); + return (BUS_PROBE_DEFAULT); +} + +static int +aw_r_intc_gicp_attach(device_t dev) +{ + struct aw_r_intc_gicp_softc *sc; + phandle_t node, xref, intr_parent; + + sc = device_get_softc(dev); + sc->dev = dev; + node = ofw_bus_get_node(dev); + + /* Look for our parent */ + if ((intr_parent = ofw_bus_find_iparent(node)) == 0) { + device_printf(dev, + "Cannot find our parent interrupt controller\n"); + return (ENXIO); + } + if ((sc->parent = OF_device_from_xref(intr_parent)) == NULL) { + device_printf(dev, + "cannot find parent interrupt controller device\n"); + return (ENXIO); + } + + /* Register ourself as a interrupt controller */ + xref = OF_xref_from_node(node); + if (intr_pic_register(dev, xref) == NULL) { + device_printf(dev, "Cannot register GICP\n"); + return (ENXIO); + } + + /* Allocate GIC compatible mapping */ + sc->parent_map_data = (struct intr_map_data_fdt *)intr_alloc_map_data( + INTR_MAP_DATA_FDT, sizeof(struct intr_map_data_fdt) + + + 3 * sizeof(phandle_t), M_WAITOK | M_ZERO); + + /* Register ourself to device can find us */ + OF_device_register_xref(xref, dev); + + return (0); +} + +static int +aw_r_intc_gicp_detach(device_t dev) +{ + + return (EBUSY); +} + +static struct intr_map_data * +aw_r_intc_gicp_convert_map_data(struct aw_r_intc_gicp_softc *sc, + struct intr_map_data *data) +{ + struct intr_map_data_fdt *daf; + + daf = (struct intr_map_data_fdt *)data; + + /* We only support GIC forward for now */ + if (daf->ncells != 3) + return (NULL); + + /* Check if this is a GIC_SPI type */ + if (daf->cells[0] != 0) + return (NULL); + + sc->parent_map_data->ncells = 3; + sc->parent_map_data->cells[0] = 0; + sc->parent_map_data->cells[1] = daf->cells[1]; + sc->parent_map_data->cells[2] = daf->cells[2]; + + return ((struct intr_map_data *)sc->parent_map_data); +} + +static int +aw_r_intc_gicp_activate_intr(device_t dev, struct intr_irqsrc *isrc, + struct resource *res, struct intr_map_data *data) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + data = aw_r_intc_gicp_convert_map_data(sc, data); + if (data == NULL) + return (EINVAL); + + return (PIC_ACTIVATE_INTR(sc->parent, isrc, res, data)); +} + +static void +aw_r_intc_gicp_enable_intr(device_t dev, struct intr_irqsrc *isrc) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + + PIC_ENABLE_INTR(sc->parent, isrc); +} + +static void +aw_r_intc_gicp_disable_intr(device_t dev, struct intr_irqsrc *isrc) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + + PIC_DISABLE_INTR(sc->parent, isrc); +} + +static int +aw_r_intc_gicp_map_intr(device_t dev, struct intr_map_data *data, + struct intr_irqsrc **isrcp) +{ + struct aw_r_intc_gicp_softc *sc; + int ret; + + sc = device_get_softc(dev); + + if (data->type != INTR_MAP_DATA_FDT) + return (ENOTSUP); + + data = aw_r_intc_gicp_convert_map_data(sc, data); + if (data == NULL) + return (EINVAL); + + ret = PIC_MAP_INTR(sc->parent, data, isrcp); + (*isrcp)->isrc_dev = sc->dev; + return(ret); +} + +static int +aw_r_intc_gicp_deactivate_intr(device_t dev, struct intr_irqsrc *isrc, + struct resource *res, struct intr_map_data *data) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + + data = aw_r_intc_gicp_convert_map_data(sc, data); + if (data == NULL) + return (EINVAL); + + return (PIC_DEACTIVATE_INTR(sc->parent, isrc, res, data)); +} + +static int +aw_r_intc_gicp_setup_intr(device_t dev, struct intr_irqsrc *isrc, + struct resource *res, struct intr_map_data *data) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + data = aw_r_intc_gicp_convert_map_data(sc, data); + if (data == NULL) + return (EINVAL); + + return (PIC_SETUP_INTR(sc->parent, isrc, res, data)); +} + +static int +aw_r_intc_gicp_teardown_intr(device_t dev, struct intr_irqsrc *isrc, + struct resource *res, struct intr_map_data *data) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + data = aw_r_intc_gicp_convert_map_data(sc, data); + if (data == NULL) + return (EINVAL); + + return (PIC_TEARDOWN_INTR(sc->parent, isrc, res, data)); +} + +static void +aw_r_intc_gicp_pre_ithread(device_t dev, struct intr_irqsrc *isrc) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + + PIC_PRE_ITHREAD(sc->parent, isrc); +} + +static void +aw_r_intc_gicp_post_ithread(device_t dev, struct intr_irqsrc *isrc) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + + PIC_POST_ITHREAD(sc->parent, isrc); +} + +static void +aw_r_intc_gicp_post_filter(device_t dev, struct intr_irqsrc *isrc) +{ + struct aw_r_intc_gicp_softc *sc; + + sc = device_get_softc(dev); + + PIC_POST_FILTER(sc->parent, isrc); +} + +static device_method_t aw_r_intc_gicp_methods[] = { + /* Device interface */ + DEVMETHOD(device_probe, aw_r_intc_gicp_probe), + DEVMETHOD(device_attach, aw_r_intc_gicp_attach), + DEVMETHOD(device_detach, aw_r_intc_gicp_detach), + + /* Interrupt controller interface */ + DEVMETHOD(pic_activate_intr, aw_r_intc_gicp_activate_intr), + DEVMETHOD(pic_disable_intr, aw_r_intc_gicp_disable_intr), + DEVMETHOD(pic_enable_intr, aw_r_intc_gicp_enable_intr), + DEVMETHOD(pic_map_intr, aw_r_intc_gicp_map_intr), + DEVMETHOD(pic_deactivate_intr, aw_r_intc_gicp_deactivate_intr), + DEVMETHOD(pic_setup_intr, aw_r_intc_gicp_setup_intr), + DEVMETHOD(pic_teardown_intr, aw_r_intc_gicp_teardown_intr), + DEVMETHOD(pic_post_filter, aw_r_intc_gicp_post_filter), + DEVMETHOD(pic_post_ithread, aw_r_intc_gicp_post_ithread), + DEVMETHOD(pic_pre_ithread, aw_r_intc_gicp_pre_ithread), + + DEVMETHOD_END +}; + +static devclass_t aw_r_intc_gicp_devclass; + +static driver_t aw_r_intc_gicp_driver = { + "aw_r_intc_gicp", + aw_r_intc_gicp_methods, + sizeof(struct aw_r_intc_gicp_softc), +}; + +EARLY_DRIVER_MODULE(aw_r_intc_gicp, simplebus, aw_r_intc_gicp_driver, + aw_r_intc_gicp_devclass, 0, 0, BUS_PASS_INTERRUPT + BUS_PASS_ORDER_MIDDLE); diff --git a/sys/arm64/conf/GENERIC b/sys/arm64/conf/GENERIC index 954631ca68b2..473578f8fbe1 100644 --- a/sys/arm64/conf/GENERIC +++ b/sys/arm64/conf/GENERIC @@ -211,6 +211,7 @@ device aw_ccu # Allwinner clock controller # Interrupt controllers device aw_nmi # Allwinner NMI support +device aw_r_intc # Allwinner RINTC support device mv_cp110_icu # Marvell CP110 ICU device mv_ap806_gicp # Marvell AP806 GICP device mv_ap806_sei # Marvell AP806 SEI diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 94530ee4d3b0..48ad00e064d5 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -323,6 +323,7 @@ arm/allwinner/aw_mmc.c optional mmc aw_mmc fdt | mmccam aw_mmc fdt arm/allwinner/aw_nmi.c optional aw_nmi fdt \ compile-with "${NORMAL_C} -I$S/contrib/device-tree/include" arm/allwinner/aw_pwm.c optional aw_pwm fdt +arm/allwinner/aw_r_intc.c optional aw_r_intc fdt arm/allwinner/aw_rsb.c optional aw_rsb fdt arm/allwinner/aw_rtc.c optional aw_rtc fdt arm/allwinner/aw_sid.c optional aw_sid nvmem fdt From owner-dev-commits-src-all@freebsd.org Thu Jul 1 16:49:07 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 645CE667883; Thu, 1 Jul 2021 16:49:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG41H2TQjz4b8s; Thu, 1 Jul 2021 16:49:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3EA0123F70; Thu, 1 Jul 2021 16:49:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161Gn77k062766; Thu, 1 Jul 2021 16:49:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161Gn7ii062765; Thu, 1 Jul 2021 16:49:07 GMT (envelope-from git) Date: Thu, 1 Jul 2021 16:49:07 GMT Message-Id: <202107011649.161Gn7ii062765@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Emmanuel Vadot Subject: git: 2ca21223c520 - main - dts: Bump the freebsd branding version to 5.13 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/main X-Git-Reftype: branch X-Git-Commit: 2ca21223c52068e1111a7901e08a5cf09d0aaa8e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 16:49:07 -0000 The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=2ca21223c52068e1111a7901e08a5cf09d0aaa8e commit 2ca21223c52068e1111a7901e08a5cf09d0aaa8e Author: Emmanuel Vadot AuthorDate: 2021-07-01 16:48:44 +0000 Commit: Emmanuel Vadot CommitDate: 2021-07-01 16:48:56 +0000 dts: Bump the freebsd branding version to 5.13 Sponsored by: Diablotin Systems --- sys/dts/freebsd-compatible.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dts/freebsd-compatible.dts b/sys/dts/freebsd-compatible.dts index 5b1f4f2462f2..eb1a50401d6e 100644 --- a/sys/dts/freebsd-compatible.dts +++ b/sys/dts/freebsd-compatible.dts @@ -1,3 +1,3 @@ / { - freebsd,dts-version = "5.10"; + freebsd,dts-version = "5.13"; }; From owner-dev-commits-src-all@freebsd.org Thu Jul 1 18:13:32 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 91C27650079; Thu, 1 Jul 2021 18:13:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG5th3Xmrz4hX1; Thu, 1 Jul 2021 18:13:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 61D102539C; Thu, 1 Jul 2021 18:13:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161IDWfo082030; Thu, 1 Jul 2021 18:13:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161IDWwD082029; Thu, 1 Jul 2021 18:13:32 GMT (envelope-from git) Date: Thu, 1 Jul 2021 18:13:32 GMT Message-Id: <202107011813.161IDWwD082029@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 8df71ea1aa3b - main - tegra_pcie: use switch instead of if in tegra_pcib_pex_ctrl MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8df71ea1aa3b39f84e7ee3122a333caab57c3e1a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 18:13:32 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=8df71ea1aa3b39f84e7ee3122a333caab57c3e1a commit 8df71ea1aa3b39f84e7ee3122a333caab57c3e1a Author: Ferhat Gecdogan AuthorDate: 2021-07-01 18:09:46 +0000 Commit: Marcin Wojtas CommitDate: 2021-07-01 18:09:46 +0000 tegra_pcie: use switch instead of if in tegra_pcib_pex_ctrl Simplify obtaining per-port data in tegra_pcib_pex_ctrl() routine. Reviewed by: imp, mw Pull Request: https://github.com/freebsd/freebsd-src/pull/481 --- sys/arm/nvidia/tegra_pcie.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sys/arm/nvidia/tegra_pcie.c b/sys/arm/nvidia/tegra_pcie.c index aa488bb8c0e4..ec8f361cff7f 100644 --- a/sys/arm/nvidia/tegra_pcie.c +++ b/sys/arm/nvidia/tegra_pcie.c @@ -835,17 +835,16 @@ tegra_pcib_msi_map_msi(device_t dev, device_t child, struct intr_irqsrc *isrc, static bus_size_t tegra_pcib_pex_ctrl(struct tegra_pcib_softc *sc, int port) { - if (port >= TEGRA_PCIB_MAX_PORTS) - panic("invalid port number: %d\n", port); - - if (port == 0) + switch (port) { + case 0: return (AFI_PEX0_CTRL); - else if (port == 1) + case 1: return (AFI_PEX1_CTRL); - else if (port == 2) + case 2: return (AFI_PEX2_CTRL); - else + default: panic("invalid port number: %d\n", port); + } } static int From owner-dev-commits-src-all@freebsd.org Thu Jul 1 18:25:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7314F6503E6; Thu, 1 Jul 2021 18:25:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG68V2hgQz4jT5; Thu, 1 Jul 2021 18:25:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 451E02534F; Thu, 1 Jul 2021 18:25:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161IPUnp095885; Thu, 1 Jul 2021 18:25:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161IPUjN095884; Thu, 1 Jul 2021 18:25:30 GMT (envelope-from git) Date: Thu, 1 Jul 2021 18:25:30 GMT Message-Id: <202107011825.161IPUjN095884@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: ddb928096bff - main - dts: fsl-ls1028a: Correct ECAM PCIE window ranges MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ddb928096bff38faf243af83d6b861f2337d955a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 18:25:30 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=ddb928096bff38faf243af83d6b861f2337d955a commit ddb928096bff38faf243af83d6b861f2337d955a Author: Kornel Duleba AuthorDate: 2021-07-01 18:21:17 +0000 Commit: Marcin Wojtas CommitDate: 2021-07-01 18:23:40 +0000 dts: fsl-ls1028a: Correct ECAM PCIE window ranges Currently all PCIE windows point to bus address 0x0, which does not match the values obtained from hardware during EA. Replace those values with CPU addresses, since in reality we have a 1:1 mapping between the two. This patch is queued for Linux v5.14 in linux-next tree: 6bee93d93111 "arm64: dts: fsl-ls1028a: Correct ECAM PCIE window ranges" --- .../device-tree/src/arm64/freescale/fsl-ls1028a.dtsi | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a.dtsi b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a.dtsi index a30249ebffa8..63ff60bd8ec9 100644 --- a/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a.dtsi +++ b/sys/contrib/device-tree/src/arm64/freescale/fsl-ls1028a.dtsi @@ -990,19 +990,19 @@ msi-map = <0 &its 0x17 0xe>; iommu-map = <0 &smmu 0x17 0xe>; /* PF0-6 BAR0 - non-prefetchable memory */ - ranges = <0x82000000 0x0 0x00000000 0x1 0xf8000000 0x0 0x160000 + ranges = <0x82000000 0x1 0xf8000000 0x1 0xf8000000 0x0 0x160000 /* PF0-6 BAR2 - prefetchable memory */ - 0xc2000000 0x0 0x00000000 0x1 0xf8160000 0x0 0x070000 + 0xc2000000 0x1 0xf8160000 0x1 0xf8160000 0x0 0x070000 /* PF0: VF0-1 BAR0 - non-prefetchable memory */ - 0x82000000 0x0 0x00000000 0x1 0xf81d0000 0x0 0x020000 + 0x82000000 0x1 0xf81d0000 0x1 0xf81d0000 0x0 0x020000 /* PF0: VF0-1 BAR2 - prefetchable memory */ - 0xc2000000 0x0 0x00000000 0x1 0xf81f0000 0x0 0x020000 + 0xc2000000 0x1 0xf81f0000 0x1 0xf81f0000 0x0 0x020000 /* PF1: VF0-1 BAR0 - non-prefetchable memory */ - 0x82000000 0x0 0x00000000 0x1 0xf8210000 0x0 0x020000 + 0x82000000 0x1 0xf8210000 0x1 0xf8210000 0x0 0x020000 /* PF1: VF0-1 BAR2 - prefetchable memory */ - 0xc2000000 0x0 0x00000000 0x1 0xf8230000 0x0 0x020000 + 0xc2000000 0x1 0xf8230000 0x1 0xf8230000 0x0 0x020000 /* BAR4 (PF5) - non-prefetchable memory */ - 0x82000000 0x0 0x00000000 0x1 0xfc000000 0x0 0x400000>; + 0x82000000 0x1 0xfc000000 0x1 0xfc000000 0x0 0x400000>; enetc_port0: ethernet@0,0 { compatible = "fsl,enetc"; From owner-dev-commits-src-all@freebsd.org Thu Jul 1 18:33:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B271C6509C2 for ; Thu, 1 Jul 2021 18:33:00 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: from mail-yb1-xb32.google.com (mail-yb1-xb32.google.com [IPv6:2607:f8b0:4864:20::b32]) (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 4GG6K755DHz4kCP for ; Thu, 1 Jul 2021 18:32:59 +0000 (UTC) (envelope-from kevin.bowling@kev009.com) Received: by mail-yb1-xb32.google.com with SMTP id m9so12367071ybo.5 for ; Thu, 01 Jul 2021 11:32:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kev009.com; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Im7Fp8N/9lKecAGFNhX2fWeGHfBZclm5W+RnT4iQiqw=; b=m/gOrBpZuFbnh27SL3Hvsvy/9yuVzxhXA3YTarsYDq54W12ynT1diISu92cn1u8FtB nETTJdPMFHwru0SbrFigELNbTEmDXm60zhW1iU6w4+5qCnKsrWnd4SXz0LWAm4A+8826 kUhLeiPiLrZUFPq8mw7/6iFLzU1IVJdqRHWjk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Im7Fp8N/9lKecAGFNhX2fWeGHfBZclm5W+RnT4iQiqw=; b=P0qrLRX5S7wscGMcoY6sm/BjaI3KsVA5sTzZEjh8o/BlZ3OGrRVmcT9BdoJT6lQ64d rHfkAUwFdcGRON0aY6Y3+BJpHMDNVaq1dnbb3oo2sf5kztgQnaVEDh/N6sxgp/LjKozQ 2SL6kPZNP/hIIWhUUkDoj+HMQcYYDC/NdWqFDqYOZGV53lM0OVcPfWkp04ytbeYUknrv /v63FMfpmUQQU1Hf6WlS/ynJmTiTOU7L1mR8Aml7PCaaFoUC2c1qEjPSx7f4XYNvRTdS OfEG9w3UYwxxu/btfc9PcCYWXCAZNGWMmBAqRJV8sP+MTuH8bf8igRUYuM+iFtWB2shT hQKA== X-Gm-Message-State: AOAM530azj4TX2cOWOOJ9cGN8Yfof/rsf+DxYqQMnuh14P9T/qAAh7ja hOrGx8l40acHxZXyv8/o2av5kQeknLBSpnjvFJ9pcw== X-Google-Smtp-Source: ABdhPJwQvSjrmqqQKSP7NUHzk8l8J0kMzJalBZOKZ4aKa99GI+py+KAsyjgJ6l2gUrVeM7ef8ESWtVYwzAZIDpdnxIA= X-Received: by 2002:a25:c7d1:: with SMTP id w200mr1455163ybe.455.1625164378202; Thu, 01 Jul 2021 11:32:58 -0700 (PDT) MIME-Version: 1.0 References: <202106211449.15LEnsxM086627@gitrepo.freebsd.org> In-Reply-To: <202106211449.15LEnsxM086627@gitrepo.freebsd.org> From: Kevin Bowling Date: Thu, 1 Jul 2021 11:32:46 -0700 Message-ID: Subject: Re: git: c6b2d024d7ee - main - Retore the vnet before returning an error. To: "George V. Neville-Neil" Cc: src-committers , "" , "dev-commits-src-main@FreeBSD.org" Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4GG6K755DHz4kCP X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; dkim=none (invalid DKIM record) header.d=kev009.com header.s=google header.b=m/gOrBpZ; dmarc=none; spf=pass (mx1.freebsd.org: domain of kevin.bowling@kev009.com designates 2607:f8b0:4864:20::b32 as permitted sender) smtp.mailfrom=kevin.bowling@kev009.com X-Spamd-Result: default: False [0.25 / 15.00]; TO_DN_EQ_ADDR_SOME(0.00)[]; ARC_NA(0.00)[]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36]; MIME_GOOD(-0.10)[text/plain]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-all@freebsd.org]; DMARC_NA(0.00)[kev009.com]; NEURAL_SPAM_MEDIUM(0.79)[0.786]; NEURAL_SPAM_SHORT(0.77)[0.769]; SPAMHAUS_ZRD(0.00)[2607:f8b0:4864:20::b32:from:127.0.2.255]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[kev009.com:~]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::b32:from]; R_DKIM_PERMFAIL(0.00)[kev009.com:s=google]; NEURAL_HAM_LONG(-1.00)[-1.000]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_DBL_DONT_QUERY_IPS(0.00)[2607:f8b0:4864:20::b32:from]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-all] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 18:33:00 -0000 Hi George, After the git transition we use the commit author field itself to communicate authorship. The obtained field should say Netapp, Inc. See section 9.14 https://docs.freebsd.org/en/articles/committers-guide/#commit-log-message Regards, Kevin On Mon, Jun 21, 2021 at 7:50 AM George V. Neville-Neil wrote: > > The branch main has been updated by gnn: > > URL: https://cgit.FreeBSD.org/src/commit/?id=c6b2d024d7eedbf32f52a17bc029c92f5a4d1a54 > > commit c6b2d024d7eedbf32f52a17bc029c92f5a4d1a54 > Author: George V. Neville-Neil > AuthorDate: 2021-06-21 14:46:20 +0000 > Commit: George V. Neville-Neil > CommitDate: 2021-06-21 14:46:20 +0000 > > Retore the vnet before returning an error. > > Obtained from: Kanndula, Dheeraj > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D30741 > --- > sys/net/if_vlan.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c > index bd3a5335a97f..39f767c2a603 100644 > --- a/sys/net/if_vlan.c > +++ b/sys/net/if_vlan.c > @@ -609,6 +609,7 @@ vlan_setmulti(struct ifnet *ifp) > mc = malloc(sizeof(struct vlan_mc_entry), M_VLAN, M_NOWAIT); > if (mc == NULL) { > IF_ADDR_WUNLOCK(ifp); > + CURVNET_RESTORE(); > return (ENOMEM); > } > bcopy(ifma->ifma_addr, &mc->mc_addr, ifma->ifma_addr->sa_len); > @@ -619,8 +620,10 @@ vlan_setmulti(struct ifnet *ifp) > CK_SLIST_FOREACH (mc, &sc->vlan_mc_listhead, mc_entries) { > error = if_addmulti(ifp_p, (struct sockaddr *)&mc->mc_addr, > NULL); > - if (error) > + if (error) { > + CURVNET_RESTORE(); > return (error); > + } > } > > CURVNET_RESTORE(); > _______________________________________________ > dev-commits-src-main@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main > To unsubscribe, send any mail to "dev-commits-src-main-unsubscribe@freebsd.org" From owner-dev-commits-src-all@freebsd.org Thu Jul 1 18:35:53 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9C70B650B4E; Thu, 1 Jul 2021 18:35:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG6NT45Zwz4kLL; Thu, 1 Jul 2021 18:35:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 75116253F9; Thu, 1 Jul 2021 18:35:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161IZrh9009201; Thu, 1 Jul 2021 18:35:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161IZrAt009200; Thu, 1 Jul 2021 18:35:53 GMT (envelope-from git) Date: Thu, 1 Jul 2021 18:35:53 GMT Message-Id: <202107011835.161IZrAt009200@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Marcin Wojtas Subject: git: 94287656264f - main - ofw_pci: fix probing for non-DT cases MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mw X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 94287656264fe1f984586220cb7fd2a2e6f89708 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 18:35:53 -0000 The branch main has been updated by mw: URL: https://cgit.FreeBSD.org/src/commit/?id=94287656264fe1f984586220cb7fd2a2e6f89708 commit 94287656264fe1f984586220cb7fd2a2e6f89708 Author: Kornel Duleba AuthorDate: 2021-07-01 18:27:41 +0000 Commit: Marcin Wojtas CommitDate: 2021-07-01 18:35:23 +0000 ofw_pci: fix probing for non-DT cases phandle_t is a uint32_t type, <= 0 comparison doesn't work with it as intended. This caused the ofw_pci code to attach to PCI bus on ACPI based systems. Since 3eae4e106ac7 ("Fix error value returned by ofw_bus_gen_get_node().") ofw subsystem can only return -1 for invalid nodes. Use that. MFC after: 4 weeks Reviewed by: mw Differential revision: https://reviews.freebsd.org/D30953 --- sys/dev/ofw/ofw_pci.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/ofw/ofw_pci.c b/sys/dev/ofw/ofw_pci.c index c7ed7c5c8fe9..7f7aad379ddc 100644 --- a/sys/dev/ofw/ofw_pci.c +++ b/sys/dev/ofw/ofw_pci.c @@ -77,7 +77,7 @@ ofw_pci_probe(device_t dev) device_t parent; parent = device_get_parent(dev); - if (ofw_bus_get_node(parent) <= 0) + if (ofw_bus_get_node(parent) == -1) return (ENXIO); device_set_desc(dev, "OFW PCI bus"); From owner-dev-commits-src-all@freebsd.org Thu Jul 1 19:35:20 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3E76B651CA1; Thu, 1 Jul 2021 19:35: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 4GG7j40mRDz4q2s; Thu, 1 Jul 2021 19:35: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 0233126584; Thu, 1 Jul 2021 19:35: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 161JZJSQ088686; Thu, 1 Jul 2021 19:35:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161JZJ1B088685; Thu, 1 Jul 2021 19:35:19 GMT (envelope-from git) Date: Thu, 1 Jul 2021 19:35:19 GMT Message-Id: <202107011935.161JZJ1B088685@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 8f76eebce424 - main - dummynet: fix sysctls MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8f76eebce424de064f65fec5cdd105446a2de3bd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 19:35:20 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8f76eebce424de064f65fec5cdd105446a2de3bd commit 8f76eebce424de064f65fec5cdd105446a2de3bd Author: Kristof Provost AuthorDate: 2021-07-01 07:42:34 +0000 Commit: Kristof Provost CommitDate: 2021-07-01 19:34:08 +0000 dummynet: fix sysctls The sysctl nodes which use V_dn_cfg must be marked as CTLFLAG_VNET so that we use the correct per-vnet offset PR: 256819 Reviewed by: donner MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30974 --- sys/netpfil/ipfw/ip_dn_io.c | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/sys/netpfil/ipfw/ip_dn_io.c b/sys/netpfil/ipfw/ip_dn_io.c index 39bea3eb99dd..11357b44e05e 100644 --- a/sys/netpfil/ipfw/ip_dn_io.c +++ b/sys/netpfil/ipfw/ip_dn_io.c @@ -169,55 +169,55 @@ SYSCTL_PROC(_net_inet_ip_dummynet, OID_AUTO, pipe_byte_limit, 0, 0, sysctl_limits, "L", "Upper limit in bytes for pipe queue."); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, io_fast, - CTLFLAG_RW, DC(io_fast), 0, "Enable fast dummynet io."); + CTLFLAG_RW | CTLFLAG_VNET, DC(io_fast), 0, "Enable fast dummynet io."); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, debug, - CTLFLAG_RW, DC(debug), 0, "Dummynet debug level"); + CTLFLAG_RW | CTLFLAG_VNET, DC(debug), 0, "Dummynet debug level"); /* RED parameters */ SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, red_lookup_depth, - CTLFLAG_RD, DC(red_lookup_depth), 0, "Depth of RED lookup table"); + CTLFLAG_RD | CTLFLAG_VNET, DC(red_lookup_depth), 0, "Depth of RED lookup table"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, red_avg_pkt_size, - CTLFLAG_RD, DC(red_avg_pkt_size), 0, "RED Medium packet size"); + CTLFLAG_RD | CTLFLAG_VNET, DC(red_avg_pkt_size), 0, "RED Medium packet size"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, red_max_pkt_size, - CTLFLAG_RD, DC(red_max_pkt_size), 0, "RED Max packet size"); + CTLFLAG_RD | CTLFLAG_VNET, DC(red_max_pkt_size), 0, "RED Max packet size"); /* time adjustment */ SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, tick_delta, - CTLFLAG_RD, DC(tick_delta), 0, "Last vs standard tick difference (usec)."); + CTLFLAG_RD | CTLFLAG_VNET, DC(tick_delta), 0, "Last vs standard tick difference (usec)."); SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, tick_delta_sum, - CTLFLAG_RD, DC(tick_delta_sum), 0, "Accumulated tick difference (usec)."); + CTLFLAG_RD | CTLFLAG_VNET, DC(tick_delta_sum), 0, "Accumulated tick difference (usec)."); SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, tick_adjustment, - CTLFLAG_RD, DC(tick_adjustment), 0, "Tick adjustments done."); + CTLFLAG_RD | CTLFLAG_VNET, DC(tick_adjustment), 0, "Tick adjustments done."); SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, tick_diff, - CTLFLAG_RD, DC(tick_diff), 0, + CTLFLAG_RD | CTLFLAG_VNET, DC(tick_diff), 0, "Adjusted vs non-adjusted curr_time difference (ticks)."); SYSCTL_LONG(_net_inet_ip_dummynet, OID_AUTO, tick_lost, - CTLFLAG_RD, DC(tick_lost), 0, + CTLFLAG_RD | CTLFLAG_VNET, DC(tick_lost), 0, "Number of ticks coalesced by dummynet taskqueue."); /* Drain parameters */ SYSCTL_UINT(_net_inet_ip_dummynet, OID_AUTO, expire, - CTLFLAG_RW, DC(expire), 0, "Expire empty queues/pipes"); + CTLFLAG_RW | CTLFLAG_VNET, DC(expire), 0, "Expire empty queues/pipes"); SYSCTL_UINT(_net_inet_ip_dummynet, OID_AUTO, expire_cycle, - CTLFLAG_RD, DC(expire_cycle), 0, "Expire cycle for queues/pipes"); + CTLFLAG_RD | CTLFLAG_VNET, DC(expire_cycle), 0, "Expire cycle for queues/pipes"); /* statistics */ SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, schk_count, - CTLFLAG_RD, DC(schk_count), 0, "Number of schedulers"); + CTLFLAG_RD | CTLFLAG_VNET, DC(schk_count), 0, "Number of schedulers"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, si_count, - CTLFLAG_RD, DC(si_count), 0, "Number of scheduler instances"); + CTLFLAG_RD | CTLFLAG_VNET, DC(si_count), 0, "Number of scheduler instances"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, fsk_count, - CTLFLAG_RD, DC(fsk_count), 0, "Number of flowsets"); + CTLFLAG_RD | CTLFLAG_VNET, DC(fsk_count), 0, "Number of flowsets"); SYSCTL_INT(_net_inet_ip_dummynet, OID_AUTO, queue_count, - CTLFLAG_RD, DC(queue_count), 0, "Number of queues"); + CTLFLAG_RD | CTLFLAG_VNET, DC(queue_count), 0, "Number of queues"); SYSCTL_ULONG(_net_inet_ip_dummynet, OID_AUTO, io_pkt, - CTLFLAG_RD, DC(io_pkt), 0, + CTLFLAG_RD | CTLFLAG_VNET, DC(io_pkt), 0, "Number of packets passed to dummynet."); SYSCTL_ULONG(_net_inet_ip_dummynet, OID_AUTO, io_pkt_fast, - CTLFLAG_RD, DC(io_pkt_fast), 0, + CTLFLAG_RD | CTLFLAG_VNET, DC(io_pkt_fast), 0, "Number of packets bypassed dummynet scheduler."); SYSCTL_ULONG(_net_inet_ip_dummynet, OID_AUTO, io_pkt_drop, - CTLFLAG_RD, DC(io_pkt_drop), 0, + CTLFLAG_RD | CTLFLAG_VNET, DC(io_pkt_drop), 0, "Number of packets dropped by dummynet."); #undef DC SYSEND From owner-dev-commits-src-all@freebsd.org Thu Jul 1 19:35:21 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47592651CA6; Thu, 1 Jul 2021 19:35: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 4GG7j51TC9z4plH; Thu, 1 Jul 2021 19:35: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 1B65026585; Thu, 1 Jul 2021 19:35:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161JZLKr088710; Thu, 1 Jul 2021 19:35:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161JZLGi088709; Thu, 1 Jul 2021 19:35:21 GMT (envelope-from git) Date: Thu, 1 Jul 2021 19:35:21 GMT Message-Id: <202107011935.161JZLGi088709@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 8923ea6c867f - main - ftp-proxy: Revert incorrect migration to libpfctl MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8923ea6c867fd75b08b76883ec122c429a4018f9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 19:35:21 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8923ea6c867fd75b08b76883ec122c429a4018f9 commit 8923ea6c867fd75b08b76883ec122c429a4018f9 Author: Kristof Provost AuthorDate: 2021-07-01 15:16:10 +0000 Commit: Kristof Provost CommitDate: 2021-07-01 19:34:40 +0000 ftp-proxy: Revert incorrect migration to libpfctl libpfctl supports creating rules, but not (yet) adding addresses to a pool. Adding addresses certainly does not work through adding a rule. PR: 256917 MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- contrib/pf/ftp-proxy/filter.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/contrib/pf/ftp-proxy/filter.c b/contrib/pf/ftp-proxy/filter.c index dad6324808bc..e4787985e99f 100644 --- a/contrib/pf/ftp-proxy/filter.c +++ b/contrib/pf/ftp-proxy/filter.c @@ -103,8 +103,7 @@ add_nat(u_int32_t id, struct sockaddr *src, struct sockaddr *dst, &satosin6(nat)->sin6_addr.s6_addr, 16); memset(&pfp.addr.addr.v.a.mask.addr8, 255, 16); } - if (pfctl_add_rule(dev, &pfrule, pfanchor, pfanchor_call, - pfticket, pfpool_ticket)) + if (ioctl(dev, DIOCADDADDR, &pfp) == -1) return (-1); pfrule.rpool.proxy_port[0] = nat_range_low; @@ -138,8 +137,7 @@ add_rdr(u_int32_t id, struct sockaddr *src, struct sockaddr *dst, &satosin6(rdr)->sin6_addr.s6_addr, 16); memset(&pfp.addr.addr.v.a.mask.addr8, 255, 16); } - if (pfctl_add_rule(dev, &pfrule, pfanchor, pfanchor_call, - pfticket, pfpool_ticket)) + if (ioctl(dev, DIOCADDADDR, &pfp) == -1) return (-1); pfrule.rpool.proxy_port[0] = rdr_port; From owner-dev-commits-src-all@freebsd.org Thu Jul 1 19:35:22 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id AF19A6514E5; Thu, 1 Jul 2021 19:35:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG7j63vJHz4px6; Thu, 1 Jul 2021 19:35: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 408862623A; Thu, 1 Jul 2021 19:35: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 161JZMZD088740; Thu, 1 Jul 2021 19:35:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161JZMR0088739; Thu, 1 Jul 2021 19:35:22 GMT (envelope-from git) Date: Thu, 1 Jul 2021 19:35:22 GMT Message-Id: <202107011935.161JZMR0088739@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: dd82fd354302 - main - pf tests: ftp-proxy test MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd82fd3543022017b84007ac1a0d45fc683f9850 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 19:35:22 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=dd82fd3543022017b84007ac1a0d45fc683f9850 commit dd82fd3543022017b84007ac1a0d45fc683f9850 Author: Kristof Provost AuthorDate: 2021-07-01 15:15:36 +0000 Commit: Kristof Provost CommitDate: 2021-07-01 19:34:40 +0000 pf tests: ftp-proxy test Basic test case for ftp-proxy PR: 256917 MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/proxy.sh | 95 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index b43a0a5a77b3..8bbc498f38c5 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -18,6 +18,7 @@ ATF_TESTS_SH+= altq \ nat \ pass_block \ pfsync \ + proxy \ rdr \ route_to \ rules_counter \ diff --git a/tests/sys/netpfil/pf/proxy.sh b/tests/sys/netpfil/pf/proxy.sh new file mode 100644 index 000000000000..bb5286103e85 --- /dev/null +++ b/tests/sys/netpfil/pf/proxy.sh @@ -0,0 +1,95 @@ +# $FreeBSD$ +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +. $(atf_get_srcdir)/utils.subr + +common_dir=$(atf_get_srcdir)/../common + +atf_test_case "ftp" "cleanup" +ftp_head() +{ + atf_set descr 'Test ftp-proxy' + atf_set require.user root + atf_set require.progs twistd +} + +ftp_body() +{ + pft_init + + epair_client=$(vnet_mkepair) + epair_link=$(vnet_mkepair) + + ifconfig ${epair_client}a 192.0.2.2/24 up + route add -net 198.51.100.0/24 192.0.2.1 + + vnet_mkjail fwd ${epair_client}b ${epair_link}a + jexec fwd ifconfig ${epair_client}b 192.0.2.1/24 up + jexec fwd ifconfig ${epair_link}a 198.51.100.1/24 up + jexec fwd ifconfig lo0 127.0.0.1/8 up + jexec fwd sysctl net.inet.ip.forwarding=1 + + vnet_mkjail srv ${epair_link}b + jexec srv ifconfig ${epair_link}b 198.51.100.2/24 up + jexec srv route add default 198.51.100.1 + + # Start FTP server in srv + jexec srv twistd ftp -r `pwd` -p 21 + + # Sanity check + atf_check -s exit:0 -o ignore ping -c 1 198.51.100.2 + + jexec fwd pfctl -e + pft_set_rules fwd \ + "nat on ${epair_link}a inet from 192.0.2.0/24 to any -> (${epair_link}a)" \ + "nat-anchor \"ftp-proxy/*\"" \ + "rdr-anchor \"ftp-proxy/*\"" \ + "rdr pass on ${epair_client}b proto tcp from 192.0.2.0/24 to any port 21 -> 127.0.0.1 port 8021" \ + "anchor \"ftp-proxy/*\"" \ + "pass out proto tcp from 127.0.0.1 to any port 21" + jexec fwd /usr/sbin/ftp-proxy + + # Create a dummy file to download + echo 'foo' > remote.txt + echo 'get remote.txt local.txt' | ftp -a 198.51.100.2 + + # Compare the downloaded file to the original + if ! diff -q local.txt remote.txt; + then + atf_fail 'Failed to retrieve file' + fi +} + +ftp_cleanup() +{ + pft_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "ftp" +} From owner-dev-commits-src-all@freebsd.org Thu Jul 1 19:37:08 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id DF631651B6E; Thu, 1 Jul 2021 19:37:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GG7l85b4Xz4qM9; Thu, 1 Jul 2021 19:37:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A924D264BA; Thu, 1 Jul 2021 19:37:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161Jb89B089024; Thu, 1 Jul 2021 19:37:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161Jb85H089023; Thu, 1 Jul 2021 19:37:08 GMT (envelope-from git) Date: Thu, 1 Jul 2021 19:37:08 GMT Message-Id: <202107011937.161Jb85H089023@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Motin Subject: git: fa3d57c25610 - main - mrsas(4): Report more correct maximum I/O size. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mav X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fa3d57c256104649217b5022947de9c1c59a326e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 19:37:09 -0000 The branch main has been updated by mav: URL: https://cgit.FreeBSD.org/src/commit/?id=fa3d57c256104649217b5022947de9c1c59a326e commit fa3d57c256104649217b5022947de9c1c59a326e Author: Alexander Motin AuthorDate: 2021-07-01 19:28:55 +0000 Commit: Alexander Motin CommitDate: 2021-07-01 19:37:01 +0000 mrsas(4): Report more correct maximum I/O size. Subtract one SGE for the case of misaligned address. Also take into account maximum number of sectors reported by firmware, that gives nicer 256KB limit instead of 276KB calculated from the SGE limit. While there, remove number of I/O size checks, duplicating what is already checked by CAM and busdma(9). MFC after: 1 month Sponsored by: iXsystems, Inc. --- sys/dev/mrsas/mrsas.c | 11 ++++++----- sys/dev/mrsas/mrsas_cam.c | 36 +----------------------------------- 2 files changed, 7 insertions(+), 40 deletions(-) diff --git a/sys/dev/mrsas/mrsas.c b/sys/dev/mrsas/mrsas.c index 01173387c8d4..8814642fccd0 100644 --- a/sys/dev/mrsas/mrsas.c +++ b/sys/dev/mrsas/mrsas.c @@ -1914,15 +1914,16 @@ mrsas_alloc_mem(struct mrsas_softc *sc) /* * Allocate parent DMA tag */ - if (bus_dma_tag_create(NULL, /* parent */ + if (bus_dma_tag_create( + bus_get_dma_tag(sc->mrsas_dev), /* parent */ 1, /* alignment */ 0, /* boundary */ BUS_SPACE_MAXADDR, /* lowaddr */ BUS_SPACE_MAXADDR, /* highaddr */ NULL, NULL, /* filter, filterarg */ - maxphys, /* maxsize */ - sc->max_num_sge, /* nsegments */ - maxphys, /* maxsegsize */ + BUS_SPACE_MAXSIZE, /* maxsize */ + BUS_SPACE_UNRESTRICTED, /* nsegments */ + BUS_SPACE_MAXSIZE, /* maxsegsize */ 0, /* flags */ NULL, NULL, /* lockfunc, lockarg */ &sc->mrsas_parent_tag /* tag */ @@ -2533,7 +2534,7 @@ mrsas_init_fw(struct mrsas_softc *sc) sc->ctrl_info->max_strips_per_io; max_sectors_2 = sc->ctrl_info->max_request_size; tmp_sectors = min(max_sectors_1, max_sectors_2); - sc->max_sectors_per_req = sc->max_num_sge * MRSAS_PAGE_SIZE / 512; + sc->max_sectors_per_req = (sc->max_num_sge - 1) * MRSAS_PAGE_SIZE / 512; if (tmp_sectors && (sc->max_sectors_per_req > tmp_sectors)) sc->max_sectors_per_req = tmp_sectors; diff --git a/sys/dev/mrsas/mrsas_cam.c b/sys/dev/mrsas/mrsas_cam.c index 3557782dae49..85dacdb9f306 100644 --- a/sys/dev/mrsas/mrsas_cam.c +++ b/sys/dev/mrsas/mrsas_cam.c @@ -369,7 +369,7 @@ mrsas_action(struct cam_sim *sim, union ccb *ccb) else ccb->cpi.max_target = MRSAS_MAX_LD_IDS - 1; #if (__FreeBSD_version > 704000) - ccb->cpi.maxio = sc->max_num_sge * MRSAS_PAGE_SIZE; + ccb->cpi.maxio = sc->max_sectors_per_req * 512; #endif ccb->ccb_h.status = CAM_REQ_CMP; xpt_done(ccb); @@ -513,21 +513,11 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim *sim, ccb_h->status = CAM_REQ_INVALID; goto done; case CAM_DATA_VADDR: - if (csio->dxfer_len > (sc->max_num_sge * MRSAS_PAGE_SIZE)) { - mrsas_release_mpt_cmd(cmd); - ccb_h->status = CAM_REQ_TOO_BIG; - goto done; - } cmd->length = csio->dxfer_len; if (cmd->length) cmd->data = csio->data_ptr; break; case CAM_DATA_BIO: - if (csio->dxfer_len > (sc->max_num_sge * MRSAS_PAGE_SIZE)) { - mrsas_release_mpt_cmd(cmd); - ccb_h->status = CAM_REQ_TOO_BIG; - goto done; - } cmd->length = csio->dxfer_len; if (cmd->length) cmd->data = csio->data_ptr; @@ -539,11 +529,6 @@ mrsas_startio(struct mrsas_softc *sc, struct cam_sim *sim, #else if (!(ccb_h->flags & CAM_DATA_PHYS)) { /* Virtual data address */ if (!(ccb_h->flags & CAM_SCATTER_VALID)) { - if (csio->dxfer_len > (sc->max_num_sge * MRSAS_PAGE_SIZE)) { - mrsas_release_mpt_cmd(cmd); - ccb_h->status = CAM_REQ_TOO_BIG; - goto done; - } cmd->length = csio->dxfer_len; if (cmd->length) cmd->data = csio->data_ptr; @@ -867,11 +852,6 @@ mrsas_build_ldio_rw(struct mrsas_softc *sc, struct mrsas_mpt_cmd *cmd, io_request->DataLength = htole32(cmd->length); if (mrsas_map_request(sc, cmd, ccb) == SUCCESS) { - if (cmd->sge_count > sc->max_num_sge) { - device_printf(sc->mrsas_dev, "Error: sge_count (0x%x) exceeds" - "max (0x%x) allowed\n", cmd->sge_count, sc->max_num_sge); - return (FAIL); - } if (sc->is_ventura || sc->is_aero) io_request->RaidContext.raid_context_g35.numSGE = cmd->sge_count; else { @@ -1234,11 +1214,6 @@ mrsas_build_ldio_nonrw(struct mrsas_softc *sc, struct mrsas_mpt_cmd *cmd, io_request->DataLength = cmd->length; if (mrsas_map_request(sc, cmd, ccb) == SUCCESS) { - if (cmd->sge_count > sc->max_num_sge) { - device_printf(sc->mrsas_dev, "Error: sge_count (0x%x) exceeds" - "max (0x%x) allowed\n", cmd->sge_count, sc->max_num_sge); - return (1); - } if (sc->is_ventura || sc->is_aero) io_request->RaidContext.raid_context_g35.numSGE = cmd->sge_count; else { @@ -1364,11 +1339,6 @@ mrsas_build_syspdio(struct mrsas_softc *sc, struct mrsas_mpt_cmd *cmd, io_request->DataLength = htole32(cmd->length); if (mrsas_map_request(sc, cmd, ccb) == SUCCESS) { - if (cmd->sge_count > sc->max_num_sge) { - device_printf(sc->mrsas_dev, "Error: sge_count (0x%x) exceeds" - "max (0x%x) allowed\n", cmd->sge_count, sc->max_num_sge); - return (1); - } if (sc->is_ventura || sc->is_aero) io_request->RaidContext.raid_context_g35.numSGE = cmd->sge_count; else { @@ -1714,10 +1684,6 @@ mrsas_data_load_cb(void *arg, bus_dma_segment_t *segs, int nseg, int error) if (cmd->flags & MRSAS_DIR_OUT) bus_dmamap_sync(cmd->sc->data_tag, cmd->data_dmamap, BUS_DMASYNC_PREWRITE); - if (nseg > sc->max_num_sge) { - device_printf(sc->mrsas_dev, "SGE count is too large or 0.\n"); - return; - } /* Check for whether PRPs should be built or IEEE SGLs*/ if ((cmd->io_request->IoFlags & MPI25_SAS_DEVICE0_FLAGS_ENABLED_FAST_PATH) && From owner-dev-commits-src-all@freebsd.org Thu Jul 1 21:31:50 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8FB266529E3; Thu, 1 Jul 2021 21:31: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 4GGBHV3Yspz3GcP; Thu, 1 Jul 2021 21:31: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 62C1F27DCE; Thu, 1 Jul 2021 21:31: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 161LVoaM046533; Thu, 1 Jul 2021 21:31:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161LVoHh046532; Thu, 1 Jul 2021 21:31:50 GMT (envelope-from git) Date: Thu, 1 Jul 2021 21:31:50 GMT Message-Id: <202107012131.161LVoHh046532@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 858937bea459 - main - pfctl: cache getprotobynumber results MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 858937bea4599d254a97ee6321683f8629604e15 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 21:31:50 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=858937bea4599d254a97ee6321683f8629604e15 commit 858937bea4599d254a97ee6321683f8629604e15 Author: Mateusz Guzik AuthorDate: 2021-07-01 19:25:43 +0000 Commit: Mateusz Guzik CommitDate: 2021-07-01 21:31:45 +0000 pfctl: cache getprotobynumber results As for example pfctl -ss keeps calling it, it saves a lot of overhead from elided parsing of /etc/nsswitch.conf and /etc/protocols. Sample result when running a pre-nvlist binary with nfs root and dumping 7 mln states: before: 24.817u 62.993s 1:28.52 99.1% after: 8.064u 1.117s 0:18.87 48.5% Idea by Jim Thompson Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sbin/pfctl/parse.y | 8 ++++---- sbin/pfctl/pf_print_state.c | 6 +++--- sbin/pfctl/pfctl.c | 43 +++++++++++++++++++++++++++++++++++++++++++ sbin/pfctl/pfctl.h | 2 ++ sbin/pfctl/pfctl_parser.c | 6 +++--- 5 files changed, 55 insertions(+), 10 deletions(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 4448a8255ce1..acd90e280b53 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -5017,13 +5017,13 @@ expand_label_port(const char *name, char *label, size_t len, void expand_label_proto(const char *name, char *label, size_t len, u_int8_t proto) { - struct protoent *pe; + const char *protoname; char n[4]; if (strstr(label, name) != NULL) { - pe = getprotobynumber(proto); - if (pe != NULL) - expand_label_str(label, len, name, pe->p_name); + protoname = pfctl_proto2name(proto); + if (protoname != NULL) + expand_label_str(label, len, name, protoname); else { snprintf(n, sizeof(n), "%u", proto); expand_label_str(label, len, name, n); diff --git a/sbin/pfctl/pf_print_state.c b/sbin/pfctl/pf_print_state.c index b1f0079154cf..b66a296d6080 100644 --- a/sbin/pfctl/pf_print_state.c +++ b/sbin/pfctl/pf_print_state.c @@ -211,7 +211,7 @@ print_state(struct pfctl_state *s, int opts) { struct pfctl_state_peer *src, *dst; struct pfctl_state_key *key, *sk, *nk; - struct protoent *p; + const char *protoname; int min, sec; sa_family_t af; uint8_t proto; @@ -243,8 +243,8 @@ print_state(struct pfctl_state *s, int opts) sk->port[1] = nk->port[1]; } printf("%s ", s->ifname); - if ((p = getprotobynumber(proto)) != NULL) - printf("%s ", p->p_name); + if ((protoname = pfctl_proto2name(proto)) != NULL) + printf("%s ", protoname); else printf("%u ", proto); diff --git a/sbin/pfctl/pfctl.c b/sbin/pfctl/pfctl.c index f82d75198d61..14b7f3a01657 100644 --- a/sbin/pfctl/pfctl.c +++ b/sbin/pfctl/pfctl.c @@ -254,6 +254,49 @@ usage(void) exit(1); } +/* + * Cache protocol number to name translations. + * + * Translation is performed a lot e.g., when dumping states and + * getprotobynumber is incredibly expensive. + * + * Note from the getprotobynumber(3) manpage: + * + * These functions use a thread-specific data space; if the data is needed + * for future use, it should be copied before any subsequent calls overwrite + * it. Only the Internet protocols are currently understood. + * + * + * Consequently we only cache the name and strdup it for safety. + * + * At the time of writing this comment the last entry in /etc/protocols is: + * divert 258 DIVERT # Divert pseudo-protocol [non IANA] + */ +const char * +pfctl_proto2name(int proto) +{ + static const char *pfctl_proto_cache[259]; + struct protoent *p; + + if (proto >= nitems(pfctl_proto_cache)) { + p = getprotobynumber(proto); + if (p == NULL) { + return (NULL); + } + return (p->p_name); + } + + if (pfctl_proto_cache[proto] == NULL) { + p = getprotobynumber(proto); + if (p == NULL) { + return (NULL); + } + pfctl_proto_cache[proto] = strdup(p->p_name); + } + + return (pfctl_proto_cache[proto]); +} + int pfctl_enable(int dev, int opts) { diff --git a/sbin/pfctl/pfctl.h b/sbin/pfctl/pfctl.h index f8ff5012e01b..80ef184fa90f 100644 --- a/sbin/pfctl/pfctl.h +++ b/sbin/pfctl/pfctl.h @@ -138,4 +138,6 @@ void pf_remove_if_empty_ruleset(struct pfctl_ruleset *); struct pfctl_ruleset *pf_find_ruleset(const char *); struct pfctl_ruleset *pf_find_or_create_ruleset(const char *); +const char *pfctl_proto2name(int); + #endif /* _PFCTL_H_ */ diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index ce460ab691ca..b4a1cde967bd 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -812,10 +812,10 @@ print_rule(struct pfctl_rule *r, const char *anchor_call, int verbose, int numer printf(" inet6"); } if (r->proto) { - struct protoent *p; + const char *protoname; - if ((p = getprotobynumber(r->proto)) != NULL) - printf(" proto %s", p->p_name); + if ((protoname = pfctl_proto2name(r->proto)) != NULL) + printf(" proto %s", protoname); else printf(" proto %u", r->proto); } From owner-dev-commits-src-all@freebsd.org Thu Jul 1 21:54:35 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1FB60653C01; Thu, 1 Jul 2021 21:54: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 4GGBnl0JkPz3JvP; Thu, 1 Jul 2021 21:54: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 DFAC3581; Thu, 1 Jul 2021 21:54:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161LsYuj075391; Thu, 1 Jul 2021 21:54:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161LsYwf075390; Thu, 1 Jul 2021 21:54:34 GMT (envelope-from git) Date: Thu, 1 Jul 2021 21:54:34 GMT Message-Id: <202107012154.161LsYwf075390@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: cd4346a0e4d8 - main - cd(9): correct minor typo in manpage. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd4346a0e4d8cd033514edde4011160c4539857b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 21:54:35 -0000 The branch main has been updated by ceri (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=cd4346a0e4d8cd033514edde4011160c4539857b commit cd4346a0e4d8cd033514edde4011160c4539857b Author: Ceri Davies AuthorDate: 2021-07-01 21:10:34 +0000 Commit: Ceri Davies CommitDate: 2021-07-01 21:54:25 +0000 cd(9): correct minor typo in manpage. --- share/man/man9/cd.9 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/man/man9/cd.9 b/share/man/man9/cd.9 index 1beb518a86c3..44c6b7df4a01 100644 --- a/share/man/man9/cd.9 +++ b/share/man/man9/cd.9 @@ -51,7 +51,7 @@ device can have different interpretations of the .Tn SCSI spec. This can lead to drives requiring special handling in the driver. -The following is a list of quirks that the driver recognize. +The following is a list of quirks that the driver recognizes. .Bl -tag -width CD_Q_BCD_TRACKS .It Dv CD_Q_NO_TOUCH This flag tells the driver not to probe the drive at attach time to see if From owner-dev-commits-src-all@freebsd.org Thu Jul 1 21:54:36 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5311365375D; Thu, 1 Jul 2021 21:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGBnm17FGz3Jmw; Thu, 1 Jul 2021 21:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 01CC6327; Thu, 1 Jul 2021 21:54:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161LsZm7075415; Thu, 1 Jul 2021 21:54:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161LsZL2075414; Thu, 1 Jul 2021 21:54:35 GMT (envelope-from git) Date: Thu, 1 Jul 2021 21:54:35 GMT Message-Id: <202107012154.161LsZL2075414@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: 40944510db1e - main - rc.conf.5: add .Xr to firewall(7), growfs(7), and tuning(7) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 40944510db1e9f4c9cf758087977010ee7c36199 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 21:54:36 -0000 The branch main has been updated by ceri (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=40944510db1e9f4c9cf758087977010ee7c36199 commit 40944510db1e9f4c9cf758087977010ee7c36199 Author: Ceri Davies AuthorDate: 2021-07-01 21:35:14 +0000 Commit: Ceri Davies CommitDate: 2021-07-01 21:54:26 +0000 rc.conf.5: add .Xr to firewall(7), growfs(7), and tuning(7) --- share/man/man5/rc.conf.5 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index bf9289f30417..d32a96b706ec 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -24,7 +24,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 18, 2021 +.Dd July 1, 2021 .Dt RC.CONF 5 .Os .Sh NAME @@ -4618,7 +4618,10 @@ it will be made permanently active. .Xr motd 5 , .Xr newsyslog.conf 5 , .Xr pf.conf 5 , +.Xr firewall 7 , +.Xr growfs 7 , .Xr security 7 , +.Xr tuning 7 , .Xr accton 8 , .Xr amd 8 , .Xr apm 8 , From owner-dev-commits-src-all@freebsd.org Thu Jul 1 21:54:37 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B4726653C80; Thu, 1 Jul 2021 21:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGBnn2mZSz3JvW; Thu, 1 Jul 2021 21:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 24B87582; Thu, 1 Jul 2021 21:54:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 161LsbOc075439; Thu, 1 Jul 2021 21:54:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 161LsbqN075438; Thu, 1 Jul 2021 21:54:37 GMT (envelope-from git) Date: Thu, 1 Jul 2021 21:54:37 GMT Message-Id: <202107012154.161LsbqN075438@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: 2ce58512957e - main - rc.conf.5: -Tlint fixes. MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2ce58512957ec373abfb71712687d7e7b6abea82 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Jul 2021 21:54:37 -0000 The branch main has been updated by ceri (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=2ce58512957ec373abfb71712687d7e7b6abea82 commit 2ce58512957ec373abfb71712687d7e7b6abea82 Author: Ceri Davies AuthorDate: 2021-07-01 21:51:37 +0000 Commit: Ceri Davies CommitDate: 2021-07-01 21:54:26 +0000 rc.conf.5: -Tlint fixes. --- share/man/man5/rc.conf.5 | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/share/man/man5/rc.conf.5 b/share/man/man5/rc.conf.5 index d32a96b706ec..5692228c4db5 100644 --- a/share/man/man5/rc.conf.5 +++ b/share/man/man5/rc.conf.5 @@ -1391,7 +1391,7 @@ ifconfig_em0_aliases="\\ It also supports CIDR notation. .Pp If the -.Pa /etc/start_if. Ns Aq Ar interface +.Pa /etc/start_if . Ns Aq Ar interface file is present, it is read and executed by the .Xr sh 1 interpreter @@ -1517,7 +1517,7 @@ will use the settings from Finally, you can add .Xr ifconfig 8 options in this variable, in addition to the -.Pa /etc/start_if. Ns Aq Ar interface +.Pa /etc/start_if . Ns Aq Ar interface file. For instance, to configure an .Xr ath 4 @@ -1887,16 +1887,16 @@ The value of this variable is used to configure the link layer of the tunnel using the .Cm tunnel option to -.Xr ifconfig . +.Xr ifconfig 8 . Additionally, this option ensures that each listed interface is created via the .Cm create option to -.Xr ifconfig +.Xr ifconfig 8 before attempting to configure it. .Pp For example, configure two -.Xr gif +.Xr gif 4 interfaces with: .Bd -literal gif_interfaces="gif0 gif1" @@ -3896,7 +3896,7 @@ For backward compatibility, when per-jail configuration variables are defined, .Xr jail 8 configuration files are created as -.Pa /var/run/jail. Ns Ao Ar jname Ac Ns Pa .conf +.Pa /var/run/jail . Ns Ao Ar jname Ac Ns Pa .conf and used. .Pp The following per-jail parameters are handled by @@ -4593,7 +4593,6 @@ it will be made permanently active. .Xr gdb 1 , .Xr info 1 , .Xr kbdcontrol 1 , -.Xr makewhatis 1 , .Xr sh 1 , .Xr vi 1 , .Xr vidcontrol 1 , @@ -4645,6 +4644,7 @@ it will be made permanently active. .Xr kldxref 8 , .Xr loader 8 , .Xr lpd 8 , +.Xr makewhatis 8 , .Xr mdconfig 8 , .Xr mdmfs 8 , .Xr mixer 8 , From owner-dev-commits-src-all@freebsd.org Fri Jul 2 00:29:26 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id BEC79657BE3; Fri, 2 Jul 2021 00:29:26 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: from relay10.mail.gandi.net (relay10.mail.gandi.net [217.70.178.230]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGGDQ2MGlz3nnd; Fri, 2 Jul 2021 00:29:25 +0000 (UTC) (envelope-from gnn@freebsd.org) Received: (Authenticated sender: gnn@neville-neil.com) by relay10.mail.gandi.net (Postfix) with ESMTPSA id 55A6A240004; Fri, 2 Jul 2021 00:29:21 +0000 (UTC) From: George Neville-Neil To: Kevin Bowling Cc: src-committers , dev-commits-src-all@freebsd.org, "dev-commits-src-main@FreeBSD.org" Subject: Re: git: c6b2d024d7ee - main - Retore the vnet before returning an error. Date: Thu, 01 Jul 2021 17:29:17 -0700 X-Mailer: MailMate (1.14r5798) Message-ID: <296A20BE-34D2-400F-944E-306FC19B6B84@freebsd.org> In-Reply-To: References: <202106211449.15LEnsxM086627@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4GGGDQ2MGlz3nnd X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 00:29:26 -0000 Good to know. Thanks, George On 1 Jul 2021, at 11:32, Kevin Bowling wrote: > Hi George, > > After the git transition we use the commit author field itself to > communicate authorship. The obtained field should say Netapp, Inc. > See section 9.14 > https://docs.freebsd.org/en/articles/committers-guide/#commit-log-messa= ge > > Regards, > Kevin > > On Mon, Jun 21, 2021 at 7:50 AM George V. Neville-Neil = > wrote: >> >> The branch main has been updated by gnn: >> >> URL: = >> https://cgit.FreeBSD.org/src/commit/?id=3Dc6b2d024d7eedbf32f52a17bc029= c92f5a4d1a54 >> >> commit c6b2d024d7eedbf32f52a17bc029c92f5a4d1a54 >> Author: George V. Neville-Neil >> AuthorDate: 2021-06-21 14:46:20 +0000 >> Commit: George V. Neville-Neil >> CommitDate: 2021-06-21 14:46:20 +0000 >> >> Retore the vnet before returning an error. >> >> Obtained from: Kanndula, Dheeraj >> MFC after: 2 weeks >> Differential Revision: https://reviews.freebsd.org/D30741 >> --- >> sys/net/if_vlan.c | 5 ++++- >> 1 file changed, 4 insertions(+), 1 deletion(-) >> >> diff --git a/sys/net/if_vlan.c b/sys/net/if_vlan.c >> index bd3a5335a97f..39f767c2a603 100644 >> --- a/sys/net/if_vlan.c >> +++ b/sys/net/if_vlan.c >> @@ -609,6 +609,7 @@ vlan_setmulti(struct ifnet *ifp) >> mc =3D malloc(sizeof(struct vlan_mc_entry), M_VLAN, = >> M_NOWAIT); >> if (mc =3D=3D NULL) { >> IF_ADDR_WUNLOCK(ifp); >> + CURVNET_RESTORE(); >> return (ENOMEM); >> } >> bcopy(ifma->ifma_addr, &mc->mc_addr, = >> ifma->ifma_addr->sa_len); >> @@ -619,8 +620,10 @@ vlan_setmulti(struct ifnet *ifp) >> CK_SLIST_FOREACH (mc, &sc->vlan_mc_listhead, mc_entries) { >> error =3D if_addmulti(ifp_p, (struct sockaddr = >> *)&mc->mc_addr, >> NULL); >> - if (error) >> + if (error) { >> + CURVNET_RESTORE(); >> return (error); >> + } >> } >> >> CURVNET_RESTORE(); >> _______________________________________________ >> dev-commits-src-main@freebsd.org mailing list >> https://lists.freebsd.org/mailman/listinfo/dev-commits-src-main >> To unsubscribe, send any mail to = >> "dev-commits-src-main-unsubscribe@freebsd.org" From owner-dev-commits-src-all@freebsd.org Fri Jul 2 05:13:23 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri Jul 2 05:24:23 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 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-all@freebsd.org Fri Jul 2 05:25:43 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4ADE565EFE7; Fri, 2 Jul 2021 05:25:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGNpH1VyBz4grG; Fri, 2 Jul 2021 05:25:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 1C0B861F9; Fri, 2 Jul 2021 05:25:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1625PhR4078351; Fri, 2 Jul 2021 05:25:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1625PhAd078350; Fri, 2 Jul 2021 05:25:43 GMT (envelope-from git) Date: Fri, 2 Jul 2021 05:25:43 GMT Message-Id: <202107020525.1625PhAd078350@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: 5bd70f050072 - main - stress2: Improve cleanup code MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5bd70f050072bced1f0b7a566932857b3dd506ef Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 05:25:43 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=5bd70f050072bced1f0b7a566932857b3dd506ef commit 5bd70f050072bced1f0b7a566932857b3dd506ef Author: Peter Holm AuthorDate: 2021-07-02 05:22:18 +0000 Commit: Peter Holm CommitDate: 2021-07-02 05:22:18 +0000 stress2: Improve cleanup code --- tools/test/stress2/misc/mmap3.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tools/test/stress2/misc/mmap3.sh b/tools/test/stress2/misc/mmap3.sh index bc5905dd920e..9175b77842f3 100755 --- a/tools/test/stress2/misc/mmap3.sh +++ b/tools/test/stress2/misc/mmap3.sh @@ -42,11 +42,12 @@ while [ `date '+%s'` -lt $((start + 5 * 60)) ]; do ./mmap3 done echo "Expect Segmentation faults" +trap "rm -f /tmp/mmap3.0*" EXIT INT start=`date '+%s'` while [ `date '+%s'` -lt $((start + 5 * 60)) ]; do ./mmap3 random done -rm -f mmap3 mmap3.core /tmp/mmap.0* +rm -f mmap3 mmap3.core /tmp/mmap3.0* exit EOF @@ -102,7 +103,7 @@ work(int nr) p = (void *)STARTADDR; len = ADRSPACE; - sprintf(path, "/tmp/mmap.%06d.%04d", getpid(), nr); + sprintf(path, "/tmp/mmap3.%06d.%04d", getpid(), nr); if ((fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0622)) == -1) err(1,"open()"); if (ftruncate(fd, len) == -1) From owner-dev-commits-src-all@freebsd.org Fri Jul 2 05:25:44 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 7B5B065F467; Fri, 2 Jul 2021 05:25: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 4GGNpJ2BFcz4gV7; Fri, 2 Jul 2021 05:25: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 3416B66FC; Fri, 2 Jul 2021 05:25: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 1625Pi3B078375; Fri, 2 Jul 2021 05:25:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1625Pixg078374; Fri, 2 Jul 2021 05:25:44 GMT (envelope-from git) Date: Fri, 2 Jul 2021 05:25:44 GMT Message-Id: <202107020525.1625Pixg078374@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: e02046f74728 - main - stress2: Update the list of test not to run MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e02046f7472898215356c22b0f94f77731fb17aa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 05:25:44 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=e02046f7472898215356c22b0f94f77731fb17aa commit e02046f7472898215356c22b0f94f77731fb17aa Author: Peter Holm AuthorDate: 2021-07-02 05:23:05 +0000 Commit: Peter Holm CommitDate: 2021-07-02 05:23:05 +0000 stress2: Update the list of test not to run --- tools/test/stress2/misc/all.exclude | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/test/stress2/misc/all.exclude b/tools/test/stress2/misc/all.exclude index 62ddde1b7ca8..9e9226c28574 100644 --- a/tools/test/stress2/misc/all.exclude +++ b/tools/test/stress2/misc/all.exclude @@ -41,9 +41,7 @@ nfs16.sh panic: Failed to register NFS lock locally - error=11 20160608 oom2.sh Hang in pfault 20180324 overcommit2.sh CAM stuck in vmwait seen 20200112 pageout.sh panic: handle_written_filepage: not started 20190218 -pmc4.sh ld: error: /usr/lib/libpmc.so: undefined reference 20210124 -pmc5.sh ld: error: /usr/lib/libpmc.so: undefined reference 20210124 -pmc6.sh ld: error: /usr/lib/libpmc.so: undefined reference 20210124 +pmc8.sh panic: [pmc,2749] (ri21, rc1) waiting too long for pmc to ... 20210621 quota10.sh people.freebsd.org/~pho/stress/log/quota10-2.txt 20200525 quota2.sh panic: dqflush: stray dquot 20120221 quota3.sh panic: softdep_deallocate_dependencies: unrecovered ... 20111222 @@ -51,13 +49,13 @@ quota7.sh panic: dqflush: stray dquot 20120221 sctp3.sh panic: Queues are not empty when handling SHUTDOWN-COMPLETE 20210211 sendfile25.sh WiP 20200611 signal.sh Timing issues. Needs fixing 20171116 -snap8.sh panic: handle_workitem_remove: bad dir delta 20210619 swapoff2.sh swap_pager_force_pagein: read from swap failed 20171223 swapoff5.sh log0005.txt, known issue 20210111 systrace.sh WiP 20200227 systrace2.sh WiP 20200227 syzkaller11.sh WiP 20200721 syzkaller15.sh WiP 20200712 +syzkaller16.sh WiP 20210722 syzkaller19.sh WiP 20200712 syzkaller25.sh WiP 20201116 syzkaller28.sh WiP 20201120 From owner-dev-commits-src-all@freebsd.org Fri Jul 2 05:25:45 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EE80D65F360; Fri, 2 Jul 2021 05:25: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 4GGNpK3mwbz4ggM; Fri, 2 Jul 2021 05:25: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 5F02666FD; Fri, 2 Jul 2021 05:25: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 1625PjTu078399; Fri, 2 Jul 2021 05:25:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1625Pjkk078398; Fri, 2 Jul 2021 05:25:45 GMT (envelope-from git) Date: Fri, 2 Jul 2021 05:25:45 GMT Message-Id: <202107020525.1625Pjkk078398@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Peter Holm Subject: git: fe5d22f8f487 - main - stress2: Added a test scenario from Bug 227041 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pho X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fe5d22f8f487f31fd6c5e5017e7d9dd59b5e072e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 05:25:46 -0000 The branch main has been updated by pho: URL: https://cgit.FreeBSD.org/src/commit/?id=fe5d22f8f487f31fd6c5e5017e7d9dd59b5e072e commit fe5d22f8f487f31fd6c5e5017e7d9dd59b5e072e Author: Peter Holm AuthorDate: 2021-07-02 05:24:38 +0000 Commit: Peter Holm CommitDate: 2021-07-02 05:24:38 +0000 stress2: Added a test scenario from Bug 227041 --- tools/test/stress2/misc/pmc8.sh | 116 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 116 insertions(+) diff --git a/tools/test/stress2/misc/pmc8.sh b/tools/test/stress2/misc/pmc8.sh new file mode 100755 index 000000000000..6695b0b52f2a --- /dev/null +++ b/tools/test/stress2/misc/pmc8.sh @@ -0,0 +1,116 @@ +#!/bin/sh + +# https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227041 + +# panic: [pmc,2749] (ri21, rc1) waiting too long for pmc to be free +# cpuid = 23 +# time = 1624293771 +# KDB: stack backtrace: +# db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame 0xfffffe01ab083850 +# vpanic() at vpanic+0x181/frame 0xfffffe01ab0838a0 +# panic() at panic+0x43/frame 0xfffffe01ab083900 +# pmc_wait_for_pmc_idle() at pmc_wait_for_pmc_idle+0xa2/frame 0xfffffe01ab083930 +# pmc_release_pmc_descriptor() at pmc_release_pmc_descriptor+0x20b/frame 0xfffffe01ab083980 +# pmc_syscall_handler() at pmc_syscall_handler+0x4bd/frame 0xfffffe01ab083ac0 +# amd64_syscall() at amd64_syscall+0x762/frame 0xfffffe01ab083bf0 +# fast_syscall_common() at fast_syscall_common+0xf8/frame 0xfffffe01ab083bf0 +# --- syscall (0, FreeBSD ELF64, nosys), rip = 0x8009c154a, rsp = 0x7fffffffe4d8, rbp = 0x7fffffffe500 --- +# KDB: enter: panic +# [ thread pid 3123 tid 100454 ] +# Stopped at kdb_enter+0x37: movq $0,0x1285d1e(%rip) +# db> x/s version +# version: FreeBSD 14.0-CURRENT #1 ufs-n247476-f77f86ecfea: Mon Jun 21 08:40:40 CEST 2021 +# pho@t2.osted.lan:/var/tmp/deviant3/sys/amd64/compile/PHO +# db> + +. ../default.cfg +cat > /tmp/pmc-crash.c < + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" + AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER 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. + + clang -lpmc pmc-crash.c -o pmc-crash +*/ + +#include +#include +#include +#include +#include +#include +#include + +int main(void) +{ + if (pmc_init() != 0) + { + printf("pmc_init %s", strerror(errno)); + exit(-1); + } + + pmc_id_t pmc_id = 0; + if (pmc_allocate("inst_retired.any", PMC_MODE_TC, 0, PMC_CPU_ANY, + &pmc_id, 1024) != 0) + { + printf("pmc_allocate %s", strerror(errno)); + exit(-1); + } + + printf("attaching to self\n"); + if (pmc_attach(pmc_id, 0) != 0) + { + printf("pmc_attach %s", strerror(errno)); + exit(-1); + } + + if (pmc_start(pmc_id) != 0) + { + printf("pmc_start %s", strerror(errno)); + exit(-1); + } + + pmc_value_t v = 0; + for (int i = 0; i < 100; i++) + { + pmc_read(pmc_id, &v); + } + pmc_stop(pmc_id); + + printf("success, detaching...\n"); + pmc_detach(pmc_id, 0); + pmc_release(pmc_id); + + printf("ok?"); +} +EOF +mycc -o /tmp/pmc-crash -Wall -Wextra -O0 /tmp/pmc-crash.c -lpmc || exit +kldstat -v | grep -q hwpmc || { kldload hwpmc; loaded=1; } +here=`pwd` +cd /tmp +./pmc-crash; s=$? +cd $here +rm -f /tmp/pmc-crash /tmp/pmc-crash.core /tmp/pmc-crash.c +[ $loaded ] && kldunload hwpmc +exit $s From owner-dev-commits-src-all@freebsd.org Fri Jul 2 06:43:53 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 87843661683; Fri, 2 Jul 2021 06:43: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 4GGQXT3Fzgz4q55; Fri, 2 Jul 2021 06:43: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 586577079; Fri, 2 Jul 2021 06:43: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 1626hrku083969; Fri, 2 Jul 2021 06:43:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1626hrKf083968; Fri, 2 Jul 2021 06:43:53 GMT (envelope-from git) Date: Fri, 2 Jul 2021 06:43:53 GMT Message-Id: <202107020643.1626hrKf083968@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Stefan E=C3=9Fer?= Subject: git: c5b8d7b7c14f - main - netstat: Fix typo 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/main X-Git-Reftype: branch X-Git-Commit: c5b8d7b7c14f72a4ad12e610222642c69374dd4a Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 06:43:53 -0000 The branch main has been updated by se: URL: https://cgit.FreeBSD.org/src/commit/?id=c5b8d7b7c14f72a4ad12e610222642c69374dd4a commit c5b8d7b7c14f72a4ad12e610222642c69374dd4a Author: Stefan Eßer AuthorDate: 2021-07-02 06:38:42 +0000 Commit: Stefan Eßer CommitDate: 2021-07-02 06:42:34 +0000 netstat: Fix typo Correct spelling of "received packers" to "received packets". PR: 256926 Reported by: ghuckriede@blackberry.com MFC after: 3 days --- usr.bin/netstat/inet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/netstat/inet.c b/usr.bin/netstat/inet.c index 1143c09734e4..45c5f05e60b8 100644 --- a/usr.bin/netstat/inet.c +++ b/usr.bin/netstat/inet.c @@ -1115,7 +1115,7 @@ arp_stats(u_long off, const char *name, int af1 __unused, int proto __unused) "{N:/ARP request%s received}\n"); p2(rxreplies, "{:received-replies/%ju} " "{N:/ARP repl%s received}\n"); - p(received, "{:received-packers/%ju} " + p(received, "{:received-packets/%ju} " "{N:/ARP packet%s received}\n"); p(dropped, "{:dropped-no-entry/%ju} " "{N:/total packet%s dropped due to no ARP entry}\n"); From owner-dev-commits-src-all@freebsd.org Fri Jul 2 07:21:07 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 278D2663AE4; Fri, 2 Jul 2021 07:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGRMR0Nvpz4vVP; Fri, 2 Jul 2021 07:21:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E9EA17DC7; Fri, 2 Jul 2021 07:21:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1627L6De032949; Fri, 2 Jul 2021 07:21:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1627L6di032948; Fri, 2 Jul 2021 07:21:06 GMT (envelope-from git) Date: Fri, 2 Jul 2021 07:21:06 GMT Message-Id: <202107020721.1627L6di032948@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ganbold Tsagaankhuu Subject: git: 3416513a413e - main - dtb: rockchip: Add NanoPI-R4S and RockPI E to the build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ganbold X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3416513a413e9e9670adb0c8f8526800ffaf4f76 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 07:21:07 -0000 The branch main has been updated by ganbold: URL: https://cgit.FreeBSD.org/src/commit/?id=3416513a413e9e9670adb0c8f8526800ffaf4f76 commit 3416513a413e9e9670adb0c8f8526800ffaf4f76 Author: Ganbold Tsagaankhuu AuthorDate: 2021-07-02 07:20:25 +0000 Commit: Ganbold Tsagaankhuu CommitDate: 2021-07-02 07:20:25 +0000 dtb: rockchip: Add NanoPI-R4S and RockPI E to the build --- sys/modules/dtb/rockchip/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/modules/dtb/rockchip/Makefile b/sys/modules/dtb/rockchip/Makefile index 4d665f503526..93ad5c6676ab 100644 --- a/sys/modules/dtb/rockchip/Makefile +++ b/sys/modules/dtb/rockchip/Makefile @@ -12,7 +12,9 @@ DTS= \ rockchip/rk3399-khadas-edge-v.dts \ rockchip/rk3399-nanopc-t4.dts \ rockchip/rk3328-nanopi-r2s.dts \ + rockchip/rk3399-nanopi-r4s.dts \ rockchip/rk3399-rock-pi-4.dts \ + rockchip/rk3328-rock-pi-e.dts \ rockchip/rk3328-rock64.dts \ rockchip/rk3399-firefly.dts \ rockchip/rk3399-rockpro64.dts From owner-dev-commits-src-all@freebsd.org Fri Jul 2 07:51:18 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6C9276646E6; Fri, 2 Jul 2021 07:51: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 4GGS2G2gzpz3G5C; Fri, 2 Jul 2021 07:51: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 45554105E3; Fri, 2 Jul 2021 07:51: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 1627pIq4075187; Fri, 2 Jul 2021 07:51:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1627pIkV075186; Fri, 2 Jul 2021 07:51:18 GMT (envelope-from git) Date: Fri, 2 Jul 2021 07:51:18 GMT Message-Id: <202107020751.1627pIkV075186@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: acb1f1269c6f - main - proccontrol(1): implement 'nonewprivs' MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: acb1f1269c6f4ff89a0d28ba742f6687e9ef779d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 07:51:18 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=acb1f1269c6f4ff89a0d28ba742f6687e9ef779d commit acb1f1269c6f4ff89a0d28ba742f6687e9ef779d Author: Edward Tomasz Napierala AuthorDate: 2021-07-02 07:49:20 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-07-02 07:50:36 +0000 proccontrol(1): implement 'nonewprivs' This adds the 'nonewprivs' mode, corresponding to newly added procctl(2) commands PROC_NO_NEW_PRIVS_CTL and PROC_NO_NEW_PRIVS_STATUS. Reviewed By: kib Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30940 --- usr.bin/proccontrol/proccontrol.1 | 5 ++++- usr.bin/proccontrol/proccontrol.c | 23 ++++++++++++++++++++++- 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/usr.bin/proccontrol/proccontrol.1 b/usr.bin/proccontrol/proccontrol.1 index 4445bb5f9f8e..b4ed6c268a6a 100644 --- a/usr.bin/proccontrol/proccontrol.1 +++ b/usr.bin/proccontrol/proccontrol.1 @@ -28,7 +28,7 @@ .\" .\" $FreeBSD$ .\" -.Dd June 28, 2019 +.Dd July 2, 2021 .Dt PROCCONTROL 1 .Os .Sh NAME @@ -69,6 +69,9 @@ Controls the signalling of capability mode access violations. .It Ar protmax Controls the implicit PROT_MAX application for .Xr mmap 2 . +.It Ar nonewprivs +Controls disabling the setuid and sgid bits for +.Xr execve 2 . .It Ar kpti Controls the KPTI enable, AMD64 only. .It Ar la48 diff --git a/usr.bin/proccontrol/proccontrol.c b/usr.bin/proccontrol/proccontrol.c index edcc23a3cb34..9f185de025c1 100644 --- a/usr.bin/proccontrol/proccontrol.c +++ b/usr.bin/proccontrol/proccontrol.c @@ -45,6 +45,7 @@ enum { MODE_TRAPCAP, MODE_PROTMAX, MODE_STACKGAP, + MODE_NO_NEW_PRIVS, #ifdef PROC_KPTI_CTL MODE_KPTI, #endif @@ -84,7 +85,7 @@ usage(void) { fprintf(stderr, "Usage: proccontrol -m (aslr|protmax|trace|trapcap|" - "stackgap"KPTI_USAGE LA_USAGE") [-q] " + "stackgap|nonewprivs"KPTI_USAGE LA_USAGE") [-q] " "[-s (enable|disable)] [-p pid | command]\n"); exit(1); } @@ -113,6 +114,8 @@ main(int argc, char *argv[]) mode = MODE_TRAPCAP; else if (strcmp(optarg, "stackgap") == 0) mode = MODE_STACKGAP; + else if (strcmp(optarg, "nonewprivs") == 0) + mode = MODE_NO_NEW_PRIVS; #ifdef PROC_KPTI_CTL else if (strcmp(optarg, "kpti") == 0) mode = MODE_KPTI; @@ -174,6 +177,9 @@ main(int argc, char *argv[]) case MODE_STACKGAP: error = procctl(P_PID, pid, PROC_STACKGAP_STATUS, &arg); break; + case MODE_NO_NEW_PRIVS: + error = procctl(P_PID, pid, PROC_NO_NEW_PRIVS_STATUS, &arg); + break; #ifdef PROC_KPTI_CTL case MODE_KPTI: error = procctl(P_PID, pid, PROC_KPTI_STATUS, &arg); @@ -264,6 +270,16 @@ main(int argc, char *argv[]) break; } break; + case MODE_NO_NEW_PRIVS: + switch (arg) { + case PROC_NO_NEW_PRIVS_ENABLE: + printf("enabled\n"); + break; + case PROC_NO_NEW_PRIVS_DISABLE: + printf("disabled\n"); + break; + } + break; #ifdef PROC_KPTI_CTL case MODE_KPTI: switch (arg & ~PROC_KPTI_STATUS_ACTIVE) { @@ -330,6 +346,11 @@ main(int argc, char *argv[]) PROC_STACKGAP_DISABLE_EXEC); error = procctl(P_PID, pid, PROC_STACKGAP_CTL, &arg); break; + case MODE_NO_NEW_PRIVS: + arg = enable ? PROC_NO_NEW_PRIVS_ENABLE : + PROC_NO_NEW_PRIVS_DISABLE; + error = procctl(P_PID, pid, PROC_NO_NEW_PRIVS_CTL, &arg); + break; #ifdef PROC_KPTI_CTL case MODE_KPTI: arg = enable ? PROC_KPTI_CTL_ENABLE_ON_EXEC : From owner-dev-commits-src-all@freebsd.org Fri Jul 2 08:28:43 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8F136665AD7; Fri, 2 Jul 2021 08:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGSsR34wPz3KRr; Fri, 2 Jul 2021 08:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4E09210F26; Fri, 2 Jul 2021 08:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1628ShgK018761; Fri, 2 Jul 2021 08:28:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1628Shvv018760; Fri, 2 Jul 2021 08:28:43 GMT (envelope-from git) Date: Fri, 2 Jul 2021 08:28:43 GMT Message-Id: <202107020828.1628Shvv018760@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 2eb9ad427475 - main - Simplify and speed up the kyua build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2eb9ad427475190e87d026de4ca7fc296947f2a0 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 08:28:43 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=2eb9ad427475190e87d026de4ca7fc296947f2a0 commit 2eb9ad427475190e87d026de4ca7fc296947f2a0 Author: Alex Richardson AuthorDate: 2021-07-02 08:21:04 +0000 Commit: Alex Richardson CommitDate: 2021-07-02 08:21:05 +0000 Simplify and speed up the kyua build Instead of having multiple kyua libraries, just include the files as part of usr.bin/kyua. Previously, we would build each kyua source up to four times: once as a .o file and once as a .pieo. Additionally, the kyua libraries might be built again for compat32. As all the kyua libraries amount to 102 C++ sources the build time is significant (especially when using an assertions enabled compiler). This change ensures that we build 306 fewer .cpp source files as part of buildworld. Reviewed By: brooks MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D30967 --- lib/kyua/Makefile | 10 --- lib/kyua/Makefile.inc | 20 ----- lib/kyua/Makefile.kyua | 11 --- lib/kyua/cli/Makefile | 29 -------- lib/kyua/drivers/Makefile | 12 --- lib/kyua/engine/Makefile | 22 ------ lib/kyua/model/Makefile | 13 ---- lib/kyua/store/Makefile | 18 ----- lib/kyua/utils/Makefile | 65 ---------------- share/mk/src.libnames.mk | 30 -------- usr.bin/kyua/Makefile | 140 +++++++++++++++++++++++++++++++++-- {lib => usr.bin}/kyua/config.h | 0 {lib => usr.bin}/kyua/utils/defs.hpp | 0 13 files changed, 135 insertions(+), 235 deletions(-) diff --git a/lib/kyua/Makefile b/lib/kyua/Makefile deleted file mode 100644 index 1a1ea8bf5828..000000000000 --- a/lib/kyua/Makefile +++ /dev/null @@ -1,10 +0,0 @@ -# $FreeBSD$ - -SUBDIR= cli \ - drivers \ - engine \ - model \ - store \ - utils - -.include diff --git a/lib/kyua/Makefile.inc b/lib/kyua/Makefile.inc deleted file mode 100644 index 52f19d3140b3..000000000000 --- a/lib/kyua/Makefile.inc +++ /dev/null @@ -1,20 +0,0 @@ -# $FreeBSD$ - -KYUA_LIBDIR:= ${.PARSEDIR} - -.include "${KYUA_LIBDIR}/Makefile.kyua" - -LIB_CXX= kyua_${KYUA_LIB} -INTERNALLIB= - -.PATH: ${KYUA_SRCDIR}/${KYUA_LIB} -CFLAGS+= -I${KYUA_LIBDIR} \ - -I${KYUA_SRCDIR} \ - -I${SRCTOP}/contrib/lutok/include - -CFLAGS+= -DHAVE_CONFIG_H - -# kyua uses auto_ptr -CFLAGS+= -Wno-deprecated-declarations - -.include "${.PARSEDIR}/../Makefile.inc" diff --git a/lib/kyua/Makefile.kyua b/lib/kyua/Makefile.kyua deleted file mode 100644 index 1fd30a135409..000000000000 --- a/lib/kyua/Makefile.kyua +++ /dev/null @@ -1,11 +0,0 @@ -# $FreeBSD$ - -KYUA_VERSION= 0.13 - -KYUA_CONFDIR= /etc/kyua -KYUA_DOCDIR= /usr/share/doc/kyua -KYUA_EGDIR= /usr/share/examples/kyua -KYUA_MISCDIR= /usr/share/kyua/misc -KYUA_STOREDIR= /usr/share/kyua/store - -KYUA_SRCDIR= ${SRCTOP}/contrib/kyua diff --git a/lib/kyua/cli/Makefile b/lib/kyua/cli/Makefile deleted file mode 100644 index b5de51607c12..000000000000 --- a/lib/kyua/cli/Makefile +++ /dev/null @@ -1,29 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= cli -INTERNALLIB= -LIBADD= kyua_drivers kyua_engine kyua_model kyua_store kyua_utils -CFLAGS+= -DKYUA_CONFDIR=\"${KYUA_CONFDIR}\" \ - -DKYUA_DOCDIR=\"${KYUA_DOCDIR}\" \ - -DKYUA_MISCDIR=\"${KYUA_MISCDIR}\" \ - -DPACKAGE=\"kyua\" \ - -DPACKAGE_NAME=\"Kyua\" \ - -DPACKAGE_VERSION=\"${KYUA_VERSION}\" \ - -DVERSION=\"${KYUA_VERSION}\" - -SRCS= cmd_about.cpp \ - cmd_config.cpp \ - cmd_db_exec.cpp \ - cmd_db_migrate.cpp \ - cmd_debug.cpp \ - cmd_help.cpp \ - cmd_list.cpp \ - cmd_report.cpp \ - cmd_report_html.cpp \ - cmd_report_junit.cpp \ - cmd_test.cpp \ - common.cpp \ - config.cpp \ - main.cpp - -.include diff --git a/lib/kyua/drivers/Makefile b/lib/kyua/drivers/Makefile deleted file mode 100644 index adf9c0601269..000000000000 --- a/lib/kyua/drivers/Makefile +++ /dev/null @@ -1,12 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= drivers -LIBADD= kyua_model kyua_engine kyua_store - -SRCS= debug_test.cpp \ - list_tests.cpp \ - report_junit.cpp \ - run_tests.cpp \ - scan_results.cpp - -.include diff --git a/lib/kyua/engine/Makefile b/lib/kyua/engine/Makefile deleted file mode 100644 index 4f0c9053c692..000000000000 --- a/lib/kyua/engine/Makefile +++ /dev/null @@ -1,22 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= engine -LIBADD= lutok kyua_utils -CFLAGS= -DKYUA_ARCHITECTURE=\"${MACHINE_ARCH}\" \ - -DKYUA_PLATFORM=\"${MACHINE}\" - -SRCS= atf.cpp \ - atf_list.cpp \ - atf_result.cpp \ - config.cpp \ - exceptions.cpp \ - filters.cpp \ - kyuafile.cpp \ - plain.cpp \ - requirements.cpp \ - scanner.cpp \ - tap.cpp \ - tap_parser.cpp \ - scheduler.cpp - -.include diff --git a/lib/kyua/model/Makefile b/lib/kyua/model/Makefile deleted file mode 100644 index d4a0b91587e7..000000000000 --- a/lib/kyua/model/Makefile +++ /dev/null @@ -1,13 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= model -LIBADD= lutok - -SRCS= context.cpp \ - exceptions.cpp \ - metadata.cpp \ - test_case.cpp \ - test_program.cpp \ - test_result.cpp - -.include diff --git a/lib/kyua/store/Makefile b/lib/kyua/store/Makefile deleted file mode 100644 index 39753691873e..000000000000 --- a/lib/kyua/store/Makefile +++ /dev/null @@ -1,18 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= store -LIBADD= kyua_model kyua_utils sqlite3 - -CFLAGS+= -DKYUA_STOREDIR=\"${KYUA_STOREDIR}\" - -SRCS= dbtypes.cpp \ - exceptions.cpp \ - layout.cpp \ - metadata.cpp \ - migrate.cpp \ - read_backend.cpp \ - read_transaction.cpp \ - write_backend.cpp \ - write_transaction.cpp - -.include diff --git a/lib/kyua/utils/Makefile b/lib/kyua/utils/Makefile deleted file mode 100644 index 740b395d6951..000000000000 --- a/lib/kyua/utils/Makefile +++ /dev/null @@ -1,65 +0,0 @@ -# $FreeBSD$ - -KYUA_LIB= utils -LIBADD= lutok - -CFLAGS+= -I${SRCTOP}/contrib/sqlite3 -CFLAGS+= -DGDB=\"/usr/local/bin/gdb\" - -SRCS= datetime.cpp \ - env.cpp \ - memory.cpp \ - passwd.cpp \ - sanity.cpp \ - stacktrace.cpp \ - stream.cpp \ - units.cpp \ - cmdline/base_command.cpp \ - cmdline/exceptions.cpp \ - cmdline/globals.cpp \ - cmdline/options.cpp \ - cmdline/parser.cpp \ - cmdline/ui.cpp \ - cmdline/ui_mock.cpp \ - config/exceptions.cpp \ - config/keys.cpp \ - config/lua_module.cpp \ - config/nodes.cpp \ - config/parser.cpp \ - config/tree.cpp \ - format/exceptions.cpp \ - format/formatter.cpp \ - fs/auto_cleaners.cpp \ - fs/directory.cpp \ - fs/exceptions.cpp \ - fs/lua_module.cpp \ - fs/operations.cpp \ - fs/path.cpp \ - logging/operations.cpp \ - process/child.cpp \ - process/deadline_killer.cpp \ - process/exceptions.cpp \ - process/executor.cpp \ - process/fdstream.cpp \ - process/isolation.cpp \ - process/operations.cpp \ - process/status.cpp \ - process/system.cpp \ - process/systembuf.cpp \ - signals/exceptions.cpp \ - signals/interrupts.cpp \ - signals/misc.cpp \ - signals/programmer.cpp \ - signals/timer.cpp \ - sqlite/c_gate.cpp \ - sqlite/database.cpp \ - sqlite/exceptions.cpp \ - sqlite/statement.cpp \ - sqlite/transaction.cpp \ - text/exceptions.cpp \ - text/operations.cpp \ - text/regex.cpp \ - text/table.cpp \ - text/templates.cpp \ - -.include diff --git a/share/mk/src.libnames.mk b/share/mk/src.libnames.mk index 61373dceb4d1..2db4a0dee4d8 100644 --- a/share/mk/src.libnames.mk +++ b/share/mk/src.libnames.mk @@ -41,12 +41,6 @@ _INTERNALLIBS= \ fifolog \ ifconfig \ ipf \ - kyua_cli \ - kyua_drivers \ - kyua_engine \ - kyua_model \ - kyua_store \ - kyua_utils \ lpr \ lua \ lutok \ @@ -286,12 +280,6 @@ _DP_bsnmp= crypto _DP_geom= bsdxml sbuf _DP_cam= sbuf _DP_kvm= elf -_DP_kyua_cli= kyua_drivers kyua_engine kyua_model kyua_store kyua_utils -_DP_kyua_drivers= kyua_model kyua_engine kyua_store -_DP_kyua_engine= lutok kyua_utils -_DP_kyua_model= lutok -_DP_kyua_utils= lutok -_DP_kyua_store= kyua_model kyua_utils sqlite3 _DP_casper= nv _DP_cap_dns= nv _DP_cap_fileargs= nv @@ -510,24 +498,6 @@ _LIB_OBJTOP?= ${OBJTOP} LIBELFTCDIR= ${_LIB_OBJTOP}/lib/libelftc LIBELFTC?= ${LIBELFTCDIR}/libelftc${PIE_SUFFIX}.a -LIBKYUA_CLIDIR= ${_LIB_OBJTOP}/lib/kyua/cli -LIBKYUA_CLI?= ${LIBKYUA_CLIDIR}/libkyua_cli${PIE_SUFFIX}.a - -LIBKYUA_DRIVERSDIR= ${_LIB_OBJTOP}/lib/kyua/drivers -LIBKYUA_DRIVERS?= ${LIBKYUA_DRIVERSDIR}/libkyua_drivers${PIE_SUFFIX}.a - -LIBKYUA_ENGINEDIR= ${_LIB_OBJTOP}/lib/kyua/engine -LIBKYUA_ENGINE?= ${LIBKYUA_ENGINEDIR}/libkyua_engine${PIE_SUFFIX}.a - -LIBKYUA_MODELDIR= ${_LIB_OBJTOP}/lib/kyua/model -LIBKYUA_MODEL?= ${LIBKYUA_MODELDIR}/libkyua_model${PIE_SUFFIX}.a - -LIBKYUA_STOREDIR= ${_LIB_OBJTOP}/lib/kyua/store -LIBKYUA_STORE?= ${LIBKYUA_STOREDIR}/libkyua_store${PIE_SUFFIX}.a - -LIBKYUA_UTILSDIR= ${_LIB_OBJTOP}/lib/kyua/utils -LIBKYUA_UTILS?= ${LIBKYUA_UTILSDIR}/libkyua_utils${PIE_SUFFIX}.a - LIBLUADIR= ${_LIB_OBJTOP}/lib/liblua LIBLUA?= ${LIBLUADIR}/liblua${PIE_SUFFIX}.a diff --git a/usr.bin/kyua/Makefile b/usr.bin/kyua/Makefile index e27c8603f11b..966927709a06 100644 --- a/usr.bin/kyua/Makefile +++ b/usr.bin/kyua/Makefile @@ -2,14 +2,20 @@ .include -.include "${SRCTOP}/lib/kyua/Makefile.kyua" - +KYUA_CONFDIR= /etc/kyua +KYUA_DOCDIR= /usr/share/doc/kyua +KYUA_EGDIR= /usr/share/examples/kyua +KYUA_MISCDIR= /usr/share/kyua/misc +KYUA_STOREDIR= /usr/share/kyua/store +KYUA_VERSION= 0.13 + +KYUA_SRCDIR= ${SRCTOP}/contrib/kyua .PATH: ${KYUA_SRCDIR} PACKAGE= tests PROG_CXX= kyua SRCS= main.cpp -LIBADD= kyua_cli kyua_drivers kyua_engine kyua_model kyua_store +LIBADD= lutok sqlite3 MAN= kyua-about.1 \ kyua-config.1 \ @@ -26,10 +32,134 @@ MAN= kyua-about.1 \ kyua.conf.5 \ kyuafile.5 -CFLAGS+= -I${KYUA_SRCDIR} - +CFLAGS+= -I${KYUA_SRCDIR} -I${.CURDIR} +CFLAGS+= -I${SRCTOP}/contrib/lutok/include +CFLAGS+= -I${SRCTOP}/contrib/sqlite3 # kyua uses auto_ptr CFLAGS+= -Wno-deprecated-declarations +CFLAGS+= -DHAVE_CONFIG_H + +# We compile the kyua libraries as part of the main executable as this saves +# compile time and we don't install them anyway. +CFLAGS+= -DGDB=\"/usr/local/bin/gdb\" \ + -DKYUA_ARCHITECTURE=\"${MACHINE_ARCH}\" \ + -DKYUA_CONFDIR=\"${KYUA_CONFDIR}\" \ + -DKYUA_DOCDIR=\"${KYUA_DOCDIR}\" \ + -DKYUA_MISCDIR=\"${KYUA_MISCDIR}\" \ + -DKYUA_PLATFORM=\"${MACHINE}\" \ + -DKYUA_STOREDIR=\"${KYUA_STOREDIR}\" \ + -DPACKAGE=\"kyua\" \ + -DPACKAGE_NAME=\"Kyua\" \ + -DPACKAGE_VERSION=\"${KYUA_VERSION}\" \ + -DVERSION=\"${KYUA_VERSION}\" + +SRCS+= utils/datetime.cpp \ + utils/env.cpp \ + utils/memory.cpp \ + utils/passwd.cpp \ + utils/sanity.cpp \ + utils/stacktrace.cpp \ + utils/stream.cpp \ + utils/units.cpp \ + utils/cmdline/base_command.cpp \ + utils/cmdline/exceptions.cpp \ + utils/cmdline/globals.cpp \ + utils/cmdline/options.cpp \ + utils/cmdline/parser.cpp \ + utils/cmdline/ui.cpp \ + utils/cmdline/ui_mock.cpp \ + utils/config/exceptions.cpp \ + utils/config/keys.cpp \ + utils/config/lua_module.cpp \ + utils/config/nodes.cpp \ + utils/config/parser.cpp \ + utils/config/tree.cpp \ + utils/format/exceptions.cpp \ + utils/format/formatter.cpp \ + utils/fs/auto_cleaners.cpp \ + utils/fs/directory.cpp \ + utils/fs/exceptions.cpp \ + utils/fs/lua_module.cpp \ + utils/fs/operations.cpp \ + utils/fs/path.cpp \ + utils/logging/operations.cpp \ + utils/process/child.cpp \ + utils/process/deadline_killer.cpp \ + utils/process/exceptions.cpp \ + utils/process/executor.cpp \ + utils/process/fdstream.cpp \ + utils/process/isolation.cpp \ + utils/process/operations.cpp \ + utils/process/status.cpp \ + utils/process/system.cpp \ + utils/process/systembuf.cpp \ + utils/signals/exceptions.cpp \ + utils/signals/interrupts.cpp \ + utils/signals/misc.cpp \ + utils/signals/programmer.cpp \ + utils/signals/timer.cpp \ + utils/sqlite/c_gate.cpp \ + utils/sqlite/database.cpp \ + utils/sqlite/exceptions.cpp \ + utils/sqlite/statement.cpp \ + utils/sqlite/transaction.cpp \ + utils/text/exceptions.cpp \ + utils/text/operations.cpp \ + utils/text/regex.cpp \ + utils/text/table.cpp \ + utils/text/templates.cpp + +SRCS+= model/context.cpp \ + model/exceptions.cpp \ + model/metadata.cpp \ + model/test_case.cpp \ + model/test_program.cpp \ + model/test_result.cpp + +SRCS+= engine/atf.cpp \ + engine/atf_list.cpp \ + engine/atf_result.cpp \ + engine/config.cpp \ + engine/exceptions.cpp \ + engine/filters.cpp \ + engine/kyuafile.cpp \ + engine/plain.cpp \ + engine/requirements.cpp \ + engine/scanner.cpp \ + engine/tap.cpp \ + engine/tap_parser.cpp \ + engine/scheduler.cpp + +SRCS+= store/dbtypes.cpp \ + store/exceptions.cpp \ + store/layout.cpp \ + store/metadata.cpp \ + store/migrate.cpp \ + store/read_backend.cpp \ + store/read_transaction.cpp \ + store/write_backend.cpp \ + store/write_transaction.cpp + +SRCS+= drivers/debug_test.cpp \ + drivers/list_tests.cpp \ + drivers/report_junit.cpp \ + drivers/run_tests.cpp \ + drivers/scan_results.cpp + +SRCS+= cli/cmd_about.cpp \ + cli/cmd_config.cpp \ + cli/cmd_db_exec.cpp \ + cli/cmd_db_migrate.cpp \ + cli/cmd_debug.cpp \ + cli/cmd_help.cpp \ + cli/cmd_list.cpp \ + cli/cmd_report.cpp \ + cli/cmd_report_html.cpp \ + cli/cmd_report_junit.cpp \ + cli/cmd_test.cpp \ + cli/common.cpp \ + cli/config.cpp \ + cli/main.cpp FILESGROUPS= DOCS MISC STORE diff --git a/lib/kyua/config.h b/usr.bin/kyua/config.h similarity index 100% rename from lib/kyua/config.h rename to usr.bin/kyua/config.h diff --git a/lib/kyua/utils/defs.hpp b/usr.bin/kyua/utils/defs.hpp similarity index 100% rename from lib/kyua/utils/defs.hpp rename to usr.bin/kyua/utils/defs.hpp From owner-dev-commits-src-all@freebsd.org Fri Jul 2 08:30:27 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F41D6665F07; Fri, 2 Jul 2021 08:30: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 4GGSvQ6XNxz3KNK; Fri, 2 Jul 2021 08:30:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C9C7F110E4; Fri, 2 Jul 2021 08:30:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1628UQxY027225; Fri, 2 Jul 2021 08:30:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1628UQJW027224; Fri, 2 Jul 2021 08:30:26 GMT (envelope-from git) Date: Fri, 2 Jul 2021 08:30:26 GMT Message-Id: <202107020830.1628UQJW027224@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: fb32c8dbeb6f - main - iflib: retire MB_DTOR_SKIP MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb32c8dbeb6fb0cc01756fb2fb90ca06e4b7c53e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 08:30:27 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=fb32c8dbeb6fb0cc01756fb2fb90ca06e4b7c53e commit fb32c8dbeb6fb0cc01756fb2fb90ca06e4b7c53e Author: Mateusz Guzik AuthorDate: 2021-06-30 13:09:40 +0000 Commit: Mateusz Guzik CommitDate: 2021-07-02 08:30:22 +0000 iflib: retire MB_DTOR_SKIP The flag was added in 2016 but remains unused. Reviewed by: kbowling Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30958 --- sys/kern/kern_mbuf.c | 3 ++- sys/sys/mbuf.h | 2 -- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index a46c576bad90..f814d3cab6e8 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -658,7 +658,8 @@ mb_dtor_mbuf(void *mem, int size, void *arg) flags = (unsigned long)arg; KASSERT((m->m_flags & M_NOFREE) == 0, ("%s: M_NOFREE set", __func__)); - if (!(flags & MB_DTOR_SKIP) && (m->m_flags & M_PKTHDR) && !SLIST_EMPTY(&m->m_pkthdr.tags)) + KASSERT((flags & 0x1) == 0, ("%s: obsolete MB_DTOR_SKIP passed", __func__)); + if ((m->m_flags & M_PKTHDR) && !SLIST_EMPTY(&m->m_pkthdr.tags)) m_tag_delete_chain(m, NULL); } diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index e37b872c74fe..ffc574817249 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -478,8 +478,6 @@ m_epg_pagelen(const struct mbuf *m, int pidx, int pgoff) #define M_PROTO10 0x00400000 /* protocol-specific */ #define M_PROTO11 0x00800000 /* protocol-specific */ -#define MB_DTOR_SKIP 0x1 /* don't pollute the cache by touching a freed mbuf */ - /* * Flags to purge when crossing layers. */ From owner-dev-commits-src-all@freebsd.org Fri Jul 2 08:30:29 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 47FB4665C6C; Fri, 2 Jul 2021 08:30: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 4GGSvT1VNGz3KYq; Fri, 2 Jul 2021 08:30: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 1B0C310F29; Fri, 2 Jul 2021 08:30: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 1628UTqM027273; Fri, 2 Jul 2021 08:30:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1628UT1x027272; Fri, 2 Jul 2021 08:30:29 GMT (envelope-from git) Date: Fri, 2 Jul 2021 08:30:29 GMT Message-Id: <202107020830.1628UT1x027272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: bad5f0b6c294 - main - iflib: switch bare zone_mbuf use to m_free_raw MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bad5f0b6c2944453db2d70a982e8abf203f21669 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 08:30:29 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=bad5f0b6c2944453db2d70a982e8abf203f21669 commit bad5f0b6c2944453db2d70a982e8abf203f21669 Author: Mateusz Guzik AuthorDate: 2021-06-30 14:17:29 +0000 Commit: Mateusz Guzik CommitDate: 2021-07-02 08:30:22 +0000 iflib: switch bare zone_mbuf use to m_free_raw Reviewed by: kbowling Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30961 --- sys/net/iflib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/net/iflib.c b/sys/net/iflib.c index ea3754a07ee6..0b36e880e15e 100644 --- a/sys/net/iflib.c +++ b/sys/net/iflib.c @@ -2238,7 +2238,7 @@ iflib_fl_bufs_free(iflib_fl_t fl) *sd_cl = NULL; if (*sd_m != NULL) { m_init(*sd_m, M_NOWAIT, MT_DATA, 0); - uma_zfree(zone_mbuf, *sd_m); + m_free_raw(*sd_m); *sd_m = NULL; } } else { From owner-dev-commits-src-all@freebsd.org Fri Jul 2 08:30:28 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 5D74B665EB1; Fri, 2 Jul 2021 08:30:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGSvS14FXz3Kc6; Fri, 2 Jul 2021 08:30:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 06AE010F28; Fri, 2 Jul 2021 08:30: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 1628URFJ027249; Fri, 2 Jul 2021 08:30:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1628URtR027248; Fri, 2 Jul 2021 08:30:27 GMT (envelope-from git) Date: Fri, 2 Jul 2021 08:30:27 GMT Message-Id: <202107020830.1628URtR027248@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 05462babd424 - main - mbuf: add m_free_raw to be used instead of directly calling uma_zfree MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 05462babd424124762375dca186802d7355af566 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 08:30:28 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=05462babd424124762375dca186802d7355af566 commit 05462babd424124762375dca186802d7355af566 Author: Mateusz Guzik AuthorDate: 2021-06-30 14:15:25 +0000 Commit: Mateusz Guzik CommitDate: 2021-07-02 08:30:22 +0000 mbuf: add m_free_raw to be used instead of directly calling uma_zfree The intent is to remove all direct zone_mbuf consumers so that ctor/dtor from that zone can be reimplemented as wrappers around uma, avoiding an indirect function call. Reviewed by: kbowling Discussed with: gallatin Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30959 --- sys/kern/kern_mbuf.c | 10 ++++++++++ sys/sys/mbuf.h | 1 + 2 files changed, 11 insertions(+) diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index f814d3cab6e8..2333bf887354 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -1526,6 +1526,16 @@ m_freem(struct mbuf *mb) mb = m_free(mb); } +/* + * Temporary primitive to allow freeing without going through m_free. + */ +void +m_free_raw(struct mbuf *mb) +{ + + uma_zfree(zone_mbuf, mb); +} + int m_snd_tag_alloc(struct ifnet *ifp, union if_snd_tag_alloc_params *params, struct m_snd_tag **mstp) diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index ffc574817249..1dac5fcf32b7 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -825,6 +825,7 @@ void m_extadd(struct mbuf *, char *, u_int, m_ext_free_t, u_int m_fixhdr(struct mbuf *); struct mbuf *m_fragment(struct mbuf *, int, int); void m_freem(struct mbuf *); +void m_free_raw(struct mbuf *); struct mbuf *m_get2(int, int, short, int); struct mbuf *m_getjcl(int, short, int, int); struct mbuf *m_getm2(struct mbuf *, int, int, short, int); From owner-dev-commits-src-all@freebsd.org Fri Jul 2 08:30:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A6ACC665C6F; Fri, 2 Jul 2021 08:30: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 4GGSvV3HKgz3KHb; Fri, 2 Jul 2021 08:30: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 3D83A11107; Fri, 2 Jul 2021 08:30: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 1628UU8C027297; Fri, 2 Jul 2021 08:30:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1628UUR8027296; Fri, 2 Jul 2021 08:30:30 GMT (envelope-from git) Date: Fri, 2 Jul 2021 08:30:30 GMT Message-Id: <202107020830.1628UUR8027296@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 904a08f3427c - main - ktls: switch bare zone_mbuf use to m_free_raw MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 904a08f3427c8ae42b667c1f5dc3e441b48a8e84 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 08:30:30 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=904a08f3427c8ae42b667c1f5dc3e441b48a8e84 commit 904a08f3427c8ae42b667c1f5dc3e441b48a8e84 Author: Mateusz Guzik AuthorDate: 2021-06-30 13:02:45 +0000 Commit: Mateusz Guzik CommitDate: 2021-07-02 08:30:22 +0000 ktls: switch bare zone_mbuf use to m_free_raw Reviewed by: gallatin Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30955 --- sys/kern/uipc_ktls.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index 8eb52cd02afe..7e87e7c740e3 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -2174,7 +2174,7 @@ ktls_work_thread(void *ctx) STAILQ_FOREACH_SAFE(m, &local_m_head, m_epg_stailq, n) { if (m->m_epg_flags & EPG_FLAG_2FREE) { ktls_free(m->m_epg_tls); - uma_zfree(zone_mbuf, m); + m_free_raw(m); } else { ktls_encrypt(wq, m); counter_u64_add(ktls_cnt_tx_queued, -1); From owner-dev-commits-src-all@freebsd.org Fri Jul 2 08:30:31 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id CED90665EC5; Fri, 2 Jul 2021 08:30:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGSvW3fqwz3KHf; Fri, 2 Jul 2021 08:30:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 5734F10ED1; Fri, 2 Jul 2021 08:30:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1628UVnd027323; Fri, 2 Jul 2021 08:30:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1628UVxx027322; Fri, 2 Jul 2021 08:30:31 GMT (envelope-from git) Date: Fri, 2 Jul 2021 08:30:31 GMT Message-Id: <202107020830.1628UVxx027322@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: 48d5b86364fa - main - pf: make DIOCGETSTATESNV iterations killable MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48d5b86364fa8e86318805d0078ccf9066e94ae8 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 08:30:32 -0000 The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=48d5b86364fa8e86318805d0078ccf9066e94ae8 commit 48d5b86364fa8e86318805d0078ccf9066e94ae8 Author: Mateusz Guzik AuthorDate: 2021-07-02 07:28:48 +0000 Commit: Mateusz Guzik CommitDate: 2021-07-02 08:30:22 +0000 pf: make DIOCGETSTATESNV iterations killable Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_ioctl.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 928e4a1259cc..a802780277aa 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -5059,6 +5059,11 @@ pf_getstates(struct pfioc_nv *nv) if (s->timeout == PFTM_UNLINKED) continue; + if (SIGPENDING(curthread)) { + PF_HASHROW_UNLOCK(ih); + ERROUT(EINTR); + } + nvls = pf_state_to_nvstate(s); if (nvls == NULL) { PF_HASHROW_UNLOCK(ih); From owner-dev-commits-src-all@freebsd.org Fri Jul 2 08:56:16 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 496436669FE; Fri, 2 Jul 2021 08:56: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 4GGTTD1gc3z3Mfr; Fri, 2 Jul 2021 08:56: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 21E02112D8; Fri, 2 Jul 2021 08:56: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 1628uGPN058307; Fri, 2 Jul 2021 08:56:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1628uG83058306; Fri, 2 Jul 2021 08:56:16 GMT (envelope-from git) Date: Fri, 2 Jul 2021 08:56:16 GMT Message-Id: <202107020856.1628uG83058306@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 8ec4ba8a76aa - main - Remove lib/kyua from the build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8ec4ba8a76aaf256942ac5996d45cc29022641ae Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 08:56:16 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=8ec4ba8a76aaf256942ac5996d45cc29022641ae commit 8ec4ba8a76aaf256942ac5996d45cc29022641ae Author: Alex Richardson AuthorDate: 2021-07-02 08:54:11 +0000 Commit: Alex Richardson CommitDate: 2021-07-02 08:56:05 +0000 Remove lib/kyua from the build I forgot to include this line in 2eb9ad427475190e87d026de4ca7fc296947f2a0. Reported by: Jenkins CI MFC after: 1 week Fixes: 2eb9ad427475190ei ("Simplify and speed up the kyua build") --- usr.bin/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 206da7154ac2..698dbc25b5e8 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -247,7 +247,6 @@ SUBDIR.${MK_QUOTAS}+= quota SUBDIR.${MK_SENDMAIL}+= vacation SUBDIR.${MK_TALK}+= talk SUBDIR.${MK_TELNET}+= telnet -SUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+= kyua SUBDIR.${MK_TESTS}+= tests SUBDIR.${MK_TEXTPROC}+= ul SUBDIR.${MK_TFTP}+= tftp From owner-dev-commits-src-all@freebsd.org Fri Jul 2 09:18:33 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id B7083667766; Fri, 2 Jul 2021 09:18: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 4GGTyx4n81z3P32; Fri, 2 Jul 2021 09:18: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 8D32F11A8D; Fri, 2 Jul 2021 09:18: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 1629IXCJ085844; Fri, 2 Jul 2021 09:18:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1629IXuj085843; Fri, 2 Jul 2021 09:18:33 GMT (envelope-from git) Date: Fri, 2 Jul 2021 09:18:33 GMT Message-Id: <202107020918.1629IXuj085843@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: 89da04fcaa33 - main - Revert "Remove lib/kyua from the build" MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89da04fcaa33f100a60d06770f7424e5b7f1312f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 09:18:33 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=89da04fcaa33f100a60d06770f7424e5b7f1312f commit 89da04fcaa33f100a60d06770f7424e5b7f1312f Author: Alex Richardson AuthorDate: 2021-07-02 09:17:03 +0000 Commit: Alex Richardson CommitDate: 2021-07-02 09:17:03 +0000 Revert "Remove lib/kyua from the build" Accidentally removed it from the wrong file... This reverts commit 8ec4ba8a76aaf256942ac5996d45cc29022641ae. --- usr.bin/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/Makefile b/usr.bin/Makefile index 698dbc25b5e8..206da7154ac2 100644 --- a/usr.bin/Makefile +++ b/usr.bin/Makefile @@ -247,6 +247,7 @@ SUBDIR.${MK_QUOTAS}+= quota SUBDIR.${MK_SENDMAIL}+= vacation SUBDIR.${MK_TALK}+= talk SUBDIR.${MK_TELNET}+= telnet +SUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+= kyua SUBDIR.${MK_TESTS}+= tests SUBDIR.${MK_TEXTPROC}+= ul SUBDIR.${MK_TFTP}+= tftp From owner-dev-commits-src-all@freebsd.org Fri Jul 2 09:18:34 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EB988667620; Fri, 2 Jul 2021 09:18: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 4GGTyy67J1z3P34; Fri, 2 Jul 2021 09:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id B1E0011A8E; Fri, 2 Jul 2021 09:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 1629IYQw085870; Fri, 2 Jul 2021 09:18:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1629IYwK085869; Fri, 2 Jul 2021 09:18:34 GMT (envelope-from git) Date: Fri, 2 Jul 2021 09:18:34 GMT Message-Id: <202107020918.1629IYwK085869@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alex Richardson Subject: git: c95156691588 - main - Remove lib/kyua from the build MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: arichardson X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c951566915886330612bee880d6ece0d65bf9f5d Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 09:18:35 -0000 The branch main has been updated by arichardson: URL: https://cgit.FreeBSD.org/src/commit/?id=c951566915886330612bee880d6ece0d65bf9f5d commit c951566915886330612bee880d6ece0d65bf9f5d Author: Alex Richardson AuthorDate: 2021-07-02 09:18:00 +0000 Commit: Alex Richardson CommitDate: 2021-07-02 09:18:00 +0000 Remove lib/kyua from the build I forgot to include this line in 2eb9ad427475190e87d026de4ca7fc296947f2a0. Reported by: Jenkins CI MFC after: 1 week Fixes: 2eb9ad427475190ei ("Simplify and speed up the kyua build") --- lib/Makefile | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/Makefile b/lib/Makefile index 26b867ec00e1..a06e77dee022 100644 --- a/lib/Makefile +++ b/lib/Makefile @@ -216,7 +216,6 @@ SUBDIR.${MK_RADIUS_SUPPORT}+= libradius SUBDIR.${MK_SENDMAIL}+= libmilter libsm libsmdb libsmutil SUBDIR.${MK_TELNET}+= libtelnet SUBDIR.${MK_TESTS_SUPPORT}+= atf -SUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+= kyua SUBDIR.${MK_TESTS_SUPPORT}.${MK_CXX}+= liblutok SUBDIR.${MK_TESTS}+= tests SUBDIR.${MK_UNBOUND}+= libunbound From owner-dev-commits-src-all@freebsd.org Fri Jul 2 09:18:44 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D6E36667933; Fri, 2 Jul 2021 09:18:44 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGTz83HKLz3P6B; Fri, 2 Jul 2021 09:18:44 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 263FB26D04; Fri, 2 Jul 2021 09:18:44 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 7CF8A3D004; Fri, 2 Jul 2021 11:18:42 +0200 (CEST) From: "Kristof Provost" To: "Gleb Smirnoff" Cc: "Warner Losh" , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: f13da24715a7 - main - net/bpf: Fix writing of buffer bigger than PAGESIZE Date: Fri, 02 Jul 2021 11:18:41 +0200 X-Mailer: MailMate (1.13.2r5673) Message-ID: <4EAFAECE-9E03-48A7-840B-26E7D871FE29@FreeBSD.org> In-Reply-To: References: <202106231641.15NGf1xH083695@gitrepo.freebsd.org> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 09:18:44 -0000 On 23 Jun 2021, at 22:35, Gleb Smirnoff wrote: > Warner, Kristof, > > On Wed, Jun 23, 2021 at 04:41:01PM +0000, Warner Losh wrote: > W> net/bpf: Fix writing of buffer bigger than PAGESIZE > W> > W> When allocating the mbuf we used m_get2 which fails > W> if len is superior to MJUMPAGESIZE, if its the case, > W> use m_getjcl instead. > W> > W> Reviewed by: kp@ > W> PR: 205164 > W> Pull Request: https://github.com/freebsd/freebsd-src/pull/131 > > m_get2() used to provide jumbo mbufs in the past, see > 3112ae76449ae0931d207603f14b083627bd731d. > > IMHO, makes sense to create m_get3() and use it in bpf. What do you > think? > Do you mean, create an m_get3() like this (untested): diff --git a/sys/kern/kern_mbuf.c b/sys/kern/kern_mbuf.c index a46c576bad90..202a1c1a5b41 100644 --- a/sys/kern/kern_mbuf.c +++ b/sys/kern/kern_mbuf.c @@ -1370,6 +1370,51 @@ m_get2(int size, int how, short type, int flags) return (m); } +/* + * m_get3() allocates minimum mbuf that would fit "size" argument. + * Unlike m_get2() is can allocate clusters up to MJUM16BYTES. + */ +struct mbuf * +m_get3(int size, int how, short type, int flags) +{ + struct mb_args args; + struct mbuf *m, *n; + uma_zone_t zone; + + args.flags = flags; + args.type = type; + + if (size <= MHLEN || (size <= MLEN && (flags & M_PKTHDR) == 0)) + return (uma_zalloc_arg(zone_mbuf, &args, how)); + if (size <= MCLBYTES) + return (uma_zalloc_arg(zone_pack, &args, how)); + + if (size > MJUM16BYTES) + return (NULL); + + m = uma_zalloc_arg(zone_mbuf, &args, how); + if (m == NULL) + return (NULL); + +#if MJUMPAGESIZE != MCLBYTES + if (size <= MJUMPAGESIZE) + zone = zone_jumbop; + else +#endif + if (size <= MJUM9BYTES) + zone = zone_jumbo9; + else + zone = zone_jumbo16; + + n = uma_zalloc_arg(zone_jumbop, m, how); + if (n == NULL) { + uma_zfree(zone_mbuf, m); + return (NULL); + } + + return (m); +} + /* * m_getjcl() returns an mbuf with a cluster of the specified size attached. * For size it takes MCLBYTES, MJUMPAGESIZE, MJUM9BYTES, MJUM16BYTES. diff --git a/sys/net/bpf.c b/sys/net/bpf.c index ec05dd6d337b..ef7285241fdf 100644 --- a/sys/net/bpf.c +++ b/sys/net/bpf.c @@ -641,15 +641,7 @@ bpf_movein(struct uio *uio, int linktype, struct ifnet *ifp, struct mbuf **mp, if (len < hlen || len - hlen > ifp->if_mtu) return (EMSGSIZE); - /* Allocate a mbuf for our write, since m_get2 fails if len >= to MJUMPAGESIZE, use m_getjcl for bigger buffers */ - if (len < MJUMPAGESIZE) - m = m_get2(len, M_WAITOK, MT_DATA, M_PKTHDR); - else if (len <= MJUM9BYTES) - m = m_getjcl(M_WAITOK, MT_DATA, M_PKTHDR, MJUM9BYTES); - else if (len <= MJUM16BYTES) - m = m_getjcl(M_WAITOK, MT_DATA, M_PKTHDR, MJUM16BYTES); - else - m = NULL; + m = m_get3(len, M_WAITOK, MT_DATA, M_PKTHDR); if (m == NULL) return (EIO); m->m_pkthdr.len = m->m_len = len; diff --git a/sys/sys/mbuf.h b/sys/sys/mbuf.h index e37b872c74fe..b9211aaedc3c 100644 --- a/sys/sys/mbuf.h +++ b/sys/sys/mbuf.h @@ -828,6 +828,7 @@ u_int m_fixhdr(struct mbuf *); struct mbuf *m_fragment(struct mbuf *, int, int); void m_freem(struct mbuf *); struct mbuf *m_get2(int, int, short, int); +struct mbuf *m_get3(int, int, short, int); struct mbuf *m_getjcl(int, short, int, int); struct mbuf *m_getm2(struct mbuf *, int, int, short, int); struct mbuf *m_getptr(struct mbuf *, int, int *); — Kristof From owner-dev-commits-src-all@freebsd.org Fri Jul 2 13:05:13 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 2D70366C6AB for ; Fri, 2 Jul 2021 13:05:13 +0000 (UTC) (envelope-from hello@nuggclub.com) Received: from mail-pj1-x102e.google.com (mail-pj1-x102e.google.com [IPv6:2607:f8b0:4864:20::102e]) (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 4GGb0T0Yh7z4YWc for ; Fri, 2 Jul 2021 13:05:12 +0000 (UTC) (envelope-from hello@nuggclub.com) Received: by mail-pj1-x102e.google.com with SMTP id n11so6325406pjo.1 for ; Fri, 02 Jul 2021 06:05:12 -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=dd9IIFtjgwXT9Vxx84qxHjT8pMj7rM+MHH8qm4vLgVo=; b=0dCvHEVLnv1DvKkEBQsh9mvCfL1J24iyX6gnWIuDCPKzI2iwFQVbSbJggFoFUJa6m4 IKgdlcO9SRcP9SawakA8lElFq67TGrGOhe2Z0/4IcqJxI0H9JVo/FFqXJ1rvWwNWE9wL h2QvNQcPfg+adGjv5OOGjTzwKCKYXGPIZJta5P+fMDxwXE2LHXbVlD4dvUBO1Ujuq8oJ GO4hYSMSbiUPagIuo/vOrmH85iAiI65f6z+TXO1ieYavsKKpmB50X5PLW9WCCkPgM3LT HaYRboyzCwxY9MEH9aqUKPGYgDIKnBQkutYlHj/ggbn9QzYC7z3nQZhAMOjJvQcHlbiC tJ9A== 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=dd9IIFtjgwXT9Vxx84qxHjT8pMj7rM+MHH8qm4vLgVo=; b=hjUvpuhYl4WIelZ1ilrvnpa4BKZIcatvKsN15iri5YCUBed8YuvdU6UJ/0F0VKLiyy ykIhTbNS/IRIQaPAuVpGbqLd7y9vns/iDIougCR9t3J5rxOTheoF54JZpmuVE38IHwG/ qj5qvnKBe4xCqRUmtTK+rlA38VoZ3VB4SdGWTPsVZUpwPuhUc5uYMgONke8OgOMrwt8S OfDMPmDcq5TB3KejWsUnt8rV/42yxygD27/wlJalKbsSOw8HFtbL3hkB6/Oy/QGB2m7C HTuFaLTQU0epJtSgnWm1ro5JnqdDSiozBra3QzFiI8HRdJywZdIHUCD03rBNe2E2hQ08 I65w== X-Gm-Message-State: AOAM530bLiwfQQ4y+MQ6sRQLcAIG3NFSU9SqChzJfSsbIOL4jhU3lDlt lBLgpPcuFtDApOtTJiLJEf4XsOPguAGVbSdI X-Google-Smtp-Source: ABdhPJznSVUD2nyM3CFQrnu48e1bpDkeyeydoFW+pROpbQwecNtTeJZWOJJY3rmt+8gQkGquFJXelQ== X-Received: by 2002:a17:90b:124f:: with SMTP id gx15mr15308305pjb.8.1625231111505; Fri, 02 Jul 2021 06:05:11 -0700 (PDT) Received: from out.frontapp.com (out-6.frontapp.com. [52.53.85.146]) by smtp.gmail.com with ESMTPSA id o34sm4037172pgm.6.2021.07.02.06.05.10 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 Jul 2021 06:05:10 -0700 (PDT) X-Front-ID: 43924387ebe9a3addafd3e1c5bb67a5e@frontapp.com X-Front-Transactional: yes X-Front-Autoreply: yes Auto-Submitted: auto-replied From: hello@nuggclub.com To: dev-commits-src-all@freebsd.org Reply-To: hello@nuggclub.com In-Reply-To: References: <43924387ebe9a3addafd3e1c5bb67a5e@frontapp.com> Subject: Thanks for Contacting Nugg Club! Message-ID: <43924387ebe9a3addafd3e1c5bb67a5e@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:10 +0000 MIME-Version: 1.0 X-Rspamd-Queue-Id: 4GGb0T0Yh7z4YWc 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 13:05:13 -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-all@freebsd.org Fri Jul 2 13:49:15 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D479B66CEAD; Fri, 2 Jul 2021 13:49:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGbzH5jPSz4c9V; Fri, 2 Jul 2021 13:49:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id A817B1535C; Fri, 2 Jul 2021 13:49:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162DnFeR045398; Fri, 2 Jul 2021 13:49:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162DnF4N045397; Fri, 2 Jul 2021 13:49:15 GMT (envelope-from git) Date: Fri, 2 Jul 2021 13:49:15 GMT Message-Id: <202107021349.162DnF4N045397@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: d8d43b2de1fa - main - pf tests: Stress state retrieval MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d8d43b2de1fa679179f7089cb3c31e6780ec82af Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 13:49:15 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=d8d43b2de1fa679179f7089cb3c31e6780ec82af commit d8d43b2de1fa679179f7089cb3c31e6780ec82af Author: Kristof Provost AuthorDate: 2021-06-28 10:48:20 +0000 Commit: Kristof Provost CommitDate: 2021-07-02 12:46:32 +0000 pf tests: Stress state retrieval Create and retrieve 20.000 states. There have been issues with nvlists causing very slow state retrieval. We don't impose a specific limit on the time required to retrieve the states, but do log it. In excessive cases the Kyua timeout will fail this test. Reviewed by: donner MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30943 --- tests/sys/netpfil/common/Makefile | 2 + tests/sys/netpfil/common/pft_synflood.py | 62 ++++++++++++++++++++++++ tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/get_state.sh | 81 ++++++++++++++++++++++++++++++++ 4 files changed, 146 insertions(+) diff --git a/tests/sys/netpfil/common/Makefile b/tests/sys/netpfil/common/Makefile index f4d5fb2be3fc..749e0dd99469 100644 --- a/tests/sys/netpfil/common/Makefile +++ b/tests/sys/netpfil/common/Makefile @@ -17,8 +17,10 @@ ${PACKAGE}FILES+= \ utils.subr \ runner.subr \ pft_ping.py \ + pft_synflood.py \ sniffer.py ${PACKAGE}FILESMODE_pft_ping.py= 0555 +${PACKAGE}FILESMODE_pft_synflood.py= 0555 .include diff --git a/tests/sys/netpfil/common/pft_synflood.py b/tests/sys/netpfil/common/pft_synflood.py new file mode 100644 index 000000000000..3d37724593e2 --- /dev/null +++ b/tests/sys/netpfil/common/pft_synflood.py @@ -0,0 +1,62 @@ +#!/usr/bin/env python3 +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 Rubicon Communications, LLC (Netgate) +# +# 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. + +import argparse +import logging +logging.getLogger("scapy").setLevel(logging.CRITICAL) +import scapy.all as sp + +def syn_flood(args): + s = sp.conf.L2socket(iface=args.sendif[0]) + + # Set a src mac, to avoid doing lookups which really slow us down. + ether = sp.Ether(src='01:02:03:04:05') + ip = sp.IP(dst=args.to[0]) + for i in range(int(args.count[0])): + tcp = sp.TCP(flags='S', sport=1+i, dport=22, seq=500+i) + pkt = ether / ip / tcp + s.send(pkt) + +def main(): + parser = argparse.ArgumentParser("pft_synflood.py", + description="SYN flooding tool") + parser.add_argument('--sendif', nargs=1, + required=True, + help='The interface through which the packet(s) will be sent') + parser.add_argument('--to', nargs=1, + required=True, + help='The destination IP address for the SYN packets') + parser.add_argument('--count', nargs=1, + required=True, + help='The number of packets to send') + + args = parser.parse_args() + + syn_flood(args) + +if __name__ == '__main__': + main() diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 8bbc498f38c5..2f92d835772b 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -11,6 +11,7 @@ ATF_TESTS_SH+= altq \ dup \ forward \ fragmentation \ + get_state \ icmp \ killstate \ map_e \ diff --git a/tests/sys/netpfil/pf/get_state.sh b/tests/sys/netpfil/pf/get_state.sh new file mode 100644 index 000000000000..5e6a9040e016 --- /dev/null +++ b/tests/sys/netpfil/pf/get_state.sh @@ -0,0 +1,81 @@ +# $FreeBSD$ +# +# SPDX-License-Identifier: BSD-2-Clause-FreeBSD +# +# Copyright (c) 2021 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +. $(atf_get_srcdir)/utils.subr + +common_dir=$(atf_get_srcdir)/../common + +atf_test_case "many" "cleanup" +many_head() +{ + atf_set descr 'Test retrieving many states' + atf_set require.user root + atf_set require.progs scapy +} + +many_body() +{ + pft_init + + epair=$(vnet_mkepair) + ifconfig ${epair}a 192.0.2.1/24 up + + vnet_mkjail alcatraz ${epair}b + jexec alcatraz ifconfig ${epair}b 192.0.2.2/24 up + jexec alcatraz pfctl -e + + pft_set_rules alcatraz "set timeout tcp.closed 60000" \ + "pass in proto icmp" \ + "pass in proto tcp" + + # Sanity check + atf_check -s exit:0 -o ignore ping -c 1 -W 1 192.0.2.2 + + # Now syn flood to create many states + ${common_dir}/pft_synflood.py \ + --sendif ${epair}a \ + --to 192.0.2.2 \ + --count 20000 + + count=$(time jexec alcatraz pfctl -ss | wc -l 2>time.txt) + echo "Found $count states in `cat time.txt`" + if [ $count -lt 20000 ]; + then + atf_fail "Fail to retrieve states" + fi +} + +many_cleanup() +{ + rm -f time.txt + pft_cleanup +} + +atf_init_test_cases() +{ + atf_add_test_case "many" +} From owner-dev-commits-src-all@freebsd.org Fri Jul 2 13:49:16 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E531E66C6F1; Fri, 2 Jul 2021 13:49: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 4GGbzJ5lF0z4c7G; Fri, 2 Jul 2021 13:49: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 AC94714FF6; Fri, 2 Jul 2021 13:49: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 162DnG34045422; Fri, 2 Jul 2021 13:49:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162DnGI1045421; Fri, 2 Jul 2021 13:49:16 GMT (envelope-from git) Date: Fri, 2 Jul 2021 13:49:16 GMT Message-Id: <202107021349.162DnGI1045421@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 34285eefddc9 - main - pf: Reduce the data returned in DIOCGETSTATESNV MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 34285eefddc99c994c3e5374ba7836cc7cfc8e2e Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 13:49:17 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=34285eefddc99c994c3e5374ba7836cc7cfc8e2e commit 34285eefddc99c994c3e5374ba7836cc7cfc8e2e Author: Kristof Provost AuthorDate: 2021-06-29 08:26:40 +0000 Commit: Kristof Provost CommitDate: 2021-07-02 12:47:23 +0000 pf: Reduce the data returned in DIOCGETSTATESNV This call is particularly slow due to the large amount of data it returns. Remove all fields pfctl does not use. There is no functional impact to pfctl, but it somewhat speeds up the call. It might affect other (i.e. non-FreeBSD) code that uses the new interface, but this call is very new, so there's unlikely to be any. No releases contained the previous version, so we choose to live with the ABI modification. Reviewed by: donner MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30944 --- lib/libpfctl/libpfctl.c | 22 ---------------------- lib/libpfctl/libpfctl.h | 12 ------------ sys/netpfil/pf/pf_nv.c | 34 +--------------------------------- 3 files changed, 1 insertion(+), 67 deletions(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 52cd0ed7f36c..524e2472238e 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -636,35 +636,15 @@ pfctl_nv_add_state_cmp(nvlist_t *nvl, const char *name, nvlist_destroy(nv); } -static void -pf_nvstate_scrub_to_state_scrub(const nvlist_t *nvl, - struct pfctl_state_scrub *scrub) -{ - bzero(scrub, sizeof(*scrub)); - - scrub->timestamp = nvlist_get_bool(nvl, "timestamp"); - scrub->ttl = nvlist_get_number(nvl, "ttl"); - scrub->ts_mod = nvlist_get_number(nvl, "ts_mod"); -} - static void pf_nvstate_peer_to_state_peer(const nvlist_t *nvl, struct pfctl_state_peer *peer) { bzero(peer, sizeof(*peer)); - if (nvlist_exists_nvlist(nvl, "scrub")) { - peer->scrub = malloc(sizeof(*peer->scrub)); - pf_nvstate_scrub_to_state_scrub( - nvlist_get_nvlist(nvl, "scrub"), - peer->scrub); - } - peer->seqlo = nvlist_get_number(nvl, "seqlo"); peer->seqhi = nvlist_get_number(nvl, "seqhi"); peer->seqdiff = nvlist_get_number(nvl, "seqdiff"); - peer->max_win = nvlist_get_number(nvl, "max_win"); - peer->mss = nvlist_get_number(nvl, "mss"); peer->state = nvlist_get_number(nvl, "state"); peer->wscale = nvlist_get_number(nvl, "wscale"); } @@ -721,9 +701,7 @@ pf_nvstate_to_state(const nvlist_t *nvl, struct pfctl_state *s) pf_nvuint_64_array(nvl, "packets", 2, s->packets, NULL); pf_nvuint_64_array(nvl, "bytes", 2, s->bytes, NULL); - s->log = nvlist_get_number(nvl, "log"); s->state_flags = nvlist_get_number(nvl, "state_flags"); - s->timeout = nvlist_get_number(nvl, "timeout"); s->sync_flags = nvlist_get_number(nvl, "sync_flags"); } diff --git a/lib/libpfctl/libpfctl.h b/lib/libpfctl/libpfctl.h index a54ee9db6ec7..62866e17f904 100644 --- a/lib/libpfctl/libpfctl.h +++ b/lib/libpfctl/libpfctl.h @@ -197,19 +197,10 @@ struct pfctl_kill { bool kill_match; }; -struct pfctl_state_scrub { - bool timestamp; - uint8_t ttl; - uint32_t ts_mod; -}; - struct pfctl_state_peer { - struct pfctl_state_scrub *scrub; uint32_t seqlo; uint32_t seqhi; uint32_t seqdiff; - uint16_t max_win; - uint16_t mss; uint8_t state; uint8_t wscale; }; @@ -243,10 +234,7 @@ struct pfctl_state { uint32_t creation; uint32_t expire; uint32_t pfsync_time; - uint16_t tag; - uint8_t log; uint8_t state_flags; - uint8_t timeout; uint32_t sync_flags; }; diff --git a/sys/netpfil/pf/pf_nv.c b/sys/netpfil/pf/pf_nv.c index 553290c88586..e52d52642eab 100644 --- a/sys/netpfil/pf/pf_nv.c +++ b/sys/netpfil/pf/pf_nv.c @@ -874,52 +874,22 @@ errout: return (NULL); } -static nvlist_t * -pf_state_scrub_to_nvstate_scrub(const struct pf_state_scrub *scrub) -{ - nvlist_t *nvl; - - nvl = nvlist_create(0); - if (nvl == NULL) - return (NULL); - - nvlist_add_bool(nvl, "timestamp", scrub->pfss_flags & PFSS_TIMESTAMP); - nvlist_add_number(nvl, "ttl", scrub->pfss_ttl); - nvlist_add_number(nvl, "ts_mod", scrub->pfss_ts_mod); - - return (nvl); -} - static nvlist_t * pf_state_peer_to_nvstate_peer(const struct pf_state_peer *peer) { - nvlist_t *nvl, *tmp; + nvlist_t *nvl; nvl = nvlist_create(0); if (nvl == NULL) return (NULL); - if (peer->scrub) { - tmp = pf_state_scrub_to_nvstate_scrub(peer->scrub); - if (tmp == NULL) - goto errout; - nvlist_add_nvlist(nvl, "scrub", tmp); - nvlist_destroy(tmp); - } - nvlist_add_number(nvl, "seqlo", peer->seqlo); nvlist_add_number(nvl, "seqhi", peer->seqhi); nvlist_add_number(nvl, "seqdiff", peer->seqdiff); - nvlist_add_number(nvl, "max_win", peer->max_win); - nvlist_add_number(nvl, "mss", peer->mss); nvlist_add_number(nvl, "state", peer->state); nvlist_add_number(nvl, "wscale", peer->wscale); return (nvl); - -errout: - nvlist_destroy(nvl); - return (NULL); } nvlist_t * @@ -989,9 +959,7 @@ pf_state_to_nvstate(const struct pf_state *s) nvlist_add_number(nvl, "creatorid", s->creatorid); nvlist_add_number(nvl, "direction", s->direction); - nvlist_add_number(nvl, "log", s->log); nvlist_add_number(nvl, "state_flags", s->state_flags); - nvlist_add_number(nvl, "timeout", s->timeout); if (s->src_node) flags |= PFSYNC_FLAG_SRCNODE; if (s->nat_src_node) From owner-dev-commits-src-all@freebsd.org Fri Jul 2 13:49:18 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6AFD066D2C7; Fri, 2 Jul 2021 13:49: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 4GGbzL1yyRz4cFZ; Fri, 2 Jul 2021 13:49: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 D863E154B4; Fri, 2 Jul 2021 13:49: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 162DnHRb045446; Fri, 2 Jul 2021 13:49:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162DnHE5045445; Fri, 2 Jul 2021 13:49:17 GMT (envelope-from git) Date: Fri, 2 Jul 2021 13:49:17 GMT Message-Id: <202107021349.162DnHE5045445@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: a19ff8ce9b58 - main - pf: getstates: avoid taking the hashrow lock if the row is empty MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a19ff8ce9b58548a5f965db2c46eb03c38b15edb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 13:49:18 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a19ff8ce9b58548a5f965db2c46eb03c38b15edb commit a19ff8ce9b58548a5f965db2c46eb03c38b15edb Author: Kristof Provost AuthorDate: 2021-06-29 09:34:49 +0000 Commit: Kristof Provost CommitDate: 2021-07-02 12:47:54 +0000 pf: getstates: avoid taking the hashrow lock if the row is empty Reviewed by: mjg MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30946 --- sys/netpfil/pf/pf_ioctl.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index a802780277aa..9acfe56b7208 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -5054,6 +5054,10 @@ pf_getstates(struct pfioc_nv *nv) for (int i = 0; i < pf_hashmask; i++) { struct pf_idhash *ih = &V_pf_idhash[i]; + /* Avoid taking the lock if there are no states in the row. */ + if (LIST_EMPTY(&ih->states)) + continue; + PF_HASHROW_LOCK(ih); LIST_FOREACH(s, &ih->states, entry) { if (s->timeout == PFTM_UNLINKED) From owner-dev-commits-src-all@freebsd.org Fri Jul 2 13:49:19 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6DA5366D199; Fri, 2 Jul 2021 13:49: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 4GGbzM1crTz4c7W; Fri, 2 Jul 2021 13:49: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 0AE631524F; Fri, 2 Jul 2021 13:49: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 162DnIWE045477; Fri, 2 Jul 2021 13:49:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162DnIrX045476; Fri, 2 Jul 2021 13:49:18 GMT (envelope-from git) Date: Fri, 2 Jul 2021 13:49:18 GMT Message-Id: <202107021349.162DnIrX045476@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 0e9f1892ec73 - main - libpfctl: memory leak fix MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e9f1892ec739d7fbd854af699507167a0a5dde2 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 13:49:19 -0000 The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=0e9f1892ec739d7fbd854af699507167a0a5dde2 commit 0e9f1892ec739d7fbd854af699507167a0a5dde2 Author: Kristof Provost AuthorDate: 2021-06-30 11:02:35 +0000 Commit: Kristof Provost CommitDate: 2021-07-02 12:48:25 +0000 libpfctl: memory leak fix We must remember to free the nvlist we create from the kernel's response to DIOCGETSTATESNV, on every iteration. Reviewed by: donner MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D30957 --- lib/libpfctl/libpfctl.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index 524e2472238e..bbb53edf8bc1 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -727,6 +727,7 @@ pfctl_get_states(int dev, struct pfctl_states *states) goto out; } + nvlist_destroy(nvl); nvl = nvlist_unpack(nv.data, nv.len, 0); if (nvl == NULL) { error = EIO; From owner-dev-commits-src-all@freebsd.org Fri Jul 2 18:43:25 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0392E670EA5; Fri, 2 Jul 2021 18:43: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 4GGkVh6VnJz3LgN; Fri, 2 Jul 2021 18:43: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 C78A0192E4; Fri, 2 Jul 2021 18:43: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 162IhOmV044931; Fri, 2 Jul 2021 18:43:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162IhOQ1044930; Fri, 2 Jul 2021 18:43:24 GMT (envelope-from git) Date: Fri, 2 Jul 2021 18:43:24 GMT Message-Id: <202107021843.162IhOQ1044930@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: db6eac682189 - main - nvmem(9): install the manpage MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: db6eac6821895ae57b25953146a14232503fd397 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 18:43:25 -0000 The branch main has been updated by ceri (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=db6eac6821895ae57b25953146a14232503fd397 commit db6eac6821895ae57b25953146a14232503fd397 Author: Ceri Davies AuthorDate: 2021-07-02 18:35:59 +0000 Commit: Ceri Davies CommitDate: 2021-07-02 18:43:02 +0000 nvmem(9): install the manpage This is being installed on all architectures in line with the OF_* pages. Discussed with: fernape, manu --- share/man/man9/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index 19da0a012912..ac4cf67f52f7 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -228,6 +228,7 @@ MAN= accept_filter.9 \ namei.9 \ netisr.9 \ nv.9 \ + nvmem.9 \ OF_child.9 \ OF_device_from_xref.9 \ OF_finddevice.9 \ From owner-dev-commits-src-all@freebsd.org Fri Jul 2 18:43:26 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 23686671004; Fri, 2 Jul 2021 18:43: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 4GGkVk0Pdtz3M8d; Fri, 2 Jul 2021 18:43:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id E9F6A19271; Fri, 2 Jul 2021 18:43:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162IhPoe044963; Fri, 2 Jul 2021 18:43:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162IhPvS044962; Fri, 2 Jul 2021 18:43:25 GMT (envelope-from git) Date: Fri, 2 Jul 2021 18:43:25 GMT Message-Id: <202107021843.162IhPvS044962@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ceri Davies Subject: git: 202edfe35798 - main - committers-doc.dot: move myself out of alumni MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ceri X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 202edfe3579850683bb8093c6ef83033836d55aa Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 18:43:26 -0000 The branch main has been updated by ceri (doc committer): URL: https://cgit.FreeBSD.org/src/commit/?id=202edfe3579850683bb8093c6ef83033836d55aa commit 202edfe3579850683bb8093c6ef83033836d55aa Author: Ceri Davies AuthorDate: 2021-07-02 18:42:14 +0000 Commit: Ceri Davies CommitDate: 2021-07-02 18:43:02 +0000 committers-doc.dot: move myself out of alumni --- share/misc/committers-doc.dot | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/share/misc/committers-doc.dot b/share/misc/committers-doc.dot index a4e76cddd9ed..4cb33ba7a875 100644 --- a/share/misc/committers-doc.dot +++ b/share/misc/committers-doc.dot @@ -32,7 +32,6 @@ node [color=grey62, style=filled, bgcolor=black]; ache [label="Andrey Chernov\nache@FreeBSD.org\n1997/06/13\n2010/12/11"] bmah [label="Bruce A. Mah\nbmah@FreeBSD.org\n2000/08/22\n2009/09/13"] bvs [label="Vitaly Bogdanov\nbvs@FreeBSD.org\n2005/10/03\n2010/12/11"] -ceri [label="Ceri Davies\nceri@FreeBSD.org\n2002/03/17\n2012/02/29"] den [label="Denis Peplin\nden@FreeBSD.org\n2003/09/13\n2009/07/09"] garys [label="Gary W. Swearingen\ngarys@FreeBSD.org\n2005/08/21\n2008/03/02"] jcamou [label="Jesus R. Camou\njcamou@FreeBSD.org\n2005/03/02\n2008/12/20"] @@ -59,6 +58,7 @@ blackend [label="Marc Fonvieille\nblackend@FreeBSD.org\n2002/06/16"] brd [label="Brad Davis\nbrd@FreeBSD.org\n2005/06/01"] brueffer [label="Christian Brueffer\nbrueffer@FreeBSD.org\n2003/01/13"] carlavilla [label="Sergio Carlavilla\ncarlavilla@FreeBSD.org\n2019/05/16"] +ceri [label="Ceri Davies\nceri@FreeBSD.org\n2002/03/17"] chinsan [label="Chinsan Huang\nchinsan@FreeBSD.org\n2006/09/20"] crees [label="Chris Rees\ncrees@FreeBSD.org\n2013/05/27"] danger [label="Daniel Gerzo\ndanger@FreeBSD.org\n2006/08/20"] @@ -127,6 +127,7 @@ bcr -> gbe bcr -> debdrup blackend -> ale +blackend -> ceri brueffer -> joel From owner-dev-commits-src-all@freebsd.org Fri Jul 2 22:05:37 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 0499867358E; Fri, 2 Jul 2021 22:05:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGq006X6Kz4VQt; Fri, 2 Jul 2021 22:05:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BB2D51BDD8; Fri, 2 Jul 2021 22:05:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162M5aR4010231; Fri, 2 Jul 2021 22:05:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162M5aRk010230; Fri, 2 Jul 2021 22:05:36 GMT (envelope-from git) Date: Fri, 2 Jul 2021 22:05:36 GMT Message-Id: <202107022205.162M5aRk010230@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 80a75155e160 - main - nvme: style nit MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 80a75155e1601bddc2c595c06ab6ea916c603071 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 22:05:37 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=80a75155e1601bddc2c595c06ab6ea916c603071 commit 80a75155e1601bddc2c595c06ab6ea916c603071 Author: Warner Losh AuthorDate: 2021-07-02 21:58:14 +0000 Commit: Warner Losh CommitDate: 2021-07-02 22:05:19 +0000 nvme: style nit Put the { on the same line as the struct nvme_foo when we define these structures. It's FreeBSD standard and these were inconsistent. Sponsored by: Netflix --- sys/dev/nvme/nvme.h | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index b28a8d4348db..d63a074f321d 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -546,8 +546,7 @@ enum shst_value { NVME_SHST_COMPLETE = 0x2, }; -struct nvme_registers -{ +struct nvme_registers { uint32_t cap_lo; /* controller capabilities */ uint32_t cap_hi; uint32_t vs; /* version */ @@ -584,8 +583,7 @@ struct nvme_registers _Static_assert(sizeof(struct nvme_registers) == 0x1008, "bad size for nvme_registers"); -struct nvme_command -{ +struct nvme_command { /* dword 0 */ uint8_t opc; /* opcode */ uint8_t fuse; /* fused operation */ @@ -1446,8 +1444,7 @@ struct nvme_sanitize_status_page { _Static_assert(sizeof(struct nvme_sanitize_status_page) == 512, "bad size for nvme_sanitize_status_page"); -struct intel_log_temp_stats -{ +struct intel_log_temp_stats { uint64_t current; uint64_t overtemp_flag_last; uint64_t overtemp_flag_life; @@ -1461,8 +1458,7 @@ struct intel_log_temp_stats _Static_assert(sizeof(struct intel_log_temp_stats) == 13 * 8, "bad size for intel_log_temp_stats"); -struct nvme_resv_reg_ctrlr -{ +struct nvme_resv_reg_ctrlr { uint16_t ctrlr_id; /* Controller ID */ uint8_t rcsts; /* Reservation Status */ uint8_t reserved3[5]; @@ -1472,8 +1468,7 @@ struct nvme_resv_reg_ctrlr _Static_assert(sizeof(struct nvme_resv_reg_ctrlr) == 24, "bad size for nvme_resv_reg_ctrlr"); -struct nvme_resv_reg_ctrlr_ext -{ +struct nvme_resv_reg_ctrlr_ext { uint16_t ctrlr_id; /* Controller ID */ uint8_t rcsts; /* Reservation Status */ uint8_t reserved3[5]; @@ -1484,8 +1479,7 @@ struct nvme_resv_reg_ctrlr_ext _Static_assert(sizeof(struct nvme_resv_reg_ctrlr_ext) == 64, "bad size for nvme_resv_reg_ctrlr_ext"); -struct nvme_resv_status -{ +struct nvme_resv_status { uint32_t gen; /* Generation */ uint8_t rtype; /* Reservation Type */ uint8_t regctl[2]; /* Number of Registered Controllers */ @@ -1497,8 +1491,7 @@ struct nvme_resv_status _Static_assert(sizeof(struct nvme_resv_status) == 24, "bad size for nvme_resv_status"); -struct nvme_resv_status_ext -{ +struct nvme_resv_status_ext { uint32_t gen; /* Generation */ uint8_t rtype; /* Reservation Type */ uint8_t regctl[2]; /* Number of Registered Controllers */ From owner-dev-commits-src-all@freebsd.org Fri Jul 2 22:05:38 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 33B44673590; Fri, 2 Jul 2021 22:05:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGq0208rCz4Vdl; Fri, 2 Jul 2021 22:05:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DD7F41BDD9; Fri, 2 Jul 2021 22:05:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162M5bnL010255; Fri, 2 Jul 2021 22:05:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162M5b87010254; Fri, 2 Jul 2021 22:05:37 GMT (envelope-from git) Date: Fri, 2 Jul 2021 22:05:37 GMT Message-Id: <202107022205.162M5b87010254@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: fea3cf1d6da0 - main - nvme: Fix alignment on nvme structures MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fea3cf1d6da0acf40bc1d3dadeeea7eeccbc10dd Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 22:05:38 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fea3cf1d6da0acf40bc1d3dadeeea7eeccbc10dd commit fea3cf1d6da0acf40bc1d3dadeeea7eeccbc10dd Author: Warner Losh AuthorDate: 2021-07-02 21:58:19 +0000 Commit: Warner Losh CommitDate: 2021-07-02 22:05:19 +0000 nvme: Fix alignment on nvme structures Remove __packed from nvme_command, nvme_completion and nvme_dsm_trim. Add super-alignment to nvme_completion since it's always at least that aligned in hardware (and in our existing uses of it embedded in structures). It generates better code in nvme_qpair_process_completions on riscv64 because otherwise the ABI assumes a 4-byte alignment, and the same on all other platforms. Reviewed by: jrtc27@, mav@, chuck@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D31001 --- sys/dev/nvme/nvme.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/dev/nvme/nvme.h b/sys/dev/nvme/nvme.h index d63a074f321d..7d153c61165c 100644 --- a/sys/dev/nvme/nvme.h +++ b/sys/dev/nvme/nvme.h @@ -578,8 +578,8 @@ struct nvme_registers { struct { uint32_t sq_tdbl; /* submission queue tail doorbell */ uint32_t cq_hdbl; /* completion queue head doorbell */ - } doorbell[1] __packed; -} __packed; + } doorbell[1]; +}; _Static_assert(sizeof(struct nvme_registers) == 0x1008, "bad size for nvme_registers"); @@ -612,7 +612,7 @@ struct nvme_command { uint32_t cdw13; /* command-specific */ uint32_t cdw14; /* command-specific */ uint32_t cdw15; /* command-specific */ -} __packed; +}; _Static_assert(sizeof(struct nvme_command) == 16 * 4, "bad size for nvme_command"); @@ -630,7 +630,7 @@ struct nvme_completion { /* dword 3 */ uint16_t cid; /* command identifier */ uint16_t status; -} __packed; +} __aligned(8); /* riscv: nvme_qpair_process_completions has better code gen */ _Static_assert(sizeof(struct nvme_completion) == 4 * 4, "bad size for nvme_completion"); @@ -638,7 +638,7 @@ struct nvme_dsm_range { uint32_t attributes; uint32_t length; uint64_t starting_lba; -} __packed; +}; /* Largest DSM Trim that can be done */ #define NVME_MAX_DSM_TRIM 4096 From owner-dev-commits-src-all@freebsd.org Fri Jul 2 22:05:39 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 60D2A673299; Fri, 2 Jul 2021 22:05:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGq0323Qyz4Vbf; Fri, 2 Jul 2021 22:05:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 154631BEBD; Fri, 2 Jul 2021 22:05:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162M5c68010286; Fri, 2 Jul 2021 22:05:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162M5cbP010285; Fri, 2 Jul 2021 22:05:38 GMT (envelope-from git) Date: Fri, 2 Jul 2021 22:05:38 GMT Message-Id: <202107022205.162M5cbP010285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: aa0ab681ae75 - main - nvme: coherently read status of completion records MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa0ab681ae755e01cd69435fab50f6852f248c42 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 22:05:39 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=aa0ab681ae755e01cd69435fab50f6852f248c42 commit aa0ab681ae755e01cd69435fab50f6852f248c42 Author: Warner Losh AuthorDate: 2021-07-02 22:00:42 +0000 Commit: Warner Losh CommitDate: 2021-07-02 22:05:19 +0000 nvme: coherently read status of completion records Coherently read the phase bit of the status completion record. We loop over the completion record array, looking for all the transactions in the same phase that have been completed. In doing that, we have to be careful to read the status field first, and if it indicates a complete record, we need to read and process that record. Otherwise, the host might be overtaken by device when reading this completion record, leading to a mistaken belief that the record is in phase. This leads to the code using old values and looking at an already completed entry, which has no current tracker. To work around this problem, we read the status and make sure it is in phase, we then re-read the entire completion record guaranteeing it's complete, valid, and consistent . In addition we resync the dmatag to reflect changes since the prior loop for the bouncing dma case. Reviewed by: jrtc27@, chuck@ Found by: jrtc27 (this fix is based in part on her D30995 fix) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D31002 --- sys/dev/nvme/nvme_qpair.c | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) diff --git a/sys/dev/nvme/nvme_qpair.c b/sys/dev/nvme/nvme_qpair.c index 0726ca248442..12770f38d42e 100644 --- a/sys/dev/nvme/nvme_qpair.c +++ b/sys/dev/nvme/nvme_qpair.c @@ -583,13 +583,30 @@ nvme_qpair_process_completions(struct nvme_qpair *qpair) } while (1) { - cpl = qpair->cpl[qpair->cq_head]; + uint16_t status; - /* Convert to host endian */ + /* + * We need to do this dance to avoid a race between the host and + * the device where the device overtakes the host while the host + * is reading this record, leaving the status field 'new' and + * the sqhd and cid fields potentially stale. If the phase + * doesn't match, that means status hasn't yet been updated and + * we'll get any pending changes next time. It also means that + * the phase must be the same the second time. We have to sync + * before reading to ensure any bouncing completes. + */ + status = le16toh(qpair->cpl[qpair->cq_head].status); + if (NVME_STATUS_GET_P(status) != qpair->phase) + break; + + bus_dmamap_sync(qpair->dma_tag, qpair->queuemem_map, + BUS_DMASYNC_POSTREAD | BUS_DMASYNC_POSTWRITE); + cpl = qpair->cpl[qpair->cq_head]; nvme_completion_swapbytes(&cpl); - if (NVME_STATUS_GET_P(cpl.status) != qpair->phase) - break; + KASSERT( + NVME_STATUS_GET_P(status) == NVME_STATUS_GET_P(cpl.status), + ("Phase unexpectedly inconsistent")); tr = qpair->act_tr[cpl.cid]; From owner-dev-commits-src-all@freebsd.org Fri Jul 2 22:24:29 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 4D38B673A85; Fri, 2 Jul 2021 22:24: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 4GGqPn1kVlz4Wff; Fri, 2 Jul 2021 22: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 221571C1D7; Fri, 2 Jul 2021 22: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 162MOTLb037057; Fri, 2 Jul 2021 22: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 162MOT6I037056; Fri, 2 Jul 2021 22:24:29 GMT (envelope-from git) Date: Fri, 2 Jul 2021 22:24:29 GMT Message-Id: <202107022224.162MOT6I037056@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Robert Wing Subject: git: dc3548453689 - main - dumpfs(8): add option to only print superblock information MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dc3548453689b30ad712e4391a99d3e7df0cad40 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 22:24:29 -0000 The branch main has been updated by rew: URL: https://cgit.FreeBSD.org/src/commit/?id=dc3548453689b30ad712e4391a99d3e7df0cad40 commit dc3548453689b30ad712e4391a99d3e7df0cad40 Author: Robert Wing AuthorDate: 2021-07-02 22:18:17 +0000 Commit: Robert Wing CommitDate: 2021-07-02 22:18:17 +0000 dumpfs(8): add option to only print superblock information Add an option to dumpfs, `-s`, that only prints the super block information. Reviewed by: chs, imp Differential Revision: https://reviews.freebsd.org/D30881 --- sbin/dumpfs/dumpfs.8 | 12 +++++++++--- sbin/dumpfs/dumpfs.c | 17 +++++++++++------ 2 files changed, 20 insertions(+), 9 deletions(-) diff --git a/sbin/dumpfs/dumpfs.8 b/sbin/dumpfs/dumpfs.8 index 5938282cc257..ec5b12550447 100644 --- a/sbin/dumpfs/dumpfs.8 +++ b/sbin/dumpfs/dumpfs.8 @@ -28,7 +28,7 @@ .\" @(#)dumpfs.8 8.1 (Berkeley) 6/5/93 .\" $FreeBSD$ .\" -.Dd May 16, 2013 +.Dd July 2, 2021 .Dt DUMPFS 8 .Os .Sh NAME @@ -39,6 +39,7 @@ .Op Fl f .Op Fl l .Op Fl m +.Op Fl s .Ar filesys | device .Sh DESCRIPTION The @@ -46,9 +47,10 @@ The utility prints out the UFS super block and cylinder group information for the file system or special device specified, unless the .Fl f , -.Fl l +.Fl l , +.Fl m , or -.Fl m +.Fl s flag is specified. The listing is very long and detailed. This @@ -97,6 +99,10 @@ The .Fl r flag is needed if the filesystem uses .Xr gjournal 8 . +.Pp +If +.Fl s +is specified, only the super block information is printed. .Sh SEE ALSO .Xr fs 5 , .Xr fsck 8 , diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index 3ac59ccc0875..7c43cf4489a8 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -81,7 +81,7 @@ static const char rcsid[] = static struct uufsd disk; -static int dumpfs(const char *); +static int dumpfs(const char *, int); static int dumpfsid(void); static int dumpcg(void); static int dumpfreespace(const char *, int); @@ -96,11 +96,11 @@ int main(int argc, char *argv[]) { const char *name; - int ch, dofreespace, domarshal, dolabel, eval; + int ch, dofreespace, domarshal, dolabel, dosb, eval; - dofreespace = domarshal = dolabel = eval = 0; + dofreespace = domarshal = dolabel = dosb = eval = 0; - while ((ch = getopt(argc, argv, "lfm")) != -1) { + while ((ch = getopt(argc, argv, "lfms")) != -1) { switch (ch) { case 'f': dofreespace++; @@ -111,6 +111,9 @@ main(int argc, char *argv[]) case 'l': dolabel = 1; break; + case 's': + dosb = 1; + break; case '?': default: usage(); @@ -139,7 +142,7 @@ main(int argc, char *argv[]) else if (dolabel) eval |= dumpfsid(); else - eval |= dumpfs(name); + eval |= dumpfs(name, dosb); ufs_disk_close(&disk); } exit(eval); @@ -154,7 +157,7 @@ dumpfsid(void) } static int -dumpfs(const char *name) +dumpfs(const char *name, int dosb) { time_t fstime, fsmtime; int64_t fssize; @@ -324,6 +327,8 @@ dumpfs(const char *name) printf("blocks in last group %ld\n\n", (long)((fssize % afs.fs_fpg) / afs.fs_frag)); } + if (dosb) + return (0); while ((i = cgread(&disk)) != 0) { if (i == -1 || dumpcg()) goto err; From owner-dev-commits-src-all@freebsd.org Fri Jul 2 22:32:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id F3A48673C80; Fri, 2 Jul 2021 22:32: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 4GGqb26Y01z4XYw; Fri, 2 Jul 2021 22:32: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 CA1751C706; Fri, 2 Jul 2021 22:32: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 162MWUCG049890; Fri, 2 Jul 2021 22:32:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162MWUIY049889; Fri, 2 Jul 2021 22:32:30 GMT (envelope-from git) Date: Fri, 2 Jul 2021 22:32:30 GMT Message-Id: <202107022232.162MWUIY049889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 25392fac9488 - main - libalias: Fix splay comparsion bug MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 25392fac9488bcae5c451500df2e2945430484a6 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 22:32:31 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=25392fac9488bcae5c451500df2e2945430484a6 commit 25392fac9488bcae5c451500df2e2945430484a6 Author: Lutz Donnerhacke AuthorDate: 2021-07-02 21:41:25 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-07-02 22:31:53 +0000 libalias: Fix splay comparsion bug Comparing elements in a tree requires transitiviy. If a < b and b < c then a must be smaller than c. This way the tree elements are always pairwise comparable. Tristate comparsion functions returning values lower, equal, or greater than zero, are usually implemented by a simple subtraction of the operands. If the size of the operands are equal to the size of the result, integer modular arithmetics kick in and violates the transitivity. Example: Working on byte with 0, 120, and 240. Now computing the differences: 120 - 0 = 120 240 - 120 = 120 240 - 0 = -16 MFC after: 3 days --- sys/netinet/libalias/alias_db.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/netinet/libalias/alias_db.h b/sys/netinet/libalias/alias_db.h index ec0b69c01f82..971ca305c1a6 100644 --- a/sys/netinet/libalias/alias_db.h +++ b/sys/netinet/libalias/alias_db.h @@ -351,10 +351,10 @@ static inline int cmp_out(struct alias_link *a, struct alias_link *b) { int i = a->src_port - b->src_port; if (i != 0) return (i); - i = a->src_addr.s_addr - b->src_addr.s_addr; - if (i != 0) return (i); - i = a->dst_addr.s_addr - b->dst_addr.s_addr; - if (i != 0) return (i); + if (a->src_addr.s_addr > b->src_addr.s_addr) return (1); + if (a->src_addr.s_addr < b->src_addr.s_addr) return (-1); + if (a->dst_addr.s_addr > b->dst_addr.s_addr) return (1); + if (a->dst_addr.s_addr < b->dst_addr.s_addr) return (-1); i = a->dst_port - b->dst_port; if (i != 0) return (i); i = a->link_type - b->link_type; @@ -368,8 +368,9 @@ cmp_in(struct group_in *a, struct group_in *b) { if (i != 0) return (i); i = a->link_type - b->link_type; if (i != 0) return (i); - i = a->alias_addr.s_addr - b->alias_addr.s_addr; - return (i); + if (a->alias_addr.s_addr > b->alias_addr.s_addr) return (1); + if (a->alias_addr.s_addr < b->alias_addr.s_addr) return (-1); + return (0); } SPLAY_PROTOTYPE(splay_in, group_in, in, cmp_in); From owner-dev-commits-src-all@freebsd.org Fri Jul 2 22:32:32 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 316436732FC; Fri, 2 Jul 2021 22:32:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGqb40kylz4XC2; Fri, 2 Jul 2021 22:32: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 ECE101C707; Fri, 2 Jul 2021 22:32: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 162MWVv0049914; Fri, 2 Jul 2021 22:32:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162MWVH3049913; Fri, 2 Jul 2021 22:32:31 GMT (envelope-from git) Date: Fri, 2 Jul 2021 22:32:31 GMT Message-Id: <202107022232.162MWVH3049913@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: b3dc6f137b8d - main - tests/libalias: Bugfix in used variables MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b3dc6f137b8d626c4415a5fa9c9874ac4ca78658 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 22:32:32 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=b3dc6f137b8d626c4415a5fa9c9874ac4ca78658 commit b3dc6f137b8d626c4415a5fa9c9874ac4ca78658 Author: Lutz Donnerhacke AuthorDate: 2021-07-02 21:58:16 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-07-02 22:31:54 +0000 tests/libalias: Bugfix in used variables Fix two copy and waste errors (referencing the wrong variable). MFC after: 3 days --- tests/sys/netinet/libalias/3_natin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/netinet/libalias/3_natin.c b/tests/sys/netinet/libalias/3_natin.c index e8e5257e4baa..3bc088ce3da9 100644 --- a/tests/sys/netinet/libalias/3_natin.c +++ b/tests/sys/netinet/libalias/3_natin.c @@ -112,7 +112,7 @@ ATF_TC_BODY(1_portforward, dummy) LibAliasSetAddress(la, masq); /* delete and try again */ - LibAliasRedirectDelete(la, pf2); + LibAliasRedirectDelete(la, pf3); UDP_UNNAT_FAIL(p, u, ext, 0x5678, masq, 0xabcd); /* @@ -133,7 +133,7 @@ ATF_TC_BODY(1_portforward, dummy) LibAliasSetAddress(la, masq); /* delete and try again */ - LibAliasRedirectDelete(la, pf2); + LibAliasRedirectDelete(la, pf4); UDP_UNNAT_FAIL(p, u, ext, 0x5678, masq, 0xabcd); free(p); From owner-dev-commits-src-all@freebsd.org Fri Jul 2 22:36:20 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9AE1A673C9F; Fri, 2 Jul 2021 22:36: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 4GGqgS3kl7z4XJJ; Fri, 2 Jul 2021 22:36: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 688A21C709; Fri, 2 Jul 2021 22:36: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 162MaKhI050352; Fri, 2 Jul 2021 22:36:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162MaKva050351; Fri, 2 Jul 2021 22:36:20 GMT (envelope-from git) Date: Fri, 2 Jul 2021 22:36:20 GMT Message-Id: <202107022236.162MaKva050351@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 5866c369e4fd - main - Revert libunwind change to fix backtrace segfault on aarch64 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5866c369e4fd917c0d456f0f10b92ee354b82279 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 22:36:20 -0000 The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=5866c369e4fd917c0d456f0f10b92ee354b82279 commit 5866c369e4fd917c0d456f0f10b92ee354b82279 Author: Dimitry Andric AuthorDate: 2021-07-02 22:35:42 +0000 Commit: Dimitry Andric CommitDate: 2021-07-02 22:35:49 +0000 Revert libunwind change to fix backtrace segfault on aarch64 Revert commit 22b615a96593 from llvm git (by Daniel Kiss): [libunwind] Support for leaf function unwinding. Unwinding leaf function is useful in cases when the backtrace finds a leaf function for example when it caused a signal. This patch also add the support for the DW_CFA_undefined because it marks the end of the frames. Ryan Prichard provided code for the tests. Reviewed By: #libunwind, mstorsjo Differential Revision: https://reviews.llvm.org/D83573 Reland with limit the test to the x86_64-linux target. Bisection has shown that this particular upstream commit causes programs using backtrace(3) on aarch64 to segfault. This affects the lang/rust port, for instance. Until we can upstream to fix this problem, revert the commit for now. Reported by: mikael PR: 256864 --- contrib/llvm-project/libunwind/src/DwarfInstructions.hpp | 9 +-------- contrib/llvm-project/libunwind/src/DwarfParser.hpp | 3 +-- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/contrib/llvm-project/libunwind/src/DwarfInstructions.hpp b/contrib/llvm-project/libunwind/src/DwarfInstructions.hpp index c39cabe1f783..ee98f538d437 100644 --- a/contrib/llvm-project/libunwind/src/DwarfInstructions.hpp +++ b/contrib/llvm-project/libunwind/src/DwarfInstructions.hpp @@ -93,8 +93,7 @@ typename A::pint_t DwarfInstructions::getSavedRegister( case CFI_Parser::kRegisterInRegister: return registers.getRegister((int)savedReg.value); - case CFI_Parser::kRegisterUndefined: - return 0; + case CFI_Parser::kRegisterUnused: case CFI_Parser::kRegisterOffsetFromCFA: // FIX ME @@ -118,7 +117,6 @@ double DwarfInstructions::getSavedFloatRegister( case CFI_Parser::kRegisterIsExpression: case CFI_Parser::kRegisterUnused: - case CFI_Parser::kRegisterUndefined: case CFI_Parser::kRegisterOffsetFromCFA: case CFI_Parser::kRegisterInRegister: // FIX ME @@ -142,7 +140,6 @@ v128 DwarfInstructions::getSavedVectorRegister( case CFI_Parser::kRegisterIsExpression: case CFI_Parser::kRegisterUnused: - case CFI_Parser::kRegisterUndefined: case CFI_Parser::kRegisterOffsetFromCFA: case CFI_Parser::kRegisterInRegister: // FIX ME @@ -193,10 +190,6 @@ int DwarfInstructions::stepWithDwarf(A &addressSpace, pint_t pc, prolog.savedRegisters[i])); else return UNW_EBADREG; - } else if (i == (int)cieInfo.returnAddressRegister) { - // Leaf function keeps the return address in register and there is no - // explicit intructions how to restore it. - returnAddress = registers.getRegister(cieInfo.returnAddressRegister); } } diff --git a/contrib/llvm-project/libunwind/src/DwarfParser.hpp b/contrib/llvm-project/libunwind/src/DwarfParser.hpp index de0eb6de9d70..b41cc7bcfda2 100644 --- a/contrib/llvm-project/libunwind/src/DwarfParser.hpp +++ b/contrib/llvm-project/libunwind/src/DwarfParser.hpp @@ -69,7 +69,6 @@ public: }; enum RegisterSavedWhere { kRegisterUnused, - kRegisterUndefined, kRegisterInCFA, kRegisterOffsetFromCFA, kRegisterInRegister, @@ -503,7 +502,7 @@ bool CFI_Parser::parseFDEInstructions(A &addressSpace, "malformed DW_CFA_undefined DWARF unwind, reg too big"); return false; } - results->setRegisterLocation(reg, kRegisterUndefined, initialState); + results->setRegisterLocation(reg, kRegisterUnused, initialState); _LIBUNWIND_TRACE_DWARF("DW_CFA_undefined(reg=%" PRIu64 ")\n", reg); break; case DW_CFA_same_value: From owner-dev-commits-src-all@freebsd.org Fri Jul 2 23:09:28 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 214F8673ED9; Fri, 2 Jul 2021 23:09:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGrPh09mnz4ZV7; Fri, 2 Jul 2021 23:09:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id DE2EB1CB2A; Fri, 2 Jul 2021 23:09:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162N9ReK090775; Fri, 2 Jul 2021 23:09:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162N9RPj090774; Fri, 2 Jul 2021 23:09:27 GMT (envelope-from git) Date: Fri, 2 Jul 2021 23:09:27 GMT Message-Id: <202107022309.162N9RPj090774@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: b50a4dce1854 - main - libalias: Avoid uninitialized expiration MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b50a4dce185481bebf8096c27588ae04a4a2fd7c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 23:09:28 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=b50a4dce185481bebf8096c27588ae04a4a2fd7c commit b50a4dce185481bebf8096c27588ae04a4a2fd7c Author: Lutz Donnerhacke AuthorDate: 2021-07-02 23:02:53 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-07-02 23:09:18 +0000 libalias: Avoid uninitialized expiration The expiration time of direct address mappings is explicitly uninitialized. Expire times are always compared during housekeeping. Despite the uninitialized value does not harm, it's simpler to just set it to a reasonable default. This was detected during valgrinding the test suite. MFC after: 3 days --- sys/netinet/libalias/alias_db.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/netinet/libalias/alias_db.c b/sys/netinet/libalias/alias_db.c index 19529271f49f..9f8c6064d2a7 100644 --- a/sys/netinet/libalias/alias_db.c +++ b/sys/netinet/libalias/alias_db.c @@ -613,8 +613,6 @@ AddLink(struct libalias *la, struct in_addr src_addr, struct in_addr dst_addr, case LINK_FRAGMENT_PTR: lnk->expire.time = FRAGMENT_PTR_EXPIRE_TIME; break; - case LINK_ADDR: - break; default: lnk->expire.time = PROTO_EXPIRE_TIME; break; From owner-dev-commits-src-all@freebsd.org Fri Jul 2 23:10:42 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id D5965673CF2; Fri, 2 Jul 2021 23:10:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GGrR65dXZz4ZMj; Fri, 2 Jul 2021 23:10:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id AA7D21CB9A; Fri, 2 Jul 2021 23:10:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 162NAgDt099174; Fri, 2 Jul 2021 23:10:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 162NAgLH099173; Fri, 2 Jul 2021 23:10:42 GMT (envelope-from git) Date: Fri, 2 Jul 2021 23:10:42 GMT Message-Id: <202107022310.162NAgLH099173@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 6329ca325e02 - main - hardclock.9: Refine some details MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6329ca325e02af4566346e725e2d07c85d4b3444 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jul 2021 23:10:42 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=6329ca325e02af4566346e725e2d07c85d4b3444 commit 6329ca325e02af4566346e725e2d07c85d4b3444 Author: Warner Losh AuthorDate: 2021-07-02 23:09:19 +0000 Commit: Warner Losh CommitDate: 2021-07-02 23:10:35 +0000 hardclock.9: Refine some details Refine mistakes from adaptaton of NetBSD's hardclock man page to FreeBSD: o clarify what usermode means o clarify how often hardclock is called o remove Xr callout(9) since that's done elsewhere Reviewed by: mav@ Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D30982 --- share/man/man9/hardclock.9 | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/share/man/man9/hardclock.9 b/share/man/man9/hardclock.9 index 2aab68cb5f85..451ad8a28a93 100644 --- a/share/man/man9/hardclock.9 +++ b/share/man/man9/hardclock.9 @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd March 25, 2010 +.Dd July 1, 2021 .Dt HARDCLOCK 9 .Os .Sh NAME @@ -39,19 +39,26 @@ .Sh DESCRIPTION The .Fn hardclock -function is called -.Xr hz 9 -times per second. -It implements the real-time system clock. -The argument +function is called periodically based on pending work. +The rate ranges from +.Va hz +times per second on a very busy system, to twice a second on an idle system. +The .Va cnt -is the estimated number of ticks since the last call to -.Fn hardclock . +argument reports an estimate of the number of ticks since the last call. +The sum of +.Va cnt +over a second averages +.Va hz +over the long haul. +See +.Xr hz 9 +for important details over shorter time scales. The argument .Va usermode is none-zero when .Fn hardclock -is called from a user-mode context. +is called from an context that interrupted usermode execution. .Pp .Fn hardclock may perform different tasks such as: @@ -96,5 +103,4 @@ processing. .Xr ntp_adjtime 2 , .Xr signal 3 , .Xr ntpd 8 , -.Xr callout 9 , .Xr hz 9 From owner-dev-commits-src-all@freebsd.org Sat Jul 3 00:28:29 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@freebsd.org Sat Jul 3 00:28:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@freebsd.org Sat Jul 3 00:28:31 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@freebsd.org Sat Jul 3 06:17:02 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A99A964BEEE; Sat, 3 Jul 2021 06:17: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 4GH1v248jrz3nsV; Sat, 3 Jul 2021 06:17: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 735A322540; Sat, 3 Jul 2021 06:17: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 1636H28Z062746; Sat, 3 Jul 2021 06:17:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1636H22I062745; Sat, 3 Jul 2021 06:17:02 GMT (envelope-from git) Date: Sat, 3 Jul 2021 06:17:02 GMT Message-Id: <202107030617.1636H22I062745@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ef790cc7407e - main - hdaa: update pin patch configurations MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: imp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ef790cc7407e827db9563d08a52a71ab36436986 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 06:17:02 -0000 The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ef790cc7407e827db9563d08a52a71ab36436986 commit ef790cc7407e827db9563d08a52a71ab36436986 Author: K Staring AuthorDate: 2021-07-03 06:15:49 +0000 Commit: Warner Losh CommitDate: 2021-07-03 06:15:49 +0000 hdaa: update pin patch configurations A number of structural changes: - Use decimal nid numbers instead of hex - updated the branch to incoorporate the suggestions made in the ALC280 pull request github thread - Convert magic pin values into strings. - Also update hdaa_patches to use clearer enums.. - made pin patch type enum clearer, add macro for 'string' type patches - Added pin_patch structures to separate data from logic. - Integrated Realtek patches into new structure. These incorporate fixes for ALC255, ALC256, ALC260, ALC262, ALC268, ALC269, ALC280, ALC282, ALC283, ALC286, ALC290, ALC293, ALC296, ALC2880 And have definitions for a number of Dell and HP laptops. Much of this data has been mined fromt he tables in the Linux driver. imp squashed these into one commit because the changes from the github pull requests no longer cleanly apply individually and made light style changes after feedback from jhb. Pull Request: https://github.com/freebsd/freebsd-src/pull/139 Pull Request: https://github.com/freebsd/freebsd-src/pull/140 Pull Request: https://github.com/freebsd/freebsd-src/pull/141 Pull Request: https://github.com/freebsd/freebsd-src/pull/142 Pull Request: https://github.com/freebsd/freebsd-src/pull/143 Pull Request: https://github.com/freebsd/freebsd-src/pull/144 Pull Request: https://github.com/freebsd/freebsd-src/pull/145 Pull Request: https://github.com/freebsd/freebsd-src/pull/146 Pull Request: https://github.com/freebsd/freebsd-src/pull/147 Pull Request: https://github.com/freebsd/freebsd-src/pull/148 Pull Request: https://github.com/freebsd/freebsd-src/pull/149 Pull Request: https://github.com/freebsd/freebsd-src/pull/150 Differential Revision: https://reviews.freebsd.org/D30619 --- sys/dev/sound/pci/hda/hdaa_patches.c | 259 +++----- sys/dev/sound/pci/hda/hdac.h | 145 ++++- sys/dev/sound/pci/hda/pin_patch.h | 121 ++++ sys/dev/sound/pci/hda/pin_patch_realtek.h | 992 ++++++++++++++++++++++++++++++ 4 files changed, 1327 insertions(+), 190 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c index 590c9e4d46fb..69299ee4344f 100644 --- a/sys/dev/sound/pci/hda/hdaa_patches.c +++ b/sys/dev/sound/pci/hda/hdaa_patches.c @@ -44,6 +44,9 @@ #include #include +#include "pin_patch.h" +#include "pin_patch_realtek.h" + SND_DECLARE_FILE("$FreeBSD$"); static const struct { @@ -145,10 +148,28 @@ static const struct { 0 } }; +static struct pin_patch_t * +match_pin_patches(int vendor_id, int vendor_subid) +{ + for (int ci = 0; ci < nitems(realtek_model_pin_patches); ci++) { + struct hdaa_model_pin_patch_t *p = &realtek_model_pin_patches[ci]; + if (vendor_id != p->id) + continue; + for (struct model_pin_patch_t *pp = p->patches; pp->models; pp++) { + for (struct pin_machine_model_t *model = pp->models; model->id != 0; model++) { + if (vendor_subid == model->id) + return (pp->pin_patches); + } + } + } + + return (0); +} + static void hdac_pin_patch(struct hdaa_widget *w) { - const char *patch = NULL; + const char *patch_str = NULL; uint32_t config, orig, id, subid; nid_t nid = w->nid; @@ -156,54 +177,7 @@ hdac_pin_patch(struct hdaa_widget *w) id = hdaa_codec_id(w->devinfo); subid = hdaa_card_id(w->devinfo); - /* XXX: Old patches require complete review. - * Now they may create more problem then solve due to - * incorrect associations. - */ - if (id == HDA_CODEC_ALC880 && subid == LG_LW20_SUBVENDOR) { - switch (nid) { - case 26: - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; - break; - case 27: - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT; - break; - default: - break; - } - } else if (id == HDA_CODEC_ALC880 && - (subid == CLEVO_D900T_SUBVENDOR || - subid == ASUS_M5200_SUBVENDOR)) { - /* - * Super broken BIOS - */ - switch (nid) { - case 24: /* MIC1 */ - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN; - break; - case 25: /* XXX MIC2 */ - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN; - break; - case 26: /* LINE1 */ - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; - break; - case 27: /* XXX LINE2 */ - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; - break; - case 28: /* CD */ - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_CD; - break; - } - } else if (id == HDA_CODEC_ALC883 && - (subid == MSI_MS034A_SUBVENDOR || - HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, subid))) { + if (id == HDA_CODEC_ALC883 && HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, subid)) { switch (nid) { case 25: config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | @@ -247,42 +221,6 @@ hdac_pin_patch(struct hdaa_widget *w) config |= HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE; break; } - } else if (id == HDA_CODEC_ALC861 && subid == - ASUS_W6F_SUBVENDOR) { - switch (nid) { - case 11: - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_OUT | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED); - break; - case 12: - case 14: - case 16: - case 31: - case 32: - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED); - break; - case 15: - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK); - break; - } - } else if (id == HDA_CODEC_ALC861 && subid == - UNIWILL_9075_SUBVENDOR) { - switch (nid) { - case 15: - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK); - break; - } } /* New patches */ @@ -290,10 +228,10 @@ hdac_pin_patch(struct hdaa_widget *w) subid == LENOVO_X300_SUBVENDOR) { switch (nid) { case 17: /* Headphones with redirection */ - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; case 20: /* Two mics together */ - patch = "as=2 seq=15"; + patch_str = "as=2 seq=15"; break; } } else if (id == HDA_CODEC_AD1986A && @@ -302,60 +240,45 @@ hdac_pin_patch(struct hdaa_widget *w) subid == ASUS_P5PL2_SUBVENDOR)) { switch (nid) { case 26: /* Headphones with redirection */ - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; case 28: /* 5.1 out => 2.0 out + 1 input */ - patch = "device=Line-in as=8 seq=1"; + patch_str = "device=Line-in as=8 seq=1"; break; case 29: /* Can't use this as input, as the only available mic * preamplifier is busy by front panel mic (nid 31). * If you want to use this rear connector as mic input, * you have to disable the front panel one. */ - patch = "as=0"; + patch_str = "as=0"; break; case 31: /* Lot of inputs configured with as=15 and unusable */ - patch = "as=8 seq=3"; + patch_str = "as=8 seq=3"; break; case 32: - patch = "as=8 seq=4"; + patch_str = "as=8 seq=4"; break; case 34: - patch = "as=8 seq=5"; + patch_str = "as=8 seq=5"; break; case 36: - patch = "as=8 seq=6"; - break; - } - } else if (id == HDA_CODEC_ALC260 && - HDA_DEV_MATCH(SONY_S5_SUBVENDOR, subid)) { - switch (nid) { - case 16: - patch = "seq=15 device=Headphones"; - break; - } - } else if (id == HDA_CODEC_ALC268) { - if (subid == ACER_T5320_SUBVENDOR) { - switch (nid) { - case 20: /* Headphones Jack */ - patch = "as=1 seq=15"; + patch_str = "as=8 seq=6"; break; } - } } else if (id == HDA_CODEC_CX20561 && subid == LENOVO_B450_SUBVENDOR) { switch (nid) { case 22: - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; } } else if (id == HDA_CODEC_CX20561 && subid == LENOVO_T400_SUBVENDOR) { switch (nid) { case 22: - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; case 26: - patch = "as=1 seq=0"; + patch_str = "as=1 seq=0"; break; } } else if (id == HDA_CODEC_CX20590 && @@ -366,102 +289,62 @@ hdac_pin_patch(struct hdaa_widget *w) subid == LENOVO_G580_SUBVENDOR)) { switch (nid) { case 25: - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; /* * Group onboard mic and headphone mic * together. Fixes onboard mic. */ case 27: - patch = "as=2 seq=15"; + patch_str = "as=2 seq=15"; break; case 35: - patch = "as=2"; - break; - } - } else if (id == HDA_CODEC_ALC269 && - (subid == LENOVO_X1CRBN_SUBVENDOR || - subid == LENOVO_T430_SUBVENDOR || - subid == LENOVO_T430S_SUBVENDOR || - subid == LENOVO_T530_SUBVENDOR)) { - switch (nid) { - case 21: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC285 && - (subid == LENOVO_X120KH_SUBVENDOR || - subid == LENOVO_X120QD_SUBVENDOR)) { - switch (nid) { - case 33: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC269 && - subid == ASUS_UX31A_SUBVENDOR) { - switch (nid) { - case 33: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC892 && - subid == INTEL_DH87RL_SUBVENDOR) { - switch (nid) { - case 27: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC292 && - subid == LENOVO_X120BS_SUBVENDOR) { - switch (nid) { - case 21: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC295 && subid == HP_AF006UR_SUBVENDOR) { - switch (nid) { - case 18: - patch = "as=2"; - break; - case 25: - patch = "as=2 seq=15"; - break; - case 33: - patch = "as=1 seq=15"; - break; - } - } else if (id == HDA_CODEC_ALC298 && HDA_DEV_MATCH(LENOVO_ALL_SUBVENDOR, subid)) { - switch (nid) { - case 23: - config = 0x03a1103f; - break; - case 33: - config = 0x2121101f; - break; - } - } else if (id == HDA_CODEC_ALC298 && subid == DELL_XPS9560_SUBVENDOR) { - switch (nid) { - case 24: - config = 0x01a1913c; - break; - case 26: - config = 0x01a1913d; + patch_str = "as=2"; break; } } else if (id == HDA_CODEC_ALC256 && (subid == DELL_I7577_SUBVENDOR || subid == DELL_L7480_SUBVENDOR)) { switch (nid) { case 20: - patch = "as=1 seq=0"; + patch_str = "as=1 seq=0"; break; case 33: - patch = "as=1 seq=15"; + patch_str = "as=1 seq=15"; break; } + } else { + /* + * loop over hdaa_model_pin_patch + */ + struct pin_patch_t *pin_patches = NULL; + + pin_patches = match_pin_patches(id, subid); + + if (pin_patches != NULL) { + for (struct pin_patch_t *patch = pin_patches; patch->type; patch++) { + if (nid == patch->nid) { + switch (patch->type) { + case PIN_PATCH_TYPE_STRING: + patch_str = patch->patch.string; + case PIN_PATCH_TYPE_MASK: + config &= ~patch->patch.mask[0]; + config |= patch->patch.mask[1]; + break; + case PIN_PATCH_TYPE_OVERRIDE: + config = patch->patch.override; + break; + default: + /* should panic hard */ + break; + } + break; + } + } + } } - if (patch != NULL) - config = hdaa_widget_pin_patch(config, patch); + if (patch_str != NULL) + config = hdaa_widget_pin_patch(config, patch_str); HDA_BOOTVERBOSE( if (config != orig) device_printf(w->devinfo->dev, diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h index 8e427d3412da..611cb98badd8 100644 --- a/sys/dev/sound/pci/hda/hdac.h +++ b/sys/dev/sound/pci/hda/hdac.h @@ -61,6 +61,7 @@ #define HDA_INTEL_82801G HDA_MODEL_CONSTRUCT(INTEL, 0x27d8) #define HDA_INTEL_82801H HDA_MODEL_CONSTRUCT(INTEL, 0x284b) #define HDA_INTEL_82801I HDA_MODEL_CONSTRUCT(INTEL, 0x293e) +#define HDA_INTEL_GMLK HDA_MODEL_CONSTRUCT(INTEL, 0x3198) #define HDA_INTEL_JLK HDA_MODEL_CONSTRUCT(INTEL, 0x38c8) #define HDA_INTEL_82801JI HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) #define HDA_INTEL_82801JD HDA_MODEL_CONSTRUCT(INTEL, 0x3a6e) @@ -91,7 +92,16 @@ #define HDA_INTEL_CMLKLP HDA_MODEL_CONSTRUCT(INTEL, 0x02c8) #define HDA_INTEL_CMLKH HDA_MODEL_CONSTRUCT(INTEL, 0x06c8) #define HDA_INTEL_TGLK HDA_MODEL_CONSTRUCT(INTEL, 0xa0c8) -#define HDA_INTEL_GMLK HDA_MODEL_CONSTRUCT(INTEL, 0x3198) +#define INTEL_A100ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xa100) +#define INTEL_D400ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd400) +#define INTEL_D401ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd401) +#define INTEL_D402ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd402) +#define INTEL_E305ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe305) +#define INTEL_E308ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe308) +#define INTEL_E224ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe224) +#define INTEL_E400ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe400) +#define INTEL_E401ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe401) +#define INTEL_E402ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe402) #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) /* Nvidia */ @@ -198,6 +208,10 @@ /* HP/Compaq */ #define HP_VENDORID 0x103c +#define HP_Z200_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x103c) +#define HP_225AID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x225a) +#define HP_2272ID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2272) +#define HP_2273ID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2273) #define HP_V3000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30b5) #define HP_NX7400_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a2) #define HP_NX6310_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30aa) @@ -207,6 +221,7 @@ #define HP_DV5000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a5) #define HP_DC7700S_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2801) #define HP_DC7700_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2802) +#define HP_DC5750_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x280a) #define HP_AF006UR_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x83a2) #define HP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0xffff) /* What is wrong with XN 2563 anyway? (Got the picture ?) */ @@ -222,7 +237,28 @@ #define DELL_L7480_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07a0) #define DELL_XPSM1210_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01d7) #define DELL_OPLX745_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01da) +#define DELL_05F4ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f4) +#define DELL_05F5ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f5) +#define DELL_05F6ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f6) +#define DELL_V5470_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0615) +#define DELL_V5470_1_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0616) +#define DELL_064AID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x064a) +#define DELL_064BID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x064b) +#define DELL_9020M_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0669) +#define DELL_V5480_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x069a) +#define DELL_06D9ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06d9) +#define DELL_06DAID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06da) +#define DELL_06DBID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06db) +#define DELL_06DDID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06dd) +#define DELL_06DEID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06de) +#define DELL_06DFID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06df) +#define DELL_06E0ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06e0) +#define DELL_7559_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0706) +#define DELL_7000_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0798) #define DELL_XPS9560_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07be) +#define DELL_E7240_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05ca) +#define DELL_164AID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x164a) +#define DELL_164BID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x164b) #define DELL_I7577_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0802) #define DELL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0xffff) @@ -233,34 +269,66 @@ /* Acer */ #define ACER_VENDORID 0x1025 +#define ACER_0070ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0070) +#define ACER_0077ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0077) +#define ACER_0078ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0078) +#define ACER_0087ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0087) #define ACER_A5050_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x010f) #define ACER_A4520_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0127) #define ACER_A4710_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x012f) #define ACER_A4715_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0133) +#define ACER_TM_6293_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0139) #define ACER_3681WXM_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0110) #define ACER_T6292_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011b) #define ACER_T5320_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011f) +#define ACER_TM_6293_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0139) +#define ACER_AC700_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x047c) +#define ACER_V5_571G_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x072d) +#define ACER_AO725_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0740) +#define ACER_AO756_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0742) +#define ACER_E1_472_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0762) +#define ACER_E1_572_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0775) +#define ACER_V5_573G_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x079b) +#define ACER_CB_14_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x106d) +#define ACER_V5_122P_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xa80d) +#define ACER_APFV_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xa884) +#define ACER_E309ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xe309) +#define ACER_E310ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xe310) #define ACER_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xffff) /* Asus */ #define ASUS_VENDORID 0x1043 +#define ASUS_X540A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x103e) +#define ASUS_X540SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10c0) +#define ASUS_X556UR_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x11c0) +#define ASUS_W5A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10c3) +#define ASUS_X540LA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10d0) #define ASUS_A8X_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1153) #define ASUS_U5F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263) #define ASUS_W6F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263) +#define ASUS_X541SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x12e0) +#define ASUS_X541UV_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x12f0) #define ASUS_A7M_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1323) #define ASUS_F3JC_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1338) #define ASUS_G2K_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1339) +#define ASUS_Z550SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13b0) #define ASUS_A7T_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13c2) #define ASUS_UX31A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1517) +#define ASUS_Z71V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1964) #define ASUS_W2J_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1971) #define ASUS_M5200_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1993) +#define ASUS_G73JW_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1a13) +#define ASUS_X705UD_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1a30) +#define ASUS_Z550MA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1bbd) +#define ASUS_X555UB_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1ccd) #define ASUS_P5PL2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x817f) #define ASUS_P1AH2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb) #define ASUS_M2NPVMX_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb) #define ASUS_M2V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81e7) #define ASUS_P5BWD_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81ec) #define ASUS_M2N_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x8234) -#define ASUS_A8NVMCSM_SUBVENDOR HDA_MODEL_CONSTRUCT(NVIDIA, 0xcb84) +#define ASUS_A8NVMCSM_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0xcb84) +#define ASUS_X101CH_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x8516) #define ASUS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0xffff) /* IBM / Lenovo */ @@ -287,7 +355,11 @@ #define LENOVO_T430S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fb) #define LENOVO_T520_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21cf) #define LENOVO_T530_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f6) +#define LENOVO_X230_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fa) +#define LENOVO_X230T_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2203) +#define LENOVO_T431S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2208) #define LENOVO_G580_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3977) +#define LENOVO_3000_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x384e) #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) /* Samsung */ @@ -307,8 +379,19 @@ /* Sony */ #define SONY_VENDORID 0x104d #define SONY_S5_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81cc) +#define SONY_81A0ID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81a0) +#define SONY_81D6ID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81d6) +#define SONY_81BBID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81bb) +#define SONY_VAIO_TX_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81e2) +#define SONY_VAIO_S13_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x9099) +#define SONY_VAIO_P11_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x90b5) +#define SONY_VAIO_P13_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x90b6) #define SONY_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0xffff) +/* Tyan? */ +#define TYAN_VENDORID 0x10f1 +#define TYAN_N6650W_SUBVENDOR HDA_MODEL_CONSTRUCT(TYAN, 0x2915) + /* * Apple Intel MacXXXX seems using Sigmatel codec/vendor id * instead of their own, which is beyond my comprehension @@ -322,18 +405,32 @@ /* LG Electronics */ #define LG_VENDORID 0x1854 #define LG_LW20_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0018) +#define LG_M1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x003b) +#define LG_P1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x005f) +#define LG_W1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0068) +#define LG_LW25_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0077) #define LG_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0xffff) /* Fujitsu Siemens */ #define FS_VENDORID 0x1734 #define FS_PA1510_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10b8) #define FS_SI1848_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10cd) +#define FS_AMILO_M1437_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x107c) +#define FS_AMILO_M1451G_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x1094) +#define FS_AMILO_PI1556_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10b0) +#define FS_AMILO_XI1526_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10ac) +#define FS_H270_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x1147) #define FS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0xffff) /* Fujitsu Limited */ #define FL_VENDORID 0x10cf #define FL_S7020D_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1326) +#define FL_LB_S7110_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1397) #define FL_U1010_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x142d) +#define FL_1475ID_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1475) +#define FL_LB_U904_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1845) +#define FL_LB_T731_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x15dc) +#define FL_LB_E725_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1757) #define FL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0xffff) /* Toshiba */ @@ -346,18 +443,61 @@ #define MSI_VENDORID 0x1462 #define MSI_MS1034_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x0349) #define MSI_MS034A_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x034a) +#define MSI_1150ID_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x1150) +#define MSI_MS_B120_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0xb120) #define MSI_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0xffff) /* Giga-Byte Technology */ #define GB_VENDORID 0x1458 #define GB_G33S2H_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xa022) +#define GB_K8_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xa102) +#define GB_BXBT2807_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xfa53) #define GP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xffff) /* Uniwill ? */ #define UNIWILL_VENDORID 0x1584 #define UNIWILL_9075_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9075) +#define UNIWILL_9050_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9050) +#define UNIWILL_9054_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9054) +#define UNIWILL_9070_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9070) #define UNIWILL_9080_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9080) +/* Coeus / Elitegroup */ +#define COEUS_VENDORID 0x1019 +#define COEUS_G610P_SUBVENDOR HDA_MODEL_CONSTRUCT(COEUS, 0x0f69) +#define COEUS_A880ID_SUBVENDOR HDA_MODEL_CONSTRUCT(COEUS, 0xa880) + +/* Arima */ +#define ARIMA_VENDORID 0x161f +#define ARIMA_W810_SUBVENDOR HDA_MODEL_CONSTRUCT(ARIMA, 0x0f69) + +/* Shuttle Computer */ +#define SHUTTLE_VENDORID 0x1039 +#define SHUTTLE_ST20G5_SUBVENDOR HDA_MODEL_CONSTRUCT(SHUTTLE, 0xc790) + +/* First International Computer */ +#define FIC_VENDORID 0x1509 +#define FIC_P4M_SUBVENDOR HDA_MODEL_CONSTRUCT(FIC, 0x925d) + +/* Gateway 2000 */ +#define GATEWAY_VENDORID 0x107b +#define GATEWAY_3032ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x3032) +#define GATEWAY_3033ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x3033) +#define GATEWAY_4039ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x4039) + +/* Biostar */ +#define BIOSTAR_VENDORID 0x1565 +#define BIOSTAR_8202ID_SUBVENDOR HDA_MODEL_CONSTRUCT(BIOSTAR, 0x8202) + +/* EPoX Computer Co., Ltd. */ +#define EPOX_VENDORID 0x1695 +#define EPOX_400DID_SUBVENDOR HDA_MODEL_CONSTRUCT(EPOX, 0x400d) +#define EPOX_EP5LDA_SUBVENDOR HDA_MODEL_CONSTRUCT(EPOX, 0x4012) + +/* AOpen */ +#define AOPEN_VENDORID 0xa0a0 +#define AOPEN_I915GMMHFS_SUBVENDOR HDA_MODEL_CONSTRUCT(AOPEN, 0x8202) + /* All codecs you can eat... */ #define HDA_CODEC_CONSTRUCT(vendor, id) \ (((uint32_t)(vendor##_VENDORID) << 16) | ((id) & 0xffff)) @@ -390,6 +530,7 @@ #define HDA_CODEC_ALC268 HDA_CODEC_CONSTRUCT(REALTEK, 0x0268) #define HDA_CODEC_ALC269 HDA_CODEC_CONSTRUCT(REALTEK, 0x0269) #define HDA_CODEC_ALC270 HDA_CODEC_CONSTRUCT(REALTEK, 0x0270) +#define HDA_CODEC_ALC271 HDA_CODEC_CONSTRUCT(REALTEK, 0x0271) #define HDA_CODEC_ALC272 HDA_CODEC_CONSTRUCT(REALTEK, 0x0272) #define HDA_CODEC_ALC273 HDA_CODEC_CONSTRUCT(REALTEK, 0x0273) #define HDA_CODEC_ALC274 HDA_CODEC_CONSTRUCT(REALTEK, 0x0274) diff --git a/sys/dev/sound/pci/hda/pin_patch.h b/sys/dev/sound/pci/hda/pin_patch.h new file mode 100644 index 000000000000..8e2c9875906f --- /dev/null +++ b/sys/dev/sound/pci/hda/pin_patch.h @@ -0,0 +1,121 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Khamba Staring + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ +#ifndef PIN_PATCH_H +#define PIN_PATCH_H + +#include "hdac.h" + +#define PIN_SUBVENDOR(sv) { .id = sv } + + +#define PIN_PATCH_STRING(n, patchstr) { \ + .nid = n, \ + .type = PIN_PATCH_TYPE_STRING, \ + .patch.string = patchstr \ +} +#define PIN_OVERRIDE(n, newvalue) { \ + .nid = n, \ + .type = PIN_PATCH_TYPE_OVERRIDE, \ + .patch.override = newvalue \ +} +#define PIN_PATCH_NOT_APPLICABLE(n) \ + PIN_PATCH_STRING(n, "as=15 misc=1 color=Black ctype=1/8 device=Speaker loc=Rear conn=None") +#define PIN_PATCH_HP_OUT(n) \ + PIN_PATCH_STRING(n, "seq=15 as=1 color=Green ctype=1/8 device=Headphones loc=Rear") +#define PIN_PATCH_HP(n) \ + PIN_PATCH_STRING(n, "seq=15 as=1 misc=1 color=Green ctype=1/8 device=Headphones loc=Rear") +#define PIN_PATCH_SPEAKER(n) \ + PIN_PATCH_STRING(n, "as=2 misc=1 ctype=ATAPI loc=Onboard conn=Fixed") +#define PIN_PATCH_BASS_SPEAKER(n) \ + PIN_PATCH_STRING(n, "as=3 misc=1 ctype=ATAPI loc=Onboard conn=Fixed") +#define PIN_PATCH_MIC_IN(n) \ + PIN_PATCH_STRING(n, "as=5 misc=9 color=Pink ctype=1/8 device=Mic loc=Rear") +#define PIN_PATCH_MIC_INTERNAL(n) \ + PIN_PATCH_STRING(n, "as=6 misc=1 ctype=Digital device=Mic loc=Internal conn=Fixed") +#define PIN_PATCH_MIC_FRONT(n) \ + PIN_PATCH_STRING(n, "as=4 misc=12 color=Pink ctype=1/8 device=Mic loc=Front") +#define PIN_PATCH_LINE_IN(n) \ + PIN_PATCH_STRING(n, "seq=1 as=3 color=Blue ctype=1/8 device=Line-in loc=Rear") +#define PIN_PATCH_LINE_OUT(n) \ + PIN_PATCH_STRING(n, "as=1 color=Green ctype=1/8 loc=Rear") +#define PIN_PATCH_SPDIF_OUT(n) \ + PIN_PATCH_STRING(n, "as=4 misc=1 color=Green ctype=Optical device=SPDIF-out loc=Rear") +#define PIN_PATCH_JACK_WO_DETECT(n) \ + PIN_PATCH_STRING(n, "seq=12 as=3 misc=1 color=Pink ctype=1/8 device=Mic loc=Rear") +#define PIN_PATCH_HPMIC_WO_DETECT(n) \ + PIN_PATCH_STRING(n, "seq=13 as=3 misc=1 color=Pink ctype=1/8 device=Mic loc=Rear") +#define PIN_PATCH_HPMIC_WITH_DETECT(n) \ + PIN_PATCH_STRING(n, "seq=12 as=3 color=Pink ctype=1/8 device=Mic loc=Rear") +#define PIN_PATCH_CLFE(n) \ + PIN_PATCH_STRING(n, "seq=1 as=1 misc=4 color=Black ctype=1/8 loc=Rear") +#define PIN_PATCH_SURROUND(n) \ + PIN_PATCH_STRING(n, "seq=2 as=1 misc=4 color=Orange ctype=1/8 loc=Rear") +#define PIN_PATCH_SUBWOOFER(n) \ + PIN_PATCH_STRING(n, "seq=1 as=1 misc=1 ctype=ATAPI device=Speaker loc=Onboard conn=Fixed") +#define PIN_PATCH_DOCK_LINE_OUT(n) \ + PIN_PATCH_STRING(n, "seq=15 as=3 color=Black ctype=1/8 loc=Ext-Rear") +#define PIN_PATCH_DOCK_HP(n) \ + PIN_PATCH_STRING(n, "seq=15 as=3 color=Black ctype=1/8 device=Headphones loc=Ext-Rear") +#define PIN_PATCH_DOCK_MIC_IN(n) \ + PIN_PATCH_STRING(n, "as=4 color=Black ctype=1/8 device=Mic loc=Ext-Left") + +enum { + PIN_PATCH_TYPE_EOL, /* end-of-list */ + PIN_PATCH_TYPE_STRING, + PIN_PATCH_TYPE_MASK, + PIN_PATCH_TYPE_OVERRIDE +}; + +struct pin_patch_t { + nid_t nid; /* nid to patch */ + int type; /* patch type */ + union { + const char *string; /* patch string */ + uint32_t mask[2]; /* pin config mask */ + uint32_t override; /* pin config override */ + } patch; +}; + +struct pin_machine_model_t { + uint32_t id; /* vendor machine id */ +}; + +struct model_pin_patch_t { + struct pin_machine_model_t *models; /* list of machine models */ + struct pin_patch_t *pin_patches; /* hardcoded overrides */ + void (*fixup_func)(struct hdaa_widget *); /* for future use */ +}; + +struct hdaa_model_pin_patch_t { + uint32_t id; /* the hdaa id */ + struct model_pin_patch_t *patches; /* list of machine patches */ +}; + +#endif /* PIN_PATCH_H */ diff --git a/sys/dev/sound/pci/hda/pin_patch_realtek.h b/sys/dev/sound/pci/hda/pin_patch_realtek.h new file mode 100644 index 000000000000..ddaeeaef5345 --- /dev/null +++ b/sys/dev/sound/pci/hda/pin_patch_realtek.h @@ -0,0 +1,992 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD + * + * Copyright (c) 2018 Khamba Staring + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * $FreeBSD$ + */ + +#ifndef PIN_PATCH_REALTEK_H +#define PIN_PATCH_REALTEK_H + +#include "hdac.h" +#include "pin_patch.h" + +/* + * Pin patches + */ +static struct pin_patch_t pin_patches_lg_lw20[] = { + { + .nid = 26, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } + }, { + .nid = 27, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT } + }, { } +}; + +static struct pin_patch_t pin_patches_clevo_d900t_asus_m5200[] = { + { + .nid = 24, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } + }, { + .nid = 25, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN } + }, { + .nid = 26, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } + }, { + .nid = 27, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } + }, { + .nid = 28, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_CD } + }, { } +}; + +static struct pin_patch_t pin_patches_msi_ms034a[] = { + { + .nid = 25, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } + }, { + .nid = 28, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_CD | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } + }, { } +}; + +static struct pin_patch_t pin_patches_asus_w6f[] = { + { + .nid = 11, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } + }, { + .nid = 12, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } + }, { + .nid = 14, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } + }, { + .nid = 15, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK } + }, { + .nid = 16, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } + }, { + .nid = 31, + .type = PIN_PATCH_TYPE_MASK, + .patch.mask = { + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } + }, { + .nid = 32, *** 839 LINES SKIPPED *** From owner-dev-commits-src-all@freebsd.org Sat Jul 3 07:41:19 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1B20264D29D; Sat, 3 Jul 2021 07:41: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 4GH3mH03dkz3vhq; Sat, 3 Jul 2021 07:41: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 DEC8E23B71; Sat, 3 Jul 2021 07:41: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 1637fIft077632; Sat, 3 Jul 2021 07:41:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1637fI1e077631; Sat, 3 Jul 2021 07:41:18 GMT (envelope-from git) Date: Sat, 3 Jul 2021 07:41:18 GMT Message-Id: <202107030741.1637fI1e077631@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 45d99014ca3a - main - linux(4): implement coredumps on arm64 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 45d99014ca3a57fcc6b603cf4494516b4dadda1b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 07:41:19 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=45d99014ca3a57fcc6b603cf4494516b4dadda1b commit 45d99014ca3a57fcc6b603cf4494516b4dadda1b Author: Edward Tomasz Napierala AuthorDate: 2021-07-03 07:05:44 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-07-03 07:06:31 +0000 linux(4): implement coredumps on arm64 Previously they only worked on amd64. Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30975 --- sys/arm64/linux/linux.h | 12 ++++++++++++ sys/arm64/linux/linux_machdep.c | 16 ++++++++++++++++ sys/arm64/linux/linux_sysvec.c | 4 ++-- sys/modules/linux64/Makefile | 5 ++--- 4 files changed, 32 insertions(+), 5 deletions(-) diff --git a/sys/arm64/linux/linux.h b/sys/arm64/linux/linux.h index 5d4739223275..2e683b77f8e8 100644 --- a/sys/arm64/linux/linux.h +++ b/sys/arm64/linux/linux.h @@ -298,4 +298,16 @@ struct linux_robust_list_head { l_uintptr_t pending_list; }; +struct linux_pt_regset { + l_ulong x[31]; + l_ulong sp; + l_ulong pc; + l_ulong cpsr; +}; + +struct reg; + +void bsd_to_linux_regset(struct reg *b_reg, + struct linux_pt_regset *l_regset); + #endif /* _ARM64_LINUX_H_ */ diff --git a/sys/arm64/linux/linux_machdep.c b/sys/arm64/linux/linux_machdep.c index 8e10fc9d26a1..d9b13fa631fc 100644 --- a/sys/arm64/linux/linux_machdep.c +++ b/sys/arm64/linux/linux_machdep.c @@ -40,6 +40,8 @@ __FBSDID("$FreeBSD$"); #include +#include + #include #include #include @@ -149,3 +151,17 @@ linux_set_cloned_tls(struct thread *td, void *desc) return (cpu_set_user_tls(td, desc)); } + +void +bsd_to_linux_regset(struct reg *b_reg, struct linux_pt_regset *l_regset) +{ + + KASSERT(sizeof(l_regset->x) == sizeof(b_reg->x) + sizeof(l_ulong), + ("%s: size mismatch\n", __func__)); + memcpy(l_regset->x, b_reg->x, sizeof(b_reg->x)); + + l_regset->x[30] = b_reg->lr; + l_regset->sp = b_reg->sp; + l_regset->pc = b_reg->elr; + l_regset->cpsr = b_reg->spsr; +} diff --git a/sys/arm64/linux/linux_sysvec.c b/sys/arm64/linux/linux_sysvec.c index 33bc303b5ada..e1d3708b70e9 100644 --- a/sys/arm64/linux/linux_sysvec.c +++ b/sys/arm64/linux/linux_sysvec.c @@ -417,8 +417,8 @@ struct sysentvec elf_linux_sysvec = { .sv_name = "Linux ELF64", .sv_coredump = elf64_coredump, .sv_elf_core_osabi = ELFOSABI_NONE, - .sv_elf_core_abi_vendor = FREEBSD_ABI_VENDOR, - .sv_elf_core_prepare_notes = elf64_prepare_notes, + .sv_elf_core_abi_vendor = LINUX_ABI_VENDOR, + .sv_elf_core_prepare_notes = linux64_prepare_notes, .sv_imgact_try = linux_exec_imgact_try, .sv_minsigstksz = LINUX_MINSIGSTKSZ, .sv_minuser = VM_MIN_ADDRESS, diff --git a/sys/modules/linux64/Makefile b/sys/modules/linux64/Makefile index d70983354407..5f3f0fd03574 100644 --- a/sys/modules/linux64/Makefile +++ b/sys/modules/linux64/Makefile @@ -8,8 +8,8 @@ VDSO= linux_vdso KMOD= linux64 -SRCS= linux_fork.c linux_dummy_machdep.c linux_file.c linux_event.c \ - linux_futex.c linux_getcwd.c linux_ioctl.c linux_ipc.c \ +SRCS= linux_elf64.c linux_fork.c linux_dummy_machdep.c linux_file.c \ + linux_event.c linux_futex.c linux_getcwd.c linux_ioctl.c linux_ipc.c \ linux_machdep.c linux_misc.c linux_ptrace.c linux_signal.c \ linux_socket.c linux_stats.c linux_sysctl.c linux_sysent.c \ linux_sysvec.c linux_time.c linux_vdso.c linux_timer.c \ @@ -18,7 +18,6 @@ SRCS= linux_fork.c linux_dummy_machdep.c linux_file.c linux_event.c \ linux_support.s .if ${MACHINE_CPUARCH} == "amd64" SRCS+= linux_dummy_x86.c -SRCS+= linux_elf64.c .endif DPSRCS= assym.inc linux_genassym.c From owner-dev-commits-src-all@freebsd.org Sat Jul 3 07:59:53 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A152164D5AD; Sat, 3 Jul 2021 07:59: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 4GH49j3mmHz4RCl; Sat, 3 Jul 2021 07:59: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 69C5D238E8; Sat, 3 Jul 2021 07:59: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 1637xrZY095435; Sat, 3 Jul 2021 07:59:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1637xrVa095434; Sat, 3 Jul 2021 07:59:53 GMT (envelope-from git) Date: Sat, 3 Jul 2021 07:59:53 GMT Message-Id: <202107030759.1637xrVa095434@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Edward Tomasz Napierala Subject: git: 2f514e6f13de - main - linux(4): implement PR_SET_NO_NEW_PRIVS MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: trasz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f514e6f13de41aa9ad5f563ed0decc66e91f99c Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 07:59:53 -0000 The branch main has been updated by trasz: URL: https://cgit.FreeBSD.org/src/commit/?id=2f514e6f13de41aa9ad5f563ed0decc66e91f99c commit 2f514e6f13de41aa9ad5f563ed0decc66e91f99c Author: Edward Tomasz Napierala AuthorDate: 2021-07-03 07:41:59 +0000 Commit: Edward Tomasz Napierala CommitDate: 2021-07-03 07:42:37 +0000 linux(4): implement PR_SET_NO_NEW_PRIVS This makes prctl(2) support PR_SET_NO_NEW_PRIVS, by mapping it to the native PROC_NO_NEW_PRIVS_CTL procctl(2). Sponsored By: EPSRC Differential Revision: https://reviews.freebsd.org/D30973 --- sys/compat/linux/linux_misc.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sys/compat/linux/linux_misc.c b/sys/compat/linux/linux_misc.c index 65a5b0dd24d7..559eb6463da0 100644 --- a/sys/compat/linux/linux_misc.c +++ b/sys/compat/linux/linux_misc.c @@ -1982,7 +1982,7 @@ linux_capset(struct thread *td, struct linux_capset_args *uap) int linux_prctl(struct thread *td, struct linux_prctl_args *args) { - int error = 0, max_size; + int error = 0, max_size, arg; struct proc *p = td->td_proc; char comm[LINUX_MAX_COMM_LEN]; int pdeath_signal, trace_state; @@ -2113,8 +2113,10 @@ linux_prctl(struct thread *td, struct linux_prctl_args *args) error = EINVAL; break; case LINUX_PR_SET_NO_NEW_PRIVS: - linux_msg(td, "unsupported prctl PR_SET_NO_NEW_PRIVS"); - error = EINVAL; + arg = args->arg2 == 1 ? + PROC_NO_NEW_PRIVS_ENABLE : PROC_NO_NEW_PRIVS_DISABLE; + error = kern_procctl(td, P_PID, p->p_pid, + PROC_NO_NEW_PRIVS_CTL, &arg); break; case LINUX_PR_SET_PTRACER: linux_msg(td, "unsupported prctl PR_SET_PTRACER"); From owner-dev-commits-src-all@freebsd.org Sat Jul 3 08:20:24 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@freebsd.org Sat Jul 3 17:15:40 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6B8A865506C; Sat, 3 Jul 2021 17:15:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHJW02NbGz3vry; Sat, 3 Jul 2021 17:15:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3A2642B312; Sat, 3 Jul 2021 17:15:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 163HFe98038663; Sat, 3 Jul 2021 17:15:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 163HFeJC038662; Sat, 3 Jul 2021 17:15:40 GMT (envelope-from git) Date: Sat, 3 Jul 2021 17:15:40 GMT Message-Id: <202107031715.163HFeJC038662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: d12d651f8692 - main - EFI RT: resurrect EFIIOC_GET_TABLE MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d12d651f8692cfcaf6fd0a6e8264c29547f644c9 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 17:15:40 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d12d651f8692cfcaf6fd0a6e8264c29547f644c9 commit d12d651f8692cfcaf6fd0a6e8264c29547f644c9 Author: Pavel Balaev AuthorDate: 2021-07-01 16:27:25 +0000 Commit: Konstantin Belousov CommitDate: 2021-07-03 17:06:48 +0000 EFI RT: resurrect EFIIOC_GET_TABLE Make it work, but change the interface to be safe for non-root users. In particular, right now interface only works for the tables which can be minimally parsed by kernel to determine the table size. Then, userspace can query the table size, after that it provides a buffer of needed size and kernel copies out just table to userspace. Main advantage is that user no longer need to be able to read /dev/mem, the disadvantage is the need to have minimal parsers aware of the table types. Right now the parsers are implemented for ESRT and PROP tables. Future extension of the present interface might be a return of only the table physical address, in case kernel does not have suitable parser yet. Then, a privileged user could read the table from /dev/mem. This extension, which logically equivalent to the old (non-worked) EFIIOC_GET_TABLE variant, is not implemented until needed. Submitted by: Pavel Balaev MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D30104 --- share/man/man4/efidev.4 | 23 +++++++-- sys/dev/efidev/efidev.c | 23 +++++++++ sys/dev/efidev/efirt.c | 128 ++++++++++++++++++++++++++++++++++++++++++++++++ sys/sys/efi.h | 39 +++++++++++++++ sys/sys/efiio.h | 9 ++++ 5 files changed, 219 insertions(+), 3 deletions(-) diff --git a/share/man/man4/efidev.4 b/share/man/man4/efidev.4 index b32a44325f92..2cadada51e9c 100644 --- a/share/man/man4/efidev.4 +++ b/share/man/man4/efidev.4 @@ -26,7 +26,7 @@ .\" .\" $FreeBSD$ .\" -.Dd August 12, 2018 +.Dd June 18, 2021 .Dt EFIDEV 4 .Os .Sh NAME @@ -71,11 +71,28 @@ with supplemental structures and constants defined in .In sys/efi.h : .Bl -tag -width indent .It Dv EFIIOC_GET_TABLE Pq Vt "struct efi_get_table_ioc" -Get a table by uuid from the UEFI system table. +Copy the UEFI table specified by the +.Va uuid +field of the +.Vt struct efi_get_table_ioc +into the +.Va buf +field. +The memory size for the buf field can be queried by passing +.Dv NULL +pointer as a buf value. +The required size will be stored in the +.Va table_len +field. +The size of the allocated memory must be specified in the +.Va buf_len +field. .Bd -literal -offset indent struct efi_get_table_ioc { + void *buf; struct uuid uuid; - void *ptr; + size_t table_len; + size_t buf_len; }; .Ed .It Dv EFIIOC_GET_TIME Pq Vt "struct efi_tm" diff --git a/sys/dev/efidev/efidev.c b/sys/dev/efidev/efidev.c index 303b10c1d0ba..79d98956ed24 100644 --- a/sys/dev/efidev/efidev.c +++ b/sys/dev/efidev/efidev.c @@ -53,6 +53,29 @@ efidev_ioctl(struct cdev *dev __unused, u_long cmd, caddr_t addr, int error; switch (cmd) { + case EFIIOC_GET_TABLE: + { + struct efi_get_table_ioc *egtioc = + (struct efi_get_table_ioc *)addr; + void *buf = NULL; + + error = efi_copy_table(&egtioc->uuid, egtioc->buf ? &buf : NULL, + egtioc->buf_len, &egtioc->table_len); + + if (error != 0 || egtioc->buf == NULL) + break; + + if (egtioc->buf_len < egtioc->table_len) { + error = EINVAL; + free(buf, M_TEMP); + break; + } + + error = copyout(buf, egtioc->buf, egtioc->buf_len); + free(buf, M_TEMP); + + break; + } case EFIIOC_GET_TIME: { struct efi_tm *tm = (struct efi_tm *)addr; diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c index aa7e9afdb69d..9ba0508f1902 100644 --- a/sys/dev/efidev/efirt.c +++ b/sys/dev/efidev/efirt.c @@ -38,6 +38,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include #include @@ -47,6 +48,7 @@ __FBSDID("$FreeBSD$"); #include #include #include +#include #include #include @@ -58,6 +60,8 @@ __FBSDID("$FreeBSD$"); #include #include +#define EFI_TABLE_ALLOC_MAX 0x800000 + static struct efi_systbl *efi_systbl; static eventhandler_tag efi_shutdown_tag; /* @@ -96,6 +100,11 @@ static int efi_status2err[25] = { EPROTO /* EFI_PROTOCOL_ERROR */ }; +enum efi_table_type { + TYPE_ESRT = 0, + TYPE_PROP +}; + static int efi_enter(void); static void efi_leave(void); @@ -336,6 +345,124 @@ get_table(struct uuid *uuid, void **ptr) return (ENOENT); } +static int +get_table_length(enum efi_table_type type, size_t *table_len, void **taddr) +{ + switch (type) { + case TYPE_ESRT: + { + struct efi_esrt_table *esrt = NULL; + struct uuid uuid = EFI_TABLE_ESRT; + uint32_t fw_resource_count = 0; + size_t len = sizeof(*esrt); + int error; + void *buf; + + error = efi_get_table(&uuid, (void **)&esrt); + if (error != 0) + return (error); + + buf = malloc(len, M_TEMP, M_WAITOK); + error = physcopyout((vm_paddr_t)esrt, buf, len); + if (error != 0) { + free(buf, M_TEMP); + return (error); + } + + /* Check ESRT version */ + if (((struct efi_esrt_table *)buf)->fw_resource_version != + ESRT_FIRMWARE_RESOURCE_VERSION) { + free(buf, M_TEMP); + return (ENODEV); + } + + fw_resource_count = ((struct efi_esrt_table *)buf)-> + fw_resource_count; + if (fw_resource_count > EFI_TABLE_ALLOC_MAX / + sizeof(struct efi_esrt_entry_v1)) { + free(buf, M_TEMP); + return (ENOMEM); + } + + len += fw_resource_count * sizeof(struct efi_esrt_entry_v1); + *table_len = len; + + if (taddr != NULL) + *taddr = esrt; + free(buf, M_TEMP); + return (0); + } + case TYPE_PROP: + { + struct uuid uuid = EFI_PROPERTIES_TABLE; + struct efi_prop_table *prop; + size_t len = sizeof(*prop); + uint32_t prop_len; + int error; + void *buf; + + error = efi_get_table(&uuid, (void **)&prop); + if (error != 0) + return (error); + + buf = malloc(len, M_TEMP, M_WAITOK); + error = physcopyout((vm_paddr_t)prop, buf, len); + if (error != 0) { + free(buf, M_TEMP); + return (error); + } + + prop_len = ((struct efi_prop_table *)buf)->length; + if (prop_len > EFI_TABLE_ALLOC_MAX) { + free(buf, M_TEMP); + return (ENOMEM); + } + *table_len = prop_len; + + if (taddr != NULL) + *taddr = prop; + free(buf, M_TEMP); + return (0); + } + } + return (ENOENT); +} + +static int +copy_table(struct uuid *uuid, void **buf, size_t buf_len, size_t *table_len) +{ + static const struct known_table { + struct uuid uuid; + enum efi_table_type type; + } tables[] = { + { EFI_TABLE_ESRT, TYPE_ESRT }, + { EFI_PROPERTIES_TABLE, TYPE_PROP } + }; + size_t table_idx; + void *taddr; + int rc; + + for (table_idx = 0; table_idx < nitems(tables); table_idx++) { + if (!bcmp(&tables[table_idx].uuid, uuid, sizeof(*uuid))) + break; + } + + if (table_idx == nitems(tables)) + return (EINVAL); + + rc = get_table_length(tables[table_idx].type, table_len, &taddr); + if (rc != 0) + return rc; + + /* return table length to userspace */ + if (buf == NULL) + return (0); + + *buf = malloc(*table_len, M_TEMP, M_WAITOK); + rc = physcopyout((vm_paddr_t)taddr, *buf, *table_len); + return (rc); +} + static int efi_rt_handle_faults = EFI_RT_HANDLE_FAULTS_DEFAULT; SYSCTL_INT(_machdep, OID_AUTO, efi_rt_handle_faults, CTLFLAG_RWTUN, &efi_rt_handle_faults, 0, @@ -568,6 +695,7 @@ var_set(efi_char *name, struct uuid *vendor, uint32_t attrib, const static struct efi_ops efi_ops = { .rt_ok = rt_ok, .get_table = get_table, + .copy_table = copy_table, .get_time = get_time, .get_time_capabilities = get_time_capabilities, .reset_system = reset_system, diff --git a/sys/sys/efi.h b/sys/sys/efi.h index 7f9408d19b39..6ace7dd6e523 100644 --- a/sys/sys/efi.h +++ b/sys/sys/efi.h @@ -40,6 +40,10 @@ {0xeb9d2d31,0x2d88,0x11d3,0x9a,0x16,{0x00,0x90,0x27,0x3f,0xc1,0x4d}} #define EFI_TABLE_SMBIOS3 \ {0xf2fd1544,0x9794,0x4a2c,0x99,0x2e,{0xe5,0xbb,0xcf,0x20,0xe3,0x94}} +#define EFI_TABLE_ESRT \ + {0xb122a263,0x3661,0x4f68,0x99,0x29,{0x78,0xf8,0xb0,0xd6,0x21,0x80}} +#define EFI_PROPERTIES_TABLE \ + {0x880aaca3,0x4adc,0x4a04,0x90,0x79,{0xb7,0x47,0x34,0x08,0x25,0xe5}} enum efi_reset { EFI_RESET_COLD = 0, @@ -123,6 +127,31 @@ struct efi_tblhdr { uint32_t __res; }; +#define ESRT_FIRMWARE_RESOURCE_VERSION 1 + +struct efi_esrt_table { + uint32_t fw_resource_count; + uint32_t fw_resource_count_max; + uint64_t fw_resource_version; + uint8_t entries[]; +}; + +struct efi_esrt_entry_v1 { + struct uuid fw_class; + uint32_t fw_type; + uint32_t fw_version; + uint32_t lowest_supported_fw_version; + uint32_t capsule_flags; + uint32_t last_attempt_version; + uint32_t last_attempt_status; +}; + +struct efi_prop_table { + uint32_t version; + uint32_t length; + uint64_t memory_protection_attribute; +}; + #ifdef _KERNEL #ifdef EFIABI_ATTR @@ -188,6 +217,7 @@ struct efi_ops { */ int (*rt_ok)(void); int (*get_table)(struct uuid *, void **); + int (*copy_table)(struct uuid *, void **, size_t, size_t *); int (*get_time)(struct efi_tm *); int (*get_time_capabilities)(struct efi_tmcap *); int (*reset_system)(enum efi_reset); @@ -216,6 +246,15 @@ static inline int efi_get_table(struct uuid *uuid, void **ptr) return (active_efi_ops->get_table(uuid, ptr)); } +static inline int efi_copy_table(struct uuid *uuid, void **buf, + size_t buf_len, size_t *table_len) +{ + + if (active_efi_ops->copy_table == NULL) + return (ENXIO); + return (active_efi_ops->copy_table(uuid, buf, buf_len, table_len)); +} + static inline int efi_get_time(struct efi_tm *tm) { diff --git a/sys/sys/efiio.h b/sys/sys/efiio.h index e5a0763536a3..803aed6a965e 100644 --- a/sys/sys/efiio.h +++ b/sys/sys/efiio.h @@ -32,6 +32,14 @@ #include #include +struct efi_get_table_ioc +{ + void *buf; /* Pointer to userspace buffer */ + struct uuid uuid; /* UUID to look up */ + size_t table_len; /* Table size */ + size_t buf_len; /* Size of the buffer */ +}; + struct efi_var_ioc { efi_char *name; /* User pointer to name, in wide chars */ @@ -42,6 +50,7 @@ struct efi_var_ioc size_t datasize; /* Number of *bytes* in the data */ }; +#define EFIIOC_GET_TABLE _IOWR('E', 1, struct efi_get_table_ioc) #define EFIIOC_GET_TIME _IOR('E', 2, struct efi_tm) #define EFIIOC_SET_TIME _IOW('E', 3, struct efi_tm) #define EFIIOC_VAR_GET _IOWR('E', 4, struct efi_var_ioc) From owner-dev-commits-src-all@freebsd.org Sat Jul 3 17:15:41 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id A5F3065531B; Sat, 3 Jul 2021 17:15:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHJW13Gryz3vx4; Sat, 3 Jul 2021 17:15:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 54A932B0A9; Sat, 3 Jul 2021 17:15:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 163HFf5K038687; Sat, 3 Jul 2021 17:15:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 163HFfG2038686; Sat, 3 Jul 2021 17:15:41 GMT (envelope-from git) Date: Sat, 3 Jul 2021 17:15:41 GMT Message-Id: <202107031715.163HFfG2038686@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 24f398e7a153 - main - Add efitable(8), a userspace tool to fetch and parse EFI tables MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 24f398e7a153a05a7e94ae8dd623e2b6d28d94eb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 17:15:41 -0000 The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=24f398e7a153a05a7e94ae8dd623e2b6d28d94eb commit 24f398e7a153a05a7e94ae8dd623e2b6d28d94eb Author: Pavel Balaev AuthorDate: 2021-07-01 16:29:36 +0000 Commit: Konstantin Belousov CommitDate: 2021-07-03 17:14:16 +0000 Add efitable(8), a userspace tool to fetch and parse EFI tables Only ESRT and PROP tables are handled at the moment. Submitted by: Pavel Balaev MFC after: 2 weeks Differential revision: https://reviews.freebsd.org/D30104 --- usr.sbin/Makefile | 2 +- usr.sbin/efitable/Makefile | 9 ++ usr.sbin/efitable/efitable.8 | 70 +++++++++++++ usr.sbin/efitable/efitable.c | 239 +++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 319 insertions(+), 1 deletion(-) diff --git a/usr.sbin/Makefile b/usr.sbin/Makefile index f19af2a5566d..a5d2a476538f 100644 --- a/usr.sbin/Makefile +++ b/usr.sbin/Makefile @@ -127,7 +127,7 @@ SUBDIR.${MK_OPENSSL}+= certctl .endif SUBDIR.${MK_CXGBETOOL}+= cxgbetool SUBDIR.${MK_DIALOG}+= bsdconfig -SUBDIR.${MK_EFI}+= efivar efidp efibootmgr +SUBDIR.${MK_EFI}+= efivar efidp efibootmgr efitable .if ${MK_OPENSSL} != "no" SUBDIR.${MK_EFI}+= uefisign .endif diff --git a/usr.sbin/efitable/Makefile b/usr.sbin/efitable/Makefile new file mode 100644 index 000000000000..83db6d9f74a6 --- /dev/null +++ b/usr.sbin/efitable/Makefile @@ -0,0 +1,9 @@ +# $FreeBSD$ + +PROG= efitable +MAN= efitable.8 +SRCS= efitable.c + +LIBADD= xo + +.include diff --git a/usr.sbin/efitable/efitable.8 b/usr.sbin/efitable/efitable.8 new file mode 100644 index 000000000000..2bea4f9fb2c1 --- /dev/null +++ b/usr.sbin/efitable/efitable.8 @@ -0,0 +1,70 @@ +.\" +.\" Copyright (c) 2021 3mdeb Embedded Systems Consulting +.\" +.\" Redistribution and use in source and binary forms, with or without +.\" modification, are permitted provided that the following conditions +.\" are met: +.\" 1. Redistributions of source code must retain the above copyright +.\" notice, this list of conditions and the following disclaimer. +.\" 2. Redistributions in binary form must reproduce the above copyright +.\" notice, this list of conditions and the following disclaimer in the +.\" documentation and/or other materials provided with the distribution. +.\" +.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +.\" SUCH DAMAGE. +.\" +.\" $FreeBSD$ +.\" +.Dd June 10, 2021 +.Dt EFITABLE 8 +.Os +.Sh NAME +.Nm efitable +.Nd Dump UEFI tables +.Sh SYNOPSIS +.Nm +.Op Fl u Ar uuid | Fl t Ar name +.Op Fl -libxo +.Sh DESCRIPTION +This program prints data from +.Dq Unified Extensible Firmware Interface +.Pq UEFI +tables. +.Pp +The following options are available: +.Bl -tag -width 20m +.It Fl -libxo +Generate output via +.Xr libxo 3 +in a selection of different human and machine readable formats. +See +.Xr xo_parse_args 3 +for details on command line arguments. +.It Fl t Ar name Fl -table Ar name +Specify the name of the table to print. +Currently supported tables: +.Pp +.Bl -tag -width indent -compact +.It Cm esrt +EFI System Resource Table +.It Cm prop +EFI Properties Table +.El +.It Fl Ar uuid Fl -uuid Ar uuid +Specify the UUID of the table to print. +.El +.Pp +.Sh HISTORY +The +.Nm +utility first appeared in +.Fx 14.0 . diff --git a/usr.sbin/efitable/efitable.c b/usr.sbin/efitable/efitable.c new file mode 100644 index 000000000000..367ce3f033b1 --- /dev/null +++ b/usr.sbin/efitable/efitable.c @@ -0,0 +1,239 @@ +/*- + * Copyright (c) 2021 3mdeb Embedded Systems Consulting + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define TABLE_MAX_LEN 30 +#define EFITABLE_XO_VERSION "1" + +static void efi_table_print_esrt(const void *data); +static void efi_table_print_prop(const void *data); +static void usage(void); + +struct efi_table_op { + char name[TABLE_MAX_LEN]; + void (*parse) (const void *); + struct uuid uuid; +}; + +static const struct efi_table_op efi_table_ops[] = { + { .name = "esrt", .parse = efi_table_print_esrt, + .uuid = EFI_TABLE_ESRT }, + { .name = "prop", .parse = efi_table_print_prop, + .uuid = EFI_PROPERTIES_TABLE } +}; + +int +main(int argc, char **argv) +{ + struct efi_get_table_ioc table = { + .buf = NULL, + .buf_len = 0, + .table_len = 0 + }; + int efi_fd, ch, rc = 1, efi_idx = -1; + bool got_table = false; + bool table_set = false; + bool uuid_set = false; + struct option longopts[] = { + { "uuid", required_argument, NULL, 'u' }, + { "table", required_argument, NULL, 't' }, + { NULL, 0, NULL, 0 } + }; + + argc = xo_parse_args(argc, argv); + if (argc < 0) + exit(EXIT_FAILURE); + + while ((ch = getopt_long(argc, argv, "u:t:", longopts, NULL)) != -1) { + switch (ch) { + case 'u': + { + char *uuid_str = optarg; + struct uuid uuid; + uint32_t status; + + uuid_set = 1; + + uuid_from_string(uuid_str, &uuid, &status); + if (status != uuid_s_ok) + xo_errx(EX_DATAERR, "invalid UUID"); + + for (size_t n = 0; n < nitems(efi_table_ops); n++) { + if (!memcmp(&uuid, &efi_table_ops[n].uuid, + sizeof(uuid))) { + efi_idx = n; + got_table = true; + break; + } + } + break; + } + case 't': + { + char *table_name = optarg; + + table_set = true; + + for (size_t n = 0; n < nitems(efi_table_ops); n++) { + if (!strcmp(table_name, + efi_table_ops[n].name)) { + efi_idx = n; + got_table = true; + break; + } + } + + if (!got_table) + xo_errx(EX_DATAERR, "unsupported efi table"); + + break; + } + default: + usage(); + } + } + + if (!table_set && !uuid_set) + xo_errx(EX_USAGE, "table is not set"); + + if (!got_table) + xo_errx(EX_DATAERR, "unsupported table"); + + efi_fd = open("/dev/efi", O_RDWR); + if (efi_fd < 0) + xo_err(EX_OSFILE, "/dev/efi"); + + table.uuid = efi_table_ops[efi_idx].uuid; + if (ioctl(efi_fd, EFIIOC_GET_TABLE, &table) == -1) + xo_err(EX_OSERR, NULL); + + table.buf = malloc(table.table_len); + table.buf_len = table.table_len; + + if (ioctl(efi_fd, EFIIOC_GET_TABLE, &table) == -1) + xo_err(EX_OSERR, NULL); + + efi_table_ops[efi_idx].parse(table.buf); + close(efi_fd); + + return (rc); +} + +static void +efi_table_print_esrt(const void *data) +{ + const struct efi_esrt_entry_v1 *entries_v1; + const struct efi_esrt_table *esrt; + + esrt = (const struct efi_esrt_table *)data; + + xo_set_version(EFITABLE_XO_VERSION); + xo_open_container("esrt"); + xo_emit("{Lwc:FwResourceCount}{:fw_resource_count/%u}\n", + esrt->fw_resource_count); + xo_emit("{Lwc:FwResourceCountMax}{:fw_resource_count_max/%u}\n", + esrt->fw_resource_count_max); + xo_emit("{Lwc:FwResourceVersion}{:fw_resource_version/%u}\n", + esrt->fw_resource_version); + xo_open_list("entries"); + xo_emit("\nEntries:\n"); + + entries_v1 = (const void *) esrt->entries; + for (uint32_t i = 0; i < esrt->fw_resource_count; i++) { + const struct efi_esrt_entry_v1 *e = &entries_v1[i]; + uint32_t status; + char *uuid; + + uuid_to_string(&e->fw_class, &uuid, &status); + if (status != uuid_s_ok) { + xo_errx(EX_DATAERR, "uuid_to_string error"); + } + + xo_open_instance("entries"); + xo_emit("\n"); + xo_emit("{P: }{Lwc:FwClass}{:fw_class/%s}\n", uuid); + xo_emit("{P: }{Lwc:FwType}{:fw_type/%u}\n", e->fw_type); + xo_emit("{P: }{Lwc:FwVersion}{:fw_version/%u}\n", + e->fw_version); + xo_emit("{P: }{Lwc:LowestSupportedFwVersion}" + "{:lowest_supported_fw_version/%u}\n", + e->lowest_supported_fw_version); + xo_emit("{P: }{Lwc:CapsuleFlags}{:capsule_flags/%#x}\n", + e->capsule_flags); + xo_emit("{P: }{Lwc:LastAttemptVersion" + "}{:last_attempt_version/%u}\n", e->last_attempt_version); + xo_emit("{P: }{Lwc:LastAttemptStatus" + "}{:last_attempt_status/%u}\n", e->last_attempt_status); + + xo_close_instance("entries"); + } + + xo_close_list("entries"); + xo_close_container("esrt"); + xo_finish(); +} + +static void +efi_table_print_prop(const void *data) +{ + const struct efi_prop_table *prop; + + prop = (const struct efi_prop_table *)data; + + xo_set_version(EFITABLE_XO_VERSION); + xo_open_container("prop"); + xo_emit("{Lwc:Version}{:version/%#x}\n", prop->version); + xo_emit("{Lwc:Length}{:length/%u}\n", prop->length); + xo_emit("{Lwc:MemoryProtectionAttribute}" + "{:memory_protection_attribute/%#lx}\n", + prop->memory_protection_attribute); + xo_close_container("prop"); + xo_finish(); +} + +static void usage(void) +{ + xo_error("usage: efitable [-d uuid | -t name] [--libxo]\n"); + exit(EX_USAGE); +} From owner-dev-commits-src-all@freebsd.org Sat Jul 3 21:12:04 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B984658DDD; Sat, 3 Jul 2021 21:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHPlm2yy5z4lpH; Sat, 3 Jul 2021 21:12: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 4CA622E330; Sat, 3 Jul 2021 21:12: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 163LC4jD056427; Sat, 3 Jul 2021 21:12:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 163LC4n4056426; Sat, 3 Jul 2021 21:12:04 GMT (envelope-from git) Date: Sat, 3 Jul 2021 21:12:04 GMT Message-Id: <202107032112.163LC4n4056426@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: f28455344483 - main - libalias: Fix API bug on initialization MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f28455344483310cfd1aa5c0bdd4d014810c0e32 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Jul 2021 21:12:04 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=f28455344483310cfd1aa5c0bdd4d014810c0e32 commit f28455344483310cfd1aa5c0bdd4d014810c0e32 Author: Lutz Donnerhacke AuthorDate: 2021-07-03 21:03:07 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-07-03 21:03:07 +0000 libalias: Fix API bug on initialization The kernel part of ipfw(8) does initialize LibAlias uncondistionally with an zeroized port range (allowed ports from 0 to 0). During restucturing of libalias, port ranges are used everytime and are therefor initialized with different values than zero. The secondary initialization from ipfw (and probably others) overrides the new default values and leave the instance in an unfunctional state. The obvious solution is to detect such reinitializations and use the new default value instead. MFC after: 3 days --- sys/netinet/libalias/alias_db.c | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/sys/netinet/libalias/alias_db.c b/sys/netinet/libalias/alias_db.c index 9f8c6064d2a7..5b53067705bf 100644 --- a/sys/netinet/libalias/alias_db.c +++ b/sys/netinet/libalias/alias_db.c @@ -2048,9 +2048,15 @@ LibAliasSetAliasPortRange(struct libalias *la, u_short port_low, u_short port_high) { LIBALIAS_LOCK(la); - la->aliasPortLower = port_low; - /* Add 1 to the aliasPortLength as modulo has range of 1 to n-1 */ - la->aliasPortLength = port_high - port_low + 1; + if (port_low) { + la->aliasPortLower = port_low; + /* Add 1 to the aliasPortLength as modulo has range of 1 to n-1 */ + la->aliasPortLength = port_high - port_low + 1; + } else { + /* Set default values */ + la->aliasPortLower = 0x8000; + la->aliasPortLength = 0x8000; + } LIBALIAS_UNLOCK(la); } From owner-dev-commits-src-all@freebsd.org Sat Jul 3 23:29:57 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@freebsd.org Sat Jul 3 23:39:17 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@freebsd.org Sat Jul 3 23:50:53 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@freebsd.org Sat Jul 3 23:57:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@freebsd.org Sat Jul 3 23:59:10 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 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-all@freebsd.org Sun Jul 4 00:03:44 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun Jul 4 00:05:00 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun Jul 4 00:05:35 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun Jul 4 02:30:24 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun Jul 4 04:14:49 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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-all@freebsd.org Sun Jul 4 13:54:41 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id EFBE3664CE3; Sun, 4 Jul 2021 13:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHr0d6Gv7z58Kn; Sun, 4 Jul 2021 13:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id BFB1613C5C; Sun, 4 Jul 2021 13:54:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 164DsfRM082664; Sun, 4 Jul 2021 13:54:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 164DsfWs082663; Sun, 4 Jul 2021 13:54:41 GMT (envelope-from git) Date: Sun, 4 Jul 2021 13:54:41 GMT Message-Id: <202107041354.164DsfWs082663@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 86d0d3aadb48 - main - freebsd-update: Update URL of supported platforms information MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 86d0d3aadb48a9a917167078ed197a061179fa4f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 13:54:42 -0000 The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=86d0d3aadb48a9a917167078ed197a061179fa4f commit 86d0d3aadb48a9a917167078ed197a061179fa4f Author: Li-Wen Hsu AuthorDate: 2021-07-04 13:45:08 +0000 Commit: Li-Wen Hsu CommitDate: 2021-07-04 13:45:08 +0000 freebsd-update: Update URL of supported platforms information MFC after: 3 days --- usr.sbin/freebsd-update/freebsd-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index 7f9b06f0221f..f82ec7d7730c 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -1041,7 +1041,7 @@ fetch_pick_server () { This may be because upgrading from this platform (${ARCH}) or release (${RELNUM}) is unsupported by `basename $0`. Only platforms with Tier 1 support can be upgraded by `basename $0`. - See https://www.freebsd.org/platforms/index.html for more info. + See https://www.freebsd.org/platforms/ for more info. If unsupported, FreeBSD must be upgraded by source. EOF From owner-dev-commits-src-all@freebsd.org Sun Jul 4 13:55:49 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 6E106665823; Sun, 4 Jul 2021 13:55:49 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHr1w2WDqz58TG; Sun, 4 Jul 2021 13:55:47 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 164Dte9Q021028; Sun, 4 Jul 2021 06:55:40 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 164Dtexu021027; Sun, 4 Jul 2021 06:55:40 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202107041355.164Dtexu021027@gndrsh.dnsmgr.net> Subject: Re: git: 5bd70f050072 - main - stress2: Improve cleanup code In-Reply-To: <202107020525.1625PhAd078350@gitrepo.freebsd.org> To: Peter Holm Date: Sun, 4 Jul 2021 06:55:40 -0700 (PDT) CC: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4GHr1w2WDqz58TG X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [3.90 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[69.59.192.140:from]; AUTH_NA(1.00)[]; DMARC_NA(0.00)[dnsmgr.net]; SPAMHAUS_ZRD(0.00)[69.59.192.140:from:127.0.2.255]; NEURAL_SPAM_MEDIUM(1.00)[1.000]; RCVD_TLS_LAST(0.00)[]; NEURAL_SPAM_SHORT(1.00)[0.999]; NEURAL_SPAM_LONG(1.00)[1.000]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 13:55:49 -0000 > The branch main has been updated by pho: > > URL: https://cgit.FreeBSD.org/src/commit/?id=5bd70f050072bced1f0b7a566932857b3dd506ef > > commit 5bd70f050072bced1f0b7a566932857b3dd506ef > Author: Peter Holm > AuthorDate: 2021-07-02 05:22:18 +0000 > Commit: Peter Holm > CommitDate: 2021-07-02 05:22:18 +0000 > > stress2: Improve cleanup code > --- > tools/test/stress2/misc/mmap3.sh | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/tools/test/stress2/misc/mmap3.sh b/tools/test/stress2/misc/mmap3.sh > index bc5905dd920e..9175b77842f3 100755 > --- a/tools/test/stress2/misc/mmap3.sh > +++ b/tools/test/stress2/misc/mmap3.sh > @@ -42,11 +42,12 @@ while [ `date '+%s'` -lt $((start + 5 * 60)) ]; do > ./mmap3 > done > echo "Expect Segmentation faults" > +trap "rm -f /tmp/mmap3.0*" EXIT INT > start=`date '+%s'` > while [ `date '+%s'` -lt $((start + 5 * 60)) ]; do > ./mmap3 random > done > -rm -f mmap3 mmap3.core /tmp/mmap.0* > +rm -f mmap3 mmap3.core /tmp/mmap3.0* I have never liked the use of * in a "cleanup" when there is more information about the form of the file name: mmap3.??????.???? would be better, and it also fixes the assumption that there is always a leading zero, which the format string does not specify (yes, it says to leading zero fill, but that does not mean it shall always start with a zero). A more precise: mmap3.[0-9][0-9][0-9][0-9][0-9][0-9].[0-9][0-9][0-9][0-9] could also be used, but is kinda long winded. > exit > > EOF > @@ -102,7 +103,7 @@ work(int nr) > p = (void *)STARTADDR; > len = ADRSPACE; > > - sprintf(path, "/tmp/mmap.%06d.%04d", getpid(), nr); > + sprintf(path, "/tmp/mmap3.%06d.%04d", getpid(), nr); > if ((fd = open(path, O_CREAT | O_TRUNC | O_RDWR, 0622)) == -1) > err(1,"open()"); > if (ftruncate(fd, len) == -1) > -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-all@freebsd.org Sun Jul 4 14:01:20 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 527FF66565B; Sun, 4 Jul 2021 14:01: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 4GHr8J202zz58pR; Sun, 4 Jul 2021 14:01: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 2CBC013B48; Sun, 4 Jul 2021 14:01: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 164E1Keh094611; Sun, 4 Jul 2021 14:01:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 164E1KXH094610; Sun, 4 Jul 2021 14:01:20 GMT (envelope-from git) Date: Sun, 4 Jul 2021 14:01:20 GMT Message-Id: <202107041401.164E1KXH094610@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: ffe6afc4f012 - main - freebsd-tips: Use a fetchable URL as example MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ffe6afc4f0121f1909f2fa88694228f771dd3fcb Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 14:01:20 -0000 The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=ffe6afc4f0121f1909f2fa88694228f771dd3fcb commit ffe6afc4f0121f1909f2fa88694228f771dd3fcb Author: Li-Wen Hsu AuthorDate: 2021-07-04 14:00:46 +0000 Commit: Li-Wen Hsu CommitDate: 2021-07-04 14:00:46 +0000 freebsd-tips: Use a fetchable URL as example MFC after: 3 days --- usr.bin/fortune/datfiles/freebsd-tips | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/fortune/datfiles/freebsd-tips b/usr.bin/fortune/datfiles/freebsd-tips index cbbaff9eb84f..c747c689791b 100644 --- a/usr.bin/fortune/datfiles/freebsd-tips +++ b/usr.bin/fortune/datfiles/freebsd-tips @@ -439,7 +439,7 @@ You can use "pkg info" to see a list of packages you have installed. % You can use the 'fetch' command to retrieve files over ftp, http or https. - fetch https://www.FreeBSD.org/index.html + fetch https://www.FreeBSD.org/images/beastie.png will download the front page of the FreeBSD web site. % From owner-dev-commits-src-all@freebsd.org Sun Jul 4 14:03:47 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 34706665957; Sun, 4 Jul 2021 14:03:47 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (br1.CN84in.dnsmgr.net [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHrC55yZmz596L; Sun, 4 Jul 2021 14:03:45 +0000 (UTC) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: from gndrsh.dnsmgr.net (localhost [127.0.0.1]) by gndrsh.dnsmgr.net (8.13.3/8.13.3) with ESMTP id 164E3iWp021064; Sun, 4 Jul 2021 07:03:44 -0700 (PDT) (envelope-from freebsd@gndrsh.dnsmgr.net) Received: (from freebsd@localhost) by gndrsh.dnsmgr.net (8.13.3/8.13.3/Submit) id 164E3i0C021063; Sun, 4 Jul 2021 07:03:44 -0700 (PDT) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <202107041403.164E3i0C021063@gndrsh.dnsmgr.net> Subject: Re: git: ef790cc7407e - main - hdaa: update pin patch configurations In-Reply-To: <202107030617.1636H22I062745@gitrepo.freebsd.org> To: Warner Losh Date: Sun, 4 Jul 2021 07:03:44 -0700 (PDT) CC: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Reply-To: rgrimes@freebsd.org X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Rspamd-Queue-Id: 4GHrC55yZmz596L X-Spamd-Bar: +++ Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=none; spf=none (mx1.freebsd.org: domain of freebsd@gndrsh.dnsmgr.net has no SPF policy when checking 69.59.192.140) smtp.mailfrom=freebsd@gndrsh.dnsmgr.net X-Spamd-Result: default: False [3.89 / 15.00]; HAS_REPLYTO(0.00)[rgrimes@freebsd.org]; ARC_NA(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MIME_GOOD(-0.10)[text/plain]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; DMARC_NA(0.00)[dnsmgr.net]; AUTH_NA(1.00)[]; NEURAL_SPAM_MEDIUM(0.99)[0.995]; SPAMHAUS_ZRD(0.00)[69.59.192.140:from:127.0.2.255]; RCVD_TLS_LAST(0.00)[]; RBL_DBL_DONT_QUERY_IPS(0.00)[69.59.192.140:from]; NEURAL_SPAM_LONG(1.00)[1.000]; NEURAL_SPAM_SHORT(1.00)[0.997]; R_SPF_NA(0.00)[no SPF record]; FROM_EQ_ENVFROM(0.00)[]; R_DKIM_NA(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:13868, ipnet:69.59.192.0/19, country:US]; RCVD_COUNT_TWO(0.00)[2]; MAILMAN_DEST(0.00)[dev-commits-src-all,dev-commits-src-main] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 14:03:47 -0000 > The branch main has been updated by imp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ef790cc7407e827db9563d08a52a71ab36436986 > > commit ef790cc7407e827db9563d08a52a71ab36436986 > Author: K Staring > AuthorDate: 2021-07-03 06:15:49 +0000 > Commit: Warner Losh > CommitDate: 2021-07-03 06:15:49 +0000 > > hdaa: update pin patch configurations > > A number of structural changes: > - Use decimal nid numbers instead of hex > - updated the branch to incoorporate the suggestions made in the > ALC280 pull request github thread > - Convert magic pin values into strings. > - Also update hdaa_patches to use clearer enums.. > - made pin patch type enum clearer, add macro for 'string' type > patches > - Added pin_patch structures to separate data from logic. > - Integrated Realtek patches into new structure. > > These incorporate fixes for ALC255, ALC256, ALC260, ALC262, ALC268, > ALC269, ALC280, ALC282, ALC283, ALC286, ALC290, ALC293, ALC296, ALC2880 > > And have definitions for a number of Dell and HP laptops. > > Much of this data has been mined fromt he tables in the Linux driver. > > imp squashed these into one commit because the changes from the github > pull requests no longer cleanly apply individually and made light style > changes after feedback from jhb. > > Pull Request: https://github.com/freebsd/freebsd-src/pull/139 > Pull Request: https://github.com/freebsd/freebsd-src/pull/140 > Pull Request: https://github.com/freebsd/freebsd-src/pull/141 > Pull Request: https://github.com/freebsd/freebsd-src/pull/142 > Pull Request: https://github.com/freebsd/freebsd-src/pull/143 > Pull Request: https://github.com/freebsd/freebsd-src/pull/144 > Pull Request: https://github.com/freebsd/freebsd-src/pull/145 > Pull Request: https://github.com/freebsd/freebsd-src/pull/146 > Pull Request: https://github.com/freebsd/freebsd-src/pull/147 > Pull Request: https://github.com/freebsd/freebsd-src/pull/148 > Pull Request: https://github.com/freebsd/freebsd-src/pull/149 > Pull Request: https://github.com/freebsd/freebsd-src/pull/150 > Differential Revision: https://reviews.freebsd.org/D30619 Is there any intent to merge this to stable-13/12? The out of box "audio" experience on many of the "fixed" devices in this as it stands now is poor, and iirc this fixes many of the issues with "no sound" when using anything but the builtin speakers. Thanks, Rod > --- > sys/dev/sound/pci/hda/hdaa_patches.c | 259 +++----- > sys/dev/sound/pci/hda/hdac.h | 145 ++++- > sys/dev/sound/pci/hda/pin_patch.h | 121 ++++ > sys/dev/sound/pci/hda/pin_patch_realtek.h | 992 ++++++++++++++++++++++++++++++ > 4 files changed, 1327 insertions(+), 190 deletions(-) > > diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c b/sys/dev/sound/pci/hda/hdaa_patches.c > index 590c9e4d46fb..69299ee4344f 100644 > --- a/sys/dev/sound/pci/hda/hdaa_patches.c > +++ b/sys/dev/sound/pci/hda/hdaa_patches.c > @@ -44,6 +44,9 @@ > #include > #include > > +#include "pin_patch.h" > +#include "pin_patch_realtek.h" > + > SND_DECLARE_FILE("$FreeBSD$"); > > static const struct { > @@ -145,10 +148,28 @@ static const struct { > 0 } > }; > > +static struct pin_patch_t * > +match_pin_patches(int vendor_id, int vendor_subid) > +{ > + for (int ci = 0; ci < nitems(realtek_model_pin_patches); ci++) { > + struct hdaa_model_pin_patch_t *p = &realtek_model_pin_patches[ci]; > + if (vendor_id != p->id) > + continue; > + for (struct model_pin_patch_t *pp = p->patches; pp->models; pp++) { > + for (struct pin_machine_model_t *model = pp->models; model->id != 0; model++) { > + if (vendor_subid == model->id) > + return (pp->pin_patches); > + } > + } > + } > + > + return (0); > +} > + > static void > hdac_pin_patch(struct hdaa_widget *w) > { > - const char *patch = NULL; > + const char *patch_str = NULL; > uint32_t config, orig, id, subid; > nid_t nid = w->nid; > > @@ -156,54 +177,7 @@ hdac_pin_patch(struct hdaa_widget *w) > id = hdaa_codec_id(w->devinfo); > subid = hdaa_card_id(w->devinfo); > > - /* XXX: Old patches require complete review. > - * Now they may create more problem then solve due to > - * incorrect associations. > - */ > - if (id == HDA_CODEC_ALC880 && subid == LG_LW20_SUBVENDOR) { > - switch (nid) { > - case 26: > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; > - break; > - case 27: > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT; > - break; > - default: > - break; > - } > - } else if (id == HDA_CODEC_ALC880 && > - (subid == CLEVO_D900T_SUBVENDOR || > - subid == ASUS_M5200_SUBVENDOR)) { > - /* > - * Super broken BIOS > - */ > - switch (nid) { > - case 24: /* MIC1 */ > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN; > - break; > - case 25: /* XXX MIC2 */ > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN; > - break; > - case 26: /* LINE1 */ > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; > - break; > - case 27: /* XXX LINE2 */ > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; > - break; > - case 28: /* CD */ > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_CD; > - break; > - } > - } else if (id == HDA_CODEC_ALC883 && > - (subid == MSI_MS034A_SUBVENDOR || > - HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, subid))) { > + if (id == HDA_CODEC_ALC883 && HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, subid)) { > switch (nid) { > case 25: > config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > @@ -247,42 +221,6 @@ hdac_pin_patch(struct hdaa_widget *w) > config |= HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE; > break; > } > - } else if (id == HDA_CODEC_ALC861 && subid == > - ASUS_W6F_SUBVENDOR) { > - switch (nid) { > - case 11: > - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); > - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_OUT | > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED); > - break; > - case 12: > - case 14: > - case 16: > - case 31: > - case 32: > - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); > - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED); > - break; > - case 15: > - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); > - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK); > - break; > - } > - } else if (id == HDA_CODEC_ALC861 && subid == > - UNIWILL_9075_SUBVENDOR) { > - switch (nid) { > - case 15: > - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); > - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK); > - break; > - } > } > > /* New patches */ > @@ -290,10 +228,10 @@ hdac_pin_patch(struct hdaa_widget *w) > subid == LENOVO_X300_SUBVENDOR) { > switch (nid) { > case 17: /* Headphones with redirection */ > - patch = "as=1 seq=15"; > + patch_str = "as=1 seq=15"; > break; > case 20: /* Two mics together */ > - patch = "as=2 seq=15"; > + patch_str = "as=2 seq=15"; > break; > } > } else if (id == HDA_CODEC_AD1986A && > @@ -302,60 +240,45 @@ hdac_pin_patch(struct hdaa_widget *w) > subid == ASUS_P5PL2_SUBVENDOR)) { > switch (nid) { > case 26: /* Headphones with redirection */ > - patch = "as=1 seq=15"; > + patch_str = "as=1 seq=15"; > break; > case 28: /* 5.1 out => 2.0 out + 1 input */ > - patch = "device=Line-in as=8 seq=1"; > + patch_str = "device=Line-in as=8 seq=1"; > break; > case 29: /* Can't use this as input, as the only available mic > * preamplifier is busy by front panel mic (nid 31). > * If you want to use this rear connector as mic input, > * you have to disable the front panel one. */ > - patch = "as=0"; > + patch_str = "as=0"; > break; > case 31: /* Lot of inputs configured with as=15 and unusable */ > - patch = "as=8 seq=3"; > + patch_str = "as=8 seq=3"; > break; > case 32: > - patch = "as=8 seq=4"; > + patch_str = "as=8 seq=4"; > break; > case 34: > - patch = "as=8 seq=5"; > + patch_str = "as=8 seq=5"; > break; > case 36: > - patch = "as=8 seq=6"; > - break; > - } > - } else if (id == HDA_CODEC_ALC260 && > - HDA_DEV_MATCH(SONY_S5_SUBVENDOR, subid)) { > - switch (nid) { > - case 16: > - patch = "seq=15 device=Headphones"; > - break; > - } > - } else if (id == HDA_CODEC_ALC268) { > - if (subid == ACER_T5320_SUBVENDOR) { > - switch (nid) { > - case 20: /* Headphones Jack */ > - patch = "as=1 seq=15"; > + patch_str = "as=8 seq=6"; > break; > } > - } > } else if (id == HDA_CODEC_CX20561 && > subid == LENOVO_B450_SUBVENDOR) { > switch (nid) { > case 22: > - patch = "as=1 seq=15"; > + patch_str = "as=1 seq=15"; > break; > } > } else if (id == HDA_CODEC_CX20561 && > subid == LENOVO_T400_SUBVENDOR) { > switch (nid) { > case 22: > - patch = "as=1 seq=15"; > + patch_str = "as=1 seq=15"; > break; > case 26: > - patch = "as=1 seq=0"; > + patch_str = "as=1 seq=0"; > break; > } > } else if (id == HDA_CODEC_CX20590 && > @@ -366,102 +289,62 @@ hdac_pin_patch(struct hdaa_widget *w) > subid == LENOVO_G580_SUBVENDOR)) { > switch (nid) { > case 25: > - patch = "as=1 seq=15"; > + patch_str = "as=1 seq=15"; > break; > /* > * Group onboard mic and headphone mic > * together. Fixes onboard mic. > */ > case 27: > - patch = "as=2 seq=15"; > + patch_str = "as=2 seq=15"; > break; > case 35: > - patch = "as=2"; > - break; > - } > - } else if (id == HDA_CODEC_ALC269 && > - (subid == LENOVO_X1CRBN_SUBVENDOR || > - subid == LENOVO_T430_SUBVENDOR || > - subid == LENOVO_T430S_SUBVENDOR || > - subid == LENOVO_T530_SUBVENDOR)) { > - switch (nid) { > - case 21: > - patch = "as=1 seq=15"; > - break; > - } > - } else if (id == HDA_CODEC_ALC285 && > - (subid == LENOVO_X120KH_SUBVENDOR || > - subid == LENOVO_X120QD_SUBVENDOR)) { > - switch (nid) { > - case 33: > - patch = "as=1 seq=15"; > - break; > - } > - } else if (id == HDA_CODEC_ALC269 && > - subid == ASUS_UX31A_SUBVENDOR) { > - switch (nid) { > - case 33: > - patch = "as=1 seq=15"; > - break; > - } > - } else if (id == HDA_CODEC_ALC892 && > - subid == INTEL_DH87RL_SUBVENDOR) { > - switch (nid) { > - case 27: > - patch = "as=1 seq=15"; > - break; > - } > - } else if (id == HDA_CODEC_ALC292 && > - subid == LENOVO_X120BS_SUBVENDOR) { > - switch (nid) { > - case 21: > - patch = "as=1 seq=15"; > - break; > - } > - } else if (id == HDA_CODEC_ALC295 && subid == HP_AF006UR_SUBVENDOR) { > - switch (nid) { > - case 18: > - patch = "as=2"; > - break; > - case 25: > - patch = "as=2 seq=15"; > - break; > - case 33: > - patch = "as=1 seq=15"; > - break; > - } > - } else if (id == HDA_CODEC_ALC298 && HDA_DEV_MATCH(LENOVO_ALL_SUBVENDOR, subid)) { > - switch (nid) { > - case 23: > - config = 0x03a1103f; > - break; > - case 33: > - config = 0x2121101f; > - break; > - } > - } else if (id == HDA_CODEC_ALC298 && subid == DELL_XPS9560_SUBVENDOR) { > - switch (nid) { > - case 24: > - config = 0x01a1913c; > - break; > - case 26: > - config = 0x01a1913d; > + patch_str = "as=2"; > break; > } > } else if (id == HDA_CODEC_ALC256 && (subid == DELL_I7577_SUBVENDOR || > subid == DELL_L7480_SUBVENDOR)) { > switch (nid) { > case 20: > - patch = "as=1 seq=0"; > + patch_str = "as=1 seq=0"; > break; > case 33: > - patch = "as=1 seq=15"; > + patch_str = "as=1 seq=15"; > break; > } > + } else { > + /* > + * loop over hdaa_model_pin_patch > + */ > + struct pin_patch_t *pin_patches = NULL; > + > + pin_patches = match_pin_patches(id, subid); > + > + if (pin_patches != NULL) { > + for (struct pin_patch_t *patch = pin_patches; patch->type; patch++) { > + if (nid == patch->nid) { > + switch (patch->type) { > + case PIN_PATCH_TYPE_STRING: > + patch_str = patch->patch.string; > + case PIN_PATCH_TYPE_MASK: > + config &= ~patch->patch.mask[0]; > + config |= patch->patch.mask[1]; > + break; > + case PIN_PATCH_TYPE_OVERRIDE: > + config = patch->patch.override; > + break; > + default: > + /* should panic hard */ > + break; > + } > + break; > + } > + } > + } > } > > - if (patch != NULL) > - config = hdaa_widget_pin_patch(config, patch); > + if (patch_str != NULL) > + config = hdaa_widget_pin_patch(config, patch_str); > HDA_BOOTVERBOSE( > if (config != orig) > device_printf(w->devinfo->dev, > diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h > index 8e427d3412da..611cb98badd8 100644 > --- a/sys/dev/sound/pci/hda/hdac.h > +++ b/sys/dev/sound/pci/hda/hdac.h > @@ -61,6 +61,7 @@ > #define HDA_INTEL_82801G HDA_MODEL_CONSTRUCT(INTEL, 0x27d8) > #define HDA_INTEL_82801H HDA_MODEL_CONSTRUCT(INTEL, 0x284b) > #define HDA_INTEL_82801I HDA_MODEL_CONSTRUCT(INTEL, 0x293e) > +#define HDA_INTEL_GMLK HDA_MODEL_CONSTRUCT(INTEL, 0x3198) > #define HDA_INTEL_JLK HDA_MODEL_CONSTRUCT(INTEL, 0x38c8) > #define HDA_INTEL_82801JI HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) > #define HDA_INTEL_82801JD HDA_MODEL_CONSTRUCT(INTEL, 0x3a6e) > @@ -91,7 +92,16 @@ > #define HDA_INTEL_CMLKLP HDA_MODEL_CONSTRUCT(INTEL, 0x02c8) > #define HDA_INTEL_CMLKH HDA_MODEL_CONSTRUCT(INTEL, 0x06c8) > #define HDA_INTEL_TGLK HDA_MODEL_CONSTRUCT(INTEL, 0xa0c8) > -#define HDA_INTEL_GMLK HDA_MODEL_CONSTRUCT(INTEL, 0x3198) > +#define INTEL_A100ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xa100) > +#define INTEL_D400ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd400) > +#define INTEL_D401ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd401) > +#define INTEL_D402ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd402) > +#define INTEL_E305ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe305) > +#define INTEL_E308ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe308) > +#define INTEL_E224ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe224) > +#define INTEL_E400ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe400) > +#define INTEL_E401ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe401) > +#define INTEL_E402ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe402) > #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) > > /* Nvidia */ > @@ -198,6 +208,10 @@ > > /* HP/Compaq */ > #define HP_VENDORID 0x103c > +#define HP_Z200_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x103c) > +#define HP_225AID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x225a) > +#define HP_2272ID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2272) > +#define HP_2273ID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2273) > #define HP_V3000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30b5) > #define HP_NX7400_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a2) > #define HP_NX6310_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30aa) > @@ -207,6 +221,7 @@ > #define HP_DV5000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a5) > #define HP_DC7700S_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2801) > #define HP_DC7700_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2802) > +#define HP_DC5750_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x280a) > #define HP_AF006UR_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x83a2) > #define HP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0xffff) > /* What is wrong with XN 2563 anyway? (Got the picture ?) */ > @@ -222,7 +237,28 @@ > #define DELL_L7480_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07a0) > #define DELL_XPSM1210_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01d7) > #define DELL_OPLX745_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01da) > +#define DELL_05F4ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f4) > +#define DELL_05F5ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f5) > +#define DELL_05F6ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f6) > +#define DELL_V5470_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0615) > +#define DELL_V5470_1_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0616) > +#define DELL_064AID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x064a) > +#define DELL_064BID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x064b) > +#define DELL_9020M_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0669) > +#define DELL_V5480_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x069a) > +#define DELL_06D9ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06d9) > +#define DELL_06DAID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06da) > +#define DELL_06DBID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06db) > +#define DELL_06DDID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06dd) > +#define DELL_06DEID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06de) > +#define DELL_06DFID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06df) > +#define DELL_06E0ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06e0) > +#define DELL_7559_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0706) > +#define DELL_7000_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0798) > #define DELL_XPS9560_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07be) > +#define DELL_E7240_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05ca) > +#define DELL_164AID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x164a) > +#define DELL_164BID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x164b) > #define DELL_I7577_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0802) > #define DELL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0xffff) > > @@ -233,34 +269,66 @@ > > /* Acer */ > #define ACER_VENDORID 0x1025 > +#define ACER_0070ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0070) > +#define ACER_0077ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0077) > +#define ACER_0078ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0078) > +#define ACER_0087ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0087) > #define ACER_A5050_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x010f) > #define ACER_A4520_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0127) > #define ACER_A4710_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x012f) > #define ACER_A4715_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0133) > +#define ACER_TM_6293_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0139) > #define ACER_3681WXM_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0110) > #define ACER_T6292_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011b) > #define ACER_T5320_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011f) > +#define ACER_TM_6293_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0139) > +#define ACER_AC700_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x047c) > +#define ACER_V5_571G_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x072d) > +#define ACER_AO725_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0740) > +#define ACER_AO756_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0742) > +#define ACER_E1_472_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0762) > +#define ACER_E1_572_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0775) > +#define ACER_V5_573G_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x079b) > +#define ACER_CB_14_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x106d) > +#define ACER_V5_122P_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xa80d) > +#define ACER_APFV_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xa884) > +#define ACER_E309ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xe309) > +#define ACER_E310ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xe310) > #define ACER_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xffff) > > /* Asus */ > #define ASUS_VENDORID 0x1043 > +#define ASUS_X540A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x103e) > +#define ASUS_X540SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10c0) > +#define ASUS_X556UR_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x11c0) > +#define ASUS_W5A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10c3) > +#define ASUS_X540LA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10d0) > #define ASUS_A8X_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1153) > #define ASUS_U5F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263) > #define ASUS_W6F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263) > +#define ASUS_X541SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x12e0) > +#define ASUS_X541UV_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x12f0) > #define ASUS_A7M_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1323) > #define ASUS_F3JC_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1338) > #define ASUS_G2K_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1339) > +#define ASUS_Z550SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13b0) > #define ASUS_A7T_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13c2) > #define ASUS_UX31A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1517) > +#define ASUS_Z71V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1964) > #define ASUS_W2J_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1971) > #define ASUS_M5200_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1993) > +#define ASUS_G73JW_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1a13) > +#define ASUS_X705UD_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1a30) > +#define ASUS_Z550MA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1bbd) > +#define ASUS_X555UB_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1ccd) > #define ASUS_P5PL2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x817f) > #define ASUS_P1AH2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb) > #define ASUS_M2NPVMX_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb) > #define ASUS_M2V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81e7) > #define ASUS_P5BWD_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81ec) > #define ASUS_M2N_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x8234) > -#define ASUS_A8NVMCSM_SUBVENDOR HDA_MODEL_CONSTRUCT(NVIDIA, 0xcb84) > +#define ASUS_A8NVMCSM_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0xcb84) > +#define ASUS_X101CH_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x8516) > #define ASUS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0xffff) > > /* IBM / Lenovo */ > @@ -287,7 +355,11 @@ > #define LENOVO_T430S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fb) > #define LENOVO_T520_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21cf) > #define LENOVO_T530_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f6) > +#define LENOVO_X230_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fa) > +#define LENOVO_X230T_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2203) > +#define LENOVO_T431S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2208) > #define LENOVO_G580_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3977) > +#define LENOVO_3000_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x384e) > #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) > > /* Samsung */ > @@ -307,8 +379,19 @@ > /* Sony */ > #define SONY_VENDORID 0x104d > #define SONY_S5_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81cc) > +#define SONY_81A0ID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81a0) > +#define SONY_81D6ID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81d6) > +#define SONY_81BBID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81bb) > +#define SONY_VAIO_TX_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81e2) > +#define SONY_VAIO_S13_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x9099) > +#define SONY_VAIO_P11_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x90b5) > +#define SONY_VAIO_P13_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x90b6) > #define SONY_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0xffff) > > +/* Tyan? */ > +#define TYAN_VENDORID 0x10f1 > +#define TYAN_N6650W_SUBVENDOR HDA_MODEL_CONSTRUCT(TYAN, 0x2915) > + > /* > * Apple Intel MacXXXX seems using Sigmatel codec/vendor id > * instead of their own, which is beyond my comprehension > @@ -322,18 +405,32 @@ > /* LG Electronics */ > #define LG_VENDORID 0x1854 > #define LG_LW20_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0018) > +#define LG_M1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x003b) > +#define LG_P1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x005f) > +#define LG_W1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0068) > +#define LG_LW25_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0077) > #define LG_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0xffff) > > /* Fujitsu Siemens */ > #define FS_VENDORID 0x1734 > #define FS_PA1510_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10b8) > #define FS_SI1848_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10cd) > +#define FS_AMILO_M1437_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x107c) > +#define FS_AMILO_M1451G_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x1094) > +#define FS_AMILO_PI1556_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10b0) > +#define FS_AMILO_XI1526_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10ac) > +#define FS_H270_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x1147) > #define FS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0xffff) > > /* Fujitsu Limited */ > #define FL_VENDORID 0x10cf > #define FL_S7020D_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1326) > +#define FL_LB_S7110_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1397) > #define FL_U1010_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x142d) > +#define FL_1475ID_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1475) > +#define FL_LB_U904_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1845) > +#define FL_LB_T731_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x15dc) > +#define FL_LB_E725_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1757) > #define FL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0xffff) > > /* Toshiba */ > @@ -346,18 +443,61 @@ > #define MSI_VENDORID 0x1462 > #define MSI_MS1034_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x0349) > #define MSI_MS034A_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x034a) > +#define MSI_1150ID_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x1150) > +#define MSI_MS_B120_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0xb120) > #define MSI_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0xffff) > > /* Giga-Byte Technology */ > #define GB_VENDORID 0x1458 > #define GB_G33S2H_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xa022) > +#define GB_K8_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xa102) > +#define GB_BXBT2807_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xfa53) > #define GP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xffff) > > /* Uniwill ? */ > #define UNIWILL_VENDORID 0x1584 > #define UNIWILL_9075_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9075) > +#define UNIWILL_9050_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9050) > +#define UNIWILL_9054_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9054) > +#define UNIWILL_9070_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9070) > #define UNIWILL_9080_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, 0x9080) > > +/* Coeus / Elitegroup */ > +#define COEUS_VENDORID 0x1019 > +#define COEUS_G610P_SUBVENDOR HDA_MODEL_CONSTRUCT(COEUS, 0x0f69) > +#define COEUS_A880ID_SUBVENDOR HDA_MODEL_CONSTRUCT(COEUS, 0xa880) > + > +/* Arima */ > +#define ARIMA_VENDORID 0x161f > +#define ARIMA_W810_SUBVENDOR HDA_MODEL_CONSTRUCT(ARIMA, 0x0f69) > + > +/* Shuttle Computer */ > +#define SHUTTLE_VENDORID 0x1039 > +#define SHUTTLE_ST20G5_SUBVENDOR HDA_MODEL_CONSTRUCT(SHUTTLE, 0xc790) > + > +/* First International Computer */ > +#define FIC_VENDORID 0x1509 > +#define FIC_P4M_SUBVENDOR HDA_MODEL_CONSTRUCT(FIC, 0x925d) > + > +/* Gateway 2000 */ > +#define GATEWAY_VENDORID 0x107b > +#define GATEWAY_3032ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x3032) > +#define GATEWAY_3033ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x3033) > +#define GATEWAY_4039ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x4039) > + > +/* Biostar */ > +#define BIOSTAR_VENDORID 0x1565 > +#define BIOSTAR_8202ID_SUBVENDOR HDA_MODEL_CONSTRUCT(BIOSTAR, 0x8202) > + > +/* EPoX Computer Co., Ltd. */ > +#define EPOX_VENDORID 0x1695 > +#define EPOX_400DID_SUBVENDOR HDA_MODEL_CONSTRUCT(EPOX, 0x400d) > +#define EPOX_EP5LDA_SUBVENDOR HDA_MODEL_CONSTRUCT(EPOX, 0x4012) > + > +/* AOpen */ > +#define AOPEN_VENDORID 0xa0a0 > +#define AOPEN_I915GMMHFS_SUBVENDOR HDA_MODEL_CONSTRUCT(AOPEN, 0x8202) > + > /* All codecs you can eat... */ > #define HDA_CODEC_CONSTRUCT(vendor, id) \ > (((uint32_t)(vendor##_VENDORID) << 16) | ((id) & 0xffff)) > @@ -390,6 +530,7 @@ > #define HDA_CODEC_ALC268 HDA_CODEC_CONSTRUCT(REALTEK, 0x0268) > #define HDA_CODEC_ALC269 HDA_CODEC_CONSTRUCT(REALTEK, 0x0269) > #define HDA_CODEC_ALC270 HDA_CODEC_CONSTRUCT(REALTEK, 0x0270) > +#define HDA_CODEC_ALC271 HDA_CODEC_CONSTRUCT(REALTEK, 0x0271) > #define HDA_CODEC_ALC272 HDA_CODEC_CONSTRUCT(REALTEK, 0x0272) > #define HDA_CODEC_ALC273 HDA_CODEC_CONSTRUCT(REALTEK, 0x0273) > #define HDA_CODEC_ALC274 HDA_CODEC_CONSTRUCT(REALTEK, 0x0274) > diff --git a/sys/dev/sound/pci/hda/pin_patch.h b/sys/dev/sound/pci/hda/pin_patch.h > new file mode 100644 > index 000000000000..8e2c9875906f > --- /dev/null > +++ b/sys/dev/sound/pci/hda/pin_patch.h > @@ -0,0 +1,121 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2018 Khamba Staring > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > +#ifndef PIN_PATCH_H > +#define PIN_PATCH_H > + > +#include "hdac.h" > + > +#define PIN_SUBVENDOR(sv) { .id = sv } > + > + > +#define PIN_PATCH_STRING(n, patchstr) { \ > + .nid = n, \ > + .type = PIN_PATCH_TYPE_STRING, \ > + .patch.string = patchstr \ > +} > +#define PIN_OVERRIDE(n, newvalue) { \ > + .nid = n, \ > + .type = PIN_PATCH_TYPE_OVERRIDE, \ > + .patch.override = newvalue \ > +} > +#define PIN_PATCH_NOT_APPLICABLE(n) \ > + PIN_PATCH_STRING(n, "as=15 misc=1 color=Black ctype=1/8 device=Speaker loc=Rear conn=None") > +#define PIN_PATCH_HP_OUT(n) \ > + PIN_PATCH_STRING(n, "seq=15 as=1 color=Green ctype=1/8 device=Headphones loc=Rear") > +#define PIN_PATCH_HP(n) \ > + PIN_PATCH_STRING(n, "seq=15 as=1 misc=1 color=Green ctype=1/8 device=Headphones loc=Rear") > +#define PIN_PATCH_SPEAKER(n) \ > + PIN_PATCH_STRING(n, "as=2 misc=1 ctype=ATAPI loc=Onboard conn=Fixed") > +#define PIN_PATCH_BASS_SPEAKER(n) \ > + PIN_PATCH_STRING(n, "as=3 misc=1 ctype=ATAPI loc=Onboard conn=Fixed") > +#define PIN_PATCH_MIC_IN(n) \ > + PIN_PATCH_STRING(n, "as=5 misc=9 color=Pink ctype=1/8 device=Mic loc=Rear") > +#define PIN_PATCH_MIC_INTERNAL(n) \ > + PIN_PATCH_STRING(n, "as=6 misc=1 ctype=Digital device=Mic loc=Internal conn=Fixed") > +#define PIN_PATCH_MIC_FRONT(n) \ > + PIN_PATCH_STRING(n, "as=4 misc=12 color=Pink ctype=1/8 device=Mic loc=Front") > +#define PIN_PATCH_LINE_IN(n) \ > + PIN_PATCH_STRING(n, "seq=1 as=3 color=Blue ctype=1/8 device=Line-in loc=Rear") > +#define PIN_PATCH_LINE_OUT(n) \ > + PIN_PATCH_STRING(n, "as=1 color=Green ctype=1/8 loc=Rear") > +#define PIN_PATCH_SPDIF_OUT(n) \ > + PIN_PATCH_STRING(n, "as=4 misc=1 color=Green ctype=Optical device=SPDIF-out loc=Rear") > +#define PIN_PATCH_JACK_WO_DETECT(n) \ > + PIN_PATCH_STRING(n, "seq=12 as=3 misc=1 color=Pink ctype=1/8 device=Mic loc=Rear") > +#define PIN_PATCH_HPMIC_WO_DETECT(n) \ > + PIN_PATCH_STRING(n, "seq=13 as=3 misc=1 color=Pink ctype=1/8 device=Mic loc=Rear") > +#define PIN_PATCH_HPMIC_WITH_DETECT(n) \ > + PIN_PATCH_STRING(n, "seq=12 as=3 color=Pink ctype=1/8 device=Mic loc=Rear") > +#define PIN_PATCH_CLFE(n) \ > + PIN_PATCH_STRING(n, "seq=1 as=1 misc=4 color=Black ctype=1/8 loc=Rear") > +#define PIN_PATCH_SURROUND(n) \ > + PIN_PATCH_STRING(n, "seq=2 as=1 misc=4 color=Orange ctype=1/8 loc=Rear") > +#define PIN_PATCH_SUBWOOFER(n) \ > + PIN_PATCH_STRING(n, "seq=1 as=1 misc=1 ctype=ATAPI device=Speaker loc=Onboard conn=Fixed") > +#define PIN_PATCH_DOCK_LINE_OUT(n) \ > + PIN_PATCH_STRING(n, "seq=15 as=3 color=Black ctype=1/8 loc=Ext-Rear") > +#define PIN_PATCH_DOCK_HP(n) \ > + PIN_PATCH_STRING(n, "seq=15 as=3 color=Black ctype=1/8 device=Headphones loc=Ext-Rear") > +#define PIN_PATCH_DOCK_MIC_IN(n) \ > + PIN_PATCH_STRING(n, "as=4 color=Black ctype=1/8 device=Mic loc=Ext-Left") > + > +enum { > + PIN_PATCH_TYPE_EOL, /* end-of-list */ > + PIN_PATCH_TYPE_STRING, > + PIN_PATCH_TYPE_MASK, > + PIN_PATCH_TYPE_OVERRIDE > +}; > + > +struct pin_patch_t { > + nid_t nid; /* nid to patch */ > + int type; /* patch type */ > + union { > + const char *string; /* patch string */ > + uint32_t mask[2]; /* pin config mask */ > + uint32_t override; /* pin config override */ > + } patch; > +}; > + > +struct pin_machine_model_t { > + uint32_t id; /* vendor machine id */ > +}; > + > +struct model_pin_patch_t { > + struct pin_machine_model_t *models; /* list of machine models */ > + struct pin_patch_t *pin_patches; /* hardcoded overrides */ > + void (*fixup_func)(struct hdaa_widget *); /* for future use */ > +}; > + > +struct hdaa_model_pin_patch_t { > + uint32_t id; /* the hdaa id */ > + struct model_pin_patch_t *patches; /* list of machine patches */ > +}; > + > +#endif /* PIN_PATCH_H */ > diff --git a/sys/dev/sound/pci/hda/pin_patch_realtek.h b/sys/dev/sound/pci/hda/pin_patch_realtek.h > new file mode 100644 > index 000000000000..ddaeeaef5345 > --- /dev/null > +++ b/sys/dev/sound/pci/hda/pin_patch_realtek.h > @@ -0,0 +1,992 @@ > +/*- > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > + * > + * Copyright (c) 2018 Khamba Staring > + * All rights reserved. > + * > + * Redistribution and use in source and binary forms, with or without > + * modification, are permitted provided that the following conditions > + * are met: > + * 1. Redistributions of source code must retain the above copyright > + * notice, this list of conditions and the following disclaimer. > + * 2. Redistributions in binary form must reproduce the above copyright > + * notice, this list of conditions and the following disclaimer in the > + * documentation and/or other materials provided with the distribution. > + * > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF > + * SUCH DAMAGE. > + * > + * $FreeBSD$ > + */ > + > +#ifndef PIN_PATCH_REALTEK_H > +#define PIN_PATCH_REALTEK_H > + > +#include "hdac.h" > +#include "pin_patch.h" > + > +/* > + * Pin patches > + */ > +static struct pin_patch_t pin_patches_lg_lw20[] = { > + { > + .nid = 26, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } > + }, { > + .nid = 27, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT } > + }, { } > +}; > + > +static struct pin_patch_t pin_patches_clevo_d900t_asus_m5200[] = { > + { > + .nid = 24, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } > + }, { > + .nid = 25, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN } > + }, { > + .nid = 26, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } > + }, { > + .nid = 27, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } > + }, { > + .nid = 28, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_CD } > + }, { } > +}; > + > +static struct pin_patch_t pin_patches_msi_ms034a[] = { > + { > + .nid = 25, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > + }, { > + .nid = 28, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_CD | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > + }, { } > +}; > + > +static struct pin_patch_t pin_patches_asus_w6f[] = { > + { > + .nid = 11, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > + }, { > + .nid = 12, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > + }, { > + .nid = 14, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > + }, { > + .nid = 15, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK } > + }, { > + .nid = 16, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > + }, { > + .nid = 31, > + .type = PIN_PATCH_TYPE_MASK, > + .patch.mask = { > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > + }, { > + .nid = 32, > *** 839 LINES SKIPPED *** > -- Rod Grimes rgrimes@freebsd.org From owner-dev-commits-src-all@freebsd.org Sun Jul 4 14:05:08 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8B5F76659B7; Sun, 4 Jul 2021 14:05:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHrDh3bmrz59Pw; Sun, 4 Jul 2021 14:05:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 635241408B; Sun, 4 Jul 2021 14:05:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 164E58FN096904; Sun, 4 Jul 2021 14:05:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 164E581T096903; Sun, 4 Jul 2021 14:05:08 GMT (envelope-from git) Date: Sun, 4 Jul 2021 14:05:08 GMT Message-Id: <202107041405.164E581T096903@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 89c0640c7090 - main - share/misc: Update FreeBSD.org URLs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 89c0640c7090d5dfbe46adbe50186399923f360f Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 14:05:08 -0000 The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=89c0640c7090d5dfbe46adbe50186399923f360f commit 89c0640c7090d5dfbe46adbe50186399923f360f Author: Li-Wen Hsu AuthorDate: 2021-07-04 14:04:33 +0000 Commit: Li-Wen Hsu CommitDate: 2021-07-04 14:04:33 +0000 share/misc: Update FreeBSD.org URLs MFC after: 3 days --- share/misc/iso3166 | 2 +- share/misc/organization.dot | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/share/misc/iso3166 b/share/misc/iso3166 index 1e4cf98df12d..2410a9507ab7 100644 --- a/share/misc/iso3166 +++ b/share/misc/iso3166 @@ -1,6 +1,6 @@ # $FreeBSD$ # -# Please consult with https://www.FreeBSD.org/internal/i18n.html before +# Please consult with https://www.FreeBSD.org/internal/i18n/ before # making changes to this file. # # ISO 3166 country codes diff --git a/share/misc/organization.dot b/share/misc/organization.dot index 33a00452c607..b730b86be5b4 100644 --- a/share/misc/organization.dot +++ b/share/misc/organization.dot @@ -5,7 +5,7 @@ # each other. # For a detailed description of the responsibilities and duties of the listed # teams, please see our Administration page at -# https://www.freebsd.org/administration.html . +# https://www.freebsd.org/administration/ . # # The graphical output can be generated from this file with the following # command: From owner-dev-commits-src-all@freebsd.org Sun Jul 4 14:08:15 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 30621665E0A; Sun, 4 Jul 2021 14:08:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHrJG6n3dz59NY; Sun, 4 Jul 2021 14: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 D22C113F44; Sun, 4 Jul 2021 14: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 164E8EtK097505; Sun, 4 Jul 2021 14: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 164E8E7V097504; Sun, 4 Jul 2021 14:08:14 GMT (envelope-from git) Date: Sun, 4 Jul 2021 14:08:14 GMT Message-Id: <202107041408.164E8E7V097504@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 8dfb00245701 - main - man7: Update FreeBSD.org URLs MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8dfb00245701a4f9290cd3a24e9bdcafa55a075b Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 14:08:15 -0000 The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=8dfb00245701a4f9290cd3a24e9bdcafa55a075b commit 8dfb00245701a4f9290cd3a24e9bdcafa55a075b Author: Li-Wen Hsu AuthorDate: 2021-07-04 14:07:23 +0000 Commit: Li-Wen Hsu CommitDate: 2021-07-04 14:07:23 +0000 man7: Update FreeBSD.org URLs MFC after: 3 days --- share/man/man7/ports.7 | 4 ++-- share/man/man7/tests.7 | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/share/man/man7/ports.7 b/share/man/man7/ports.7 index 3a62a23d5a13..c6f3d4b8c977 100644 --- a/share/man/man7/ports.7 +++ b/share/man/man7/ports.7 @@ -127,7 +127,7 @@ in .No \&: .Sm on .Pp -.Lk https://www.FreeBSD.org/doc/en/books/handbook/ports.html +.Lk https://docs.FreeBSD.org/en/books/handbook/ports/ .Pp For information about creating new ports, see .Sm off @@ -135,7 +135,7 @@ For information about creating new ports, see .No \&: .Sm on .Pp -.Lk https://www.FreeBSD.org/doc/en/books/porters-handbook/ +.Lk https://docs.FreeBSD.org/en/books/porters-handbook/ .Sh TARGETS Some of the .Xr make 1 diff --git a/share/man/man7/tests.7 b/share/man/man7/tests.7 index cb75b7f389f5..ab1a3fd1262f 100644 --- a/share/man/man7/tests.7 +++ b/share/man/man7/tests.7 @@ -194,7 +194,7 @@ For more details please refer to: .It .Lk https://lists.freebsd.org/ "FreeBSD Mailing Lists" .It -.Lk https://www.freebsd.org/support.html "Problem Reporting" +.Lk https://www.freebsd.org/support/ "Problem Reporting" .El .Sh FILES .Bl -tag -compact -width "/etc/kyua/kyua.conf" From owner-dev-commits-src-all@freebsd.org Sun Jul 4 14:51:18 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 82C8966658D for ; Sun, 4 Jul 2021 14:51:18 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) (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 4GHsFy0X4dz3FCT for ; Sun, 4 Jul 2021 14:51:17 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qt1-x829.google.com with SMTP id x24so633902qts.11 for ; Sun, 04 Jul 2021 07:51:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=LAvM9CAV6AG8mmMPIy45BS3au+Ds8mmWJcVL9ZyFqMU=; b=rboE5MJrLFc0hVjV2u+WscTVXutH2J2VpehDJ985e1LLIpIefrxFUnn1fDpVDZAJyk qb0QzPqo20mp2HL7Y+yF7uOYktM1hB6JkP9lN6mbmfFzlVFs/cGqsCu+FdaWLBIZuJ2g miodJB1ulO7Duyie6k2SQ7QSCv0QA1wLebEyihs8TBXEWQycNR+tSTsf8xTa97jBXnPg W6jLk9KCWiXDWZ4NNP/Aqof/jB8RTL+dea+Ls1DIbEA88K5qNFMV+1zwO5t5XKi7jX9c a19UUmDVR9GGhnRj70JFu6FRECU0zGiRNRvdo440Ll3AjPIqTEddcko01c6I8a8G4SG8 i5Rw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=LAvM9CAV6AG8mmMPIy45BS3au+Ds8mmWJcVL9ZyFqMU=; b=PZUFHooVHn0rzRQbsNlnjVpwLWZlgp9N3ZYkelWgiXAKtEsyntQuWz0HXOKFeJz36I PMDSvjm0kwhZwYCNpZ3Anz2M1cH5HS1M/XWh41pTCSU/c8ZvVk0bFogS7vRnT5jFNmJ1 FGhsoC+JKu3eM9+yBleIGpfwmZH+l/WPpU4R3tQPU15ICfAmj0HyFZWh6vlmDmVQPri4 52VUqdtSXWm/1XdOWjyBUrPBiswnOOGYfyLFnONs1iJSOjdon5YTCDTIk3SC1r1kDQ/1 /faVI7B9YZ7XM2mGM/pgMcKSQgb3LTdq3EoPxWtYvtCSg+bKAaYp0SP3JjbQHdMnH4PE 6d1g== X-Gm-Message-State: AOAM532CpeQN/TUylRmwr9Os2ZxgrE/MA3keegBfVJNCuikgBBtLMNUr KjkTQuK2rcwPBfWvGc4nezKz/QeX60h6hAoEUgGx3Q== X-Google-Smtp-Source: ABdhPJxqpOSxin5aBoETr9RJuumgAwPQtnQPtzpiiXRLz7Yg6jwzODS/qiAgu3bF0NlAC5WZOmBBhWILzWT8KUqiBpc= X-Received: by 2002:ac8:7d87:: with SMTP id c7mr8448443qtd.49.1625410276881; Sun, 04 Jul 2021 07:51:16 -0700 (PDT) MIME-Version: 1.0 References: <202107030617.1636H22I062745@gitrepo.freebsd.org> <202107041403.164E3i0C021063@gndrsh.dnsmgr.net> In-Reply-To: <202107041403.164E3i0C021063@gndrsh.dnsmgr.net> From: Warner Losh Date: Sun, 4 Jul 2021 08:51:05 -0600 Message-ID: Subject: Re: git: ef790cc7407e - main - hdaa: update pin patch configurations To: "Rodney W. Grimes" Cc: Warner Losh , src-committers , "" , dev-commits-src-main@freebsd.org X-Rspamd-Queue-Id: 4GHsFy0X4dz3FCT 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; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.34 X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 14:51:18 -0000 On Sun, Jul 4, 2021, 8:03 AM Rodney W. Grimes wrote: > > The branch main has been updated by imp: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=ef790cc7407e827db9563d08a52a71ab36436986 > > > > commit ef790cc7407e827db9563d08a52a71ab36436986 > > Author: K Staring > > AuthorDate: 2021-07-03 06:15:49 +0000 > > Commit: Warner Losh > > CommitDate: 2021-07-03 06:15:49 +0000 > > > > hdaa: update pin patch configurations > > > > A number of structural changes: > > - Use decimal nid numbers instead of hex > > - updated the branch to incoorporate the suggestions made in the > > ALC280 pull request github thread > > - Convert magic pin values into strings. > > - Also update hdaa_patches to use clearer enums.. > > - made pin patch type enum clearer, add macro for 'string' type > > patches > > - Added pin_patch structures to separate data from logic. > > - Integrated Realtek patches into new structure. > > > > These incorporate fixes for ALC255, ALC256, ALC260, ALC262, ALC268, > > ALC269, ALC280, ALC282, ALC283, ALC286, ALC290, ALC293, ALC296, > ALC2880 > > > > And have definitions for a number of Dell and HP laptops. > > > > Much of this data has been mined fromt he tables in the Linux driver. > > > > imp squashed these into one commit because the changes from the > github > > pull requests no longer cleanly apply individually and made light > style > > changes after feedback from jhb. > > > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/139 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/140 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/141 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/142 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/143 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/144 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/145 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/146 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/147 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/148 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/149 > > Pull Request: > https://github.com/freebsd/freebsd-src/pull/150 > > Differential Revision: https://reviews.freebsd.org/D30619 > > Is there any intent to merge this to stable-13/12? The out of box "audio" > experience on many of the "fixed" devices in this as it stands now is > poor, and iirc this fixes many of the issues with "no sound" when using > anything but the builtin speakers. > I'd like to. That said, there was an interesting hiccup when I did my last suspend/resume cycle on my YOGA that might be related. Warner Thanks, > Rod > > --- > > sys/dev/sound/pci/hda/hdaa_patches.c | 259 +++----- > > sys/dev/sound/pci/hda/hdac.h | 145 ++++- > > sys/dev/sound/pci/hda/pin_patch.h | 121 ++++ > > sys/dev/sound/pci/hda/pin_patch_realtek.h | 992 > ++++++++++++++++++++++++++++++ > > 4 files changed, 1327 insertions(+), 190 deletions(-) > > > > diff --git a/sys/dev/sound/pci/hda/hdaa_patches.c > b/sys/dev/sound/pci/hda/hdaa_patches.c > > index 590c9e4d46fb..69299ee4344f 100644 > > --- a/sys/dev/sound/pci/hda/hdaa_patches.c > > +++ b/sys/dev/sound/pci/hda/hdaa_patches.c > > @@ -44,6 +44,9 @@ > > #include > > #include > > > > +#include "pin_patch.h" > > +#include "pin_patch_realtek.h" > > + > > SND_DECLARE_FILE("$FreeBSD$"); > > > > static const struct { > > @@ -145,10 +148,28 @@ static const struct { > > 0 } > > }; > > > > +static struct pin_patch_t * > > +match_pin_patches(int vendor_id, int vendor_subid) > > +{ > > + for (int ci = 0; ci < nitems(realtek_model_pin_patches); ci++) { > > + struct hdaa_model_pin_patch_t *p = > &realtek_model_pin_patches[ci]; > > + if (vendor_id != p->id) > > + continue; > > + for (struct model_pin_patch_t *pp = p->patches; > pp->models; pp++) { > > + for (struct pin_machine_model_t *model = > pp->models; model->id != 0; model++) { > > + if (vendor_subid == model->id) > > + return (pp->pin_patches); > > + } > > + } > > + } > > + > > + return (0); > > +} > > + > > static void > > hdac_pin_patch(struct hdaa_widget *w) > > { > > - const char *patch = NULL; > > + const char *patch_str = NULL; > > uint32_t config, orig, id, subid; > > nid_t nid = w->nid; > > > > @@ -156,54 +177,7 @@ hdac_pin_patch(struct hdaa_widget *w) > > id = hdaa_codec_id(w->devinfo); > > subid = hdaa_card_id(w->devinfo); > > > > - /* XXX: Old patches require complete review. > > - * Now they may create more problem then solve due to > > - * incorrect associations. > > - */ > > - if (id == HDA_CODEC_ALC880 && subid == LG_LW20_SUBVENDOR) { > > - switch (nid) { > > - case 26: > > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; > > - break; > > - case 27: > > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT; > > - break; > > - default: > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC880 && > > - (subid == CLEVO_D900T_SUBVENDOR || > > - subid == ASUS_M5200_SUBVENDOR)) { > > - /* > > - * Super broken BIOS > > - */ > > - switch (nid) { > > - case 24: /* MIC1 */ > > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN; > > - break; > > - case 25: /* XXX MIC2 */ > > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN; > > - break; > > - case 26: /* LINE1 */ > > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; > > - break; > > - case 27: /* XXX LINE2 */ > > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN; > > - break; > > - case 28: /* CD */ > > - config &= ~HDA_CONFIG_DEFAULTCONF_DEVICE_MASK; > > - config |= HDA_CONFIG_DEFAULTCONF_DEVICE_CD; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC883 && > > - (subid == MSI_MS034A_SUBVENDOR || > > - HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, subid))) { > > + if (id == HDA_CODEC_ALC883 && HDA_DEV_MATCH(ACER_ALL_SUBVENDOR, > subid)) { > > switch (nid) { > > case 25: > > config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > @@ -247,42 +221,6 @@ hdac_pin_patch(struct hdaa_widget *w) > > config |= HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_NONE; > > break; > > } > > - } else if (id == HDA_CODEC_ALC861 && subid == > > - ASUS_W6F_SUBVENDOR) { > > - switch (nid) { > > - case 11: > > - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); > > - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_OUT | > > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED); > > - break; > > - case 12: > > - case 14: > > - case 16: > > - case 31: > > - case 32: > > - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); > > - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED); > > - break; > > - case 15: > > - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); > > - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | > > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK); > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC861 && subid == > > - UNIWILL_9075_SUBVENDOR) { > > - switch (nid) { > > - case 15: > > - config &= ~(HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK); > > - config |= (HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | > > - HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK); > > - break; > > - } > > } > > > > /* New patches */ > > @@ -290,10 +228,10 @@ hdac_pin_patch(struct hdaa_widget *w) > > subid == LENOVO_X300_SUBVENDOR) { > > switch (nid) { > > case 17: /* Headphones with redirection */ > > - patch = "as=1 seq=15"; > > + patch_str = "as=1 seq=15"; > > break; > > case 20: /* Two mics together */ > > - patch = "as=2 seq=15"; > > + patch_str = "as=2 seq=15"; > > break; > > } > > } else if (id == HDA_CODEC_AD1986A && > > @@ -302,60 +240,45 @@ hdac_pin_patch(struct hdaa_widget *w) > > subid == ASUS_P5PL2_SUBVENDOR)) { > > switch (nid) { > > case 26: /* Headphones with redirection */ > > - patch = "as=1 seq=15"; > > + patch_str = "as=1 seq=15"; > > break; > > case 28: /* 5.1 out => 2.0 out + 1 input */ > > - patch = "device=Line-in as=8 seq=1"; > > + patch_str = "device=Line-in as=8 seq=1"; > > break; > > case 29: /* Can't use this as input, as the only available > mic > > * preamplifier is busy by front panel mic (nid > 31). > > * If you want to use this rear connector as mic > input, > > * you have to disable the front panel one. */ > > - patch = "as=0"; > > + patch_str = "as=0"; > > break; > > case 31: /* Lot of inputs configured with as=15 and > unusable */ > > - patch = "as=8 seq=3"; > > + patch_str = "as=8 seq=3"; > > break; > > case 32: > > - patch = "as=8 seq=4"; > > + patch_str = "as=8 seq=4"; > > break; > > case 34: > > - patch = "as=8 seq=5"; > > + patch_str = "as=8 seq=5"; > > break; > > case 36: > > - patch = "as=8 seq=6"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC260 && > > - HDA_DEV_MATCH(SONY_S5_SUBVENDOR, subid)) { > > - switch (nid) { > > - case 16: > > - patch = "seq=15 device=Headphones"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC268) { > > - if (subid == ACER_T5320_SUBVENDOR) { > > - switch (nid) { > > - case 20: /* Headphones Jack */ > > - patch = "as=1 seq=15"; > > + patch_str = "as=8 seq=6"; > > break; > > } > > - } > > } else if (id == HDA_CODEC_CX20561 && > > subid == LENOVO_B450_SUBVENDOR) { > > switch (nid) { > > case 22: > > - patch = "as=1 seq=15"; > > + patch_str = "as=1 seq=15"; > > break; > > } > > } else if (id == HDA_CODEC_CX20561 && > > subid == LENOVO_T400_SUBVENDOR) { > > switch (nid) { > > case 22: > > - patch = "as=1 seq=15"; > > + patch_str = "as=1 seq=15"; > > break; > > case 26: > > - patch = "as=1 seq=0"; > > + patch_str = "as=1 seq=0"; > > break; > > } > > } else if (id == HDA_CODEC_CX20590 && > > @@ -366,102 +289,62 @@ hdac_pin_patch(struct hdaa_widget *w) > > subid == LENOVO_G580_SUBVENDOR)) { > > switch (nid) { > > case 25: > > - patch = "as=1 seq=15"; > > + patch_str = "as=1 seq=15"; > > break; > > /* > > * Group onboard mic and headphone mic > > * together. Fixes onboard mic. > > */ > > case 27: > > - patch = "as=2 seq=15"; > > + patch_str = "as=2 seq=15"; > > break; > > case 35: > > - patch = "as=2"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC269 && > > - (subid == LENOVO_X1CRBN_SUBVENDOR || > > - subid == LENOVO_T430_SUBVENDOR || > > - subid == LENOVO_T430S_SUBVENDOR || > > - subid == LENOVO_T530_SUBVENDOR)) { > > - switch (nid) { > > - case 21: > > - patch = "as=1 seq=15"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC285 && > > - (subid == LENOVO_X120KH_SUBVENDOR || > > - subid == LENOVO_X120QD_SUBVENDOR)) { > > - switch (nid) { > > - case 33: > > - patch = "as=1 seq=15"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC269 && > > - subid == ASUS_UX31A_SUBVENDOR) { > > - switch (nid) { > > - case 33: > > - patch = "as=1 seq=15"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC892 && > > - subid == INTEL_DH87RL_SUBVENDOR) { > > - switch (nid) { > > - case 27: > > - patch = "as=1 seq=15"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC292 && > > - subid == LENOVO_X120BS_SUBVENDOR) { > > - switch (nid) { > > - case 21: > > - patch = "as=1 seq=15"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC295 && subid == > HP_AF006UR_SUBVENDOR) { > > - switch (nid) { > > - case 18: > > - patch = "as=2"; > > - break; > > - case 25: > > - patch = "as=2 seq=15"; > > - break; > > - case 33: > > - patch = "as=1 seq=15"; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC298 && > HDA_DEV_MATCH(LENOVO_ALL_SUBVENDOR, subid)) { > > - switch (nid) { > > - case 23: > > - config = 0x03a1103f; > > - break; > > - case 33: > > - config = 0x2121101f; > > - break; > > - } > > - } else if (id == HDA_CODEC_ALC298 && subid == > DELL_XPS9560_SUBVENDOR) { > > - switch (nid) { > > - case 24: > > - config = 0x01a1913c; > > - break; > > - case 26: > > - config = 0x01a1913d; > > + patch_str = "as=2"; > > break; > > } > > } else if (id == HDA_CODEC_ALC256 && (subid == > DELL_I7577_SUBVENDOR || > > subid == DELL_L7480_SUBVENDOR)) { > > switch (nid) { > > case 20: > > - patch = "as=1 seq=0"; > > + patch_str = "as=1 seq=0"; > > break; > > case 33: > > - patch = "as=1 seq=15"; > > + patch_str = "as=1 seq=15"; > > break; > > } > > + } else { > > + /* > > + * loop over hdaa_model_pin_patch > > + */ > > + struct pin_patch_t *pin_patches = NULL; > > + > > + pin_patches = match_pin_patches(id, subid); > > + > > + if (pin_patches != NULL) { > > + for (struct pin_patch_t *patch = pin_patches; > patch->type; patch++) { > > + if (nid == patch->nid) { > > + switch (patch->type) { > > + case PIN_PATCH_TYPE_STRING: > > + patch_str = > patch->patch.string; > > + case PIN_PATCH_TYPE_MASK: > > + config &= > ~patch->patch.mask[0]; > > + config |= > patch->patch.mask[1]; > > + break; > > + case PIN_PATCH_TYPE_OVERRIDE: > > + config = > patch->patch.override; > > + break; > > + default: > > + /* should panic hard */ > > + break; > > + } > > + break; > > + } > > + } > > + } > > } > > > > - if (patch != NULL) > > - config = hdaa_widget_pin_patch(config, patch); > > + if (patch_str != NULL) > > + config = hdaa_widget_pin_patch(config, patch_str); > > HDA_BOOTVERBOSE( > > if (config != orig) > > device_printf(w->devinfo->dev, > > diff --git a/sys/dev/sound/pci/hda/hdac.h b/sys/dev/sound/pci/hda/hdac.h > > index 8e427d3412da..611cb98badd8 100644 > > --- a/sys/dev/sound/pci/hda/hdac.h > > +++ b/sys/dev/sound/pci/hda/hdac.h > > @@ -61,6 +61,7 @@ > > #define HDA_INTEL_82801G HDA_MODEL_CONSTRUCT(INTEL, 0x27d8) > > #define HDA_INTEL_82801H HDA_MODEL_CONSTRUCT(INTEL, 0x284b) > > #define HDA_INTEL_82801I HDA_MODEL_CONSTRUCT(INTEL, 0x293e) > > +#define HDA_INTEL_GMLK HDA_MODEL_CONSTRUCT(INTEL, 0x3198) > > #define HDA_INTEL_JLK HDA_MODEL_CONSTRUCT(INTEL, 0x38c8) > > #define HDA_INTEL_82801JI HDA_MODEL_CONSTRUCT(INTEL, 0x3a3e) > > #define HDA_INTEL_82801JD HDA_MODEL_CONSTRUCT(INTEL, 0x3a6e) > > @@ -91,7 +92,16 @@ > > #define HDA_INTEL_CMLKLP HDA_MODEL_CONSTRUCT(INTEL, 0x02c8) > > #define HDA_INTEL_CMLKH HDA_MODEL_CONSTRUCT(INTEL, 0x06c8) > > #define HDA_INTEL_TGLK HDA_MODEL_CONSTRUCT(INTEL, 0xa0c8) > > -#define HDA_INTEL_GMLK HDA_MODEL_CONSTRUCT(INTEL, 0x3198) > > +#define INTEL_A100ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xa100) > > +#define INTEL_D400ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd400) > > +#define INTEL_D401ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd401) > > +#define INTEL_D402ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xd402) > > +#define INTEL_E305ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe305) > > +#define INTEL_E308ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe308) > > +#define INTEL_E224ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe224) > > +#define INTEL_E400ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe400) > > +#define INTEL_E401ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe401) > > +#define INTEL_E402ID_SUBVENDOR HDA_MODEL_CONSTRUCT(INTEL, 0xe402) > > #define HDA_INTEL_ALL HDA_MODEL_CONSTRUCT(INTEL, 0xffff) > > > > /* Nvidia */ > > @@ -198,6 +208,10 @@ > > > > /* HP/Compaq */ > > #define HP_VENDORID 0x103c > > +#define HP_Z200_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x103c) > > +#define HP_225AID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x225a) > > +#define HP_2272ID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2272) > > +#define HP_2273ID_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2273) > > #define HP_V3000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30b5) > > #define HP_NX7400_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a2) > > #define HP_NX6310_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30aa) > > @@ -207,6 +221,7 @@ > > #define HP_DV5000_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x30a5) > > #define HP_DC7700S_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2801) > > #define HP_DC7700_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x2802) > > +#define HP_DC5750_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x280a) > > #define HP_AF006UR_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0x83a2) > > #define HP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(HP, 0xffff) > > /* What is wrong with XN 2563 anyway? (Got the picture ?) */ > > @@ -222,7 +237,28 @@ > > #define DELL_L7480_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07a0) > > #define DELL_XPSM1210_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01d7) > > #define DELL_OPLX745_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x01da) > > +#define DELL_05F4ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f4) > > +#define DELL_05F5ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f5) > > +#define DELL_05F6ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05f6) > > +#define DELL_V5470_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0615) > > +#define DELL_V5470_1_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0616) > > +#define DELL_064AID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x064a) > > +#define DELL_064BID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x064b) > > +#define DELL_9020M_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0669) > > +#define DELL_V5480_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x069a) > > +#define DELL_06D9ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06d9) > > +#define DELL_06DAID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06da) > > +#define DELL_06DBID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06db) > > +#define DELL_06DDID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06dd) > > +#define DELL_06DEID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06de) > > +#define DELL_06DFID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06df) > > +#define DELL_06E0ID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x06e0) > > +#define DELL_7559_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0706) > > +#define DELL_7000_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0798) > > #define DELL_XPS9560_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x07be) > > +#define DELL_E7240_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x05ca) > > +#define DELL_164AID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x164a) > > +#define DELL_164BID_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x164b) > > #define DELL_I7577_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0x0802) > > #define DELL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(DELL, 0xffff) > > > > @@ -233,34 +269,66 @@ > > > > /* Acer */ > > #define ACER_VENDORID 0x1025 > > +#define ACER_0070ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0070) > > +#define ACER_0077ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0077) > > +#define ACER_0078ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0078) > > +#define ACER_0087ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0087) > > #define ACER_A5050_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x010f) > > #define ACER_A4520_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0127) > > #define ACER_A4710_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x012f) > > #define ACER_A4715_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0133) > > +#define ACER_TM_6293_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0139) > > #define ACER_3681WXM_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0110) > > #define ACER_T6292_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011b) > > #define ACER_T5320_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x011f) > > +#define ACER_TM_6293_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0139) > > +#define ACER_AC700_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x047c) > > +#define ACER_V5_571G_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x072d) > > +#define ACER_AO725_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0740) > > +#define ACER_AO756_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0742) > > +#define ACER_E1_472_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0762) > > +#define ACER_E1_572_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x0775) > > +#define ACER_V5_573G_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x079b) > > +#define ACER_CB_14_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0x106d) > > +#define ACER_V5_122P_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xa80d) > > +#define ACER_APFV_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xa884) > > +#define ACER_E309ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xe309) > > +#define ACER_E310ID_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xe310) > > #define ACER_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ACER, 0xffff) > > > > /* Asus */ > > #define ASUS_VENDORID 0x1043 > > +#define ASUS_X540A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x103e) > > +#define ASUS_X540SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10c0) > > +#define ASUS_X556UR_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x11c0) > > +#define ASUS_W5A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10c3) > > +#define ASUS_X540LA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x10d0) > > #define ASUS_A8X_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1153) > > #define ASUS_U5F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263) > > #define ASUS_W6F_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1263) > > +#define ASUS_X541SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x12e0) > > +#define ASUS_X541UV_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x12f0) > > #define ASUS_A7M_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1323) > > #define ASUS_F3JC_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1338) > > #define ASUS_G2K_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1339) > > +#define ASUS_Z550SA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13b0) > > #define ASUS_A7T_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x13c2) > > #define ASUS_UX31A_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1517) > > +#define ASUS_Z71V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1964) > > #define ASUS_W2J_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1971) > > #define ASUS_M5200_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1993) > > +#define ASUS_G73JW_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1a13) > > +#define ASUS_X705UD_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1a30) > > +#define ASUS_Z550MA_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1bbd) > > +#define ASUS_X555UB_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x1ccd) > > #define ASUS_P5PL2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x817f) > > #define ASUS_P1AH2_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb) > > #define ASUS_M2NPVMX_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81cb) > > #define ASUS_M2V_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81e7) > > #define ASUS_P5BWD_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x81ec) > > #define ASUS_M2N_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x8234) > > -#define ASUS_A8NVMCSM_SUBVENDOR HDA_MODEL_CONSTRUCT(NVIDIA, 0xcb84) > > +#define ASUS_A8NVMCSM_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0xcb84) > > +#define ASUS_X101CH_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0x8516) > > #define ASUS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(ASUS, 0xffff) > > > > /* IBM / Lenovo */ > > @@ -287,7 +355,11 @@ > > #define LENOVO_T430S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fb) > > #define LENOVO_T520_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21cf) > > #define LENOVO_T530_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21f6) > > +#define LENOVO_X230_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x21fa) > > +#define LENOVO_X230T_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2203) > > +#define LENOVO_T431S_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x2208) > > #define LENOVO_G580_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x3977) > > +#define LENOVO_3000_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0x384e) > > #define LENOVO_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LENOVO, 0xffff) > > > > /* Samsung */ > > @@ -307,8 +379,19 @@ > > /* Sony */ > > #define SONY_VENDORID 0x104d > > #define SONY_S5_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81cc) > > +#define SONY_81A0ID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81a0) > > +#define SONY_81D6ID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81d6) > > +#define SONY_81BBID_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81bb) > > +#define SONY_VAIO_TX_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x81e2) > > +#define SONY_VAIO_S13_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x9099) > > +#define SONY_VAIO_P11_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x90b5) > > +#define SONY_VAIO_P13_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0x90b6) > > #define SONY_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(SONY, 0xffff) > > > > +/* Tyan? */ > > +#define TYAN_VENDORID 0x10f1 > > +#define TYAN_N6650W_SUBVENDOR HDA_MODEL_CONSTRUCT(TYAN, 0x2915) > > + > > /* > > * Apple Intel MacXXXX seems using Sigmatel codec/vendor id > > * instead of their own, which is beyond my comprehension > > @@ -322,18 +405,32 @@ > > /* LG Electronics */ > > #define LG_VENDORID 0x1854 > > #define LG_LW20_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0018) > > +#define LG_M1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x003b) > > +#define LG_P1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x005f) > > +#define LG_W1_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0068) > > +#define LG_LW25_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0x0077) > > #define LG_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(LG, 0xffff) > > > > /* Fujitsu Siemens */ > > #define FS_VENDORID 0x1734 > > #define FS_PA1510_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10b8) > > #define FS_SI1848_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10cd) > > +#define FS_AMILO_M1437_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x107c) > > +#define FS_AMILO_M1451G_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x1094) > > +#define FS_AMILO_PI1556_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10b0) > > +#define FS_AMILO_XI1526_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x10ac) > > +#define FS_H270_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0x1147) > > #define FS_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FS, 0xffff) > > > > /* Fujitsu Limited */ > > #define FL_VENDORID 0x10cf > > #define FL_S7020D_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1326) > > +#define FL_LB_S7110_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1397) > > #define FL_U1010_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x142d) > > +#define FL_1475ID_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1475) > > +#define FL_LB_U904_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1845) > > +#define FL_LB_T731_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x15dc) > > +#define FL_LB_E725_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0x1757) > > #define FL_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(FL, 0xffff) > > > > /* Toshiba */ > > @@ -346,18 +443,61 @@ > > #define MSI_VENDORID 0x1462 > > #define MSI_MS1034_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x0349) > > #define MSI_MS034A_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x034a) > > +#define MSI_1150ID_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0x1150) > > +#define MSI_MS_B120_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0xb120) > > #define MSI_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(MSI, 0xffff) > > > > /* Giga-Byte Technology */ > > #define GB_VENDORID 0x1458 > > #define GB_G33S2H_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xa022) > > +#define GB_K8_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xa102) > > +#define GB_BXBT2807_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xfa53) > > #define GP_ALL_SUBVENDOR HDA_MODEL_CONSTRUCT(GB, 0xffff) > > > > /* Uniwill ? */ > > #define UNIWILL_VENDORID 0x1584 > > #define UNIWILL_9075_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, > 0x9075) > > +#define UNIWILL_9050_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, > 0x9050) > > +#define UNIWILL_9054_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, > 0x9054) > > +#define UNIWILL_9070_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, > 0x9070) > > #define UNIWILL_9080_SUBVENDOR HDA_MODEL_CONSTRUCT(UNIWILL, > 0x9080) > > > > +/* Coeus / Elitegroup */ > > +#define COEUS_VENDORID 0x1019 > > +#define COEUS_G610P_SUBVENDOR HDA_MODEL_CONSTRUCT(COEUS, 0x0f69) > > +#define COEUS_A880ID_SUBVENDOR HDA_MODEL_CONSTRUCT(COEUS, 0xa880) > > + > > +/* Arima */ > > +#define ARIMA_VENDORID 0x161f > > +#define ARIMA_W810_SUBVENDOR HDA_MODEL_CONSTRUCT(ARIMA, 0x0f69) > > + > > +/* Shuttle Computer */ > > +#define SHUTTLE_VENDORID 0x1039 > > +#define SHUTTLE_ST20G5_SUBVENDOR HDA_MODEL_CONSTRUCT(SHUTTLE, 0xc790) > > + > > +/* First International Computer */ > > +#define FIC_VENDORID 0x1509 > > +#define FIC_P4M_SUBVENDOR HDA_MODEL_CONSTRUCT(FIC, 0x925d) > > + > > +/* Gateway 2000 */ > > +#define GATEWAY_VENDORID 0x107b > > +#define GATEWAY_3032ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x3032) > > +#define GATEWAY_3033ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x3033) > > +#define GATEWAY_4039ID_SUBVENDOR HDA_MODEL_CONSTRUCT(GATEWAY, 0x4039) > > + > > +/* Biostar */ > > +#define BIOSTAR_VENDORID 0x1565 > > +#define BIOSTAR_8202ID_SUBVENDOR HDA_MODEL_CONSTRUCT(BIOSTAR, 0x8202) > > + > > +/* EPoX Computer Co., Ltd. */ > > +#define EPOX_VENDORID 0x1695 > > +#define EPOX_400DID_SUBVENDOR HDA_MODEL_CONSTRUCT(EPOX, 0x400d) > > +#define EPOX_EP5LDA_SUBVENDOR HDA_MODEL_CONSTRUCT(EPOX, 0x4012) > > + > > +/* AOpen */ > > +#define AOPEN_VENDORID 0xa0a0 > > +#define AOPEN_I915GMMHFS_SUBVENDOR HDA_MODEL_CONSTRUCT(AOPEN, 0x8202) > > + > > /* All codecs you can eat... */ > > #define HDA_CODEC_CONSTRUCT(vendor, id) \ > > (((uint32_t)(vendor##_VENDORID) << 16) | ((id) & 0xffff)) > > @@ -390,6 +530,7 @@ > > #define HDA_CODEC_ALC268 HDA_CODEC_CONSTRUCT(REALTEK, 0x0268) > > #define HDA_CODEC_ALC269 HDA_CODEC_CONSTRUCT(REALTEK, 0x0269) > > #define HDA_CODEC_ALC270 HDA_CODEC_CONSTRUCT(REALTEK, 0x0270) > > +#define HDA_CODEC_ALC271 HDA_CODEC_CONSTRUCT(REALTEK, 0x0271) > > #define HDA_CODEC_ALC272 HDA_CODEC_CONSTRUCT(REALTEK, 0x0272) > > #define HDA_CODEC_ALC273 HDA_CODEC_CONSTRUCT(REALTEK, 0x0273) > > #define HDA_CODEC_ALC274 HDA_CODEC_CONSTRUCT(REALTEK, 0x0274) > > diff --git a/sys/dev/sound/pci/hda/pin_patch.h > b/sys/dev/sound/pci/hda/pin_patch.h > > new file mode 100644 > > index 000000000000..8e2c9875906f > > --- /dev/null > > +++ b/sys/dev/sound/pci/hda/pin_patch.h > > @@ -0,0 +1,121 @@ > > +/*- > > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > > + * > > + * Copyright (c) 2018 Khamba Staring > > + * All rights reserved. > > + * > > + * Redistribution and use in source and binary forms, with or without > > + * modification, are permitted provided that the following conditions > > + * are met: > > + * 1. Redistributions of source code must retain the above copyright > > + * notice, this list of conditions and the following disclaimer. > > + * 2. Redistributions in binary form must reproduce the above copyright > > + * notice, this list of conditions and the following disclaimer in > the > > + * documentation and/or other materials provided with the > distribution. > > + * > > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' > AND > > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > PURPOSE > > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE > LIABLE > > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > CONSEQUENTIAL > > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE > GOODS > > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > STRICT > > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN > ANY WAY > > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY > OF > > + * SUCH DAMAGE. > > + * > > + * $FreeBSD$ > > + */ > > +#ifndef PIN_PATCH_H > > +#define PIN_PATCH_H > > + > > +#include "hdac.h" > > + > > +#define PIN_SUBVENDOR(sv) { .id = sv } > > + > > + > > +#define PIN_PATCH_STRING(n, patchstr) { \ > > + .nid = n, \ > > + .type = PIN_PATCH_TYPE_STRING, \ > > + .patch.string = patchstr \ > > +} > > +#define PIN_OVERRIDE(n, newvalue) { \ > > + .nid = n, \ > > + .type = PIN_PATCH_TYPE_OVERRIDE, \ > > + .patch.override = newvalue \ > > +} > > +#define PIN_PATCH_NOT_APPLICABLE(n) \ > > + PIN_PATCH_STRING(n, "as=15 misc=1 color=Black ctype=1/8 > device=Speaker loc=Rear conn=None") > > +#define PIN_PATCH_HP_OUT(n) \ > > + PIN_PATCH_STRING(n, "seq=15 as=1 color=Green ctype=1/8 > device=Headphones loc=Rear") > > +#define PIN_PATCH_HP(n) \ > > + PIN_PATCH_STRING(n, "seq=15 as=1 misc=1 color=Green ctype=1/8 > device=Headphones loc=Rear") > > +#define PIN_PATCH_SPEAKER(n) \ > > + PIN_PATCH_STRING(n, "as=2 misc=1 ctype=ATAPI loc=Onboard > conn=Fixed") > > +#define PIN_PATCH_BASS_SPEAKER(n) \ > > + PIN_PATCH_STRING(n, "as=3 misc=1 ctype=ATAPI loc=Onboard > conn=Fixed") > > +#define PIN_PATCH_MIC_IN(n) \ > > + PIN_PATCH_STRING(n, "as=5 misc=9 color=Pink ctype=1/8 device=Mic > loc=Rear") > > +#define PIN_PATCH_MIC_INTERNAL(n) \ > > + PIN_PATCH_STRING(n, "as=6 misc=1 ctype=Digital device=Mic > loc=Internal conn=Fixed") > > +#define PIN_PATCH_MIC_FRONT(n) \ > > + PIN_PATCH_STRING(n, "as=4 misc=12 color=Pink ctype=1/8 device=Mic > loc=Front") > > +#define PIN_PATCH_LINE_IN(n) \ > > + PIN_PATCH_STRING(n, "seq=1 as=3 color=Blue ctype=1/8 > device=Line-in loc=Rear") > > +#define PIN_PATCH_LINE_OUT(n) \ > > + PIN_PATCH_STRING(n, "as=1 color=Green ctype=1/8 loc=Rear") > > +#define PIN_PATCH_SPDIF_OUT(n) \ > > + PIN_PATCH_STRING(n, "as=4 misc=1 color=Green ctype=Optical > device=SPDIF-out loc=Rear") > > +#define PIN_PATCH_JACK_WO_DETECT(n) \ > > + PIN_PATCH_STRING(n, "seq=12 as=3 misc=1 color=Pink ctype=1/8 > device=Mic loc=Rear") > > +#define PIN_PATCH_HPMIC_WO_DETECT(n) \ > > + PIN_PATCH_STRING(n, "seq=13 as=3 misc=1 color=Pink ctype=1/8 > device=Mic loc=Rear") > > +#define PIN_PATCH_HPMIC_WITH_DETECT(n) \ > > + PIN_PATCH_STRING(n, "seq=12 as=3 color=Pink ctype=1/8 device=Mic > loc=Rear") > > +#define PIN_PATCH_CLFE(n) \ > > + PIN_PATCH_STRING(n, "seq=1 as=1 misc=4 color=Black ctype=1/8 > loc=Rear") > > +#define PIN_PATCH_SURROUND(n) \ > > + PIN_PATCH_STRING(n, "seq=2 as=1 misc=4 color=Orange ctype=1/8 > loc=Rear") > > +#define PIN_PATCH_SUBWOOFER(n) \ > > + PIN_PATCH_STRING(n, "seq=1 as=1 misc=1 ctype=ATAPI device=Speaker > loc=Onboard conn=Fixed") > > +#define PIN_PATCH_DOCK_LINE_OUT(n) \ > > + PIN_PATCH_STRING(n, "seq=15 as=3 color=Black ctype=1/8 > loc=Ext-Rear") > > +#define PIN_PATCH_DOCK_HP(n) \ > > + PIN_PATCH_STRING(n, "seq=15 as=3 color=Black ctype=1/8 > device=Headphones loc=Ext-Rear") > > +#define PIN_PATCH_DOCK_MIC_IN(n) \ > > + PIN_PATCH_STRING(n, "as=4 color=Black ctype=1/8 device=Mic > loc=Ext-Left") > > + > > +enum { > > + PIN_PATCH_TYPE_EOL, /* end-of-list */ > > + PIN_PATCH_TYPE_STRING, > > + PIN_PATCH_TYPE_MASK, > > + PIN_PATCH_TYPE_OVERRIDE > > +}; > > + > > +struct pin_patch_t { > > + nid_t nid; /* nid to patch */ > > + int type; /* patch type */ > > + union { > > + const char *string; /* patch string */ > > + uint32_t mask[2]; /* pin config mask */ > > + uint32_t override; /* pin config override */ > > + } patch; > > +}; > > + > > +struct pin_machine_model_t { > > + uint32_t id; /* vendor machine id */ > > +}; > > + > > +struct model_pin_patch_t { > > + struct pin_machine_model_t *models; /* list of machine models > */ > > + struct pin_patch_t *pin_patches; /* hardcoded overrides */ > > + void (*fixup_func)(struct hdaa_widget *); /* for future use */ > > +}; > > + > > +struct hdaa_model_pin_patch_t { > > + uint32_t id; /* the hdaa id */ > > + struct model_pin_patch_t *patches; /* list of machine patches > */ > > +}; > > + > > +#endif /* PIN_PATCH_H */ > > diff --git a/sys/dev/sound/pci/hda/pin_patch_realtek.h > b/sys/dev/sound/pci/hda/pin_patch_realtek.h > > new file mode 100644 > > index 000000000000..ddaeeaef5345 > > --- /dev/null > > +++ b/sys/dev/sound/pci/hda/pin_patch_realtek.h > > @@ -0,0 +1,992 @@ > > +/*- > > + * SPDX-License-Identifier: BSD-2-Clause-FreeBSD > > + * > > + * Copyright (c) 2018 Khamba Staring > > + * All rights reserved. > > + * > > + * Redistribution and use in source and binary forms, with or without > > + * modification, are permitted provided that the following conditions > > + * are met: > > + * 1. Redistributions of source code must retain the above copyright > > + * notice, this list of conditions and the following disclaimer. > > + * 2. Redistributions in binary form must reproduce the above copyright > > + * notice, this list of conditions and the following disclaimer in > the > > + * documentation and/or other materials provided with the > distribution. > > + * > > + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' > AND > > + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE > > + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR > PURPOSE > > + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE > LIABLE > > + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR > CONSEQUENTIAL > > + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE > GOODS > > + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > > + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > STRICT > > + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN > ANY WAY > > + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY > OF > > + * SUCH DAMAGE. > > + * > > + * $FreeBSD$ > > + */ > > + > > +#ifndef PIN_PATCH_REALTEK_H > > +#define PIN_PATCH_REALTEK_H > > + > > +#include "hdac.h" > > +#include "pin_patch.h" > > + > > +/* > > + * Pin patches > > + */ > > +static struct pin_patch_t pin_patches_lg_lw20[] = { > > + { > > + .nid = 26, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > > + > HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } > > + }, { > > + .nid = 27, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > > + > HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT } > > + }, { } > > +}; > > + > > +static struct pin_patch_t pin_patches_clevo_d900t_asus_m5200[] = { > > + { > > + .nid = 24, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > > + > HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } > > + }, { > > + .nid = 25, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > > + > HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN } > > + }, { > > + .nid = 26, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > > + > HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } > > + }, { > > + .nid = 27, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > > + > HDA_CONFIG_DEFAULTCONF_DEVICE_LINE_IN } > > + }, { > > + .nid = 28, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { HDA_CONFIG_DEFAULTCONF_DEVICE_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_CD } > > + }, { } > > +}; > > + > > +static struct pin_patch_t pin_patches_msi_ms034a[] = { > > + { > > + .nid = 25, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > > + }, { > > + .nid = 28, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_CD | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > > + }, { } > > +}; > > + > > +static struct pin_patch_t pin_patches_asus_w6f[] = { > > + { > > + .nid = 11, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > > + }, { > > + .nid = 12, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > > + }, { > > + .nid = 14, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > > + }, { > > + .nid = 15, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_HP_OUT | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_JACK } > > + }, { > > + .nid = 16, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > > + }, { > > + .nid = 31, > > + .type = PIN_PATCH_TYPE_MASK, > > + .patch.mask = { > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MASK | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_MASK, > > + HDA_CONFIG_DEFAULTCONF_DEVICE_MIC_IN | > > + HDA_CONFIG_DEFAULTCONF_CONNECTIVITY_FIXED } > > + }, { > > + .nid = 32, > > *** 839 LINES SKIPPED *** > > > > -- > Rod Grimes > rgrimes@freebsd.org > From owner-dev-commits-src-all@freebsd.org Sun Jul 4 14:52:42 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id C6FE8666783 for ; Sun, 4 Jul 2021 14:52:42 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f46.google.com (mail-wr1-f46.google.com [209.85.221.46]) (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 4GHsHZ56lFz3Fjq for ; Sun, 4 Jul 2021 14:52:42 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: by mail-wr1-f46.google.com with SMTP id p8so18826912wrr.1 for ; Sun, 04 Jul 2021 07:52:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=jMEWZhgXqq/fE30ZhCh8gF5SBcmIvVnq6r7C8LfeN/U=; b=EkFhdnEm3DBvTSK3Gp880AF4IHyf9FWm5vT7JCjtyOI0uzURYffxYhUDrm886yG7Tz tzpKZ9a1VF6o8vTKMbFm6fBBdA1Q76302Iw+odVLbDq/vRhjIoMZeh6Z+uJ2e+LhdPcl tojAKJ6vUEKcT3du6gTX65j5K97DKUAhBTqfWfNkXVmyXuCzRZZEwaTBqh3E1MAJnl1W 1bmVDkiqPE181ulgiO1Q7TAwNQWP+Q/elGReboSQlDKrisGWfGON8+R9Np1rw6TV3d82 Sfkx4WRYorQ00ZLU+C8SLKXCUXqj0OHsOynFzKpVMqkRexzUPxyX4q+viyUASOMA/LTc rjpQ== X-Gm-Message-State: AOAM532Dblh7+7e2AU/8v/Z7a4r550BK2Zrrm470HiH3XJS3J5Ld5m++ ngJP6dLQ9SdYuRcumqWPMsQh9g== X-Google-Smtp-Source: ABdhPJy8zBGxTPF0cQODfONaKLlS3TsgzNqDccMkus1sKJDRYl1egpO5RQy3xOIzPGmqBJg7RSAaNw== X-Received: by 2002:a05:6000:1a8e:: with SMTP id f14mr10644332wry.61.1625410361158; Sun, 04 Jul 2021 07:52:41 -0700 (PDT) Received: from smtpclient.apple (trinity-students-nat.trin.cam.ac.uk. [131.111.193.104]) by smtp.gmail.com with ESMTPSA id w9sm9531347wmc.19.2021.07.04.07.52.40 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 04 Jul 2021 07:52:40 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.100.0.2.22\)) Subject: Re: git: ffe6afc4f012 - main - freebsd-tips: Use a fetchable URL as example From: Jessica Clarke In-Reply-To: <202107041401.164E1KXH094610@gitrepo.freebsd.org> Date: Sun, 4 Jul 2021 15:52:40 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <03B758C5-2243-4ACF-9574-D984B283B407@freebsd.org> References: <202107041401.164E1KXH094610@gitrepo.freebsd.org> To: Li-Wen Hsu X-Mailer: Apple Mail (2.3654.100.0.2.22) X-Rspamd-Queue-Id: 4GHsHZ56lFz3Fjq X-Spamd-Bar: ---- Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[] X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 14:52:42 -0000 Hi, On 4 Jul 2021, at 15:01, Li-Wen Hsu wrote: >=20 > The branch main has been updated by lwhsu: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dffe6afc4f0121f1909f2fa88694228f7= 71dd3fcb >=20 > commit ffe6afc4f0121f1909f2fa88694228f771dd3fcb > Author: Li-Wen Hsu > AuthorDate: 2021-07-04 14:00:46 +0000 > Commit: Li-Wen Hsu > CommitDate: 2021-07-04 14:00:46 +0000 >=20 > freebsd-tips: Use a fetchable URL as example >=20 > MFC after: 3 days > --- > usr.bin/fortune/datfiles/freebsd-tips | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) >=20 > diff --git a/usr.bin/fortune/datfiles/freebsd-tips = b/usr.bin/fortune/datfiles/freebsd-tips > index cbbaff9eb84f..c747c689791b 100644 > --- a/usr.bin/fortune/datfiles/freebsd-tips > +++ b/usr.bin/fortune/datfiles/freebsd-tips > @@ -439,7 +439,7 @@ You can use "pkg info" to see a list of packages = you have installed. > % > You can use the 'fetch' command to retrieve files over ftp, http or = https. >=20 > - fetch https://www.FreeBSD.org/index.html > + fetch https://www.FreeBSD.org/images/beastie.png >=20 > will download the front page of the FreeBSD web site. This description no longer matches. Jess From owner-dev-commits-src-all@freebsd.org Sun Jul 4 15:49:02 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id E774966716B; Sun, 4 Jul 2021 15:49: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 4GHtXZ5yP1z3KkN; Sun, 4 Jul 2021 15:49: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 B4C401565A; Sun, 4 Jul 2021 15:49: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 164Fn2lt030802; Sun, 4 Jul 2021 15:49:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 164Fn2Ga030801; Sun, 4 Jul 2021 15:49:02 GMT (envelope-from git) Date: Sun, 4 Jul 2021 15:49:02 GMT Message-Id: <202107041549.164Fn2Ga030801@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 2f4d91f9cb22 - main - libalias: Rewrite HISTORY MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2f4d91f9cb22fc65eb65407e8118b433a5d71976 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 15:49:03 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=2f4d91f9cb22fc65eb65407e8118b433a5d71976 commit 2f4d91f9cb22fc65eb65407e8118b433a5d71976 Author: Lutz Donnerhacke AuthorDate: 2021-07-04 15:46:47 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-07-04 15:46:47 +0000 libalias: Rewrite HISTORY Fix the history entry (wrong year) and add the missing recent work. MFC together with the other patches. MFC after: 2 days --- sys/netinet/libalias/HISTORY | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/netinet/libalias/HISTORY b/sys/netinet/libalias/HISTORY index 04427be17b39..87d5b6f8ed76 100644 --- a/sys/netinet/libalias/HISTORY +++ b/sys/netinet/libalias/HISTORY @@ -144,6 +144,7 @@ Version 3.2: July, 2000 (Erik Salander, erik@whistle.com and Junichi Satoh, junichi@junichi.org) - Added support for streaming media (RTSP and PNA) aliasing. -Version 3.3: May 2020 (donner) +Version 3.3: May 2021 (donner) - Dropped LibAliasCheckNewLink - - Refactor the database handling, perfomance improvements. + - Refactor the database handling + - Switch to more effienct SPLAY trees From owner-dev-commits-src-all@freebsd.org Sun Jul 4 15:57:22 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1F7B1667225; Sun, 4 Jul 2021 15:57:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4GHtkB0S9Gz3LfB; Sun, 4 Jul 2021 15:57: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 EBC11157EA; Sun, 4 Jul 2021 15:57:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 164FvL7D043845; Sun, 4 Jul 2021 15:57:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 164FvL3i043844; Sun, 4 Jul 2021 15:57:21 GMT (envelope-from git) Date: Sun, 4 Jul 2021 15:57:21 GMT Message-Id: <202107041557.164FvL3i043844@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lutz Donnerhacke Subject: git: 4060e77f49d1 - main - libalias: Remove a stray directive MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: donner X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4060e77f49d1b9fd2254f3f4da94fd64fce83f72 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 04 Jul 2021 15:57:22 -0000 The branch main has been updated by donner: URL: https://cgit.FreeBSD.org/src/commit/?id=4060e77f49d1b9fd2254f3f4da94fd64fce83f72 commit 4060e77f49d1b9fd2254f3f4da94fd64fce83f72 Author: Lutz Donnerhacke AuthorDate: 2021-07-04 15:54:45 +0000 Commit: Lutz Donnerhacke CommitDate: 2021-07-04 15:54:45 +0000 libalias: Remove a stray directive Removal of a preprocessor line was missed during development. Do it now and MFC it together with the other patches. MFC after: 2 days --- sys/netinet/libalias/alias_db.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/netinet/libalias/alias_db.c b/sys/netinet/libalias/alias_db.c index 5b53067705bf..c09ad4352ce4 100644 --- a/sys/netinet/libalias/alias_db.c +++ b/sys/netinet/libalias/alias_db.c @@ -119,7 +119,6 @@ StartPointIn(struct libalias *la, SPLAY_INSERT(splay_in, &la->linkSplayIn, grp); return (grp); } -#undef INGUARD static int SeqDiff(u_long x, u_long y) From owner-dev-commits-src-all@freebsd.org Sun Jul 4 17:16:59 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 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-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 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;