From nobody Sat Oct 21 21:40:39 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCZd41jHsz4xbJR; Sat, 21 Oct 2023 21:40: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 4SCZd36Knjz3ScY; Sat, 21 Oct 2023 21:40:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697924439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=25OHeQl+kiLEyt8P1Ys762vR3WinCyvQCHZwAEmGolE=; b=MFDxI9q9PcwjxGnD+INb749aOeNRUsSbBuEtJikI/MvnQFlReFaA34bMt8Zn5fvkD6RgSa YAx4FRdzMroCW5hni0gCD7y3SIUF0aIi0aV+2eHsnSgdn/9T8/a6ZgkkIfWP24uY69HnWe 1Vg3r4+kKl/AIsW3xnhpejBvw6OZY+WDfZBNP0ilcXQTnnR4d9hSEaLL87/FDPvhlpMIty xhrXDYmn45ArTRUXVHF+yyNw1egMoYP3eH8sXnHqSNxhnIgR2YUyQwYQlIcKlQ7Dyymh3x csc76veA2wsXBXQIM1FwId01+NDzSnsBjBu1p/jYaazEehZN7rfQJN8bnIh75g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697924439; a=rsa-sha256; cv=none; b=m3QAexPw7wT2MB5E/IsLbQaw+gklCmNq2XkfQ3Q2p9hsZ3JBUyeMVwraBTqWvGuWz3kaN0 DbKcXyoboyj4rOgi+G0R5VyIPT2UJXYFg5opYF6cTBWDyaENS/RnEK6aswONYSwh/V7dro +maf1z83zIM1XMkHbi2Sd/EpQrs3IMZ74JRiEiNbp8KOsroQA1hOCdoiR124edyID46TqJ dFx2pGDg+WqFG3X+g/FY06rXklkLj8OjbxAjsUgZR9neqmfOKr6uFsgNTxJkWK9NH4mtut xl2+tVxlxETF65INtNsq9b0sMfXjoYtLl/UXiseL2ESHWEryJ5SPJSi/sxqiAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697924439; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=25OHeQl+kiLEyt8P1Ys762vR3WinCyvQCHZwAEmGolE=; b=REggazZ5yNZAXwqKI1JnEwAQ/RD3rXrki+A91JkiwE2nDi1m+gEhgQpKLS44+h+zvsT4+m wCWdFB8iChnHZ6sz+Xgfkd7ETBMHycBsacFe6j8OAEm+pWEdy26Sw1VK1P6MHrIgbYYeNi z/EVo5nEFG7ziYmcYFj+UuqJYwk/APCiU8bbiilfHdlUEw9ZYNuEGyO/X7WRpkehLs9Gfe o6Vazvpw3vCqDEvVTySD5djLfE3oLbTN5ZE944Gg6co7izVhZ4qwuaab14ookJrCSOQRRn k1/6cPRdWsPmEBuJOw1a1rmrEzsGernMu/zHdwLMFziK+RDY3towvrDG0/F1/Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCZd35PbSzXGg; Sat, 21 Oct 2023 21:40:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39LLedxl095795; Sat, 21 Oct 2023 21:40:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39LLed88095792; Sat, 21 Oct 2023 21:40:39 GMT (envelope-from git) Date: Sat, 21 Oct 2023 21:40:39 GMT Message-Id: <202310212140.39LLed88095792@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: bc417deae52a - releng/14.0 - Fix intermittency in the sys.fs.fusefs.mknod.main test List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: bc417deae52aa6a75003687d4f78cff89a3e569e Auto-Submitted: auto-generated The branch releng/14.0 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=bc417deae52aa6a75003687d4f78cff89a3e569e commit bc417deae52aa6a75003687d4f78cff89a3e569e Author: Alan Somers AuthorDate: 2023-10-06 19:46:42 +0000 Commit: Alan Somers CommitDate: 2023-10-21 21:40:11 +0000 Fix intermittency in the sys.fs.fusefs.mknod.main test In the Mknod.parent_inode test case, the kernel sends an extra FUSE_FORGET message. But because it gets sent asynchronously with the failing syscall, it doesn't always get received before the test ends. So we never setup an expectation for it. And 90+% of the time the test would exit successfully. Fix the intermittency by always waiting to receive the FUSE_FORGET message. Sponsored by: Axcient (cherry picked from commit 86885b18689889e9b9142fd31d8c67f21334ba32) Fix intermittency in the sys.fs.fusefs.symlink.main test This change is identical to 86885b18689 but for symlink instead of mknod. The kernel sends a FUSE_FORGET asynchronously with the final syscall. The lack of an expectation caused this test to occasionally fail. Also, remove a sleep that accidentally snuck into a different test. Sponsored by: Axcient (cherry picked from commit 8399d764c929a4b2fa98dbfae0ca7359810e4668) (cherry picked from commit af20b2201669ea493de58ba7a5e5ff1138b80cd7) Approved by: cperciva (re) --- tests/sys/fs/fusefs/mkdir.cc | 1 - tests/sys/fs/fusefs/mknod.cc | 7 +++++++ tests/sys/fs/fusefs/symlink.cc | 8 ++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tests/sys/fs/fusefs/mkdir.cc b/tests/sys/fs/fusefs/mkdir.cc index 48453ff8bb8a..f020feb94ed8 100644 --- a/tests/sys/fs/fusefs/mkdir.cc +++ b/tests/sys/fs/fusefs/mkdir.cc @@ -241,7 +241,6 @@ TEST_F(Mkdir, parent_inode) ASSERT_EQ(-1, mkdir(FULLPATH, mode)); ASSERT_EQ(EIO, errno); - usleep(100000); } TEST_F(Mkdir_7_8, ok) diff --git a/tests/sys/fs/fusefs/mknod.cc b/tests/sys/fs/fusefs/mknod.cc index 223d38f8acb1..1fb855f44f29 100644 --- a/tests/sys/fs/fusefs/mknod.cc +++ b/tests/sys/fs/fusefs/mknod.cc @@ -32,6 +32,7 @@ extern "C" { #include #include #include +#include } #include "mockfs.hh" @@ -255,14 +256,18 @@ TEST_F(Mknod, parent_inode) const char RELPATH[] = "some_node"; mode_t mode = S_IFSOCK | 0755; struct sockaddr_un sa; + sem_t sem; int fd; dev_t rdev = -1; /* Really it's a don't care */ uint64_t ino = 42; + ASSERT_EQ(0, sem_init(&sem, 0, 0)) << strerror(errno); + expect_lookup(PPATH, ino, S_IFDIR | 0755, 0, 1); EXPECT_LOOKUP(ino, RELPATH) .WillOnce(Invoke(ReturnErrno(ENOENT))); expect_mknod(ino, RELPATH, ino, mode, rdev); + expect_forget(ino, 1, &sem); fd = socket(AF_UNIX, SOCK_STREAM, 0); ASSERT_LE(0, fd) << strerror(errno); @@ -273,6 +278,8 @@ TEST_F(Mknod, parent_inode) ASSERT_EQ(EIO, errno); leak(fd); + sem_wait(&sem); + sem_destroy(&sem); } /* diff --git a/tests/sys/fs/fusefs/symlink.cc b/tests/sys/fs/fusefs/symlink.cc index 19286a446fc3..bd355497a8bd 100644 --- a/tests/sys/fs/fusefs/symlink.cc +++ b/tests/sys/fs/fusefs/symlink.cc @@ -29,6 +29,7 @@ */ extern "C" { +#include #include } @@ -174,15 +175,22 @@ TEST_F(Symlink, parent_ino) const char PPATH[] = "parent"; const char RELPATH[] = "src"; const char dst[] = "dst"; + sem_t sem; const uint64_t ino = 42; + ASSERT_EQ(0, sem_init(&sem, 0, 0)) << strerror(errno); + expect_lookup(PPATH, ino, S_IFDIR | 0755, 0, 1); EXPECT_LOOKUP(ino, RELPATH) .WillOnce(Invoke(ReturnErrno(ENOENT))); expect_symlink(ino, dst, RELPATH); + expect_forget(ino, 1, &sem); EXPECT_EQ(-1, symlink(dst, FULLPATH)); EXPECT_EQ(EIO, errno); + + sem_wait(&sem); + sem_destroy(&sem); } TEST_F(Symlink_7_8, ok) From nobody Sun Oct 22 06:56:05 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCpxx3w7Fz4y9gj; Sun, 22 Oct 2023 06:56: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 4SCpxx3GCQz4cK4; Sun, 22 Oct 2023 06:56:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697957765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4w9HyzfoqW39d/DEIqdmnQ8uQay0UGOj4p/DjY3ya4o=; b=XqkOoEeHyfzjAqPs/6V/8HyH9Cpfd2MpfB0DmZiT5T1vhod3CljVyYxhfZwMQL/QDHf8N4 OBzWYBlVw2Y0Cj4CWF9AO0nebMiIZ5uIlydE6pVHhr1ENFXhsXdPl5n8jR5PgE5aFP1Uay lAV+JiHLBdDGY1eQ/6cQqEuAc/5jfm8KtIYMbpD2Nb0KR/Xq9fKK6JyhgCaK5OSEab7w97 r6ILWbfQ9EQixNaq2ZFeJv5Nm3uhu4qiXGF2gHLUw9zOeo4AQ7h66C9SOcXIDgt/Qe8zpK 2uZstlqkUryVQlV4XJTTuFBjBpCJQablPzkX7BmJ8M3RRS/TacQN1CqPklOJrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697957765; a=rsa-sha256; cv=none; b=EgW+qcDe8Dydud8yqIFBPQYcK5h0J9me2Z1pG4p9ZZ7x9ClBiFItBkvLN1GeDfdKU8LIIw oAM8CysFmgSnZvliG+c2LaFBB5cfWh06GrnyFkfLmu75n+dXffBdOn+xo8cMjY8OdNj4Zw 03/bSTlWNXIwqa0OKFvLnE+62L2jNFEgyjaKEdttWg6g5hUHJO3KPIoSVvN5euiucD+eX8 mVpTT+rb7lVfjpNdue3idRqqq2KJEMJRsycN7ZWKtW2/euh/ufPA4eq80lywLA5tIWPIQi wdNC+uUW1usCO6/316w+nc57ycrclb2+hONkZFnQZnyzviDfwgqRKk1daU39Jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697957765; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4w9HyzfoqW39d/DEIqdmnQ8uQay0UGOj4p/DjY3ya4o=; b=OR6QySKMbudHO0Q4oc/RfzBmtZvbnVOy1PauFQ59UjBql3PH1zze82dfhvg6m65IyN3L07 +B9O/L3PvwGOag9WSSyakjmKj4vxR8oLJ+pQJHffUw96xhuyc+ER6lLDyxdB8A4qYcf+o2 slq/+WnmdixEtnvlsdY0jX+7aQXqoNu4Fe9rIWGdx/RALCDNzI3elT2BiCwbzTp1ny4y9l /QSqhzXCSUEBC7MWrSFO3mEO9IktRg3iAHMDQjgIs43xRjz/LCwJyXY3FxQS5QGrAH6OQH 9qDCYYdRyBUaCxz2TElzU52pd+HWi9ICjLyVfhDn6AgW+oT5FA68zynDxhXA3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCpxx2JQDzp0g; Sun, 22 Oct 2023 06:56:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39M6u5F9016218; Sun, 22 Oct 2023 06:56:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39M6u5XZ016215; Sun, 22 Oct 2023 06:56:05 GMT (envelope-from git) Date: Sun, 22 Oct 2023 06:56:05 GMT Message-Id: <202310220656.39M6u5XZ016215@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: b84a836ef02d - stable/14 - vfs cache: Fallback to namei to resolve symlinks with leading / in target for non-native ABI List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/stable/14 X-Git-Reftype: branch X-Git-Commit: b84a836ef02de42e262ce44d46c859be288df4b0 Auto-Submitted: auto-generated The branch stable/14 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=b84a836ef02de42e262ce44d46c859be288df4b0 commit b84a836ef02de42e262ce44d46c859be288df4b0 Author: Dmitry Chagin AuthorDate: 2023-10-19 10:33:58 +0000 Commit: Dmitry Chagin CommitDate: 2023-10-22 06:55:53 +0000 vfs cache: Fallback to namei to resolve symlinks with leading / in target for non-native ABI This is a temporary solution to fix PR before release. During 15.0 it's necessary to refactor symlinks handling between vfs & namecache. PR: 273414 Reported by: Vincent Milum Jr, Dan Kotowski, glebius Tested by: Dan Kotowski, glebius Reviewed by: Differential Revision: https://reviews.freebsd.org/D41806 MFC after: 3 days (cherry picked from commit bb8ecf259f96510b9c2146d846403393543061b7) --- sys/kern/vfs_cache.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 115d0bdd3993..8917666950c1 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -5337,12 +5337,14 @@ cache_fplookup_symlink(struct cache_fpl *fpl) struct nameidata *ndp; struct componentname *cnp; struct vnode *dvp, *tvp; + struct pwd *pwd; int error; ndp = fpl->ndp; cnp = fpl->cnp; dvp = fpl->dvp; tvp = fpl->tvp; + pwd = *(fpl->pwd); if (cache_fpl_islastcn(ndp)) { if ((cnp->cn_flags & FOLLOW) == 0) { @@ -5398,6 +5400,9 @@ cache_fplookup_symlink(struct cache_fpl *fpl) cache_fpl_checkpoint(fpl); return (cache_fpl_partial(fpl)); } + if (__predict_false(pwd->pwd_adir != pwd->pwd_rdir)) { + return (cache_fpl_aborted(fpl)); + } } return (0); } From nobody Sun Oct 22 11:57:34 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCxdq0R8Dz4xC3D; Sun, 22 Oct 2023 11:57: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 4SCxdp6t1Wz3W0F; Sun, 22 Oct 2023 11:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697975855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8uie+XyN6+B7Hu+qYlXV3K54/Iq5enmU6I/S/O/OYIs=; b=Z1D6wCllzSsyeK8L94jYkZ2RVMU/Q4C+KxR9JDqCLqxk0L77BcS4g+4Ys/25rpoXi+Pey5 uAuIryVziwuHuZCzaEMVDLhDc3bE5eIBCeyXY2c7WZaxz5CAsF2AIJVJbbbqQZDh2kMUQ6 JoacNTf/uKWzNImN4DZf8zhxR80Avpc1RXFXrlUw0tVog4JSO4lFuEafEeV9/3D3RK7MlV umn2WtdzLWaPxwYmD+DDXrJf9kOn4yaOH5g1AMrRwROhmARNdN/dRd6d4Y/oXm71PLg6Ip iJDthAlWrQkhPhH7Bh4gX6942UYpwxybXKqRejl6EZjaujKjG7InpW34eIA2lw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697975855; a=rsa-sha256; cv=none; b=Ncr4oZyD9BWz+F4Aj7DtEmWV+Wf3/3y+SVfVKKhO1q/yPYmG4b0gKg1Ry8rejLmHmj3MZL F9eBUOuAUb/ZRDgRM9Glf+iSqHVYZrhXa73QN8K4rP6RdBC0YvHdkNaA/yTvH1fa8sTAbV 8ZxRNhM0bis+b0g2b4oQyftVy0Fr3llw91DnhJenFNwsnOXTijPUGgC1uF6ql6f8F6PJZl SDWWlo8ifGz3C0ndtBvcHQFG1cZA8wtl2fOqcS/jZ+y7mi+yFul+rbB0h7+RJ5aGpO4rqp LksTEfFhkBBlEe2/whrK4vyJumgl/goWXi+xsWy2vRRd910GtTajI2DO7U2nXg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697975855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8uie+XyN6+B7Hu+qYlXV3K54/Iq5enmU6I/S/O/OYIs=; b=RndUlYecj2aRcu5zHDswTJcAmgBQmzwDJDOG0U1V3DtrupJzz2PiWq2+dIoloNTs6vKmTK BiIEak1A7oFJfFUYTGs9PjVpoKU3DIehhlDYBS9lGvpa9t0AE89Ahj+7n8K2jv0/ZxeXVE IcoEqb3kehqzNd96F+PZbZtI/COS5h6/l39aXiuefkX4lZEhSw+yg/R7lMO17f9lOsD7HK pGz2MT7xCgyHMeOt6I5I68FPSGQh+a3DOAtZuNqGHqBS4Axz+z/0yIwtKsqFHC5u4Q6NW1 JRN7GYX7IvlxSMq1LFuA9dzHsEDHu2LdG8kpxF0TJLHXc1Ez6CaIzEhuFltXcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCxdp5wl1zx0T; Sun, 22 Oct 2023 11:57:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39MBvYmh015185; Sun, 22 Oct 2023 11:57:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39MBvYw6015182; Sun, 22 Oct 2023 11:57:34 GMT (envelope-from git) Date: Sun, 22 Oct 2023 11:57:34 GMT Message-Id: <202310221157.39MBvYw6015182@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: ad8c7f909e33 - releng/14.0 - (s)tty: add support for IUTF8 input flag List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: ad8c7f909e3315a31f654ab7dca75840a4561cb0 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=ad8c7f909e3315a31f654ab7dca75840a4561cb0 commit ad8c7f909e3315a31f654ab7dca75840a4561cb0 Author: Bojan Novković AuthorDate: 2023-10-07 17:59:57 +0000 Commit: Christos Margiolis CommitDate: 2023-10-22 11:56:32 +0000 (s)tty: add support for IUTF8 input flag This patch adds the necessary kernel and stty code to support setting the IUTF8 flag for ttys. It is the first of two patches that fix backspace behaviour for UTF-8 encoded characters when in canonical mode. Reported by: christos Reviewed by: christos, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42066 (cherry picked from commit 128f63cedc14ae21b35f74e11e2fe1a5659c58e8) Approved by: re (gjb) --- bin/stty/modes.c | 2 ++ bin/stty/print.c | 1 + bin/stty/stty.1 | 3 +++ share/man/man4/termios.4 | 2 ++ sys/kern/tty.c | 4 ++-- sys/sys/_termios.h | 1 + 6 files changed, 11 insertions(+), 2 deletions(-) diff --git a/bin/stty/modes.c b/bin/stty/modes.c index ce39083d7d63..3818677ddc4e 100644 --- a/bin/stty/modes.c +++ b/bin/stty/modes.c @@ -126,6 +126,8 @@ static const struct modes imodes[] = { { "-decctlq", IXANY, 0 }, { "imaxbel", IMAXBEL, 0 }, { "-imaxbel", 0, IMAXBEL }, + { "iutf8", IUTF8, 0 }, + { "-iutf8", 0, IUTF8 }, { NULL, 0, 0 }, }; diff --git a/bin/stty/print.c b/bin/stty/print.c index 07a3c2058474..33472bbccea1 100644 --- a/bin/stty/print.c +++ b/bin/stty/print.c @@ -127,6 +127,7 @@ print(struct termios *tp, struct winsize *wp, int ldisc, enum FMT fmt) put("-inpck", INPCK, 0); put("-ignpar", IGNPAR, 0); put("-parmrk", PARMRK, 0); + put("-iutf8", IUTF8, 1); /* output flags */ tmp = tp->c_oflag; diff --git a/bin/stty/stty.1 b/bin/stty/stty.1 index 9e9405928c67..c572a657a997 100644 --- a/bin/stty/stty.1 +++ b/bin/stty/stty.1 @@ -224,6 +224,9 @@ if .Cm imaxbel is unset and the input queue is full, the next input character causes the entire input and output queues to be discarded. +.It Cm iutf8 Pq Fl iutf8 +Assume that input characters are UTF-8 encoded. Setting this flag +causes backspace to properly delete multibyte characters in canonical mode. .El .Ss Output Modes: This corresponds to the c_oflag of the termios structure. diff --git a/share/man/man4/termios.4 b/share/man/man4/termios.4 index d3a5c8fa582d..80015025345e 100644 --- a/share/man/man4/termios.4 +++ b/share/man/man4/termios.4 @@ -884,6 +884,8 @@ following masks: /* any char will restart after stop */ .It Dv IMAXBEL /* ring bell on input queue full */ +.It Dv IUTF8 +/* assume input is UTF-8 encoded */ .El .Pp In the context of asynchronous serial data transmission, a break diff --git a/sys/kern/tty.c b/sys/kern/tty.c index 134c1dfba98b..620233947410 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -85,8 +85,8 @@ static const char *dev_console_filename; /* * Flags that are supported and stored by this implementation. */ -#define TTYSUP_IFLAG (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|ISTRIP|\ - INLCR|IGNCR|ICRNL|IXON|IXOFF|IXANY|IMAXBEL) +#define TTYSUP_IFLAG (IGNBRK|BRKINT|IGNPAR|PARMRK|INPCK|ISTRIP|INLCR|\ + IGNCR|ICRNL|IXON|IXOFF|IXANY|IMAXBEL|IUTF8) #define TTYSUP_OFLAG (OPOST|ONLCR|TAB3|ONOEOT|OCRNL|ONOCR|ONLRET) #define TTYSUP_LFLAG (ECHOKE|ECHOE|ECHOK|ECHO|ECHONL|ECHOPRT|\ ECHOCTL|ISIG|ICANON|ALTWERASE|IEXTEN|TOSTOP|\ diff --git a/sys/sys/_termios.h b/sys/sys/_termios.h index 327ffcb2f98b..823752732ee2 100644 --- a/sys/sys/_termios.h +++ b/sys/sys/_termios.h @@ -97,6 +97,7 @@ #endif #if __BSD_VISIBLE #define IMAXBEL 0x00002000 /* ring bell on input queue full */ +#define IUTF8 0x00004000 /* assume input is utf-8 encoded */ #endif /* From nobody Sun Oct 22 11:57:35 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCxdr1qDZz4xC71; Sun, 22 Oct 2023 11:57: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 4SCxdr107Qz3WKG; Sun, 22 Oct 2023 11:57:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697975856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hYazf5EwR2Ja57OAOh5esuI40liwBCpYd38j5Tii9rk=; b=ZbFyqcV3Mgkog0slfbSQmYtqX9Yg2jSSSiE5ue3PbQfcBBZPMgw17Mr36CF/znXP4GJBvS 5v/WPSHLpUD3TP34knaZC8jL5c9l20185hfvwCkixyhBpNU66XsmsXXGg6kJxLkZGDfRFV qSmS3aRz6EhVOE38Qo0Onfuv0k4b5cDEFQxKrwBQCMDw+oFaVoYOy5fIP6HJiYc5ELD2GN xMjUZJnVVf68SETD334PkaJE/4ONeqnHHhPfKGcqJcRlOMY0JfEaGmVhrWJu40VjZjd59W Y2uw0k0qFp9E+dCCI4pJcHehOS9cBwwLMBF29shg6xC/LtLFWAPvhp/dh2fUHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697975856; a=rsa-sha256; cv=none; b=ri8Rv/Rw5gdko7ZRHTdXxyFKQUI9Wkhlm/d7kWaYSsNWKGNLO9ckXsnurJPN6jH0wBriU0 9W0935IyIxkKT/lS43viQB2PeSs3Ztb8Uv9NXSsWgaieGOyxfmTNFRO0mxmwAcJ/REkO9W pnQTJlz2FNX94hSE9rJ0yIC6ZmMEk4hoLl+v1fmnTt4NP+srQmqyEg4y+Ed5HZjjI341Lt 33TaGcj3KD7ViI/a2v9AJL+KLFjUhufApMO9BUA3SeDr4F1iowp169bU56H+7PWH0c4SaV NlNpqXqLwUnIDdnhbgEA5+/Lbn2qJ0fGb0ypgdGb54SeuvRZnZZA/LuJR0mzbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697975856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hYazf5EwR2Ja57OAOh5esuI40liwBCpYd38j5Tii9rk=; b=acJUHLvjSyU294T/BNOs1yhfXsBl2TDz6O2UrP4Pxm75Xrbc/S2gocBGOSYjUgXUKyqOQU JP5bMHYBdwtajE9Mm1e0F6P7m2yo/pCvn38z4ez3xNMtn/fHR8lh0akEsyVUihvb+vAw71 xkRw3h2+OxEBoQx/UoyW5j3GL3RrzJuknPls9z47GnR72I4GVZ3CwW5KiK9Tifl7HCII7f u827vtsVMGAV/QqtQpo+xo1SNW6G4X3Ja6bkyJOKM1nLTtXWbw3kKsdBVaXwYGmempJiGc QeBDA2yKTqV4EmCoWxFNnR7aefiP6JBJmwCVQ6CI2C10mYqCkPGDLaFJ6V1gFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCxdq6ygbzx0V; Sun, 22 Oct 2023 11:57:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39MBvZDa015251; Sun, 22 Oct 2023 11:57:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39MBvZle015248; Sun, 22 Oct 2023 11:57:35 GMT (envelope-from git) Date: Sun, 22 Oct 2023 11:57:35 GMT Message-Id: <202310221157.39MBvZle015248@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: dbe9ba41bbd7 - releng/14.0 - tty: fix improper backspace behaviour for UTF8 characters when in canonical mode List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: dbe9ba41bbd76e7579683cd69b3235d0b02aca1e Auto-Submitted: auto-generated The branch releng/14.0 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=dbe9ba41bbd76e7579683cd69b3235d0b02aca1e commit dbe9ba41bbd76e7579683cd69b3235d0b02aca1e Author: Bojan Novković AuthorDate: 2023-10-07 18:00:11 +0000 Commit: Christos Margiolis CommitDate: 2023-10-22 11:56:44 +0000 tty: fix improper backspace behaviour for UTF8 characters when in canonical mode This patch adds additional logic in ttydisc_rubchar() to properly handle backspace behaviour for UTF-8 characters. Currently, typing in a backspace after a UTF8 character will delete only one byte from the byte sequence, leaving garbled output in the tty's output queue. With this change all of the character's bytes are deleted. This change is only active when the IUTF8 flag is set (see 19054eb6053189144aa962b2ecc1bf5087758a3e "(s)tty: add support for IUTF8 input flag") The code uses the teken_wcwidth() function to properly handle character column widths for different code points, and adds the teken_utf8_bytes_to_codepoint() function that converts a UTF-8 byte sequence to a codepoint, as specified in RFC3629. Reported by: christos Reviewed by: christos, imp MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42067 (cherry picked from commit 9e589b0938579f3f4d89fa5c051f845bf754184d) Approved by: re (gjb) --- sys/kern/tty_ttydisc.c | 74 +++++++++++++++++++++++++++++++++++++++++++++++ sys/teken/teken_wcwidth.h | 30 +++++++++++++++++++ 2 files changed, 104 insertions(+) diff --git a/sys/kern/tty_ttydisc.c b/sys/kern/tty_ttydisc.c index 665275ee93e7..eae7162e31c0 100644 --- a/sys/kern/tty_ttydisc.c +++ b/sys/kern/tty_ttydisc.c @@ -43,6 +43,9 @@ #include #include +#include +#include + /* * Standard TTYDISC `termios' line discipline. */ @@ -78,8 +81,13 @@ SYSCTL_ULONG(_kern, OID_AUTO, tty_nout, CTLFLAG_RD, /* Character is alphanumeric. */ #define CTL_ALNUM(c) (((c) >= '0' && (c) <= '9') || \ ((c) >= 'a' && (c) <= 'z') || ((c) >= 'A' && (c) <= 'Z')) +/* Character is UTF8-encoded. */ +#define CTL_UTF8(c) (!!((c) & 0x80)) +/* Character is a UTF8 continuation byte. */ +#define CTL_UTF8_CONT(c) (((c) & 0xc0) == 0x80) #define TTY_STACKBUF 256 +#define UTF8_STACKBUF 4 void ttydisc_open(struct tty *tp) @@ -800,6 +808,72 @@ ttydisc_rubchar(struct tty *tp) ttyoutq_write_nofrag(&tp->t_outq, "\b\b\b\b\b\b\b\b", tablen); return (0); + } else if ((tp->t_termios.c_iflag & IUTF8) != 0 && + CTL_UTF8(c)) { + uint8_t bytes[UTF8_STACKBUF] = { 0 }; + int curidx = UTF8_STACKBUF - 1, cwidth = 1, + nb = 0; + teken_char_t codepoint; + + /* Save current byte. */ + bytes[curidx] = c; + curidx--; + nb++; + /* Loop back through inq until we hit the + * leading byte. */ + while (CTL_UTF8_CONT(c) && nb < UTF8_STACKBUF) { + ttyinq_peekchar(&tp->t_inq, &c, "e); + ttyinq_unputchar(&tp->t_inq); + bytes[curidx] = c; + curidx--; + nb++; + } + /* + * Shift array so that the leading + * byte ends up at idx 0. + */ + if (nb < UTF8_STACKBUF) + memmove(&bytes[0], &bytes[curidx + 1], + nb * sizeof(uint8_t)); + /* Check for malformed UTF8 characters. */ + if (nb == UTF8_STACKBUF && + CTL_UTF8_CONT(bytes[0])) { + /* + * Place all bytes back into the inq and + * delete the last byte only. + */ + ttyinq_write(&tp->t_inq, bytes, + UTF8_STACKBUF, 0); + } else { + /* Find codepoint and width. */ + codepoint = + teken_utf8_bytes_to_codepoint(bytes, + nb); + if (codepoint != + TEKEN_UTF8_INVALID_CODEPOINT) { + cwidth = teken_wcwidth( + codepoint); + } else { + /* + * Place all bytes back into the + * inq and fall back to + * default behaviour. + */ + ttyinq_write(&tp->t_inq, bytes, + nb, 0); + } + } + tp->t_column -= cwidth; + /* + * Delete character by punching + * 'cwidth' spaces over it. + */ + if (cwidth == 1) + ttyoutq_write_nofrag(&tp->t_outq, + "\b \b", 3); + else if (cwidth == 2) + ttyoutq_write_nofrag(&tp->t_outq, + "\b\b \b\b", 6); } else { /* * Remove a regular character by diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index f57a185c2433..f5a23dbc9679 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -8,6 +8,8 @@ * Latest version: http://www.cl.cam.ac.uk/~mgk25/ucs/wcwidth.c */ +#define TEKEN_UTF8_INVALID_CODEPOINT -1 + struct interval { teken_char_t first; teken_char_t last; @@ -116,3 +118,31 @@ static int teken_wcwidth(teken_char_t ucs) (ucs >= 0x20000 && ucs <= 0x2fffd) || (ucs >= 0x30000 && ucs <= 0x3fffd))); } + +/* + * Converts an UTF-8 byte sequence to a codepoint as specified in + * https://datatracker.ietf.org/doc/html/rfc3629#section-3 . The function + * expects the 'bytes' array to start with the leading character. + */ +static teken_char_t +teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) +{ + + /* Check for malformed characters. */ + if (bitcount(bytes[0] & 0xf0) != nbytes) + return (TEKEN_UTF8_INVALID_CODEPOINT); + + switch (nbytes) { + case 1: + return (bytes[0] & 0x7f); + case 2: + return (bytes[0] & 0xf) << 6 | (bytes[1] & 0x3f); + case 3: + return (bytes[0] & 0xf) << 12 | (bytes[1] & 0x3f) << 6 | (bytes[2] & 0x3f); + case 4: + return (bytes[0] & 0x7) << 18 | (bytes[1] & 0x3f) << 12 | + (bytes[2] & 0x3f) << 6 | (bytes[3] & 0x3f); + default: + return (TEKEN_UTF8_INVALID_CODEPOINT); + } +} From nobody Sun Oct 22 11:57:37 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCxds2XG9z4xC3H; Sun, 22 Oct 2023 11:57: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 4SCxds1l71z3WS1; Sun, 22 Oct 2023 11:57:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697975857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rjaTXB9NT4TYLasYquLVs+ZaluHFxYCgTDnqSMfOiI4=; b=q/SlXjoToWVqtsWDIJcBEIbYDOpMZAeJsnxSOYY0NX/qe5/SadzTJbyE/LIbi4yQzSzgXP d0O4ZzHApHsNN11Gy+OBrWVyn+Zau2gqVpRswzlAz2hROCmK5AWAlg4cmKYLn/ON9571gx x+DI5xJbrZMopTQEJp5Ir4RtAK2FjGp73qQAAwi+7s0Ga0128VL0YEr3b/Bv4RDQtB2PAE F7eg/QL/D1CoLfnpDmrxCe8dGdHsVyKcntqyDgq+q5RbHHKLhcEhrn/wZHiKb0CACK5dLv lLwTPAgWQ3c/5M6PAstP6gVGmQyHcKoDgEFVlS0ZB4tmh85Delqz6+RNv9xdfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697975857; a=rsa-sha256; cv=none; b=YpPCSlkXNCu0wth1ZXQE9N6Rels5HOXg3sAfWSpl6CD5GNfH62rbIc2DMGL2/QoFq50TOg 6QyaFfHqUS3v9jLKr40PHEbpx7a69mwgQrP7m+zPkwKPCpEKgUwtsB/G0M49AgiIaklHdy stTffUuUSaI7mbvYf5hOdSQ3PsHHkh11XCExOPftzYEmvGs0SSInuALArNxR6XQu8EVLIY +whWXdswiefv1g7dIjgD3acNhTM7El4lWCM4AJeRsk5/l1tjWA+2xmk1gGCeAo2V+2pZpd drbtKn9rmer1vpH652Mv8FJCgxdC791Ai/hLz4TFYzKxIPvSpuZUZvbs1QTD8w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697975857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rjaTXB9NT4TYLasYquLVs+ZaluHFxYCgTDnqSMfOiI4=; b=b2WSkagYoXySFelo6W32oYVMgDeMLD+28WwM1GzfJD1hElsgz1sV7wBokj7/1cAc4WhIB0 Wd7Q2Tz12h7q/O3CSj9gSGzQqLspVfhE7Nj2xwGwMrysuaDyhspuDYmI6oOd9AQJBZ/MAu 63VyiVH2OLtMHVFn4DbMqH4WB/8DsHNQo6jJQeodBD7qalwV59+mksg6xLNdmaqMQziqK1 HVo7XiiFa4MXb72VBEz+wqTgInLau8HG/+nykqj/ZR3evgeXtkSNh29ewzWP5CLaUWkSWU koe9StQoL04dheHbR5HuSAfWJOzM8rBJ3IS5N52ohTdx2J+quH8duScJ9vTvUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCxds0rxRzwnG; Sun, 22 Oct 2023 11:57:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39MBvb3e015298; Sun, 22 Oct 2023 11:57:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39MBvb1I015295; Sun, 22 Oct 2023 11:57:37 GMT (envelope-from git) Date: Sun, 22 Oct 2023 11:57:37 GMT Message-Id: <202310221157.39MBvb1I015295@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: e76fb470ab34 - releng/14.0 - teken: use __bitcount() instead of bitcount() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: e76fb470ab34c035b78d2dcc5f346db1b72b19a6 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=e76fb470ab34c035b78d2dcc5f346db1b72b19a6 commit e76fb470ab34c035b78d2dcc5f346db1b72b19a6 Author: Christos Margiolis AuthorDate: 2023-10-07 21:36:59 +0000 Commit: Christos Margiolis CommitDate: 2023-10-22 11:56:49 +0000 teken: use __bitcount() instead of bitcount() The use of bitcount() triggered a build error because it couldn't be located. __bitcount() on the other hand is defined in sys/types.h, which is included in teken/teken.h. MFC after: 2 weeks (cherry picked from commit 6d3296f16a06bcaa49918799e683936711dcf9c9) Approved by: re (gjb) --- sys/teken/teken_wcwidth.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index f5a23dbc9679..bc992e1ef5d8 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -129,7 +129,7 @@ teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) { /* Check for malformed characters. */ - if (bitcount(bytes[0] & 0xf0) != nbytes) + if (__bitcount(bytes[0] & 0xf0) != nbytes) return (TEKEN_UTF8_INVALID_CODEPOINT); switch (nbytes) { From nobody Sun Oct 22 11:57:38 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCxdt2tTqz4xCM7; Sun, 22 Oct 2023 11:57:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SCxdt2D1rz3WMp; Sun, 22 Oct 2023 11:57:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697975858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KI7XKGVTSqWZGzTanAs472bHFOFP2DUFJZp8gl3UGjc=; b=rjulVhnTNrcIDDd5jVHO29a9PETx25akXC1CM8pglyAP7B6sYZfUIeMEBU9rvoDeIow26A E+4yK6b6UTZqh142wna+cUau4hEIqlXv3FqEd1inhJoVJ9fCv/bB3oq1bRQqsACZ+/xz4h Y5ysXZ8nOnrHy1OSoTmbj7comscVHpmv3qLnzYi0+TqUcHKeapS82UKD82W4UhmGGYTWB3 Twh/QSzsJ3RQDSwsdGk5p4fk2qZKfs2LIH+ilxhcH7QkZDNbWu7rSZEwRiwGW1aEzdWJGM w6x+I5m8RD4Kws+h397x0SXF+apr/uTUP9qp8rYOMQtOPlWD+YNBDCeJ1m1rXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697975858; a=rsa-sha256; cv=none; b=LWVRCLmbhDL2VLbWDfZsaH5U/GhcmPm89cKniKnzyC5yohXbUooWl8vuh2hDJkmVh38HSt YE5MFRY/K0vQx5ZcvV4lWbxpKHCRfc4MB7w26lpZrZv5BHLTaJEs/hRQC7woox6yPBfnUC mMyJEMriKVUniTG8clkfPszOYzpyvF1rx4JJxGE1yW7O9Xhu7hkqMUfFUaURvoZFtj1HyE FPm0f0azJavoZsWgI1DPe0F7lSGb8CZPMFPKhP1oQor2O1dwbONwoMOsj/K9pjF2BgynMn EWEgu6khd3fGEdhKkGcMAxBuJvfqslBJTmbvU/FadoOG+z3celeRVw67n4qHQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697975858; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KI7XKGVTSqWZGzTanAs472bHFOFP2DUFJZp8gl3UGjc=; b=AvOvQJjriLQznJowq1Li0RspBKjX4nx6utnjINvay9+N0QIm7svl8/V/OKC5MVUmSpWUmh Pv6sFbBgsjVThmqaxlw88m+jdQn9U4rRH84+XXN4cdMdnn32ftKrZU8qm3RIAbjwq+DWcS qiUFCLUUkgHqaycY4mQdaH/xTGdbWP+0i1S79IcJrnuIycDihXiCnNllyKX0jaGl/tkNT+ 7iBD0/D3qvy6T5Cc/8X50CH1G4qKgeo7N9x9jjsumLO4Uf5djZ/x/ymLn1oCYkJ9rIOdxS 7hFHGNpLnf1dTUoYgqxNABi2x81dflosDZ7btP0BqKn6G2QYeibSRDgiba4NLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCxdt1HZtzwnH; Sun, 22 Oct 2023 11:57:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39MBvcJ0015348; Sun, 22 Oct 2023 11:57:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39MBvcpn015345; Sun, 22 Oct 2023 11:57:38 GMT (envelope-from git) Date: Sun, 22 Oct 2023 11:57:38 GMT Message-Id: <202310221157.39MBvcpn015345@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: cee081ebf86a - releng/14.0 - teken: fix up unused func warnings List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: cee081ebf86a8fee396742238811b9880d8f9ace Auto-Submitted: auto-generated The branch releng/14.0 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=cee081ebf86a8fee396742238811b9880d8f9ace commit cee081ebf86a8fee396742238811b9880d8f9ace Author: Mateusz Guzik AuthorDate: 2023-10-08 13:54:11 +0000 Commit: Christos Margiolis CommitDate: 2023-10-22 11:56:56 +0000 teken: fix up unused func warnings Sponsored by: Rubicon Communications, LLC ("Netgate") (cherry picked from commit 4b9aa38ef0e5bedcdd90b6627cc1c215037a1121) Approved by: re (gjb) --- sys/teken/teken_wcwidth.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index bc992e1ef5d8..bc40c23a6eb7 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -16,7 +16,7 @@ struct interval { }; /* auxiliary function for binary search in interval table */ -static int bisearch(teken_char_t ucs, const struct interval *table, int max) { +static inline int bisearch(teken_char_t ucs, const struct interval *table, int max) { int min = 0; int mid; @@ -35,7 +35,7 @@ static int bisearch(teken_char_t ucs, const struct interval *table, int max) { return 0; } -static int teken_wcwidth(teken_char_t ucs) +static inline int teken_wcwidth(teken_char_t ucs) { /* sorted list of non-overlapping intervals of non-spacing characters */ /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */ @@ -124,7 +124,7 @@ static int teken_wcwidth(teken_char_t ucs) * https://datatracker.ietf.org/doc/html/rfc3629#section-3 . The function * expects the 'bytes' array to start with the leading character. */ -static teken_char_t +static inline teken_char_t teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) { From nobody Sun Oct 22 11:57:39 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCxdv4Ms9z4xCM9; Sun, 22 Oct 2023 11:57: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 4SCxdv3YW5z3WbQ; Sun, 22 Oct 2023 11:57:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697975859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mh2TxfTxz7YEQDdrp4VXQgYGpwXWkX0LmAutcHISj54=; b=pDtPXAKi6nVishM0aadcQ28wNaJuWonqZHSSezjZtI27QuVPQm7PPxBb0vAZGWR7nZgoJ3 Wiek1JN7+zGjGKVEMZNn9bLdD4hMMJqPz7bbMK0+sckWAHOfGUZ4x7iZcbvf0lDSafqILJ nmMjkjzEQWp4RY/KIR6PPQP+gKy931GSjzynisxr8nf+CI+wEkeBraJ1KNDxZ0vCC2ZVhT 2bhAIKw3jIiaN2FACfKxCvMNDmxxyefa1Hvy7ekAQm4aU1Vsv/fXB2Ge/1GaFFO4iYC2I/ RgiPkSCZrt8L/JillGqfNLzs/zFsZy+bxx5QoUgc78NaQck1knhKI7e8gx7R2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697975859; a=rsa-sha256; cv=none; b=lrLx32MABBdVWnl8jHpWk2eGfJbnlhimKFaNmrnFI8D8oMlcz7Yfn7s+264qBb2pYRDa9g dUi9jn/pWZ0aegW5bQk+fzAEhKOxzSeOESnC2WT93tSgGKxGYteRG3SclgWK9f15Kz4kAZ CiraiwNQmVIG97farVBOQWuUl5ode/WJqWTijjdcRzZSQUrxhO8wxgrQtKpNbexdD1HAF+ 6tcnT4KWsWaZLoOJpOOD2XuH7ExtgJqeTUFk8G9HShW5kstHAteSLbGkkuNkg9l9Q6vfZU 5WS18K8rmqxByfiDAhYV4+vjCnDicbepUhKD38fZprokZqqTBRwPoZ0s4gVmSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697975859; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mh2TxfTxz7YEQDdrp4VXQgYGpwXWkX0LmAutcHISj54=; b=a9aW7QO7nGP8ecRSr+wDFiSTvfRTiZPkV0FxEKCEzkESifiEi6SznpTkGxCXT+qKzbu6sZ oFTr9IAfhPR1jJLfmKBW0B7HRgsl5U/V5TSdiam/3H310FWsCAT9p96lvapwRYOLLqkD+W uxDOH9aZNm11/5LL+AapStlHOy2cwc2YY03rKRDX98AA+d6ZR9m5araNefc0bOviQuqPzY xl8wu+Drs/4XFP6Qili9UUSnJatoaTlWFFUrTYTcjb9U974sVc0q7z6OUnbnu6cynm34lG GY5qteCCgylVEiWrpCBYQW86FmJgOv9TjLTLP2F7nquX+yGQMmaxlZmz7jN7qA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCxdv2XXrzwV9; Sun, 22 Oct 2023 11:57:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39MBvdOB015395; Sun, 22 Oct 2023 11:57:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39MBvdGU015392; Sun, 22 Oct 2023 11:57:39 GMT (envelope-from git) Date: Sun, 22 Oct 2023 11:57:39 GMT Message-Id: <202310221157.39MBvdGU015392@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: b80d4b2f93e5 - releng/14.0 - tty/teken: fix UTF8 sequence validation logic List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: b80d4b2f93e54b81041a518ea4c0a8be2985a658 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=b80d4b2f93e54b81041a518ea4c0a8be2985a658 commit b80d4b2f93e54b81041a518ea4c0a8be2985a658 Author: Bojan Novković AuthorDate: 2023-10-13 05:14:36 +0000 Commit: Christos Margiolis CommitDate: 2023-10-22 11:57:00 +0000 tty/teken: fix UTF8 sequence validation logic This patch fixes UTF-8 sequence validation logic in teken_utf8_bytes_to_codepoint() and fixes fallback behaviour in ttydisc_rubchar() when an invalid UTF8 sequence is encountered. The code previously used __bitcount() to extract sequence length information from the leading byte. However, this assumption breaks for certain code points that have additional bits set in the first half of the leading byte (e.g. Cyrillic characters). This lead to incorrect behaviour when deleting those characters using backspaces. The code now checks the number of consecutive set bits in the leading byte starting from the MSB, as per RFC 3629. Reviewed by: christos MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42147 (cherry picked from commit 2fed1c579c52d63b72fc08ffcc652ba0183f9254) Approved by: re (gjb) --- sys/kern/tty_ttydisc.c | 12 +++++++----- sys/teken/teken_wcwidth.h | 23 ++++++++++++++++++++--- 2 files changed, 27 insertions(+), 8 deletions(-) diff --git a/sys/kern/tty_ttydisc.c b/sys/kern/tty_ttydisc.c index eae7162e31c0..c46579cefbb1 100644 --- a/sys/kern/tty_ttydisc.c +++ b/sys/kern/tty_ttydisc.c @@ -844,23 +844,25 @@ ttydisc_rubchar(struct tty *tp) */ ttyinq_write(&tp->t_inq, bytes, UTF8_STACKBUF, 0); + ttyinq_unputchar(&tp->t_inq); } else { /* Find codepoint and width. */ codepoint = teken_utf8_bytes_to_codepoint(bytes, nb); - if (codepoint != - TEKEN_UTF8_INVALID_CODEPOINT) { - cwidth = teken_wcwidth( - codepoint); - } else { + if (codepoint == + TEKEN_UTF8_INVALID_CODEPOINT || + (cwidth = teken_wcwidth( + codepoint)) == -1) { /* * Place all bytes back into the * inq and fall back to * default behaviour. */ + cwidth = 1; ttyinq_write(&tp->t_inq, bytes, nb, 0); + ttyinq_unputchar(&tp->t_inq); } } tp->t_column -= cwidth; diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index bc40c23a6eb7..14af2c6f9530 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -128,15 +128,32 @@ static inline teken_char_t teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) { - /* Check for malformed characters. */ - if (__bitcount(bytes[0] & 0xf0) != nbytes) + /* + * Check for malformed characters by comparing 'nbytes' + * to the byte length of the character. + * + * The table in section 3 of RFC 3629 defines 4 different + * values indicating the length of a UTF-8 byte sequence. + * + * 0xxxxxxx -> 1 byte + * 110xxxxx -> 2 bytes + * 1110xxxx -> 3 bytes + * 11110xxx -> 4 bytes + * + * The length is determined by the higher-order bits in + * the leading octet (except in the first case, where an MSB + * of 0 means a byte length of 1). Here we flip the 4 upper + * bits and count the leading zeros using __builtin_clz() + * to determine the number of bytes. + */ + if (__builtin_clz(~(bytes[0] & 0xf0) << 24) != nbytes) return (TEKEN_UTF8_INVALID_CODEPOINT); switch (nbytes) { case 1: return (bytes[0] & 0x7f); case 2: - return (bytes[0] & 0xf) << 6 | (bytes[1] & 0x3f); + return (bytes[0] & 0x1f) << 6 | (bytes[1] & 0x3f); case 3: return (bytes[0] & 0xf) << 12 | (bytes[1] & 0x3f) << 6 | (bytes[2] & 0x3f); case 4: From nobody Sun Oct 22 11:57:40 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SCxdw5G6yz4xBrF; Sun, 22 Oct 2023 11:57: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 4SCxdw4HYLz3WQp; Sun, 22 Oct 2023 11:57:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697975860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yaTLKnlkJSSGTrlhH1a678kOc1CNgT43Vt4WfivNHvk=; b=bm2NhRGjYAbGAXirFS7ksD20BXbdtCGh034hwfMrCAwiN8TqQ/Y5JYjfNwhnVj3nZ1ekRn KxEzU+l2dysoVJAznVtRox+fueSQjVxLqRWmlGCno8/T71AuJR3273XX/zOU84mtC85MYW IL8LCBU4o+z+oOr0JX//ww6LUPfzOY6gG+rEwD7TClbrfDWXEe3rdG5TiIkMRyzdjd1FmE +IgZDC3FQ1qCAsqXYagcJ8Gy23LSHm8IDfAZqG0JsGKw1h/9oI78OLifa1dunlkCBgBr3T JV84MamnHy/k+vnjH9UM4sOQUHev6UofmcPEgrOnJSrq+si7BZbrN6j4qEnNzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697975860; a=rsa-sha256; cv=none; b=shkH/4jQlq9HX0PrWfSnEIzBIqPKzEfUe0blmaBXQEflyVKMgTS2BOAPZZTHTVr77/C8mi U7qihcu8B+bpU8FNnyk3VXPnzVLJmevdZiQb3A1caXFCzik4n7orlkeqVg55EYFRMyzMSd fo1Bta6fUt25z8OQ0Dqe7S7xHXs8RNLgLsc89jUh/xB/PJ0QFZ36QZaAD+US5Ngm5H68hn srk6A3TsvkqAbNok1I/aCnQlU54vnCsf6qU/xSU5yOJ5b6YTqtkU3RwPqFjWjBxK7LtBRE 7mT889uDWecghBHUhYEw31CEeFcIrnPgQWz1ShfbacCcuppKDxsMClmGrGUw0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697975860; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yaTLKnlkJSSGTrlhH1a678kOc1CNgT43Vt4WfivNHvk=; b=hmiAD+Q5bfQ8hH4Qgzy2l7YmDdUIa4GlQd81DgF724oaQpvoBVouLQ8s0wbP0Usj2zDGq5 5IRdwWboQTug0eJjs+rgWWihjmmHAkoyCQeYEVXrR5xXMGcZKstIPwnpKAHVjELsfB/VSj 6lPK/TowtmvowO8eMCJCFxzh9x0JHkZtmIxXM4mcM8f4NII/L0Lf9wKz4X0vIQUIGobPAv SI2qWvaStYs9ylEfZu+vNlHo4jdG4yqk2+C9NZbIOKdYdNrQ4XEdC0vxLEyOIFGIDY62AK 6ONjaiSBRr9PxVgzUkYPlx3fsh5uQyFGwyuPuo42AQV/wus5IZ++M3QL8YX4pQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SCxdw38pbzws0; Sun, 22 Oct 2023 11:57:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39MBvevQ015440; Sun, 22 Oct 2023 11:57:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39MBve5V015437; Sun, 22 Oct 2023 11:57:40 GMT (envelope-from git) Date: Sun, 22 Oct 2023 11:57:40 GMT Message-Id: <202310221157.39MBve5V015437@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Christos Margiolis Subject: git: f5951b13246a - releng/14.0 - teken: fix style in teken_wcwidth.h List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: f5951b13246a97824c481b66a0ad900c67f0a950 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=f5951b13246a97824c481b66a0ad900c67f0a950 commit f5951b13246a97824c481b66a0ad900c67f0a950 Author: Christos Margiolis AuthorDate: 2023-10-13 05:14:57 +0000 Commit: Christos Margiolis CommitDate: 2023-10-22 11:57:06 +0000 teken: fix style in teken_wcwidth.h Reviewed by: bojan.novkovic_fer.hr MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D42164 (cherry picked from commit 90367ba750bcbf3f9ac4609c3ec8df4ab95a22af) Approved by: re (gjb) --- sys/teken/teken_wcwidth.h | 265 +++++++++++++++++++++++----------------------- 1 file changed, 135 insertions(+), 130 deletions(-) diff --git a/sys/teken/teken_wcwidth.h b/sys/teken/teken_wcwidth.h index 14af2c6f9530..72df62704d73 100644 --- a/sys/teken/teken_wcwidth.h +++ b/sys/teken/teken_wcwidth.h @@ -11,112 +11,118 @@ #define TEKEN_UTF8_INVALID_CODEPOINT -1 struct interval { - teken_char_t first; - teken_char_t last; + teken_char_t first; + teken_char_t last; }; -/* auxiliary function for binary search in interval table */ -static inline int bisearch(teken_char_t ucs, const struct interval *table, int max) { - int min = 0; - int mid; +/* Auxiliary function for binary search in interval table */ +static inline int +bisearch(teken_char_t ucs, const struct interval *table, int max) +{ + int min = 0; + int mid; - if (ucs < table[0].first || ucs > table[max].last) - return 0; - while (max >= min) { - mid = (min + max) / 2; - if (ucs > table[mid].last) - min = mid + 1; - else if (ucs < table[mid].first) - max = mid - 1; - else - return 1; - } + if (ucs < table[0].first || ucs > table[max].last) + return (0); + while (max >= min) { + mid = (min + max) / 2; + if (ucs > table[mid].last) + min = mid + 1; + else if (ucs < table[mid].first) + max = mid - 1; + else + return (1); + } - return 0; + return (0); } -static inline int teken_wcwidth(teken_char_t ucs) +static inline int +teken_wcwidth(teken_char_t ucs) { - /* sorted list of non-overlapping intervals of non-spacing characters */ - /* generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" */ - static const struct interval combining[] = { - { 0x0300, 0x036F }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 }, - { 0x0591, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 }, - { 0x05C4, 0x05C5 }, { 0x05C7, 0x05C7 }, { 0x0600, 0x0603 }, - { 0x0610, 0x0615 }, { 0x064B, 0x065E }, { 0x0670, 0x0670 }, - { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED }, - { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A }, - { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, { 0x0901, 0x0902 }, - { 0x093C, 0x093C }, { 0x0941, 0x0948 }, { 0x094D, 0x094D }, - { 0x0951, 0x0954 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 }, - { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD }, - { 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C }, - { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D }, - { 0x0A70, 0x0A71 }, { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC }, - { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD }, - { 0x0AE2, 0x0AE3 }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C }, - { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, { 0x0B4D, 0x0B4D }, - { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 }, { 0x0BC0, 0x0BC0 }, - { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 }, - { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0CBC, 0x0CBC }, - { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD }, - { 0x0CE2, 0x0CE3 }, { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D }, - { 0x0DCA, 0x0DCA }, { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 }, - { 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E }, - { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC }, - { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 }, - { 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E }, - { 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 }, - { 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 }, - { 0x1032, 0x1032 }, { 0x1036, 0x1037 }, { 0x1039, 0x1039 }, - { 0x1058, 0x1059 }, { 0x1160, 0x11FF }, { 0x135F, 0x135F }, - { 0x1712, 0x1714 }, { 0x1732, 0x1734 }, { 0x1752, 0x1753 }, - { 0x1772, 0x1773 }, { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD }, - { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD }, - { 0x180B, 0x180D }, { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 }, - { 0x1927, 0x1928 }, { 0x1932, 0x1932 }, { 0x1939, 0x193B }, - { 0x1A17, 0x1A18 }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 }, - { 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, { 0x1B42, 0x1B42 }, - { 0x1B6B, 0x1B73 }, { 0x1DC0, 0x1DCA }, { 0x1DFE, 0x1DFF }, - { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2063 }, - { 0x206A, 0x206F }, { 0x20D0, 0x20EF }, { 0x302A, 0x302F }, - { 0x3099, 0x309A }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B }, - { 0xA825, 0xA826 }, { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F }, - { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB }, - { 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F }, - { 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x1D167, 0x1D169 }, - { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD }, - { 0x1D242, 0x1D244 }, { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F }, - { 0xE0100, 0xE01EF } - }; - - /* test for 8-bit control characters */ - if (ucs == 0) - return 0; - if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0)) - return -1; + /* + * Sorted list of non-overlapping intervals of non-spacing characters. + * Generated by "uniset +cat=Me +cat=Mn +cat=Cf -00AD +1160-11FF +200B c" + */ + static const struct interval combining[] = { + { 0x0300, 0x036F }, { 0x0483, 0x0486 }, { 0x0488, 0x0489 }, + { 0x0591, 0x05BD }, { 0x05BF, 0x05BF }, { 0x05C1, 0x05C2 }, + { 0x05C4, 0x05C5 }, { 0x05C7, 0x05C7 }, { 0x0600, 0x0603 }, + { 0x0610, 0x0615 }, { 0x064B, 0x065E }, { 0x0670, 0x0670 }, + { 0x06D6, 0x06E4 }, { 0x06E7, 0x06E8 }, { 0x06EA, 0x06ED }, + { 0x070F, 0x070F }, { 0x0711, 0x0711 }, { 0x0730, 0x074A }, + { 0x07A6, 0x07B0 }, { 0x07EB, 0x07F3 }, { 0x0901, 0x0902 }, + { 0x093C, 0x093C }, { 0x0941, 0x0948 }, { 0x094D, 0x094D }, + { 0x0951, 0x0954 }, { 0x0962, 0x0963 }, { 0x0981, 0x0981 }, + { 0x09BC, 0x09BC }, { 0x09C1, 0x09C4 }, { 0x09CD, 0x09CD }, + { 0x09E2, 0x09E3 }, { 0x0A01, 0x0A02 }, { 0x0A3C, 0x0A3C }, + { 0x0A41, 0x0A42 }, { 0x0A47, 0x0A48 }, { 0x0A4B, 0x0A4D }, + { 0x0A70, 0x0A71 }, { 0x0A81, 0x0A82 }, { 0x0ABC, 0x0ABC }, + { 0x0AC1, 0x0AC5 }, { 0x0AC7, 0x0AC8 }, { 0x0ACD, 0x0ACD }, + { 0x0AE2, 0x0AE3 }, { 0x0B01, 0x0B01 }, { 0x0B3C, 0x0B3C }, + { 0x0B3F, 0x0B3F }, { 0x0B41, 0x0B43 }, { 0x0B4D, 0x0B4D }, + { 0x0B56, 0x0B56 }, { 0x0B82, 0x0B82 }, { 0x0BC0, 0x0BC0 }, + { 0x0BCD, 0x0BCD }, { 0x0C3E, 0x0C40 }, { 0x0C46, 0x0C48 }, + { 0x0C4A, 0x0C4D }, { 0x0C55, 0x0C56 }, { 0x0CBC, 0x0CBC }, + { 0x0CBF, 0x0CBF }, { 0x0CC6, 0x0CC6 }, { 0x0CCC, 0x0CCD }, + { 0x0CE2, 0x0CE3 }, { 0x0D41, 0x0D43 }, { 0x0D4D, 0x0D4D }, + { 0x0DCA, 0x0DCA }, { 0x0DD2, 0x0DD4 }, { 0x0DD6, 0x0DD6 }, + { 0x0E31, 0x0E31 }, { 0x0E34, 0x0E3A }, { 0x0E47, 0x0E4E }, + { 0x0EB1, 0x0EB1 }, { 0x0EB4, 0x0EB9 }, { 0x0EBB, 0x0EBC }, + { 0x0EC8, 0x0ECD }, { 0x0F18, 0x0F19 }, { 0x0F35, 0x0F35 }, + { 0x0F37, 0x0F37 }, { 0x0F39, 0x0F39 }, { 0x0F71, 0x0F7E }, + { 0x0F80, 0x0F84 }, { 0x0F86, 0x0F87 }, { 0x0F90, 0x0F97 }, + { 0x0F99, 0x0FBC }, { 0x0FC6, 0x0FC6 }, { 0x102D, 0x1030 }, + { 0x1032, 0x1032 }, { 0x1036, 0x1037 }, { 0x1039, 0x1039 }, + { 0x1058, 0x1059 }, { 0x1160, 0x11FF }, { 0x135F, 0x135F }, + { 0x1712, 0x1714 }, { 0x1732, 0x1734 }, { 0x1752, 0x1753 }, + { 0x1772, 0x1773 }, { 0x17B4, 0x17B5 }, { 0x17B7, 0x17BD }, + { 0x17C6, 0x17C6 }, { 0x17C9, 0x17D3 }, { 0x17DD, 0x17DD }, + { 0x180B, 0x180D }, { 0x18A9, 0x18A9 }, { 0x1920, 0x1922 }, + { 0x1927, 0x1928 }, { 0x1932, 0x1932 }, { 0x1939, 0x193B }, + { 0x1A17, 0x1A18 }, { 0x1B00, 0x1B03 }, { 0x1B34, 0x1B34 }, + { 0x1B36, 0x1B3A }, { 0x1B3C, 0x1B3C }, { 0x1B42, 0x1B42 }, + { 0x1B6B, 0x1B73 }, { 0x1DC0, 0x1DCA }, { 0x1DFE, 0x1DFF }, + { 0x200B, 0x200F }, { 0x202A, 0x202E }, { 0x2060, 0x2063 }, + { 0x206A, 0x206F }, { 0x20D0, 0x20EF }, { 0x302A, 0x302F }, + { 0x3099, 0x309A }, { 0xA806, 0xA806 }, { 0xA80B, 0xA80B }, + { 0xA825, 0xA826 }, { 0xFB1E, 0xFB1E }, { 0xFE00, 0xFE0F }, + { 0xFE20, 0xFE23 }, { 0xFEFF, 0xFEFF }, { 0xFFF9, 0xFFFB }, + { 0x10A01, 0x10A03 }, { 0x10A05, 0x10A06 }, { 0x10A0C, 0x10A0F }, + { 0x10A38, 0x10A3A }, { 0x10A3F, 0x10A3F }, { 0x1D167, 0x1D169 }, + { 0x1D173, 0x1D182 }, { 0x1D185, 0x1D18B }, { 0x1D1AA, 0x1D1AD }, + { 0x1D242, 0x1D244 }, { 0xE0001, 0xE0001 }, { 0xE0020, 0xE007F }, + { 0xE0100, 0xE01EF } + }; - /* binary search in table of non-spacing characters */ - if (bisearch(ucs, combining, - sizeof(combining) / sizeof(struct interval) - 1)) - return 0; + /* Test for 8-bit control characters */ + if (ucs == 0) + return (0); + if (ucs < 32 || (ucs >= 0x7f && ucs < 0xa0)) + return (-1); - /* if we arrive here, ucs is not a combining or C0/C1 control character */ + /* Binary search in table of non-spacing characters */ + if (bisearch(ucs, combining, sizeof(combining) / + sizeof(struct interval) - 1)) + return (0); - return 1 + - (ucs >= 0x1100 && - (ucs <= 0x115f || /* Hangul Jamo init. consonants */ - ucs == 0x2329 || ucs == 0x232a || - (ucs >= 0x2e80 && ucs <= 0xa4cf && - ucs != 0x303f) || /* CJK ... Yi */ - (ucs >= 0xac00 && ucs <= 0xd7a3) || /* Hangul Syllables */ - (ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */ - (ucs >= 0xfe10 && ucs <= 0xfe19) || /* Vertical forms */ - (ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */ - (ucs >= 0xff00 && ucs <= 0xff60) || /* Fullwidth Forms */ - (ucs >= 0xffe0 && ucs <= 0xffe6) || - (ucs >= 0x20000 && ucs <= 0x2fffd) || - (ucs >= 0x30000 && ucs <= 0x3fffd))); + /* + * If we arrive here, ucs is not a combining or C0/C1 control character + */ + return (1 + + (ucs >= 0x1100 && + (ucs <= 0x115f || /* Hangul Jamo init. consonants */ + ucs == 0x2329 || ucs == 0x232a || + (ucs >= 0x2e80 && ucs <= 0xa4cf && + ucs != 0x303f) || /* CJK ... Yi */ + (ucs >= 0xac00 && ucs <= 0xd7a3) || /* Hangul Syllables */ + (ucs >= 0xf900 && ucs <= 0xfaff) || /* CJK Compatibility Ideographs */ + (ucs >= 0xfe10 && ucs <= 0xfe19) || /* Vertical forms */ + (ucs >= 0xfe30 && ucs <= 0xfe6f) || /* CJK Compatibility Forms */ + (ucs >= 0xff00 && ucs <= 0xff60) || /* Fullwidth Forms */ + (ucs >= 0xffe0 && ucs <= 0xffe6) || + (ucs >= 0x20000 && ucs <= 0x2fffd) || + (ucs >= 0x30000 && ucs <= 0x3fffd)))); } /* @@ -127,39 +133,38 @@ static inline int teken_wcwidth(teken_char_t ucs) static inline teken_char_t teken_utf8_bytes_to_codepoint(uint8_t bytes[4], int nbytes) { + /* + * Check for malformed characters by comparing 'nbytes' to the byte + * length of the character. + * + * The table in section 3 of RFC 3629 defines 4 different values + * indicating the length of a UTF-8 byte sequence. + * + * 0xxxxxxx -> 1 byte + * 110xxxxx -> 2 bytes + * 1110xxxx -> 3 bytes + * 11110xxx -> 4 bytes + * + * The length is determined by the higher-order bits in the leading + * octet (except in the first case, where an MSB of 0 means a byte + * length of 1). Here we flip the 4 upper bits and count the leading + * zeros using __builtin_clz() to determine the number of bytes. + */ + if (__builtin_clz(~(bytes[0] & 0xf0) << 24) != nbytes) + return (TEKEN_UTF8_INVALID_CODEPOINT); - /* - * Check for malformed characters by comparing 'nbytes' - * to the byte length of the character. - * - * The table in section 3 of RFC 3629 defines 4 different - * values indicating the length of a UTF-8 byte sequence. - * - * 0xxxxxxx -> 1 byte - * 110xxxxx -> 2 bytes - * 1110xxxx -> 3 bytes - * 11110xxx -> 4 bytes - * - * The length is determined by the higher-order bits in - * the leading octet (except in the first case, where an MSB - * of 0 means a byte length of 1). Here we flip the 4 upper - * bits and count the leading zeros using __builtin_clz() - * to determine the number of bytes. - */ - if (__builtin_clz(~(bytes[0] & 0xf0) << 24) != nbytes) - return (TEKEN_UTF8_INVALID_CODEPOINT); - - switch (nbytes) { - case 1: - return (bytes[0] & 0x7f); - case 2: - return (bytes[0] & 0x1f) << 6 | (bytes[1] & 0x3f); - case 3: - return (bytes[0] & 0xf) << 12 | (bytes[1] & 0x3f) << 6 | (bytes[2] & 0x3f); - case 4: - return (bytes[0] & 0x7) << 18 | (bytes[1] & 0x3f) << 12 | - (bytes[2] & 0x3f) << 6 | (bytes[3] & 0x3f); - default: - return (TEKEN_UTF8_INVALID_CODEPOINT); - } + switch (nbytes) { + case 1: + return (bytes[0] & 0x7f); + case 2: + return (bytes[0] & 0x1f) << 6 | (bytes[1] & 0x3f); + case 3: + return (bytes[0] & 0xf) << 12 | (bytes[1] & 0x3f) << 6 | + (bytes[2] & 0x3f); + case 4: + return (bytes[0] & 0x7) << 18 | (bytes[1] & 0x3f) << 12 | + (bytes[2] & 0x3f) << 6 | (bytes[3] & 0x3f); + default: + return (TEKEN_UTF8_INVALID_CODEPOINT); + } } From nobody Sun Oct 22 15:04:47 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SD1nq46fHz4xR4T; Sun, 22 Oct 2023 15:04: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 4SD1nq3Zw2z4Lvm; Sun, 22 Oct 2023 15:04:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697987087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JS6em8wa5TN3H3zLI+nJsDYyYUS01dkEdLMERT3ZnXo=; b=eOEPC4jVTrXfmb09H9DClyBZCvsEcBpQYtZ0nKVllHwHuXctjzoyCmsqOaQEiafvtCmkZN sM23HL+6kXy9oymwn3pEIgnXmaUVPvQZ6vIAW44YsuGWjwXyxpQQTx1pt39Z7VMiuy9AHN o6E1G65wa1SAJNusSz8COZ/4GF10GFdVwB/qVfBOgQcUAZShST6u4X+vwryHeeUiPkp/C6 MYTlIL42kztGKUSkOOfmNmPH++xfUG4/PtQZM3HfDPGTr6jUpLB1bDv7EH749kMzp9vSmj SdqEo3vIL1m0ZhysuLpN7c+YKaeyGUT4GQ1ZfJ2pyjAPMSCXW1aiLApDvVczNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697987087; a=rsa-sha256; cv=none; b=LLA2PThIwgKvenrtSm5049AbG0fxcRUdkBoC92NeUFs/aFWzgCt6WSfskmOs8KJQMz5o1Z gEzr9Sl/PBENmC6abWhy0kEShzittNhnpFEtAmWCheE83KYwZhBTSRlQl/DY/yoqHhcvgc hZUpnlTaD4RmZemQE9y/KrkqbVF0yx8OBRGnugXGVSa06SCj0Y5NaFKsD76wn4+kTfu9Ih F94m7qlEzav/0zBks1m2yNl41zWXyqZMotCM8WLPJGipk2skzxFoKMqphoPtw4TUQ7TXMA pC35k9v4U5kwgAMXuVDiDE9g9fYrkwQJV2hijE3Ojm1ONkF7Ht/CUESP65+Uvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697987087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JS6em8wa5TN3H3zLI+nJsDYyYUS01dkEdLMERT3ZnXo=; b=VvMedqk3pfYLl1CyGLredW9ZnilL4w0BSQBw/BAv2br1rwfXFZcIixz6nBo3tn799U0LsH sapbPz445W/7v9rbOipRvV4iGYI1huYNPCeENAbhzUfJy6SsEW7BnUl8uxnsmtsuLYK02K 9QaysdJY3C5E6sEoQ/f/ZOoM6ONyp7XKfyW0cIW8X/usr4iZTJAKIpJ9oehV6hSeytNoyO gtx/mQtvtV802nODKxOx6x0v2N5gOoSWSrwIMZ/ZzfelkoDYpV4TO5HX316TGoP2JAstzo 2YUvn8I2YgeS9sUKaf1vF+G5QdRbpNXxzlxDB6IIPGckOJMGOYFoa4rvxWPJqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SD1nq2fxRz12Cj; Sun, 22 Oct 2023 15:04:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39MF4loS033550; Sun, 22 Oct 2023 15:04:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39MF4lJu033547; Sun, 22 Oct 2023 15:04:47 GMT (envelope-from git) Date: Sun, 22 Oct 2023 15:04:47 GMT Message-Id: <202310221504.39MF4lJu033547@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: 41d1dc7005f0 - releng/14.0 - kmsan: Set -fno-sanitize-memory-param-retval for now List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14.0 X-Git-Reftype: branch X-Git-Commit: 41d1dc7005f010074c1e6f7fc8adf44dcbd473cf Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=41d1dc7005f010074c1e6f7fc8adf44dcbd473cf commit 41d1dc7005f010074c1e6f7fc8adf44dcbd473cf Author: Mark Johnston AuthorDate: 2023-10-16 19:45:42 +0000 Commit: Mark Johnston CommitDate: 2023-10-22 15:01:26 +0000 kmsan: Set -fno-sanitize-memory-param-retval for now As of LLVM 16, -fsanitize-memory-param-retval is the default. It yields significantly smaller code, but the KMSAN runtime interceptors need to be updated to stop checking shadow state of parameters. Apply a minimal workaround for now. Approved by: re (gjb) MFC after: 3 days Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. (cherry picked from commit b6c653c9746342b373af01979319b3cb123b2872) (cherry picked from commit c89523d1c4be8f3408fb591261f3093b65dbb675) --- sys/conf/files | 2 +- sys/conf/kern.pre.mk | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/sys/conf/files b/sys/conf/files index 8d38b9cc8a2e..b9763d167812 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3871,7 +3871,7 @@ kern/subr_mchain.c optional libmchain kern/subr_memdesc.c standard kern/subr_module.c standard kern/subr_msan.c optional kmsan \ - compile-with "${NORMAL_C:N-fsanitize*:N-fstack-protector*}" + compile-with "${NORMAL_C:N-fsanitize*:N-fno-sanitize*:N-fstack-protector*}" kern/subr_msgbuf.c standard kern/subr_param.c standard kern/subr_pcpu.c standard diff --git a/sys/conf/kern.pre.mk b/sys/conf/kern.pre.mk index 4d37cd4156f0..158175eb6899 100644 --- a/sys/conf/kern.pre.mk +++ b/sys/conf/kern.pre.mk @@ -122,8 +122,11 @@ SAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kcsan \ KMSAN_ENABLED!= grep KMSAN opt_global.h || true ; echo .if !empty(KMSAN_ENABLED) +# Disable -fno-sanitize-memory-param-retval until interceptors have been +# updated to work properly with it. SAN_CFLAGS+= -DSAN_NEEDS_INTERCEPTORS -DSAN_INTERCEPTOR_PREFIX=kmsan \ - -fsanitize=kernel-memory + -fsanitize=kernel-memory \ + -fno-sanitize-memory-param-retval .endif KUBSAN_ENABLED!= grep KUBSAN opt_global.h || true ; echo From nobody Sun Oct 22 15:04:48 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SD1nr5392z4xQxK; Sun, 22 Oct 2023 15:04: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 4SD1nr4Cp6z4Ly8; Sun, 22 Oct 2023 15:04:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697987088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v0/U0zFU9pelTb+lC5sjpit2EHUhvbKeavxoSLNfvOM=; b=EmFn+t0AKXLlfF3NJg63nZIjWZ06PqnVtY5Oz1hhOjHO4+fMStBEz2juQ/wBWKbw9iZ7km 3qm1caNzjAfTKALaF8ARaE/vvuxIUdtNQVlm0kDr/Y9cLHplnTau8sGNkVYSQ1Trk1PQ6F kNUtgWGr5XSAlf+uytu5QdLRLguexjRdq6JyEA/bIuE/VXooEfhp79+lHJNJiAQC9sdyft gVjJaNNKb0YPNWpxdtFXqkywxH4f8OJBTRA9jWiMSlWDI65C1NANR4cwmXerGn7+Wii3pL 5ljFyf0hbYEmTaUSf3fOxs6Bl73BGDacwuAfpMWN+BNmqZbiK/N+clAD8MTLlA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697987088; a=rsa-sha256; cv=none; b=QePwuXb9UDvcJMdQvcChOKSS0tB6AUC69QeNyJp5h9ZkzoEmCM4gf4QV56VssMBZUQ7fAH iK6P8uS8PJ/juuM11JIYw9xU/X5i/7y7DDLnATh7Bc08a7D4FKnbqg3c+LoExLlkfFBTR4 ZinvmgEfRPoWsnaq8fYa94jRseCR1LO53f/8FXR7TGLM/rzv2g28nPlKiyMpjN/6m20hoO VmBQhwm27v7WMvZBeK49Cidh6eVPLN3s4lf/3ISWXsUTwCDDRxgJ1h5w7pp9/9Tu8fD7sI fZnK8we0lT8hja3KNNOFV7/ieJ1q1OSDeiN7FUioc2SOUw5MGmYKUu+pIIg3tQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697987088; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=v0/U0zFU9pelTb+lC5sjpit2EHUhvbKeavxoSLNfvOM=; b=woGoIw/qd/3Bz49Y//SQhnOIWnrMeHXFY50S/XKaNBTiI865Xs7ZrjLO8FzKX7FgIRe0Fh E8u6CJ2XXUt+jeyhUf4jKjnQ6+93KGXQf3XfVGbBn/IC6A8F9CVDELrNv7qhjZH9p1LuiR RlVdxxUt9GS09p5MrZ4NhIvFrnG3EZHPRtFMOti5eOxvZT1c0Wf+BaqQgMnMFMEPN5MRfP WWpB0seGwxprkmXTs3TTHOZY5uEGtuFbmwVruovWNqKjCNv5TVxj4pGM0dQUMszTPsV91C 7q7KGnJQH1KRkcDrc2101K7dPIMJwY7fet0EC6xDL5HqIV9chI0dyvAMpKwHgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SD1nr377tz11w6; Sun, 22 Oct 2023 15:04:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39MF4mGH033595; Sun, 22 Oct 2023 15:04:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39MF4mr2033592; Sun, 22 Oct 2023 15:04:48 GMT (envelope-from git) Date: Sun, 22 Oct 2023 15:04:48 GMT Message-Id: <202310221504.39MF4mr2033592@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: 315dd7f2e12a - releng/14.0 - ktrace: Handle uio_resid underflow via MSG_TRUNC List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14.0 X-Git-Reftype: branch X-Git-Commit: 315dd7f2e12a21e47da75f0ce8c1c5a1611810b8 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=315dd7f2e12a21e47da75f0ce8c1c5a1611810b8 commit 315dd7f2e12a21e47da75f0ce8c1c5a1611810b8 Author: Mark Johnston AuthorDate: 2023-10-16 20:11:55 +0000 Commit: Mark Johnston CommitDate: 2023-10-22 15:01:31 +0000 ktrace: Handle uio_resid underflow via MSG_TRUNC When recvmsg(2) is used with MSG_TRUNC on an atomic socket type (DGRAM or SEQPACKET), soreceive_generic() and uipc_peek_dgram() may intentionally underflow uio_resid so that userspace can find out how many bytes it should have asked for. If this happens, and KTR_GENIO is enabled, ktrgenio() will attempt to copy in beyond the end of the output buffer's iovec. In general this will silently cause the ktrace operation to fail since it'll result in EFAULT from uiomove(). Let's be more careful and make sure not to try and copy more bytes than we have. Approved by: re (gjb) Fixes: be1f485d7d6b ("sockets: add MSG_TRUNC flag handling for recvfrom()/recvmsg().") Reported by: syzbot+30b4bb0c0bc0f53ac198@syzkaller.appspotmail.com Reviewed by: kib MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42099 (cherry picked from commit 761ae1ce798add862d78728cc5ac5240ce7db779) (cherry picked from commit eb965d4f0309514893745e6cfae998495e76d941) --- sys/kern/uipc_syscalls.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index 2dad9d487290..c7c2e6544902 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -948,7 +948,8 @@ kern_recvit(struct thread *td, int s, struct msghdr *mp, enum uio_seg fromseg, AUDIT_ARG_SOCKADDR(td, AT_FDCWD, fromsa); #ifdef KTRACE if (ktruio != NULL) { - ktruio->uio_resid = len - auio.uio_resid; + /* MSG_TRUNC can trigger underflow of uio_resid. */ + ktruio->uio_resid = MIN(len - auio.uio_resid, len); ktrgenio(s, UIO_READ, ktruio, error); } #endif From nobody Sun Oct 22 15:04:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SD1nt2Vwrz4xR1t; Sun, 22 Oct 2023 15:04: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 4SD1ns5T9yz4M1g; Sun, 22 Oct 2023 15:04:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697987089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ym7FCM7+7H4HGRV1Re3OzvfWsrZvgeLuAZbZ25Ci8sU=; b=ZQDLeU4oVNPrYom0jzdGAPTPUgf7/wP7dN0g3zj1lNCA6uueeKw83ngr2yZ9q0UHVitgwp teQXNkupYZTaazrQJKxUctzaeT3E/PVgY4WTy5yI3tZrfDo3x0rPdZqY9aoCqYlTJDlAH0 pQhkdbIuhIkvmGbsbaYreQnycrg2NnSSKHZv82bqK8ujtSeQmc8WLlistxM17+OUVwyPa5 k+LjF28MppbpXKEFAUfmxuAkmsDDHqKHZDskgYi2F7s2RDihHutZkWcqVUD50Z1KFBduzZ T6z/xgVCb5DUnkbkv8kaIHG/KxifKbWqof8WioPGxGMM76mrNMKdvqrqlaCDUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697987089; a=rsa-sha256; cv=none; b=OGzbBiH0hfd2iKSbi7OvkZNXGTk5ONp8QkbETVf8a2tOwf+u3/yNoMmDW67j2GX5aqsPEr rP4jeYJLotIj+qGJPc6yJjbPs5Xrve5GPIvPjjwuUeeNh7h/g3FXNzxDjjwp1JlWV7DvQP 1HN+A++eZ/yqcjo424wbz4k2FAeEC8zTTjVeCDKoh7TVZRc5y9g5uEd3a/j4j1tlSxH38q 9YnP+3YdS2nvYUWBsAddzFXzJ/r/k1ihs7TmfECjYcdeA7blMeA+rYV3kFeJIGyyi+kswp we8zGDWiyKrnSa6jyk00WqITEpPZq54nYqnqEGg0cQ1un4yt1fzUYEgyKmQaaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697987089; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ym7FCM7+7H4HGRV1Re3OzvfWsrZvgeLuAZbZ25Ci8sU=; b=UzzFfkwmgiOVkXrYyYz2kfNeuDCYvDdmZVfRk8Gc6NI2XJZ7Kfcr7mJvNsiiuCulyN30pp AhSyns1w7Go2UalT5XFkE7VM9cn92TYKw5EYoAV3nLlqX7DH14L7t0UIP8gf44A3bFqRjH ++gmVVXVkzbmd6wN/8RP8hAYqYb43XgePnYbNToc0o8wnx5SuIfVK5MeVYyncITeIelBuV TqLRLWZRXA55beOyBDTydM3tMqTSGI+r7mKDkJjOgzMY1bAWEJg7gGbA9GSgv2zDeWGZWU Pqn2QrM5iO8tK/clBTlKl4nzmm4sx1/UIXXnKEsRgpomohBrahBXDBa1BvXJEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SD1ns4NcWz12Ck; Sun, 22 Oct 2023 15:04:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39MF4nhO033639; Sun, 22 Oct 2023 15:04:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39MF4nrs033636; Sun, 22 Oct 2023 15:04:49 GMT (envelope-from git) Date: Sun, 22 Oct 2023 15:04:49 GMT Message-Id: <202310221504.39MF4nrs033636@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: e4d86dda3413 - releng/14.0 - amd64: Zero-fill AP PCPU pages List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14.0 X-Git-Reftype: branch X-Git-Commit: e4d86dda34133fdeb8674fc8774be3c311a374b1 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e4d86dda34133fdeb8674fc8774be3c311a374b1 commit e4d86dda34133fdeb8674fc8774be3c311a374b1 Author: Mark Johnston AuthorDate: 2023-10-16 22:40:21 +0000 Commit: Mark Johnston CommitDate: 2023-10-22 15:01:36 +0000 amd64: Zero-fill AP PCPU pages At least KMSAN relies on zero-initialization of AP PCPU regions, see commit 4b136ef259ce. Prior to commit af1c6d3f3013 these were allocated with allocpages() in the amd64 pmap, which always returns zero-initialized memory. Approved by: re (gjb) Reviewed by: kib Fixes: af1c6d3f3013 ("amd64: do not leak pcpu pages") MFC after: 3 days Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. Differential Revision: https://reviews.freebsd.org/D42241 (cherry picked from commit a37e484d049758c70f2d61be0d28a115b6f2f01e) (cherry picked from commit 4533fa42ad912537a15d72068f2cfca46a465521) --- sys/amd64/amd64/mp_machdep.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/mp_machdep.c b/sys/amd64/amd64/mp_machdep.c index ec4501c3aeed..d506ffada4b9 100644 --- a/sys/amd64/amd64/mp_machdep.c +++ b/sys/amd64/amd64/mp_machdep.c @@ -300,11 +300,12 @@ amd64_mp_alloc_pcpu(void) m = NULL; if (vm_ndomains > 1) { m = vm_page_alloc_noobj_domain( - acpi_pxm_get_cpu_locality(cpu_apic_ids[cpu]), 0); + acpi_pxm_get_cpu_locality(cpu_apic_ids[cpu]), + VM_ALLOC_ZERO); } if (m == NULL) #endif - m = vm_page_alloc_noobj(0); + m = vm_page_alloc_noobj(VM_ALLOC_ZERO); if (m == NULL) panic("cannot alloc pcpu page for cpu %d", cpu); pmap_qenter((vm_offset_t)&__pcpu[cpu], &m, 1); From nobody Sun Oct 22 18:11:05 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SD5wn33M8z4xdPw; Sun, 22 Oct 2023 18:11: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 4SD5wn2Z5qz4jql; Sun, 22 Oct 2023 18:11:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697998265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=67/052OdsMRcVlMwMV9lywEhymtMgpKyRIkrkQrtRLU=; b=UUSWrUzyI0fhW+2dje2WXqwegig4F+6iU9POfsTqbHp30rvBceBM76k5FUdZJpCQLFsiik kGXJmnGvvDP29ClCI9n//ElI8aOEO+weqcj54Eel4LlViUqUsjzjrb+52TOThDe5lL27mB uQei85wP5W5YQ2oTsOO6doR6l242bha0kRGN3ScK2h+IRJc325zILsQZrFL61gZctO1rjx FgWVmXeJJq5mgpKtCInfe4qUi9kIjkog+6umCsMyJ4fR+2/WxG14wmiNxiBFzwKnWQS36r 92wpG1esAWkOdATqtkORAklN5Xs2i3mJfNqp1T/jYLyxdHZ1Zs34W+V7+KcMWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1697998265; a=rsa-sha256; cv=none; b=uwMZ/P6a88HLIJwiMm3U72uQvJm63mVkqGPA/bKwHkvXvJouqr6RBtQB86v54dvGNHuxO+ vqC/Km4cc5BcWI2EodFyMNA8a9eI2H1xcNV90QhrqBV3/ujoTXE+vruG1QQixL9CWaYPjb iQFhAaDuWRyomi4CsROM79N0ENDFfcqAqkW/w0cHovyG7NU30Cyd8w9cNUnsS5bbqqFCgS 2FNnNTwRF6F0kO54RveZKJg+eqoyo6O1JFL+FUCAia2svUx3r8CR50qG8IonRJIf11wXtB Jr/HxR6umH9skUJKaBsjhlUyRsyB8+M4MSUMDryt7CYcrVN+gidEB8Q1vxe/8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1697998265; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=67/052OdsMRcVlMwMV9lywEhymtMgpKyRIkrkQrtRLU=; b=EaSPz3WngEjnefhGf/Ssmuc2OBsTfW/XAKfrm1CLUv8WfTiKl8y4Kgts4XfxvK8bl6Mohc F2iAQC1jTXpKBrtq6zAgRs9dzVXqUzgfSjTvVuvVNF/siA1JGPtTKLXRiXQEcfY9dnQA8+ pfgrJ9UoyVtir6bEa1UKsdY4LzLzrbbA/EmcKKKxnHa1BoCelz0QQqIHMvvrJKTdQ+fnB8 /20fF267Toz+6ol0wysAr7f6epV/MSaOtDwzEtLVixDAUiBdccHuRs/GXQz1kcOzrWEIiE jMTBzLrnLUUju9CjW7QUJlQD6akTdHCemJa9B/fzGcqXWPVJ59xxdOXBWi9yfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SD5wn1fb9z16vV; Sun, 22 Oct 2023 18:11:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39MIB5LK045862; Sun, 22 Oct 2023 18:11:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39MIB5fr045859; Sun, 22 Oct 2023 18:11:05 GMT (envelope-from git) Date: Sun, 22 Oct 2023 18:11:05 GMT Message-Id: <202310221811.39MIB5fr045859@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: ed1535b37cc4 - stable/14 - Add WITHOUT_MANSPLITPKG description List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: ed1535b37cc476720e2bf0017afea6f927dc030f Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ed1535b37cc476720e2bf0017afea6f927dc030f commit ed1535b37cc476720e2bf0017afea6f927dc030f Author: Ed Maste AuthorDate: 2023-09-16 15:28:28 +0000 Commit: Ed Maste CommitDate: 2023-10-22 18:10:50 +0000 Add WITHOUT_MANSPLITPKG description Fixes: 74da9c39c346 ("pkgbase: Split out manpages by default") Sponsored by: The FreeBSD Foundation (cherry picked from commit d3a9d605a8963b7833936fd9679b734871facab4) --- tools/build/options/WITHOUT_MANSPLITPKG | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/build/options/WITHOUT_MANSPLITPKG b/tools/build/options/WITHOUT_MANSPLITPKG new file mode 100644 index 000000000000..a9913308d411 --- /dev/null +++ b/tools/build/options/WITHOUT_MANSPLITPKG @@ -0,0 +1 @@ +Do not split man pages into their own packages during make package. From nobody Sun Oct 22 18:47:15 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SD6kX0n4Zz4xgfj; Sun, 22 Oct 2023 18:47: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 4SD6kX0DCpz4mHq; Sun, 22 Oct 2023 18:47:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698000436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5dpRTHTzWt5TxXAf3qddw9sEsUBwXcm9kPRLNCfaeVA=; b=tVbT+34o8IRsgjNb2FSw2hvF0KH8q3iqcDxDJ0NJVmU/TLrT9IT2u1vfDahveTETEEFYl7 UyQkEIYsz5P3irvBLuD5IWmJtF3jhpV6S/NxubgsVP6MvXBimdLzCAkU5hhmSt7D7DwCNB qG7aeJ6E+zZc6wE6NGV12nQoe7IXTs58rjP/vJJItLS82di3t9LKJ6jHfjQwjDzwyELbtx 6nKE/+FBcJ4ND/CaHU9pbupqNaXX0VMrjKdXB269L2nvrNgODhHz3ON2AEDb4k5KhyYEig j/hyxOVJytLL7AOz5tsBW3j5yvDq4/n3qlz5asd7gdf/374/W50qONgS45BjBw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698000436; a=rsa-sha256; cv=none; b=jVtWGCuCNCAu9+JhvGtf0gn185FWzn7FU62hkKRLo9g/Hf3itZhM9g9Ia/OVqNZOzhq6WN lvAX6Z070uMV+QSQSKU9Cpjy7N6pfV/vl6c7OHjmzXm/aK5XCR1HJg+2873ECeH29gGPCR tqpxCeszsyNlD7CaNzy1JscYRVDdgeMX89Zwx6XgczCBoAvV0//On8p0xCJWNMKeP1vEVR INuMiPoUOU/qDZHzRYuPfu1EqeydnBxnKHWEtyFlXMDCFdqJQICU6GP86y2qHQvX118S2O DaGcobT03ran2CSJ/Ghu+XNelc2tw40iV7KcKkPwPVkVANSXKrNKU/2CLVaukw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698000436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5dpRTHTzWt5TxXAf3qddw9sEsUBwXcm9kPRLNCfaeVA=; b=pyNEwHPWEywcAnqimbZPfa4067F8nzI4pcaVQdECpubMejITjWpOJ99w3i2abX6ALvr3rX gNaHJ9VNnXe35nBGFTP1TrB+TGmq/duHRiVHKBtVbVmmkC0esmUo7XwBVupCudGsT78pTU B83Z/o6qBNww4hYVlfBNHXtziMOjTq8tbcKEx2TrSH5GMvL6gXP7QGRcNVrJT+h9mYrjmD yv1oWi7h0Y3CiGGslg/aKCJQ6LcAJIxWnh/HqjmFYJ0FDeV6uyunGrozdmelOwxgsss4xZ R37CCTXbehGV+RKFBNgyx2AeIJ9AUJwh4xmCRJRx6mTwI1+E2oQ23r+bTFlmAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SD6kW6Hh7z17st; Sun, 22 Oct 2023 18:47:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39MIlFIZ000873; Sun, 22 Oct 2023 18:47:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39MIlFJI000870; Sun, 22 Oct 2023 18:47:15 GMT (envelope-from git) Date: Sun, 22 Oct 2023 18:47:15 GMT Message-Id: <202310221847.39MIlFJI000870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dmitry Chagin Subject: git: accbd5ad06c3 - releng/14.0 - vfs cache: Fallback to namei to resolve symlinks with leading / in target for non-native ABI List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: accbd5ad06c3eeb17d75cde05597f70f1fedb061 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by dchagin: URL: https://cgit.FreeBSD.org/src/commit/?id=accbd5ad06c3eeb17d75cde05597f70f1fedb061 commit accbd5ad06c3eeb17d75cde05597f70f1fedb061 Author: Dmitry Chagin AuthorDate: 2023-10-19 10:33:58 +0000 Commit: Dmitry Chagin CommitDate: 2023-10-22 18:46:22 +0000 vfs cache: Fallback to namei to resolve symlinks with leading / in target for non-native ABI This is a temporary solution to fix PR before release. During 15.0 it's necessary to refactor symlinks handling between vfs & namecache. Approved by: re (gjb) PR: 273414 Reported by: Vincent Milum Jr, Dan Kotowski, glebius Tested by: Dan Kotowski, glebius Reviewed by: Differential Revision: https://reviews.freebsd.org/D41806 MFC after: 3 days (cherry picked from commit bb8ecf259f96510b9c2146d846403393543061b7) (cherry picked from commit b84a836ef02de42e262ce44d46c859be288df4b0) --- sys/kern/vfs_cache.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/kern/vfs_cache.c b/sys/kern/vfs_cache.c index 115d0bdd3993..8917666950c1 100644 --- a/sys/kern/vfs_cache.c +++ b/sys/kern/vfs_cache.c @@ -5337,12 +5337,14 @@ cache_fplookup_symlink(struct cache_fpl *fpl) struct nameidata *ndp; struct componentname *cnp; struct vnode *dvp, *tvp; + struct pwd *pwd; int error; ndp = fpl->ndp; cnp = fpl->cnp; dvp = fpl->dvp; tvp = fpl->tvp; + pwd = *(fpl->pwd); if (cache_fpl_islastcn(ndp)) { if ((cnp->cn_flags & FOLLOW) == 0) { @@ -5398,6 +5400,9 @@ cache_fplookup_symlink(struct cache_fpl *fpl) cache_fpl_checkpoint(fpl); return (cache_fpl_partial(fpl)); } + if (__predict_false(pwd->pwd_adir != pwd->pwd_rdir)) { + return (cache_fpl_aborted(fpl)); + } } return (0); } From nobody Sun Oct 22 22:45:27 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDD1M51xwz4xwjq; Sun, 22 Oct 2023 22:45: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 4SDD1M3DPYz3TSR; Sun, 22 Oct 2023 22:45:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698014727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZZL9ojAZXhEeLcNG9JNlOknvL3c6Vnmkx7tWlnPNmFg=; b=Y8uRzSiNcYnFPdJDVd+0vMj7kzVzCxCmZBMb7i3AZkqhaYRsOVav7z9PAMFtX+tKQZpVhx YJ9ZMcFnEnC5WhynDFFeAP/jJC8wf5yHOGPwt7mi90zIpcvwYsYtKW/xOIbIVkETyfbVmb /mQUUuvc6Tj1TGIlE2BhV+RZerX7+KTT4tqgcdtjYJLHAC80zqJKznProbbqhlEoJKanfn cApactxLhCMv+fjOJ27+P9yh97BsTkMXF2uInlJ4h7stAiCXDia0VkSK/2Txj+gHy3HMnl YEWQ7CA+vY8ASYsR/CmOdEb67s3KTmwlfJnfmEfx1gdhZn5fpPAOHrMqnCFKMA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698014727; a=rsa-sha256; cv=none; b=Pz6FD5wRCg5OygGBf4Z3cEJs+TW5wb+AzT1Lwa+dv8VX96ccX7T1YdEpF72We7OW6G3KdB WzuFqYvhALAzuECX3zyHlr/ZfRYYLbw8s90BpTRHTbocR29168CNK2HbDgshvrlGxU5B7z 30Z0E9RfoTvQ+OAUE9BotG22+oib66FPGv/KkzoSe1rJpdTA0KzYnRKBpqREae2hQf2ezq Dopa6g47gdKgoECBQRF0Eol5mu48cnchYq4Tnr5RMHvNOrWXDmqS2x3NG4xVNu3svg5257 kGZbauNHIfbvq2b7BGpPl0ijTg/S9qYOUiWAvLkKyVVHmECLbbkkgWjMmFqW4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698014727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZZL9ojAZXhEeLcNG9JNlOknvL3c6Vnmkx7tWlnPNmFg=; b=ZoGvWlN5qVEaxKY6MPLd/2O2kTfJpjOI07GqJckrDhzumAc1t60Q8i9CMFoC5NHYl6fhye t7kZIj+CatRG1tig9vrN3KeIniKfjgE1t2pi5+ON3ewPTfsSxk5zPra4IN/UI79wGIxUYd zCoAd7KFNot/Ul6tcqrXjKVF7rJtO3a01djhnDai8zmPW8Sz3ycDbQdWmqE9bNklWSB4pC zj8TQ0phdzllH2gnvMqJ2ERKvL2dstk1uchUzG5Fz/uHOB2dL6b/ApL3eFKzMsiJZd8hc8 yLxehWRFmIrZaGL3Bx393XidKtKRvDal02XbsIhdz/DC2R8jbKhbUeOev7n4Vg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDD1M2HYxz1Nc; Sun, 22 Oct 2023 22:45:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39MMjR8Z098907; Sun, 22 Oct 2023 22:45:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39MMjRcN098904; Sun, 22 Oct 2023 22:45:27 GMT (envelope-from git) Date: Sun, 22 Oct 2023 22:45:27 GMT Message-Id: <202310222245.39MMjRcN098904@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: c458bf557d66 - stable/14 - zfs: cherry-pick change from master List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: c458bf557d66161730ce644af840e968397a377b Auto-Submitted: auto-generated The branch stable/14 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=c458bf557d66161730ce644af840e968397a377b commit c458bf557d66161730ce644af840e968397a377b Author: Martin Matuska AuthorDate: 2023-10-20 17:30:32 +0000 Commit: Martin Matuska CommitDate: 2023-10-22 22:45:03 +0000 zfs: cherry-pick change from master #15405 ea30b5a9e Set spa_ccw_fail_time=0 when expanding a vdev Fixes 5-minute autoexpand delay on ZFS-root VM images. Requested by: cperciva Co-Authored-By: Colin Percival Obtained from: OpenZFS OpenZFS commit: ea30b5a9e0d266baa13398ed8f9435de050f4b25 --- sys/contrib/openzfs/module/zfs/vdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/contrib/openzfs/module/zfs/vdev.c b/sys/contrib/openzfs/module/zfs/vdev.c index 87c145593237..afb01c0ef7fd 100644 --- a/sys/contrib/openzfs/module/zfs/vdev.c +++ b/sys/contrib/openzfs/module/zfs/vdev.c @@ -4215,6 +4215,7 @@ vdev_online(spa_t *spa, uint64_t guid, uint64_t flags, vdev_state_t *newstate) /* XXX - L2ARC 1.0 does not support expansion */ if (vd->vdev_aux) return (spa_vdev_state_exit(spa, vd, ENOTSUP)); + spa->spa_ccw_fail_time = 0; spa_async_request(spa, SPA_ASYNC_CONFIG_UPDATE); } From nobody Mon Oct 23 10:13:01 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDWGj5J7gz4xs8J; Mon, 23 Oct 2023 10:13: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 4SDWGj4g6sz3JQj; Mon, 23 Oct 2023 10:13:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698055981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JHUhbk/ZBl2x3BZSPHTidn/lfQ8KLGYo7Gz+rTjGx+4=; b=NnoBxuLzEa40r+FYiyzjMHlJ0i37BweykL7Q23RgXVYAJbyYahHcM0wkMhoXAg61nXXahs zdD/L+nL+cGrIHxUHNnm+KXodGCIokI1CGOqxELk/joYLTP97BIRBkSt9+UKjGPpc6xXCc wfyhKweqOOO4ejc7PQAIZWiEveg2gcrjr2+oEtIFl0ikb1r0OxDpj1t1Z8VtKUu4BMLTto CKwkNKEwiRulT7z9Jci6nfAjIC+JIlKnYA6GrDl8LPsMqn4j0QJ1yroxnMw3o6m/Zx+NUE px9U0vZEc5To6phs1p8Gdls1lw9fYAA2njYESG7odM8Q4EHwRzaRaa54WLt6xw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698055981; a=rsa-sha256; cv=none; b=ggZREdv2YbOnogeiwvWtEytw7CXIVX1atVsKi8VXrMl9g+waqE9ru0dA2qey4bmGAQCx6s ruREftiZskxLzAOck05tBT2FpkbTYi6WZFbJ6bDyMEgfY2t2M8H2ZuAkAYRiSBZeVD1SOJ 6I3aw0bOSDRxI4k3YcJCaKfT3vIl3zo5hWzYp1TyIY972lgtTKfTC0aGGOJiMIWx7BhFjc PvooPJB3dzjtjZWNqLggJAZlvVjDbYzd7mhsvow3aDw47VSSsgvwhylzVwZOq+nIJQpT+y D4RKf5EQSxEoZRJIxfS/tFW6zem0C5HKVmYHUpFFEVGDubOvcokpBOVKKBwy8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698055981; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JHUhbk/ZBl2x3BZSPHTidn/lfQ8KLGYo7Gz+rTjGx+4=; b=PgW1Lcbtk0nfcUCwlfd9Tjh/hDgUc+Y0L5NzzqSxY6cvQLOcNOjqmBojfjqWmSpLN027wL Cw42RlBua2F3pB3/t0/p2ifLgvjCpyuf/GiH7QQMl4c9ELSaEDbF3TRfXhStxvX9+VNVzP kpDbbtwA8zmxB+qtX/kpgcQkPyKYDc3CpkSd5mUqW9rbm1KJt4Qw5wFnC1ZVJx8T2gfq6t MUlp8lWUdkbzZLkXoCRhbE9qSOc6DXj4NxEsbG2U6dzfitLU5OxoEH2XGYcGCTxpulp7Wk HlopUFsQUpxatjTFSHZNXvj89xkZodKQsICTIEUZKQ4emPGP18p03+kqKlpItw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDWGj3jWLzbdw; Mon, 23 Oct 2023 10:13:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39NAD178045992; Mon, 23 Oct 2023 10:13:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39NAD1gd045989; Mon, 23 Oct 2023 10:13:01 GMT (envelope-from git) Date: Mon, 23 Oct 2023 10:13:01 GMT Message-Id: <202310231013.39NAD1gd045989@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: d8aaf0979233 - stable/14 - veriexec: Correctly export symbols List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d8aaf09792338fae07b9618665ea9612b7b92a6e Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=d8aaf09792338fae07b9618665ea9612b7b92a6e commit d8aaf09792338fae07b9618665ea9612b7b92a6e Author: Zhenlei Huang AuthorDate: 2023-10-15 14:29:18 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-23 10:12:21 +0000 veriexec: Correctly export symbols There's no symbol named 'mac_veriexec_get_executable_flags', the right one should be the function 'mac_veriexec_metadata_get_executable_flags()'. Reviewed by: stevek MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42133 (cherry picked from commit f34c9c4e3bdc2b8bffae4ac26897e0e847e9f76f) --- sys/modules/mac_veriexec/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/mac_veriexec/Makefile b/sys/modules/mac_veriexec/Makefile index a165daeec043..82cf468fec50 100644 --- a/sys/modules/mac_veriexec/Makefile +++ b/sys/modules/mac_veriexec/Makefile @@ -18,7 +18,7 @@ SRCS += \ EXPORT_SYMS+= ve_mutex \ mac_veriexec_in_state \ - mac_veriexec_get_executable_flags + mac_veriexec_metadata_get_executable_flags .if defined(KERNBUILDDIR) MKDEP= -include ${KERNBUILDDIR}/opt_global.h From nobody Mon Oct 23 10:13:02 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDWGk6qSpz4xs58; Mon, 23 Oct 2023 10:13: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 4SDWGk63NTz3JXF; Mon, 23 Oct 2023 10:13:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698055982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+tVO3r0rFuP5lp76kAvmKSXzni5iqrs+dA2f7lkAkDc=; b=kgsjveDSMaLMAbaDohqmR6tekY5J9EkHpvRlPDrGA0HMypDIQh75rQLJuvbNd8HqVttPvb 9UVvSETmsud9TVNT1KVvO2xZTYe2br3LnBacXjGALRTrld7JLQoYXaeoN67yBIN3TQK+3L T/TIj39332G75RJaFmhnMf6gJ07WBPVYsKrPjbTHOOSHOi9+50HSqiqzqQTrQmRvcSX0hk N8mszpx80a8U1xVMD/tMRWfA/NVR0bxOT9FZlHmWoM/346gwyyhGBy5DYyTgxkmnR1tmjj BgjbxVKCPCsj7lMPesC1tNoy+l9kCXajUoyCQj6tzL4f4jqiHxJEsrWfdU//bw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698055982; a=rsa-sha256; cv=none; b=MHRoGnpuJP4x6QqaSTHqnQybo+mcmnwAH09iQhFRSimTBR+KslTWmX6MvBxdUsniHEYszg ASMzKcGlhBBJOUcR5g+lClalb6SZYcxp9h9LH6JjhAELbIXzNNEIM1xb0o/pOjyqSa17qw Fd9SGhuv+69o5wnONDceYgupErbK8FYatzs0Da0Hj13N/guAHQh2M8xR5F/YmpfAUt3Dp7 Iuq+L9nzRK4eGavzAqjQ2LFY6YXa5VVreTZVEj5o4GE/l+wobC4Iv7A8F1Ak08eEgJ4N96 TQDenVZS1xzDjRNNcABJ6qXXO5IZ+zHTpi/hj47QnHwYBqs2naZE9EwEsHwpVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698055982; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+tVO3r0rFuP5lp76kAvmKSXzni5iqrs+dA2f7lkAkDc=; b=KqEdSYEFqM+h0alYcU4VxZnH/rLn/BnHGCWFDaY1u9bbc5HrgecesgbFNbN33CE9UrjfQ4 R6hXjrR0KT+eXXTpK8QV9QFyFeHUv3QC2WGEe5oOvrY2+WMO1RhHsCyYd6B0jefjQLShjL fmCAFJfokBtM5bZROVNsnLJ9vBIxxq/vwlyVULPqpmOxJfHkPY8BLGeMgGCKZYesrP0O4X TvJY9q+GHz4UB8Exyql7X4ODFvkupGB7RpQLP2ZONb2+F2jxWQATlEsKt9KDiD+YIczKYA 26cpM6ggxkZpzdHQI5KDtJY+GNKRQqCjTLWZcM0lfrMbcr9ZiNxl8QGfFVrQug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDWGk4nsbzbhc; Mon, 23 Oct 2023 10:13:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39NAD2R7046040; Mon, 23 Oct 2023 10:13:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39NAD20V046037; Mon, 23 Oct 2023 10:13:02 GMT (envelope-from git) Date: Mon, 23 Oct 2023 10:13:02 GMT Message-Id: <202310231013.39NAD20V046037@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: e53f8ca323e8 - stable/14 - pmap: Prefer consistent naming for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e53f8ca323e8e563d4b55883fc3544bea75aab29 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=e53f8ca323e8e563d4b55883fc3544bea75aab29 commit e53f8ca323e8e563d4b55883fc3544bea75aab29 Author: Zhenlei Huang AuthorDate: 2023-10-19 17:00:31 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-23 10:12:21 +0000 pmap: Prefer consistent naming for loader tunable The sysctl knob 'vm.pmap.pv_entry_max' becomes a loader tunable since 7ff48af7040f (Allow a specific setting for pv entries) but is fetched from system environment 'vm.pmap.pv_entries'. That is inconsistent and obscure. This reverts 36e1b9702e21 (Correct the tunable name in the message). PR: 231577 Reviewed by: jhibbits, alc, kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42274 (cherry picked from commit 02320f64209563e35fa371fc5eac94067f688f7f) --- sys/arm/arm/pmap-v6.c | 4 ++-- sys/i386/i386/pmap.c | 4 ++-- sys/powerpc/booke/pmap.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c index 719851432203..92e992a4b25e 100644 --- a/sys/arm/arm/pmap-v6.c +++ b/sys/arm/arm/pmap-v6.c @@ -1750,7 +1750,7 @@ pmap_init(void) */ TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); pv_entry_max = shpgperproc * maxproc + vm_cnt.v_page_count; - TUNABLE_INT_FETCH("vm.pmap.pv_entries", &pv_entry_max); + TUNABLE_INT_FETCH("vm.pmap.pv_entry_max", &pv_entry_max); pv_entry_max = roundup(pv_entry_max, _NPCPV); pv_entry_high_water = 9 * (pv_entry_max / 10); @@ -3012,7 +3012,7 @@ get_pv_entry(pmap_t pmap, boolean_t try) if (ratecheck(&lastprint, &printinterval)) printf("Approaching the limit on PV entries, consider " "increasing either the vm.pmap.shpgperproc or the " - "vm.pmap.pv_entries tunable.\n"); + "vm.pmap.pv_entry_max tunable.\n"); retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); if (pc != NULL) { diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 4198849b1a5a..67810700e6ef 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -1006,7 +1006,7 @@ __CONCAT(PMTYPE, init)(void) */ TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); pv_entry_max = shpgperproc * maxproc + vm_cnt.v_page_count; - TUNABLE_INT_FETCH("vm.pmap.pv_entries", &pv_entry_max); + TUNABLE_INT_FETCH("vm.pmap.pv_entry_max", &pv_entry_max); pv_entry_max = roundup(pv_entry_max, _NPCPV); pv_entry_high_water = 9 * (pv_entry_max / 10); @@ -2515,7 +2515,7 @@ get_pv_entry(pmap_t pmap, boolean_t try) if (ratecheck(&lastprint, &printinterval)) printf("Approaching the limit on PV entries, consider " "increasing either the vm.pmap.shpgperproc or the " - "vm.pmap.pv_entries tunable.\n"); + "vm.pmap.pv_entry_max tunable.\n"); retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); if (pc != NULL) { diff --git a/sys/powerpc/booke/pmap.c b/sys/powerpc/booke/pmap.c index fe6b95eda085..f41ea24cd30c 100644 --- a/sys/powerpc/booke/pmap.c +++ b/sys/powerpc/booke/pmap.c @@ -1069,7 +1069,7 @@ mmu_booke_init(void) TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); pv_entry_max = shpgperproc * maxproc + vm_cnt.v_page_count; - TUNABLE_INT_FETCH("vm.pmap.pv_entries", &pv_entry_max); + TUNABLE_INT_FETCH("vm.pmap.pv_entry_max", &pv_entry_max); pv_entry_high_water = 9 * (pv_entry_max / 10); uma_zone_reserve_kva(pvzone, pv_entry_max); From nobody Mon Oct 23 10:15:55 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDWL4126Pz4xsYD; Mon, 23 Oct 2023 10:15:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SDWL40RKZz3Kc0; Mon, 23 Oct 2023 10:15:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698056156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BzjRw6B1R7nm4oLpHUkjC4zEOGPSscyFTpDwAlkJ/B8=; b=IcTWrT8Jfl4xveBhiqYGRzqrx84bo/E/4nAlVNKZeMzoc6kr6UY/B/jTOOsBdYCNPZfjJi Jk7kf5XIL4o1FJbJ1cpWYqc35/vrx8Hdv37/GqrWIVu3Efx9pXPhpuMEzcEsnO8qDZKy/Y Gw3LbGDZ5L1f7JUWDi86xdzXMSYZl9ZkML5atC14k4Akk1npTWWRKW4MMz0TI/HNCGmPL8 8+4RvDXB6NViqKMHNmhmg+laDw5mdGYqPmb5iRr0kzCjKhSHn4SmcEPccxEnbYMUxqV8gF fqDAX5iEw2E9DEOvXOrAyBQr508Se813EbmJBhTrSXpoGKLETRmKCZlZFVMK5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698056156; a=rsa-sha256; cv=none; b=BQnw3h8tZjM9QWWnvRbC8ORzXdd37+f0so3MpnzOgWILXushi5IhWPQKY++QmEb6Kd20J3 S3unc7EuRCxDjz21T40xzDY2IEX++j9sWZopiMtnHJPwvvIJC+9wZy0/TNehOQAj5luCDc eAtdjhfI64okiDRgSg1/p+mUWE8GBzrFHO1QC6egvvuMZX5f2C0qzDt9mC/O7QPwfh0YnI gYilATQt486aHv9ze8MEqZ0SuNk5VqF09ANu7HnwZiz3STiIvwCfnr76inXv4E+SigUihQ 4Y2s2Yh4hWztLEKTA/yD6SlYCJ4jaVYUWIrl74yhfuUbjvvup/3LdwOr8G02mQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698056156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BzjRw6B1R7nm4oLpHUkjC4zEOGPSscyFTpDwAlkJ/B8=; b=xck/+RC/cb4o+KHJWccACoyQ/TZ69BwSISE799rwlxRpMWjHQPPDxLH0vgRSIMeCoJ8Zfl RFlL+UI18BZNLd3ty6wEnlE4+hxkgO/FMKkG5lzLJe5EuEtVqqKJA7190hX5bgqZHNVHOn cEYb+pJ3EDaXRHuCEyAOD94MccQti3MMPKuwPFFaN+LGRC+B9u/9fcBYPizFYlkaZxrmar LpEvfSrkzY8zTLJMOzwXVPZlHhZJGDsAqgU4Km2uxae3DRDiUiMKSndw2OYDHOrcGh08x2 J0+WWCAQTQ4NYlv6rUQw8I+VezKiSu3/NfJrxkcfFtntlvzwIn/xx4S4W6W6NA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDWL36cZpzbrD; Mon, 23 Oct 2023 10:15:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39NAFtZB046629; Mon, 23 Oct 2023 10:15:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39NAFt7k046626; Mon, 23 Oct 2023 10:15:55 GMT (envelope-from git) Date: Mon, 23 Oct 2023 10:15:55 GMT Message-Id: <202310231015.39NAFt7k046626@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 36180ffe86fe - stable/13 - veriexec: Correctly export symbols List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 36180ffe86feddefe710f9e770563f14bb6bd203 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=36180ffe86feddefe710f9e770563f14bb6bd203 commit 36180ffe86feddefe710f9e770563f14bb6bd203 Author: Zhenlei Huang AuthorDate: 2023-10-15 14:29:18 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-23 10:15:10 +0000 veriexec: Correctly export symbols There's no symbol named 'mac_veriexec_get_executable_flags', the right one should be the function 'mac_veriexec_metadata_get_executable_flags()'. Reviewed by: stevek MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42133 (cherry picked from commit f34c9c4e3bdc2b8bffae4ac26897e0e847e9f76f) (cherry picked from commit d8aaf09792338fae07b9618665ea9612b7b92a6e) --- sys/modules/mac_veriexec/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/mac_veriexec/Makefile b/sys/modules/mac_veriexec/Makefile index a165daeec043..82cf468fec50 100644 --- a/sys/modules/mac_veriexec/Makefile +++ b/sys/modules/mac_veriexec/Makefile @@ -18,7 +18,7 @@ SRCS += \ EXPORT_SYMS+= ve_mutex \ mac_veriexec_in_state \ - mac_veriexec_get_executable_flags + mac_veriexec_metadata_get_executable_flags .if defined(KERNBUILDDIR) MKDEP= -include ${KERNBUILDDIR}/opt_global.h From nobody Mon Oct 23 10:15:56 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDWL51zjMz4xsPx; Mon, 23 Oct 2023 10:15: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 4SDWL51ShWz3Kck; Mon, 23 Oct 2023 10:15:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698056157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YY+UOOoO/dS22vN3npm8hNk4o5mdouuGx7MU3lhUdTE=; b=cjANQAvrVAJTfHBZD7Rvh9CYIQdYmtHNr0gEnd94UXjm+LiGNmkPMxpVpB+4+e7wvGlGdG hfcEs4H4YpA7wQTHvA82QlNjg4JpEpxwUguJrpqPoC/W10AkszJWKa9hscyn9hIeFuZQct JWRM34KI38IVY/MhGMRlongGw+qarpodqH/p+hqiDySQeccksEVSfW9KINze7bLZh11j7S mKdn4CJjQimaLu4lRyi23DP8ue2lkXFnm9bFhKLAdcs/fGC+eScDCmw8w+bJ1jNbmO3fqi AVMrMw1ogM5majf35Glr7GLgI9at9j0NWRqPx0wFywMlU+WwU6QrvWKuJshZzA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698056157; a=rsa-sha256; cv=none; b=iT67ecvLKwTos4dPg+L3cJG/ikG3ErPGXIQmWVqq6cdL89CC2xnIBLSG2rQndtAVkY00Ls Nu4hmJGeCCaU8auGIATbv64QiquEZO3b+AZIUCjr2hVNQXPXQLbC39lqK9opkP66yHwAG5 R+nSakmUrxF9NwjdaYyDxrQ+CKTutIc/NPHqV804lUPN57VmG4PEgXaV12YriVQ0iKsUXX x1byUnXEguGx7x4f7I2LBPtERr8RZifr0VSyxqEjyaaZsoTm7KF8KCJ3Vx7jA3FDabbRlJ L3wDy9CsKvaFitLhXnnM4vJWpUKwBZ/tXno/WMeKEnAzmHH75ZhdOTLKZM9BwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698056157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=YY+UOOoO/dS22vN3npm8hNk4o5mdouuGx7MU3lhUdTE=; b=TlT39HIiexPnsU6wcdWAcikyrJbZfThR0KfsuebSi67oQu92CKSt4GEmD4b0PKlJU+ed6v 23K4g36IUElJeJF9yePklIWhL4cSVQrXPVifC0p61qA+DdJZC8A/RkAPsGbNSeOAqM35j4 SkJVjK7yi/lYIojM2UVDY2X0P9xHEsA8LsTcQzs716SnBI3cP6sG0VrkFCuP9HR+dkLjeX ET/8v21YfEEygQbXrynkYqWpGDniL7cWni46fP+Wum8OZPguiG3viv0BHUXS1dNXH9D7fU 7nCRZE8qbF89Rg4rnxrAzHWI5ElrBySjefNMGJJlLev6NkEoPfp1ltAEDEYX9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDWL50MZdzbf3; Mon, 23 Oct 2023 10:15:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39NAFu2D046684; Mon, 23 Oct 2023 10:15:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39NAFuR9046681; Mon, 23 Oct 2023 10:15:56 GMT (envelope-from git) Date: Mon, 23 Oct 2023 10:15:56 GMT Message-Id: <202310231015.39NAFuR9046681@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 16afc2a4d9c5 - stable/13 - pmap: Prefer consistent naming for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 16afc2a4d9c581064aa32babc29c748ccd59863c Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=16afc2a4d9c581064aa32babc29c748ccd59863c commit 16afc2a4d9c581064aa32babc29c748ccd59863c Author: Zhenlei Huang AuthorDate: 2023-10-19 17:00:31 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-23 10:15:12 +0000 pmap: Prefer consistent naming for loader tunable The sysctl knob 'vm.pmap.pv_entry_max' becomes a loader tunable since 7ff48af7040f (Allow a specific setting for pv entries) but is fetched from system environment 'vm.pmap.pv_entries'. That is inconsistent and obscure. This reverts 36e1b9702e21 (Correct the tunable name in the message). PR: 231577 Reviewed by: jhibbits, alc, kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42274 (cherry picked from commit 02320f64209563e35fa371fc5eac94067f688f7f) (cherry picked from commit e53f8ca323e8e563d4b55883fc3544bea75aab29) --- sys/arm/arm/pmap-v6.c | 4 ++-- sys/i386/i386/pmap.c | 4 ++-- sys/powerpc/booke/pmap.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c index 79adf395161a..f00589a75c6d 100644 --- a/sys/arm/arm/pmap-v6.c +++ b/sys/arm/arm/pmap-v6.c @@ -1750,7 +1750,7 @@ pmap_init(void) */ TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); pv_entry_max = shpgperproc * maxproc + vm_cnt.v_page_count; - TUNABLE_INT_FETCH("vm.pmap.pv_entries", &pv_entry_max); + TUNABLE_INT_FETCH("vm.pmap.pv_entry_max", &pv_entry_max); pv_entry_max = roundup(pv_entry_max, _NPCPV); pv_entry_high_water = 9 * (pv_entry_max / 10); @@ -3030,7 +3030,7 @@ get_pv_entry(pmap_t pmap, boolean_t try) if (ratecheck(&lastprint, &printinterval)) printf("Approaching the limit on PV entries, consider " "increasing either the vm.pmap.shpgperproc or the " - "vm.pmap.pv_entries tunable.\n"); + "vm.pmap.pv_entry_max tunable.\n"); retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); if (pc != NULL) { diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 72596d364b60..5913ea927d75 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -1005,7 +1005,7 @@ __CONCAT(PMTYPE, init)(void) */ TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); pv_entry_max = shpgperproc * maxproc + vm_cnt.v_page_count; - TUNABLE_INT_FETCH("vm.pmap.pv_entries", &pv_entry_max); + TUNABLE_INT_FETCH("vm.pmap.pv_entry_max", &pv_entry_max); pv_entry_max = roundup(pv_entry_max, _NPCPV); pv_entry_high_water = 9 * (pv_entry_max / 10); @@ -2532,7 +2532,7 @@ get_pv_entry(pmap_t pmap, boolean_t try) if (ratecheck(&lastprint, &printinterval)) printf("Approaching the limit on PV entries, consider " "increasing either the vm.pmap.shpgperproc or the " - "vm.pmap.pv_entries tunable.\n"); + "vm.pmap.pv_entry_max tunable.\n"); retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); if (pc != NULL) { diff --git a/sys/powerpc/booke/pmap.c b/sys/powerpc/booke/pmap.c index 0501a0fe99a9..f85bb8d56f74 100644 --- a/sys/powerpc/booke/pmap.c +++ b/sys/powerpc/booke/pmap.c @@ -1067,7 +1067,7 @@ mmu_booke_init() TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); pv_entry_max = shpgperproc * maxproc + vm_cnt.v_page_count; - TUNABLE_INT_FETCH("vm.pmap.pv_entries", &pv_entry_max); + TUNABLE_INT_FETCH("vm.pmap.pv_entry_max", &pv_entry_max); pv_entry_high_water = 9 * (pv_entry_max / 10); uma_zone_reserve_kva(pvzone, pv_entry_max); From nobody Mon Oct 23 10:18:05 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDWNY4bp1z4xsWW; Mon, 23 Oct 2023 10:18: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 4SDWNY3kPSz3L9j; Mon, 23 Oct 2023 10:18:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698056285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rHbsLkH/OPd6LyT6N3uV0YpSJModerhewyw54gb06Pw=; b=BT4gEW4wnOCUOHgL2WVwDrP5a3smlNrlqlXf81kDlfakB2TBogdXVkjJF3NSVdESl4IW9x /5WJkJnVjvX8NmFmAcgoua8WAQ3yQb9LQ82zd/jTmDlNNjXhy+w8UH/3X8aTMujldve6SP BWWv0jQh4+0OQ8/o0PdauuNo2Phh75cAySpOo/yMyOkOeygQZKcvVE0YU9sSGKIqJ7T0YQ cB71aFXShcPsIvH67ZLjfH5e2Il5bTz2poRhz/S+RxnzhVtD4HIYNO5M4In8w6Gu0/4ZOl 221jA7MpsNwr9nVjO9MMM7laQJW90uNdrR7a65Tl5h+5DkPkzYQ5gjp1+1O/Aw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698056285; a=rsa-sha256; cv=none; b=Liy1bsMlNF6G5ZlXnjx82EQuxBtD736xI6kJhtMLu9cQeMUvNk0vwv9N07xUMu9AH+eZCE 9n8K1FzmDCw3DCeWgCCC4sHQ/akPKqJE45BcdHuTige37eHEjiQEfi3LnfAWejBO+EKYTh 9NE74BRBNFmLk/l56sL6OXaK+iKb11/QLfgmfgLO1jwIuVahPxU/+LnIrFxBsLYAbE3EpQ E/9Gw/2E0gKHqF3Sdp4BCgD9NkZMeZ+AX0NYnyw9NeKiJi4Mv5YJeqtEvzMVZto9UNQFE1 AiCWZb3knzBQyZsEELon0nRJHiKKmJBIErXXIia9UcR90QbDDTDuh4En4OrVFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698056285; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rHbsLkH/OPd6LyT6N3uV0YpSJModerhewyw54gb06Pw=; b=WlDTfu8DM1eH/BR9+uQUcWx21dX3nJlU7WH+EyzAQsgnVaSkgQIvYiqGvspUe+vFukodJt UttC4CsY2jqVhaOqJFjVgX/eOikvOvsw0t2w1033DXAH1CafvUEWkv6A17ZMaP0QLovtpO wzOr5jDpbJkGSQVVaC157oSXBmxpWs0CpMEcvzZzagRT2FlupjCnUN0gP8Uwk0d/ogimKf KrX8YG43bT4ULBfPCiCs0kgms9hdEThrI6SYanhvt6E8SygTMpf8oYog4NMQPWnCA9u3TH fbY3YlSNVblpJs8TL9EcNn+xkXqxkHuqRMNj5GmmGqFf6iBktMB0irJCB5wrdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDWNY2n7Pzbnf; Mon, 23 Oct 2023 10:18:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39NAI5qR047108; Mon, 23 Oct 2023 10:18:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39NAI5gu047105; Mon, 23 Oct 2023 10:18:05 GMT (envelope-from git) Date: Mon, 23 Oct 2023 10:18:05 GMT Message-Id: <202310231018.39NAI5gu047105@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 6be29d44ece1 - stable/12 - veriexec: Correctly export symbols List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 6be29d44ece1600ee1dd604177f1adf3f5cf5e94 Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=6be29d44ece1600ee1dd604177f1adf3f5cf5e94 commit 6be29d44ece1600ee1dd604177f1adf3f5cf5e94 Author: Zhenlei Huang AuthorDate: 2023-10-15 14:29:18 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-23 10:17:42 +0000 veriexec: Correctly export symbols There's no symbol named 'mac_veriexec_get_executable_flags', the right one should be the function 'mac_veriexec_metadata_get_executable_flags()'. Reviewed by: stevek MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42133 (cherry picked from commit f34c9c4e3bdc2b8bffae4ac26897e0e847e9f76f) (cherry picked from commit d8aaf09792338fae07b9618665ea9612b7b92a6e) (cherry picked from commit 36180ffe86feddefe710f9e770563f14bb6bd203) --- sys/modules/mac_veriexec/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/modules/mac_veriexec/Makefile b/sys/modules/mac_veriexec/Makefile index 7ec061b07528..2bea2cc002f2 100644 --- a/sys/modules/mac_veriexec/Makefile +++ b/sys/modules/mac_veriexec/Makefile @@ -19,7 +19,7 @@ SRCS += \ EXPORT_SYMS+= ve_mutex \ mac_veriexec_in_state \ - mac_veriexec_get_executable_flags + mac_veriexec_metadata_get_executable_flags .if defined(KERNBUILDDIR) MKDEP= -include ${KERNBUILDDIR}/opt_global.h From nobody Mon Oct 23 10:18:06 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDWNZ557Tz4xs1R; Mon, 23 Oct 2023 10:18: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 4SDWNZ4Cqnz3LPb; Mon, 23 Oct 2023 10:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698056286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yBMPpnH3q7iqtSZPHifbLvR+jbDtElrliwbrh/wAFa8=; b=PgTAVu4dw5+nqRpqn/33217XX9pgdurlcnIqYByzWZzz7cyqeBa14lzxf6VAalSCQVXRep /cVY0wAqKx9b6dxnpsa33TBd7L5N8F1Bkx48zt1+fNoF7oojD1qE+xnNhR/ETtCKLyMXA9 JWda956zz1VSN3B3FksJGqNA2uY8KL5uPEXhw2e/cfDgjyaGptWBFSqc4zorMQA07wEz9v 7PO3AO7dvS5tDJZNFXMcic6CcCbnfRq1WKcHUcy39rBE/bj25Az+kE5lYgAlgVVvNSwNsY ldrC+zjuFj/nWKsru+ps+D3B3Tf3b8GKNnmPkEWrTDLp+ywfUq6uRVN/X1LrrA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698056286; a=rsa-sha256; cv=none; b=Fci/eNHMI7ZFdjWcS3FDGXXoPRfhIsXgoonm4PWSydua5BWNE6A3I3zSo3dF5dvfE1FJzq 5joCd+Rm5QQ8oHuDzySJpbPyUuRPjMvt7HbpTmv2yyhhCBFjvew+XpfEwDCjTm1FBNUuEu a7JRgKpAtWKj88P/hTYPZm0WDwGsYWw7ombknihqAumoRbVgB0TMavJipv2km9oa87kkqA PjfaNQU0P50N5EzegkOpa3QFrN0kUhd+wx+dAQB2ee2hCd+Mw0M7vstZrxi/MTltnFRFUc l/b9+NQLDVGTU0xEeQvTeKsO+uQXvRitA7iImnmd4cKaEnJFAeHQn4RcaMi29A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698056286; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yBMPpnH3q7iqtSZPHifbLvR+jbDtElrliwbrh/wAFa8=; b=VH6BTOwM8QyVLgiWjFI0JnCdHnAlFdjGUCmPGC1cURzDD13ZqFgLs9RbEj/BEw4ICuRV4t HkQ6HTOjNzawqCNjBadR1hS0mwFYMF1o2+ChL1LJVnEhwRAr+5no3TO+eynaweNL+Gm7PR d4iEJJJLHFJZWoKELtH6ssVhG3nesAtiQiRHJ10v/rb95gkNTN+8l8zMF6+DeTxbn+dK3x LTjQp4hMpPrh04qKEwz+VkMA+mLlTaxVxT9fWO/aEsroeAZdroaVAIx8V7xenEncDjvels U4r/t4WlYVyt4xv7W//etAx8aLwjNXJsPs0byAfTpEbTgjmVrhkU8u9Rcb9bdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDWNZ38dFzc6v; Mon, 23 Oct 2023 10:18:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39NAI603047164; Mon, 23 Oct 2023 10:18:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39NAI6Ko047161; Mon, 23 Oct 2023 10:18:06 GMT (envelope-from git) Date: Mon, 23 Oct 2023 10:18:06 GMT Message-Id: <202310231018.39NAI6Ko047161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 0ceaf5d46282 - stable/12 - pmap: Prefer consistent naming for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 0ceaf5d4628210226d0bafc2650b494a07ca9aaf Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=0ceaf5d4628210226d0bafc2650b494a07ca9aaf commit 0ceaf5d4628210226d0bafc2650b494a07ca9aaf Author: Zhenlei Huang AuthorDate: 2023-10-19 17:00:31 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-23 10:17:44 +0000 pmap: Prefer consistent naming for loader tunable The sysctl knob 'vm.pmap.pv_entry_max' becomes a loader tunable since 7ff48af7040f (Allow a specific setting for pv entries) but is fetched from system environment 'vm.pmap.pv_entries'. That is inconsistent and obscure. This reverts 36e1b9702e21 (Correct the tunable name in the message). PR: 231577 Reviewed by: jhibbits, alc, kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42274 (cherry picked from commit 02320f64209563e35fa371fc5eac94067f688f7f) (cherry picked from commit e53f8ca323e8e563d4b55883fc3544bea75aab29) (cherry picked from commit 16afc2a4d9c581064aa32babc29c748ccd59863c) --- sys/arm/arm/pmap-v6.c | 4 ++-- sys/i386/i386/pmap.c | 4 ++-- sys/powerpc/booke/pmap.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c index 11c2ba658b82..c94232f1c04b 100644 --- a/sys/arm/arm/pmap-v6.c +++ b/sys/arm/arm/pmap-v6.c @@ -1752,7 +1752,7 @@ pmap_init(void) */ TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); pv_entry_max = shpgperproc * maxproc + vm_cnt.v_page_count; - TUNABLE_INT_FETCH("vm.pmap.pv_entries", &pv_entry_max); + TUNABLE_INT_FETCH("vm.pmap.pv_entry_max", &pv_entry_max); pv_entry_max = roundup(pv_entry_max, _NPCPV); pv_entry_high_water = 9 * (pv_entry_max / 10); @@ -3035,7 +3035,7 @@ get_pv_entry(pmap_t pmap, boolean_t try) if (ratecheck(&lastprint, &printinterval)) printf("Approaching the limit on PV entries, consider " "increasing either the vm.pmap.shpgperproc or the " - "vm.pmap.pv_entries tunable.\n"); + "vm.pmap.pv_entry_max tunable.\n"); retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); if (pc != NULL) { diff --git a/sys/i386/i386/pmap.c b/sys/i386/i386/pmap.c index 611bfb414cb3..f1b1b9f3d0ca 100644 --- a/sys/i386/i386/pmap.c +++ b/sys/i386/i386/pmap.c @@ -974,7 +974,7 @@ pmap_init(void) */ TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); pv_entry_max = shpgperproc * maxproc + vm_cnt.v_page_count; - TUNABLE_INT_FETCH("vm.pmap.pv_entries", &pv_entry_max); + TUNABLE_INT_FETCH("vm.pmap.pv_entry_max", &pv_entry_max); pv_entry_max = roundup(pv_entry_max, _NPCPV); pv_entry_high_water = 9 * (pv_entry_max / 10); @@ -2590,7 +2590,7 @@ get_pv_entry(pmap_t pmap, boolean_t try) if (ratecheck(&lastprint, &printinterval)) printf("Approaching the limit on PV entries, consider " "increasing either the vm.pmap.shpgperproc or the " - "vm.pmap.pv_entries tunable.\n"); + "vm.pmap.pv_entry_max tunable.\n"); retry: pc = TAILQ_FIRST(&pmap->pm_pvchunk); if (pc != NULL) { diff --git a/sys/powerpc/booke/pmap.c b/sys/powerpc/booke/pmap.c index 79e774b33bf4..4c3e0754c010 100644 --- a/sys/powerpc/booke/pmap.c +++ b/sys/powerpc/booke/pmap.c @@ -2156,7 +2156,7 @@ mmu_booke_init(mmu_t mmu) TUNABLE_INT_FETCH("vm.pmap.shpgperproc", &shpgperproc); pv_entry_max = shpgperproc * maxproc + vm_cnt.v_page_count; - TUNABLE_INT_FETCH("vm.pmap.pv_entries", &pv_entry_max); + TUNABLE_INT_FETCH("vm.pmap.pv_entry_max", &pv_entry_max); pv_entry_high_water = 9 * (pv_entry_max / 10); uma_zone_reserve_kva(pvzone, pv_entry_max); From nobody Mon Oct 23 23:36:56 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDs6K118xz4ydLR; Mon, 23 Oct 2023 23:36: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 4SDs6K0Bjcz3gbW; Mon, 23 Oct 2023 23:36:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698104217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L96eniPnNs6F9qfawRf1Gr5XpQ6FpO5+Bj6lF5AonZg=; b=VNnTrP33ySbgVJ74A/YVve9S5i0kK/P1a+mfHhsD8ZW7ROU61ZULP7cC1P0f+1Z0zIis9Y KHyp10pM6YWhCipqC7gZ0sgPf3GiA64TbZ70oOMvgMroM6+3sTcIwXmVn8nhY1CM+ws7T7 1oXF9TBM8SF6qp65E5tv992a6m8mV+DrV9Qjr7ed9POtnKVJUawU3fE4dqRRBeftsCMohS h63dioPvrdph+o/a20E9dGBBm32zqlu+/F6+GW/FTdbzT49AvwsO4DA8xA3tGJGbNP7MW3 PR+ns/XqbOzriZeYZltoVfqtZHhygSCEwS7SyrCo2RUTHUI1wXpwrZgWVX3a2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698104217; a=rsa-sha256; cv=none; b=w/kXysbDTq2u2Kdhi6fL06ludIuVcuXOCJXKE731l4F0Ltha5fdA+TR23ESEDl/MP5XR6e nLDI0no+oAgAGxTTLbGbFYLpFLnIiZV2z0lQ+KEGiRBn/GuXjGTPQcjt+dvA03yliqjDBn mC8blbyQPAkm02VVLUxMopSDgxyBWuWS2SFdj0S0Onj6fXWb6K5As2Cs9+oMjSTQ8e52vg UA7GjhRhxNX+aDIpgUyyzHLb2yYQ1oM5VkJv8EPYOkev9C2ix/RsyDGHkyJgXz9uRUK982 eRwh/G464UYBk+jUARwfJJRPZH8nEfkoUNbLmZ/YsKOMv+5aT/OeIF/9SccmBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698104217; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L96eniPnNs6F9qfawRf1Gr5XpQ6FpO5+Bj6lF5AonZg=; b=fuC9FxQSUeiMq5chYQBG8LcyCwH3slzus5P0Gq3unBZFOLKsNiTl58yk8ut87Sb4ywuLpl lu+vgi70JSZDpFfkQuxOTgjunZH8SO2C6iYJAZ/e2P4OcrUmPb3qQLC8hrjzGiAmXEJRgV TNMwIQRJNpUsNEJbwiwL3PBmQ9R5miIL+ux+50MrhTCvYMd9DbNQIaKhUFY5ODlznvlCkp Ti5zHrA5c3lJVqplkTQs/dEgCyQoJ1+da4NmZ1u6cBCuOyr+43R4CzQNPFLJx6HkGZfYH6 Jlul4HUSJRMUyOd2lfCafA+0QL2iKDte7oCntggAr2IEmV8vU2pTtT5w6CWmJg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDs6J6NLTz10Qj; Mon, 23 Oct 2023 23:36:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39NNauLO087586; Mon, 23 Oct 2023 23:36:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39NNaurN087584; Mon, 23 Oct 2023 23:36:56 GMT (envelope-from git) Date: Mon, 23 Oct 2023 23:36:56 GMT Message-Id: <202310232336.39NNaurN087584@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: 6561fec386a6 - stable/14 - freebsd-update: allow user to break out of conflict resolution loop List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: 6561fec386a6cbe65b3f9661db797317ab6a99b4 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6561fec386a6cbe65b3f9661db797317ab6a99b4 commit 6561fec386a6cbe65b3f9661db797317ab6a99b4 Author: Ed Maste AuthorDate: 2023-03-03 17:32:51 +0000 Commit: Ed Maste CommitDate: 2023-10-23 23:35:57 +0000 freebsd-update: allow user to break out of conflict resolution loop When a conflict marker is found during update allow the user to confirm they want it to remain in the file. Suggested by: Tim Hogard Reviewed by: imp Sponsored by: The FreeBSD Foundation Fixes: ceb5f28ba5fc ("freebsd-update: re-edit files if merge confli...") Differential Revision: https://reviews.freebsd.org/D38896 (cherry picked from commit 3d44241546173de00852ab5e22263ba538cd8759) --- usr.sbin/freebsd-update/freebsd-update.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index c6432dcd6b0e..0cfd29731126 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2544,7 +2544,11 @@ Press Enter to edit this file in ${EDITOR} and resolve the conflicts manually... EOF while true; do - read dummy /dev/null; then + echo + break + fi ${EDITOR} `pwd`/merge/new/${F} < /dev/tty if ! grep -qE '^(<<<<<<<|=======|>>>>>>>)([[:space:]].*)?$' $(pwd)/merge/new/${F} ; then @@ -2555,7 +2559,8 @@ manually... Merge conflict markers remain in: ${F} These must be resolved for the system to be functional. -Press Enter to return to editing this file. +Press Enter to return to editing this file, or type "ACCEPT" to carry on with +these lines remaining in the file. EOF done done < failed.merges From nobody Tue Oct 24 00:04:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDskT3Cmcz4yfMw; Tue, 24 Oct 2023 00:04: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 4SDskT2Qs4z4GNX; Tue, 24 Oct 2023 00:04:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698105889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4yCDTz0eA3m6VrYgBvDDD0q2Ai2+eV+iTkX0P1EMZ5A=; b=dI0KAuQm5CVUjXehsNQA0YZq9B7UrH3unejSQq+ku8Zv8kDTQhOvuYLwlyyggRqxZ9yue/ hYE8Bfc0A5JQQKsC+N0HS3Jm9ljaCG9pYoSOLqKCrUP7eNqbRwIAsmfQ3ALptCDqGwPp3p IoWiPR71GA96Fqk8sR8iUStvaRlmxpOxx+oow8IGaQ6lwIqYE6iSKuCR6mhojJbhdZWoqd Z3KlrqVIIiJtGGbelwj4+1PVLXwkSLSgtT2w3Y8kudsT0LyJZQFjY1hNCVoS0fvlDAIgwt IFx92GKB9g1TIPgieEmkieKvdMmZNO1SwnDx5IHN3td7pIcIEiGr1sy4amrirQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698105889; a=rsa-sha256; cv=none; b=EaXq40ILvHO51Bx1nYofNco8Dtavwve7FcBtv7tY4nq2BBb78QqkS/JvYUGwmaZ1J6r5BG C4nrfm3UrrJNrlMhSf2C+uvatO8aj3eZYJdw7GKR3r3P97h7FjNvx0yktlW3vA9JYphfqe 4JYuJpnyQ6hlLwyqGucifgjVacSNDrKPwcSnidUq5DtfVgb1PMyQBKfxphsSsF+BK9Tisd Rc5akYfv97r2eCaockp0u+2ZqIkvg5GB/Vg4l1WSk/3iSMS8neFAeDf8VLYbknW9qHr4eh bQWRcHDCCklX9Ssx626m9YLx4gq3E9tkNfvTdfZ4Ezc5sYw2kLZpowC62Y9lwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698105889; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4yCDTz0eA3m6VrYgBvDDD0q2Ai2+eV+iTkX0P1EMZ5A=; b=lwPnC944dkLh+sIyWqOYG8b/VqixZaehsB5v29in6Gn2+CLZg1XIB45+bnUOZn+ShaJM3G AJ54Q1CMEAVq9KMxUu+Kz7Dv0FneYJNdV2h+X1jl833vb50y/8Lepkr1VfhGnMjFtBY28n w/GPSal/dXGrTp+I0/yOndsfYRhqYOA1r5oe2aSyOcjppFFwPdk4ucjmnxV8VZwMM0DunF zD4floKUP1pwsN9C9w3Pgb0q9VIReAIAEkxg3rd74wHlbeTlycrzimz4RWF6ugBFqBH9c/ nipOxHLnU8D/AWIwHSEXu4dwt4nNSUjfhW1HYuEAFxYGQ8jN89/BV3ZK+bYT3A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDskT1J0tz114x; Tue, 24 Oct 2023 00:04:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O04niT037616; Tue, 24 Oct 2023 00:04:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O04nrW037612; Tue, 24 Oct 2023 00:04:49 GMT (envelope-from git) Date: Tue, 24 Oct 2023 00:04:49 GMT Message-Id: <202310240004.39O04nrW037612@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 5c2a559876d1 - stable/14 - freebsd-update: create deep BEs by default List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5c2a559876d123ba386612319bf42e7b32dee590 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=5c2a559876d123ba386612319bf42e7b32dee590 commit 5c2a559876d123ba386612319bf42e7b32dee590 Author: Kyle Evans AuthorDate: 2023-10-12 02:51:07 +0000 Commit: Kyle Evans CommitDate: 2023-10-24 00:04:14 +0000 freebsd-update: create deep BEs by default The -r flag to bectl needs to go away, and we need to just do the right thing. In the meantime, we can apply an -r in freebsd-update as a minimal fix to stop creating partial backups in these (non-default) deep BE setups. PR: 267535 (cherry picked from commit 989c5f6da99081b1f2b76ec09e91078e531e1250) --- 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 0cfd29731126..f5289e1cd9fc 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -916,7 +916,7 @@ install_create_be () { echo -n "Creating snapshot of existing boot environment... " VERSION=`freebsd-version -ku | sort -V | tail -n 1` TIMESTAMP=`date +"%Y-%m-%d_%H%M%S"` - bectl create ${VERSION}_${TIMESTAMP} + bectl create -r ${VERSION}_${TIMESTAMP} if [ $? -eq 0 ]; then echo "done."; else From nobody Tue Oct 24 00:04:53 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDskY5bt0z4yf8n; Tue, 24 Oct 2023 00:04: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 4SDskY47tzz4GbS; Tue, 24 Oct 2023 00:04:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698105893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aqaCd/acjRS4O/YWgRLueRWuEr4X37AIs6SSodYdX+0=; b=BMUfSzZfYUPfrNkmtkTihj93T9ZelNynAn/cAz1kbYnk9c3PQ53NtPqBOSf7+BebLKMqbs ZFKJtk9/KVsOERHsGMG1Nu9agLMPMhij/Mq+T+TVGxxpD+bT5MMPaGJNSPFBU3N1fkPGVJ gJy/I71vtmtmmOr2vyvghBO6onhSNTuFWJnJs4A9j7djguJOWBZjbJi/HWPSukMDE+3nWF 06YQtI8SntlWyGNUp1kwLvP7eLOIY7sRz+hBuAzZ1Oxb62b1rCFuCvYMhh5Y3nQNZegfU9 i1HMPTdzv7lbf11DgkeT/btWHhDj8TbK6LTi2Sb91XirtYfIGtkBwFmapbS9Sg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698105893; a=rsa-sha256; cv=none; b=a6JOMZGCeqKJJdghXapYB1mSogieS0oLKkE0WeGqSeK2MMkvS+LOWnLccugIh4AdsOqqOV KQ/c0JizF/G2FrEx0IxgX/WxqlOHDDH6GEjUNeur86ARMoZHqPtI7jN68+9l4kGRbnwpPg 9JmrXaoFSNJN2CBB7J55Sa5N7NljejE/RHbmRf1SwfJXHIBSRGb1ryx336SLQRNCDI2giE r5scxCUjZ0YAClBVx0OUQ03xYi01oVZsxwDXmVe8GDnaJM6trov5zV1D0sm3H8hwKD/KmY atotsXFSb4MuPOXZwVFm4iY6PYkv3OA5yzeS8HY9Ck/4fS+VydR9SCjqw83vCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698105893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aqaCd/acjRS4O/YWgRLueRWuEr4X37AIs6SSodYdX+0=; b=PFgmB+Vjybv90y+NRnurkklVy/tFu9+pilPff8gRUMgo2+hmmeBaAfhzgu5e2PPch6xNo4 A53/JjY0+VirS9z7hp5MvsC3GL4aEgkd5X5Rz+d8Iusq/dwTcBTqtHeJfzax3G6jNmSm9i A/O9xCXogt3TYXyNQCBrcLxGjgdItmcHQVCYOqZgqAJMycNNEh0B161Ltqcu8xrS1IIiFd 2U8nVYDmjLOtFUkhSRL6MWpGI2v3jWzoblH+BoxxE5xsrALAHaAREQlwLMSLciadRhf0Gh /P+cpfJZiY3kdma3SDPa4g3ut+gODO1QCZxjqshOdsIdJqJqpQOYWsvlAtyDwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDskY3G1sz10Fw; Tue, 24 Oct 2023 00:04:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O04rW4037763; Tue, 24 Oct 2023 00:04:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O04rwX037760; Tue, 24 Oct 2023 00:04:53 GMT (envelope-from git) Date: Tue, 24 Oct 2023 00:04:53 GMT Message-Id: <202310240004.39O04rwX037760@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: c1c0873c9d3f - stable/12 - freebsd-update: create deep BEs by default List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: c1c0873c9d3f6c05168303d0b95f9363c1e6c371 Auto-Submitted: auto-generated The branch stable/12 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=c1c0873c9d3f6c05168303d0b95f9363c1e6c371 commit c1c0873c9d3f6c05168303d0b95f9363c1e6c371 Author: Kyle Evans AuthorDate: 2023-10-12 02:51:07 +0000 Commit: Kyle Evans CommitDate: 2023-10-24 00:04:42 +0000 freebsd-update: create deep BEs by default The -r flag to bectl needs to go away, and we need to just do the right thing. In the meantime, we can apply an -r in freebsd-update as a minimal fix to stop creating partial backups in these (non-default) deep BE setups. PR: 267535 (cherry picked from commit 989c5f6da99081b1f2b76ec09e91078e531e1250) --- 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 5a523775dbbb..f89ee032e1f8 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -918,7 +918,7 @@ install_create_be () { echo -n "Creating snapshot of existing boot environment... " VERSION=`freebsd-version -ku | sort -V | tail -n 1` TIMESTAMP=`date +"%Y-%m-%d_%H%M%S"` - bectl create ${VERSION}_${TIMESTAMP} + bectl create -r ${VERSION}_${TIMESTAMP} if [ $? -eq 0 ]; then echo "done."; else From nobody Tue Oct 24 00:05:01 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDskj5jCMz4yfJ9; Tue, 24 Oct 2023 00:05: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 4SDskj5FBgz4GjX; Tue, 24 Oct 2023 00:05:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698105901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EN77u2WeFEkwoCIe+zyp8LQDTZBjfNWj8D9gshZVrqg=; b=Vt4ktZo5w2G1b3ABU/fMmWmIaJIm+Fu5SllYKYt0AItpyWcqT0sqwAWQmY5lDV9vi95ghU w/whEZonzE+sjeB9yR8CmxVCv5sjmnS7shqHmFNS1JhoDNJJk9/dz8PkewKPIIHQU/ZUjt FlqTQeIEAwEZlGkqwz3XxAJC8nFv85DFPfvyfh0hLB69nvwNEe7qji1lwlopm+7o45AqW+ Uim2N1+RqFXz1gVbM3pVX3RXRZGxmtokDnM8tStg9lEbqXMQdUxjb0VEHUCBY3H8Z3VCNU AgD9hGqy6DcAKVXoCxsKFCKDiYZDgUywQD4G23ghxK8yvrGdidh2bUskyTUpLA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698105901; a=rsa-sha256; cv=none; b=kVQ8N+1B/vxLEFxmh85H3lmZh33VN7Xpmor5r4iqA0stRQnBryIB8SJBGi5KrSA4a2BLpf J7X7RZDVvc3TsEclUHLGP8h2cl8T9SFNDL9LQgWKMKZhpcGjbizBTgkkS9eJ0a0xKSEX5Y zGlgslwL+/a4kUBtLQJQ3eizZZBk9naA0cFEjnK02aGsjeH8xndXcSlYyy9+Fwyxq9J91X HVzLqr/v0vVtC18K3H4FfW4KDJsuhSv3ibmVVM3xHlQ4Ie7pMMrIuT7rw/Xurdki2EYQF4 57ZeAlR5yRAZuUiAOwq06lD5qAbDEBu8vruP23nGrPvUiRYwmaEcj7ImKLV7/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698105901; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EN77u2WeFEkwoCIe+zyp8LQDTZBjfNWj8D9gshZVrqg=; b=trcTnrYC/CIAdGFwxlsRVvKqruUtL633dm3k5Q1Dj1sWKxobu+Enlrv9KhVw0/+0DaEoF3 5EXrYVzlxXGTHtZn3NifZDd7ZEL3D+VDcwf5pQFxj0ilBogofY83fDi+2Lg/grQCBaDkqs SwMYFyGVtGyLsUcNSzRCBKHhjHMS0bGZrTpdFUn0QUGpSEyBBNnzU+YwsXZlo6xAHi0Y0c 8ci6CywkwN6go64bNApVJ3PDJcP4pNY8G9SvIqF3b8e0aZ+pXOxDzK+xnsuJQfZR6NLX3f O7s5WA/7WDrhiY226foAM5YXMdUs0E3lx5gHCUugSUfpYmRMxC/s5mmCGkv7fw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDskj4HDGz11L7; Tue, 24 Oct 2023 00:05:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O051Ol037945; Tue, 24 Oct 2023 00:05:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O051QC037942; Tue, 24 Oct 2023 00:05:01 GMT (envelope-from git) Date: Tue, 24 Oct 2023 00:05:01 GMT Message-Id: <202310240005.39O051QC037942@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: 80f747781f12 - stable/13 - freebsd-update: create deep BEs by default List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 80f747781f125576de40ab8b3d8d70b351ef0518 Auto-Submitted: auto-generated The branch stable/13 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=80f747781f125576de40ab8b3d8d70b351ef0518 commit 80f747781f125576de40ab8b3d8d70b351ef0518 Author: Kyle Evans AuthorDate: 2023-10-12 02:51:07 +0000 Commit: Kyle Evans CommitDate: 2023-10-24 00:04:18 +0000 freebsd-update: create deep BEs by default The -r flag to bectl needs to go away, and we need to just do the right thing. In the meantime, we can apply an -r in freebsd-update as a minimal fix to stop creating partial backups in these (non-default) deep BE setups. PR: 267535 (cherry picked from commit 989c5f6da99081b1f2b76ec09e91078e531e1250) --- 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 c6432dcd6b0e..438e13a51154 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -916,7 +916,7 @@ install_create_be () { echo -n "Creating snapshot of existing boot environment... " VERSION=`freebsd-version -ku | sort -V | tail -n 1` TIMESTAMP=`date +"%Y-%m-%d_%H%M%S"` - bectl create ${VERSION}_${TIMESTAMP} + bectl create -r ${VERSION}_${TIMESTAMP} if [ $? -eq 0 ]; then echo "done."; else From nobody Tue Oct 24 00:46:30 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDtfb1YTGz4xD4F; Tue, 24 Oct 2023 00:46: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 4SDtfb13qNz4N9T; Tue, 24 Oct 2023 00:46:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698108391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B3g7FG5ukQ3UhgtxwXILJlRS+NSJtdci2qrN+lnGaI4=; b=gdfRDYtTN0VhWiOeNR0nqWO40LWLc/te7E/Z2BY6lJNp+sZ4lm658747xPpnCJ/1KSADM9 hplUAEFJm6IKJRjD5SN90OY9r0PdesMpd9UD89s4Z3SpV8rjmQ8L/WWAFCnGTUPf3XlRPn Bvd3Ph3jK3vcOnJ/0chhAO4t+xfwoLILs6Lyqok2CM76iFdHcDnZd+gZl4ihvH2CstVLfi c/mOCG78VFqFHaOqguJOYClLD4mjGpnk63TFhJQUjBlzpPISgDX5JWjdbjZE5vcoRLHYfI 5Q1bGRvJKimmH46jDpccWZfGgIQVCbQY96DmTG6Vk2bYbjdK3sqGz+EneitQeQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698108391; a=rsa-sha256; cv=none; b=al2E/S1OdIvaT5jo7BZ7n0u+TNbr/3nMo/wDTxn92i7S1GetAMRY6e2LjPllvFnSk0X5H5 IeqrEnciA2EwrcxuIUwPDyYNNHDovU7kJjfJpnDZGARRGGUSfBiBKpzoiH9h5JQE6Yfi67 rQUgI8ZAEPsecZV6mfkH0w+o52OacP5EzDegsPJtp+hPsg1wJhJFoiRbygcgiqUGd+aixI WySeC3ZJVy8HPHOl2CL+2Hu8+z6ZOHsbkSG9cg+Zg1Apyz4rdPv3WAv8x+Q1oswVHOQJ/1 R/N6YeGEoCYDi9fairtbvvMsP9p8m880Wzl1wDR5S1QvUp0HtRXA/oI0lDnfPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698108391; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B3g7FG5ukQ3UhgtxwXILJlRS+NSJtdci2qrN+lnGaI4=; b=FlwjHVKIVCtaPAw093hju8LW4nT/dBc/i38x6TsPDPNk6ydvD5niDTX2rRp4Mmnw6akmFa ihrfFLq4j90ryCCHCH2yDP5rcft5hk1Y4K+P2ob6oMdLEU7neBwF2S72wpWu5n7nuNSBds e0PXf66izGMSX25FSZtw/tof1Urb9XGXoz32RRDaisuFB7FBXq/DGTwzKmAstSMi44icBY kY6ZInmyyBbY4rHbBcXiSCL9C9dOa66TxLd/yDPJO43gKBfNCXrn5Rqdg+WooxHmYLxRr9 PB6RbMHcTBnViWLrT9DWiQzVA9BlfYoDxwhF9pAB7tU+UQBQXG9NcpqIroX2gw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDtfb06HTz1289; Tue, 24 Oct 2023 00:46:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O0kUl0004339; Tue, 24 Oct 2023 00:46:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O0kU8X004336; Tue, 24 Oct 2023 00:46:30 GMT (envelope-from git) Date: Tue, 24 Oct 2023 00:46:30 GMT Message-Id: <202310240046.39O0kU8X004336@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: be2333b68d71 - stable/14 - nmount(MNT_UPDATE): add optional generid fsid parameter List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: be2333b68d71bea99768749db3057f4fd66f9d5d Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=be2333b68d71bea99768749db3057f4fd66f9d5d commit be2333b68d71bea99768749db3057f4fd66f9d5d Author: Konstantin Belousov AuthorDate: 2023-09-29 18:42:50 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-24 00:46:01 +0000 nmount(MNT_UPDATE): add optional generid fsid parameter (cherry picked from commit 9ef7a491a4236810e50f0a2ee8d52f5c4bb02c64) --- sys/kern/vfs_mount.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 8364081585f8..aa4642c0ba8c 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1313,9 +1313,10 @@ vfs_domount_update( struct vnode *rootvp; void *bufp; struct mount *mp; - int error, export_error, i, len; + int error, export_error, i, len, fsid_up_len; uint64_t flag; gid_t *grps; + fsid_t *fsid_up; bool vfs_suser_failed; ASSERT_VOP_ELOCKED(vp, __func__); @@ -1378,10 +1379,24 @@ vfs_domount_update( VI_UNLOCK(vp); VOP_UNLOCK(vp); + rootvp = NULL; + + if (vfs_getopt(*optlist, "fsid", (void **)&fsid_up, + &fsid_up_len) == 0) { + if (fsid_up_len != sizeof(*fsid_up)) { + error = EINVAL; + goto end; + } + if (fsidcmp(&fsid_up, &mp->mnt_stat.f_fsid) != 0) { + error = ENOENT; + goto end; + } + vfs_deleteopt(*optlist, "fsid"); + } + vfs_op_enter(mp); vn_seqc_write_begin(vp); - rootvp = NULL; MNT_ILOCK(mp); if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0) { MNT_IUNLOCK(mp); From nobody Tue Oct 24 00:46:32 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDtfc2fJSz4xDFB; Tue, 24 Oct 2023 00:46: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 4SDtfc284Vz4N2J; Tue, 24 Oct 2023 00:46:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698108392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n75fanb2R+3OAUA9Ag4tOqgpmNKnj2cNGvuL9KALNSg=; b=CN7Fmt/0C7TilUT9eIkU51p5K16wV/okeytrQnvPoLORYeVvfQb1R3fGMDxbyYDWEv9M+0 evSeuhksJHsG7Q79VAMh2IlGJRmtqTuTrYWAzy87EtNlIQQYNYGlhH7gUnQdSqHlmis/4a 9TcSpzZ32gAN9j2KpIIxV8fnq45KZE/UxyxDjPBHo0+L/I/ex7TwANsLS2ErJm0RdjY/UC nl00YlvnocMdJ0woqM9QfhHMIyNPbbX/UjRqw2m6c6ZEX3bI5U84AzmnmasuK1FOCGda+s 1h4By77g8zHHxd6OJS44zXzKFrFxleezm5YSMYk7IWwS7FdrDFvIP4o7e3qEkA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698108392; a=rsa-sha256; cv=none; b=dmlpg3tJbjy11GowoKDj1NpjUR8vYLBp92b/xSHMBv3lSjI1tV47PxQIbNSlfd7zcRTT3V XDOxz62PVJqIYKK/PIg/WgPkYx8fEQ6NJsy7BNb4n4VLdTV4Qza2cb6lAnskrXuvQ6j+Cy lGWaRZlzL5AtMZFekQ2WTXL+uwhljCgtMs4kSK+hAh2gKni5LRZY9H3GbsxSgHrQ0NHaEU k4LC4zQ2tzQAIjA4t+aY/+N3bmHkxRFL34ewYAO4DXrwFjuRTG/VGNniDOEruGTGJg7bFA iryIu8rrcsB0vpcBNGtJX9XrQBQsi9d8NY/lgCAYAS3BzoIeMbk7vgPP74SbpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698108392; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n75fanb2R+3OAUA9Ag4tOqgpmNKnj2cNGvuL9KALNSg=; b=rtkj3+NjH2Y1N1aZyZ4UBobw1FEeQG07rqvr27KPNxLhRBn5dejTj/lV/4QtJDHs9bGNSR pCXuiXa4b4EzGfP/SfSsUEQT6NDacnrZVDq/3nW6MmCuebBGNNnU6qnkzoD6Ttc3toFmF6 DTsiER1CH+r6gz7qujGMUOxpNmi5zAR3hzDcQx/+pyyqOiTp6hou/yV13TrrsBf9DUCuaN 19F/8pK0U74rK6LYmNlwZHTMjDNo5a7NnQdDy5qDCZlBHf/0aEA/5o8K6fnhO+GrPnP7HJ GC4RYWl+S8/1tUSjna4aQkqJzb7lLHNlVXV7giezrX9kct8UVmy9OE6wLKXgjg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDtfc181Cz12LB; Tue, 24 Oct 2023 00:46:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O0kWdi004390; Tue, 24 Oct 2023 00:46:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O0kWHN004387; Tue, 24 Oct 2023 00:46:32 GMT (envelope-from git) Date: Tue, 24 Oct 2023 00:46:32 GMT Message-Id: <202310240046.39O0kWHN004387@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: 361f7820cde9 - stable/14 - automount: check for mounted-over autofs instances on flush List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: 361f7820cde9cc9e9eb7118155b6a39c1a52ef9d Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=361f7820cde9cc9e9eb7118155b6a39c1a52ef9d commit 361f7820cde9cc9e9eb7118155b6a39c1a52ef9d Author: Andrew Gierth AuthorDate: 2023-07-10 15:09:56 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-24 00:46:01 +0000 automount: check for mounted-over autofs instances on flush PR: 272446 (cherry picked from commit 21b8e363c4eb24c0a5659101603cc08a86d87759) --- usr.sbin/autofs/automount.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/usr.sbin/autofs/automount.c b/usr.sbin/autofs/automount.c index 188bbc3a040f..cee647cb4e2c 100644 --- a/usr.sbin/autofs/automount.c +++ b/usr.sbin/autofs/automount.c @@ -260,6 +260,7 @@ static void flush_caches(void) { struct statfs *mntbuf; + struct statfs statbuf; int i, nitems; nitems = getmntinfo(&mntbuf, MNT_WAIT); @@ -274,6 +275,21 @@ flush_caches(void) mntbuf[i].f_mntonname); continue; } + /* + * A direct map mountpoint may have been mounted over, in + * which case we can't MNT_UPDATE it. There's an obvious race + * condition remaining here, but that has to be fixed in the + * kernel. + */ + if (statfs(mntbuf[i].f_mntonname, &statbuf) != 0) { + log_err(1, "cannot statfs %s", mntbuf[i].f_mntonname); + continue; + } + if (strcmp(statbuf.f_fstypename, "autofs") != 0) { + log_debugx("skipping %s, filesystem type is not autofs", + mntbuf[i].f_mntonname); + continue; + } flush_autofs(mntbuf[i].f_mntonname); } From nobody Tue Oct 24 00:46:33 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDtfd3YWyz4xDFG; Tue, 24 Oct 2023 00:46: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 4SDtfd2mPbz4NJ4; Tue, 24 Oct 2023 00:46:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698108393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WpfsW8PQlWCAwPtczMUwtYYc8PefcPqJSz7L/WRR83k=; b=pl2BnjUP7YvCMGU6vFeaDsAGPaX7Is8kA8r0Mxj/sUIp4fSZlXFbziw7DlDRjpr6X/6OeJ 4aXo4EsYLnW4YvVWZKVcni5F8d9/imxVDpdtVIa1uhYkUYsR3dEBxydj74cbnl8UPr08t8 eIXgQcDC2cKnSeRtozFyW/3yUUx2ShuXoQx7sRInxLD/HWeeSVy4A2TXKdoS086BSBW1ta YSj/9oYcdA4Hig9bH7WtpczRAD8kmT3c5gsbI3Nexlhfmnb5FBp7jh1APOu3UGCKlUy0ON iEBdQA2zSQgR2S/KB9bZa3pestJspbwFA6l5LSa5W2sNgd3UDLKKkMn6FitCEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698108393; a=rsa-sha256; cv=none; b=baeOer43soIwP18XtPvLJh2ejQQbXWs+EiBXEE6L8fgbHoYY9W7rFPWzD/wftU2cHMfw0H IS7FrKzzyMTb1Ier2M9O09uiEh60AWhw5PpalBdISxC+ulQ85ZMuZ2ja3UGnRr6xdGvhNY r5vrRNHsxBxrevPD4/s+70GQU1RklQqd3CPOfSigBHuUxKeWxZqlCCHNwg1slio8HQhsES FP/l3wnC4wRiOVYFMcGw5uOW7BfEGKo99fLgOucMddF1N67Ua07DcJerdhOnGdeo7HioYn wufkTVZrfRrVK6zxy4QBTqBjWCrSfuCl2eFHIxJYYHtnaitjyjrsd+hmc3zRKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698108393; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WpfsW8PQlWCAwPtczMUwtYYc8PefcPqJSz7L/WRR83k=; b=rqu+5zIfZzx8RHAkF0XP16IYB+j0WL1O92zvItRJYmIdLbyb5Ecd1es7cHwTqKjpa1ODHb kYT+1O6JEv/Il5lIVKL7yfNnLrTVi1ikbLYoRsVXXDiJv+3ZD42kiiElBBzNQ8KTruiBEJ ZODLkYjqL7TD0uV0vc694a9HZpLGnyLvECsaFDor49/+RDosTaase0HleoEFXNkJrukiOK e5fSMd9QSlXI4LRGrMPdhDix9Uphp3FcuyYEoeakaYvO+BKIhYWaWL4684hTpjkxcaLbOh 5ygXREmWAhUCL5F+8WcsfTecFekAK5sBwfKonMka0AWT/KugBEIwPXiBX2zFjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDtfd1gfcz12LC; Tue, 24 Oct 2023 00:46:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O0kX7B004440; Tue, 24 Oct 2023 00:46:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O0kXa9004438; Tue, 24 Oct 2023 00:46:33 GMT (envelope-from git) Date: Tue, 24 Oct 2023 00:46:33 GMT Message-Id: <202310240046.39O0kXa9004438@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: c5f92e2ac8aa - stable/14 - automount(8): when flushing autofs, specify fsid List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: c5f92e2ac8aad3c0d5e9659257f02846944bb347 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=c5f92e2ac8aad3c0d5e9659257f02846944bb347 commit c5f92e2ac8aad3c0d5e9659257f02846944bb347 Author: Konstantin Belousov AuthorDate: 2023-09-29 18:43:42 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-24 00:46:02 +0000 automount(8): when flushing autofs, specify fsid PR: 272446 (cherry picked from commit 56c44bd92efa002b2185445878fc98172ae8c66f) --- usr.sbin/autofs/automount.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/autofs/automount.c b/usr.sbin/autofs/automount.c index cee647cb4e2c..6637e16c9129 100644 --- a/usr.sbin/autofs/automount.c +++ b/usr.sbin/autofs/automount.c @@ -229,7 +229,7 @@ mount_unmount(struct node *root) } static void -flush_autofs(const char *fspath) +flush_autofs(const char *fspath, const fsid_t *fsid) { struct iovec *iov = NULL; char errmsg[255]; @@ -242,6 +242,8 @@ flush_autofs(const char *fspath) __DECONST(void *, "autofs"), (size_t)-1); build_iovec(&iov, &iovlen, "fspath", __DECONST(void *, fspath), (size_t)-1); + build_iovec(&iov, &iovlen, "fsid", + __DECONST(void *, fsid), sizeof(*fsid)); build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg)); @@ -291,7 +293,7 @@ flush_caches(void) continue; } - flush_autofs(mntbuf[i].f_mntonname); + flush_autofs(mntbuf[i].f_mntonname, &statbuf.f_fsid); } } From nobody Tue Oct 24 00:47:47 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDth41tVnz4xCkT; Tue, 24 Oct 2023 00:47: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 4SDth41N4nz4PMl; Tue, 24 Oct 2023 00:47:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698108468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3hDm3AVlqWxleHY5qGtGCG4vl/rPeNRPQGVq+G/DTmQ=; b=wppbgBiD00gObPVM2S9/xn+pA1sg6En7KCrYAe5hRSuwpr0+vGZOqCBHKnRC7wAWo5GFah sam8rKiEK/XfXMMbPc8/IcP9zE8G4FR/WOAGxsg8EAIRmvFpCs1ZKCoNZRleHBwOEjO7rh kkg4rrUiGUcKOIpHUBZ3frjhxbFCX5U+Qa7c+92i1kI20gXHa9ik4zps5Aq2v2ULHHdVNT ADgagUhkt3jN+UUBy2OYSIEQj3tiUsBRYihaF8cTNflF09votkvOdvZkT5rTxOkak10lsG vhjiMFkdOpS0tiJZg0TCBUQZFhTKtRom4JldiVF6pi/lHxXv481WsKrcu41Qhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698108468; a=rsa-sha256; cv=none; b=UeL5Jri7+9mebgjMzoWuPwYmnqx5YuhmbvckaE9H/2bfpJGcHAnaUzvymqae0k9lziPYKn ZgYXrRc+HWlm7sLCaKqUHEZh9aooDGK0R7ImSwHRaIPw2kYMA5AVkSiNJAOeGvWfDP7N+v fAZ3kJrDz9cgxDXO1FVYVw5B+8QEjz7cYIyQMNYbyJH2W+cvjMymIXMsdu9OaGv81NRcnR 3msWp/fKml9L6WAVCJJTyfQLnar35omIS5bSdVxCYG41AtubgD9XsVjUjKKVjj+mAWTig+ nEaGHN2hRTKpVqoyuptINhL6E1AUvQDQ57+ibDOGe/j9fG/sPjc3nj2JjVqa3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698108468; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3hDm3AVlqWxleHY5qGtGCG4vl/rPeNRPQGVq+G/DTmQ=; b=RbATiof0os5q6vvTjc91WqCGu4AtX8WZENnvmupABKvm0gqHkicXKDoDZMNuZQI0ipsgHm tH9n/wrs81hcbfFTB4JE4Ucb8B60sB4zenDaEIBd6L+mJVZJifCAZEsNL1+bIDhMZ6W7cw O1yHBT9UA3+ByHP+KqKRwKhfoYGavcc/y0xb0YOOLyiuIWGeiEvihgK8tUqgPUQzOAzOJA YPvynKwdq95ZWuaO/soERHJWbc6g0X8wB/K3xJgnMrpryQJSseguAbhXn2FGm+sF4GRs57 kyWqGPdL2lqgWJvUGrTjOfpczzWD0z3phKTYchoX1lqAl3kOUymAFuYEYMgWpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDth40Rr4z12Hx; Tue, 24 Oct 2023 00:47:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O0ll3C005024; Tue, 24 Oct 2023 00:47:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O0llqL005021; Tue, 24 Oct 2023 00:47:47 GMT (envelope-from git) Date: Tue, 24 Oct 2023 00:47:47 GMT Message-Id: <202310240047.39O0llqL005021@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: 321af2d24da0 - stable/13 - nmount(MNT_UPDATE): add optional generid fsid parameter List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: 321af2d24da0a54612f473afca2d3fec5820132f Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=321af2d24da0a54612f473afca2d3fec5820132f commit 321af2d24da0a54612f473afca2d3fec5820132f Author: Konstantin Belousov AuthorDate: 2023-09-29 18:42:50 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-24 00:47:19 +0000 nmount(MNT_UPDATE): add optional generid fsid parameter (cherry picked from commit 9ef7a491a4236810e50f0a2ee8d52f5c4bb02c64) --- sys/kern/vfs_mount.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index 25c4adeaae62..a4a981603ab6 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1154,9 +1154,10 @@ vfs_domount_update( struct vnode *rootvp; void *bufp; struct mount *mp; - int error, export_error, i, len; + int error, export_error, i, len, fsid_up_len; uint64_t flag; gid_t *grps; + fsid_t *fsid_up; bool vfs_suser_failed; ASSERT_VOP_ELOCKED(vp, __func__); @@ -1219,10 +1220,24 @@ vfs_domount_update( VI_UNLOCK(vp); VOP_UNLOCK(vp); + rootvp = NULL; + + if (vfs_getopt(*optlist, "fsid", (void **)&fsid_up, + &fsid_up_len) == 0) { + if (fsid_up_len != sizeof(*fsid_up)) { + error = EINVAL; + goto end; + } + if (fsidcmp(&fsid_up, &mp->mnt_stat.f_fsid) != 0) { + error = ENOENT; + goto end; + } + vfs_deleteopt(*optlist, "fsid"); + } + vfs_op_enter(mp); vn_seqc_write_begin(vp); - rootvp = NULL; MNT_ILOCK(mp); if ((mp->mnt_kern_flag & MNTK_UNMOUNT) != 0) { MNT_IUNLOCK(mp); From nobody Tue Oct 24 00:47:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDth52r2Mz4xCwL; Tue, 24 Oct 2023 00:47: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 4SDth52NpGz4PpV; Tue, 24 Oct 2023 00:47:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698108469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qA5DgNKZtUDZD+udUGM6tAW7JinBQKVw/HDIPdahBUw=; b=NqXSrP98vcNjdJnvGSAMQtWxKmls/kyynMCtUBP3KbUkxiL39lQFTZ1ygVGJl/t6SHhFUY XVtvo7gdZeJt5RD7nrX+updBErGrJKd95VFlrfHoXbBxWHN9rPE+ChkKwd0oYSxJfK/k5S ORyUssqJhDeGSM7Sn4iKVFRKhTWpbQb+c2cwgbiNq2Hyw92N0adEdjZh0URoY/iRBDnJg+ vI92Kn2qOFkQ5YAid8AI2ymUPTxWn6hw8M5LIVZPWtJPjuL660kLn+qgKxGqN/s9zjOGE0 kBIin2UxlI2jfkLjHMm4NCjTIOARzRKVCIYVHn64Lt5IYt29kyNACNUDyL/klQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698108469; a=rsa-sha256; cv=none; b=lO6u4fMf7k5t0eB3BTP1YYdpl41v1Uo7QWhSDrcexnI2fY18eR/xQFR7sxnsm7TBIBAGaJ pQvHx+6lS5EDgexhTM+6JzCO8PXKI5KO6YAaxaCLtATW63OkPpulqMmNni1fsohQjFvryy hZ2ALa8SrADQcEehmkgb01fclfc1aNgKLzFBc4AlOFiS2RbVXG1p17xdEQQM9ZwGTdoLcg dD26YxheV4naTI2l0WEvZYTx3BG2P7T9AwNSY3R17Sr3AM3zkSEoV+beKa8eClAjlqj0uG q4fZ8DwbHbmWrxNgSYJl75981Ozp1AKrAqrvRw87wG/dMdXkHa9Da9vu59NHBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698108469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qA5DgNKZtUDZD+udUGM6tAW7JinBQKVw/HDIPdahBUw=; b=va/0/xGzl64vyfF+q1E6tHFkSL56yINjbww/ie3f9rMEP2zg2WpqzpMOgab+vNRsJzW1hE W188RQlO5ziovBC7lz99AHkOoI30JBc/I5nq3x038tU6/hUMf+/SxcFbC+sHo+8ZJIInB8 WYLoRoO2+7zxbzJaZ6YWs3cLqb8Wn/YphPPJsLPtvikcKtX1l8yItnJLnUrVyW/7Cx+KHL Mq6/PT0UkJ2PU6Od5+GqPohGyHYYVcnFcLCUpNhRjXbuCIHclmCtPH0eRcPhg5qz8lCxUy qmuTSllZjNHFJbVG1bt6rQaoruNX1PigJrCqWxbQ1p5Hv55q+nAyp+GeQFlzFw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDth51RjLz11Wp; Tue, 24 Oct 2023 00:47:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O0lnuH005076; Tue, 24 Oct 2023 00:47:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O0lnZI005073; Tue, 24 Oct 2023 00:47:49 GMT (envelope-from git) Date: Tue, 24 Oct 2023 00:47:49 GMT Message-Id: <202310240047.39O0lnZI005073@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: 29dae977ae9b - stable/13 - automount: check for mounted-over autofs instances on flush List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: 29dae977ae9b01f429ae876743514da92ee8ecf4 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=29dae977ae9b01f429ae876743514da92ee8ecf4 commit 29dae977ae9b01f429ae876743514da92ee8ecf4 Author: Andrew Gierth AuthorDate: 2023-07-10 15:09:56 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-24 00:47:20 +0000 automount: check for mounted-over autofs instances on flush PR: 272446 (cherry picked from commit 21b8e363c4eb24c0a5659101603cc08a86d87759) --- usr.sbin/autofs/automount.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/usr.sbin/autofs/automount.c b/usr.sbin/autofs/automount.c index 188bbc3a040f..cee647cb4e2c 100644 --- a/usr.sbin/autofs/automount.c +++ b/usr.sbin/autofs/automount.c @@ -260,6 +260,7 @@ static void flush_caches(void) { struct statfs *mntbuf; + struct statfs statbuf; int i, nitems; nitems = getmntinfo(&mntbuf, MNT_WAIT); @@ -274,6 +275,21 @@ flush_caches(void) mntbuf[i].f_mntonname); continue; } + /* + * A direct map mountpoint may have been mounted over, in + * which case we can't MNT_UPDATE it. There's an obvious race + * condition remaining here, but that has to be fixed in the + * kernel. + */ + if (statfs(mntbuf[i].f_mntonname, &statbuf) != 0) { + log_err(1, "cannot statfs %s", mntbuf[i].f_mntonname); + continue; + } + if (strcmp(statbuf.f_fstypename, "autofs") != 0) { + log_debugx("skipping %s, filesystem type is not autofs", + mntbuf[i].f_mntonname); + continue; + } flush_autofs(mntbuf[i].f_mntonname); } From nobody Tue Oct 24 00:47:50 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDth675KPz4xD8q; Tue, 24 Oct 2023 00:47:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SDth63X1Nz4PqB; Tue, 24 Oct 2023 00:47:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698108470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=do6kJycXy0u6uNVAy8go+HXagkQF6XxxBtiGhjGn4NM=; b=QmDioMIhW8EOJNOJJk5WYGgtEt3AhPZlyWw0Ui05TrQFTTGHIEnEq6oOzYKjCoMZkovAjA n+4d/7twJ61jOrAANRt+nmZM402mxMUHAVmmMxT2mHo2vw63hgJqxWtCUDRKYA4OF7PinB J8x36kWWpnUI8Y4riejEgjw0prv/9kXCsI4zZA0rhrHJSTtxeyBTwEBzKGggBUoCnLXIlK ssrMqqLGdNrnAHtHb0hmH7FWVfnX8JIgZ7DbsQsR27+1Y5wW+v8VR1hf3KcSa2gOxy6ubo cB7LqeUDMBl+/cl/HsNiZ/XpA925A06HwMEYSHQ/PUbCDu/D+4OFOZTlL13ZAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698108470; a=rsa-sha256; cv=none; b=CNcUmi3Hw8I69RGgZxuGbKcIfukbce4X0tuGvWGQqx4KHAouEKcdj2RTPKPImIXMnPBKv5 WKWAkPoKG+xmkS3hC8Ui3RKDt6bkW+ThulGZ21bqb1idqqGeyoyhRWQ7Kfykm/CdkGE+o3 sMDV6e5SPUtcjBTkCXDEUmj3rNiuFVJ3UK+Q9obk0NYuDJRLeZOmteUp1ijINqy/T2z9/z p+/yFNj8hq/DCflKKvJQKBxV+dYIm1lGVrbZF+m26+QHPtzJYDXqHFayddRPnu8Z9Fulbb nRejnzfwqeWs9q8IrV9KZmqj2mBWUrUJelDe6y2YJWFkr7jZ+hFhw7i2l4/5Hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698108470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=do6kJycXy0u6uNVAy8go+HXagkQF6XxxBtiGhjGn4NM=; b=qyij+qLuwvTPcjYU5KAMpufE7JmxWc+bA/aCtZzW0VVSrhbfihDMu8p66dhkJV3NQLgyKA e/KoJ0c4T4CzAxqiIZTkhUIK/jKC4vP1oc7lfH6GYk/1BjLEHUV7jIefREx1KCWj+T8xNF U1XGv2Yeq1DCGj4qDHfV1M1QaHtjfv3xboI5FWwNc6adWtIrk7HeziQeijQH48vOQhjqO6 6XB8hOjzH2VvZaD6sYxgZKZRbBPT8xQ0D1K4LJERYdknaleYhipC6OZmKmPZk8fntpNiJW bl6uPJyFw/B120xHZslrUEsEi9gdKJK14HOHWbReMMg8gmkyslHoZEjqrYi1YQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDth62RtZz12Hy; Tue, 24 Oct 2023 00:47:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O0lotE005126; Tue, 24 Oct 2023 00:47:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O0loNI005123; Tue, 24 Oct 2023 00:47:50 GMT (envelope-from git) Date: Tue, 24 Oct 2023 00:47:50 GMT Message-Id: <202310240047.39O0loNI005123@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: 2746fc0a5c89 - stable/13 - automount(8): when flushing autofs, specify fsid List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: 2746fc0a5c8956deb2a13822c640fbee0fba5b95 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=2746fc0a5c8956deb2a13822c640fbee0fba5b95 commit 2746fc0a5c8956deb2a13822c640fbee0fba5b95 Author: Konstantin Belousov AuthorDate: 2023-09-29 18:43:42 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-24 00:47:20 +0000 automount(8): when flushing autofs, specify fsid PR: 272446 (cherry picked from commit 56c44bd92efa002b2185445878fc98172ae8c66f) --- usr.sbin/autofs/automount.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/usr.sbin/autofs/automount.c b/usr.sbin/autofs/automount.c index cee647cb4e2c..6637e16c9129 100644 --- a/usr.sbin/autofs/automount.c +++ b/usr.sbin/autofs/automount.c @@ -229,7 +229,7 @@ mount_unmount(struct node *root) } static void -flush_autofs(const char *fspath) +flush_autofs(const char *fspath, const fsid_t *fsid) { struct iovec *iov = NULL; char errmsg[255]; @@ -242,6 +242,8 @@ flush_autofs(const char *fspath) __DECONST(void *, "autofs"), (size_t)-1); build_iovec(&iov, &iovlen, "fspath", __DECONST(void *, fspath), (size_t)-1); + build_iovec(&iov, &iovlen, "fsid", + __DECONST(void *, fsid), sizeof(*fsid)); build_iovec(&iov, &iovlen, "errmsg", errmsg, sizeof(errmsg)); @@ -291,7 +293,7 @@ flush_caches(void) continue; } - flush_autofs(mntbuf[i].f_mntonname); + flush_autofs(mntbuf[i].f_mntonname, &statbuf.f_fsid); } } From nobody Tue Oct 24 00:57:30 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDtvG2xHdz4xDhj; Tue, 24 Oct 2023 00:57: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 4SDtvG2N2Zz4RJP; Tue, 24 Oct 2023 00:57:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698109050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SnzngUaWsRaP7iUOvqUSo1L/CJCP3hPfXSrM3Sl3fUc=; b=EEWTgDmjlb4bOq29SSz6pDZo7U+C+/KnMWpHpBNFl5y4pNhbCV6QgUIK2esRoDK5jn9bfE gdZFVXKPMaZy0iVNuKRO0mUSJAdLQTsTtKsei3M+geOI7fKHMtheCbrlgzdC/kbg7oCrw7 yXMalKnJ/nAHJNcbcv0bpA6QY/dX3DIJWhKgfkJg2JjYZjIQEcLP9P+1tCLcQlZXapZCjk eRx5Grm6ZLawq+oCfsIj8f4Z0U3UcWy59sK6eJQCviPxA/uZRWTAJkKq3SlHbdzcylopLY 0jCofqnD8kCgxTsv1tCk653TcsL5+lAy+S6HiHN3Xw3+DvaF1oFTfXtmBsbosA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698109050; a=rsa-sha256; cv=none; b=N5MnRv73oXZz/aBQMNRTuV6AXGpKg1ZlrV+s52noGmnRnwl3J5oO5it+seSnHfrNCjo7PG +JwAh2UCHNckoJAdNNKRtl8n8OFXMSjAF52/B2DaGssnciPct87dpRI0RQRUOv6ZexbJNH al9bjtFiF+5HSg9Ca4TTtrKfWMoBuL9x6PGyfjcS0Dtb7JSwnBab+lva6NVS6NFvC0i92T ZeUvQ6NMJTNKch/ULw6pTNhRiWS27oBMEYY/gVUg36n82uGCYUWlOeRbjizmN3wgdMAkMA YKDEWfc+vPL0/WrkT/tRSv5QOtIzQl7doS+VLGyswzpECYPApiFPgLfccz+ViQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698109050; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SnzngUaWsRaP7iUOvqUSo1L/CJCP3hPfXSrM3Sl3fUc=; b=mYaI1LjvvZERJiEXZ+cb8qJlODSioyy5nqIG/MsZdfvxAB1e9zP/DiCyLS2QVvGlhpFnNT 43nNCrryHT+0yEV4Prw20O/UjUzSbfr/RiNvGF/RmPxxtLhCA6hftsDALzWsY53NINwcg5 YHtAXagcrIDvp3Zn5YVDCao22nVOf/uRo0lpwAb1RCDwcHgXfBX3qTbi3josY+U0anHH8F J1e2RDXXB9N1J5WcVJZIOkGQUOZBh9PXhq20D0efQuN3sn0UEsl6W61boUj9V+aPjwjzNV a8g+gca5Ocyyhgt3en748KAbFz2pW423e12qvg5sSSmarB3sN9/lpVAZ8whafw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDtvG1NQ9z12ZC; Tue, 24 Oct 2023 00:57:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O0vUBL021635; Tue, 24 Oct 2023 00:57:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O0vUbR021632; Tue, 24 Oct 2023 00:57:30 GMT (envelope-from git) Date: Tue, 24 Oct 2023 00:57:30 GMT Message-Id: <202310240057.39O0vUbR021632@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: ede6fd06726c - stable/14 - setusercontext(): Apply personal settings only on matching effective UID List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: ede6fd06726c02e9d2a5c47ac8cf80d8aaec5a70 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ede6fd06726c02e9d2a5c47ac8cf80d8aaec5a70 commit ede6fd06726c02e9d2a5c47ac8cf80d8aaec5a70 Author: Olivier Certner AuthorDate: 2023-05-30 16:35:08 +0000 Commit: Ed Maste CommitDate: 2023-10-24 00:57:11 +0000 setusercontext(): Apply personal settings only on matching effective UID Commit 35305a8dc114 (r211393) added a check on whether 'uid' was equal to getuid() before calling setlogincontext(). Doing so still allows a setuid program to apply resource limits and priorities specified in a user-controlled configuration file ('~/.login_conf') where a non-setuid program could not. Plug the hole by checking instead that the process' effective UID is the target one (which is likely what was meant in the initial commit). PR: 271750 Reviewed by: kib, des MFC after: 2 weeks Sponsored by: Kumacom SAS Differential Revision: https://reviews.freebsd.org/D40351 (cherry picked from commit 892654fe9b5a9115815c30a423b8db47185aebbd) --- lib/libutil/login_class.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libutil/login_class.c b/lib/libutil/login_class.c index 90a3ec5d106a..1036e9f9208c 100644 --- a/lib/libutil/login_class.c +++ b/lib/libutil/login_class.c @@ -546,7 +546,7 @@ setusercontext(login_cap_t *lc, const struct passwd *pwd, uid_t uid, unsigned in /* * Now, we repeat some of the above for the user's private entries */ - if (getuid() == uid && (lc = login_getuserclass(pwd)) != NULL) { + if (geteuid() == uid && (lc = login_getuserclass(pwd)) != NULL) { mymask = setlogincontext(lc, pwd, mymask, flags); login_close(lc); } From nobody Tue Oct 24 01:15:57 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDvJY2PtWz4xFs5; Tue, 24 Oct 2023 01:15: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 4SDvJY1zSVz4TDW; Tue, 24 Oct 2023 01:15:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698110157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZyWW8snh8rffYfN78kQS/GBjqqPSKEOdoiw4lmwZYsU=; b=XFOeiWs0NhVj8E3/6T6OzLSq1opfjRDDurAqKIwwqX+jlmUw4CpqWuzT+lQ2VUa9XA77iU M1BbetuWXKgHe1fRXu2alrWSfqcyhja53r8iiV9dNCrpVh9b1PbguijSM0QduVSKI+HLey OdsMatansSfBD5eNkRvLmwr67+aDk/tPMQGJ7Nwiy7mqwVIp0swxqFDosA50vws+trYSX0 h7y6HY2F0Es9vSPUO5/2EKoM2ogtQsx6tU6rs9oYY+wMpSLlk9hz3j6SOcoXxR5GersB+a zUSBbO1pCBlXXXSU1nYkMXz65SvBJ8BT5jCoc1z9cwiqkNtJX1FZBLmsBT7aYg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698110157; a=rsa-sha256; cv=none; b=lEvKPzYoQQYz0o6hhiKKClD+aI5xkB1kAFkku8RnebcRIWs5dLL5e3XIO5ZuSmouZeLKvV W1KX+BRmDCnCE7Vhs1aj0pBVBFtJcdUwYDuWMoOxv/ISatHUSzzzOeRyA/zHlYaZU5+ZHL tocj6Qex8ccAroKvLm+/+KXqXkIzPJ8wunwp7r4pUWQBslYXejBFuU5wW/LgB0RFo5npOJ cimb1WEmiPHPcFMdqMcpHnBqKZfVYfGY1lWlC4u/EkfJBZ2joJxVLutb4wq6g7G2iu6dJy fmoungS6CZxUwwA7OjgEjWjn5Dr+lTkxilw53y8V5yMsYm8x9YYIRVFxiaQLcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698110157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZyWW8snh8rffYfN78kQS/GBjqqPSKEOdoiw4lmwZYsU=; b=MUgZdTWVaMjET3gYYOL3tqDWxAA4KvY7i9O3N+FEBGeQxMhJskRMtGa922WyOA57GtOJnH Lb7yhanCgN/v2/J3iF+7CuE1HtS4tx4hI2eDHVfNE5zQSPmH7m8co+kstPZVhL2vVfWivC esxZV16tLVmstkKhPsj6uoR0wU+KAkyeNJrKCxrrs66vEbGWRzfYWmkbqL+nIixAVJY4qL XQfiFCyVG5UAEvVPwQVo9LzjRterbkPWEMud+Ky8X50kY0tjGQIcBPZQ/TAML2HJV2ZnA7 SvBe066kjKN9zutYVcozPEIHWUnYlIyvoLokfemezKgcU2FHAE/cD5pOis19bA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDvJY1521z12nK; Tue, 24 Oct 2023 01:15:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O1Fvqv055741; Tue, 24 Oct 2023 01:15:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O1FvMZ055738; Tue, 24 Oct 2023 01:15:57 GMT (envelope-from git) Date: Tue, 24 Oct 2023 01:15:57 GMT Message-Id: <202310240115.39O1FvMZ055738@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: 19232cc73b4b - releng/14.0 - if_re: add Realtek Killer Ethernet E2600 IDs List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 19232cc73b4b17246bbeec9dd133648ca1b608c0 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=19232cc73b4b17246bbeec9dd133648ca1b608c0 commit 19232cc73b4b17246bbeec9dd133648ca1b608c0 Author: Sk Razee AuthorDate: 2023-10-06 06:08:16 +0000 Commit: Ed Maste CommitDate: 2023-10-24 01:15:26 +0000 if_re: add Realtek Killer Ethernet E2600 IDs PR: 274292 MFC after: 1 week Reviewed by: kp Event: Oslo Hackathon at Modirum (cherry picked from commit 3c871489cdd6c5606b2b1125f66b0e9b8f39561f) (cherry picked from commit 50cf84e93c5be087316da4495395b66793fe80d9) Approved by: re (gjb) --- sys/dev/re/if_re.c | 2 ++ sys/dev/rl/if_rlreg.h | 1 + 2 files changed, 3 insertions(+) diff --git a/sys/dev/re/if_re.c b/sys/dev/re/if_re.c index 27984200bd91..83fd31fc4f0b 100644 --- a/sys/dev/re/if_re.c +++ b/sys/dev/re/if_re.c @@ -178,6 +178,8 @@ static const struct rl_type re_devs[] = { "D-Link DGE-528(T) Gigabit Ethernet Adapter" }, { DLINK_VENDORID, DLINK_DEVICEID_530T_REVC, 0, "D-Link DGE-530(T) Gigabit Ethernet Adapter" }, + { RT_VENDORID, RT_DEVICEID_2600, 0, + "RealTek Killer E2600 Gigabit Ethernet Controller" }, { RT_VENDORID, RT_DEVICEID_8139, 0, "RealTek 8139C+ 10/100BaseTX" }, { RT_VENDORID, RT_DEVICEID_8101E, 0, diff --git a/sys/dev/rl/if_rlreg.h b/sys/dev/rl/if_rlreg.h index 01634bb704c7..808d11e34346 100644 --- a/sys/dev/rl/if_rlreg.h +++ b/sys/dev/rl/if_rlreg.h @@ -991,6 +991,7 @@ struct rl_softc { /* * RealTek chip device IDs. */ +#define RT_DEVICEID_2600 0x2600 #define RT_DEVICEID_8139D 0x8039 #define RT_DEVICEID_8129 0x8129 #define RT_DEVICEID_8101E 0x8136 From nobody Tue Oct 24 04:40:47 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDzrv2PS8z4xTv2; Tue, 24 Oct 2023 04:40: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 4SDzrv1qzrz3HhQ; Tue, 24 Oct 2023 04:40:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WSHds4X3+giVKSNQOR5kIpcHP7cfxhXwHoZvE6y/z2Y=; b=Zk2oOsvE1FHrNrMITrc5dT4cy+RA5CBzxxek39KrNq5CMTUWlTk/EZ8zrWMWwI4CZEFC2W RnCALnbBzHVP5sAz1EM9iFXzf1/IJ/hgwT1XzVmILgglmPABWnwWTjlES2/HmdPkHwYW+6 QZc6oM9zYz/H0WJ8VM/4FqoV7203O13UUhyztUgUdqsi5unPCwua9HlHw1cE7TH/TPXZsO NoYnXiqMQzpv1BnVXgBxcJd3AebS7xkvRER4scuzc5YE9o+vLV6nvHN81NParstqk0TS5c GIdFQ/bl2jh9xrt7PFMPBjYL9FlxEbj4SQ2KUA354tbBZzYutXp4BINXZVPAqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698122447; a=rsa-sha256; cv=none; b=eVhVuJeFoVJxQXhS4RROZ5B5koYN9j3EQXYCC5gf0c8et8vZhF+bB2wx6/kG8e0Cy4cB8Y PqvaWNwhEydg+fJgbylL+cmKLFDJZHJvgWYmkwaE4X3fcSB0CT35IgItT4e59OGP8gr6Cn Cg+9pWRdn7rz1k4dAnEnkX/WPIDxn2Sqo5fLaEmBJYtnZHhvemLhbliL3vby6KjkFrg2AR NzT3WgxfzRnmeu+uqOtDAg7Z4mSyuMyrmDoDLrNViPKoXeAJxqPU7YLERAAKDucehB70EA NJB0bkUj8T9osSqtut0D7sxOI+yCChbXsChbWLNpA1j5Rd7zYe4IK+CVa0pDvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122447; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WSHds4X3+giVKSNQOR5kIpcHP7cfxhXwHoZvE6y/z2Y=; b=PF55ibfEimQZi2GYz3pE1PRxGBHUPAu36j9YDbo/kFNmlLu38RFiPtGilzKdynJYpMcIfw XvW+wQyFZDmzB32L+JsDcxE3DVukPl8vvxvJBZ+d4eoHI/MBks1W6vxb669XAPrm4oE2Hp kFjree7WPlXqXV8lzpwUCAjIj447q6hcnqoM3dj5/Tl21dVKC9z40lvkmSKdZMlIrjkzBL 3ydckc5J4vyjvcHZIYrUWH6NI+sI3KEI9oUbDwydIdKzELEf9h3mMBDQK8whF1qQWMiq1F n6dZMszUGQlBVSFN7ZupW2bAWw39cr9h/XmRnNyxRGya84IzxCHrpZ524M+IBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDzrv0wGdz17ry; Tue, 24 Oct 2023 04:40:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O4elKQ099400; Tue, 24 Oct 2023 04:40:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O4elox099397; Tue, 24 Oct 2023 04:40:47 GMT (envelope-from git) Date: Tue, 24 Oct 2023 04:40:47 GMT Message-Id: <202310240440.39O4elox099397@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 9e48b627aed3 - stable/14 - vmx: Prefer consistent naming for loader tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9e48b627aed346bf5e950134a581218d3097eb7c Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=9e48b627aed346bf5e950134a581218d3097eb7c commit 9e48b627aed346bf5e950134a581218d3097eb7c Author: Zhenlei Huang AuthorDate: 2023-10-19 17:18:25 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 04:39:31 +0000 vmx: Prefer consistent naming for loader tunables The following loader tunables do have corresponding sysctl MIBs but with different names. That may be historical reason. Let's prefer consistent naming for them so that it will be easier to read and maintain. 1. hw.vmm.l1d_flush -> hw.vmm.vmx.l1d_flush 2. hw.vmm.l1d_flush_sw -> hw.vmm.vmx.l1d_flush_sw 3. hw.vmm.vmx.use_apic_pir -> hw.vmm.vmx.cap.posted_interrupts 4. hw.vmm.vmx.use_apic_vid -> hw.vmm.vmx.cap.virtual_interrupt_delivery 5. hw.vmm.vmx.use_tpr_shadowing -> hw.vmm.vmx.cap.tpr_shadowing Old names are kept for compatibility. Meanwhile, add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. Reviewed by: corvink, jhb, kib, #bhyve MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D42251 (cherry picked from commit f3ff0918ffcdbcb4c39175f3f9be70999edb14e8) --- sys/amd64/vmm/intel/vmx.c | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c index 51c6afe5a7da..317ed7e5d7fb 100644 --- a/sys/amd64/vmm/intel/vmx.c +++ b/sys/amd64/vmm/intel/vmx.c @@ -192,15 +192,18 @@ SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, invpcid, CTLFLAG_RD, &cap_invpcid, 0, "Guests are allowed to use INVPCID"); static int tpr_shadowing; -SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, tpr_shadowing, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, tpr_shadowing, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &tpr_shadowing, 0, "TPR shadowing support"); static int virtual_interrupt_delivery; -SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, virtual_interrupt_delivery, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, virtual_interrupt_delivery, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &virtual_interrupt_delivery, 0, "APICv virtual interrupt delivery support"); static int posted_interrupts; -SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, posted_interrupts, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, posted_interrupts, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &posted_interrupts, 0, "APICv posted interrupt support"); static int pirvec = -1; @@ -213,10 +216,10 @@ SYSCTL_UINT(_hw_vmm_vmx, OID_AUTO, vpid_alloc_failed, CTLFLAG_RD, &vpid_alloc_failed, 0, NULL); int guest_l1d_flush; -SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &guest_l1d_flush, 0, NULL); int guest_l1d_flush_sw; -SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush_sw, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush_sw, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &guest_l1d_flush_sw, 0, NULL); static struct msr_entry msr_load_list[1] __aligned(16); @@ -832,8 +835,12 @@ vmx_modinit(int ipinum) &tmp); if (error == 0) { tpr_shadowing = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.vmx.use_tpr_shadowing", &tpr_shadowing); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.cap.tpr_shadowing", + &tpr_shadowing); } if (tpr_shadowing) { @@ -854,8 +861,12 @@ vmx_modinit(int ipinum) procbased2_vid_bits, 0, &tmp); if (error == 0 && tpr_shadowing) { virtual_interrupt_delivery = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.vmx.use_apic_vid", &virtual_interrupt_delivery); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.cap.virtual_interrupt_delivery", + &virtual_interrupt_delivery); } if (virtual_interrupt_delivery) { @@ -881,8 +892,12 @@ vmx_modinit(int ipinum) } } else { posted_interrupts = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.vmx.use_apic_pir", &posted_interrupts); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.cap.posted_interrupts", + &posted_interrupts); } } } @@ -899,7 +914,10 @@ vmx_modinit(int ipinum) guest_l1d_flush = (cpu_ia32_arch_caps & IA32_ARCH_CAP_SKIP_L1DFL_VMENTRY) == 0; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.l1d_flush", &guest_l1d_flush); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.l1d_flush", &guest_l1d_flush); /* * L1D cache flush is enabled. Use IA32_FLUSH_CMD MSR when @@ -911,8 +929,12 @@ vmx_modinit(int ipinum) if (guest_l1d_flush) { if ((cpu_stdext_feature3 & CPUID_STDEXT3_L1D_FLUSH) == 0) { guest_l1d_flush_sw = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.l1d_flush_sw", &guest_l1d_flush_sw); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.l1d_flush_sw", + &guest_l1d_flush_sw); } if (guest_l1d_flush_sw) { if (nmi_flush_l1d_sw <= 1) From nobody Tue Oct 24 04:40:48 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDzrw5B23z4xTLB; Tue, 24 Oct 2023 04: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 4SDzrw34Qxz3HT9; Tue, 24 Oct 2023 04:40:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fTf3r8igSkILacFcEKhvbPBKP1inHeihoNW15qVkgIg=; b=yz/DYSMzgXjHovIhHOrKBcXZJTolHV24SqCA8Eu6N6tPni6eTmOVULNXTuzWmYctBitmkD EsUBfmbS6O86KCAFdARF9/hQm2KF2uc1IGK7oWNH1IwKmTeMEqRL85sRHxNy0Z6FxOem7X GCxu8/fRrapNrm9hYnlxHAeblI1a0nvKaakzVSmH+hgvabHksvx2k0m2y7R8XrfXKl+9fK uGYwG71VtlB2rlI+YU3jQ2coom+iiVCT0ZlbEDSBSP3Psqu4mAaxyjsH1eaMCfFx6eqDvK 3KQo/VyJGyoUpy14cMFIMwuB8ViLz7Ga0J89lUYExzGxhuUF4ZZ8Grtw7btK+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698122448; a=rsa-sha256; cv=none; b=qOEMekqEbtLXR/kBD5yw52aHENWIO4QOs+HcKpav+LTfs0hfHUIqAs9rCZLX1sY4ihWrjN pcU7aRS02uFVT+fcsTlEaZ47OG3BpQrPcFNYSS6Hri9/KOkwC8+G4BEvSBH5EPOQZdva+e GFkNm2slD1F500VPRccDBPNQJRVK6XthzzJGGKTVkR4YQRoFvODejqEdi2Ia4C6jhuqFcY LQv/OGDnYnu+Ow1zs8Jt9ZEJoa6fUOZxPL6uXwBmv29wqEEz3hHxDLOnVS7E8CKf1tfwl3 PaXZJJc2KKbZ0skjraiBAoq7nC1OoTeo3svmM9P/GiX/Te3YbXjcmClPo3jKBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fTf3r8igSkILacFcEKhvbPBKP1inHeihoNW15qVkgIg=; b=Accq//6nCHHPMSsjLOvFdZq6NpEALey3//Cofoy1E/p9g/bM0aViR5rWjGZQdEIpB+O+10 jsrQJt9FgzEzfJbkDHQYGrlg1/txMA1MJ8i0mcFT5Ir0qqlMO4+bXaDM+FjCyb7sybnL0Z W18Oh2bxM2k+Eryj1KCG7HbE9R8EqzzbW4EiNBZ8782rksPLQJkNXkwsbq/9DsdEZ7oBfv kBlzdDzWp5LBrBbTMPPA2OYvdgg1+NLllsYppDeboiO8sOvCz0fZ4fngUZq8aerg4A1NwQ xPnrIkRRg0Vb4FJYe58SWpYtzlz8hF48yxWmH5CfLWmcHvWLZaaBMOuXOmCxIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDzrw1wMsz17FL; Tue, 24 Oct 2023 04:40:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O4emb9099452; Tue, 24 Oct 2023 04:40:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O4emut099450; Tue, 24 Oct 2023 04:40:48 GMT (envelope-from git) Date: Tue, 24 Oct 2023 04:40:48 GMT Message-Id: <202310240440.39O4emut099450@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 8784b153a31f - stable/14 - amd64 pmap: Prefer consistent naming for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8784b153a31fc0b3a12449a2f0377eb038e6fb7b Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=8784b153a31fc0b3a12449a2f0377eb038e6fb7b commit 8784b153a31fc0b3a12449a2f0377eb038e6fb7b Author: Zhenlei Huang AuthorDate: 2023-10-20 07:31:44 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 04:39:32 +0000 amd64 pmap: Prefer consistent naming for loader tunable The sysctl knob 'vm.pmap.allow_2m_x_ept' is loader tunable and have public document entry in security(7) but is fetched from kernel environment 'hw.allow_2m_x_ept'. That is inconsistent and obscure. As there is public security advisory FreeBSD-SA-19:25.mcepsc [1], people may refer to it and use 'hw.allow_2m_x_ept', let's keep old name for compatibility. [1] https://www.freebsd.org/security/advisories/FreeBSD-SA-19:25.mcepsc.asc Reviewed by: kib Fixes: c08973d09c95 Workaround for Intel SKL002/SKL012S errata MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42311 (cherry picked from commit 9e7f349ff10691c2e3fb03898dbc942794a47566) --- sys/amd64/amd64/pmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index ff83d8749313..eedbf8fd8067 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -2342,7 +2342,10 @@ pmap_allow_2m_x_ept_recalculate(void) CPUID_TO_MODEL(cpu_id) == 0x57 || /* Knights */ CPUID_TO_MODEL(cpu_id) == 0x85)))) pmap_allow_2m_x_ept = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.allow_2m_x_ept", &pmap_allow_2m_x_ept); +#endif + TUNABLE_INT_FETCH("vm.pmap.allow_2m_x_ept", &pmap_allow_2m_x_ept); } static bool From nobody Tue Oct 24 04:40:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDzrx5NGJz4xTw7; Tue, 24 Oct 2023 04:40: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 4SDzrx4HPgz3HTL; Tue, 24 Oct 2023 04:40:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=27HTRIz0qe9QIBjaUtPegGB99uaeB40hDM8hMEIZ92s=; b=BM3T049+ui+Wp+9AYOYONyCoYif9lkzLr9AXslK0T4NU7r6XJHD+Q9/vQglwrfNXPlU1zw 5jvsuJ7F9YyYF57pr0bHwfK2xYnycrcL/Hsq3ifJCPXCs44QZOt7KSkuBY+u6W/gJym8o+ SUIt3r953mNf3IWmeYMCa5UxcqpjfgnhjoRO0CyYhFNocX3tqa2F8of255VSHrvf42uH1Y jxpbY2row57p2sQ3kvrEDAs1m4jEemroC2xqVJAJ7VX+P5GQXXU8KhpOSRDFarmj3j2933 OhacBiTrH1rtoBxAiguil7b4peuCazmwJhELl3eE8mFYtsSt0f5x3YMppF3iLg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698122449; a=rsa-sha256; cv=none; b=YbGmFruiv37rzw9pEMuBZJs6cZkH/8f/xYRcDvowDiiymEsv0SrDHBEN+Ne/3ijzTuGVvf IRVEha9zfiD4UfgMZTT5nMd/zHQIPpDxREV6+IwSuEfAq1Ppz03SoE53vlCeT2jipTrDaJ TAVyJwnHGus3fvrfbk93ZdpdSRumb6IWL/BoMC4jVklvwf3p4wYB6tEHUJMWUB104qL8Kb h6IucUVd9TqkaIycdb1HLQP7Jz+DRNdmwJn0vL5lnssqyKhNt+XbaUVG4BKHlf5JHK/J2u ogNwzNO3AJVhf21yg3WS/o8p4vYyIkgq1JYVBrT/Xu0IIlHTRxfrcXim/2ogTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122449; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=27HTRIz0qe9QIBjaUtPegGB99uaeB40hDM8hMEIZ92s=; b=o+fNIkWe7KWfoQLb/pgc+5MkXdmHaw3Jyv/ro2JwKWViY106UCaP+GU9U4jYEpFELLF+Se PgRFVIlVXFZVlBF2JhOWr2rwoll9B/fDdDTo4120Y5aWYNW1aQNVhSHzMNRqKMgqImmoC7 I2G1jwQvULf/VsrhGbUAEyXGWiych3FstrFSon3tG0oCFkYn/LtUZaGwalDYzq0DJ7nZTC J7fjfPrFZEs8rzpM7dfMjUxpZwjpQKDlZLLnvk/lbnIBRpiKq2g5ROy+tg2HFHvy/rtiaq U5MsXsKbkCyXfYdFDA6js5QjQglDV72m53NQ9g8oz/Qd4ebpxyBM3CzIcLCvqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDzrx2w1Yz17xy; Tue, 24 Oct 2023 04:40:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O4ento099500; Tue, 24 Oct 2023 04:40:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O4ensG099497; Tue, 24 Oct 2023 04:40:49 GMT (envelope-from git) Date: Tue, 24 Oct 2023 04:40:49 GMT Message-Id: <202310240440.39O4ensG099497@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 6cd7e3d118f2 - stable/14 - x86: Prefer consistent naming for loader tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6cd7e3d118f247a8f6bc0f8162a9cb67155b7c76 Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=6cd7e3d118f247a8f6bc0f8162a9cb67155b7c76 commit 6cd7e3d118f247a8f6bc0f8162a9cb67155b7c76 Author: Zhenlei Huang AuthorDate: 2023-10-17 07:05:25 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 04:39:32 +0000 x86: Prefer consistent naming for loader tunables The following loader tunables do have corresponding sysctl MIBs but with inconsistent naming. That may be historical reason. Let's prefer consistent naming for them so that it will be easier to maintain. 1. hw.dmar.timeout -> hw.iommu.dmar.timeout 2. hw.lapic_eoi_suppression -> hw.apic.eoi_suppression 3. hw.lapic_tsc_deadline -> hw.apic.timer_tsc_deadline 4. hw.x2apic_enable -> hw.apic.x2apic_mode Those tunables are for field debugging, no need to keep old names for compatibility. Reviewed by: kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42248 (cherry picked from commit 12cce5994b92f8235f379d660ccb28da8e69f55b) --- sys/x86/acpica/madt.c | 2 +- sys/x86/iommu/intel_drv.c | 2 +- sys/x86/x86/local_apic.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/x86/acpica/madt.c b/sys/x86/acpica/madt.c index 3d7c5a67375b..200eec1fbb28 100644 --- a/sys/x86/acpica/madt.c +++ b/sys/x86/acpica/madt.c @@ -221,7 +221,7 @@ madt_setup_local(void) else if (bootverbose) printf("x2APIC available but disabled %s\n", reason); user_x2apic = x2apic_mode; - TUNABLE_INT_FETCH("hw.x2apic_enable", &user_x2apic); + TUNABLE_INT_FETCH("hw.apic.x2apic_mode", &user_x2apic); if (user_x2apic != x2apic_mode) { if (bios_x2apic && !user_x2apic) printf("x2APIC disabled by tunable and " diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index a5821df6b835..ebdf24976504 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -429,7 +429,7 @@ dmar_attach(device_t dev) dmar_quirks_post_ident(unit); timeout = dmar_get_timeout(); - TUNABLE_UINT64_FETCH("hw.dmar.timeout", &timeout); + TUNABLE_UINT64_FETCH("hw.iommu.dmar.timeout", &timeout); dmar_update_timeout(timeout); for (i = 0; i < DMAR_INTR_TOTAL; i++) diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c index 43fe4625cd08..6a913883cc5c 100644 --- a/sys/x86/x86/local_apic.c +++ b/sys/x86/x86/local_apic.c @@ -493,7 +493,7 @@ lapic_init(vm_paddr_t addr) (cpu_feature2 & CPUID2_TSCDLT) != 0 && tsc_is_invariant && tsc_freq != 0) { lapic_timer_tsc_deadline = 1; - TUNABLE_INT_FETCH("hw.lapic_tsc_deadline", + TUNABLE_INT_FETCH("hw.apic.timer_tsc_deadline", &lapic_timer_tsc_deadline); } @@ -526,7 +526,7 @@ lapic_init(vm_paddr_t addr) "KVM -- disabling lapic eoi suppression\n"); lapic_eoi_suppression = 0; } - TUNABLE_INT_FETCH("hw.lapic_eoi_suppression", + TUNABLE_INT_FETCH("hw.apic.eoi_suppression", &lapic_eoi_suppression); } From nobody Tue Oct 24 04:44:47 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDzxX1DPkz4xVM1; Tue, 24 Oct 2023 04:44: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 4SDzxX0hHXz3JfQ; Tue, 24 Oct 2023 04:44:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dYHMY3ujyr0gVRPdGHwRutF2hkasrcuP3kNdM1cdkTk=; b=tyt2OKgbCdvqlzfJvL1b8hue74qP7kUE7gdAcRPTN4r/C1P7kTpBtJZJ1oXCBPixPm4BOC T8iF+9zqI5sag/nFuSmY/gzCHvM4+/qgJwsdguuRxmHEQO/ZCDEKbRTOO1tbDmHOGl2AXZ wsdxTO9idr1V1SlxmIq1Ddgy1EM2zfwmcX+PQBFL0X/bOwakJ61iTVPkfMyc+j+fsBTCDC RBUQWkE7l/AvqQQDGmFd1VVhuIh0T362pf6W5/qn77FPGsj6H9O8hauMjAW9nVjXlgfx2n Z43+XBjxu8QwNPiTHqHlRlq1O7xvfjVz8cF9vFZeqAUMazKBXB1Ktoci+R8RhA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698122688; a=rsa-sha256; cv=none; b=CLZrW8+9SDtlwnholfgQIrMuZecm/D6P6GAJckbyIdyuHCAN6Yqd6vscmZD6ZgEomQg2hl iKTur+TEy0VFtNkTMBjHtccHjYYBY8aEqvwVO8Wy7JQPb8rqNhwkY4ItAOxaWpHiGJ3OUq x4m8+I83hFopWzkza1Gtx68T8HsduGCx+53qNOMo19t4+qUkaojFyMUEHTOzEuZbxpUPZO 2iR6wfkzbWJH1K0T7DnFraw9YuthXrZY86F3QJoTXd6ZeBMju2umdzOjgvV5YJTpa+7Px4 6e25Ue6t/eALpxtLigDOiWKFPgADrD9afNmKclwGUgX1Exn5kNcLj7VVPRU+IQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dYHMY3ujyr0gVRPdGHwRutF2hkasrcuP3kNdM1cdkTk=; b=vZh9gyrSYueGxkpsD2b2+5SLeu8GxCgAYi32J4conQpxo3/VMq1ILOpodc7aIwk+oyA4rK BkZU8tyYDDKNFnH1mFR99OIkPq1v7bNwvvBRmnAcLg/uMzpoJyR2E4v/iTLAH6ybic1jTn XsMtP5EXPlRKwco6i2BD+ERLiQFR6KEOjvQpQQ2UzqtkChcZFGeoME0Egysh7cVb5z4/HV vGombkVRft1dqs/1zhx07J0XXlt12mlAqNrRhZ7CS6ZEWkcKZF1rgmAZ1oLI/4XEEYSI+a hDkz3tmTdnOBFNOzacvqWPo2tw7YUGHyCv0B55UJyrZHTJUDydZveRLvblpDWA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDzxW6s6wz18BW; Tue, 24 Oct 2023 04:44:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O4il4V004971; Tue, 24 Oct 2023 04:44:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O4ildW004968; Tue, 24 Oct 2023 04:44:47 GMT (envelope-from git) Date: Tue, 24 Oct 2023 04:44:47 GMT Message-Id: <202310240444.39O4ildW004968@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: ba924ff8c46c - stable/13 - vmx: Prefer consistent naming for loader tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ba924ff8c46ce44fc9b877cc48bdae3bc966c13a Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ba924ff8c46ce44fc9b877cc48bdae3bc966c13a commit ba924ff8c46ce44fc9b877cc48bdae3bc966c13a Author: Zhenlei Huang AuthorDate: 2023-10-19 17:18:25 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 04:43:55 +0000 vmx: Prefer consistent naming for loader tunables The following loader tunables do have corresponding sysctl MIBs but with different names. That may be historical reason. Let's prefer consistent naming for them so that it will be easier to read and maintain. 1. hw.vmm.l1d_flush -> hw.vmm.vmx.l1d_flush 2. hw.vmm.l1d_flush_sw -> hw.vmm.vmx.l1d_flush_sw 3. hw.vmm.vmx.use_apic_pir -> hw.vmm.vmx.cap.posted_interrupts 4. hw.vmm.vmx.use_apic_vid -> hw.vmm.vmx.cap.virtual_interrupt_delivery 5. hw.vmm.vmx.use_tpr_shadowing -> hw.vmm.vmx.cap.tpr_shadowing Old names are kept for compatibility. Meanwhile, add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. Reviewed by: corvink, jhb, kib, #bhyve MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D42251 (cherry picked from commit f3ff0918ffcdbcb4c39175f3f9be70999edb14e8) (cherry picked from commit 9e48b627aed346bf5e950134a581218d3097eb7c) --- sys/amd64/vmm/intel/vmx.c | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c index 9aecbabe6ca3..1402705ca5f5 100644 --- a/sys/amd64/vmm/intel/vmx.c +++ b/sys/amd64/vmm/intel/vmx.c @@ -192,15 +192,18 @@ SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, invpcid, CTLFLAG_RD, &cap_invpcid, 0, "Guests are allowed to use INVPCID"); static int tpr_shadowing; -SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, tpr_shadowing, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, tpr_shadowing, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &tpr_shadowing, 0, "TPR shadowing support"); static int virtual_interrupt_delivery; -SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, virtual_interrupt_delivery, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, virtual_interrupt_delivery, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &virtual_interrupt_delivery, 0, "APICv virtual interrupt delivery support"); static int posted_interrupts; -SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, posted_interrupts, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, posted_interrupts, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &posted_interrupts, 0, "APICv posted interrupt support"); static int pirvec = -1; @@ -213,10 +216,10 @@ SYSCTL_UINT(_hw_vmm_vmx, OID_AUTO, vpid_alloc_failed, CTLFLAG_RD, &vpid_alloc_failed, 0, NULL); int guest_l1d_flush; -SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &guest_l1d_flush, 0, NULL); int guest_l1d_flush_sw; -SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush_sw, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush_sw, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &guest_l1d_flush_sw, 0, NULL); static struct msr_entry msr_load_list[1] __aligned(16); @@ -832,8 +835,12 @@ vmx_modinit(int ipinum) &tmp); if (error == 0) { tpr_shadowing = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.vmx.use_tpr_shadowing", &tpr_shadowing); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.cap.tpr_shadowing", + &tpr_shadowing); } if (tpr_shadowing) { @@ -854,8 +861,12 @@ vmx_modinit(int ipinum) procbased2_vid_bits, 0, &tmp); if (error == 0 && tpr_shadowing) { virtual_interrupt_delivery = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.vmx.use_apic_vid", &virtual_interrupt_delivery); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.cap.virtual_interrupt_delivery", + &virtual_interrupt_delivery); } if (virtual_interrupt_delivery) { @@ -881,8 +892,12 @@ vmx_modinit(int ipinum) } } else { posted_interrupts = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.vmx.use_apic_pir", &posted_interrupts); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.cap.posted_interrupts", + &posted_interrupts); } } } @@ -899,7 +914,10 @@ vmx_modinit(int ipinum) guest_l1d_flush = (cpu_ia32_arch_caps & IA32_ARCH_CAP_SKIP_L1DFL_VMENTRY) == 0; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.l1d_flush", &guest_l1d_flush); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.l1d_flush", &guest_l1d_flush); /* * L1D cache flush is enabled. Use IA32_FLUSH_CMD MSR when @@ -911,8 +929,12 @@ vmx_modinit(int ipinum) if (guest_l1d_flush) { if ((cpu_stdext_feature3 & CPUID_STDEXT3_L1D_FLUSH) == 0) { guest_l1d_flush_sw = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.l1d_flush_sw", &guest_l1d_flush_sw); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.l1d_flush_sw", + &guest_l1d_flush_sw); } if (guest_l1d_flush_sw) { if (nmi_flush_l1d_sw <= 1) From nobody Tue Oct 24 04:44:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDzxY2qmzz4xV7Z; Tue, 24 Oct 2023 04:44: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 4SDzxY1xmQz3JrJ; Tue, 24 Oct 2023 04:44:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6PWP3h9eAnu4PUc/r1qk/cy5lCbsMSYw1rPXu3t923o=; b=QWAoz1/kvAAGMyN4xTH3PKgAc/YH6Kl5jz3cu0xD9Dj2Gh5g1MdKX9mvurMg0rdTiBeOJs VgYPSIjZkO5LgcRTToIRKERZIxTvzB9eNTm2BpMQyu5pBprsLBoNythC0w0hpEBV2bsmJf gdLRV2t7ykC6FvAqhtBMKX6AR6IOv+Nm77LgCAVL+T6DixzpavXL64C8VsOYZuo0Gk+p15 nqDC5X1+r9OioHvACM/UmDXNsyQqrJxtdQlM2m8m+upY7fhP/S3HZyultiKK8E8k3d1DRO mvsB7pjkQ/T2WUkPJNMDDP7U2CQj78nJqKdzhJsL58KJIRfmxWyeQDT+lfcHmA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698122689; a=rsa-sha256; cv=none; b=u0EjUjSnN+cLajJZjCmRktXElsXIT+NNj4CCDa+ZZmvFrUfYU7O2mQX1kpyAZcaoHsJVDv 90IHYYUK4n3vjxt9LrspzzCaYg3vvG6nksfSJRWi/18fmUrLr0ybLm4RJAi7GCl8W3eBj5 BafshzJZ5MEhdLMiTArPvnXvOeq+CiYoWofkGXqqEoOvQt+40yrMcOfKFoVg9fPADliCHB M//lAxKa28i+hz7u+mjgFqgQIyMalhvZc1iQ5I9VEodmlyV5KGQMs37az9SoCOoR5CUAWm /R9j3gjw71Sco6z3/gatiXEfEv7GwbWTYuSHkeBObYxOKhbxDagvWba1WPp4qg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6PWP3h9eAnu4PUc/r1qk/cy5lCbsMSYw1rPXu3t923o=; b=HMGzbHuGlE6Je+AI7FWtTs241WDI5SXGusXs/b1yGyA4clgJU3RtnbHs1XVlxWUA2zTGU/ IyH0mU+pUlD3RsS9JSsXwys6EG3d0vK1TkSqZPVJx/rmTKC/MbO1a45jL5TYn2FFvp3pzL b58zVrNqOXsy0BaIH14S6+mEyTYBEuWe95w0xDFMB/vFRpQeGoQfKGb5i5hUrgfYscaX0S iYbkcBj4CG/eE2ueLxNmYzsrYs2LTp13LzFFMrHU1rttLeYD2i6oUkz07bKwq4xp6JpsS5 bB9++u82N8++9lkGFMTd+Nc7ZCcGDNfXx7ZOm7KsDGt03+0K0aoYrL7ykXRxJA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDzxY0n93z17vW; Tue, 24 Oct 2023 04:44:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O4inbM005022; Tue, 24 Oct 2023 04:44:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O4incw005020; Tue, 24 Oct 2023 04:44:49 GMT (envelope-from git) Date: Tue, 24 Oct 2023 04:44:49 GMT Message-Id: <202310240444.39O4incw005020@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 350e79edf9a8 - stable/13 - amd64 pmap: Prefer consistent naming for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 350e79edf9a8f65c9a9d17aa86ec90b436d638f8 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=350e79edf9a8f65c9a9d17aa86ec90b436d638f8 commit 350e79edf9a8f65c9a9d17aa86ec90b436d638f8 Author: Zhenlei Huang AuthorDate: 2023-10-20 07:31:44 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 04:43:56 +0000 amd64 pmap: Prefer consistent naming for loader tunable The sysctl knob 'vm.pmap.allow_2m_x_ept' is loader tunable and have public document entry in security(7) but is fetched from kernel environment 'hw.allow_2m_x_ept'. That is inconsistent and obscure. As there is public security advisory FreeBSD-SA-19:25.mcepsc [1], people may refer to it and use 'hw.allow_2m_x_ept', let's keep old name for compatibility. [1] https://www.freebsd.org/security/advisories/FreeBSD-SA-19:25.mcepsc.asc Reviewed by: kib Fixes: c08973d09c95 Workaround for Intel SKL002/SKL012S errata MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42311 (cherry picked from commit 9e7f349ff10691c2e3fb03898dbc942794a47566) (cherry picked from commit 8784b153a31fc0b3a12449a2f0377eb038e6fb7b) --- sys/amd64/amd64/pmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 5e2cd4235823..4fba61269352 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -2257,7 +2257,10 @@ pmap_allow_2m_x_ept_recalculate(void) CPUID_TO_MODEL(cpu_id) == 0x57 || /* Knights */ CPUID_TO_MODEL(cpu_id) == 0x85)))) pmap_allow_2m_x_ept = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.allow_2m_x_ept", &pmap_allow_2m_x_ept); +#endif + TUNABLE_INT_FETCH("vm.pmap.allow_2m_x_ept", &pmap_allow_2m_x_ept); } static bool From nobody Tue Oct 24 04:44:50 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SDzxZ4Pscz4xV9m; Tue, 24 Oct 2023 04:44: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 4SDzxZ2QqDz3KGQ; Tue, 24 Oct 2023 04:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=25fsae4AP4TwSUeimUU0J91xcyLO7b7kKTX+6Euy70E=; b=nacJ8hOQUw8c+mLKnHGXsGGXRvAIbGw/wfqTAjUnK9wkdSZ5zukHS5P3Kjy0+DO4YMJP6d 7Mu6MxnnDS+1c4AgGnsmQSA7xFfiNwZMznxxCoTc62fDJ2QO+pmEsZoOUmyjw5YkSLMZks qLmc7F6NwqTwUfi14V0TOmAV/WDBGUx2cEcltCjmEV2C9MBTE5OedKMF6LmDL0zvlPSs5X Y8jSOYnDbu4Wo4+84LaWV7t2r38wlBua9A+EpF2Zc7mNDhQi3Zl5M2EEX0Uf/UNh78XHVP zgL1fD1pCAJDo3tMUpcTzuk88QiqV3csHiTQ6Adnj5DdrsWxcTLJz+criqm0oQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698122690; a=rsa-sha256; cv=none; b=PaJ55ImgHEJ8y5Ds7pMX8aupksczE/FmYLHrS21bq4B7vFRbklvDGzHigZK6qkv50GQeai t9FsmOzuyOzWEAw3vy2LuRBs7920DuTuxmEzHUGoWCdYFUun/A2HJG0pHIe+PORyc9vxo5 oPMDJzAtp6J7+qKTsQKM6ErNvdUyhUAfF2jxyTr2F2noRq7S1f0h4OFC3rXft8VckdOANp TskSe1v0p5c0iazqSVxcwX+5kIqaiQySaHHxCOlE2MKDAazC/lWP3qI+LHEXm/Hf06WRvz c5ca+dhWlzxGL/BpXs3aC0+d8pkW8z8WwFlG6LsBRYkcZyksmJkPj8S0IUax3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=25fsae4AP4TwSUeimUU0J91xcyLO7b7kKTX+6Euy70E=; b=iBrou6qITeOcCk7KzbGSQQDj+QKmEW5qzY5JsCgYrxBoAmdF4BNUEqkOjpwSYO+EFnvUiY rXH4IuzN94Ew39b/hq7AJPY15R+ZpzIX40xGwE55Rq9joxVKlbij5/GHNkVqsr3TXWXWXg PQVqNF7NUQjiKkC3ZEDi/3I892ZTPEByTKSu+RvVpa2YWJgkYxXL2pPqlx1q4Ysrf3prYp rSqgBlwwq89M4K9fgBRvaEpQFhlOUgEdUjH+PfXYZPIJOzjhA3W4kN9WlvSxgw6vUk4ram HUfj04WW+ifzWAVMnERURvLjRJBjmuPS+xhTeYWo8wwsTidftLnYMEbt54wydw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SDzxZ1X1lz18NS; Tue, 24 Oct 2023 04:44:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O4iog0005077; Tue, 24 Oct 2023 04:44:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O4iopg005075; Tue, 24 Oct 2023 04:44:50 GMT (envelope-from git) Date: Tue, 24 Oct 2023 04:44:50 GMT Message-Id: <202310240444.39O4iopg005075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 8ca5539ae1e6 - stable/13 - x86: Prefer consistent naming for loader tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8ca5539ae1e693709553729edd7e34b90d734a85 Auto-Submitted: auto-generated The branch stable/13 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=8ca5539ae1e693709553729edd7e34b90d734a85 commit 8ca5539ae1e693709553729edd7e34b90d734a85 Author: Zhenlei Huang AuthorDate: 2023-10-17 07:05:25 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 04:43:56 +0000 x86: Prefer consistent naming for loader tunables The following loader tunables do have corresponding sysctl MIBs but with inconsistent naming. That may be historical reason. Let's prefer consistent naming for them so that it will be easier to maintain. 1. hw.dmar.timeout -> hw.iommu.dmar.timeout 2. hw.lapic_eoi_suppression -> hw.apic.eoi_suppression 3. hw.lapic_tsc_deadline -> hw.apic.timer_tsc_deadline 4. hw.x2apic_enable -> hw.apic.x2apic_mode Those tunables are for field debugging, no need to keep old names for compatibility. Reviewed by: kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42248 (cherry picked from commit 12cce5994b92f8235f379d660ccb28da8e69f55b) (cherry picked from commit 6cd7e3d118f247a8f6bc0f8162a9cb67155b7c76) --- sys/x86/acpica/madt.c | 2 +- sys/x86/iommu/intel_drv.c | 2 +- sys/x86/x86/local_apic.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/x86/acpica/madt.c b/sys/x86/acpica/madt.c index e63fd86a7c9b..6da4b23901a2 100644 --- a/sys/x86/acpica/madt.c +++ b/sys/x86/acpica/madt.c @@ -224,7 +224,7 @@ madt_setup_local(void) else if (bootverbose) printf("x2APIC available but disabled %s\n", reason); user_x2apic = x2apic_mode; - TUNABLE_INT_FETCH("hw.x2apic_enable", &user_x2apic); + TUNABLE_INT_FETCH("hw.apic.x2apic_mode", &user_x2apic); if (user_x2apic != x2apic_mode) { if (bios_x2apic && !user_x2apic) printf("x2APIC disabled by tunable and " diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index 72c6d5b7df44..6aa1c9d090cf 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -429,7 +429,7 @@ dmar_attach(device_t dev) dmar_quirks_post_ident(unit); timeout = dmar_get_timeout(); - TUNABLE_UINT64_FETCH("hw.dmar.timeout", &timeout); + TUNABLE_UINT64_FETCH("hw.iommu.dmar.timeout", &timeout); dmar_update_timeout(timeout); for (i = 0; i < DMAR_INTR_TOTAL; i++) diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c index 68468110e522..15a69c207a98 100644 --- a/sys/x86/x86/local_apic.c +++ b/sys/x86/x86/local_apic.c @@ -568,7 +568,7 @@ native_lapic_init(vm_paddr_t addr) (cpu_feature2 & CPUID2_TSCDLT) != 0 && tsc_is_invariant && tsc_freq != 0) { lapic_timer_tsc_deadline = 1; - TUNABLE_INT_FETCH("hw.lapic_tsc_deadline", + TUNABLE_INT_FETCH("hw.apic.timer_tsc_deadline", &lapic_timer_tsc_deadline); } @@ -601,7 +601,7 @@ native_lapic_init(vm_paddr_t addr) "KVM -- disabling lapic eoi suppression\n"); lapic_eoi_suppression = 0; } - TUNABLE_INT_FETCH("hw.lapic_eoi_suppression", + TUNABLE_INT_FETCH("hw.apic.eoi_suppression", &lapic_eoi_suppression); } From nobody Tue Oct 24 04:47:14 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SF00L6pCvz4xTnB; Tue, 24 Oct 2023 04:47: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 4SF00L6H9rz3KkM; Tue, 24 Oct 2023 04:47:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lfMAoRoNpv15CgpT5WrOiydpZ+04O80nnElws8EcWU8=; b=rPMbryIIDIaS5o8h/gVL5gz3zX3nlaTcc6XqOVuNpStqevxiBEt+NFdYJ5yr9IYS/uoQdB lkZ/QoH+mxxpw84IEY1OIQpApuf5qrgmZZ2j2LIctznCTTlmqy3zOsRAlgSnNIK4GnNOB/ 1nQ3j7EWnUkbwx/EUhUsY5dB0V57cyiIC+y7yPUipLc4topOTK8E4nxTz7apTvVASLIQVX 6ZJSfisxWUBb5iH+jxliOesQk/vWiawQyJMlGhxqavExqiCLsWyFQT6OElp3AkpW0jEbim nABKFoT4iMsR0ef1XEE6ozqh8xWgdUC8F3McB/k+cTEsgF0Yn4IoCt/waHhktg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698122834; a=rsa-sha256; cv=none; b=uzHl+uL9iMyQcDIDtT33qEw5FAW0Cmj1A7MWq2vVW/X3Nofpi4+RqI9LoKdOYYjNdqx6Em 8LnFvQ2EHpoWwk94dD+lmDRjBgpC5aWjyy9WoTeuYJXyFJvgNoGJIudV0yVZ0MY78uhyGE cJafi5JbIXRb4Qa1tjsJ70ozXTjX34gHW3Ygt4zntbAdZKNyMZ8/+EQvDcLBHSBPuyXkde hvpUXM2SAFYkaI2I29nQLM5XOIAg29NHFZ6eApc7DcwrAU1fkjWcFH7rs5kuSTvVb9Md8u Gz/4mZz42FDYweSPF4yhk6ueQDut8ymWgGCXEkTcUHCMj5iuvT90gX9Ww3QwAA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122834; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lfMAoRoNpv15CgpT5WrOiydpZ+04O80nnElws8EcWU8=; b=jMWjwpuCM1lj6Pi69UCFu3wlwdWrGHNCdxCpIQgZDZNuLhDVDX6fHLyaO69iz8r6AEcFei UZNA14a8g9ksL8eqcyvs06VoOEnrPLdh8dYwg3UOHRtCvGTeyO0gmSFoxoN/lhcJck0R/M mk2EwE6wr+HYtiwmloCbe/8w1mNNFs9vXQyVCCnQ+QUcmaqLsqd+9nJzHXlZ4T0cDzVcNh V3vcjqUVQKSf0B9UP2XZGmW6YcqqZY0sjvHj1wx32TKVMeJSv1xiwnXb57eFPFjljTaShq QDYtrhiE1RfSeZhzRjVwC80cfCIOsCuU2q2oSUhT89dZUQEyUiTmEsJKdAZV9A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SF00L5LXbz187y; Tue, 24 Oct 2023 04:47:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O4lEel005564; Tue, 24 Oct 2023 04:47:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O4lEwZ005561; Tue, 24 Oct 2023 04:47:14 GMT (envelope-from git) Date: Tue, 24 Oct 2023 04:47:14 GMT Message-Id: <202310240447.39O4lEwZ005561@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 95c4e64bf677 - stable/12 - vmx: Prefer consistent naming for loader tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 95c4e64bf677895fde328fcb564224cc2ad2eda1 Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=95c4e64bf677895fde328fcb564224cc2ad2eda1 commit 95c4e64bf677895fde328fcb564224cc2ad2eda1 Author: Zhenlei Huang AuthorDate: 2023-10-19 17:18:25 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 04:46:30 +0000 vmx: Prefer consistent naming for loader tunables The following loader tunables do have corresponding sysctl MIBs but with different names. That may be historical reason. Let's prefer consistent naming for them so that it will be easier to read and maintain. 1. hw.vmm.l1d_flush -> hw.vmm.vmx.l1d_flush 2. hw.vmm.l1d_flush_sw -> hw.vmm.vmx.l1d_flush_sw 3. hw.vmm.vmx.use_apic_pir -> hw.vmm.vmx.cap.posted_interrupts 4. hw.vmm.vmx.use_apic_vid -> hw.vmm.vmx.cap.virtual_interrupt_delivery 5. hw.vmm.vmx.use_tpr_shadowing -> hw.vmm.vmx.cap.tpr_shadowing Old names are kept for compatibility. Meanwhile, add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. Reviewed by: corvink, jhb, kib, #bhyve MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D42251 (cherry picked from commit f3ff0918ffcdbcb4c39175f3f9be70999edb14e8) (cherry picked from commit 9e48b627aed346bf5e950134a581218d3097eb7c) (cherry picked from commit ba924ff8c46ce44fc9b877cc48bdae3bc966c13a) --- sys/amd64/vmm/intel/vmx.c | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c index e800618e9eeb..8ab927af3fc9 100644 --- a/sys/amd64/vmm/intel/vmx.c +++ b/sys/amd64/vmm/intel/vmx.c @@ -181,15 +181,18 @@ SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, invpcid, CTLFLAG_RD, &cap_invpcid, 0, "Guests are allowed to use INVPCID"); static int tpr_shadowing; -SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, tpr_shadowing, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, tpr_shadowing, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &tpr_shadowing, 0, "TPR shadowing support"); static int virtual_interrupt_delivery; -SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, virtual_interrupt_delivery, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, virtual_interrupt_delivery, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &virtual_interrupt_delivery, 0, "APICv virtual interrupt delivery support"); static int posted_interrupts; -SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, posted_interrupts, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, posted_interrupts, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &posted_interrupts, 0, "APICv posted interrupt support"); static int pirvec = -1; @@ -202,10 +205,10 @@ SYSCTL_UINT(_hw_vmm_vmx, OID_AUTO, vpid_alloc_failed, CTLFLAG_RD, &vpid_alloc_failed, 0, NULL); int guest_l1d_flush; -SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &guest_l1d_flush, 0, NULL); int guest_l1d_flush_sw; -SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush_sw, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush_sw, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &guest_l1d_flush_sw, 0, NULL); static struct msr_entry msr_load_list[1] __aligned(16); @@ -819,8 +822,12 @@ vmx_init(int ipinum) &tmp); if (error == 0) { tpr_shadowing = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.vmx.use_tpr_shadowing", &tpr_shadowing); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.cap.tpr_shadowing", + &tpr_shadowing); } if (tpr_shadowing) { @@ -841,8 +848,12 @@ vmx_init(int ipinum) procbased2_vid_bits, 0, &tmp); if (error == 0 && tpr_shadowing) { virtual_interrupt_delivery = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.vmx.use_apic_vid", &virtual_interrupt_delivery); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.cap.virtual_interrupt_delivery", + &virtual_interrupt_delivery); } if (virtual_interrupt_delivery) { @@ -867,8 +878,12 @@ vmx_init(int ipinum) } } else { posted_interrupts = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.vmx.use_apic_pir", &posted_interrupts); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.cap.posted_interrupts", + &posted_interrupts); } } } @@ -885,7 +900,10 @@ vmx_init(int ipinum) guest_l1d_flush = (cpu_ia32_arch_caps & IA32_ARCH_CAP_SKIP_L1DFL_VMENTRY) == 0; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.l1d_flush", &guest_l1d_flush); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.l1d_flush", &guest_l1d_flush); /* * L1D cache flush is enabled. Use IA32_FLUSH_CMD MSR when @@ -897,8 +915,12 @@ vmx_init(int ipinum) if (guest_l1d_flush) { if ((cpu_stdext_feature3 & CPUID_STDEXT3_L1D_FLUSH) == 0) { guest_l1d_flush_sw = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.l1d_flush_sw", &guest_l1d_flush_sw); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.l1d_flush_sw", + &guest_l1d_flush_sw); } if (guest_l1d_flush_sw) { if (nmi_flush_l1d_sw <= 1) From nobody Tue Oct 24 04:47:15 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SF00N17PMz4xVQC; Tue, 24 Oct 2023 04:47: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 4SF00M702dz3KkY; Tue, 24 Oct 2023 04:47:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zsj6dMwkeDvZabngIVKVzY2mQ2N5I5d6MDhFV+D6K2k=; b=myNegedhaBaHCK2yxz7XwUR6MdVT0CHtgySghe1VpyAgU3jMUDDI84RA+LmTkoI0IWTbwB m3afi0iFnQ/k3mZlE1JU57UuLMgnZ6wmpXAnEg5uwY8fBJAd+O9FEP9ytUcjCXJHWF/ycZ 2rBH1z+x1c3zHn7URhE72stiu6VelHOJsUKAuos87kFNxEmv7yq8uSpOw/WfoFN3bXuYmR 39TWWktvexn6UCbGoT2pwdS+gk1/BvPBg8m80JRTXJ46wFZBNJBU1EWqotBNjW/wWgXio8 huOtIaZhCh4jdeGYsTO+PNQkJRAmnxdoVxTyxgNTmAEkkzbI32fxKDRyYHgj8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698122836; a=rsa-sha256; cv=none; b=g4MbPRTI0A9ucMmI5PgqbfFEO7hoBsBkdge2k3mltwMhLO8pDQIJ+rR/sreLPSamMuGA+O Cipt4fmSlj5dYaQaYYL9koVXiNNoT7MevF23miv+5Pqr429a7ROBmnjaZoFXgDyxNcdg9e HSR+IcyxVk01qpb+YV0w9cJNlvdsae4MDHVnB5dsunabGoj9tJYvm4s+Brx0BhrJWL2+Wg UG0F+tEVJmaRV8rs4FgzXIoufuubsCVG/mqmwn80/qPmN3VPaH3hcktxOcV+o7MTQVAjIe 014747/4PChrwZiijCOBZP7YnDt4LeAQJg//NJxhU/m52jmHh+ARW3f8WA0BQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122836; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zsj6dMwkeDvZabngIVKVzY2mQ2N5I5d6MDhFV+D6K2k=; b=XUc4aNJHn6yfrkpvDwOGdOgcHDfTjUDNoplhg7BL5ehuTVIWApz34kWjARFpJlCxRpfAT5 Jvp0anUQf8mJTnHGCLgS1NyoRgZsOPsLNSS86WaDM9fdNAP5V4pI+9VdZQBWsLimo8M8El UvepI88qCfJkmMC9XOnsrgAQwAxmLw6kVWZoophAjnGrDSslUjs0tO+kyfGRuDyGcI192g 9UGjWxm3ZQYAdREnNw5pAzVpqJd5PxX9cE2io4/fefRJBLBVvNHkHr8tokFaDXGJYBDRUG lFsHiMiQhtDYGt/Nqk7kIkZJipCqcxnDxIUP2gL3MbavJVpUKq7C11PQ53ofSg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SF00M62Sfz17vX; Tue, 24 Oct 2023 04:47:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O4lFCv005615; Tue, 24 Oct 2023 04:47:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O4lFjk005612; Tue, 24 Oct 2023 04:47:15 GMT (envelope-from git) Date: Tue, 24 Oct 2023 04:47:15 GMT Message-Id: <202310240447.39O4lFjk005612@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 180695b8e643 - stable/12 - amd64 pmap: Prefer consistent naming for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 180695b8e6434891c418cfdde9a32eee8c8fb6f0 Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=180695b8e6434891c418cfdde9a32eee8c8fb6f0 commit 180695b8e6434891c418cfdde9a32eee8c8fb6f0 Author: Zhenlei Huang AuthorDate: 2023-10-20 07:31:44 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 04:46:30 +0000 amd64 pmap: Prefer consistent naming for loader tunable The sysctl knob 'vm.pmap.allow_2m_x_ept' is loader tunable and have public document entry in security(7) but is fetched from kernel environment 'hw.allow_2m_x_ept'. That is inconsistent and obscure. As there is public security advisory FreeBSD-SA-19:25.mcepsc [1], people may refer to it and use 'hw.allow_2m_x_ept', let's keep old name for compatibility. [1] https://www.freebsd.org/security/advisories/FreeBSD-SA-19:25.mcepsc.asc Reviewed by: kib Fixes: c08973d09c95 Workaround for Intel SKL002/SKL012S errata MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42311 (cherry picked from commit 9e7f349ff10691c2e3fb03898dbc942794a47566) (cherry picked from commit 8784b153a31fc0b3a12449a2f0377eb038e6fb7b) (cherry picked from commit 350e79edf9a8f65c9a9d17aa86ec90b436d638f8) --- sys/amd64/amd64/pmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index b2fe589ed029..cf4a96ceabe6 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -1847,7 +1847,10 @@ pmap_allow_2m_x_ept_recalculate(void) CPUID_TO_MODEL(cpu_id) == 0x57 || /* Knights */ CPUID_TO_MODEL(cpu_id) == 0x85)))) pmap_allow_2m_x_ept = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.allow_2m_x_ept", &pmap_allow_2m_x_ept); +#endif + TUNABLE_INT_FETCH("vm.pmap.allow_2m_x_ept", &pmap_allow_2m_x_ept); } static bool From nobody Tue Oct 24 04:47:16 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SF00P1bvPz4xVNX; Tue, 24 Oct 2023 04:47: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 4SF00P156Dz3Kq4; Tue, 24 Oct 2023 04:47:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/eByzz7P8ve0Y4fvnAS0PDGh8T0PIbGHDXmYCxltTj4=; b=rFzsojDgNo9u+yRz/W6UflywmIgIpFIZp49AyHlUcF1YjKmefUT9Hsst0HQlFlrtBKhud3 j2boDjGurDrSr6pEOn9oF8bxX1avI7bSEja5R8UMjHrY7ciDOO+LGgA0yW3kwDbPDcitaM tkWwnyZqPE4m3dLY/58Pi4rSkJbIzwmJn5LrrSJEQLMDh2KVD9l7ZkZVM+C+vdnGGUYYsP 0so3UHGja+Tmh/fhFB3Xnunly3lRUb0p1KBt5SKIvTLihlf2o920n1ovy1ZlnEwd6rWtxC zaYN4xW/lBE0oXI5DQSJgE/nWxr3mhU33gJI9pLCaP2CrG4/4cYSHTsclvjvlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698122837; a=rsa-sha256; cv=none; b=thDTOPAZqm6JsY5mxO02VJ/HXm9a6WkwTHjgNUdANp9Q9Dw7VLu8TQHPQzblMgZ3t7FYyK UGf6gq5rjLrwqoGEEeCXojS1NUNcPuWnA3WP467+nmDNegMOYcvLbToAUK2lxSVqiXWrd8 BSMl83Oqi4pb+sqDAeiw0Ps07w+T+7NeFE3+xNEZeoSVTkMsGzTzlRBHHUU2I6cPykjZ9v IeHopv1N1dV+kBsuzWIbW5PDMtyZNqxz2LxeOekd1D41b/navbLqEfSCrjG8jYN3H2r1g2 4aerLXGwOl+lVMwM4pa6s5z9OQijzZb7hmcbEwA0NQOXhG7m+mXp8TJkKxwhtw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698122837; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/eByzz7P8ve0Y4fvnAS0PDGh8T0PIbGHDXmYCxltTj4=; b=XvSIUCuS363ixAmVODu3Ka+HKz87zCg0DEvVsw7VqrS4ntIMEm80eTAab0aWKhBz9B4/Xc dZwCX5eLfThuEoj34VwGXXwY+d/keYj1myEaD7sQsZ7BaJkftLcu7pHZPP4s9F4iftudE/ cfValhwvAiyF2pmTTjh+YuLEYyV7QO+sf/85R0hsJlCJwvAQ+BvMN3H6gpq2tF13fEVhEa NLENzcP5OfU4O3nB/w4z53DKhghKtqconOAUd9qJw2jZW0QoLSZaZ32V8rVF5vz4MCEHMZ 5Hh1USRh35AkYVezK/fOX0wQsvGhwLHSG0QQIK8vDY9ha81w4GpUbK4mNXPiVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SF00N72qHz17sp; Tue, 24 Oct 2023 04:47:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O4lGj9005669; Tue, 24 Oct 2023 04:47:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O4lGBx005666; Tue, 24 Oct 2023 04:47:16 GMT (envelope-from git) Date: Tue, 24 Oct 2023 04:47:16 GMT Message-Id: <202310240447.39O4lGBx005666@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 71f147c60771 - stable/12 - x86: Prefer consistent naming for loader tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 71f147c60771fb4d6cbab2833c1206e007305044 Auto-Submitted: auto-generated The branch stable/12 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=71f147c60771fb4d6cbab2833c1206e007305044 commit 71f147c60771fb4d6cbab2833c1206e007305044 Author: Zhenlei Huang AuthorDate: 2023-10-17 07:05:25 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 04:46:31 +0000 x86: Prefer consistent naming for loader tunables The following loader tunables do have corresponding sysctl MIBs but with inconsistent naming. That may be historical reason. Let's prefer consistent naming for them so that it will be easier to maintain. 1. hw.dmar.timeout -> hw.iommu.dmar.timeout 2. hw.lapic_eoi_suppression -> hw.apic.eoi_suppression 3. hw.lapic_tsc_deadline -> hw.apic.timer_tsc_deadline 4. hw.x2apic_enable -> hw.apic.x2apic_mode Those tunables are for field debugging, no need to keep old names for compatibility. Reviewed by: kib MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42248 (cherry picked from commit 12cce5994b92f8235f379d660ccb28da8e69f55b) (cherry picked from commit 6cd7e3d118f247a8f6bc0f8162a9cb67155b7c76) (cherry picked from commit 8ca5539ae1e693709553729edd7e34b90d734a85) --- sys/x86/acpica/madt.c | 2 +- sys/x86/iommu/intel_drv.c | 2 +- sys/x86/x86/local_apic.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/x86/acpica/madt.c b/sys/x86/acpica/madt.c index 5c1e5b9f8848..33ba0cf8af20 100644 --- a/sys/x86/acpica/madt.c +++ b/sys/x86/acpica/madt.c @@ -203,7 +203,7 @@ madt_setup_local(void) else if (bootverbose) printf("x2APIC available but disabled %s\n", reason); user_x2apic = x2apic_mode; - TUNABLE_INT_FETCH("hw.x2apic_enable", &user_x2apic); + TUNABLE_INT_FETCH("hw.apic.x2apic_mode", &user_x2apic); if (user_x2apic != x2apic_mode) { if (bios_x2apic && !user_x2apic) printf("x2APIC disabled by tunable and " diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index 02daa05b0cad..cab3e4882433 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -433,7 +433,7 @@ dmar_attach(device_t dev) dmar_quirks_post_ident(unit); timeout = dmar_get_timeout(); - TUNABLE_UINT64_FETCH("hw.dmar.timeout", &timeout); + TUNABLE_UINT64_FETCH("hw.iommu.dmar.timeout", &timeout); dmar_update_timeout(timeout); for (i = 0; i < DMAR_INTR_TOTAL; i++) diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c index 759c1ae8625a..99c7299bd3b9 100644 --- a/sys/x86/x86/local_apic.c +++ b/sys/x86/x86/local_apic.c @@ -556,7 +556,7 @@ native_lapic_init(vm_paddr_t addr) (cpu_feature2 & CPUID2_TSCDLT) != 0 && tsc_is_invariant && tsc_freq != 0) { lapic_timer_tsc_deadline = 1; - TUNABLE_INT_FETCH("hw.lapic_tsc_deadline", + TUNABLE_INT_FETCH("hw.apic.timer_tsc_deadline", &lapic_timer_tsc_deadline); } @@ -589,7 +589,7 @@ native_lapic_init(vm_paddr_t addr) "KVM -- disabling lapic eoi suppression\n"); lapic_eoi_suppression = 0; } - TUNABLE_INT_FETCH("hw.lapic_eoi_suppression", + TUNABLE_INT_FETCH("hw.apic.eoi_suppression", &lapic_eoi_suppression); } From nobody Tue Oct 24 07:51:55 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SF45R2l6wz4xh7Y; Tue, 24 Oct 2023 07:51: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 4SF45R29vVz3Vyl; Tue, 24 Oct 2023 07:51:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698133915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DZ5xLrEB62Q+tEH50yziBpIwaC8MA7x0GqOpEvHcfXs=; b=aUefa3fqD/gFDF5fyPS51lMZ/MRfxqc587st7YOdV8+fXsSjwDvmiPMnMPU1wwhYpQNRKc GoYzgCyk9sSEvSrlD+BRwLm7kdc/jxHSQeeHXcFLN3s+3OfTYa1+7sbj3eIUoOd4SFB/Jl u0R2Ichkp39XVSxxQFnOv+Ks1DqKsj3TEL/MV19kfVJLom0+rUs0TqCI474xR+bPa4fv3Z cHjR81wqvAmeIjLyMAH2NrHXrHOjRlu9z2WEJnE6UP70HVPx8DXmZs/27cNu4NIElKPfpg aGqzy9wIkNWOvHdNRCMssez3+p5R1WiOg8n3OmC9OvL0dfgT/HKzd7m7rvIvCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698133915; a=rsa-sha256; cv=none; b=NUQDPxaMvhj5j+GR5m2fBXTx8+Ngbu8/6QuWyBWFHXT1SwaAiFCqrCDJIoAA508lP1Nj2Z Bze8cxrzfTn7j4jcvW85QmN8jtPbytzAM+D4thW6zBIY1ilLv+l6XjbEX+WtLpPR1oq8pc KvnTIMUjINs2pFZxVUw1DHEmVEH3xYyiLpP+QPscBcHiGCo2ba09No6vrmCECO+KZnJh9v oQjv5zqPNRQy1K5oByNbTPc5Bdq+AlpIwDk9au8atHYS11o13/0LznnVmTQM1EJY8Z/Yg+ IoEm/PDzs3UK7bDzDEA3+8j++6x2ob2y51My31vv1ESq3Rs5bwBS7lg65S5BJQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698133915; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DZ5xLrEB62Q+tEH50yziBpIwaC8MA7x0GqOpEvHcfXs=; b=CQwe7psYS0gHktvD5DgsF4G4rmMQwhU9soPOhbyS9oRzb8XvX3BVK489mZ+X6Kk1IJKxy9 ld5awGx/f3+/gRi3DZswRXY9MlZIjPsJP3JOJzMYq9P0R2GUAvaT1ioDQsHw3iDgCyA7Gt IANyyoLG10nLMsmsstwiWVx26ddMqsbSHvy/hciAQLXPvukPAXb8J7+weAkffNkcFZThuF ro1joqYZ7U1UOrF075g3+28xr6XLcxPVq6zqSgMJBcBY9joBnFZMOYJ7DofEP/CBJo4ZYz V/y6iX85vSHV2FaOCKFzxKaKKdxwUJRIG2Jxx6ujQJjZ0TfU40OXsk0OfRlOow== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SF45R0wT9zvg; Tue, 24 Oct 2023 07:51:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39O7pt3X016319; Tue, 24 Oct 2023 07:51:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39O7pt5K016316; Tue, 24 Oct 2023 07:51:55 GMT (envelope-from git) Date: Tue, 24 Oct 2023 07:51:55 GMT Message-Id: <202310240751.39O7pt5K016316@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Wei Hu Subject: git: 7a19350993d9 - releng/14.0 - Hyper-V: vmbus: check if signaling host is needed in vmbus_rxbr_read List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: whu X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 7a19350993d9d93fb378abb588e92df4c4086a63 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by whu: URL: https://cgit.FreeBSD.org/src/commit/?id=7a19350993d9d93fb378abb588e92df4c4086a63 commit 7a19350993d9d93fb378abb588e92df4c4086a63 Author: Wei Hu AuthorDate: 2023-10-20 08:58:20 +0000 Commit: Wei Hu CommitDate: 2023-10-24 07:51:00 +0000 Hyper-V: vmbus: check if signaling host is needed in vmbus_rxbr_read It is observed that netvsc's send rings could stall on the latest Azure Boost platforms. This is due to vmbus_rxbr_read() routine doesn't check if host is waiting for more room to put data, which leads to host side sleeping forever on this vmbus channel. The problem was only observed on the latest platform because the host requests larger buffer ring room to be available, which causes the issue to happen much more easily. Fix this by adding check in the vmbus_rxbr_read call and signaling the host in the callers if check returns positively. Approved by: re (gjb) Reported by: NetApp Tested by: whu Sponsored by: Microsoft (cherry picked from commit 49fa9a64372b087cfd66459a20f4ffd25464b6a3) (cherry picked from commit c81166b018acfbe521f52415ff37b8c2696d77c6) --- sys/dev/hyperv/vmbus/vmbus_br.c | 9 ++++++++- sys/dev/hyperv/vmbus/vmbus_brvar.h | 2 +- sys/dev/hyperv/vmbus/vmbus_chan.c | 12 ++++++++++-- 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/sys/dev/hyperv/vmbus/vmbus_br.c b/sys/dev/hyperv/vmbus/vmbus_br.c index 27adf71fd6ea..f663bb7c2ba5 100644 --- a/sys/dev/hyperv/vmbus/vmbus_br.c +++ b/sys/dev/hyperv/vmbus/vmbus_br.c @@ -684,7 +684,8 @@ vmbus_rxbr_idxadv(struct vmbus_rxbr *rbr, uint32_t idx_adv, * We assume (dlen + skip) == sizeof(channel packet). */ int -vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, uint32_t skip) +vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, uint32_t skip, + boolean_t *need_sig) { uint32_t rindex, br_dsize = rbr->rxbr_dsize; @@ -717,5 +718,11 @@ vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, uint32_t skip) mtx_unlock_spin(&rbr->rxbr_lock); + if (need_sig) { + *need_sig = + vmbus_rxbr_need_signal(rbr, + dlen + skip + sizeof(uint64_t)); + } + return (0); } diff --git a/sys/dev/hyperv/vmbus/vmbus_brvar.h b/sys/dev/hyperv/vmbus/vmbus_brvar.h index 8593c1886b0f..a04169f3291c 100644 --- a/sys/dev/hyperv/vmbus/vmbus_brvar.h +++ b/sys/dev/hyperv/vmbus/vmbus_brvar.h @@ -129,7 +129,7 @@ void vmbus_rxbr_deinit(struct vmbus_rxbr *rbr); void vmbus_rxbr_setup(struct vmbus_rxbr *rbr, void *buf, int blen); int vmbus_rxbr_peek(struct vmbus_rxbr *rbr, void *data, int dlen); int vmbus_rxbr_read(struct vmbus_rxbr *rbr, void *data, int dlen, - uint32_t skip); + uint32_t skip, boolean_t *need_sig); int vmbus_rxbr_idxadv(struct vmbus_rxbr *rbr, uint32_t idx_adv, boolean_t *need_sig); int vmbus_rxbr_idxadv_peek(struct vmbus_rxbr *rbr, void *data, diff --git a/sys/dev/hyperv/vmbus/vmbus_chan.c b/sys/dev/hyperv/vmbus/vmbus_chan.c index d5c4d357e9ec..ecb2e947c953 100644 --- a/sys/dev/hyperv/vmbus/vmbus_chan.c +++ b/sys/dev/hyperv/vmbus/vmbus_chan.c @@ -1205,6 +1205,7 @@ vmbus_chan_recv(struct vmbus_channel *chan, void *data, int *dlen0, { struct vmbus_chanpkt_hdr pkt; int error, dlen, hlen; + boolean_t sig_event; error = vmbus_rxbr_peek(&chan->ch_rxbr, &pkt, sizeof(pkt)); if (error) @@ -1235,9 +1236,12 @@ vmbus_chan_recv(struct vmbus_channel *chan, void *data, int *dlen0, *dlen0 = dlen; /* Skip packet header */ - error = vmbus_rxbr_read(&chan->ch_rxbr, data, dlen, hlen); + error = vmbus_rxbr_read(&chan->ch_rxbr, data, dlen, hlen, &sig_event); KASSERT(!error, ("vmbus_rxbr_read failed")); + if (!error && sig_event) + vmbus_chan_signal_rx(chan); + return (0); } @@ -1246,6 +1250,7 @@ vmbus_chan_recv_pkt(struct vmbus_channel *chan, struct vmbus_chanpkt_hdr *pkt, int *pktlen0) { int error, pktlen, pkt_hlen; + boolean_t sig_event; pkt_hlen = sizeof(*pkt); error = vmbus_rxbr_peek(&chan->ch_rxbr, pkt, pkt_hlen); @@ -1277,9 +1282,12 @@ vmbus_chan_recv_pkt(struct vmbus_channel *chan, * by the above vmbus_rxbr_peek(). */ error = vmbus_rxbr_read(&chan->ch_rxbr, pkt + 1, - pktlen - pkt_hlen, pkt_hlen); + pktlen - pkt_hlen, pkt_hlen, &sig_event); KASSERT(!error, ("vmbus_rxbr_read failed")); + if (!error && sig_event) + vmbus_chan_signal_rx(chan); + return (0); } From nobody Tue Oct 24 12:27:48 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFBCn2BFJz4y01T; Tue, 24 Oct 2023 12:27: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 4SFBCn0GM9z4R5j; Tue, 24 Oct 2023 12:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698150469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=miPa/33H58cDYCCaY3QnhdNYOOkPP7n61f+wjz17qHw=; b=QMqorreqa4jQW22QWuEUhqG5UjwiyzpqyEkP8+qvODIN9VC+p5U8eodA/ygOjmyP6ydtB8 YSQcoPB9QhLtf1U5MbMEG77Mj5te1YyX6YQjCsCOZXAod0tPBVWJeIeopLMbaJyfzoABpJ pqqnHEjt8RcobP58BveKTYNFukkUcLT8MFmjmtEKwXcjoBNr2Ug/DQvIuz3liVcd/9sEDl b00LtP/TyT36hMxQST0E7kN2wnt95QA/MZS21uJe0kK4mxlUNwXVjQGTmuYRGPOcz45h+E CS3ALjwtDmSwQLSfaFUp9DOPYqVPIjLTSKpim/hsPnp7drPinUWD/3XhH+TbLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698150469; a=rsa-sha256; cv=none; b=tmCAhe2Ldyl5akfMCcD4+mlbXQ0X1iISQpetOgIRgXYPotp+u8HxClRq5bZ01rrTV2X+NU PUV2vMO1+FEoJ3WlkHYm17G8f1Vdr0RpdSbcPQ3d+huJ7Dlo7AERve4Opp/0lvqOVmVQYI Q7s5ZsocLdDA9epkPyqoZVi5+qsUY/SR/XxcD1EujPIVHI6kMy+i22BFZJ7i5x4QitouHR oVoyjMQO+wbF6TuphYnybVUoVaDVmAJFofqNuVbsFem81AjDfYWThiIsps/Ca8KPOTYGrY Vw7FYOHbkzM0UZffnhSrXG1vdT8sSb14f3orbORMKd5BWp3F682hOt0BFc/ACA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698150469; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=miPa/33H58cDYCCaY3QnhdNYOOkPP7n61f+wjz17qHw=; b=yp0eOrvypb79Ef3Yxj1XxNB6fpuMBxn8GncwkYuqLNQF9vcwR7xZYZButlVncPNG7YZIOf M+AiM3HkaJEda70QYpKZmyArHAjWdbceBXKhWuoX/EvhxBTSCIfurVCDUHtyfBsC9XIqfR Akzl8Hi3W1ZcnwWTJcriuscvNJXmGCWySRTIl4pJnjBJr/5XQYOt2VC0QdjS2wXKIFLVji wjb8QmT2SG7D4S49ldF99rfFQdavxOEL2NC+Iks0s4B4gOst7IpPylQy6ODGdx/pdmcqPm Umm/egy6OXtk94IqYtDDJJI3BrQnuwk7zINt4KNevrPlFVae4nPxE0L4L6BH9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFBCm6KcGz7lk; Tue, 24 Oct 2023 12:27:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OCRmxB070838; Tue, 24 Oct 2023 12:27:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OCRm5Y070835; Tue, 24 Oct 2023 12:27:48 GMT (envelope-from git) Date: Tue, 24 Oct 2023 12:27:48 GMT Message-Id: <202310241227.39OCRm5Y070835@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 8bfa084a4bf3 - stable/13 - ndp: fix timestamp display output List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8bfa084a4bf331b6baf2cc530b9752c4cbe573ad Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=8bfa084a4bf331b6baf2cc530b9752c4cbe573ad commit 8bfa084a4bf331b6baf2cc530b9752c4cbe573ad Author: R. Christian McDonald AuthorDate: 2023-10-17 16:57:22 +0000 Commit: Kristof Provost CommitDate: 2023-10-24 07:45:38 +0000 ndp: fix timestamp display output The current xo_format string is incorrect. This restores the display format prior to libxo-ification work while also explicitly marking tv_sec and tv_usec as encoded output only. MFC after: 1 week Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42269 (cherry picked from commit 2bb78b46e02413483409fe73244995524b838b6e) --- usr.sbin/ndp/ndp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index 5e79666e6c38..37c4ee769bff 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -1481,7 +1481,7 @@ ts_print(const struct timeval *tvp) /* Default */ sec = (tvp->tv_sec + thiszone) % 86400; - xo_emit("{:tv_sec/%lld}{:tv_usec/%lld}%02d:%02d:%02d.%06u ", + xo_emit("{e:tv_sec/%lld}{e:tv_usec/%lld}{d:/%02d:%02d:%02d.%06u} ", tvp->tv_sec, tvp->tv_usec, sec / 3600, (sec % 3600) / 60, sec % 60, (u_int32_t)tvp->tv_usec); } From nobody Tue Oct 24 12:27:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFBCp0dn4z4y01Y; Tue, 24 Oct 2023 12:27: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 4SFBCp0681z4Qx6; Tue, 24 Oct 2023 12:27:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698150470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CPQg5XzhDqeAeSeZdUZpgtkTFJw58MUlSzWBlD32Oxc=; b=NKEBll/cUlPpaHHzUcYBBAHBEDuTlwr2lUc9jLRNIFdInXFBEb5yhm2uinZ3yN7XkP448N r1LeCo/RrOtSYAxmn9EHstxIhQ3+qAonoutGgqh1wqeVaVsyW9ftD8Yec6jAYoJSiNORml mIZ6ul+KE8oO4q58jo9vVDCkHGNxz3NmUQNH1Iscz6ghDvhD7GILy4iGGMa6hxhsWuuj2J rfaUzotdhNFp1tWOuF8LV/kcaXcr7n7rhirSO7Y0kzrXRS818x2CMzmdz+bvbtajOTCRR+ bVF3crDanEWaxXdmJuUGFSxGpZnHmDS2FBxZ8BDcSec4G2gim4HWTWtZ8BfpVA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698150470; a=rsa-sha256; cv=none; b=APM3EsIxDwF1+fMBpwrq0eKAHRNAE66PZo2pni/d4I84chuq2JQloy4lFVlNKhSArbDEOL 68kWtm+w8+i+cCJiPliOZqt5En7jd8KwDO9ULjSadqPxR81QzuDPmi9xJJJ6x3I+1qTJqK CWMEVWBUjFeogfASXJoCyOFzEIIDH48Z4edmnrzD0QJAeP6K2G9Wsj4eesumR/8gklB77b s4X5jjmfDDGqLoUm0qgIyydErDQOeeTP16QHT8fA2aoeAIo9q+zKkNSU35KwWuw99nSBuk YV9muKEAdjz+vdwW6z9eEOLpNeKle3zjss95mOv3WRlSZuR3JqOYvrLjBquXqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698150470; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CPQg5XzhDqeAeSeZdUZpgtkTFJw58MUlSzWBlD32Oxc=; b=UWxK7ld935aSTC9M3RJtc4HlCP20rEvWWJN1QjwXnxJnEyEJCYC8HyckxJPrLJJuxMC7Rv tvB4VSnJeJpBsStAsdX/DNCOazM6bW5ikHMHBINwRAO1UQ3/XwLPOIaO5aX7OQ8ilwdXu2 DmvMydbLzbRLzq9WFpNZwO//dVuquPT4qEdgVaqx05zUkkVFn9TaWn3WnkYFA4g4Vp4b3e 4vaNVAg/cbPK062WfeBF4aSNNESAEW8/wgGpH5yCWaPQfEirtJ+l5K3DLbJdoiZkZzqwMZ aPjmIBKl8pfy0o9G2f/PdMZDXPKp1FZoBHMRApWJ4FY6asH6htiaEND1yKVt6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFBCn6HB9z6mG; Tue, 24 Oct 2023 12:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OCRndG070950; Tue, 24 Oct 2023 12:27:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OCRndd070938; Tue, 24 Oct 2023 12:27:49 GMT (envelope-from git) Date: Tue, 24 Oct 2023 12:27:49 GMT Message-Id: <202310241227.39OCRndd070938@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 72b97a4e2861 - stable/14 - netlink: cope with growing requests List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 72b97a4e28617b600cc21eb51664d1e1f6e6f923 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=72b97a4e28617b600cc21eb51664d1e1f6e6f923 commit 72b97a4e28617b600cc21eb51664d1e1f6e6f923 Author: Kristof Provost AuthorDate: 2023-10-16 09:48:57 +0000 Commit: Kristof Provost CommitDate: 2023-10-24 07:45:20 +0000 netlink: cope with growing requests If a request ends up growing beyong the initially allocated space the netlink functions (such as snl_add_msg_attr_u32()) will allocate a new buffer. This invalidates the header pointer we can have received from snl_create_msg_request(). Always use the hdr returned by snl_finalize_msg(). Reviewed by: melifaro MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42223 (cherry picked from commit 4f8f43b06ed07e96a250855488cc531799d5b78f) --- sbin/ifconfig/af_inet.c | 6 +++--- sbin/ifconfig/af_inet6.c | 2 +- sbin/ifconfig/ifconfig_netlink.c | 6 +++--- sbin/route/route_netlink.c | 8 ++++---- sys/netlink/netlink_snl_generic.h | 2 +- tests/sys/netlink/test_snl_generic.c | 2 +- usr.sbin/arp/arp_netlink.c | 12 ++++++------ usr.sbin/ndp/ndp_netlink.c | 12 ++++++------ 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/sbin/ifconfig/af_inet.c b/sbin/ifconfig/af_inet.c index 83b605e8c4cb..bcf2a8ab0ffd 100644 --- a/sbin/ifconfig/af_inet.c +++ b/sbin/ifconfig/af_inet.c @@ -360,7 +360,7 @@ in_delete_first_nl(if_ctx *ctx) ifahdr->ifa_family = AF_INET; ifahdr->ifa_index = ifindex; - if (!snl_finalize_msg(&nw) || !snl_send_message(ss, hdr)) + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(ss, hdr)) return (EINVAL); nlmsg_seq = hdr->nlmsg_seq; @@ -391,7 +391,7 @@ in_delete_first_nl(if_ctx *ctx) ifahdr->ifa_index = ifindex; snl_add_msg_attr_ip4(&nw, IFA_LOCAL, &addr); - if (!snl_finalize_msg(&nw) || !snl_send_message(ss, hdr)) + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(ss, hdr)) return (EINVAL); memset(&e, 0, sizeof(e)); snl_read_reply_code(ss, hdr->nlmsg_seq, &e); @@ -431,7 +431,7 @@ in_exec_nl(if_ctx *ctx, unsigned long action, void *data) snl_add_msg_attr_u32(&nw, IFAF_VHID, pdata->vhid); snl_end_attr_nested(&nw, off); - if (!snl_finalize_msg(&nw) || !snl_send_message(ctx->io_ss, hdr)) + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(ctx->io_ss, hdr)) return (0); struct snl_errmsg_data e = {}; diff --git a/sbin/ifconfig/af_inet6.c b/sbin/ifconfig/af_inet6.c index a0138e9b3de6..b3da21758982 100644 --- a/sbin/ifconfig/af_inet6.c +++ b/sbin/ifconfig/af_inet6.c @@ -493,7 +493,7 @@ in6_exec_nl(if_ctx *ctx, unsigned long action, void *data) snl_add_msg_attr_u32(&nw, IFAF_VHID, pdata->vhid); snl_end_attr_nested(&nw, off); - if (!snl_finalize_msg(&nw) || !snl_send_message(ctx->io_ss, hdr)) + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(ctx->io_ss, hdr)) return (0); struct snl_errmsg_data e = {}; diff --git a/sbin/ifconfig/ifconfig_netlink.c b/sbin/ifconfig/ifconfig_netlink.c index 76dd99307f31..7be340e18ab5 100644 --- a/sbin/ifconfig/ifconfig_netlink.c +++ b/sbin/ifconfig/ifconfig_netlink.c @@ -171,7 +171,7 @@ prepare_ifmap(struct snl_state *ss) hdr->nlmsg_flags |= NLM_F_DUMP; snl_reserve_msg_object(&nw, struct ifinfomsg); - if (!snl_finalize_msg(&nw) || !snl_send_message(ss, hdr)) + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(ss, hdr)) return (NULL); uint32_t nlmsg_seq = hdr->nlmsg_seq; @@ -212,7 +212,7 @@ if_nametoindex_nl(struct snl_state *ss, const char *ifname) snl_reserve_msg_object(&nw, struct ifinfomsg); snl_add_msg_attr_string(&nw, IFLA_IFNAME, ifname); - if (!snl_finalize_msg(&nw) || !snl_send_message(ss, hdr)) + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(ss, hdr)) return (0); hdr = snl_read_reply(ss, hdr->nlmsg_seq); @@ -234,7 +234,7 @@ prepare_ifaddrs(struct snl_state *ss, struct ifmap *ifmap) hdr->nlmsg_flags |= NLM_F_DUMP; snl_reserve_msg_object(&nw, struct ifaddrmsg); - if (!snl_finalize_msg(&nw) || !snl_send_message(ss, hdr)) + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(ss, hdr)) return; uint32_t nlmsg_seq = hdr->nlmsg_seq; diff --git a/sbin/route/route_netlink.c b/sbin/route/route_netlink.c index 0dbd90151e10..28766b062e18 100644 --- a/sbin/route/route_netlink.c +++ b/sbin/route/route_netlink.c @@ -266,7 +266,7 @@ rtmsg_nl_int(struct nl_helper *h, int cmd, int rtm_flags, int fib, int rtm_addrs if (rt_metrics->rmx_weight > 0) snl_add_msg_attr_u32(&nw, NL_RTA_WEIGHT, rt_metrics->rmx_weight); - if (snl_finalize_msg(&nw) && snl_send_message(ss, hdr)) { + if ((hdr = snl_finalize_msg(&nw)) && snl_send_message(ss, hdr)) { struct snl_errmsg_data e = {}; hdr = snl_read_reply(ss, hdr->nlmsg_seq); @@ -314,7 +314,7 @@ get_ifdata(struct nl_helper *h, uint32_t ifindex, struct snl_parsed_link_simple struct ifinfomsg *ifmsg = snl_reserve_msg_object(&nw, struct ifinfomsg); if (ifmsg != NULL) ifmsg->ifi_index = ifindex; - if (!snl_finalize_msg(&nw) || !snl_send_message(ss, hdr)) + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(ss, hdr)) return; hdr = snl_read_reply(ss, hdr->nlmsg_seq); @@ -817,7 +817,7 @@ flushroute_one(struct nl_helper *h, struct snl_parsed_route *r) snl_add_msg_attr_u32(&nw, RTA_TABLE, r->rta_table); snl_add_msg_attr_ip(&nw, RTA_DST, r->rta_dst); - if (!snl_finalize_msg(&nw) || !snl_send_message(ss, hdr)) + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(ss, hdr)) return (ENOMEM); if (!snl_read_reply_code(ss, hdr->nlmsg_seq, &e)) { @@ -864,7 +864,7 @@ flushroutes_fib_nl(int fib, int af) rtm->rtm_family = af; snl_add_msg_attr_u32(&nw, RTA_TABLE, fib); - if (!snl_finalize_msg(&nw) || !snl_send_message(&ss, hdr)) { + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(&ss, hdr)) { snl_free(&ss); return (EINVAL); } diff --git a/sys/netlink/netlink_snl_generic.h b/sys/netlink/netlink_snl_generic.h index 1324cf3da17a..0a2913c9155e 100644 --- a/sys/netlink/netlink_snl_generic.h +++ b/sys/netlink/netlink_snl_generic.h @@ -106,7 +106,7 @@ snl_get_genl_family_info(struct snl_state *ss, const char *family_name, snl_init_writer(ss, &nw); hdr = snl_create_genl_msg_request(&nw, GENL_ID_CTRL, CTRL_CMD_GETFAMILY); snl_add_msg_attr_string(&nw, CTRL_ATTR_FAMILY_NAME, family_name); - if (snl_finalize_msg(&nw) == NULL || !snl_send_message(ss, hdr)) + if ((hdr = snl_finalize_msg(&nw)) == NULL || !snl_send_message(ss, hdr)) return (false); hdr = snl_read_reply(ss, hdr->nlmsg_seq); diff --git a/tests/sys/netlink/test_snl_generic.c b/tests/sys/netlink/test_snl_generic.c index f3c11daf19e1..d84d3f88f487 100644 --- a/tests/sys/netlink/test_snl_generic.c +++ b/tests/sys/netlink/test_snl_generic.c @@ -86,7 +86,7 @@ ATF_TC_BODY(test_snl_get_genl_family_groups, tc) snl_init_writer(&ss, &nw); hdr = snl_create_genl_msg_request(&nw, GENL_ID_CTRL, CTRL_CMD_GETFAMILY); snl_add_msg_attr_string(&nw, CTRL_ATTR_FAMILY_NAME, "nlctrl"); - snl_finalize_msg(&nw); + hdr = snl_finalize_msg(&nw); snl_send_message(&ss, hdr); hdr = snl_read_reply(&ss, hdr->nlmsg_seq); diff --git a/usr.sbin/arp/arp_netlink.c b/usr.sbin/arp/arp_netlink.c index 40b5367f330d..d78f380af04b 100644 --- a/usr.sbin/arp/arp_netlink.c +++ b/usr.sbin/arp/arp_netlink.c @@ -63,7 +63,7 @@ get_link_info(struct snl_state *ss, uint32_t ifindex, struct ifinfomsg *ifmsg = snl_reserve_msg_object(&nw, struct ifinfomsg); if (ifmsg != NULL) ifmsg->ifi_index = ifindex; - if (!snl_finalize_msg(&nw) || !snl_send_message(ss, hdr)) + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(ss, hdr)) return (false); hdr = snl_read_reply(ss, hdr->nlmsg_seq); @@ -116,7 +116,7 @@ guess_ifindex(struct snl_state *ss, uint32_t fibnum, struct in_addr addr) snl_add_msg_attr_ip(&nw, RTA_DST, (struct sockaddr *)&dst); snl_add_msg_attr_u32(&nw, RTA_TABLE, fibnum); - if (!snl_finalize_msg(&nw) || !snl_send_message(ss, hdr)) + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(ss, hdr)) return (0); hdr = snl_read_reply(ss, hdr->nlmsg_seq); @@ -148,7 +148,7 @@ guess_ifindex(struct snl_state *ss, uint32_t fibnum, struct in_addr addr) snl_add_msg_attr_u32(&nw, NHAF_TABLE, fibnum); snl_end_attr_nested(&nw, off); - if (!snl_finalize_msg(&nw) || !snl_send_message(ss, hdr)) + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(ss, hdr)) return (0); hdr = snl_read_reply(ss, hdr->nlmsg_seq); @@ -285,7 +285,7 @@ print_entries_nl(uint32_t ifindex, struct in_addr addr) ndmsg->ndm_ifindex = ifindex; } - if (!snl_finalize_msg(&nw) || !snl_send_message(&ss_req, hdr)) { + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(&ss_req, hdr)) { snl_free(&ss_req); return (0); } @@ -355,7 +355,7 @@ delete_nl(uint32_t ifindex, char *host) } snl_add_msg_attr_ip(&nw, NDA_DST, (struct sockaddr *)dst); - if (!snl_finalize_msg(&nw) || !snl_send_message(&ss, hdr)) { + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(&ss, hdr)) { snl_free(&ss); return (1); } @@ -422,7 +422,7 @@ set_nl(uint32_t ifindex, struct sockaddr_in *dst, struct sockaddr_dl *sdl, char snl_end_attr_nested(&nw, off); } - if (!snl_finalize_msg(&nw) || !snl_send_message(&ss, hdr)) { + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(&ss, hdr)) { snl_free(&ss); return (1); } diff --git a/usr.sbin/ndp/ndp_netlink.c b/usr.sbin/ndp/ndp_netlink.c index 954d16995b5a..79bdec2356d0 100644 --- a/usr.sbin/ndp/ndp_netlink.c +++ b/usr.sbin/ndp/ndp_netlink.c @@ -76,7 +76,7 @@ get_link_info(struct snl_state *ss, uint32_t ifindex, struct ifinfomsg *ifmsg = snl_reserve_msg_object(&nw, struct ifinfomsg); if (ifmsg != NULL) ifmsg->ifi_index = ifindex; - if (!snl_finalize_msg(&nw) || !snl_send_message(ss, hdr)) + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(ss, hdr)) return (false); hdr = snl_read_reply(ss, hdr->nlmsg_seq); @@ -152,7 +152,7 @@ guess_ifindex(struct snl_state *ss, uint32_t fibnum, const struct sockaddr_in6 * snl_add_msg_attr_ip(&nw, RTA_DST, (struct sockaddr *)dst); snl_add_msg_attr_u32(&nw, RTA_TABLE, fibnum); - if (!snl_finalize_msg(&nw) || !snl_send_message(ss, hdr)) + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(ss, hdr)) return (0); hdr = snl_read_reply(ss, hdr->nlmsg_seq); @@ -184,7 +184,7 @@ guess_ifindex(struct snl_state *ss, uint32_t fibnum, const struct sockaddr_in6 * snl_add_msg_attr_u32(&nw, NHAF_TABLE, fibnum); snl_end_attr_nested(&nw, off); - if (!snl_finalize_msg(&nw) || !snl_send_message(ss, hdr)) + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(ss, hdr)) return (0); hdr = snl_read_reply(ss, hdr->nlmsg_seq); @@ -327,7 +327,7 @@ print_entries_nl(uint32_t ifindex, struct sockaddr_in6 *addr, bool cflag) ndmsg->ndm_ifindex = ifindex; } - if (!snl_finalize_msg(&nw) || !snl_send_message(&ss_req, hdr)) { + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(&ss_req, hdr)) { snl_free(&ss_req); return (0); } @@ -421,7 +421,7 @@ delete_nl(uint32_t ifindex, char *host) } snl_add_msg_attr_ip(&nw, NDA_DST, (struct sockaddr *)&dst); - if (!snl_finalize_msg(&nw) || !snl_send_message(&ss, hdr)) { + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(&ss, hdr)) { snl_free(&ss); return (1); } @@ -493,7 +493,7 @@ set_nl(uint32_t ifindex, struct sockaddr_in6 *dst, struct sockaddr_dl *sdl, char snl_add_msg_attr_ip(&nw, NDA_DST, (struct sockaddr *)dst); snl_add_msg_attr(&nw, NDA_LLADDR, sdl->sdl_alen, LLADDR(sdl)); - if (!snl_finalize_msg(&nw) || !snl_send_message(&ss, hdr)) { + if (! (hdr = snl_finalize_msg(&nw)) || !snl_send_message(&ss, hdr)) { snl_free(&ss); return (1); } From nobody Tue Oct 24 12:27:50 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFBCq1ngrz4y01c; Tue, 24 Oct 2023 12:27: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 4SFBCq1JWyz4R9T; Tue, 24 Oct 2023 12:27:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698150471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QS3IbmvlNsWGLo42JWN+owqG9bTO+fTnr0mNI+2YLSY=; b=vKtwHZrdowVB6XyzGiFb4viDMZSNcgq+VPUCvonmwbYd/iZA1ETNi75BwkKeWuHqDwacQG bH0OwnKvkbDxX00angx1j6UoyLPm52FJSr+YitvoP4lblp3Fop821ueZXOOxxHS0qOi/Nd SzGFxIAJp7BF+iBsiJ60Bwh1uIjcWzbB6NzeY/62uqK7l2mt6QxjUlIV5eq0LJDBu60IJ5 lNZkoI600FqLj4RCptfl7U7qU6JBmHZ6osypodFKI+Shq5hVKLeMEiyFfEi1HFnjzh88mH Bb4B3cYJIxnvkd37pUVjeTR3v4XIdgj/wE5cjGsxA1CFLp5LSVydIntfPAC7IQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698150471; a=rsa-sha256; cv=none; b=gAW4CFd+D4giBEYKTnUZvrOcr3xxm2kcHDscFLtcnHKa7w0o4/ip+gL54ky4z+nBVSbn/X N3bPCGIgwY0lSySG/AazoUh5zrnYQg5iyS6HcJYBG66z/r2fNx9kGezw9tEhympz7KQUYw X2mneHxZgXu1HOkaMNzbjWJgziHFGmrKCo3Z+Oo6hbEykctrnOHaUc2M4/h8r2gfxJTzwm zneYxpHNUcm2tfUHucKsyqMaMXl2BJe09qo4HMtJB4BZlGfqVV3HPNFcHVlhHQzUtbLbj6 7+bZWzX75xLAAEaNR8adKFbQ1ZZKccaEvpOfurRBrYNRlO/nfSkpQ8m8hpNzUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698150471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QS3IbmvlNsWGLo42JWN+owqG9bTO+fTnr0mNI+2YLSY=; b=x46hBKqFD6qry0d52ArZsQtlVTaP2x0ZLdUd0BKDAoZxFveJOLqor7eI2yUlqWq6zGQ5km oXkyDjISo83Bpu3A7yJ+mgd64D06sJEYeLltZhP07QA36EwEZD+q7mn3jk4oomQE/qtIt7 9lWeJuCPMY8q0ht0cJbuXZQ90Mli6bt4mACdsqL181ksyj5MuPGXm8/FFPOLsgwGpFAjQr IObNsc3EVQbQc9haL3Iqt6adPBPBTkjuaWiYNHkQlmqk2W7gSVoehQGi9Hl8g2rU6qXTG/ g4YZJ1Ravr/qA0vT9xGXQuwyPO+8jg00NcLr2SP8Z3UeukFIcdlUk7ZOLzlwfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFBCq0Mf5z7Yv; Tue, 24 Oct 2023 12:27:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OCRoQB071004; Tue, 24 Oct 2023 12:27:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OCRoPa071001; Tue, 24 Oct 2023 12:27:50 GMT (envelope-from git) Date: Tue, 24 Oct 2023 12:27:50 GMT Message-Id: <202310241227.39OCRoPa071001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 169746a877f6 - stable/14 - ndp: fix timestamp display output List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 169746a877f6f90214fec17bc0861eaf94cde855 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=169746a877f6f90214fec17bc0861eaf94cde855 commit 169746a877f6f90214fec17bc0861eaf94cde855 Author: R. Christian McDonald AuthorDate: 2023-10-17 16:57:22 +0000 Commit: Kristof Provost CommitDate: 2023-10-24 07:45:35 +0000 ndp: fix timestamp display output The current xo_format string is incorrect. This restores the display format prior to libxo-ification work while also explicitly marking tv_sec and tv_usec as encoded output only. MFC after: 1 week Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") Differential Revision: https://reviews.freebsd.org/D42269 (cherry picked from commit 2bb78b46e02413483409fe73244995524b838b6e) --- usr.sbin/ndp/ndp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/ndp/ndp.c b/usr.sbin/ndp/ndp.c index 1e3469d54228..b7bc25dd7aa4 100644 --- a/usr.sbin/ndp/ndp.c +++ b/usr.sbin/ndp/ndp.c @@ -1544,7 +1544,7 @@ ts_print(const struct timeval *tvp) /* Default */ sec = (tvp->tv_sec + thiszone) % 86400; - xo_emit("{:tv_sec/%lld}{:tv_usec/%lld}%02d:%02d:%02d.%06u ", + xo_emit("{e:tv_sec/%lld}{e:tv_usec/%lld}{d:/%02d:%02d:%02d.%06u} ", tvp->tv_sec, tvp->tv_usec, sec / 3600, (sec % 3600) / 60, sec % 60, (u_int32_t)tvp->tv_usec); } From nobody Tue Oct 24 12:44:01 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFBZl6D4fz4y0SF; Tue, 24 Oct 2023 12:44:15 +0000 (UTC) (envelope-from 75ypz71@oldach.net) Received: from nuc.oldach.net (hmo.in-vpn.de [IPv6:2001:67c:1407:60::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "hmo.in-vpn.de", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SFBZk4FMDz4Svc; Tue, 24 Oct 2023 12:44:14 +0000 (UTC) (envelope-from 75ypz71@oldach.net) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of 75ypz71@oldach.net designates 2001:67c:1407:60::1 as permitted sender) smtp.mailfrom=75ypz71@oldach.net; dmarc=none Received: from nuc.oldach.net (localhost [127.0.0.1]) by nuc.oldach.net (8.17.2/8.17.2) with ESMTPS id 39OCi10K054416 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Tue, 24 Oct 2023 14:44:01 +0200 (CEST) (envelope-from 75ypz71@oldach.net) Received: (from hmo@localhost) by nuc.oldach.net (8.17.2/8.17.2) id 39OCi1Zl054415; Tue, 24 Oct 2023 14:44:01 +0200 (CEST) (envelope-from 75ypz71@oldach.net) Message-Id: <202310241244.39OCi1Zl054415@nuc.oldach.net> Subject: Re: git: 8bfa084a4bf3 - stable/13 - ndp: fix timestamp display output In-Reply-To: <202310241227.39OCRm5Y070835@gitrepo.freebsd.org> from Kristof Provost at "24 Oct 2023 12:27:48" To: kp@FreeBSD.org (Kristof Provost) Date: Tue, 24 Oct 2023 14:44:01 +0200 (CEST) Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: 75ypz71@oldach.net (Helge Oldach) X-No-Archive: Yes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: inspected by milter-greylist-4.6.4 (nuc.oldach.net [0.0.0.0]); Tue, 24 Oct 2023 14:44:01 +0200 (CEST) for IP:127.0.0.1 DOMAIN:localhost HELO:nuc.oldach.net FROM:75ypz71@oldach.net RCPT: X-Spamd-Bar: --- X-Spamd-Result: default: False [-3.30 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.999]; R_SPF_ALLOW(-0.20)[+mx]; MIME_GOOD(-0.10)[text/plain]; FROM_EQ_ENVFROM(0.00)[]; FROM_NO_DN(0.00)[]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@FreeBSD.org,dev-commits-src-branches@FreeBSD.org]; MIME_TRACE(0.00)[0:+]; MID_RHS_MATCH_FROMTLD(0.00)[]; RCVD_TLS_LAST(0.00)[]; DMARC_NA(0.00)[oldach.net]; ARC_NA(0.00)[]; ASN(0.00)[asn:29670, ipnet:2001:67c:1400::/45, country:DE]; RCPT_COUNT_THREE(0.00)[4]; TO_DN_NONE(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_TWO(0.00)[2] X-Rspamd-Queue-Id: 4SFBZk4FMDz4Svc Kristof Provost wrote on Tue, 24 Oct 2023 14:27:48 +0200 (CEST): > The branch stable/13 has been updated by kp: > > URL: https://cgit.FreeBSD.org/src/commit/?id=8bfa084a4bf331b6baf2cc530b9752c4cbe573ad > > commit 8bfa084a4bf331b6baf2cc530b9752c4cbe573ad > Author: R. Christian McDonald > AuthorDate: 2023-10-17 16:57:22 +0000 > Commit: Kristof Provost > CommitDate: 2023-10-24 07:45:38 +0000 > > ndp: fix timestamp display output > > The current xo_format string is incorrect. This restores the display > format prior to libxo-ification work while also explicitly marking > tv_sec and tv_usec as encoded output only. A couple of other xo_emit formats in ndp had also been damaged by the libxo-ification. Please see patch in PR 272749. Kind regards Helge From nobody Tue Oct 24 12:49:34 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFBht3263z4y0qp; Tue, 24 Oct 2023 12:49: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 4SFBht2bn0z4T6R; Tue, 24 Oct 2023 12:49:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698151774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k22mdZ4o8h0/AKd+MuYJKQv4X5L3XsXYrNkmSM7rP1c=; b=ZlVj3dsaSP7Vp24J3EC/3TOU6VLZnUYZ8AFGdjXHmGZWmpWWcrhMb5FwROqD0m78OTHZqT dbpkWzwVD4+Kdeu6V8pl457DAmac3cpPgI1KIdAnRpXq0rsTh+8R/hd98lRRoV9Ok67Fxx nf26Ox6CKxvhBXgYw9p/faOt2S7A0eVJW6wN3Wpl9FH05xMde5zc2HYroC5iws0Y6ltkka PEhevu4GIYI6ZzJGn1mrMd3XeMPIpHq22TbM4Gd35B8tDTj5qs6CEH0mBv8ooMDYXhFXBT wE9LzDKTXZejS/3Aqu+esMTl4Cg9W6+zeM91gtzKy7gzba1OKsW8ZYaJj5KUlw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698151774; a=rsa-sha256; cv=none; b=HH2vsfhTfeEJ4l5FPdBLeq5N6ZMwSivngEdvwU+mwkN/SU2bhrRLQFcGq0jusuT1H9BYE0 JEO/vXmr3iH7oi1hMvTZso60XODEhLGFZOvE4S8M0CqP2UNgkpEF6642k/LDtrUVJoCk+z rSb8CVKuMaq1rA7Qyf11RD39O47DiWJj3MQZQTsR/ynuGQTYV1jAxoEO9FM52AKd3hreRO U8yRPKlKYLGmy7rliU3xPUiwo0dNeGllpw/AcCW+BEXarKTVHIdnt/GN1uewY2Cm5LqsY9 TXjqRUW89D9BRSlhaWiO50JBME7De9vQKrxog6gGA4HWPc9F/dfJNDrIGwv0HQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698151774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k22mdZ4o8h0/AKd+MuYJKQv4X5L3XsXYrNkmSM7rP1c=; b=Xajv7aymmZhqz7gdXRJIqmjb4A2VnOp0tdVQ2f1UJB04JZiAqa7tRJsQeu8kL8e3aE0Loq OanAvXE/CKW9BQxUHdP7QBXmfQt5x50fy0A/S28/aYnVNyxF23A21iP1O5vT2It/EVwGvj 9Te3VyUz9lR6TCA3VXvD2CtHL5BNK5HVPiSymeaSZxjjKQrdvdNrNlTQ2S+12Fh8yQTU5m Ikd8iEln8QgBJGtlCfjhjKJ3lW5Ss/k1zh9cmBCCuqNsJQmYRElRJFYokbHz2zBjPWB0ha BNEdcCPpFoDmLleFHOWQQfD3T8ythg1F4agnVmop2fzQ76Z7OFoWidicey8KaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFBht1fV2z7b5; Tue, 24 Oct 2023 12:49:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OCnYDU004757; Tue, 24 Oct 2023 12:49:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OCnYWD004754; Tue, 24 Oct 2023 12:49:34 GMT (envelope-from git) Date: Tue, 24 Oct 2023 12:49:34 GMT Message-Id: <202310241249.39OCnYWD004754@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: 465b393b731c - stable/14 - Add expected failure for tmpfs atime test failing on FreeBSD List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: 465b393b731c621ce027b8542cb70ce50943edcc Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=465b393b731c621ce027b8542cb70ce50943edcc commit 465b393b731c621ce027b8542cb70ce50943edcc Author: Ed Maste AuthorDate: 2023-10-21 15:15:14 +0000 Commit: Ed Maste CommitDate: 2023-10-24 12:49:17 +0000 Add expected failure for tmpfs atime test failing on FreeBSD PR: 274615 Reviewed by: ngie Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42321 (cherry picked from commit 63f537551380d2dab29fa402ad1269feae17e594) --- contrib/netbsd-tests/fs/tmpfs/t_times.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/contrib/netbsd-tests/fs/tmpfs/t_times.sh b/contrib/netbsd-tests/fs/tmpfs/t_times.sh index f83dfe8f5929..f7676814fa71 100755 --- a/contrib/netbsd-tests/fs/tmpfs/t_times.sh +++ b/contrib/netbsd-tests/fs/tmpfs/t_times.sh @@ -36,6 +36,10 @@ empty_head() { atf_set "require.user" "root" } empty_body() { + # Begin FreeBSD + atf_expect_fail "Incorrect atime on FreeBSD: PR274615" + # End FreeBSD + test_mount atf_check -s eq:0 -o empty -e empty touch a From nobody Tue Oct 24 13:38:04 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFCmr3Gg0z4y3dq; Tue, 24 Oct 2023 13:38: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 4SFCmr2nFlz4Y26; Tue, 24 Oct 2023 13:38:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vnaL3hRTw19giz3jR3UdKjLUI+y0loVTCi6iWnIKdV8=; b=fztSW6FKz85Yof7Z0/XDOEmtVf3Wlqagl3YQlk/hIYCv4IbHD0HL9kUrFWTSzIkqJlsdby sWh3Cs5JFqFJ6mvxkcRDiP/mm7fJVxg0+rLnu0greP6Hne3I2FSMbIbY8lkDi33TL7F5R+ gA6HfeRBo5xcTfGBTHSTGRpmp+Xtuu1Z2CCyAUC5XGE5Ep2z4cgLEfgoXzWtxZ/p2oBuJo xtBQR02X22VQmCcdeHrZW2Bt2FXjk/w6IksTIppSQJSoGGOBMxgI9s/InFYeE1gu4B3yeN xHrrTwAqALog+aSythxCFYZmcSCo8vj2xaNmxExzfjx19Nd9Ya9/K8A2sm8OXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154684; a=rsa-sha256; cv=none; b=YH9A5vp60nDzan+428eJomwq71/k0/0+A2O5v6Kr5X8eygf73xTUVHnRrwJ1Z1wblsAGUI A71IPbxOD80NI3n59uw7VHbZa5hvY1Phx0iCefHaTvx7xMnBIGc40dhlhGCnfcfkhtlFs7 +QZGTTtm7J79UsPPFJ7a8xPce9fT9HZuU4CpOnMI23vfD8GXOIfaV25Qy0msQNp4NsbiX9 T97lf4f+qAGL59ouv/L+Y595qUk9yQaoJ+eaFrRSqCslvVjCwpwDEQa1BAF0HjUJPgz3D/ SUnD3JXqX7Opd9fq2WkG/tAQxZKMMrgSgJpoW0fG0n5LI0e8LiYFBOedUjNukg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vnaL3hRTw19giz3jR3UdKjLUI+y0loVTCi6iWnIKdV8=; b=uwWt0UGTNFk7By42DRd7KtTGnFZfXQNvCKp2wVkP0AL/RiIdhQvrR4rqQWq6fC+JfJSRsC WWxcWZXK8XDv+jh3A7M/ofLWtGkHYUXZ6BjpX4zF5tWWAegGwOQQdsBdJ81pMmlqSSxNF2 l+jVCwsOWoujqKtQJy598/5W1gMBCfYrRuciIBRlA3Tg7WcCAfHX3/h1oe2v9mJq+VzcJP wC5ceXCvxs5L9j6Bo9SV4h9Lx+WHWJjlKrG2rOkejwEQghi84fsaSuam0gu6rFT8Lt2vMw gtxVItKtLIPOLfsl+BuP98wPXqtK9bKj3lAqFwAoATh+DeLXND9ZAnRjKXzBTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFCmr1qkTz9Sq; Tue, 24 Oct 2023 13:38:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODc4EN088634; Tue, 24 Oct 2023 13:38:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODc4Wm088631; Tue, 24 Oct 2023 13:38:04 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:04 GMT Message-Id: <202310241338.39ODc4Wm088631@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: 2d7b5953dd90 - stable/13 - geom_linux_lvm: Avoid removing from vg_list before inserting List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: 2d7b5953dd90430c065014b748ac0e6217bff9d7 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2d7b5953dd90430c065014b748ac0e6217bff9d7 commit 2d7b5953dd90430c065014b748ac0e6217bff9d7 Author: Mark Johnston AuthorDate: 2023-10-17 14:25:38 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:18:07 +0000 geom_linux_lvm: Avoid removing from vg_list before inserting PR: 266693 Reported by: Robert Morris MFC after: 1 week (cherry picked from commit 56279238b03a0ccef245b22fff7679fe35cffccc) --- sys/geom/linux_lvm/g_linux_lvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/geom/linux_lvm/g_linux_lvm.c b/sys/geom/linux_lvm/g_linux_lvm.c index dddc3ae9184e..c63318fed729 100644 --- a/sys/geom/linux_lvm/g_linux_lvm.c +++ b/sys/geom/linux_lvm/g_linux_lvm.c @@ -512,7 +512,6 @@ g_llvm_free_vg(struct g_llvm_vg *vg) LIST_REMOVE(lv, lv_next); free(lv, M_GLLVM); } - LIST_REMOVE(vg, vg_next); free(vg, M_GLLVM); } @@ -596,7 +595,8 @@ g_llvm_destroy(struct g_llvm_vg *vg, int force) } } - g_llvm_free_vg(gp->softc); + LIST_REMOVE(vg, vg_next); + g_llvm_free_vg(vg); gp->softc = NULL; g_wither_geom(gp, ENXIO); return (0); From nobody Tue Oct 24 13:38:05 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFCms4Lsvz4y3ds; Tue, 24 Oct 2023 13:38: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 4SFCms3Z71z4Y2f; Tue, 24 Oct 2023 13:38:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SiOzKFX/AVDFAfcI//H3ZUvw1Ggg3NlOxUwwKCtbb+4=; b=x69A8YDO31HcXgU7vIP/6mKz+0uwRTQ5BQl+IfnAZgLjOJfaiduX3f2Xum9HDEQF4358qm KV6+GeQG8uR8dlp0kdxc6FEWB7bu/9BZZ3X0t2PueCVWwbugCrGqvIZqT29BULcrHX0pQA 0DSYegI2bJW4PEgcikng3DCIIdw5SovdFa2Y54py1K7qX/Vl77CVhpd6Dulp0HqB+5eU1u OWsB9Ofup1Inm0YV+08LYPs9BjWLxBc53AJZldi+DM9RnxeH6ft8x0lkDKZDxI9NCTOPIR v7FLpKE2s53lDlpyYqbgyWFLUMoLBrCSsKTPcKLHGv0cZr7VMcY0t4o8v2JdTQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154685; a=rsa-sha256; cv=none; b=XmJLJWNyiTgIK1XXVNXnvhgkNg0iHFQ386KDug16yVRJGhO6o/Rga2oTiQbPuKfmctAANg Pkj6ET7StBCZu+mH87eA5zmWdznnOn5XAu8eyDDPdowoqpP3mAPy7q/kuBANONmk/DIsTy g88rhqEw9RtFqn7JxYGD6DQSNOUcEuTLxAhi8aWZZ/UpFz4xGS0zTXL4dvphbMKzdzs9Qm RmwD3E8WAq0QaqwxJi03fPS/pvQgvObAm+oV9ngNyRnZXMkPsiJ1/+W98c1HT2jVS4kCOJ UEIR/yfgLwr84SzC0mdg+5Z+OFv1JRBIp096HF+ZroJtQcLvEPFRnGieJapDKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SiOzKFX/AVDFAfcI//H3ZUvw1Ggg3NlOxUwwKCtbb+4=; b=jF+Q1jWu75p4+vwN2Qfm1zPeIBZZafQ1uf73B3cOh0Or15XhnESjidJtVec/9bPDeL/9y2 lSJGP3p4vjhYdO1Rkm0mPAkwj3fzXZJV8kD9Q8us7af2ISf38V91X3uiU8qATIsqZDXIoZ 8BIqGBSlr30gSN80LpGDTl8S2g6s76sEzhL990iSbHbJFGMbCM3s4azYbRXIwT1QaN4ir5 IpuJAYHD/2L3wt49ni1l4k5Vdc3stcVGPtFR/+R9KVZmhVWgAEOI11mv66bgk0rzvHkRaA K5ZQMScGPOHCRQXdpbshmT921d2q+zK7vX34tmZ+RoexDEbDgLvOP5dvZZSfgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFCms2glmz9Yr; Tue, 24 Oct 2023 13:38:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODc5xM088691; Tue, 24 Oct 2023 13:38:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODc5Wf088688; Tue, 24 Oct 2023 13:38:05 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:05 GMT Message-Id: <202310241338.39ODc5Wf088688@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: 95fa4ae00e18 - stable/13 - socket tests: Clean up the MSG_TRUNC regression tests a bit List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: 95fa4ae00e18a46eb85e31718d172b12ba2d2ce4 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=95fa4ae00e18a46eb85e31718d172b12ba2d2ce4 commit 95fa4ae00e18a46eb85e31718d172b12ba2d2ce4 Author: Mark Johnston AuthorDate: 2023-10-16 21:35:07 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:18:27 +0000 socket tests: Clean up the MSG_TRUNC regression tests a bit - Fix style. - Move test case-specific code out of the shared function and into the individual test cases. - Remove unneeded setting of SO_REUSEPORT. - Avoid unnecessary copying. - Use ATF_REQUIRE* instead of ATF_CHECK*. The former cause test execution to stop after a failed assertion, which is what we want. - Add a test case for AF_LOCAL/SOCK_SEQPACKET sockets. MFC after: 1 week (cherry picked from commit b5e7dbac756afb49c58315c7081737b34a1d2dfd) --- tests/sys/kern/socket_msg_trunc.c | 230 +++++++++++++++++++++----------------- 1 file changed, 128 insertions(+), 102 deletions(-) diff --git a/tests/sys/kern/socket_msg_trunc.c b/tests/sys/kern/socket_msg_trunc.c index a863705adbae..469b9e1503cd 100644 --- a/tests/sys/kern/socket_msg_trunc.c +++ b/tests/sys/kern/socket_msg_trunc.c @@ -25,143 +25,169 @@ * SUCH DAMAGE. */ -#include -#include -#include +#include #include #include #include + #include + #include +#include +#include #include static void -check_recvmsg(const char *test_name) +check_recvmsg(int cs, int ss, struct sockaddr *sa, const size_t sizes[], + size_t nsizes) { - int ss, cs, rc; - struct sockaddr *sa; - struct sockaddr_in sin; - struct sockaddr_in6 sin6; - struct sockaddr_un saun; - int *sizes, sizes_count; - int one = 1; - - - if (!strcmp(test_name, "udp")) { - ss = socket(PF_INET, SOCK_DGRAM, 0); - ATF_CHECK(ss >= 0); - rc = setsockopt(ss, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)); - ATF_CHECK_EQ(0, rc); - bzero(&sin, sizeof(sin)); - sin.sin_family = AF_INET; - sin.sin_len = sizeof(sin); - sin.sin_port = htons(6666); - sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - sa = (struct sockaddr *)&sin; - rc = bind(ss, sa, sa->sa_len); - ATF_CHECK_EQ(0, rc); - - cs = socket(PF_INET, SOCK_DGRAM, 0); - ATF_CHECK(cs >= 0); - int inet_sizes[] = {80, 255, 256, 1024, 4096, 9000}; - sizes_count = sizeof(inet_sizes) / sizeof(int); - sizes = malloc(sizeof(inet_sizes)); - memcpy(sizes, inet_sizes, sizeof(inet_sizes)); - - } else if (!strcmp(test_name, "udp6")) { - ss = socket(PF_INET6, SOCK_DGRAM, 0); - ATF_CHECK(ss >= 0); - rc = setsockopt(ss, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)); - ATF_CHECK_EQ(0, rc); - bzero(&sin6, sizeof(sin6)); - sin6.sin6_family = AF_INET6; - sin6.sin6_len = sizeof(sin6); - sin6.sin6_port = htons(6666); - const struct in6_addr in6loopback = IN6ADDR_LOOPBACK_INIT; - sin6.sin6_addr = in6loopback; - sa = (struct sockaddr *)&sin6; - rc = bind(ss, sa, sa->sa_len); - ATF_CHECK_EQ(0, rc); - - cs = socket(PF_INET6, SOCK_DGRAM, 0); - ATF_CHECK(cs >= 0); - int inet_sizes[] = {80, 255, 256, 1024, 4096, 9000}; - sizes_count = sizeof(inet_sizes) / sizeof(int); - sizes = malloc(sizeof(inet_sizes)); - memcpy(sizes, inet_sizes, sizeof(inet_sizes)); - - } else if (!strcmp(test_name, "unix")) { - const char *PATH = "/tmp/test_check_recvmsg_socket"; - ss = socket(PF_UNIX, SOCK_DGRAM, 0); - ATF_CHECK(ss >= 0); - rc = setsockopt(ss, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)); - ATF_CHECK_EQ(0, rc); - bzero(&saun, sizeof(saun)); - saun.sun_family = AF_UNIX; - strcpy(saun.sun_path, PATH); - saun.sun_len = sizeof(saun); - sa = (struct sockaddr *)&saun; - unlink(PATH); - rc = bind(ss, sa, sa->sa_len); - ATF_CHECK_EQ(0, rc); - - cs = socket(PF_UNIX, SOCK_DGRAM, 0); - ATF_CHECK(cs >= 0); - int unix_sizes[] = {80, 255, 256, 1024, 2000}; - sizes_count = sizeof(unix_sizes) / sizeof(int); - sizes = malloc(sizeof(unix_sizes)); - memcpy(sizes, unix_sizes, sizeof(unix_sizes)); - } else - return; - char buf[4096]; + memset(buf, 0xFF, sizeof(buf)); - for (int i = 0; i < sizes_count; i++) { - int sz = sizes[i]; + for (size_t i = 0; i < nsizes; i++) { + ssize_t rc; + size_t sz = sizes[i]; char tbuf[1]; + rc = sendto(cs, buf, sz, 0, sa, sa->sa_len); - ATF_REQUIRE_EQ(rc, sz); + ATF_REQUIRE_MSG(rc != -1, "sendto failed: %s", strerror(errno)); + ATF_REQUIRE((size_t)rc == sz); rc = recv(ss, NULL, 0, MSG_PEEK | MSG_TRUNC); - ATF_CHECK_EQ(rc, sz); + ATF_REQUIRE_MSG(rc >= 0, "recv failed: %s", strerror(errno)); + ATF_REQUIRE((size_t)rc == sz); rc = recv(ss, tbuf, sizeof(tbuf), MSG_PEEK | MSG_TRUNC); - ATF_CHECK_EQ(rc, sz); + ATF_REQUIRE_MSG(rc >= 0, "recv failed: %s", strerror(errno)); + ATF_REQUIRE((size_t)rc == sz); rc = recv(ss, tbuf, sizeof(tbuf), MSG_TRUNC); - ATF_CHECK_EQ(rc, sz); + ATF_REQUIRE_MSG(rc >= 0, "recv failed: %s", strerror(errno)); + ATF_REQUIRE((size_t)rc == sz); } - close(ss); - close(cs); + ATF_REQUIRE(close(cs) == 0); + ATF_REQUIRE(close(ss) == 0); } -ATF_TC_WITHOUT_HEAD(socket_afinet_udp_recv_trunc); -ATF_TC_BODY(socket_afinet_udp_recv_trunc, tc) +ATF_TC_WITHOUT_HEAD(recv_trunc_afinet_udp); +ATF_TC_BODY(recv_trunc_afinet_udp, tc) { - check_recvmsg("udp"); + struct sockaddr_in sin; + struct sockaddr *sa; + int ss, cs, rc; + + ss = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(ss >= 0); + + memset(&sin, 0, sizeof(sin)); + sin.sin_family = AF_INET; + sin.sin_len = sizeof(sin); + sin.sin_port = htons(6666); + sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + sa = (struct sockaddr *)&sin; + rc = bind(ss, sa, sa->sa_len); + ATF_REQUIRE_MSG(rc == 0, "bind failed: %s", strerror(errno)); + + cs = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(cs >= 0); + + size_t sizes[] = {80, 255, 256, 1024, 4096, 9000}; + check_recvmsg(cs, ss, sa, sizes, nitems(sizes)); } -ATF_TC_WITHOUT_HEAD(socket_afinet6_udp_recv_trunc); -ATF_TC_BODY(socket_afinet6_udp_recv_trunc, tc) +ATF_TC_WITHOUT_HEAD(recv_trunc_afinet6_udp); +ATF_TC_BODY(recv_trunc_afinet6_udp, tc) { - check_recvmsg("udp6"); + struct sockaddr_in6 sin6; + struct sockaddr *sa; + int cs, ss, rc; + + ss = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(ss >= 0); + + memset(&sin6, 0, sizeof(sin6)); + sin6.sin6_family = AF_INET6; + sin6.sin6_len = sizeof(sin6); + sin6.sin6_port = htons(6666); + const struct in6_addr in6loopback = IN6ADDR_LOOPBACK_INIT; + sin6.sin6_addr = in6loopback; + sa = (struct sockaddr *)&sin6; + rc = bind(ss, sa, sa->sa_len); + ATF_REQUIRE_MSG(rc == 0, "bind failed: %s", strerror(errno)); + + cs = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(cs >= 0); + + size_t sizes[] = {80, 255, 256, 1024, 4096, 9000}; + check_recvmsg(cs, ss, sa, sizes, nitems(sizes)); } -ATF_TC_WITHOUT_HEAD(socket_afunix_recv_trunc); -ATF_TC_BODY(socket_afunix_recv_trunc, tc) +ATF_TC_WITHOUT_HEAD(recv_trunc_afunix_dgram); +ATF_TC_BODY(recv_trunc_afunix_dgram, tc) { - check_recvmsg("unix"); + struct sockaddr_un sun; + struct sockaddr *sa; + int ss, cs, rc; + + ss = socket(PF_UNIX, SOCK_DGRAM, 0); + ATF_REQUIRE(ss >= 0); + + bzero(&sun, sizeof(sun)); + sun.sun_family = AF_UNIX; + strlcpy(sun.sun_path, "test_check_recvmsg_socket", sizeof(sun.sun_path)); + sun.sun_len = sizeof(sun); + sa = (struct sockaddr *)&sun; + rc = bind(ss, sa, sa->sa_len); + ATF_REQUIRE_MSG(rc == 0, "bind failed: %s", strerror(errno)); + + cs = socket(PF_UNIX, SOCK_DGRAM, 0); + ATF_REQUIRE(cs >= 0); + + size_t sizes[] = {80, 255, 256, 1024, 2000}; + check_recvmsg(cs, ss, sa, sizes, nitems(sizes)); } +ATF_TC_WITHOUT_HEAD(recv_trunc_afunix_seqpacket); +ATF_TC_BODY(recv_trunc_afunix_seqpacket, tc) +{ + struct sockaddr_un sun; + struct sockaddr *sa; + int ss, nss, cs, rc; + + ss = socket(PF_UNIX, SOCK_SEQPACKET, 0); + ATF_REQUIRE(ss >= 0); + + bzero(&sun, sizeof(sun)); + sun.sun_family = AF_UNIX; + strlcpy(sun.sun_path, "test_check_recvmsg_socket", sizeof(sun.sun_path)); + sun.sun_len = sizeof(sun); + sa = (struct sockaddr *)&sun; + rc = bind(ss, sa, sa->sa_len); + ATF_REQUIRE_MSG(rc == 0, "bind failed: %s", strerror(errno)); + rc = listen(ss, 1); + ATF_REQUIRE_MSG(rc == 0, "listen failed: %s", strerror(errno)); + + cs = socket(PF_UNIX, SOCK_SEQPACKET, 0); + ATF_REQUIRE(cs >= 0); + rc = connect(cs, sa, sa->sa_len); + ATF_REQUIRE_MSG(rc == 0, "connect failed: %s", strerror(errno)); + nss = accept(ss, NULL, NULL); + ATF_REQUIRE(nss >= 0); + + size_t sizes[] = {80, 255, 256, 1024, 2000}; + check_recvmsg(cs, nss, sa, sizes, nitems(sizes)); + + ATF_REQUIRE(close(ss) == 0); +} ATF_TP_ADD_TCS(tp) { + ATF_TP_ADD_TC(tp, recv_trunc_afinet_udp); + ATF_TP_ADD_TC(tp, recv_trunc_afinet6_udp); + ATF_TP_ADD_TC(tp, recv_trunc_afunix_dgram); + ATF_TP_ADD_TC(tp, recv_trunc_afunix_seqpacket); - ATF_TP_ADD_TC(tp, socket_afinet_udp_recv_trunc); - ATF_TP_ADD_TC(tp, socket_afinet6_udp_recv_trunc); - ATF_TP_ADD_TC(tp, socket_afunix_recv_trunc); - - return atf_no_error(); + return (atf_no_error()); } From nobody Tue Oct 24 13:38:06 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFCmt5YDtz4y3gj; Tue, 24 Oct 2023 13:38: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 4SFCmt4p5Dz4Y3N; Tue, 24 Oct 2023 13:38:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bvSGlDmFN/EN0G2jjOxZQTF7I65W9KPvTd739g6V4VM=; b=Ye7jfo172lwZr+iIHcmZuBuRkfHupFiSTnNnTAkgRBBOCbifNprGdZ0PIt8I/+DMxsQKi3 dI+0Cz17UcK1LqJuuO23PEEmgxkkBb6lNBYyeRWW6pUQsCNoYPvA5q45QKaVZqgtLoVEmN 8BbnsgjDjv0zJPX2NiIKFJq5ICKo5MUTglIQ6NZpAMaCfW+WafP2umWG258wcSCdFfq8eo c6/YN3oikVyzXRl4gXJNFyeeIXBYJT5NxlmqtT/CC92FruLMjKO98B0U5eoNC6eUKdAF48 5VsXsi+lWLh0W81ojN5gOVufHmGdDbOV3kjshkwBtgHskz5oAvG59c57iAhJpg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154686; a=rsa-sha256; cv=none; b=fu9k6eo1wowZDHyS1e+GXdi8z2Fm9TpPJw+iAxG98PXEDzBhLsttt7t6gHpu0jZgFTur7Z 3k6iMoTELq9JTcdhqON5NqD4AXhCYhlm+POwV81euz5fiAnb8CNQiw1eh/rkJUqfwzMPOx K1liTLEOd6JboLpjbgumqH7BCeEbV9bdqprDIsZMkbcIl24xS9TbgDy6KH1KHgx8Snh2oU O6DL1aWI1nNpD3yusuWFMDWTn7Dae1O8Ar8LV65IQmRCg5MMMJwyynKtZeTMPIheljPkKs 5gJUFfFItmOpVk9mHG3I8jan5ibW7tFvvhp0p52YQTs5Gqlxv78BXI7rXcEhhw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bvSGlDmFN/EN0G2jjOxZQTF7I65W9KPvTd739g6V4VM=; b=jHKeFQHHLtwfXglpego8EZiRJxks0q1DdQ9D3wpU6RVpr8KiSmkO58iQH8Dn3O+VtCPj+V 7FqWNzI8MYnRhlOn2MhOmBkbpFfkJdHO2hArdjT2lx9p6tkWZFF+8FF8nQw0Yi82xe1wbr C89y0xmICDhOcRTOItV+fjycYXQUxHfdBE3kNN1omunPOmwZVb0phX/WfmOk6xRj9lezhm 3qfj9H8wY38tvK2OvWOnV4hkcGqhPRIEd3Q1glA2V9a6/0bRcoHfFnlhC90ZbObvBGij0s qrodGNDQ5f9FUHTe42c1n59Y6DZ3+rcjI7X6t2K5Xbt/i2dlXh92dahSY7CDeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFCmt3vxFz9Sr; Tue, 24 Oct 2023 13:38:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODc6nl088743; Tue, 24 Oct 2023 13:38:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODc60X088740; Tue, 24 Oct 2023 13:38:06 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:06 GMT Message-Id: <202310241338.39ODc60X088740@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: f5a9a849e903 - stable/13 - socket tests: Add a regression test for ktrace+recv(MSG_TRUNC) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: f5a9a849e9034c597c2b0a9014673a44834b9516 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f5a9a849e9034c597c2b0a9014673a44834b9516 commit f5a9a849e9034c597c2b0a9014673a44834b9516 Author: Mark Johnston AuthorDate: 2023-10-16 22:23:36 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:18:43 +0000 socket tests: Add a regression test for ktrace+recv(MSG_TRUNC) MFC after: 1 week (cherry picked from commit d8735eb7acc0613fd19f74a49d3bdcb7ed0e9b0e) --- tests/sys/kern/socket_msg_trunc.c | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/tests/sys/kern/socket_msg_trunc.c b/tests/sys/kern/socket_msg_trunc.c index 469b9e1503cd..279170158643 100644 --- a/tests/sys/kern/socket_msg_trunc.c +++ b/tests/sys/kern/socket_msg_trunc.c @@ -27,11 +27,13 @@ #include #include +#include #include #include #include +#include #include #include #include @@ -182,12 +184,67 @@ ATF_TC_BODY(recv_trunc_afunix_seqpacket, tc) ATF_REQUIRE(close(ss) == 0); } +/* + * Exercise the case where ktrace was used to dump a truncated buffer. + */ +ATF_TC_WITHOUT_HEAD(recvmsg_trunc_ktrace_uio); +ATF_TC_BODY(recvmsg_trunc_ktrace_uio, tc) +{ + struct ktr_header ktr; + struct msghdr msg; + struct iovec iov; + const char *tracepath; + char buf[128]; + ssize_t nbytes; + int error, fd, sd[2]; + + tracepath = "ktrace"; + + error = socketpair(AF_UNIX, SOCK_DGRAM, 0, sd); + ATF_REQUIRE(error == 0); + + memset(buf, 0, sizeof(buf)); + nbytes = send(sd[0], buf, sizeof(buf), 0); + ATF_REQUIRE_MSG(nbytes >= 0, "send failed: %s", strerror(errno)); + ATF_REQUIRE((size_t)nbytes == sizeof(buf)); + + fd = open(tracepath, O_RDWR | O_CREAT | O_TRUNC, 0644); + ATF_REQUIRE_MSG(fd >= 0, "open failed: %s", strerror(errno)); + error = ktrace(tracepath, KTROP_SET, KTRFAC_GENIO, getpid()); + ATF_REQUIRE_MSG(error == 0, + "ktrace(SET) failed: %s", strerror(errno)); + + iov.iov_base = buf; + iov.iov_len = sizeof(buf) - 1; /* truncate */ + memset(&msg, 0, sizeof(msg)); + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + nbytes = recvmsg(sd[1], &msg, MSG_TRUNC); + ATF_REQUIRE_MSG(nbytes >= 0, "recvmsg failed: %s", strerror(errno)); + ATF_REQUIRE((size_t)nbytes == sizeof(buf)); + ATF_REQUIRE((msg.msg_flags & MSG_TRUNC) != 0); + + error = ktrace(tracepath, KTROP_CLEARFILE, 0, getpid()); + ATF_REQUIRE_MSG(error == 0, + "ktrace(CLEARFILE) failed: %s", strerror(errno)); + + nbytes = read(fd, &ktr, sizeof(ktr)); + ATF_REQUIRE_MSG(nbytes >= 0, "read failed: %s", strerror(errno)); + ATF_REQUIRE((size_t)nbytes == sizeof(ktr)); + ATF_REQUIRE_MSG((ktr.ktr_type & ~KTR_TYPE) == KTR_GENIO); + + ATF_REQUIRE(close(fd) == 0); + ATF_REQUIRE(close(sd[0]) == 0); + ATF_REQUIRE(close(sd[1]) == 0); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, recv_trunc_afinet_udp); ATF_TP_ADD_TC(tp, recv_trunc_afinet6_udp); ATF_TP_ADD_TC(tp, recv_trunc_afunix_dgram); ATF_TP_ADD_TC(tp, recv_trunc_afunix_seqpacket); + ATF_TP_ADD_TC(tp, recvmsg_trunc_ktrace_uio); return (atf_no_error()); } From nobody Tue Oct 24 13:38:07 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFCmw0nHwz4y3ZF; Tue, 24 Oct 2023 13:38: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 4SFCmv5nbMz4Ydr; Tue, 24 Oct 2023 13:38:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rAsW3Al+IMz4qrPsvfZORCcbuY7wA4++pn1hZ9gV7CY=; b=bdkhxMn+MM/yODLBos+GJFz5uI4TZaBUVCb3jxrjFPgEq5hqK2n3o77P7j4mvNJlqYrr30 nv5GYdVzIiY8y5b7Y5MvNbVGzd3WdqPH1bdmKVDCHsEN7AuUV8Pt/B1fJjGSh3GrEaxb6h ZpIUzRYlYIQj4qL6hrd4t9cUb+KSvnnv67W3Ksbf96G6TWNt5Ew9/DvZp4RG0T0FdllWhx EfISC72kKagpgf1bBBF5eRUko2kEUrdSrjtxGqds9PpQt0/iZ8AKXIX6H4l/Igp8U1mZV4 e1AyXFbJkedc2ehXpDu26/cbPLXygvVyVHisAN3QBPLlejCDYAk+zx+Wtx4yjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154687; a=rsa-sha256; cv=none; b=cegp/4RjLaRkHotaIfBtr6HqdZDVb9FhR/bf/l03JUphOIGqC7OJUlXwP0VaD03egGZnMk GmqqC24+Mvzswa6iiVXGu1ki7UQyQzxgwOuq0Iu/Ey6gO16HUPW2tpa3weNBa6LyiuhQeB ahgTTPI9F1NofC5nODY1qFqiFqQ0Lxsx3+yBt1XlZFvbhRhO5CDAdnLN0wnD7ubJrA4oHH a73F1EHJFy4bYf22HIpDmevc2qYNrBYwk+cv7VGFYv9CkRS7aPZu7DMNqyBmUy3G1eGaER DI3F4hpcs6hIl68EWMwXZtmgDosdIdZ6JAIcXoEgFrXuEKSiQutGFLAMGfbcdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rAsW3Al+IMz4qrPsvfZORCcbuY7wA4++pn1hZ9gV7CY=; b=selYYN1mMeFBx+JtcSYZbCafFHd2uUgNIuEurnWAd6fWqlWlVkGT+lnDYi8iA/z+tHihG/ H6o6x55K1NHM/vz4bM1CzQQFPFAE4VDBZAWi8m8v/5VDve3ak6o3U0Plxzt3igfWvQjfY6 fONf4MzB03gKHwR78Cwz9V4a3WKW7XPYk6cj+3hglu1xqnwcgV+qn7tBMW9QOHwn85QUPR Fy5Ru3+aSGihUkmUj/LOSLltumQ77LAoS7+n0NHtKHOVd+htfxiZHfXeKWrlGjoInqy758 7drrTT8hvWyc8SkvAKiJ14NY5l7txOXL0VGjYQIelkBUCFfPqrfuAlqgY2ak9Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFCmv4tlPz99Q; Tue, 24 Oct 2023 13:38:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODc7r1088782; Tue, 24 Oct 2023 13:38:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODc7no088779; Tue, 24 Oct 2023 13:38:07 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:07 GMT Message-Id: <202310241338.39ODc7no088779@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: eb8923452e1e - stable/13 - uiomove: Add some assertions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: eb8923452e1e4071d06c28322e19f544844378ba Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=eb8923452e1e4071d06c28322e19f544844378ba commit eb8923452e1e4071d06c28322e19f544844378ba Author: Mark Johnston AuthorDate: 2023-10-16 20:12:37 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:18:54 +0000 uiomove: Add some assertions Make sure that we don't try to copy with a negative resid. Make sure that we don't walk off the end of the iovec array. Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42098 (cherry picked from commit 8fd0ec53deaad34383d4b344714b74d67105b258) --- sys/amd64/amd64/uio_machdep.c | 6 ++++++ sys/arm/arm/uio_machdep.c | 6 ++++++ sys/arm64/arm64/uio_machdep.c | 6 ++++++ sys/i386/i386/uio_machdep.c | 6 ++++++ sys/kern/subr_uio.c | 5 +++++ sys/powerpc/powerpc/uio_machdep.c | 5 +++++ sys/riscv/riscv/uio_machdep.c | 6 ++++++ 7 files changed, 40 insertions(+) diff --git a/sys/amd64/amd64/uio_machdep.c b/sys/amd64/amd64/uio_machdep.c index 890d1078c4f6..59e0998482ab 100644 --- a/sys/amd64/amd64/uio_machdep.c +++ b/sys/amd64/amd64/uio_machdep.c @@ -71,10 +71,16 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys: mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, ("uiomove_fromphys proc")); + KASSERT(uio->uio_resid >= 0, + ("%s: uio %p resid underflow", __func__, uio)); + save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; mapped = FALSE; while (n > 0 && uio->uio_resid) { + KASSERT(uio->uio_iovcnt > 0, + ("%s: uio %p iovcnt underflow", __func__, uio)); + iov = uio->uio_iov; cnt = iov->iov_len; if (cnt == 0) { diff --git a/sys/arm/arm/uio_machdep.c b/sys/arm/arm/uio_machdep.c index 07531f76217b..18661ebd1652 100644 --- a/sys/arm/arm/uio_machdep.c +++ b/sys/arm/arm/uio_machdep.c @@ -72,9 +72,15 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys: mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, ("uiomove_fromphys proc")); + KASSERT(uio->uio_resid >= 0, + ("%s: uio %p resid underflow", __func__, uio)); + save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; while (n > 0 && uio->uio_resid) { + KASSERT(uio->uio_iovcnt > 0, + ("%s: uio %p iovcnt underflow", __func__, uio)); + iov = uio->uio_iov; cnt = iov->iov_len; if (cnt == 0) { diff --git a/sys/arm64/arm64/uio_machdep.c b/sys/arm64/arm64/uio_machdep.c index d5c3bad6c908..b45b2ba80d2c 100644 --- a/sys/arm64/arm64/uio_machdep.c +++ b/sys/arm64/arm64/uio_machdep.c @@ -69,10 +69,16 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys: mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, ("uiomove_fromphys proc")); + KASSERT(uio->uio_resid >= 0, + ("%s: uio %p resid underflow", __func__, uio)); + save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; mapped = FALSE; while (n > 0 && uio->uio_resid) { + KASSERT(uio->uio_iovcnt > 0, + ("%s: uio %p iovcnt underflow", __func__, uio)); + iov = uio->uio_iov; cnt = iov->iov_len; if (cnt == 0) { diff --git a/sys/i386/i386/uio_machdep.c b/sys/i386/i386/uio_machdep.c index 07d71eac5db6..92e067b35bed 100644 --- a/sys/i386/i386/uio_machdep.c +++ b/sys/i386/i386/uio_machdep.c @@ -71,9 +71,15 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys: mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, ("uiomove_fromphys proc")); + KASSERT(uio->uio_resid >= 0, + ("%s: uio %p resid underflow", __func__, uio)); + save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; while (n > 0 && uio->uio_resid) { + KASSERT(uio->uio_iovcnt > 0, + ("%s: uio %p iovcnt underflow", __func__, uio)); + iov = uio->uio_iov; cnt = iov->iov_len; if (cnt == 0) { diff --git a/sys/kern/subr_uio.c b/sys/kern/subr_uio.c index 21a1f044db54..b0c4a256cd17 100644 --- a/sys/kern/subr_uio.c +++ b/sys/kern/subr_uio.c @@ -216,6 +216,8 @@ uiomove_faultflag(void *cp, int n, struct uio *uio, int nofault) ("uiomove: mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, ("uiomove proc")); + KASSERT(uio->uio_resid >= 0, + ("%s: uio %p resid underflow", __func__, uio)); if (uio->uio_segflg == UIO_USERSPACE) { newflags = TDP_DEADLKTREAT; @@ -234,6 +236,9 @@ uiomove_faultflag(void *cp, int n, struct uio *uio, int nofault) } while (n > 0 && uio->uio_resid) { + KASSERT(uio->uio_iovcnt > 0, + ("%s: uio %p iovcnt underflow", __func__, uio)); + iov = uio->uio_iov; cnt = iov->iov_len; if (cnt == 0) { diff --git a/sys/powerpc/powerpc/uio_machdep.c b/sys/powerpc/powerpc/uio_machdep.c index 679139a96e99..5de2dd8b416b 100644 --- a/sys/powerpc/powerpc/uio_machdep.c +++ b/sys/powerpc/powerpc/uio_machdep.c @@ -75,10 +75,15 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys: mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, ("uiomove_fromphys proc")); + KASSERT(uio->uio_resid >= 0, + ("%s: uio %p resid underflow", __func__, uio)); save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; while (n > 0 && uio->uio_resid) { + KASSERT(uio->uio_iovcnt > 0, + ("%s: uio %p iovcnt underflow", __func__, uio)); + iov = uio->uio_iov; cnt = iov->iov_len; if (cnt == 0) { diff --git a/sys/riscv/riscv/uio_machdep.c b/sys/riscv/riscv/uio_machdep.c index d0f3e45ee1f4..ace1f368b594 100644 --- a/sys/riscv/riscv/uio_machdep.c +++ b/sys/riscv/riscv/uio_machdep.c @@ -69,10 +69,16 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys: mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, ("uiomove_fromphys proc")); + KASSERT(uio->uio_resid >= 0, + ("%s: uio %p resid underflow", __func__, uio)); + save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; mapped = FALSE; while (n > 0 && uio->uio_resid) { + KASSERT(uio->uio_iovcnt > 0, + ("%s: uio %p iovcnt underflow", __func__, uio)); + iov = uio->uio_iov; cnt = iov->iov_len; if (cnt == 0) { From nobody Tue Oct 24 13:38:08 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFCmx10gpz4y3pN; Tue, 24 Oct 2023 13:38: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 4SFCmw6nm1z4YR4; Tue, 24 Oct 2023 13:38:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OhM2V0UFS4ScUorVfBA9TMuWGMYPeixlcR82V9AMCQY=; b=P1TqumV8zKdyNgHJoRfUi1HnYaVOOrcnqHbgIIfx+ZCvw3WqZqKgwpfVWNVje98PC6ZUjR gOo+WknBrdjCBknUcspVmU80ixBlYBzrdg+/ex9x3R2Sun4JcOGLIKK2wT8GSMCH3thAwp vvxkYE3L7FqWA0qSeYW3qpjdnWS2121s94EEWdodmdThXYmKq62gkEACTE7GeljMhe85u8 ss3vXMjz7MVjff6oTdRLQ7yDRqJdYJkouWFxehpSYx+go0dxqV0gHCj9xXEpSy5lRCSWPG lU+JOoJwJ6bcFNBXPvNJyCRULfaeiL9xI6zYZO5rxEB5qUQIF9tjs6NZWM2blg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154689; a=rsa-sha256; cv=none; b=NHzWiwk5zueEz2IEXQNXFBbHf/A7L+mxwPzLD76l97/xc46f/3ymFHxYTGFsug0IZXaHKF TkFGNg8/lK0saKt4+Lj4Whij95cyYDSxkHjIzVlUJeF0wBgvCB8U3T+m9zKw9N2tPolpAo +fvywoy0Jvpucb8h1mRDRryr9EPfmbB+m3HJquOn4QnpBVhIhw3PBMy17JYo1d6dIyZ136 m4jg+wkvRXeJDYK/HrchCbWRkUFkvkWwCCcHXtMnVld3LjvOyDCL3cjmlDIAdVhWA6YRoA +8hhiAxMtuEEJt9L3DkqGpTdIMk1cd6r7KZBGmawbUZlGpWtEy3SX0SQCHGQoQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154689; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OhM2V0UFS4ScUorVfBA9TMuWGMYPeixlcR82V9AMCQY=; b=O25nPCEuC0CnOetChE6TQD1tDKJC2FsILeuTAyVBKcXzTfgFu5RtAOuupHss3JaRVqkHmU LBKgo8O+c0Rn3jphsNb4CCZ/Vzu1JlyT/m9B0diI2r8ewisX/mVtGv6kzmcbCxBF5k1ZeL jkfjNm+pH8871qc6WgG30+N4fgftyGWb+1QsqS7T5ZDwCwYND54m7rLoD0hYN6CXc1zbrA rIt1hRBjJlKy8IIr4baxZ7dNRrKm3D9uOi5adWlLbRK8Fkg8iyFx9CJYUtFp0nCuCFVPVP YRlM6rXtwQNa6SZDGZ4elTScnbleNmM+VPPWRAIcTawF8WaElOc08hPq6WUueQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFCmw5vgHz9Ss; Tue, 24 Oct 2023 13:38:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODc8Jg088828; Tue, 24 Oct 2023 13:38:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODc8EV088825; Tue, 24 Oct 2023 13:38:08 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:08 GMT Message-Id: <202310241338.39ODc8EV088825@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: bc6372602a00 - stable/13 - bhyve: Use VMIO_SIOCSIFFLAGS instead of SIOCGIFFLAGS List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: bc6372602a0042e5496d9ab6637558f98af0deef Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bc6372602a0042e5496d9ab6637558f98af0deef commit bc6372602a0042e5496d9ab6637558f98af0deef Author: Jan Bramkamp AuthorDate: 2023-09-04 08:38:25 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:21:26 +0000 bhyve: Use VMIO_SIOCSIFFLAGS instead of SIOCGIFFLAGS Creating an IP socket to invoke the SIOCGIFFLAGS ioctl on is the only thing preventing bhyve from working inside a bhyve jail with IPv4 and IPv6 disabled restricting the jailed bhyve process to only access the host network via a tap/vmnet device node. PR: 273557 Fixes: 56be282bc999 ("bhyve: net_backends, automatically IFF_UP tap devices") Reviewed by: markj MFC after: 1 week (cherry picked from commit fd8b9c73a5a63a7aa438a73951d7a535b4f25d9a) --- usr.sbin/bhyve/net_backends.c | 52 ++++--------------------------------------- 1 file changed, 4 insertions(+), 48 deletions(-) diff --git a/usr.sbin/bhyve/net_backends.c b/usr.sbin/bhyve/net_backends.c index fa7cd9c81f46..99781cfdcbb6 100644 --- a/usr.sbin/bhyve/net_backends.c +++ b/usr.sbin/bhyve/net_backends.c @@ -42,9 +42,7 @@ #include #include -#if defined(INET6) || defined(INET) #include -#endif #include #include #define NETMAP_WITH_LIBS @@ -180,17 +178,6 @@ SET_DECLARE(net_backend_set, struct net_backend); * The tap backend */ -#if defined(INET6) || defined(INET) -static const int pf_list[] = { -#if defined(INET6) - PF_INET6, -#endif -#if defined(INET) - PF_INET, -#endif -}; -#endif - struct tap_priv { struct mevent *mevp; /* @@ -222,11 +209,8 @@ tap_init(struct net_backend *be, const char *devname, { struct tap_priv *priv = NET_BE_PRIV(be); char tbuf[80]; - int opt = 1; -#if defined(INET6) || defined(INET) - struct ifreq ifrq; - int s; -#endif + int opt = 1, up = IFF_UP; + #ifndef WITHOUT_CAPSICUM cap_rights_t rights; #endif @@ -254,39 +238,11 @@ tap_init(struct net_backend *be, const char *devname, goto error; } -#if defined(INET6) || defined(INET) - /* - * Try to UP the interface rather than relying on - * net.link.tap.up_on_open. - */ - bzero(&ifrq, sizeof(ifrq)); - if (ioctl(be->fd, TAPGIFNAME, &ifrq) < 0) { - WPRINTF(("Could not get interface name")); - goto error; - } - - s = -1; - for (size_t i = 0; s == -1 && i < nitems(pf_list); i++) - s = socket(pf_list[i], SOCK_DGRAM, 0); - if (s == -1) { - WPRINTF(("Could open socket")); + if (ioctl(be->fd, VMIO_SIOCSIFFLAGS, &up)) { + WPRINTF(("tap device link up failed")); goto error; } - if (ioctl(s, SIOCGIFFLAGS, &ifrq) < 0) { - (void)close(s); - WPRINTF(("Could not get interface flags")); - goto error; - } - ifrq.ifr_flags |= IFF_UP; - if (ioctl(s, SIOCSIFFLAGS, &ifrq) < 0) { - (void)close(s); - WPRINTF(("Could not set interface flags")); - goto error; - } - (void)close(s); -#endif - #ifndef WITHOUT_CAPSICUM cap_rights_init(&rights, CAP_EVENT, CAP_READ, CAP_WRITE); if (caph_rights_limit(be->fd, &rights) == -1) From nobody Tue Oct 24 13:38:18 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFCn719Vtz4y3rh; Tue, 24 Oct 2023 13:38: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 4SFCn624Y3z4Z3w; Tue, 24 Oct 2023 13:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ahNXjxPJSD7vmTRLJX5AFCeete2Ruei+7rR+cX6kbM=; b=JhFB/inKq51q68k3A5VeWDr6O2tV3canNxwL00mA3qjry5AEGFZf0gla9tj8QpHFTS2nNa VVNWjASRvwivLOfQ4DzxgUjMeTLw5XCKJW/9pUewP7WxEDy7IFcj5cO6zcvo1DnlmVILjF ROONIKY0Z7nJVqFE5Jd54Vaf69+QwWVf1F39POuq+jOvhSUy18XVdplMHEyXDgP2H8vtt9 5sNwqaFFTaBAt6Xb0f7voYyOB2Dp9/IydeOJZ+L/vqFRoEp6DSl/wMLGD6PTLwowPi7j96 xUMbsf3RrTpB5fuqjDcSlgMEyvboSM0ns7nn57g7DTWOLKPvTX9Evsuedue50A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154698; a=rsa-sha256; cv=none; b=VWUv19oLKDFZi86QM3G0qWkvlInXo+z4uGpnarTv3e9wGHVtTm8N3MiBegNLppTAyRvDmq sJoG2wI8pcqAbDIcrRCuGtXNz3FqF/1NDBaZm5Nc83XeonviWU4iZiFXJMnG7Dz7xMz7TX e06VFIGAs5TuxE2N76Ay0LQlvIG6LAOIMRyqlfgfue3Fx/zDkHY9sT8GF0PZvfQGGt2e2p K2pcU+2Y0W1lzfXAQcshvHEvuKfvUWD7PJuP26n/MRrjsJIgCAnocLM+n0+vA52KySZknO U0JY8rZ6BXHAw43iZeQCcNNBE9E4xjW+xqwBnJWdigTwp6+uiMDeWdeFELvY+g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ahNXjxPJSD7vmTRLJX5AFCeete2Ruei+7rR+cX6kbM=; b=h5V8iGC2vAU985Xik2zL+JdBhgWiWIZUOmrS+hZTBwt3BKUlZa2/oh+trMrUYEPN1j4+cW 8Y1kV6yHCQKfkE99Q0736Mvglx7PPQs9xoNIQ8FpChKDO2DiJ4oh9VBRuVo/+US6wZPO3s RAvWWdb050Qux2gMqy8BE8aLPCg1rIf1oG8+mvdnR9Rklg/QSoxkC7JikN9DtWc4LOYOOo Rv1VH6845qHJaxwvdTD6M6JL7c2kXYtga/u73xeRBdiBqwwthImoqaSBRbgYWLMIjL5r54 urJrHkbD7PbOV0xbhbjV80BCMJl0pb8cuMHDkot6i3sVofNJDo1qZsakJ4lTzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFCn613P1z9d2; Tue, 24 Oct 2023 13:38:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODcIjr089073; Tue, 24 Oct 2023 13:38:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODcI2Q089070; Tue, 24 Oct 2023 13:38:18 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:18 GMT Message-Id: <202310241338.39ODcI2Q089070@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: ab6bc4893e4d - stable/14 - arm64: Add a leaf PTP when pmap_enter(psind=1) creates a wired mapping List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: ab6bc4893e4d0d0932b023c48231c7bb63c0baf2 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ab6bc4893e4d0d0932b023c48231c7bb63c0baf2 commit ab6bc4893e4d0d0932b023c48231c7bb63c0baf2 Author: Bojan Novković AuthorDate: 2023-10-09 00:38:08 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:17:37 +0000 arm64: Add a leaf PTP when pmap_enter(psind=1) creates a wired mapping Let pmap_enter_l2() create wired mappings. In particular, allocate a leaf PTP for use during demotion. This is a step towards reverting commit 64087fd7f372. Reviewed by: alc, markj Sponsored by: Google, Inc. (GSoC 2023) MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D41634 (cherry picked from commit 808f5ac3c6dcbe38f505c0c843b0a10ae154e6ec) --- sys/arm64/arm64/pmap.c | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index a30a037c8d4a..6f2afa0b98a3 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -4797,6 +4797,7 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, struct spglist free; pd_entry_t *l2, old_l2; vm_page_t l2pg, mt; + vm_page_t uwptpg; PMAP_LOCK_ASSERT(pmap, MA_OWNED); KASSERT(ADDR_IS_CANONICAL(va), @@ -4864,6 +4865,24 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, } } + /* + * Allocate leaf ptpage for wired userspace pages. + */ + uwptpg = NULL; + if ((new_l2 & ATTR_SW_WIRED) != 0 && pmap != kernel_pmap) { + uwptpg = vm_page_alloc_noobj(VM_ALLOC_WIRED); + if (uwptpg == NULL) { + return (KERN_RESOURCE_SHORTAGE); + } + uwptpg->pindex = pmap_l2_pindex(va); + if (pmap_insert_pt_page(pmap, uwptpg, true, false)) { + vm_page_unwire_noq(uwptpg); + vm_page_free(uwptpg); + return (KERN_RESOURCE_SHORTAGE); + } + pmap_resident_count_inc(pmap, 1); + uwptpg->ref_count = NL3PG; + } if ((new_l2 & ATTR_SW_MANAGED) != 0) { /* * Abort this mapping if its PV entry could not be created. @@ -4871,6 +4890,16 @@ pmap_enter_l2(pmap_t pmap, vm_offset_t va, pd_entry_t new_l2, u_int flags, if (!pmap_pv_insert_l2(pmap, va, new_l2, flags, lockp)) { if (l2pg != NULL) pmap_abort_ptp(pmap, va, l2pg); + if (uwptpg != NULL) { + mt = pmap_remove_pt_page(pmap, va); + KASSERT(mt == uwptpg, + ("removed pt page %p, expected %p", mt, + uwptpg)); + pmap_resident_count_dec(pmap, 1); + uwptpg->ref_count = 1; + vm_page_unwire_noq(uwptpg); + vm_page_free(uwptpg); + } CTR2(KTR_PMAP, "pmap_enter_l2: failure for va %#lx in pmap %p", va, pmap); From nobody Tue Oct 24 13:38:19 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFCn84QS7z4y3hX; Tue, 24 Oct 2023 13:38: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 4SFCn734Mxz4Z8W; Tue, 24 Oct 2023 13:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DtmhFP/B46AKxGNzcEMwR3MJDaM7gfKlb5OGe+44o80=; b=WzKqMv1fLbBlh3jrwZdEszDZz718TH3YgihET1vSCcDXUUBdjEyJh26sInhdFQ0a1YeEP7 mC3Tr5U/l8GuPMm5srwrDJamclNGDVkp34vg84d+jbDthasknYtpr9InwR1q6F+jf60oEX HMPqM+JPP/PYaJBOJur+ZWEOqD3VRa6TqaC3aQbJjRKQaI0H/yJaYVQUbmehSTyVpV9LkK 704sxtVKq0G4YIbYRJzJOeVkZnZYeeu4mL1d9gxIJ+m/B8ghSfCqbfdIcd60uE/QIIbDC3 Hvo8YMfp2+1V66B11E5xb6BV+/5+RCFp3IkZkEK2oNivA0n+K7zFMNgAznNbFQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154699; a=rsa-sha256; cv=none; b=RHV+wYbq+7aUzWSZz9WirP3aJmu54zEa2utfuk83cm9cAxRZDgkQJAc7SRGHaYF4bIOm46 k4V5YW6btAfkmISWb43zv7RggUmvnm5XITrJQz8DS793AuaQ4WI6HNoYZRTllj5eY8FIlq MUqakDQ5snwba9tdOtYXi/xESjTSfDpuWXcavt/jx+lcK8eW5c5HR+rjTu86aGWRrgETKJ IQA8uTcdlCEGra0m6pfA2qoMtPQ/odR4c5GBDPYiirBowKz7WmclYJXmPE7jo2GYgPqs3f fnS9UbdqymCyzudX4rWIsTJK06dAzRnuaMR+6RVxnlzJL50KNWX0v+tT+Ia5+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154699; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DtmhFP/B46AKxGNzcEMwR3MJDaM7gfKlb5OGe+44o80=; b=N/zo1+7z4VnrdOHSPN7ssYyqagd1iMtR9nCliauzX161jX2SoQW0WxwpYxYejvuiGMqmAz xypahABGTOW0ZolZ6U+6/BzwnTViCtBF82jJ9LqEkl7Wu+B93uIbJ4NFFuBbnPjoYCaZPs KQBmFu5kA1WBwXK0ltjm+SgMl1Rmwr+78g6kNz2tu7S76v+Xpzyyesn3VC0gIZjrROTZEN DWLR2sISNxnbeda/Jv3Hak35+Q4FiDWdYLELA9g8D8iweTzCFiNQ7RZrq1SSpu2YFsJJR3 LFp9XLbwMVdU8zagbvT3AHpl79u4izSnv+bO0mkWjQraaPP2ANo6XaCjNPje2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFCn7232Yz9Sw; Tue, 24 Oct 2023 13:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODcJ8k089123; Tue, 24 Oct 2023 13:38:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODcJZo089120; Tue, 24 Oct 2023 13:38:19 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:19 GMT Message-Id: <202310241338.39ODcJZo089120@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: 688c44068ad9 - stable/14 - kmsan: Use __builtin_memset to initialize per-thread state List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: 688c44068ad977e0714ae30e0c52ebe172309d0c Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=688c44068ad977e0714ae30e0c52ebe172309d0c commit 688c44068ad977e0714ae30e0c52ebe172309d0c Author: Mark Johnston AuthorDate: 2023-10-16 19:37:19 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:17:44 +0000 kmsan: Use __builtin_memset to initialize per-thread state Accesses to KMSAN's TLS block are not instrumented, so there's no need to use kmsan_memset(). No functional change intended. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. (cherry picked from commit e5caed14067b40f1454d74e99789a28508d0eea3) --- sys/kern/subr_msan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/subr_msan.c b/sys/kern/subr_msan.c index 54948370a14a..f8fdcf478b79 100644 --- a/sys/kern/subr_msan.c +++ b/sys/kern/subr_msan.c @@ -452,7 +452,7 @@ kmsan_thread_alloc(struct thread *td) sizeof(int)); mtd = malloc(sizeof(*mtd), M_KMSAN, M_WAITOK); } - kmsan_memset(mtd, 0, sizeof(*mtd)); + __builtin_memset(mtd, 0, sizeof(*mtd)); mtd->ctx = 0; if (td->td_kstack != 0) From nobody Tue Oct 24 13:38:20 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFCnB364Rz4y3rn; Tue, 24 Oct 2023 13:38: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 4SFCn83y7kz4Z1N; Tue, 24 Oct 2023 13:38:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jfocy6EJJoSAWja2a5VlwkXc6dv/MZOKhCD3/8PvHX8=; b=ClP6XPkFsjMxN5ReyNBTlu2UwkgwY5dPzh0RcEPC3AhFkDTrLUQ1AzPvdUZIGyxwa2/nJp kSoJ3k7mcunAQ9poe3o3wQb5BN3iX7FrcGZyU7SCk9nFkt1NhgNjshfTLOQZj0HssHXmzE JbfFnYl2g8A0uh+hkmWv/PItrmVvAYaoq61MW6uu9g6bsBK5l3otO8W8dLiIM8TdsamXh7 cois1zpP6aZn5kqORxdsQyCfVd364ZGnu0ZsVvS2sP6Zazmxe5UacZwSLi0dq2SUi5wy0s 9SJ5JE424PMI3+pXRotVeS0nlsbROpLOKnXdvUi22B3Isu0T7WYI8fAfdTaDqA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154700; a=rsa-sha256; cv=none; b=ejoLhUPvzI0Xntc38JNtoZTYwjy2NKfYiSAYU6BS/WH94nz7hU19X3eKXbLhfqyGvFUoqp z8vziBIugb9TdPi7I0eVcxhMN72IhGTH9EuWqH5CCOMJapDpCvx2Gyceez4xauQAU2TrE8 lfN+yFP9f/SwRZLfqn90SbTuFUeK3zd+qQfRhWcqBi/nXUyBnjnDSfRp9b4yVOHhaz/RHO bbEIiQTjsN4NCl1AzT6dnwJL3/Zh5TCFxaUgEcZLw4E8IutCqCSnc4lefSAQxZPqKze+bz 6CL+xU29a/lbgVNG3cxBQNcttv2hJ3vJuvYOynIQ/wKgtsNtVgqOOpgx5gLMQA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154700; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Jfocy6EJJoSAWja2a5VlwkXc6dv/MZOKhCD3/8PvHX8=; b=tnEHVLSSldkn5Cb82pPHtTB3ADax5atAHURdN8b8eC+dTEPChgbB0i6UhykDO84uJnoUAV QhFGIl7P2HqZX0jDqyXLoYp9Pybr8XlBxDEDtwT9l4XZhVraEc0UAMffw3H1wzL+yPIt5E KvH/XIaWs2/QUxgNnCm2T1EVbcRKD/XogHlUBMxwK23YwqTGVnZgvCOIKL8gQ49AQN1QyU NA3QGwVVSJs5MKjrqSu9BxMvZ6IdMiDFDM1tw2X3Gs7DbfffiH0hcaDBO7pKxt1beL5ILl Qq0ovCiatwSqN0oJjAZ15o/dMg0xb5elnuWZMmNx65ZrumSSwwE5YhQIxTr7uA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFCn83451z97D; Tue, 24 Oct 2023 13:38:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODcKCr089171; Tue, 24 Oct 2023 13:38:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODcK2T089168; Tue, 24 Oct 2023 13:38:20 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:20 GMT Message-Id: <202310241338.39ODcK2T089168@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: 0da34087c41c - stable/14 - geom_linux_lvm: Avoid removing from vg_list before inserting List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: 0da34087c41cd3a64a5c07edfe373395bc29857f Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0da34087c41cd3a64a5c07edfe373395bc29857f commit 0da34087c41cd3a64a5c07edfe373395bc29857f Author: Mark Johnston AuthorDate: 2023-10-17 14:25:38 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:17:59 +0000 geom_linux_lvm: Avoid removing from vg_list before inserting PR: 266693 Reported by: Robert Morris MFC after: 1 week (cherry picked from commit 56279238b03a0ccef245b22fff7679fe35cffccc) --- sys/geom/linux_lvm/g_linux_lvm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/geom/linux_lvm/g_linux_lvm.c b/sys/geom/linux_lvm/g_linux_lvm.c index dddc3ae9184e..c63318fed729 100644 --- a/sys/geom/linux_lvm/g_linux_lvm.c +++ b/sys/geom/linux_lvm/g_linux_lvm.c @@ -512,7 +512,6 @@ g_llvm_free_vg(struct g_llvm_vg *vg) LIST_REMOVE(lv, lv_next); free(lv, M_GLLVM); } - LIST_REMOVE(vg, vg_next); free(vg, M_GLLVM); } @@ -596,7 +595,8 @@ g_llvm_destroy(struct g_llvm_vg *vg, int force) } } - g_llvm_free_vg(gp->softc); + LIST_REMOVE(vg, vg_next); + g_llvm_free_vg(vg); gp->softc = NULL; g_wither_geom(gp, ENXIO); return (0); From nobody Tue Oct 24 13:38:21 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFCnC1tJ9z4y3hg; Tue, 24 Oct 2023 13:38: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 4SFCn95k6Sz4ZCR; Tue, 24 Oct 2023 13:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qog1XoVLl/tZs7lEXl9bInJR2Ze17WAhY7soNupSQPQ=; b=fa9nJsEz0XAKWtsPtGCr0JNSWBu39NBzqMFuVOmSwUU8F5YrvKTbljbRqRV+BPjZtK27XG fAE5A/rpPddQOM2tLE4ZK+i+sJOt8YpdMS8JmMOetnJcdLsVWrbb9FXiI5dJv6NA26n8gK C5uNeaoY8xGdp6R0aHIIH69redt2AmsJkrWmFAhULfK+8N+5gexkIiHNKfyZcweTJuA5ji 7Ctp3uIHswETnMMXbfLVFN7TFzAuVHT7Fg/Q0IoTfmRaSz/hnj7tTq1IP4ejVgranUMQGt QISK7cUZUo7GsDPqDsr9JyZBIVTtUyPV8OXX2YRACONuGNJ5+i60JUqMBYHUSg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154701; a=rsa-sha256; cv=none; b=IYYT9k15BP+4OSLrulpqAcNk7q5YnsRjF3Rh5lyn3vY7lmw1v+fYJU9yVkVTDcxvkMKvKA nnFUzZLy7CsRg+M9KGEU3JtJRzf1YDZet7c4ZNfsdbfat4Iq6HlrNDo7pq2wGrfHFJrojc 39lyE1AZrRmf4eTuQY+c84W/9f5DUvC3g/zQQK0svUSUMlx5W60DLImf3Wg/cFqwnVIU0Z vkd2KwKQ+2roHRmzSgd41ICN21GRXDkduXPmcCoWvKTL4FaRIi61gbCbI9xQWhC8s6wI0j rX9VrVdzvj4gFeT+S0twpYJgUkISBkiZgavugCUHdAtIrxIe545yZGKQt/xYog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154701; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qog1XoVLl/tZs7lEXl9bInJR2Ze17WAhY7soNupSQPQ=; b=lsJEcwEMWIr6SWd2Q/tP2Rk0Sb2wr6WHlcrpzC1/zD2eSfwzhwm211Zs8OXZ3pL2rClCjL eMk+lzkvns9qJsdcD7hPci+Yd0L7mRXacrqslBSm4cks9b62UZuxMA9wfvQTVc43wZqghd tp7fuHgHzXnWTlYhw4PkizAR91Q4vOeWRwYf+BqkbtmP+wIQFZA3zDvCt7KLrw2xkBxlJE yjtQUKieZ0rR9Hyk1SQB1+46QQA0WCdw+vlJA71KplhOoY54PXvCZmnnomj2LryOgevwYp tZ/0v84d6tobKjthniaRjBGyAGDnLfplfyHgxETiNACFOUYmVBbu6UorDQpasA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFCn940xPz9Zc; Tue, 24 Oct 2023 13:38:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODcLGf089235; Tue, 24 Oct 2023 13:38:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODcLMx089232; Tue, 24 Oct 2023 13:38:21 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:21 GMT Message-Id: <202310241338.39ODcLMx089232@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: 6b107108b1c7 - stable/14 - socket tests: Clean up the MSG_TRUNC regression tests a bit List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: 6b107108b1c7b49568a93cbed479ff4b37ca3024 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6b107108b1c7b49568a93cbed479ff4b37ca3024 commit 6b107108b1c7b49568a93cbed479ff4b37ca3024 Author: Mark Johnston AuthorDate: 2023-10-16 21:35:07 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:18:23 +0000 socket tests: Clean up the MSG_TRUNC regression tests a bit - Fix style. - Move test case-specific code out of the shared function and into the individual test cases. - Remove unneeded setting of SO_REUSEPORT. - Avoid unnecessary copying. - Use ATF_REQUIRE* instead of ATF_CHECK*. The former cause test execution to stop after a failed assertion, which is what we want. - Add a test case for AF_LOCAL/SOCK_SEQPACKET sockets. MFC after: 1 week (cherry picked from commit b5e7dbac756afb49c58315c7081737b34a1d2dfd) --- tests/sys/kern/socket_msg_trunc.c | 230 +++++++++++++++++++++----------------- 1 file changed, 128 insertions(+), 102 deletions(-) diff --git a/tests/sys/kern/socket_msg_trunc.c b/tests/sys/kern/socket_msg_trunc.c index a863705adbae..469b9e1503cd 100644 --- a/tests/sys/kern/socket_msg_trunc.c +++ b/tests/sys/kern/socket_msg_trunc.c @@ -25,143 +25,169 @@ * SUCH DAMAGE. */ -#include -#include -#include +#include #include #include #include + #include + #include +#include +#include #include static void -check_recvmsg(const char *test_name) +check_recvmsg(int cs, int ss, struct sockaddr *sa, const size_t sizes[], + size_t nsizes) { - int ss, cs, rc; - struct sockaddr *sa; - struct sockaddr_in sin; - struct sockaddr_in6 sin6; - struct sockaddr_un saun; - int *sizes, sizes_count; - int one = 1; - - - if (!strcmp(test_name, "udp")) { - ss = socket(PF_INET, SOCK_DGRAM, 0); - ATF_CHECK(ss >= 0); - rc = setsockopt(ss, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)); - ATF_CHECK_EQ(0, rc); - bzero(&sin, sizeof(sin)); - sin.sin_family = AF_INET; - sin.sin_len = sizeof(sin); - sin.sin_port = htons(6666); - sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); - sa = (struct sockaddr *)&sin; - rc = bind(ss, sa, sa->sa_len); - ATF_CHECK_EQ(0, rc); - - cs = socket(PF_INET, SOCK_DGRAM, 0); - ATF_CHECK(cs >= 0); - int inet_sizes[] = {80, 255, 256, 1024, 4096, 9000}; - sizes_count = sizeof(inet_sizes) / sizeof(int); - sizes = malloc(sizeof(inet_sizes)); - memcpy(sizes, inet_sizes, sizeof(inet_sizes)); - - } else if (!strcmp(test_name, "udp6")) { - ss = socket(PF_INET6, SOCK_DGRAM, 0); - ATF_CHECK(ss >= 0); - rc = setsockopt(ss, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)); - ATF_CHECK_EQ(0, rc); - bzero(&sin6, sizeof(sin6)); - sin6.sin6_family = AF_INET6; - sin6.sin6_len = sizeof(sin6); - sin6.sin6_port = htons(6666); - const struct in6_addr in6loopback = IN6ADDR_LOOPBACK_INIT; - sin6.sin6_addr = in6loopback; - sa = (struct sockaddr *)&sin6; - rc = bind(ss, sa, sa->sa_len); - ATF_CHECK_EQ(0, rc); - - cs = socket(PF_INET6, SOCK_DGRAM, 0); - ATF_CHECK(cs >= 0); - int inet_sizes[] = {80, 255, 256, 1024, 4096, 9000}; - sizes_count = sizeof(inet_sizes) / sizeof(int); - sizes = malloc(sizeof(inet_sizes)); - memcpy(sizes, inet_sizes, sizeof(inet_sizes)); - - } else if (!strcmp(test_name, "unix")) { - const char *PATH = "/tmp/test_check_recvmsg_socket"; - ss = socket(PF_UNIX, SOCK_DGRAM, 0); - ATF_CHECK(ss >= 0); - rc = setsockopt(ss, SOL_SOCKET, SO_REUSEPORT, &one, sizeof(one)); - ATF_CHECK_EQ(0, rc); - bzero(&saun, sizeof(saun)); - saun.sun_family = AF_UNIX; - strcpy(saun.sun_path, PATH); - saun.sun_len = sizeof(saun); - sa = (struct sockaddr *)&saun; - unlink(PATH); - rc = bind(ss, sa, sa->sa_len); - ATF_CHECK_EQ(0, rc); - - cs = socket(PF_UNIX, SOCK_DGRAM, 0); - ATF_CHECK(cs >= 0); - int unix_sizes[] = {80, 255, 256, 1024, 2000}; - sizes_count = sizeof(unix_sizes) / sizeof(int); - sizes = malloc(sizeof(unix_sizes)); - memcpy(sizes, unix_sizes, sizeof(unix_sizes)); - } else - return; - char buf[4096]; + memset(buf, 0xFF, sizeof(buf)); - for (int i = 0; i < sizes_count; i++) { - int sz = sizes[i]; + for (size_t i = 0; i < nsizes; i++) { + ssize_t rc; + size_t sz = sizes[i]; char tbuf[1]; + rc = sendto(cs, buf, sz, 0, sa, sa->sa_len); - ATF_REQUIRE_EQ(rc, sz); + ATF_REQUIRE_MSG(rc != -1, "sendto failed: %s", strerror(errno)); + ATF_REQUIRE((size_t)rc == sz); rc = recv(ss, NULL, 0, MSG_PEEK | MSG_TRUNC); - ATF_CHECK_EQ(rc, sz); + ATF_REQUIRE_MSG(rc >= 0, "recv failed: %s", strerror(errno)); + ATF_REQUIRE((size_t)rc == sz); rc = recv(ss, tbuf, sizeof(tbuf), MSG_PEEK | MSG_TRUNC); - ATF_CHECK_EQ(rc, sz); + ATF_REQUIRE_MSG(rc >= 0, "recv failed: %s", strerror(errno)); + ATF_REQUIRE((size_t)rc == sz); rc = recv(ss, tbuf, sizeof(tbuf), MSG_TRUNC); - ATF_CHECK_EQ(rc, sz); + ATF_REQUIRE_MSG(rc >= 0, "recv failed: %s", strerror(errno)); + ATF_REQUIRE((size_t)rc == sz); } - close(ss); - close(cs); + ATF_REQUIRE(close(cs) == 0); + ATF_REQUIRE(close(ss) == 0); } -ATF_TC_WITHOUT_HEAD(socket_afinet_udp_recv_trunc); -ATF_TC_BODY(socket_afinet_udp_recv_trunc, tc) +ATF_TC_WITHOUT_HEAD(recv_trunc_afinet_udp); +ATF_TC_BODY(recv_trunc_afinet_udp, tc) { - check_recvmsg("udp"); + struct sockaddr_in sin; + struct sockaddr *sa; + int ss, cs, rc; + + ss = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(ss >= 0); + + memset(&sin, 0, sizeof(sin)); + sin.sin_family = AF_INET; + sin.sin_len = sizeof(sin); + sin.sin_port = htons(6666); + sin.sin_addr.s_addr = htonl(INADDR_LOOPBACK); + sa = (struct sockaddr *)&sin; + rc = bind(ss, sa, sa->sa_len); + ATF_REQUIRE_MSG(rc == 0, "bind failed: %s", strerror(errno)); + + cs = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(cs >= 0); + + size_t sizes[] = {80, 255, 256, 1024, 4096, 9000}; + check_recvmsg(cs, ss, sa, sizes, nitems(sizes)); } -ATF_TC_WITHOUT_HEAD(socket_afinet6_udp_recv_trunc); -ATF_TC_BODY(socket_afinet6_udp_recv_trunc, tc) +ATF_TC_WITHOUT_HEAD(recv_trunc_afinet6_udp); +ATF_TC_BODY(recv_trunc_afinet6_udp, tc) { - check_recvmsg("udp6"); + struct sockaddr_in6 sin6; + struct sockaddr *sa; + int cs, ss, rc; + + ss = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(ss >= 0); + + memset(&sin6, 0, sizeof(sin6)); + sin6.sin6_family = AF_INET6; + sin6.sin6_len = sizeof(sin6); + sin6.sin6_port = htons(6666); + const struct in6_addr in6loopback = IN6ADDR_LOOPBACK_INIT; + sin6.sin6_addr = in6loopback; + sa = (struct sockaddr *)&sin6; + rc = bind(ss, sa, sa->sa_len); + ATF_REQUIRE_MSG(rc == 0, "bind failed: %s", strerror(errno)); + + cs = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(cs >= 0); + + size_t sizes[] = {80, 255, 256, 1024, 4096, 9000}; + check_recvmsg(cs, ss, sa, sizes, nitems(sizes)); } -ATF_TC_WITHOUT_HEAD(socket_afunix_recv_trunc); -ATF_TC_BODY(socket_afunix_recv_trunc, tc) +ATF_TC_WITHOUT_HEAD(recv_trunc_afunix_dgram); +ATF_TC_BODY(recv_trunc_afunix_dgram, tc) { - check_recvmsg("unix"); + struct sockaddr_un sun; + struct sockaddr *sa; + int ss, cs, rc; + + ss = socket(PF_UNIX, SOCK_DGRAM, 0); + ATF_REQUIRE(ss >= 0); + + bzero(&sun, sizeof(sun)); + sun.sun_family = AF_UNIX; + strlcpy(sun.sun_path, "test_check_recvmsg_socket", sizeof(sun.sun_path)); + sun.sun_len = sizeof(sun); + sa = (struct sockaddr *)&sun; + rc = bind(ss, sa, sa->sa_len); + ATF_REQUIRE_MSG(rc == 0, "bind failed: %s", strerror(errno)); + + cs = socket(PF_UNIX, SOCK_DGRAM, 0); + ATF_REQUIRE(cs >= 0); + + size_t sizes[] = {80, 255, 256, 1024, 2000}; + check_recvmsg(cs, ss, sa, sizes, nitems(sizes)); } +ATF_TC_WITHOUT_HEAD(recv_trunc_afunix_seqpacket); +ATF_TC_BODY(recv_trunc_afunix_seqpacket, tc) +{ + struct sockaddr_un sun; + struct sockaddr *sa; + int ss, nss, cs, rc; + + ss = socket(PF_UNIX, SOCK_SEQPACKET, 0); + ATF_REQUIRE(ss >= 0); + + bzero(&sun, sizeof(sun)); + sun.sun_family = AF_UNIX; + strlcpy(sun.sun_path, "test_check_recvmsg_socket", sizeof(sun.sun_path)); + sun.sun_len = sizeof(sun); + sa = (struct sockaddr *)&sun; + rc = bind(ss, sa, sa->sa_len); + ATF_REQUIRE_MSG(rc == 0, "bind failed: %s", strerror(errno)); + rc = listen(ss, 1); + ATF_REQUIRE_MSG(rc == 0, "listen failed: %s", strerror(errno)); + + cs = socket(PF_UNIX, SOCK_SEQPACKET, 0); + ATF_REQUIRE(cs >= 0); + rc = connect(cs, sa, sa->sa_len); + ATF_REQUIRE_MSG(rc == 0, "connect failed: %s", strerror(errno)); + nss = accept(ss, NULL, NULL); + ATF_REQUIRE(nss >= 0); + + size_t sizes[] = {80, 255, 256, 1024, 2000}; + check_recvmsg(cs, nss, sa, sizes, nitems(sizes)); + + ATF_REQUIRE(close(ss) == 0); +} ATF_TP_ADD_TCS(tp) { + ATF_TP_ADD_TC(tp, recv_trunc_afinet_udp); + ATF_TP_ADD_TC(tp, recv_trunc_afinet6_udp); + ATF_TP_ADD_TC(tp, recv_trunc_afunix_dgram); + ATF_TP_ADD_TC(tp, recv_trunc_afunix_seqpacket); - ATF_TP_ADD_TC(tp, socket_afinet_udp_recv_trunc); - ATF_TP_ADD_TC(tp, socket_afinet6_udp_recv_trunc); - ATF_TP_ADD_TC(tp, socket_afunix_recv_trunc); - - return atf_no_error(); + return (atf_no_error()); } From nobody Tue Oct 24 13:38:22 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFCnC72RBz4y3vs; Tue, 24 Oct 2023 13:38: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 4SFCnB5cJTz4YyH; Tue, 24 Oct 2023 13:38:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CMm/U0yz4ALoUfw8omkKQAdMawvO8RMEssCxZRL9oMU=; b=X8BUb2AEzXA0qc1eH2axbJxPl9tjZG8j56d9JXEnYFIVeQ5+koyFyd5XRRNqioXL/craZ0 bJzPaUdBiwDEnR8XLqoVlUcK0FN6SES0lcDZDCp+5FZZsEbStAfPA7bgP28+uISh4LxeSu iim4N3hKvS6SYJvH4Kh6XlIDrVcm861Gq1AktXJUwgyx4/9sf/hWk7RyqHYjSW2z/wHAJ+ l7EQm+i0PUIaQq9rVSAJZLfB9hmVXTjXOoqUM9i3iqm5SoWU4WknVkAeaZxFYnk7g/w8N0 NT7/7Q6drVXH2dg/u6/dgkfAVLKEIK/lNQKjTjoqQnC3j9CNA2v8wcPTVtYumA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154702; a=rsa-sha256; cv=none; b=hZrWn/b4JGUuzOjLgeMr7oVsoA1EAocbOb5E0mkKizR6uOu8XQwPCyCZq0mLa5miN0Ag+J dWNbqmO4OAH/woc0Y1lQrHlI63uZmDUbMKsQPNxPan82rpQ5WjBucWWhamMxiWZa90/Nnd Es+oIKB3uO6TtwSG7X/7lwF8DPgcvlqwrJMSK3KeCK6hpoJgdKy4lT2JHKzEQCPYchbvWC 3a8BuiLmS65aLvBjVyU+cH6/4BlWXqJMIt6KrbtA7u/8k7sEFLU+6PZOXKDvPzrqv6LYSp 1H4dQlriqSIEWr+HuAJ76zAXXyr5E085SKGopn9bFZf65k1vRG3YYFbfmmFx0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154702; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CMm/U0yz4ALoUfw8omkKQAdMawvO8RMEssCxZRL9oMU=; b=MFinDdvdGwkHOgRpn8xH7p0VDTiiGGM2a24kraWIC3XxkQ9OaV6bBZRgat+1xEMs/8NVMb NhtSj2lkV2bXeMeLWjlO5I2oKUFO/t9w7RWxusmDqYduHzE40HvKrWGrmK2JjweUdblk/S 6GHRZN2G8T+ZxfTHjHguBBg9m+NsGV0TXKV2YfLmumgUjNAfcaDbJ/oDs9qa1K9alD5HDZ GJeLIsvnMBNFdEvgTOWCnwGqKZIeDfC9mgjc1zVu9sGN1IPJ0owDjSBg8v/EI8XfX2kL73 hIV8ywtEqebtc7sY5GXmZH5Ko+rYbrJRi/jlS6zBqK0iCS1xCWHnM4pGs1Ld5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFCnB4k7Zz9P6; Tue, 24 Oct 2023 13:38:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODcM88089286; Tue, 24 Oct 2023 13:38:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODcMLu089283; Tue, 24 Oct 2023 13:38:22 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:22 GMT Message-Id: <202310241338.39ODcMLu089283@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: f79b01d323c0 - stable/14 - socket tests: Add a regression test for ktrace+recv(MSG_TRUNC) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: f79b01d323c04e5530956ee071faff7b2ec5ec33 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f79b01d323c04e5530956ee071faff7b2ec5ec33 commit f79b01d323c04e5530956ee071faff7b2ec5ec33 Author: Mark Johnston AuthorDate: 2023-10-16 22:23:36 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:18:39 +0000 socket tests: Add a regression test for ktrace+recv(MSG_TRUNC) MFC after: 1 week (cherry picked from commit d8735eb7acc0613fd19f74a49d3bdcb7ed0e9b0e) --- tests/sys/kern/socket_msg_trunc.c | 57 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/tests/sys/kern/socket_msg_trunc.c b/tests/sys/kern/socket_msg_trunc.c index 469b9e1503cd..279170158643 100644 --- a/tests/sys/kern/socket_msg_trunc.c +++ b/tests/sys/kern/socket_msg_trunc.c @@ -27,11 +27,13 @@ #include #include +#include #include #include #include +#include #include #include #include @@ -182,12 +184,67 @@ ATF_TC_BODY(recv_trunc_afunix_seqpacket, tc) ATF_REQUIRE(close(ss) == 0); } +/* + * Exercise the case where ktrace was used to dump a truncated buffer. + */ +ATF_TC_WITHOUT_HEAD(recvmsg_trunc_ktrace_uio); +ATF_TC_BODY(recvmsg_trunc_ktrace_uio, tc) +{ + struct ktr_header ktr; + struct msghdr msg; + struct iovec iov; + const char *tracepath; + char buf[128]; + ssize_t nbytes; + int error, fd, sd[2]; + + tracepath = "ktrace"; + + error = socketpair(AF_UNIX, SOCK_DGRAM, 0, sd); + ATF_REQUIRE(error == 0); + + memset(buf, 0, sizeof(buf)); + nbytes = send(sd[0], buf, sizeof(buf), 0); + ATF_REQUIRE_MSG(nbytes >= 0, "send failed: %s", strerror(errno)); + ATF_REQUIRE((size_t)nbytes == sizeof(buf)); + + fd = open(tracepath, O_RDWR | O_CREAT | O_TRUNC, 0644); + ATF_REQUIRE_MSG(fd >= 0, "open failed: %s", strerror(errno)); + error = ktrace(tracepath, KTROP_SET, KTRFAC_GENIO, getpid()); + ATF_REQUIRE_MSG(error == 0, + "ktrace(SET) failed: %s", strerror(errno)); + + iov.iov_base = buf; + iov.iov_len = sizeof(buf) - 1; /* truncate */ + memset(&msg, 0, sizeof(msg)); + msg.msg_iov = &iov; + msg.msg_iovlen = 1; + nbytes = recvmsg(sd[1], &msg, MSG_TRUNC); + ATF_REQUIRE_MSG(nbytes >= 0, "recvmsg failed: %s", strerror(errno)); + ATF_REQUIRE((size_t)nbytes == sizeof(buf)); + ATF_REQUIRE((msg.msg_flags & MSG_TRUNC) != 0); + + error = ktrace(tracepath, KTROP_CLEARFILE, 0, getpid()); + ATF_REQUIRE_MSG(error == 0, + "ktrace(CLEARFILE) failed: %s", strerror(errno)); + + nbytes = read(fd, &ktr, sizeof(ktr)); + ATF_REQUIRE_MSG(nbytes >= 0, "read failed: %s", strerror(errno)); + ATF_REQUIRE((size_t)nbytes == sizeof(ktr)); + ATF_REQUIRE_MSG((ktr.ktr_type & ~KTR_TYPE) == KTR_GENIO); + + ATF_REQUIRE(close(fd) == 0); + ATF_REQUIRE(close(sd[0]) == 0); + ATF_REQUIRE(close(sd[1]) == 0); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, recv_trunc_afinet_udp); ATF_TP_ADD_TC(tp, recv_trunc_afinet6_udp); ATF_TP_ADD_TC(tp, recv_trunc_afunix_dgram); ATF_TP_ADD_TC(tp, recv_trunc_afunix_seqpacket); + ATF_TP_ADD_TC(tp, recvmsg_trunc_ktrace_uio); return (atf_no_error()); } From nobody Tue Oct 24 13:38:23 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFCnD2gWfz4y3b3; Tue, 24 Oct 2023 13:38: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 4SFCnC6rFKz4ZFj; Tue, 24 Oct 2023 13:38:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/P+JSEfIXmRfaDnYxB+gPSO8TF13cyj+3Dngq5J+XPM=; b=i2lL4PIu+lhb9dXbMKEtz5uJYM6qYAmd0ciHE2f1ZxR+C7B4365y3V1LqWQBg5KQzwl5Bs BR3PXTutZlBQrukJy5zpVTTLt+8rB+x0BNYYRhPJZ2F81gYKbWa0qCocDFehCFewkl1rnu siUAYhKrJCCC8aONoqXp9qpoBlmfeEWkDQnXwPXSOOyIK03kFWH4kEE8pkT93PiRLPD4Qg eaButyMU/sUMWCmwW4NYY8DaUK57culRRdIQm4FkwmDvwDVKZhmdVBhR3FfOCY8f6cJcnT SfPZ5Zbj7+G9b4FbQXoMy668RCSenhiPQhZXUHcv49vRxhjbc7zLYEfsFfMVKQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154704; a=rsa-sha256; cv=none; b=Vd6WZ6TEr5ZmL0sRgOLKv7VLETx9Go3pI/dhNirrQOr/WbTgIjZCH/QW1ZzY4CpCax8a+I QOFNFRwJX0IyV0oItPej/k+fWqwsMg6URjrQxwgu0xkiU2aFodvdGpw6Q/ZiBdnRLUMOC0 +3FWxvhL95T++83wiR1+TLnXAr4e/Nbn5lUbIjSUIkuNuH6wK89WYRjWvswvLDRyPENFUj wQRRDx9Pp3gXWsyvK608bkNO7rUFOR85luzK5Tf7ZMhEGvenKtr6h+BSiaUvqiCrWas+vs +ubnErXPviMqH+UN4E6xKd1pb2GDOG7xhP1YH/g183+6aPpsvk+GPoW9p82eDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154704; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/P+JSEfIXmRfaDnYxB+gPSO8TF13cyj+3Dngq5J+XPM=; b=Q44xNFfcfYSWZY0k7Iebyg094dzqE6oAeq5zjX7+Ern5y/Q8t3CMyq2WbI7VJ2oG/LzIPE DgP2dYtjI8bH7JNVisufk2qhvOEl1ddtrE/obLsO/RvC/GR0Luuo6TflRyvwVJDjFU/aLJ Oua4xrZCrIDfbsHwXbM+hlUjo8woZp8Wbw8kD8ZsiqKoY36cnfJLN8LFWXS0i8qrlkNFUm owfnb55o+6IwTz7EfWCVmDQjit3SeY0RpOZD+Q+O+lXQFNF/lD4Hrt02xjzS20sPj+rZCH +njPKYDdO8pv/kQW1qKFmloK6uyAEq8Pp8hiAiJ7bcr7QtbANwGBjgfgchJLaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFCnC5yFDz97F; Tue, 24 Oct 2023 13:38:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODcNSn089325; Tue, 24 Oct 2023 13:38:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODcNFq089322; Tue, 24 Oct 2023 13:38:23 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:23 GMT Message-Id: <202310241338.39ODcNFq089322@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: 2d49b111a312 - stable/14 - uiomove: Add some assertions List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: 2d49b111a312469447776e1b68fbea2a644249c8 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2d49b111a312469447776e1b68fbea2a644249c8 commit 2d49b111a312469447776e1b68fbea2a644249c8 Author: Mark Johnston AuthorDate: 2023-10-16 20:12:37 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:19:01 +0000 uiomove: Add some assertions Make sure that we don't try to copy with a negative resid. Make sure that we don't walk off the end of the iovec array. Reviewed by: kib MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42098 (cherry picked from commit 8fd0ec53deaad34383d4b344714b74d67105b258) --- sys/amd64/amd64/uio_machdep.c | 6 ++++++ sys/arm/arm/uio_machdep.c | 6 ++++++ sys/arm64/arm64/uio_machdep.c | 6 ++++++ sys/i386/i386/uio_machdep.c | 6 ++++++ sys/kern/subr_uio.c | 5 +++++ sys/powerpc/powerpc/uio_machdep.c | 5 +++++ sys/riscv/riscv/uio_machdep.c | 6 ++++++ 7 files changed, 40 insertions(+) diff --git a/sys/amd64/amd64/uio_machdep.c b/sys/amd64/amd64/uio_machdep.c index f3e80addc92c..67e14d8e0d12 100644 --- a/sys/amd64/amd64/uio_machdep.c +++ b/sys/amd64/amd64/uio_machdep.c @@ -71,10 +71,16 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys: mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, ("uiomove_fromphys proc")); + KASSERT(uio->uio_resid >= 0, + ("%s: uio %p resid underflow", __func__, uio)); + save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; mapped = false; while (n > 0 && uio->uio_resid) { + KASSERT(uio->uio_iovcnt > 0, + ("%s: uio %p iovcnt underflow", __func__, uio)); + iov = uio->uio_iov; cnt = iov->iov_len; if (cnt == 0) { diff --git a/sys/arm/arm/uio_machdep.c b/sys/arm/arm/uio_machdep.c index 07531f76217b..18661ebd1652 100644 --- a/sys/arm/arm/uio_machdep.c +++ b/sys/arm/arm/uio_machdep.c @@ -72,9 +72,15 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys: mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, ("uiomove_fromphys proc")); + KASSERT(uio->uio_resid >= 0, + ("%s: uio %p resid underflow", __func__, uio)); + save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; while (n > 0 && uio->uio_resid) { + KASSERT(uio->uio_iovcnt > 0, + ("%s: uio %p iovcnt underflow", __func__, uio)); + iov = uio->uio_iov; cnt = iov->iov_len; if (cnt == 0) { diff --git a/sys/arm64/arm64/uio_machdep.c b/sys/arm64/arm64/uio_machdep.c index f9e4e7a9547f..4fdcaf74890c 100644 --- a/sys/arm64/arm64/uio_machdep.c +++ b/sys/arm64/arm64/uio_machdep.c @@ -69,10 +69,16 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys: mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, ("uiomove_fromphys proc")); + KASSERT(uio->uio_resid >= 0, + ("%s: uio %p resid underflow", __func__, uio)); + save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; mapped = false; while (n > 0 && uio->uio_resid) { + KASSERT(uio->uio_iovcnt > 0, + ("%s: uio %p iovcnt underflow", __func__, uio)); + iov = uio->uio_iov; cnt = iov->iov_len; if (cnt == 0) { diff --git a/sys/i386/i386/uio_machdep.c b/sys/i386/i386/uio_machdep.c index 07d71eac5db6..92e067b35bed 100644 --- a/sys/i386/i386/uio_machdep.c +++ b/sys/i386/i386/uio_machdep.c @@ -71,9 +71,15 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys: mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, ("uiomove_fromphys proc")); + KASSERT(uio->uio_resid >= 0, + ("%s: uio %p resid underflow", __func__, uio)); + save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; while (n > 0 && uio->uio_resid) { + KASSERT(uio->uio_iovcnt > 0, + ("%s: uio %p iovcnt underflow", __func__, uio)); + iov = uio->uio_iov; cnt = iov->iov_len; if (cnt == 0) { diff --git a/sys/kern/subr_uio.c b/sys/kern/subr_uio.c index 21a1f044db54..b0c4a256cd17 100644 --- a/sys/kern/subr_uio.c +++ b/sys/kern/subr_uio.c @@ -216,6 +216,8 @@ uiomove_faultflag(void *cp, int n, struct uio *uio, int nofault) ("uiomove: mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, ("uiomove proc")); + KASSERT(uio->uio_resid >= 0, + ("%s: uio %p resid underflow", __func__, uio)); if (uio->uio_segflg == UIO_USERSPACE) { newflags = TDP_DEADLKTREAT; @@ -234,6 +236,9 @@ uiomove_faultflag(void *cp, int n, struct uio *uio, int nofault) } while (n > 0 && uio->uio_resid) { + KASSERT(uio->uio_iovcnt > 0, + ("%s: uio %p iovcnt underflow", __func__, uio)); + iov = uio->uio_iov; cnt = iov->iov_len; if (cnt == 0) { diff --git a/sys/powerpc/powerpc/uio_machdep.c b/sys/powerpc/powerpc/uio_machdep.c index 679139a96e99..5de2dd8b416b 100644 --- a/sys/powerpc/powerpc/uio_machdep.c +++ b/sys/powerpc/powerpc/uio_machdep.c @@ -75,10 +75,15 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys: mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, ("uiomove_fromphys proc")); + KASSERT(uio->uio_resid >= 0, + ("%s: uio %p resid underflow", __func__, uio)); save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; while (n > 0 && uio->uio_resid) { + KASSERT(uio->uio_iovcnt > 0, + ("%s: uio %p iovcnt underflow", __func__, uio)); + iov = uio->uio_iov; cnt = iov->iov_len; if (cnt == 0) { diff --git a/sys/riscv/riscv/uio_machdep.c b/sys/riscv/riscv/uio_machdep.c index 86a39be12cdb..e2f82974b2e9 100644 --- a/sys/riscv/riscv/uio_machdep.c +++ b/sys/riscv/riscv/uio_machdep.c @@ -69,10 +69,16 @@ uiomove_fromphys(vm_page_t ma[], vm_offset_t offset, int n, struct uio *uio) ("uiomove_fromphys: mode")); KASSERT(uio->uio_segflg != UIO_USERSPACE || uio->uio_td == curthread, ("uiomove_fromphys proc")); + KASSERT(uio->uio_resid >= 0, + ("%s: uio %p resid underflow", __func__, uio)); + save = td->td_pflags & TDP_DEADLKTREAT; td->td_pflags |= TDP_DEADLKTREAT; mapped = false; while (n > 0 && uio->uio_resid) { + KASSERT(uio->uio_iovcnt > 0, + ("%s: uio %p iovcnt underflow", __func__, uio)); + iov = uio->uio_iov; cnt = iov->iov_len; if (cnt == 0) { From nobody Tue Oct 24 13:38:24 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFCnF1dDlz4y3ry; Tue, 24 Oct 2023 13:38: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 4SFCnF0z83z4ZDB; Tue, 24 Oct 2023 13:38:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b88HxLwJcZljTYyi4Rhs7GAzLlg40PQYukYnP+AU7TM=; b=cS2DD7h96eTnuPjGalNaTLdinACuEnSTDlXVU+LoQwz4sil+/wuMne/MI3Niuhgi5pm3LK W0Qo7R+u3WjsM529FoFQgCaECh4Gp9/T5O9AlTXoimUQgakwj9tu3yfTKLkxJ8vt3Ghsfc kRzocHTuR68GSQwgUzFD9H9hA+QMiIPDnLO7YRtJlX3+4uYSOAHE+pMV59Gs8Nxk4irlpr 2mNrDYeA0kJZUTWT8kc8xJPuJ+SnEqxRMEv+hh8HJsfQ1aGV32psIoJxKo4xILWREjkkt5 lckE79ypbSSGR5gmvmvPZ+0Qf3ga+HcG8sVjJn2cZvD4Bg23kU2foxLQk0rPlg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154705; a=rsa-sha256; cv=none; b=lCItAJM6jHxZbS6IWofmwyATtGCoFWN3lVNMBAp1PS+I4x2ceccUR6BBAgj4ugIWjgvJgw Fu/yw6lwJfEHo4LMzRC3d7Cdh+hXrySOwEcpv3LCX3RgD2FOK8Czs9UP6bXBVOYRcbYnfv s2RBhve3VzwNnvGYd3WeWXERGtE12MiRny+L7aQFCifQ7FB6d6coTqtgZT+t1A4Lddk9gQ OCiBTy5x6wxDqw72z/Afa9AP3uxYgtmbLyBDPkHXqXpKzT322l8YXK5ajt6MNViMauT082 M9nS5EmxmGLt/RZzwJ9BIFDGTbGvQq0ymojVINPtiJpmCXkQA4k1hW8AobviZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154705; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=b88HxLwJcZljTYyi4Rhs7GAzLlg40PQYukYnP+AU7TM=; b=VH70uTxOqPlyuKIl+EkDcwEnYqC5KQ2hcQCeL8tHFA89/GnYTa91BsDQnPrkbni2y5rF8p p7TA4o4z9l1mwjnr0GJq2ZstJaktrJkEWk/SOm3kRCzKDc/bmqBpgX7j08CZ/HtsoV5R+v aJkyeWPQAkj7g5HgbDKmqhVXGWtLHex+cDztAyPq97KI1L4/XYKOY2pWcV71ZPAI03fCcI aMwExPXz+QakUcEjShVMHJFFNDLDBzWCHT6uh0Q2g3YiurHVuFOv6NsUBvawDcaLkVStoD E/H/k2Gqgp6kZXeTRMSdwcBpTdgieSsztLBGZjfCT03ahOxuHFEg+X3IuZfizw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFCnF01gJz9Sx; Tue, 24 Oct 2023 13:38:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODcO9m089386; Tue, 24 Oct 2023 13:38:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODcONY089383; Tue, 24 Oct 2023 13:38:24 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:24 GMT Message-Id: <202310241338.39ODcONY089383@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: 4b1770ef487d - stable/14 - netinet tests: Add error handling tests for UDP with v4-mapped sockets List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: 4b1770ef487d543b083ffea614f12edb3fb36a9d Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4b1770ef487d543b083ffea614f12edb3fb36a9d commit 4b1770ef487d543b083ffea614f12edb3fb36a9d Author: Mark Johnston AuthorDate: 2023-10-17 14:29:42 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:19:46 +0000 netinet tests: Add error handling tests for UDP with v4-mapped sockets This provides a regression test for commit abca3ae7734f. Add it to the existing v4-mapped address test file, and rename accordingly. Reviewed by: tuexen, karels, rrs MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39216 (cherry picked from commit ae5c3dfd3e75bb287984947359d4f958aea505ec) --- ObsoleteFiles.inc | 3 + tests/sys/netinet/Makefile | 2 +- ...p6_v4mapped_bind_test.c => ip6_v4mapped_test.c} | 81 +++++++++++++++++++--- 3 files changed, 76 insertions(+), 10 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 6a5e4e39fc1e..dbb4eda24416 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20231006: rename tcp6_v4unmapped_bind_test +OLD_FILES+=usr/tests/sys/netinet/tcp6_v4unmapped_bind_test + # 20231013: Man pages renamed to match the actual functions OLD_FILES+=usr/share/man/man9/cr_seeothergids.9.gz OLD_FILES+=usr/share/man/man9/cr_seeotheruids.9.gz diff --git a/tests/sys/netinet/Makefile b/tests/sys/netinet/Makefile index 144754acfbcc..44f76508bf5c 100644 --- a/tests/sys/netinet/Makefile +++ b/tests/sys/netinet/Makefile @@ -7,9 +7,9 @@ BINDIR= ${TESTSDIR} TESTS_SUBDIRS+= libalias ATF_TESTS_C= ip_reass_test \ + ip6_v4mapped_test \ so_reuseport_lb_test \ socket_afinet \ - tcp6_v4mapped_bind_test \ tcp_connect_port_test \ tcp_md5_getsockopt diff --git a/tests/sys/netinet/tcp6_v4mapped_bind_test.c b/tests/sys/netinet/ip6_v4mapped_test.c similarity index 81% rename from tests/sys/netinet/tcp6_v4mapped_bind_test.c rename to tests/sys/netinet/ip6_v4mapped_test.c index c7fc682d7ae7..d4c4ed526ab5 100644 --- a/tests/sys/netinet/tcp6_v4mapped_bind_test.c +++ b/tests/sys/netinet/ip6_v4mapped_test.c @@ -194,17 +194,15 @@ restore_portrange(void) "failed while restoring value"); } -ATF_TC_WITH_CLEANUP(v4mapped); -ATF_TC_HEAD(v4mapped, tc) +ATF_TC_WITH_CLEANUP(tcp_v4mapped_bind); +ATF_TC_HEAD(tcp_v4mapped_bind, tc) { - /* root is only required for sysctls (setup and cleanup). */ atf_tc_set_md_var(tc, "require.user", "root"); atf_tc_set_md_var(tc, "require.config", "allow_sysctl_side_effects"); atf_tc_set_md_var(tc, "descr", "Check local port assignment with bind and mapped V4 addresses"); } - /* * Create a listening IPv4 socket, then connect to it repeatedly using a * bound IPv6 socket using a v4 mapped address. With a small port range, @@ -213,7 +211,7 @@ ATF_TC_HEAD(v4mapped, tc) * and then the connect would fail with EADDRINUSE. Make sure we get * the right error. */ -ATF_TC_BODY(v4mapped, tc) +ATF_TC_BODY(tcp_v4mapped_bind, tc) { union { struct sockaddr saddr; @@ -315,17 +313,82 @@ ATF_TC_BODY(v4mapped, tc) ATF_REQUIRE_MSG(i >= 1, "No successful connections"); ATF_REQUIRE_MSG(got_bind_error == true, "No expected bind error"); } +ATF_TC_CLEANUP(tcp_v4mapped_bind, tc) +{ + restore_portrange(); +} -ATF_TC_CLEANUP(v4mapped, tc) +ATF_TC(udp_v4mapped_sendto); +ATF_TC_HEAD(udp_v4mapped_sendto, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Validate sendto() with a v4-mapped address and a v6-only socket"); +} +ATF_TC_BODY(udp_v4mapped_sendto, tc) { + struct addrinfo ai_hint, *aip; + struct sockaddr_in sin; + struct sockaddr_in6 sin6; + ssize_t n; + socklen_t salen; + int error, ls, s, zero; + short port; + char ch; - restore_portrange(); + ls = socket(PF_INET, SOCK_DGRAM, 0); + ATF_REQUIRE(ls >= 0); + + memset(&ai_hint, 0, sizeof(ai_hint)); + ai_hint.ai_family = AF_INET; + ai_hint.ai_flags = AI_NUMERICHOST; + error = getaddrinfo("127.0.0.1", NULL, &ai_hint, &aip); + ATF_REQUIRE_MSG(error == 0, "getaddrinfo: %s", gai_strerror(error)); + memcpy(&sin, aip->ai_addr, sizeof(sin)); + + error = bind(ls, (struct sockaddr *)&sin, sizeof(sin)); + ATF_REQUIRE_MSG(error == 0, "bind: %s", strerror(errno)); + salen = sizeof(sin); + error = getsockname(ls, (struct sockaddr *)&sin, &salen); + ATF_REQUIRE_MSG(error == 0, + "getsockname() for listen socket failed: %s", strerror(errno)); + ATF_REQUIRE_MSG(salen == sizeof(struct sockaddr_in), + "unexpected sockaddr size"); + port = sin.sin_port; + + s = socket(PF_INET6, SOCK_DGRAM, 0); + ATF_REQUIRE(s >= 0); + + memset(&ai_hint, 0, sizeof(ai_hint)); + ai_hint.ai_family = AF_INET6; + ai_hint.ai_flags = AI_NUMERICHOST | AI_V4MAPPED; + error = getaddrinfo("127.0.0.1", NULL, &ai_hint, &aip); + ATF_REQUIRE_MSG(error == 0, "getaddrinfo: %s", gai_strerror(error)); + memcpy(&sin6, aip->ai_addr, sizeof(sin6)); + sin6.sin6_port = port; + + ch = 0x42; + n = sendto(s, &ch, 1, 0, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_ERRNO(EINVAL, n == -1); + + zero = 0; + error = setsockopt(s, IPPROTO_IPV6, IPV6_V6ONLY, &zero, sizeof(zero)); + ATF_REQUIRE_MSG(error == 0, + "setsockopt(IPV6_V6ONLY) failed: %s", strerror(errno)); + + ch = 0x42; + n = sendto(s, &ch, 1, 0, (struct sockaddr *)&sin6, sizeof(sin6)); + ATF_REQUIRE_MSG(n == 1, "sendto() failed: %s", strerror(errno)); + + ch = 0; + n = recv(ls, &ch, 1, 0); + ATF_REQUIRE_MSG(n == 1, "recv() failed: %s", strerror(errno)); + ATF_REQUIRE(ch == 0x42); } ATF_TP_ADD_TCS(tp) { - ATF_TP_ADD_TC(tp, v4mapped); + ATF_TP_ADD_TC(tp, tcp_v4mapped_bind); + ATF_TP_ADD_TC(tp, udp_v4mapped_sendto); return (atf_no_error()); } - From nobody Tue Oct 24 13:38:26 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFCnG52stz4y3kv; Tue, 24 Oct 2023 13:38: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 4SFCnG1whtz4Z9X; Tue, 24 Oct 2023 13:38:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pK1CQ54p4cX03b/cMFzudOcxD8q1i528fdun0pGwdlU=; b=CrXSakiKWdQGoYMInFsW/PUgRr06RbG2x/a6GppanKBfMIyGTga6PdSSW0DT2f++z2XyW+ h/7ddBU8y8KC36MPYXRDUzicJhOp65pIUwGOVvB37n6Qp8l8/D0bHT18Lu1iXQf1CD+YV3 PTQwoXFeLICPRhVqG9RzaR3t8d8otT1+5C41pDKnrSxYtdpv8N7fjXAM70Ey53OcdsxNgE uwerBRNbzi2XnNbeo2zqA0eCm8YcpLhnI2H8Vbeohx0CJO5xgRPYZI7+WwmIikBTPQ53Cp t++1ApQCphaXRhyU8fajh2QBnRojvGNzNzA9GE1PW1/33xoRkS7pk61QeLtiPg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154706; a=rsa-sha256; cv=none; b=GT0Ii4AOLY2pfOGzOiJYDbbi3hMUlwH5e2m8nqWHjFgmcPxfVHk3+O28WMIGny4tUa3eZF ntfUdwsXeTYjFvEbNj8Yg6bXSo8j0zFmtdywU9MUeqDPdipbwDeF/1FavIIEi3gL7nvZ/T 0WCLig0J6hvJKC8p+4vlXBJoEwsClIHWRxXYonlB3jl0LlIVWzKtQ66Xgjf7lM+hl96ufS TBMUlYCdY2WhrUvQFvdcKugqCPJ2n3H3fF38hOAOFCD2PFqvh7JaFAcnS2r01/fz2PSAoU mzcqaqeCUqEdiIAWiOUT7h5meN0nRZ4eMmhFgFwkBQ607kgWV4nTx5QMRiveRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154706; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pK1CQ54p4cX03b/cMFzudOcxD8q1i528fdun0pGwdlU=; b=ECySM5akrJ0uYkCxE04j4osdHbfRV/rvFelo008ZunkZopmZD3cis2g4d09H3iPo0irTo+ EwKpYAnUveeo0IsSbHQaHqX47agpkJ5fn4i7+zI+Qiow1AnPSJRXR718/d6c0CTaJlEaY8 iJ5B20fMbtllqRqQHyRqQFvTGR/JUo1Z6hCMW+VPY0GlXAq7UVWzdK5Ap9kVxnDJJPG3Ly 5fCJV1D/SMXtLyldcZ1IyK7MDWOTTyfItsLUQBKqH4CY8fZE2dBDuiW4xxB1aGHcDKCcl7 N0Eczw0wMvnLl/53ugkAvvJl6A7fRX7kiGYhaNuiNLqU+DqLMxqNFtsusVXsWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFCnG125cz9Sy; Tue, 24 Oct 2023 13:38:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODcQDB089436; Tue, 24 Oct 2023 13:38:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODcQeo089433; Tue, 24 Oct 2023 13:38:26 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:26 GMT Message-Id: <202310241338.39ODcQeo089433@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: 4862eb8604d5 - stable/14 - linuxkpi: Handle direct-mapped addresses in linux_free_kmem() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: 4862eb8604d503b52e7c3aa7ff32155b75a1ff93 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4862eb8604d503b52e7c3aa7ff32155b75a1ff93 commit 4862eb8604d503b52e7c3aa7ff32155b75a1ff93 Author: Mark Johnston AuthorDate: 2023-10-17 14:26:18 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:20:01 +0000 linuxkpi: Handle direct-mapped addresses in linux_free_kmem() See the analysis in PR 271333. It is possible for driver code to allocate a page, store its address as returned by page_address(), then call free_page() on that address. On most systems that'll result in the LinuxKPI calling kmem_free() with a direct-mapped address, which is not legal. Fix the problem by making linux_free_kmem() check the address to see whether it's direct-mapped or not, and handling it appropriately. PR: 271333, 274515 Reviewed by: hselasky, bz Tested by: trasz MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D40028 (cherry picked from commit 6223d0b67af923f53d962a9bf594dc37004dffe8) --- sys/compat/linuxkpi/common/src/linux_page.c | 22 +++++++++++++++++++--- 1 file changed, 19 insertions(+), 3 deletions(-) diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index ce9ad34464bd..21e338acb089 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -145,6 +145,14 @@ linux_alloc_pages(gfp_t flags, unsigned int order) return (page); } +static void +_linux_free_kmem(vm_offset_t addr, unsigned int order) +{ + size_t size = ((size_t)PAGE_SIZE) << order; + + kmem_free((void *)addr, size); +} + void linux_free_pages(struct page *page, unsigned int order) { @@ -163,7 +171,7 @@ linux_free_pages(struct page *page, unsigned int order) vaddr = (vm_offset_t)page_address(page); - linux_free_kmem(vaddr, order); + _linux_free_kmem(vaddr, order); } } @@ -185,9 +193,17 @@ linux_alloc_kmem(gfp_t flags, unsigned int order) void linux_free_kmem(vm_offset_t addr, unsigned int order) { - size_t size = ((size_t)PAGE_SIZE) << order; + KASSERT((addr & PAGE_MASK) == 0, + ("%s: addr %p is not page aligned", __func__, (void *)addr)); - kmem_free((void *)addr, size); + if (addr >= VM_MIN_KERNEL_ADDRESS && addr < VM_MAX_KERNEL_ADDRESS) { + _linux_free_kmem(addr, order); + } else { + vm_page_t page; + + page = PHYS_TO_VM_PAGE(DMAP_TO_PHYS(addr)); + linux_free_pages(page, order); + } } static int From nobody Tue Oct 24 13:38:27 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFCnH3Z5dz4y3kx; Tue, 24 Oct 2023 13:38:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SFCnH34ffz4ZTW; Tue, 24 Oct 2023 13:38:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lTEBW+F+ho5Om9DMUTTEm+TIgLPsZubaimdCvsCvkik=; b=pPbRkS6jtITkiykGjOmJ6JGpWjCUxni/A2J5Zx0xlhtBnfdCfQ87bbaN25vkAVOqZBDDT8 5QuLJeYv/TJ+D+7ZvykJx/XQh8fU8sO+dW3aXEHXHG/MGl8a9hTqTaaEGLxeisUgivNUxN lCkM0RmiJLmdkZLYMUQRaKMIKSo6Pf8cX8VVi9H0flA/d9gqkwg05Z+sjzWDo8TBcA/b0N 1xNnRIX8BG6zIogYXnGZKm5coYaKlHrr4RrfxSRd7fLw6jAqL0C/etj2nC0IWdEhSvbGn0 XnDGP7ljz1/g/vulZuTR9XL/DxzjR/tBUK6wEw7Yf6yT2B5qHPz5BrugetHZ7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154707; a=rsa-sha256; cv=none; b=a0AyFZxiPEHc54xzIAYGk6azkf7GHx4sR/fohZyz/j3ioZEkwtCI1ySwmDVQPK7DkVfVPw NcnIV2oBFfLpzzmMVOXQNmSB42SKK8YfXnVtPHxmfA98MgaZ7r8SzSM4N9kT6uffBbBapP Xnx8FF6ibmNlnUGGxeZpawQgjyWCGn5qRJ8dW7huiHSFYQcetJfBpdE7rmpT2oM6R8Owbh bK9fEXNzdvPkw2M/khhSe1smsW7PXWyTGUXnwLmu6ARxnSn4m58B9JEVlbPVmwA8FcZoZS lKIr5S/t4fSvmvadGhW+IeRSOOMDf9MG4v8paqZz/iyFemTNT9m3D7BIqqmLXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154707; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lTEBW+F+ho5Om9DMUTTEm+TIgLPsZubaimdCvsCvkik=; b=bK1aTWwRfF8VX00y14E0zxbib1uMziAq4IW+jq5nV75HbTWaIVbCYcMXCJCLqjZUpjie09 /yh5Iv8zejoOm6UEII43qEXBCtw68uXtM/IlC6+7G/k0cUfselBogQ7wLJWFSTBiX+LvF1 LHwYH5b2PFYT7jqTSQx+z0kIhhCi2Khc36ZSPhi3yOkNk2nFqjevS9UFyCDG619og2rADO vjRX0lk5aSf6jfkUH1Vd+9AycIPrGKwOcxrwHasM7EeF4EblEj2gXHeNJ4XulJ1c//7Le+ e/51dWlh+RJzoy5wTN0MUYFtP2ALC3srM93M7YRQCRBpgGfqyKalkLgOQzHu5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFCnH20drz97G; Tue, 24 Oct 2023 13:38:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODcRhm089487; Tue, 24 Oct 2023 13:38:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODcRYu089484; Tue, 24 Oct 2023 13:38:27 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:27 GMT Message-Id: <202310241338.39ODcRYu089484@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: 501e1152d2a0 - stable/14 - linuxkpi: Fix an assertion in linux_free_kmem() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: 501e1152d2a047f8ff8fba6e6efbd2d5e9872738 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=501e1152d2a047f8ff8fba6e6efbd2d5e9872738 commit 501e1152d2a047f8ff8fba6e6efbd2d5e9872738 Author: Mark Johnston AuthorDate: 2023-10-18 13:43:02 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:20:12 +0000 linuxkpi: Fix an assertion in linux_free_kmem() In the LinuxKPI, PAGE_MASK is the logical negation of FreeBSD's PAGE_MASK, so the original assertion was simply incorrect. Reported by: trasz Tested by: trasz Fixes: 6223d0b67af9 ("linuxkpi: Handle direct-mapped addresses in linux_free_kmem()") (cherry picked from commit f88bd1174aab1aff7fea7241ab6e103e769d2d7a) --- sys/compat/linuxkpi/common/src/linux_page.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index 21e338acb089..ead2f24cf5df 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -193,7 +193,7 @@ linux_alloc_kmem(gfp_t flags, unsigned int order) void linux_free_kmem(vm_offset_t addr, unsigned int order) { - KASSERT((addr & PAGE_MASK) == 0, + KASSERT((addr & ~PAGE_MASK) == 0, ("%s: addr %p is not page aligned", __func__, (void *)addr)); if (addr >= VM_MIN_KERNEL_ADDRESS && addr < VM_MAX_KERNEL_ADDRESS) { From nobody Tue Oct 24 13:38:28 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFCnJ4jFTz4y3bD; Tue, 24 Oct 2023 13:38: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 4SFCnJ3tPsz4ZZd; Tue, 24 Oct 2023 13:38:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/+v/JXkQJIiBoRUvpZ3MXk3w7Eq7sHsly1iObwxTuaQ=; b=lh7WQRZ5vmSnlAFXO6bMSgdgy6vXA0lqG+Nan1qqIO3eV6azPRuZ/st8JLBjnDSVuwkRP7 QjEIlgcP+jdS2Ppy7GhNlcl9u7QWBZoMUg+SEbED1UUPUv/gnx1np68pXkL5yrTyR6mzWE FsVmb/rAuoS3rud4IHM87Ei3S2d0v/9nqr7wUgNBe4zJiE9118ESIhqAUsyH44nLM1HvEy SigTgCB+L/sYZRjgjszxqERU+tWaFKpDMu+iZ52CIl6LksJGjzi88U/0NWbpBFTiAopH15 RQgO0PV+1bsvn05f70EdhwOltB/t+WL4ZMNDLbGTedd7hcNs0IxDz3JmBJZ8UA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154708; a=rsa-sha256; cv=none; b=LK4bCIZJI54jniCPL5tgdnQWJrAQ61MP9k72ulcZtnbWVoYXmeu9ZRQweTTMpXdfakVKoW njGzKiNJLbThyv46BH1OtflizJgtvFHAUHNk2z2efnw9/DAud6vF6Wf/auICUEKL2MkAfT cGuelnxJrH/VFoODZqfR/Bq6x1Vo6KtsoW3cEAhmKLetY+rkvSI94SUKMfZCowE3ncao1D IHFmC77dVYyLKA14nYeubOIY0o0vzusSbH8EpIdkWIXd141Pva7y/er4yft+WlRCrClO02 7Fh8NVTRw3a7SCupCmBWYMZc8mNAlepFslwfjXuySV81NIy9Uf/KYVrUL6bMbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154708; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/+v/JXkQJIiBoRUvpZ3MXk3w7Eq7sHsly1iObwxTuaQ=; b=SoTQGEt4su88bGuHfBzIzLTAqbM4VFMjOKXgHbqQVmMZab5t9dsC+Bdhsaaaa2uNTm0FIc czBovDFIqVY0/j9VaNiY+NrmLoZ8mY2idfymsUl56Egz2mpCM/9sz4H/5Yfhgd+/LpyhmK WDiGn2TKPcGdKBqWhbk6+kCtRZ0uSieKU66gBhkByTPxd/UU8R0ltLiBJ8aIgetneeJpwZ q5nVZ+9j/m7vy2NSLyicU0sfwd7JN2LyhhPFWnUWMxnDGlIu2pyjqIO5UMfhJxb2UM18do 8Ls6AjdDAxZoZQLcGM1qGqRcpSbjh7h1sURoTH9+RVvfGeI8md5jW0q6dtuJtw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFCnJ2zYVz9Ys; Tue, 24 Oct 2023 13:38:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODcSKv089532; Tue, 24 Oct 2023 13:38:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODcSFn089529; Tue, 24 Oct 2023 13:38:28 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:28 GMT Message-Id: <202310241338.39ODcSFn089529@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: 53f62d1c9a9c - stable/14 - witness: Unconditionally initialize out-params for witness_save() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: 53f62d1c9a9cce1ba1e04fe68c5ae3e5a9a2e656 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=53f62d1c9a9cce1ba1e04fe68c5ae3e5a9a2e656 commit 53f62d1c9a9cce1ba1e04fe68c5ae3e5a9a2e656 Author: Mark Johnston AuthorDate: 2023-10-16 17:23:40 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:20:55 +0000 witness: Unconditionally initialize out-params for witness_save() As of LLVM 16, the -fsanitize-memory-param-retval option is set to true by default, meaning that MSan will eagerly report uninitialized function parameters and return values, even if they are not used. A witness_save()/witness_restore() call pair fails this test since witness_save() may return before saving file and line number information. Modify witness_save() to initialize the out-params unconditionally; this appears to be the only instance of the problem triggered when booting to a login prompt, so let's just address it directly. Sponsored by: Klara, Inc. Sponsored by: Juniper Networks, Inc. MFC after: 1 week (cherry picked from commit 7123222220aa563dc16bf1989d335722e4ff57a6) --- sys/kern/subr_witness.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/subr_witness.c b/sys/kern/subr_witness.c index d4ab085197f4..5b9f8afd9565 100644 --- a/sys/kern/subr_witness.c +++ b/sys/kern/subr_witness.c @@ -2362,6 +2362,10 @@ witness_save(struct lock_object *lock, const char **filep, int *linep) struct lock_instance *instance; struct lock_class *class; + /* Initialize for KMSAN's benefit. */ + *filep = NULL; + *linep = 0; + /* * This function is used independently in locking code to deal with * Giant, SCHEDULER_STOPPED() check can be removed here after Giant From nobody Tue Oct 24 13:38:29 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFCnK5rL1z4y3s4; Tue, 24 Oct 2023 13:38: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 4SFCnK4w3Bz4ZVs; Tue, 24 Oct 2023 13:38:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qH6f/DwY0BljJKLnsOlU98DlS8qvE4DJAONyD2hsp+o=; b=qDNfwGk7SRQBkgwXXMNpKNJ3EHZxZJGT2V5xHcXdeSVbIfbdty1FHiKyllaA4U41dWCWy/ UJjfWffD6FjfFBwBLwffU0O/ZrjMgAvlZocaIwyhJsX/E1bT2r099WD9g9qKTH9N+5neij RIDCr4RBtBoEglhjD8SxFGMmtK6jkhkAoSTjmF8juMkvCOfvzL03G1FogsyejTYHbALwrs 4mVn2CbnrE3K+OCntvj5bYXOzYDW2DAhAAwMmnHiW0MCcJfRJBREvI+u2i5916JaspEPFE 4i1SWFMWVGfGEBB4bREaO87i+SR94Dnm90jXt2wPKRE9/wzxSzAkJ9/yj6BD/g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154709; a=rsa-sha256; cv=none; b=a7g2/npYfC5V9mJDtFr2iMNL+OROD1CWju3TcRxu0LQw8y8nUpUe7q/HHtw3sgiYV0vXm7 H2s4T/DWxM1jDgzu5JgX/G/eenkpL8/gI5m1C7Pv4SY2B74tZHyOP0M6bvFW9FEEz9wSqQ Uv4/l/K7tzpKbIFACYl2ovVJ5tRx+ZShfRJRIgrVSy94Aj3WQ3B//RPY4rjUx55mqFK8P4 imTE1EjNBH/jeTuBw25quGPSO/FC4NycaX0HKeVsiR/RgzXtljKiIdHt5+1dvOGc/BryK+ QhcXaoGfg/CxbuRrdUAnyrn4wu8qSaFCbqTasZv1fqccoBK5xxjc1p3JezomtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154709; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qH6f/DwY0BljJKLnsOlU98DlS8qvE4DJAONyD2hsp+o=; b=cyUe+X4DkiecKLx/GuctVBM8t3Z9NrNcV0T8ioBreA9o5XnKnc6j05e9ABCp1ankW43G2U 8yNcE33PV3/QgmzX8ZGErJMKtYAvIbLYfLm8vM9APzDXKKSZoiejMv5Mqdk5VkSMak0sXP cW9o7pHTi4AVnfAyf/UUNuG3E0z6KIZ0yOy6zBp0EUPBB3kDqtE+CEMY9WyuuOZFmgBFuH A7q3cc35zbZRz65oJrhsz10utIkFzGTDGJrVpPEwVjipAAYvqOle5AxNZP9+R9xjJYKiqq vnvWiKQSP8CIAELZq0agCseX73SemD9xsZwjJrAMGOBjciXBDJMedZzDIGP3rg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFCnK41JMz9d3; Tue, 24 Oct 2023 13:38:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODcTRD089580; Tue, 24 Oct 2023 13:38:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODcTdl089577; Tue, 24 Oct 2023 13:38:29 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:29 GMT Message-Id: <202310241338.39ODcTdl089577@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: c038e80498b3 - stable/14 - bhyve: Remove init_snapshot() and initialize static vars List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: c038e80498b38027f31e86d9e3bf6b418ed4d5f1 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c038e80498b38027f31e86d9e3bf6b418ed4d5f1 commit c038e80498b38027f31e86d9e3bf6b418ed4d5f1 Author: Vitaliy Gusev AuthorDate: 2023-10-17 14:16:08 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:21:08 +0000 bhyve: Remove init_snapshot() and initialize static vars vCPU threads are starting before init_snapshot() is called. That can lead to corruption of vcpu_lock userspace mutex (snapshot.c) and then VM hangs in acquiring that mutex. init_snapshot() initializes only static variables (mutex, cv) and that code can be optimized and removed. Fixes: 9a9a248964696 ("bhyve: init checkput before caph_enter") Reviewed by: markj MFC after: 1 week Sponsored by: vStack (cherry picked from commit 7de582874eb9d08f3f87d11ed9e2b9ce8306db79) --- usr.sbin/bhyve/bhyverun.c | 3 --- usr.sbin/bhyve/snapshot.c | 21 +++------------------ usr.sbin/bhyve/snapshot.h | 1 - 3 files changed, 3 insertions(+), 22 deletions(-) diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index eda9711bccb8..581e45a7492c 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -1016,9 +1016,6 @@ main(int argc, char *argv[]) setproctitle("%s", vmname); #ifdef BHYVE_SNAPSHOT - /* initialize mutex/cond variables */ - init_snapshot(); - /* * checkpointing thread for communication with bhyvectl */ diff --git a/usr.sbin/bhyve/snapshot.c b/usr.sbin/bhyve/snapshot.c index 86c76e679e53..5f2b5e1fafe4 100644 --- a/usr.sbin/bhyve/snapshot.c +++ b/usr.sbin/bhyve/snapshot.c @@ -137,8 +137,9 @@ static const struct vm_snapshot_kern_info snapshot_kern_structs[] = { }; static cpuset_t vcpus_active, vcpus_suspended; -static pthread_mutex_t vcpu_lock; -static pthread_cond_t vcpus_idle, vcpus_can_run; +static pthread_mutex_t vcpu_lock = PTHREAD_MUTEX_INITIALIZER; +static pthread_cond_t vcpus_idle = PTHREAD_COND_INITIALIZER; +static pthread_cond_t vcpus_can_run = PTHREAD_COND_INITIALIZER; static bool checkpoint_active; /* @@ -1395,22 +1396,6 @@ vm_do_checkpoint(struct vmctx *ctx, const nvlist_t *nvl) } IPC_COMMAND(ipc_cmd_set, checkpoint, vm_do_checkpoint); -void -init_snapshot(void) -{ - int err; - - err = pthread_mutex_init(&vcpu_lock, NULL); - if (err != 0) - errc(1, err, "checkpoint mutex init"); - err = pthread_cond_init(&vcpus_idle, NULL); - if (err != 0) - errc(1, err, "checkpoint cv init (vcpus_idle)"); - err = pthread_cond_init(&vcpus_can_run, NULL); - if (err != 0) - errc(1, err, "checkpoint cv init (vcpus_can_run)"); -} - /* * Create the listening socket for IPC with bhyvectl */ diff --git a/usr.sbin/bhyve/snapshot.h b/usr.sbin/bhyve/snapshot.h index fdfbbcbe0cb8..b60773cb99c0 100644 --- a/usr.sbin/bhyve/snapshot.h +++ b/usr.sbin/bhyve/snapshot.h @@ -100,7 +100,6 @@ int vm_resume_devices(void); int get_checkpoint_msg(int conn_fd, struct vmctx *ctx); void *checkpoint_thread(void *param); int init_checkpoint_thread(struct vmctx *ctx); -void init_snapshot(void); int load_restore_file(const char *filename, struct restore_state *rstate); From nobody Tue Oct 24 13:38:30 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFCnM0xPhz4y3l4; Tue, 24 Oct 2023 13:38: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 4SFCnL5rPFz4ZMn; Tue, 24 Oct 2023 13:38:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ByLI8411T3gwIscWOhF7GLsQ93TNZUp5d7eBxDYThPU=; b=P6nymk2UuZfasOrQyvBGDpfud4N03Eopgm2ZjU80h7+O9jXb9/5vehUz4HaVH9pFuk+cBo /1pSTsimZJviEJSPssFCRHXhRsP1MLKdKiOOc2jhWrK7pCM0NF30ZuinJAVFyy4LW6m2IN Zd6EmQ3P3ZqQqBev5wuRp22qumdaS/jlFHCRl+XnaC8i5vZg008A/84jtUZLNeaeMzX+Wd +e3z4y763VqKDmjYiPpw7N2j7xOc454dHoXihPnb139i90PR2YLRjrKfqgn91wVD/pbrmx LGVQUd8mrVlVlPwapdaPb++7R+/KA6JENER+eXiyqd/Hlp6ztNzpb0KET3g8Eg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698154710; a=rsa-sha256; cv=none; b=k2FIRL87MHGqehQIX9MEw++bgqIK8vHmcnojsTPjG4VKeCfjhzH87GrhUbwhg7sc/yqJRt XJ/GANKAl8bH6W/arOkVkPdtSLitJHY+Ct4TrP+Fis4SwzT+ga8vQcIBXKk7Ci/+2Nb2PQ GByiGPcDLNYZQg6qTNf5Lsq5iHjnUkugxT+efKSJ0GzbrAuzHXqFo6s/pbX68gnzCBuKPY 1i+AzasLmceJzd5VAR0Rifxt7WIE4JoDgjDoGqYUuKAtRR5gt241CFPGracMmCB8aYRCyB 6pDKU0utgC9Vzkrrp8urpwn0ZIEO9tTX+4hsLKbPDMANbuNeW12RcLZ3DdshBg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698154710; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ByLI8411T3gwIscWOhF7GLsQ93TNZUp5d7eBxDYThPU=; b=jtG/RZB47ssws9dxhpVJXpBIsc1ALKSC7A1RNHARjzWJ2/eZ9kPTa2N5ZQDJKQhGroa8C6 H0x4pbnAc2YvkyksrMQydt3sxehIpjCRHKcwjGVhP6j0h42L6w244QJIWdoscD9Hnu+0PJ +z+0xoaKfEg6oiLd+oYyfMvRIDvxdl9AlsbJk2wJ0aV70HwhQhxCWJec9eKWIGNi7/tsNX vQ/I8pmlFOh8k97s3o20PhKWdgqd6JOj+OLlWPjeZP3geFKOr1mUkleQCj77wXgQfgCIVf jIpWEsg/CoTPZXPWbhF3STEUx0ifFzb6SJOBImUFiM4z3Nvokcs7CEK8ySVUdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFCnL4y05z9Zd; Tue, 24 Oct 2023 13:38:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODcU6k089625; Tue, 24 Oct 2023 13:38:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODcUE5089622; Tue, 24 Oct 2023 13:38:30 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:38:30 GMT Message-Id: <202310241338.39ODcUE5089622@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: 700689bc2aba - stable/14 - bhyve: Use VMIO_SIOCSIFFLAGS instead of SIOCGIFFLAGS List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: 700689bc2abaf860801b3896ceae86b0072f406c Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=700689bc2abaf860801b3896ceae86b0072f406c commit 700689bc2abaf860801b3896ceae86b0072f406c Author: Jan Bramkamp AuthorDate: 2023-09-04 08:38:25 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 13:21:17 +0000 bhyve: Use VMIO_SIOCSIFFLAGS instead of SIOCGIFFLAGS Creating an IP socket to invoke the SIOCGIFFLAGS ioctl on is the only thing preventing bhyve from working inside a bhyve jail with IPv4 and IPv6 disabled restricting the jailed bhyve process to only access the host network via a tap/vmnet device node. PR: 273557 Fixes: 56be282bc999 ("bhyve: net_backends, automatically IFF_UP tap devices") Reviewed by: markj MFC after: 1 week (cherry picked from commit fd8b9c73a5a63a7aa438a73951d7a535b4f25d9a) --- usr.sbin/bhyve/net_backends.c | 52 ++++--------------------------------------- 1 file changed, 4 insertions(+), 48 deletions(-) diff --git a/usr.sbin/bhyve/net_backends.c b/usr.sbin/bhyve/net_backends.c index fa7cd9c81f46..99781cfdcbb6 100644 --- a/usr.sbin/bhyve/net_backends.c +++ b/usr.sbin/bhyve/net_backends.c @@ -42,9 +42,7 @@ #include #include -#if defined(INET6) || defined(INET) #include -#endif #include #include #define NETMAP_WITH_LIBS @@ -180,17 +178,6 @@ SET_DECLARE(net_backend_set, struct net_backend); * The tap backend */ -#if defined(INET6) || defined(INET) -static const int pf_list[] = { -#if defined(INET6) - PF_INET6, -#endif -#if defined(INET) - PF_INET, -#endif -}; -#endif - struct tap_priv { struct mevent *mevp; /* @@ -222,11 +209,8 @@ tap_init(struct net_backend *be, const char *devname, { struct tap_priv *priv = NET_BE_PRIV(be); char tbuf[80]; - int opt = 1; -#if defined(INET6) || defined(INET) - struct ifreq ifrq; - int s; -#endif + int opt = 1, up = IFF_UP; + #ifndef WITHOUT_CAPSICUM cap_rights_t rights; #endif @@ -254,39 +238,11 @@ tap_init(struct net_backend *be, const char *devname, goto error; } -#if defined(INET6) || defined(INET) - /* - * Try to UP the interface rather than relying on - * net.link.tap.up_on_open. - */ - bzero(&ifrq, sizeof(ifrq)); - if (ioctl(be->fd, TAPGIFNAME, &ifrq) < 0) { - WPRINTF(("Could not get interface name")); - goto error; - } - - s = -1; - for (size_t i = 0; s == -1 && i < nitems(pf_list); i++) - s = socket(pf_list[i], SOCK_DGRAM, 0); - if (s == -1) { - WPRINTF(("Could open socket")); + if (ioctl(be->fd, VMIO_SIOCSIFFLAGS, &up)) { + WPRINTF(("tap device link up failed")); goto error; } - if (ioctl(s, SIOCGIFFLAGS, &ifrq) < 0) { - (void)close(s); - WPRINTF(("Could not get interface flags")); - goto error; - } - ifrq.ifr_flags |= IFF_UP; - if (ioctl(s, SIOCSIFFLAGS, &ifrq) < 0) { - (void)close(s); - WPRINTF(("Could not set interface flags")); - goto error; - } - (void)close(s); -#endif - #ifndef WITHOUT_CAPSICUM cap_rights_init(&rights, CAP_EVENT, CAP_READ, CAP_WRITE); if (caph_rights_limit(be->fd, &rights) == -1) From nobody Tue Oct 24 13:52:01 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFD4x4m1Vz4y4Nf; Tue, 24 Oct 2023 13:52: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 4SFD4x4F3Qz4gBN; Tue, 24 Oct 2023 13:52:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698155521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w+zo5AmeUDm3gq8AMv38zluu55jfAy6d6igUZUH+n8k=; b=SGrYg02JIj37rzRjsYPavq2mv7J2P2s0D3IiR779PaDn1aspfIu56GvQh4iLrcWCbt3fwO PGVXnmvU0I1AVaM0ApDjpH39247EnN+6fcUMn6wvB+517ESNl25eXN4gbafJjcBbEmgiPq 6vulEeUmI9G1jRxlmYpomZJ6Qa5CC1sSC2tCeIWuXYAmwV2b031+5WTp/cQbqQW/f/k/Dq OEQPW/T7dUGyKmYgen0OETGPxRmK8kEmZecdeCpp5fw20J7Z+DCI7lT8Z5BDO0n1RA1/WS Ez/57UwPl5YKKgCrm9mJpuldRqcW5o5HQmSOKRl2UZe976dDjkQpt2QOsN8OnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698155521; a=rsa-sha256; cv=none; b=B3Nd4jyhh3/46RqkNLha26bXZjUOFuNhbP4MyVtddlWHGH8XW1+F6pJAvrU+O6ulEdECvT c9GKc0Z5aTznji7551F34afp9B3ffipKaFAel+O2V1gYFuT9oPBYnzymtTlOSmO8Q3j7YG CUAZVDnggRosEn7peuM+CN32ukLe+gVPwx+uboWZ8j2/efzUYZBElyxUbSBTQjBnioXW1W UsjLYR2I3eSgrsEio9QYkD3sDtuw2aUxgMmH03M4PaZf3eajSV87aT712u5jy+lxPZQ63x DjGHdpkVaPQeBiivH05k3VKE4g/KD0ToyY0OI+yKhwgXoTbkI5RsV8ADqs6neg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698155521; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w+zo5AmeUDm3gq8AMv38zluu55jfAy6d6igUZUH+n8k=; b=oRFEG0gi+R0F0klWf6ZzjnF7RV95CglDR8klMRrav7l4Tilmk0Tx8+EbNc9quEvMcMrVvQ VoaMlC0lbEmu07vgjQwBJ9SIfqOXEpkR8lfpMG5nyiFwHtUelajZq5p203zYVe4Vbqrp/a yrTn0BqYbWDQurCmexWsrStncKdeqVxV8Z5Lv2W6lg5hrPasTeTFUrtjgB4eyzsvmcfJKv 2VKLqQAsgHJ3qgaLxlmBYltD784/TpHPlsvj56D3kVol44maK792I2/nIOPddpK0ARAI1r j/STP4szg/VqeEdlq2BnTNAGSAIHhw0k/cY25IRV7ji+REdXO0vnvpXmAqYhuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFD4x3HbYz9f8; Tue, 24 Oct 2023 13:52:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39ODq1wU020865; Tue, 24 Oct 2023 13:52:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39ODq1LS020862; Tue, 24 Oct 2023 13:52:01 GMT (envelope-from git) Date: Tue, 24 Oct 2023 13:52:01 GMT Message-Id: <202310241352.39ODq1LS020862@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: 44f28069e2e5 - stable/14 - makefs: Explain the -d option List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: 44f28069e2e5ecbf402244816ec6cac03c7c0cf9 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=44f28069e2e5ecbf402244816ec6cac03c7c0cf9 commit 44f28069e2e5ecbf402244816ec6cac03c7c0cf9 Author: Greg Lehey AuthorDate: 2023-09-26 05:05:16 +0000 Commit: Ed Maste CommitDate: 2023-10-24 13:51:46 +0000 makefs: Explain the -d option (cherry picked from commit 915af883221a4982e89ef878f1def0899ccac283) --- usr.sbin/makefs/makefs.8 | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8 index 2ffa512a3b9e..5c3d88b4ac1b 100644 --- a/usr.sbin/makefs/makefs.8 +++ b/usr.sbin/makefs/makefs.8 @@ -113,7 +113,12 @@ Treat duplicate paths in an mtree manifest as warnings not error. Enable various levels of debugging, depending upon which bits are set in .Ar debug-mask . -XXX: document these +This option is intended for source debugging. +.Ar debug-mask +is a bit map defined in the header file +.Ar makefs.h . +See the source for usage, and look for defines starting with +.Ar DEBUG_ . .It Fl F Ar mtree-specfile .Em This is almost certainly not the option you are looking for. To create an image from a list of files in an mtree format manifest, From nobody Tue Oct 24 14:28:18 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFDtp2Gftz4y65c; Tue, 24 Oct 2023 14:28: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 4SFDtp1d4Lz4jvW; Tue, 24 Oct 2023 14:28:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698157698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VC8upt/jXSClGuwg4yoGThE+ME9HlP370AIuPU/Zta8=; b=XLxY4ohPJsRIHyGBdxiX03LXFkVEwyA3l8nfCd1itiu0069K6xK/0bmnoULDVGD+KvDIY2 Jn2tuh2bgBTuD4/edUZqCtb5TRPeEb49ruEC+W+VjsKJdM40uoAUO+GCx77B5QTF1ruPbu v4nGniFcj3w/2At/WDsCZHBekYR/K6aqMX/kvn9rkvmBkGhzjaWXve9ZKkAFJ4P70c0OvA uGozaLnGyDf6BaosNIRW5Skx/GNRnTqcoBcQaodXGQhkDqKEyqF1BeFMZCszizfyccNttw /njQNXMjDSLMdb8K4DIlZmYZgLWTJqg7dhYsWnAmJHIJ5laTxu9jXnsYe6cxhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698157698; a=rsa-sha256; cv=none; b=YJOT62r6vt7p9BkzXgLYHJDI5QIPyP8RBxKy01iPmqQ/K+qUST5IIqx37gTK6UQbu5QZiZ 6vplhtUfhmfoJCQ6xEZikNWfkjTdKzyo5Dl8BBLZLGoNNlcX3CCCPR4tSy4ZTXyCm9yiN6 6fDh1CHpV/P8vNeQMmClQNbvZwCSBhObdp47Gr5mLVUz8eYnKp0EmX6dWTr2xjgk7HNQu9 XsTbM3flMvL3g7S8F7249+itZ+GzSBibNJGCCHnAoTgdQf/cKd5+AVRtQ9Gty92V1k5Ub+ 5ndehQt73EHbOBmCZlefnQC1ifFwy85mq8e7phU97H+8SDWq6DKi0Kf+AcpBfQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698157698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VC8upt/jXSClGuwg4yoGThE+ME9HlP370AIuPU/Zta8=; b=Wy1rYfGFNcYXr8m5hM9hNhoVMAujqAkTa9J+IBEzOz9vIJa9Fw+zazqaUj91TXPFhT6GVD 2a5lzZHWutl6Oifzq07IN1I3X3oMM5Mnpetd0utfkECL6U3fHlP4vkf/dtXo8f1iVxgD9M Do2ZNvDmoB5vSXI4PggpSDZNVBye4u7leY2BSmqOVOU1biROJELvo7/DyoOk/a0BhoGSAf +C5LrbPFogK6nihFnpff4GI97PehGXi2SOYDYUyeYk6iv+qNS8t8quAQXn7LBfvyZC7E0R a7MC0EiFG2lagT8IoOeP0jU/5KvqMD8uaw8ubFK6aIHy0wC1CsPKKSQlJ2ALsw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFDtp0hDVzBrs; Tue, 24 Oct 2023 14:28:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OESITs072989; Tue, 24 Oct 2023 14:28:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OESInw072986; Tue, 24 Oct 2023 14:28:18 GMT (envelope-from git) Date: Tue, 24 Oct 2023 14:28:18 GMT Message-Id: <202310241428.39OESInw072986@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: 21a9924086c7 - stable/14 - socket tests: Build fix List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: 21a9924086c7884f4545b64a56180ef690047973 Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=21a9924086c7884f4545b64a56180ef690047973 commit 21a9924086c7884f4545b64a56180ef690047973 Author: Mark Johnston AuthorDate: 2023-10-17 14:21:32 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 14:28:11 +0000 socket tests: Build fix Fixes: d8735eb7acc0 ("socket tests: Add a regression test for ktrace+recv(MSG_TRUNC)") Reported by: Jenkins (cherry picked from commit 4bd1e19684945aa1fd3397b58613f5210fda9091) --- tests/sys/kern/socket_msg_trunc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/kern/socket_msg_trunc.c b/tests/sys/kern/socket_msg_trunc.c index 279170158643..ff0499c4540d 100644 --- a/tests/sys/kern/socket_msg_trunc.c +++ b/tests/sys/kern/socket_msg_trunc.c @@ -231,7 +231,7 @@ ATF_TC_BODY(recvmsg_trunc_ktrace_uio, tc) nbytes = read(fd, &ktr, sizeof(ktr)); ATF_REQUIRE_MSG(nbytes >= 0, "read failed: %s", strerror(errno)); ATF_REQUIRE((size_t)nbytes == sizeof(ktr)); - ATF_REQUIRE_MSG((ktr.ktr_type & ~KTR_TYPE) == KTR_GENIO); + ATF_REQUIRE((ktr.ktr_type & ~KTR_TYPE) == KTR_GENIO); ATF_REQUIRE(close(fd) == 0); ATF_REQUIRE(close(sd[0]) == 0); From nobody Tue Oct 24 14:28:42 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFDvH0wr8z4y6KY; Tue, 24 Oct 2023 14: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 4SFDvH0Fwnz4k0q; Tue, 24 Oct 2023 14:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698157723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yfzUhFypZCA6bPb9ydOY0TOHVbGAJkBxZjivk8YaXL4=; b=gOwHFeOKzxzMI6ujpoIYsMh5Pw32WyN9zvupxVjl1mg2ZBw3QFHbih9S3N5OoGoCmZg/eU IxNKpYoBhU3/cf2vwOGT/KT9Icfl8vkU1XV8wiL3Q/tsnVGy3ySDer4njJd6+fIJnq0Ut5 jHNzMYyYg0MsCTpzjGGdOQUHxLBQ5s0swAJgB+5XVgLzdDGvzjAR2060njFZGDvSDWdob4 PmhlRngnLUT4VosgRrCVKiLQNtzta2DnEy/NZffysRATTWWOedgCUlmHIFbHgZ6iIJpt75 iDXixU02nWjwjj+So7aLtobEdW3rqTMc6bUjQL/p2cjnuGj7jXq7nAtgsu4ZxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698157723; a=rsa-sha256; cv=none; b=tila/efX/HBH0tBF+OBTkK+S/fJ37SsWrovtX1QLmEml2sygYWqCzERJ5lafuCReLw+mHa 6L0lMtiRyiYKPVmNy10d3FTG4k0UpXrswnI4wGjoM3i/+e9Ugx4OG6dCMcaY5cBH63huRI 6f53+La41v/3PMKITmImZ0l/RkAsE0cOvJMl6CHCG6/52YqAeZ2kTZ38YZhbC8sPVUn5dn ui4a1JIjtyB/uW3JQRdOLU3RmjfM2L3rolZdTQC1ohZmMbjPqot3xA+e3GuGBHJUG/obYD ZU7Xh2hkys5US7VI48VBRISQ9/0HnSOXPXx8CCwtC3T/wVjv5yjoBdDMgEk+9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698157723; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yfzUhFypZCA6bPb9ydOY0TOHVbGAJkBxZjivk8YaXL4=; b=ZNp3sp+BFABRVUwn7rvq8SzDrpgfi5YfevqdOT5cjphX1JvrPLmnEdSSL7dGUUqZbJtAX0 MgHj5HnkgQu8NKnqVCHg3xDJ8SqqTawNqnRVXKjPGmz9DzWY5jXDTmOqKL5npm8+N/wPHf AZC2r5Bt55qMYWl7+A0SWTZbf6QdpAB8L3brqimn5NNsMyVcnt68APyH5Cp+6zSe30NU4+ adxrGWUPuVJCna/7gnKlUuWDzdsvqnSkTaZ0pw5zn/smiVA+RzyordHlWg43oIHwdcx33I xWdDlXAW9Is/Rnmle3qq5wOMD0wHTJYOQ1Lhav8zQg3k6NibUHkM3wjK7m77pw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFDvG6PTyzBpK; Tue, 24 Oct 2023 14:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OESgM3073177; Tue, 24 Oct 2023 14:28:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OESgtY073174; Tue, 24 Oct 2023 14:28:42 GMT (envelope-from git) Date: Tue, 24 Oct 2023 14:28:42 GMT Message-Id: <202310241428.39OESgtY073174@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: 1b07f630c11c - stable/13 - socket tests: Build fix List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: 1b07f630c11ccf899612a7d02777fe0855e3bb25 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1b07f630c11ccf899612a7d02777fe0855e3bb25 commit 1b07f630c11ccf899612a7d02777fe0855e3bb25 Author: Mark Johnston AuthorDate: 2023-10-17 14:21:32 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 14:28:34 +0000 socket tests: Build fix Fixes: d8735eb7acc0 ("socket tests: Add a regression test for ktrace+recv(MSG_TRUNC)") Reported by: Jenkins (cherry picked from commit 4bd1e19684945aa1fd3397b58613f5210fda9091) --- tests/sys/kern/socket_msg_trunc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/kern/socket_msg_trunc.c b/tests/sys/kern/socket_msg_trunc.c index 279170158643..ff0499c4540d 100644 --- a/tests/sys/kern/socket_msg_trunc.c +++ b/tests/sys/kern/socket_msg_trunc.c @@ -231,7 +231,7 @@ ATF_TC_BODY(recvmsg_trunc_ktrace_uio, tc) nbytes = read(fd, &ktr, sizeof(ktr)); ATF_REQUIRE_MSG(nbytes >= 0, "read failed: %s", strerror(errno)); ATF_REQUIRE((size_t)nbytes == sizeof(ktr)); - ATF_REQUIRE_MSG((ktr.ktr_type & ~KTR_TYPE) == KTR_GENIO); + ATF_REQUIRE((ktr.ktr_type & ~KTR_TYPE) == KTR_GENIO); ATF_REQUIRE(close(fd) == 0); ATF_REQUIRE(close(sd[0]) == 0); From nobody Tue Oct 24 14:37:40 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFF5c2pHBz4y6fw; Tue, 24 Oct 2023 14:37: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 4SFF5c2KXfz4kxJ; Tue, 24 Oct 2023 14:37:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3+5b5m+WmdkXExYsbl+IL3VIGK5piGngyxEuiKEpVB4=; b=nTSHYvdJ8pCDSGrVPSkCwzA8nVh+zWpW/O/JH65CJuFAC60ep7zWatm+ZQzwIAGzeuXiPK XXTPsCwzJOv31eSZcryXxtYmsk+iPNJ02MQuVEhFcXnXkhtCh6HxFhUQ26NoEXwnZr5Nx6 mFnfi/q70D0nylWaUzq/Wf0jgIH6OcbXZQY2oQ6yRW+f8zIy2Bmc1eeO/16udk6u4fA3NL +mBPKxgH2kJVTFZ9YTenJVdsOpplvYX2LI4tCJS48m/w9aaKycgsfVLtbatYiiIQNYIQ41 EtZVI4801fS5SnICBNStpk04vO0EJHlK2u6G+bzHBoa89V6BiHnC2gtohkQClw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698158260; a=rsa-sha256; cv=none; b=bkLuoKJgowmKTx9B7w4fGASSyr9WQNz31307LIIIst5ZyYASNu21prjfEl9w7IgenYGV3d nVkAKD/dCguv0ljmgItfa41gKj0vjf6cTZ2BD2VOu42k3qPQkKAI4ZPK/N5qylg/x6Z3zY lgZSFjig3uk3WAVBBhc5lWVgpY0HH4OWpZWQsTZ/R61zKleups910622I5fpEci2DNjnJT /bwK5mV1g3D2bkITVwbTtGFbZoChQYVQY9jsgc2L1J4XdRG/1vfkCjt3Zeb+lfSS0DGJvX mOBzuRxkiVvPnvgpJnhdiz/N9kAQtYhPckCJ5kOaWSofbjAI8PngvSjfzKCXuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158260; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3+5b5m+WmdkXExYsbl+IL3VIGK5piGngyxEuiKEpVB4=; b=bajm3grrEEw3y/NHv1t1y0b2FLCFljkg0Fpv6CWdRsI/kFHO8+7MiMyoLsHg4iGq2lIUSK WMpmyBHKMFcjqP/06RV60hnsT21FhmNPujMg9XM620hxn+7vSkb0G9xPxbd8RXJRzKLn5+ /HA1cGHh/gnVp0nd46drJrubU10hAUTKwrVEP/aBp6mAB1wxLUntBI5qr/keuLL31hM1U1 XwWQsShzB2kqPjGHy+9TecUOnzqkT0sMZKVqCmpqNKY02O5YupnBOcjCh1zWSrPQJtX93z hLt+xdIhAfTSorUwenX28Nhls6xDyN02GangI5q2kJLnuQi6Da265F3no/omxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFF5c156WzBy5; Tue, 24 Oct 2023 14:37:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OEbeF5089384; Tue, 24 Oct 2023 14:37:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OEbeQf089381; Tue, 24 Oct 2023 14:37:40 GMT (envelope-from git) Date: Tue, 24 Oct 2023 14:37:40 GMT Message-Id: <202310241437.39OEbeQf089381@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: c2ee9efb43ba - releng/14.0 - sctp: Various fixes for loader tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: c2ee9efb43bad6dca8af2f01938e23585736f651 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c2ee9efb43bad6dca8af2f01938e23585736f651 commit c2ee9efb43bad6dca8af2f01938e23585736f651 Author: Zhenlei Huang AuthorDate: 2023-10-09 04:36:48 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 14:35:50 +0000 sctp: Various fixes for loader tunables The following sysctl variables are actually loader tunables. Add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. 1. net.inet.sctp.tcbhashsize 2. net.inet.sctp.pcbhashsize 3. net.inet.sctp.chunkscale The loader tunable 'net.inet.sctp.tcbhashsize' and 'net.inet.sctp.chunkscale' are only used during vnet initializing, thus it make no senses to make them writable tunable. Validate the values of loader tunables on vnet initialize, reset them to theirs defaults if invalid to prevent potential kernel panics. Reviewed by: tuexen, #transport, #network Approved by: re (gjb) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42007 (cherry picked from commit dac91eb7660324677d8a2f71bd6f192422355ba1) (cherry picked from commit fd9de12a71109d1e3bb4b20e7d040fc9a1784dc2) --- sys/netinet/sctp_pcb.c | 8 ++++++++ sys/netinet/sctp_sysctl.c | 24 ++++++++++++++++++------ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/sys/netinet/sctp_pcb.c b/sys/netinet/sctp_pcb.c index 16cde18c4c1d..a1742b2fffca 100644 --- a/sys/netinet/sctp_pcb.c +++ b/sys/netinet/sctp_pcb.c @@ -5676,6 +5676,11 @@ sctp_startup_mcore_threads(void) } #endif +#define VALIDATE_LOADER_TUNABLE(var_name, prefix) \ + if (SCTP_BASE_SYSCTL(var_name) < prefix##_MIN || \ + SCTP_BASE_SYSCTL(var_name) > prefix##_MAX) \ + SCTP_BASE_SYSCTL(var_name) = prefix##_DEFAULT + void sctp_pcb_init(void) { @@ -5717,6 +5722,9 @@ sctp_pcb_init(void) TUNABLE_INT_FETCH("net.inet.sctp.tcbhashsize", &SCTP_BASE_SYSCTL(sctp_hashtblsize)); TUNABLE_INT_FETCH("net.inet.sctp.pcbhashsize", &SCTP_BASE_SYSCTL(sctp_pcbtblsize)); TUNABLE_INT_FETCH("net.inet.sctp.chunkscale", &SCTP_BASE_SYSCTL(sctp_chunkscale)); + VALIDATE_LOADER_TUNABLE(sctp_hashtblsize, SCTPCTL_TCBHASHSIZE); + VALIDATE_LOADER_TUNABLE(sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE); + VALIDATE_LOADER_TUNABLE(sctp_chunkscale, SCTPCTL_CHUNKSCALE); SCTP_BASE_INFO(sctp_asochash) = SCTP_HASH_INIT((SCTP_BASE_SYSCTL(sctp_hashtblsize) * 31), &SCTP_BASE_INFO(hashasocmark)); SCTP_BASE_INFO(sctp_ephash) = SCTP_HASH_INIT(SCTP_BASE_SYSCTL(sctp_hashtblsize), diff --git a/sys/netinet/sctp_sysctl.c b/sys/netinet/sctp_sysctl.c index 851ed408092b..2c2cc58ee086 100644 --- a/sys/netinet/sctp_sysctl.c +++ b/sys/netinet/sctp_sysctl.c @@ -867,6 +867,14 @@ sctp_sysctl_handle_trace_log_clear(SYSCTL_HANDLER_ARGS) #endif #define SCTP_UINT_SYSCTL(mib_name, var_name, prefix) \ + SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, \ + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW); + +#define SCTP_UINT_SYSCTL_TUN(mib_name, var_name, prefix) \ + SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, \ + CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RWTUN|CTLFLAG_NOFETCH); + +#define SCTP_UINT_SYSCTL_FLAG(mib_name, var_name, prefix, flags) \ static int \ sctp_sysctl_handle_##mib_name(SYSCTL_HANDLER_ARGS) \ { \ @@ -885,9 +893,13 @@ sctp_sysctl_handle_trace_log_clear(SYSCTL_HANDLER_ARGS) } \ return (error); \ } \ - SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mib_name, \ - CTLFLAG_VNET|CTLTYPE_UINT|CTLFLAG_RW, NULL, 0, \ - sctp_sysctl_handle_##mib_name, "UI", prefix##_DESC); + SYSCTL_PROC(_net_inet_sctp, OID_AUTO, mib_name, flags, \ + NULL, 0, sctp_sysctl_handle_##mib_name, "UI", prefix##_DESC) + +#define SCTP_UINT_SYSCTL_RDTUN(mib_name, var_name, prefix) \ + SYSCTL_UINT(_net_inet_sctp, OID_AUTO, mib_name, \ + CTLFLAG_VNET|CTLFLAG_RDTUN|CTLFLAG_NOFETCH, \ + &VNET_NAME(system_base_info.sctpsysctl.var_name), 0, prefix##_DESC); /* * sysctl definitions @@ -909,10 +921,10 @@ SCTP_UINT_SYSCTL(peer_chkoh, sctp_peer_chunk_oh, SCTPCTL_PEER_CHKOH) SCTP_UINT_SYSCTL(maxburst, sctp_max_burst_default, SCTPCTL_MAXBURST) SCTP_UINT_SYSCTL(fr_maxburst, sctp_fr_max_burst_default, SCTPCTL_FRMAXBURST) SCTP_UINT_SYSCTL(maxchunks, sctp_max_chunks_on_queue, SCTPCTL_MAXCHUNKS) -SCTP_UINT_SYSCTL(tcbhashsize, sctp_hashtblsize, SCTPCTL_TCBHASHSIZE) -SCTP_UINT_SYSCTL(pcbhashsize, sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE) +SCTP_UINT_SYSCTL_RDTUN(tcbhashsize, sctp_hashtblsize, SCTPCTL_TCBHASHSIZE) +SCTP_UINT_SYSCTL_TUN(pcbhashsize, sctp_pcbtblsize, SCTPCTL_PCBHASHSIZE) SCTP_UINT_SYSCTL(min_split_point, sctp_min_split_point, SCTPCTL_MIN_SPLIT_POINT) -SCTP_UINT_SYSCTL(chunkscale, sctp_chunkscale, SCTPCTL_CHUNKSCALE) +SCTP_UINT_SYSCTL_RDTUN(chunkscale, sctp_chunkscale, SCTPCTL_CHUNKSCALE) SCTP_UINT_SYSCTL(delayed_sack_time, sctp_delayed_sack_time_default, SCTPCTL_DELAYED_SACK_TIME) SCTP_UINT_SYSCTL(sack_freq, sctp_sack_freq_default, SCTPCTL_SACK_FREQ) SCTP_UINT_SYSCTL(sys_resource, sctp_system_free_resc_limit, SCTPCTL_SYS_RESOURCE) From nobody Tue Oct 24 14:37:41 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFF5d3zrMz4y6m6; Tue, 24 Oct 2023 14:37: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 4SFF5d37fQz4kmp; Tue, 24 Oct 2023 14:37:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oVj4i7qOuQoiVh4d1R3EHcINRBzBZ3813IzNFsroVKg=; b=VxmmCPB9ax+4zSoPo27x2kyY05ncEmxoAV4VAoxEyXsxoG0YW446xrTPShOjV6eewPpnZz lGPUdTSrY4k/VsYGub6+28cWfaFERcAQhxU6Ob1prDYWxHGHYZdIHZkZ8HDTJHifCvFB0n f3xfXsGMLezzfQlJ5znzh4t2hgwP1+wTrCQJR45PcjTJmfzNLM5e2yFNMCkJw8E//z/gD8 YaZgNTmg8hSp5dtUq2vV0a0irYiUverZDGhCIZ0PCL8hcoSv4UVTDbi4xrGxtPsME0t0LT LGMw7KPuF5hotrJqyyVwyCPakx4EQlxzqFUCsJBt62Vxptbr5WY2D6eUWV9HTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698158261; a=rsa-sha256; cv=none; b=rjqu/z3W/JtCC2VrZIZZ8FnCANv2Bft2deb5WJEy/CUTN0gtzmxMB3bG5MoXe+1pPcCzSY xdZ9zm9ttfSaktHgre2IkVj377OSD1zh/JhimyJJHp1z8jxcJ47Z49+iwkvMrF2LVFD3Ye R+s6gLWnbKZ4ElvZkKwm9sDNI0HnVfhIiMQyoPMd9oB8Ryt4yewxTUv34SQrZ9Ylb4Nyz+ ujub3IiBLiyahVSMvdMIgfdaEkJXYC3kiRj8prdcOEpb1Hp84I/BBAPXDJHGE2ViqDI8pl wIVJi2Sv6AHt/JPx79xo1vOp53QSUJuAnmE51/ZtOaN39xOBtfuTUuxt+lNqUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158261; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oVj4i7qOuQoiVh4d1R3EHcINRBzBZ3813IzNFsroVKg=; b=McIXX9w/fizzZ2S++bmFbD+qSZLZGE5AlnXg9PnGfOpMKru31tF75gLb58+0YEA3eYHMYt Qlpc6VC5rOJ6MkD+G02lxcjkCPEKrpkCuW/uhlCCjkpAMpru6mPaP93a4tdkA9XlMLMkfB sbUsKNkgtNAseYTk8+hM5DR+dEfSp7oLL9IK42QUfKcAophGvguiOB+uoRHOAbHmZ4Y72n 2+PrP0cZt5HVxInLlf1z55hNQt+qtxuekJ4DXfc3GhhF5/tzTg6vQah17XzBm72sA3iKXW lZlwatIkrk+vU/x4UkYnZVq2FmIAjmp24WTdZSWnXayT2YELc131H6oLEQaRlg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFF5d24NmzBvx; Tue, 24 Oct 2023 14:37:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OEbffF089444; Tue, 24 Oct 2023 14:37:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OEbfkB089441; Tue, 24 Oct 2023 14:37:41 GMT (envelope-from git) Date: Tue, 24 Oct 2023 14:37:41 GMT Message-Id: <202310241437.39OEbfkB089441@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 423bb3869b71 - releng/14.0 - boottrace: Add corresponding sysctl knob for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 423bb3869b71c7e068fc89740c9d6cfdb9cb7be1 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=423bb3869b71c7e068fc89740c9d6cfdb9cb7be1 commit 423bb3869b71c7e068fc89740c9d6cfdb9cb7be1 Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:48 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 14:35:50 +0000 boottrace: Add corresponding sysctl knob for loader tunable The loader tunable 'kern.boottrace.table_size' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj Approved by: re (gjb) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 (cherry picked from commit 51dc362d1a148362dc4cfacaa3629db928523204) (cherry picked from commit c525ec74b44f471261b0e67eaa254e05fdef3d05) --- sys/kern/kern_boottrace.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/kern/kern_boottrace.c b/sys/kern/kern_boottrace.c index cb013d4e8be1..86fee4f47fbe 100644 --- a/sys/kern/kern_boottrace.c +++ b/sys/kern/kern_boottrace.c @@ -158,6 +158,10 @@ SYSCTL_INT(_kern_boottrace, OID_AUTO, shutdown_trace_threshold, CTLFLAG_RWTUN, &shutdown_trace_threshold, 0, "Tracing threshold (ms) below which tracing is ignored"); +SYSCTL_UINT(_kern_boottrace, OID_AUTO, table_size, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &bt.size, 0, + "Boot-time tracing table size"); + /* * Dump a trace to buffer or if buffer is NULL to console. * From nobody Tue Oct 24 14:37:42 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFF5f5HS4z4y6m8; Tue, 24 Oct 2023 14:37: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 4SFF5f4M5Vz4l1p; Tue, 24 Oct 2023 14:37:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZv9DVCFIsGTkOkdS+jNfpn6bbhJdPkPbnerbB8qY1g=; b=Lgu5U2yh2qsfBUlTPZuVXvFsa6CHyTR8JXAUs51GW4UDQH2jvDdctuAAovFLMtAJa/4Xxd ghoClcukXSfao/HD9Glxv2bCr1q7UQGye07RaCH05wJ27Fk2PoUwu4iMUvQxTLwL8w1uvO PEkEzY7rgfa36hn4MoUoH4GxerS4TQO+dVGeWsEmUnb0Juhx3S2XVxHt/txnVyufTngta3 wvyUyRr8TosecYV5ssoEwE5dqNR/51IN7EjLFuA8KHt3Y1aM8GQ06M5jAABCrY+NHiGUX9 fRpGo3hcolDaPUGibItLzXEDOx7GHRSIIC9WtU/pa8dxNcODyeCs3F+8vWSkCg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698158262; a=rsa-sha256; cv=none; b=OCfz/KMz6F89/CmP6/VJIT+b5qO9CTVveUx5aLgQXlK1TBgksYCuVb5WNLcTHBDc9o9DB2 GCf3l6tVzsimDwp4CRYXBazG34emktzc/rpiVAkGwgLY6E9MyVEfis6LNRzMcSBT1ZXLxY RAFCKDvab7z5lBwScOdVCqdS+dym/kfB+WRPJvJIzaGF3Y9oyZ4AmbqaYLtLQf5TwW6phW VmjBPSdoEmECaT7SYiA98aYLciwLQ1sT0JAZ7AlWVecmpq2mcueTeK443yhFxm1B/H0/bv bhWIFpzu4k4UgvItDSqnWW9+KT3bpHzj/Q7nZEawL2MWK8FbgDHY7tVZ+L9yUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158262; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hZv9DVCFIsGTkOkdS+jNfpn6bbhJdPkPbnerbB8qY1g=; b=Gb5f+Rw24AKkUkJsi3CFFRUGddpupm+ghNa25lVitaY5uuThprJ7LPCfRiEP5gdgj7wnud FICyeLAx3ay484lu/bcce3IOIp9glybMZgvHwi39ca7LygNNtwfxxFQW9hieJy6F6iijPH sRNCfglMXotvzDkx6T08Gfm+S/TZiTBEwzCpSaFvfZFDHZKf/9uO3Ua8T3HAbfHgSkm25i KDsmD0sNRGOoljMIBwuVa3mwxPhl+e6U/XKZZzI5ihpT10ZxSzT1J7F9J8iwCRhupwFXxx +OYp9L/zA3nOPDXB07lFMMGKZdQmD9os8TLiBYsP1G0EjZLgoS18J5pmRWeY6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFF5f31p0zBt0; Tue, 24 Oct 2023 14:37:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OEbgeN089495; Tue, 24 Oct 2023 14:37:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OEbgls089492; Tue, 24 Oct 2023 14:37:42 GMT (envelope-from git) Date: Tue, 24 Oct 2023 14:37:42 GMT Message-Id: <202310241437.39OEbgls089492@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 5edc166571c4 - releng/14.0 - kasan: Add corresponding sysctl knob for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 5edc166571c44e61140e3b0cc8105c2a63bd47a4 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=5edc166571c44e61140e3b0cc8105c2a63bd47a4 commit 5edc166571c44e61140e3b0cc8105c2a63bd47a4 Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:48 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 14:35:51 +0000 kasan: Add corresponding sysctl knob for loader tunable The loader tunable 'debug.kasan.disabled' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj Approved by: re (gjb) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 (cherry picked from commit db5d0bc868be669ed6588ebeccf8c02e76aabc41) (cherry picked from commit 6f8ef4d6e44ee27a08c14ab6a892ffccf332bcf7) --- sys/kern/subr_asan.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/kern/subr_asan.c b/sys/kern/subr_asan.c index 44c96435a499..c3664d9cf6c2 100644 --- a/sys/kern/subr_asan.c +++ b/sys/kern/subr_asan.c @@ -92,7 +92,10 @@ SYSCTL_INT(_debug_kasan, OID_AUTO, panic_on_violation, CTLFLAG_RDTUN, &panic_on_violation, 0, "Panic if an invalid access is detected"); -static bool kasan_enabled __read_mostly = false; +#define kasan_enabled (!kasan_disabled) +static bool kasan_disabled __read_mostly = true; +SYSCTL_BOOL(_debug_kasan, OID_AUTO, disabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &kasan_disabled, 0, "KASAN is disabled"); /* -------------------------------------------------------------------------- */ @@ -136,7 +139,7 @@ kasan_init(void) kasan_md_init(); /* Now officially enabled. */ - kasan_enabled = true; + kasan_disabled = false; } void @@ -180,7 +183,7 @@ kasan_code_name(uint8_t code) #define REPORT(f, ...) do { \ if (panic_on_violation) { \ - kasan_enabled = false; \ + kasan_disabled = true; \ panic(f, __VA_ARGS__); \ } else { \ struct stack st; \ From nobody Tue Oct 24 14:37:43 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFF5h1BTXz4y6Ln; Tue, 24 Oct 2023 14:37: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 4SFF5g4wMLz4l2D; Tue, 24 Oct 2023 14:37:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P507d6Lj+1sRsXDjVxgWlWxf+e44ep4OyaBX6uNTAXI=; b=rHldZcaUFEFbLQVjBHKjedppA7JHQWJf506S1bFHk6u1lQqQCcMSpfKsqNY8AZxpSovk+z jmqZLPf/YY1UReCSLtd7g82nfZcSSwefQGCiAitRf6aIMxjE0WMQfY2jAN0jegWYJQqKg/ fTtOCEwEWpaCRPpKQKjUr4eyX7oDDz0sKnvLeTEj9o6SGPZmgy+szI3tUhh82jGWBAxGYn wmFpuWL8cMvVz1xuciBbt2t1XZaBtjG6ABxaHAHmsul/XorYcEPOa/QswGYwJScQSUiWVn n9i2JX0bswljsVzyOhfN79m2rN9CN8PHPA/lDrFPWPeQIUtaVwRaTcIWO2qW3A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698158263; a=rsa-sha256; cv=none; b=c1NR2Bfz/VHnD0DkhOOKV83uG3wWmNLnRLyo+fYlVTeNvw+cyXcW/UCDRFONeogM0QYk5h 5+ohg5BNFr9W/hE3lzibvJ/3YXFBTejOfyT5o1Y0ZRdJOMYK8YuugPExFEp8AXvoykY7W1 cVFZMb/p58fjzOa1lU4bHm8zKbdCTU0ep5Wauu7OXoBRyPzkePpSJi0AigiCovD0Eflgbx Q5lYYeDNQkeAYeRJ57FcOTYRHaR8Jh+YSx4dhWhQWANDpEDXR1QIbCSG1TVtYy0vToKhvQ xwdw9YMBgrVgqOKywNtWiq30lBMCzRxSfACXpFiQZy5wdeNX1hvlz29G/OYnkQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P507d6Lj+1sRsXDjVxgWlWxf+e44ep4OyaBX6uNTAXI=; b=OGwymgnusvt1QX7H8RDTzKNY/Nt0wRU7kpmmmXDQhYiYVpUnSR39S8jzdz+cI/gEMck/3Y kZ9rKgFHJ0pIJUcpMXw06GotishGLi7YH80iViUKL6ptyX4Gml/t+yk7fLYd5EQ5OBPqdP c3m1YkdM37cXLWqgQuRTh6jahzuJ4TMObIy+f7r30mYLhpyo+LgZV/WQT67tQQMwmokq7A g1MvG1R+FqYTlH2apRd+VG75YWahjepODWgaSeUrpoptkTRmIiYMe7afbZBL4UvBKVaDZx ettnFmOS7jlxOeb7jT1qZioQXwruMKPrPG2nNI5s6/8o5kci9d12BSwR/SK3Eg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFF5g42DQzBy6; Tue, 24 Oct 2023 14:37:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OEbhlM089546; Tue, 24 Oct 2023 14:37:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OEbhvV089543; Tue, 24 Oct 2023 14:37:43 GMT (envelope-from git) Date: Tue, 24 Oct 2023 14:37:43 GMT Message-Id: <202310241437.39OEbhvV089543@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 8cb6243c3085 - releng/14.0 - kmsan: Add corresponding sysctl knob for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 8cb6243c3085b43e82096c775d8059ca61461318 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=8cb6243c3085b43e82096c775d8059ca61461318 commit 8cb6243c3085b43e82096c775d8059ca61461318 Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:49 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 14:35:51 +0000 kmsan: Add corresponding sysctl knob for loader tunable The loader tunable 'debug.kmsan.disabled' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj Approved by: re (gjb) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 (cherry picked from commit 1d2b743784f7527a6840fe35ddb7e34cd41bc17a) (cherry picked from commit 1b289728e93d1000e6ca03354c8bc4209ea8da51) --- sys/kern/subr_msan.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/sys/kern/subr_msan.c b/sys/kern/subr_msan.c index 57caeb454b42..54948370a14a 100644 --- a/sys/kern/subr_msan.c +++ b/sys/kern/subr_msan.c @@ -108,15 +108,13 @@ static uint8_t msan_dummy_shad[PAGE_SIZE] __aligned(PAGE_SIZE); static uint8_t msan_dummy_write_shad[PAGE_SIZE] __aligned(PAGE_SIZE); static uint8_t msan_dummy_orig[PAGE_SIZE] __aligned(PAGE_SIZE); static msan_td_t msan_thread0; -static bool kmsan_enabled __read_mostly; - static bool kmsan_reporting = false; /* * Avoid clobbering any thread-local state before we panic. */ #define kmsan_panic(f, ...) do { \ - kmsan_enabled = false; \ + kmsan_disabled = true; \ panic(f, __VA_ARGS__); \ } while (0) @@ -142,6 +140,11 @@ SYSCTL_BOOL(_debug_kmsan, OID_AUTO, panic_on_violation, CTLFLAG_RWTUN, &panic_on_violation, 0, "Panic if an invalid access is detected"); +static bool kmsan_disabled __read_mostly = true; +#define kmsan_enabled (!kmsan_disabled) +SYSCTL_BOOL(_debug_kmsan, OID_AUTO, disabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &kmsan_disabled, 0, "KMSAN is disabled"); + static MALLOC_DEFINE(M_KMSAN, "kmsan", "Kernel memory sanitizer"); /* -------------------------------------------------------------------------- */ @@ -599,7 +602,7 @@ kmsan_init(void) thread0.td_kmsan = &msan_thread0; /* Now officially enabled. */ - kmsan_enabled = true; + kmsan_disabled = false; } /* -------------------------------------------------------------------------- */ From nobody Tue Oct 24 14:37:44 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFF5j0GWgz4y6s2; Tue, 24 Oct 2023 14:37: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 4SFF5h5z33z4l8g; Tue, 24 Oct 2023 14:37:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RzFKzjGVZk439L/UR/+PR2cHpVQASDYHlIrlcM5Yq6Y=; b=byiLmmUUVT8kzm6ZThSp+d61Qd1ZkdA1GBbWE/Ef4Ry8n97D7XCxCGH00mRW4Qi/Qw5bng BtH4GjlvEcLxS8r2CD26I0WnCV6X4KWx6Qm2Ak4YGlVVTY50PjFiw/u7UIDenS6KNFoGqR KPYTU9wi0fgNlwA3yDLnQuyoMcxHKqteS0/QwnJ19oyGXd1zXFr7QcgbvrEFy0ChIe263B rs0n6evF3o4QF7UEj/5QBGOZxBV7FFO1+1I8gVnME88NXrDc2MgpbB0Y0fHyLr3qQNL3ru EIhCxPUszvhLv+TyfCTrWHYdO72uPuGnVFImxaFcGJRLwjlt3DuArVrqhgI+aA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698158264; a=rsa-sha256; cv=none; b=Q3FgRLuKWb93mCQV4KgPBMcRZ+ITawiCQ0o8klHEWHSpAmuRouBe4OmmyX1+MIMCqRnhDH jZgGPusdA9ixEwQfB/cWrWA15CQJxIYEweEdtKkg0eQobkX0Z0e3mv0KMAHwwWfC8hqzn6 h2UcEUZ2edachAU/z7Rk3GtkiC7wG2AN+LnMbfy1Hmnz7FiDIHQYgMWAfGQBrLobJ1fH8O +q3ilIGzXNTrLNHtV8TKQGVkdk6y0lxsxfwRODdtqyjXa7pdeDicTTcQvmmmI4mTU+hyuy t4k4ylFccYntCgYRfkG3sh1a137fHd/M5SU8X559Pbh522htCZWT+3uexN9eXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158264; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RzFKzjGVZk439L/UR/+PR2cHpVQASDYHlIrlcM5Yq6Y=; b=Kjcfj4p7tdIWk03zXbFnxVwULPMnejYE4zi0XZFr1ptSJX3kKlzeK3O3so4bsteZaVzaTn Y67oA135FFMKMCuFhEV2hXG4m8zd5a9Vy2yAp6jN3aQIPK57Ft5qo1QC8zYpbbIWaqweNa SQxpC+qTb8rFPQUrqkziZ7zmR+qV8GO44wapZlgFsA0MC3VXHGImneWRjlKb8cJDuob2pS CbudO53E+Wh3mVdp9zrBA2tQlaJB7hTaFgnLB3kdkQOYO74eAGBulGGvpNrx/+qG6HbgTI R1y4xAduMhP/Q9YuK1a7c/DHUGQKO5z+kh1/becGerV7KbTWzN1EedNmbHXp4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFF5h54XgzBt1; Tue, 24 Oct 2023 14:37:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OEbiD0089597; Tue, 24 Oct 2023 14:37:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OEbiFH089594; Tue, 24 Oct 2023 14:37:44 GMT (envelope-from git) Date: Tue, 24 Oct 2023 14:37:44 GMT Message-Id: <202310241437.39OEbiFH089594@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 5c23cc232716 - releng/14.0 - vm_page: Add corresponding sysctl knob for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 5c23cc232716a56d789a6c89681d520fcddc1696 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=5c23cc232716a56d789a6c89681d520fcddc1696 commit 5c23cc232716a56d789a6c89681d520fcddc1696 Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:49 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 14:35:51 +0000 vm_page: Add corresponding sysctl knob for loader tunable The loader tunable 'vm.pgcache_zone_max_pcpu' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj Approved by: re (gjb) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 (cherry picked from commit a55fbda874db31b804490567c69502c891b6ff61) (cherry picked from commit cb5bc8a748dfefc68e3905e8fdf17e0484844383) --- sys/vm/vm_page.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index 4f3c4ba2d4d7..8496a39154de 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -198,6 +198,11 @@ vm_page_init(void *dummy) bogus_page = vm_page_alloc_noobj(VM_ALLOC_WIRED); } +static int pgcache_zone_max_pcpu; +SYSCTL_INT(_vm, OID_AUTO, pgcache_zone_max_pcpu, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &pgcache_zone_max_pcpu, 0, + "Per-CPU page cache size"); + /* * The cache page zone is initialized later since we need to be able to allocate * pages before UMA is fully initialized. @@ -209,9 +214,8 @@ vm_page_init_cache_zones(void *dummy __unused) struct vm_pgcache *pgcache; int cache, domain, maxcache, pool; - maxcache = 0; - TUNABLE_INT_FETCH("vm.pgcache_zone_max_pcpu", &maxcache); - maxcache *= mp_ncpus; + TUNABLE_INT_FETCH("vm.pgcache_zone_max_pcpu", &pgcache_zone_max_pcpu); + maxcache = pgcache_zone_max_pcpu * mp_ncpus; for (domain = 0; domain < vm_ndomains; domain++) { vmd = VM_DOMAIN(domain); for (pool = 0; pool < VM_NFREEPOOL; pool++) { From nobody Tue Oct 24 14:37:45 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFF5k0YpZz4y6Vd; Tue, 24 Oct 2023 14:37: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 4SFF5k02fCz4l7Z; Tue, 24 Oct 2023 14:37:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HZntKxgo+ErB8a+7esWlYNUeoTL7hhByzh9WCjEDdno=; b=eaYGDddSAqqy9PMYsr+hp3PWkhBqoRAfNBAZr39YCdvo4Odlzfr5t8/IH52C072MjuYuhc o0Oo62FA9TfGfVtOO5Xe7+afPtQT14JJFLEo3q5YJ7A57Evl1AnLS+Eeo3oCxRPMKZ9Ik8 La9WBV7jv/JE+D/KnMVNevFmpIf4GfRdITnmcLv1EHxuKcIJhDnMg9c2YDYEzwEieB6SlU viH9ruchPnmEFo7bdeBGwqTX3dC35QkJ2wKiQNwUfVjJ/8vRSETbM+jGWNAkTg6nQFGl+z pe8a27c1ksvO0wahSRTZ2hVLWVdjB7eXwWjZqMvLqFzuDaJTCJdLwFn4XMyAFg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698158266; a=rsa-sha256; cv=none; b=L7CYgpjpRpt44yMKpkYd3Chfz69ftQYa0dC5/CWwymeSptlhjVJXLL6GJty3X2xVhAG1S7 lwdhRelV2HQhbWXaejIeyVh5uFzNMjom3AUXvDltksEEairYwzjIqm2Z66Zyv9UUqIkGVN 7FTZWYhtX2toOrvA7KMp5lZTllU2/DtXx2lyu6PD6BeQLBkbmDohAMIdg9aTZLwnnQ4l/p yAC+VlVGbTciK4jucCgVxMzaOddrZ+vednppL16WLzdobhFvDorAN01BrpB2jKlM75dUQA 4JRPgEL78Db9orSfFlZyCfb+ip0H+miphNVTM7BrqU01cGB2OMMg4RncN3+ibQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158266; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HZntKxgo+ErB8a+7esWlYNUeoTL7hhByzh9WCjEDdno=; b=wDJH9JD/ExGtBy1evHsogVulGdPGHeFa2ADmN8S2C6SqtnO++iLLEXo1fARGbU4XtNkW0J FeHo9N9IWSZK3igJrdeaele63nYUbVmIkDFVMcCoMTXLrLXT1y0Yuc+OpD8jTHbc4Ygs70 mw+hgHRO4Q+3JC5ILaRdbKePf8+MQK1MO3CC+lorLR/sEB4QgfHu0n2jq6X/cRaO834UTj jHPpVdKlBJV2pUEaVWCPsPEzop49tt7WqLo+wwML6yVNmLWgomViHeh3SdUxoCUINs6wUc OdDZH8slpjCR05igEF2Vsi7GJHwunjv0W8mFn0hUEqKIRr8X0g5EChiX7//c0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFF5j69lczC94; Tue, 24 Oct 2023 14:37:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OEbjZ1089648; Tue, 24 Oct 2023 14:37:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OEbjRg089645; Tue, 24 Oct 2023 14:37:45 GMT (envelope-from git) Date: Tue, 24 Oct 2023 14:37:45 GMT Message-Id: <202310241437.39OEbjRg089645@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 00b630cf6262 - releng/14.0 - vm_phys: Add corresponding sysctl knob for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 00b630cf6262bfc4ec0a434976c6544c57dc3e04 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=00b630cf6262bfc4ec0a434976c6544c57dc3e04 commit 00b630cf6262bfc4ec0a434976c6544c57dc3e04 Author: Zhenlei Huang AuthorDate: 2023-10-12 10:14:49 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 14:35:51 +0000 vm_phys: Add corresponding sysctl knob for loader tunable The loader tunable 'vm.numa.disabled' does not have corresponding sysctl MIB entry. Add it so that it can be retrieved, and `sysctl -T` will also report it correctly. Reviewed by: markj Approved by: re (gjb) MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D42138 (cherry picked from commit c415cfc8be1b732a80f1ada6d52091e08eeb9ab5) (cherry picked from commit e26b7e8d02f648623ad343016533487634a16698) --- sys/vm/vm_phys.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/sys/vm/vm_phys.c b/sys/vm/vm_phys.c index 108297caac49..bc992bdfc58b 100644 --- a/sys/vm/vm_phys.c +++ b/sys/vm/vm_phys.c @@ -76,6 +76,12 @@ _Static_assert(sizeof(long long) >= sizeof(vm_paddr_t), #ifdef NUMA struct mem_affinity __read_mostly *mem_affinity; int __read_mostly *mem_locality; + +static int numa_disabled; +static SYSCTL_NODE(_vm, OID_AUTO, numa, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, + "NUMA options"); +SYSCTL_INT(_vm_numa, OID_AUTO, disabled, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, + &numa_disabled, 0, "NUMA-awareness in the allocators is disabled"); #endif int __read_mostly vm_ndomains = 1; @@ -627,15 +633,14 @@ vm_phys_register_domains(int ndomains, struct mem_affinity *affinity, int *locality) { #ifdef NUMA - int d, i; + int i; /* * For now the only override value that we support is 1, which * effectively disables NUMA-awareness in the allocators. */ - d = 0; - TUNABLE_INT_FETCH("vm.numa.disabled", &d); - if (d) + TUNABLE_INT_FETCH("vm.numa.disabled", &numa_disabled); + if (numa_disabled) ndomains = 1; if (ndomains > 1) { From nobody Tue Oct 24 14:37:46 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFF5l1YQMz4y6Vj; Tue, 24 Oct 2023 14:37: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 4SFF5l0xCzz4lBK; Tue, 24 Oct 2023 14:37:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ePjS6KX5bmTdl5s8N5HIm1jokUc6BSoWVpU2hiUstWI=; b=wyjMlIRwmBExm1QK2xlVn6hI7iLhFNYVnj0Sx5x/AN9s7+bHqGvPeb8Rg2QVR5+D9sHgdJ qyIfs2i9CFFysj7XUmx9ErfbT51xVVIRYZnC5EK9uheoSNCFBTCGRhu/Ka5elx3Zowaqkm 7W/4/2dtRVcToFkH5XAajTLzw8f3T/ir/Thd61oSEcppoVXo5UhG4kahjVgBEys2uTXy8i 6na8VZNVQ27TdPWzrsJIyUFSpObV7LI/QCUJQ8akr8a+ZlICVbT2ea0/5yfnwlOkFnvF0P j9KFalBmGYxoqxObKMNJXCyaMR7tbXPapHaK2CwSsyENuHtHgZIndyZKZzHcaA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698158267; a=rsa-sha256; cv=none; b=tXbsjYiH7gaezP8qPpN3BVUn4IQ6oLKDX9+lX7v91ZZx5vVVCcZrPtlv6y6lxXcZAH3tam MFJrZpc4/XseRNikhpdx31PgAB9MPGiQfejCJyuRoZa8STBI8z0r34LcHMch9w+hR0oloB MEvyCmzpehT93gguxOffSgVjoZKLKuvJXn88DpyYOicXGEdd955JFsBXt3GbtNt9pb33xw 7e+ihHSKVz2Ef6v4P6JqX+LThGufVNqf6sDRUnh/7p6gNO2+xjT5s5obMxAVfJrUIzNqkf kiurV6d+s/dVOsDLUqbKhtjjS5odyoC2OoZ+MNsseUx4fOvDsxjn2QR3HBCSCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ePjS6KX5bmTdl5s8N5HIm1jokUc6BSoWVpU2hiUstWI=; b=Bnvn1y5IUYfNtY7cL62lWoUMybQdK+qUH3Nu9jtvapIXC7AjGE5tLIAJLw2fAWBM+zxzlE fkqLg0or7RPEiQ+85uz8MCmApH1XTTEwYHaLujm5XoG39X59IUCjijEfmK5UfBj4QOXGQZ fyO6M0lzOHXPqIzu/ij/x5w6dQ5zyxbrMo0UIrxDCJvot5XIIatIRrJTq7MgkHS6PD5WRU 5xGV3Q7bdNNeiOMUv3vzM9KvdJ5JBctE3XPubequshYTMTNm+aQAhL1KSmcHmOZXs+Y9Kv tFum2JA26z9UZcIihFOSdXg/E2fmWUM2308o3xuPUFN39elPYbaV/pQ1k05FJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFF5l02lTzBt2; Tue, 24 Oct 2023 14:37:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OEbkk8089703; Tue, 24 Oct 2023 14:37:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OEbk5b089700; Tue, 24 Oct 2023 14:37:46 GMT (envelope-from git) Date: Tue, 24 Oct 2023 14:37:46 GMT Message-Id: <202310241437.39OEbk5b089700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: ecadbb2905b4 - releng/14.0 - vmx: Prefer consistent naming for loader tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: ecadbb2905b41f288ee239d40c64f8be6a27eb62 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=ecadbb2905b41f288ee239d40c64f8be6a27eb62 commit ecadbb2905b41f288ee239d40c64f8be6a27eb62 Author: Zhenlei Huang AuthorDate: 2023-10-19 17:18:25 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 14:35:51 +0000 vmx: Prefer consistent naming for loader tunables The following loader tunables do have corresponding sysctl MIBs but with different names. That may be historical reason. Let's prefer consistent naming for them so that it will be easier to read and maintain. 1. hw.vmm.l1d_flush -> hw.vmm.vmx.l1d_flush 2. hw.vmm.l1d_flush_sw -> hw.vmm.vmx.l1d_flush_sw 3. hw.vmm.vmx.use_apic_pir -> hw.vmm.vmx.cap.posted_interrupts 4. hw.vmm.vmx.use_apic_vid -> hw.vmm.vmx.cap.virtual_interrupt_delivery 5. hw.vmm.vmx.use_tpr_shadowing -> hw.vmm.vmx.cap.tpr_shadowing Old names are kept for compatibility. Meanwhile, add sysctl flag CTLFLAG_TUN to them so that `sysctl -T` will report them correctly. Reviewed by: corvink, jhb, kib, #bhyve Approved by: re (gjb) MFC after: 5 days Differential Revision: https://reviews.freebsd.org/D42251 (cherry picked from commit f3ff0918ffcdbcb4c39175f3f9be70999edb14e8) (cherry picked from commit 9e48b627aed346bf5e950134a581218d3097eb7c) --- sys/amd64/vmm/intel/vmx.c | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c index 51c6afe5a7da..317ed7e5d7fb 100644 --- a/sys/amd64/vmm/intel/vmx.c +++ b/sys/amd64/vmm/intel/vmx.c @@ -192,15 +192,18 @@ SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, invpcid, CTLFLAG_RD, &cap_invpcid, 0, "Guests are allowed to use INVPCID"); static int tpr_shadowing; -SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, tpr_shadowing, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, tpr_shadowing, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &tpr_shadowing, 0, "TPR shadowing support"); static int virtual_interrupt_delivery; -SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, virtual_interrupt_delivery, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, virtual_interrupt_delivery, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &virtual_interrupt_delivery, 0, "APICv virtual interrupt delivery support"); static int posted_interrupts; -SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, posted_interrupts, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx_cap, OID_AUTO, posted_interrupts, + CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &posted_interrupts, 0, "APICv posted interrupt support"); static int pirvec = -1; @@ -213,10 +216,10 @@ SYSCTL_UINT(_hw_vmm_vmx, OID_AUTO, vpid_alloc_failed, CTLFLAG_RD, &vpid_alloc_failed, 0, NULL); int guest_l1d_flush; -SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &guest_l1d_flush, 0, NULL); int guest_l1d_flush_sw; -SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush_sw, CTLFLAG_RD, +SYSCTL_INT(_hw_vmm_vmx, OID_AUTO, l1d_flush_sw, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, &guest_l1d_flush_sw, 0, NULL); static struct msr_entry msr_load_list[1] __aligned(16); @@ -832,8 +835,12 @@ vmx_modinit(int ipinum) &tmp); if (error == 0) { tpr_shadowing = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.vmx.use_tpr_shadowing", &tpr_shadowing); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.cap.tpr_shadowing", + &tpr_shadowing); } if (tpr_shadowing) { @@ -854,8 +861,12 @@ vmx_modinit(int ipinum) procbased2_vid_bits, 0, &tmp); if (error == 0 && tpr_shadowing) { virtual_interrupt_delivery = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.vmx.use_apic_vid", &virtual_interrupt_delivery); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.cap.virtual_interrupt_delivery", + &virtual_interrupt_delivery); } if (virtual_interrupt_delivery) { @@ -881,8 +892,12 @@ vmx_modinit(int ipinum) } } else { posted_interrupts = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.vmx.use_apic_pir", &posted_interrupts); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.cap.posted_interrupts", + &posted_interrupts); } } } @@ -899,7 +914,10 @@ vmx_modinit(int ipinum) guest_l1d_flush = (cpu_ia32_arch_caps & IA32_ARCH_CAP_SKIP_L1DFL_VMENTRY) == 0; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.l1d_flush", &guest_l1d_flush); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.l1d_flush", &guest_l1d_flush); /* * L1D cache flush is enabled. Use IA32_FLUSH_CMD MSR when @@ -911,8 +929,12 @@ vmx_modinit(int ipinum) if (guest_l1d_flush) { if ((cpu_stdext_feature3 & CPUID_STDEXT3_L1D_FLUSH) == 0) { guest_l1d_flush_sw = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.vmm.l1d_flush_sw", &guest_l1d_flush_sw); +#endif + TUNABLE_INT_FETCH("hw.vmm.vmx.l1d_flush_sw", + &guest_l1d_flush_sw); } if (guest_l1d_flush_sw) { if (nmi_flush_l1d_sw <= 1) From nobody Tue Oct 24 14:37:48 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFF5m2ZpCz4y6M4; Tue, 24 Oct 2023 14:37: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 4SFF5m1nBNz4lS2; Tue, 24 Oct 2023 14:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+BM+aIzfuXcq+r7dq9nShKwF8/eNPvoxrp/OQSarbQA=; b=gg20wqU3fAkFnmykwwbCGrQBJvOJ+ENoM4goBNzKb8uY0aCDpvX1h6iWfgIV5TyTtEDraK u+uuQYhqQjQiGxR5C6KLWoPQ3SFTtoV7xNfI2lsYAwnrBzl9LdU8/NMxGIfBhAgGMW1ze9 6WPtvIqHkn8CYNP4ytnl/tIJYjpuIjkV8q6xPlXyrZ/1L+JLAWu/0feY+qKT5A3mbkkC97 lv4C8CVek5eYvORPMterQIwc3P8kNs7jdRGEtX1FXynwksgFikz7mkpbR6mAUMbootGHsK lYwkOi5Fa46fxdbByLIrK90dfI2/UwT/b4m+oQKhlzz7yqMtVci+UFXo2dN69w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698158268; a=rsa-sha256; cv=none; b=Zw5iY6PLkj9b/DxFM22+P2WiRUf/UxQSk12DntS51IVtc390ZSwA1olTeUYeCET77sKUdX dNa3enk2qHFFLx0gH6sKzgAblb8b//v/amPSShXA4fiyELSJVj+p72m45jiEjZE7bDk1YE IVY2VJ5hO5bFN31IOciWxd7GAZK8GnkX7CIGCOBoQ/IIBrY1gV23eF0A+w3af6/cPXz2Jo KQf2qppFTrYwJ3nMXmvoQ8XbrvzCxmwGqTDqwtJKlIa5GynCMdf68tDMqTZzAjPqfuJhVb WaalZj0QLt4Poewgm47aqsKtJG/hmw7jl3qiU8Lg8WuNyHeusTXDqsN4JE72hQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+BM+aIzfuXcq+r7dq9nShKwF8/eNPvoxrp/OQSarbQA=; b=v6y8dddGSL6oMaLPIdPP5h7lgWtaNSq987s1SwfzfenLuUWRmOQ43VrzsLayfA2RO1Efll Es3DDYHIiPx65cAskSgR1+mBw03g8pcEeTVDMLWiGgvpUSN++fqYN/9aC4F4KspQ7CIcCe cr/Eq83ldluanU42j9oyjawFWnJQRFdZUS9zXaRpXbmycp3VXVn8v3jWGRj8ZeEc/7vV2M XAbw5+69EjmXyH44MmnQU33elBFNXX0DXcHBW85Y9KbglTcYVqGdIgm0IwIYqXFbrjy0mo Jl66lB/nJMBfaCb6tvjnlpyGV+1lHbNueWMMLL3XopUqJh25Lb+R0tOgOkad5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFF5m0tcWzBpv; Tue, 24 Oct 2023 14:37:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OEbmTg089761; Tue, 24 Oct 2023 14:37:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OEbmME089758; Tue, 24 Oct 2023 14:37:48 GMT (envelope-from git) Date: Tue, 24 Oct 2023 14:37:48 GMT Message-Id: <202310241437.39OEbmME089758@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 8934fcb4983e - releng/14.0 - amd64 pmap: Prefer consistent naming for loader tunable List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 8934fcb4983ea74fa0b741add4d8b1bd65fa0c54 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=8934fcb4983ea74fa0b741add4d8b1bd65fa0c54 commit 8934fcb4983ea74fa0b741add4d8b1bd65fa0c54 Author: Zhenlei Huang AuthorDate: 2023-10-20 07:31:44 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 14:35:51 +0000 amd64 pmap: Prefer consistent naming for loader tunable The sysctl knob 'vm.pmap.allow_2m_x_ept' is loader tunable and have public document entry in security(7) but is fetched from kernel environment 'hw.allow_2m_x_ept'. That is inconsistent and obscure. As there is public security advisory FreeBSD-SA-19:25.mcepsc [1], people may refer to it and use 'hw.allow_2m_x_ept', let's keep old name for compatibility. [1] https://www.freebsd.org/security/advisories/FreeBSD-SA-19:25.mcepsc.asc Reviewed by: kib Approved by: re (gjb) Fixes: c08973d09c95 Workaround for Intel SKL002/SKL012S errata MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42311 (cherry picked from commit 9e7f349ff10691c2e3fb03898dbc942794a47566) (cherry picked from commit 8784b153a31fc0b3a12449a2f0377eb038e6fb7b) --- sys/amd64/amd64/pmap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index b10997fd657b..38eab9969bb2 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -2342,7 +2342,10 @@ pmap_allow_2m_x_ept_recalculate(void) CPUID_TO_MODEL(cpu_id) == 0x57 || /* Knights */ CPUID_TO_MODEL(cpu_id) == 0x85)))) pmap_allow_2m_x_ept = 1; +#ifndef BURN_BRIDGES TUNABLE_INT_FETCH("hw.allow_2m_x_ept", &pmap_allow_2m_x_ept); +#endif + TUNABLE_INT_FETCH("vm.pmap.allow_2m_x_ept", &pmap_allow_2m_x_ept); } static bool From nobody Tue Oct 24 14:37:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFF5n5Dzcz4y6vj; Tue, 24 Oct 2023 14:37: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 4SFF5n3Hxdz4lVF; Tue, 24 Oct 2023 14:37:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vHRfU4Vm+3bGQMru1d32EpuV6FRc7cba7msqkXoFmAc=; b=hnvEj+QiDOsZx1qnev4p2/PXguRpJcMEnxXHskT/EFLxiKoUK+84okLWAtsaQqmci8e3P/ vSDsmwYS2s4GAjZUZDtYliBBCDRQixbd1QzwjYvwvIePuTo4dnOiHk7y0IXaGS0MpGMnSf eWaH00RR4FXrL61hhy+00taB74MlxstqQkiDAu2gBR0O2Zus8DxNq/X1PAoC5BbLIgMq3+ 9jguNenyaOFnnE9FORBfnzFoHl69qhjTRxqH7LhGzMRc10b7iC5LW6427lm6KeYsRDGr5P uH6E+0c+kkqn2Ki2my1U5nqbaUESNL36RWMH7x7dUF8zZ9tdZUVZMOzFty0hmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698158269; a=rsa-sha256; cv=none; b=uzIdlzbpOLBbD3e4QiEbYHGe7o3GQ2uXmif/S2bi/VXUpx/nhZOLjpYpaxnyNiIPi4lT9Q YVcKbnMjSAxZp4uUc22dWABCsRMamFBaV62JO63W10RIZ+oBljL/PRm4nqJ4IQNbyxvAWD t/eq3XewmnfCmKV84saugJ9ZtbUyJ3x3bXeWrS4VJDn8uqvBS4COV1Mg8nRqLuHqSmW6px Z+FHhCeA1/9b9Y8vW3QRnsBTZS6NuA16RarUYVvtPeSR6u/f88D9tNycOdvoHH+ChBOSle TOQEGbLeTB2o+84hcbpzgI1dDPqjamvfKlHJsRe6gp0MKnCnuBGaMNxyu0gPOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698158269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vHRfU4Vm+3bGQMru1d32EpuV6FRc7cba7msqkXoFmAc=; b=ycQ4usdn6ziYU+nh3He4l5CR+owTuhHg+3vgWvg8XjAFB1w5gz7mqlBsnSrymdSP9QOBQW ju/hqwIaJVpgZM+q2Ywhm8EbadxsCS1wku7cvgjrKp1oxYWDDmN96o4fy64n/IP/MC3j1c CEG3b1BZyVGyD3mCKyJjT2gX+6xRABsh2guAFB3sGcrPut4yGbprPL8YFhHsUVTPpWJz9s ctbVNG5eNepQL4BluIdXpV7CTxIlXyeX5YnXy5PcqZ+lVjYeGc9JeEObk3loXzwojEMNVG by+rSheCZ+YF46SMCjch8UoUX1ve6OTGgLtVRVpf5L9MSf7Uh3VYEQjhgSR2Lg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFF5n27RYzBy7; Tue, 24 Oct 2023 14:37:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OEbnh9089811; Tue, 24 Oct 2023 14:37:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OEbnjS089808; Tue, 24 Oct 2023 14:37:49 GMT (envelope-from git) Date: Tue, 24 Oct 2023 14:37:49 GMT Message-Id: <202310241437.39OEbnjS089808@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Zhenlei Huang Subject: git: 62d60fad87db - releng/14.0 - x86: Prefer consistent naming for loader tunables List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 62d60fad87dbb65cfd0088c424c6f66e36d566c4 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=62d60fad87dbb65cfd0088c424c6f66e36d566c4 commit 62d60fad87dbb65cfd0088c424c6f66e36d566c4 Author: Zhenlei Huang AuthorDate: 2023-10-17 07:05:25 +0000 Commit: Zhenlei Huang CommitDate: 2023-10-24 14:35:52 +0000 x86: Prefer consistent naming for loader tunables The following loader tunables do have corresponding sysctl MIBs but with inconsistent naming. That may be historical reason. Let's prefer consistent naming for them so that it will be easier to maintain. 1. hw.dmar.timeout -> hw.iommu.dmar.timeout 2. hw.lapic_eoi_suppression -> hw.apic.eoi_suppression 3. hw.lapic_tsc_deadline -> hw.apic.timer_tsc_deadline 4. hw.x2apic_enable -> hw.apic.x2apic_mode Those tunables are for field debugging, no need to keep old names for compatibility. Reviewed by: kib Approved by: re (gjb) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D42248 (cherry picked from commit 12cce5994b92f8235f379d660ccb28da8e69f55b) (cherry picked from commit 6cd7e3d118f247a8f6bc0f8162a9cb67155b7c76) --- sys/x86/acpica/madt.c | 2 +- sys/x86/iommu/intel_drv.c | 2 +- sys/x86/x86/local_apic.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/x86/acpica/madt.c b/sys/x86/acpica/madt.c index 3d7c5a67375b..200eec1fbb28 100644 --- a/sys/x86/acpica/madt.c +++ b/sys/x86/acpica/madt.c @@ -221,7 +221,7 @@ madt_setup_local(void) else if (bootverbose) printf("x2APIC available but disabled %s\n", reason); user_x2apic = x2apic_mode; - TUNABLE_INT_FETCH("hw.x2apic_enable", &user_x2apic); + TUNABLE_INT_FETCH("hw.apic.x2apic_mode", &user_x2apic); if (user_x2apic != x2apic_mode) { if (bios_x2apic && !user_x2apic) printf("x2APIC disabled by tunable and " diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index a5821df6b835..ebdf24976504 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -429,7 +429,7 @@ dmar_attach(device_t dev) dmar_quirks_post_ident(unit); timeout = dmar_get_timeout(); - TUNABLE_UINT64_FETCH("hw.dmar.timeout", &timeout); + TUNABLE_UINT64_FETCH("hw.iommu.dmar.timeout", &timeout); dmar_update_timeout(timeout); for (i = 0; i < DMAR_INTR_TOTAL; i++) diff --git a/sys/x86/x86/local_apic.c b/sys/x86/x86/local_apic.c index b382368cc626..012aa1e9a836 100644 --- a/sys/x86/x86/local_apic.c +++ b/sys/x86/x86/local_apic.c @@ -493,7 +493,7 @@ lapic_init(vm_paddr_t addr) (cpu_feature2 & CPUID2_TSCDLT) != 0 && tsc_is_invariant && tsc_freq != 0) { lapic_timer_tsc_deadline = 1; - TUNABLE_INT_FETCH("hw.lapic_tsc_deadline", + TUNABLE_INT_FETCH("hw.apic.timer_tsc_deadline", &lapic_timer_tsc_deadline); } @@ -526,7 +526,7 @@ lapic_init(vm_paddr_t addr) "KVM -- disabling lapic eoi suppression\n"); lapic_eoi_suppression = 0; } - TUNABLE_INT_FETCH("hw.lapic_eoi_suppression", + TUNABLE_INT_FETCH("hw.apic.eoi_suppression", &lapic_eoi_suppression); } From nobody Tue Oct 24 15:58:51 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFGvH3bhnz4yC5Q; Tue, 24 Oct 2023 15:58: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 4SFGvH2cjNz4tpl; Tue, 24 Oct 2023 15:58:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698163131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hqcviu8u+9//laSUTtTUexXVw5zyVA8BiL1Hb+jSoQE=; b=PfjQSXxdVgh+38iht99Jd+qEDq00fiJ+qjUmjMumvo4I/iNKRoH7bVVJjoaCelJhfrMKly ZcpDZUXfypVjHrzL9gELuSf2zZbVLEw9E1KblrVFFj8cnKmMCWOxmMYtgaYYnjrFC9dN9O qJnZ1LiC6w8dh3XQtWtoWKfgHFj3JE5GThEiqkWSjM+2IjjHbTQOIqxLG31OfZJygWVVFT sbz7QVBQNyVzGn/g9QKk+wIcHU/fOCZ3tWhvIwp9ean9ObcBpKOoPZOxhpZQascrgENx15 A7dcQd32/xyNka7+tpBJg1qFZlRQcEFCI0yw/60iuO3dl6pHlWVWob0686i5Mw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698163131; a=rsa-sha256; cv=none; b=FE2BnA3bATDJ11VyHxVZBxCumgVTZMrJoeKrRMqv8sTqJgJDNbfQo18Gs7RkMFAn/QKAW0 IJmjI5gd++YMwzo9IfBwvxcAKy/2r4FyF+0CUb0UCw4O7f+N6z2GmerbSkRXP2MKQslVFG 84SS6ezYkL4zoZU4Nks9n5cHJcpCEXR6KvMlC3zWR3GI7OWmRpR+EE1jkz2TiBvzpWMHR9 Z/YSnGdei7V8jp6/KUoDnb4ypRMY60gneGG+CPy9x7IBl70Ss/rHmqNO6UpVPej1MwJfzN vfaHrrqXimBGtgL7ye3FZnPV6Hh7usNR8K7Ap3sq5XJYrXn+Bi0hO6D/HNdZdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698163131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hqcviu8u+9//laSUTtTUexXVw5zyVA8BiL1Hb+jSoQE=; b=n1lKGhJZZtPfiUtd4lY9U55Fjc98JY/uflYFIO7sajwjy5zUq/htl/xb+w7P49vx3HBDP7 0ohDn/QHhlJSDAnt/puV8U6Sz2CpChQRtFwyMJt3Bi+vXwagl2sSjl8sxyvF2yPlFNEqJz yCyxq6rm1qOl2g4kafXcYCLgBfK4WQQsLF4h6tdMsgnFotnLtAXW5wkxzMMXBx76QCmQxL u6FUefLaSiJBqv8p7lk5GxqHP5ckdM/mVh2GgNPHo85umV5ijzH/Wj2DxrSSFY1mkA5+8r HZMpyUnKs+OdHxq9MFe1OpuC68OCBk5Zt3OlIDp6vH9k9nitp6j3LZqTiCXWsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFGvH1htxzTbq; Tue, 24 Oct 2023 15:58:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OFwpQM022483; Tue, 24 Oct 2023 15:58:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OFwpmn022480; Tue, 24 Oct 2023 15:58:51 GMT (envelope-from git) Date: Tue, 24 Oct 2023 15:58:51 GMT Message-Id: <202310241558.39OFwpmn022480@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: ee3a92d1bffc - releng/14.0 - zfs: cherry-pick change from master List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: ee3a92d1bffc27a6a341b97d3a1d2d166fed1d3a Auto-Submitted: auto-generated The branch releng/14.0 has been updated by mm: URL: https://cgit.FreeBSD.org/src/commit/?id=ee3a92d1bffc27a6a341b97d3a1d2d166fed1d3a commit ee3a92d1bffc27a6a341b97d3a1d2d166fed1d3a Author: Martin Matuska AuthorDate: 2023-10-20 17:30:32 +0000 Commit: Martin Matuska CommitDate: 2023-10-24 15:54:47 +0000 zfs: cherry-pick change from master #15405 ea30b5a9e Set spa_ccw_fail_time=0 when expanding a vdev Fixes 5-minute autoexpand delay on ZFS-root VM images. Approved by: re (gjb) Requested by: cperciva Co-Authored-By: Colin Percival Obtained from: OpenZFS OpenZFS commit: ea30b5a9e0d266baa13398ed8f9435de050f4b25 (cherry picked from commit c458bf557d66161730ce644af840e968397a377b) --- sys/contrib/openzfs/module/zfs/vdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/contrib/openzfs/module/zfs/vdev.c b/sys/contrib/openzfs/module/zfs/vdev.c index 87c145593237..afb01c0ef7fd 100644 --- a/sys/contrib/openzfs/module/zfs/vdev.c +++ b/sys/contrib/openzfs/module/zfs/vdev.c @@ -4215,6 +4215,7 @@ vdev_online(spa_t *spa, uint64_t guid, uint64_t flags, vdev_state_t *newstate) /* XXX - L2ARC 1.0 does not support expansion */ if (vd->vdev_aux) return (spa_vdev_state_exit(spa, vd, ENOTSUP)); + spa->spa_ccw_fail_time = 0; spa_async_request(spa, SPA_ASYNC_CONFIG_UPDATE); } From nobody Tue Oct 24 16:12:12 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFHBh66lqz4yCpW; Tue, 24 Oct 2023 16:12: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 4SFHBh5hZsz4vvM; Tue, 24 Oct 2023 16:12:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698163932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OP5X9xtLqlJcOxvHhbb2XbJscbkrl7RtdMHp7lZojKI=; b=ucVaIHeBBl+lT5ChfEm4jdv4+CjFQCyhocRkLjtH3nuRzXN/NxWaiMnhOjzxUWxCJp7RXc okUijcqrkiCE/floGzEonuyAXOkS1SGTC/bPqjjrIenCkYMy+X6+NG8CzhKd7+zyxo9zEY E6gezyEUUHbD3+M47mcj+mM2QwoEUQbXxF3tfr6Bic0oBmhtT8/qi5ZzDDpKLJGMR51ByN 50+cOK5AgyhjkzuzQ69t49Q9kPp10V6BD8mSK1aRenl2cGcpCEIigsl+tc0oYiDHRYPTLO oRLt+aIINScZy3RXUiCGvxQFJ6etkKxzxEcBIkIPz++OZFyofkqTwLerFZvCpw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698163932; a=rsa-sha256; cv=none; b=Atx1VxbLFNb0m3bIaPolZx2CnKsF8DrYtgXCQCABRnOU5ux7DLMI7PGuBXbHhB3N3o1cji qChq7aHtmYnTBPFiogxRPubguPcWwJ/hESi8ZBxsC77Fwgf5x14tFyCJcjIH8xHqpuihVQ DSt5X9jFsEx3bffGVOleU04oVvN/Cjwijlj9ClB+fDuFZeL5pqyPVNJmFaWf/d5QlgMG// T0h9s5UBK7C0kzXaJ+FEg7tB9WjRisJtjMcWyFRToTszpSo7JDVpaftVtGDPDtFw7d8eD5 tdBGLGca3YJbCljtVTRCRVj4eRjM6jSQiD8+fuWQHrH0eHE+LPSw41fdB6mwxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698163932; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OP5X9xtLqlJcOxvHhbb2XbJscbkrl7RtdMHp7lZojKI=; b=I4y9NzMe/ol26NM5cZYckROD4xsN0Lu4AgLr5zE+niylVKSePku9YH/LOYVMMWwEw0idky d08d89MrcFjI6nQa5Fa/5rl15s2Mml9zmavJzJ23RNR+oK6hgfg5EKYbA8ROMIcYBDns6y itFYa6aUe1AXyzauGtwRDVYSQTOMSfAhvLyq96cJTO+uZ8tuq+powPKL2MZn4xdXdAKlp9 flCamm8JODsrX2NIpgrfpo2aeSI0IOt8B2/2sGvi74pr00qthvYavma1LAJXFaZwgUcThj s57nPzgd22NiUZnfW6iOrmO75YVh6xqYjEAFofZjp5wbaD2UJT3LSoSiwy6wrQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFHBh4mWHzVd0; Tue, 24 Oct 2023 16:12:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OGCCBZ053908; Tue, 24 Oct 2023 16:12:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OGCCVf053905; Tue, 24 Oct 2023 16:12:12 GMT (envelope-from git) Date: Tue, 24 Oct 2023 16:12:12 GMT Message-Id: <202310241612.39OGCCVf053905@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: e34fdb7c119e - releng/14.0 - freebsd-update: create deep BEs by default List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: e34fdb7c119e2913d0910033e6a26fd6c08b9503 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=e34fdb7c119e2913d0910033e6a26fd6c08b9503 commit e34fdb7c119e2913d0910033e6a26fd6c08b9503 Author: Kyle Evans AuthorDate: 2023-10-12 02:51:07 +0000 Commit: Kyle Evans CommitDate: 2023-10-24 16:12:01 +0000 freebsd-update: create deep BEs by default The -r flag to bectl needs to go away, and we need to just do the right thing. In the meantime, we can apply an -r in freebsd-update as a minimal fix to stop creating partial backups in these (non-default) deep BE setups. PR: 267535 Approved by: re (gjb) (cherry picked from commit 989c5f6da99081b1f2b76ec09e91078e531e1250) (cherry picked from commit 5c2a559876d123ba386612319bf42e7b32dee590) --- 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 c6432dcd6b0e..438e13a51154 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -916,7 +916,7 @@ install_create_be () { echo -n "Creating snapshot of existing boot environment... " VERSION=`freebsd-version -ku | sort -V | tail -n 1` TIMESTAMP=`date +"%Y-%m-%d_%H%M%S"` - bectl create ${VERSION}_${TIMESTAMP} + bectl create -r ${VERSION}_${TIMESTAMP} if [ $? -eq 0 ]; then echo "done."; else From nobody Tue Oct 24 17:04:35 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFJMJ3Wxnz4yGYm; Tue, 24 Oct 2023 17:04:44 +0000 (UTC) (envelope-from phil@juniper.net) Received: from mx0a-00273201.pphosted.com (mx0a-00273201.pphosted.com [208.84.65.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "*.pphosted.com", Issuer "Sectigo RSA Organization Validation Secure Server CA" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SFJMJ0hN0z3Jmv; Tue, 24 Oct 2023 17:04:44 +0000 (UTC) (envelope-from phil@juniper.net) Authentication-Results: mx1.freebsd.org; none Received: from pps.filterd (m0108156.ppops.net [127.0.0.1]) by mx0a-00273201.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 39OErpCl019304; Tue, 24 Oct 2023 10:04:42 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; h=from : to : cc : subject : date : message-id : in-reply-to : references : mime-version : content-type : content-transfer-encoding; s=PPS1017; bh=VenZkl9o2xS1Vdo5SQvhCzQgxbZQSNSDqwfPfnkvZQE=; b=pqGaaCNCisP+SWAmW4lQhSa7r3eJaQLkoANHEAuitQkwDG8MdBaZ6p+wqcc7q25V0kAa IoDzLYbtSFWyXjWQJfgS9iW4mgqqHsj+c/7jY31MGcq1dfMzvy3hv5+5HiAbhmm5/3rz S9w0lvezGfRhKfjOZtnnzordmbxlyrIIpXnIQIH2mXGXiI+VX0ojR9NsFblWOOHWlh6Q d7vPYyv/zHQKEVCrg/eJEYd+KC2ZzrqNu+ikrbMDyq3IAAFCJs7kqy5n27tmeZisfDMx Xd9zZRkSrDTSzr34fqEdeiaUBDiaMFsci6O7Bm+W2SzF23pVeZEs4x78Tp/Kc2c5PR0P VA== Received: from mw2pr02cu001.outbound.protection.outlook.com (mail-westus2azlp17012025.outbound.protection.outlook.com [40.93.10.25]) by mx0a-00273201.pphosted.com (PPS) with ESMTPS id 3twnsrk60k-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 24 Oct 2023 10:04:41 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QOByTZhgrz5ZZVoj0FdSUJC8BjMcb5Vo5BA9iNjBjUQRHMSNqulSILg0hLT1D1LNEcgNf9TtM8aNBKFnfkZoAWKuO89w8iTtO+rcBI5Y9ustj0ndoojNnIxOUwjXL1rwHLlMeQVtwOvzJZaISNvzPKsArpif3c5TB2edHZ3GS/PitQBbqZcMr7NwIBG9MNyKxWeR5dlnAvaXt+QOPrYNM9tJCkMlVAHUVlNWe1YfKHmupb67jYh5gqpC923KlYG8PXBpl7CGDhSM3LYhBVNN0pNxwwsU/gA5eJqNRcNj5I0PEV6KQtJGxLXA9Fg+4ZOgkMjrtIR+sleaYo7UIDc2eQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=VenZkl9o2xS1Vdo5SQvhCzQgxbZQSNSDqwfPfnkvZQE=; b=EGO3tIcQBmRvNt1Bp+Aia+IOv/tZjQzWjDEHIOeReN8J9ypIrW2gQkChC1oqMZBWIHSWglC9CvWeU5r44SM6nF4VhQql3hqP3ZcCeS9NH7C2QZjrBqK1hFtbf/ri53k1QHYhlTTuwlHOuqiOV0+Lc7LAVOiC8sz9nkffR/2vHhRQZB0F2QHI+D37xKy83iL2wHnt4I9Bwqz3kYGcWfXXX+F4YCj7gqTLE6gaI4ydOAT0CpvXJeNZIeBz7HiFEFSdalniD6D+tq/ec/j1f63sCWRB+aPu87v/+k22gb1nbOJVFr4cI9h5jfb5y+Wl2hN6zze4LPuyQ+NNkevorw0Iww== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=softfail (sender ip is 66.129.242.15) smtp.rcpttodomain=oldach.net smtp.mailfrom=juniper.net; dmarc=fail (p=reject sp=reject pct=100) action=oreject header.from=juniper.net; dkim=none (message not signed); arc=none (0) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=juniper.net; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VenZkl9o2xS1Vdo5SQvhCzQgxbZQSNSDqwfPfnkvZQE=; b=IRxMPY/KjA/ZjRbDSo2srgEvzwIEODfwszpDilVqfQ9tACkDwuuukYAqTjq91U1X/u34INIk/RlTTo6RhgBLgiYZ3I7ij/5fonXNMpsiBK/R98o1b3S/H4A61UymSstwIUrpK59RxUCHaQj06/Mr3YuMiCFazaIW2XkgdQjxqo0= Received: from DS7PR03CA0030.namprd03.prod.outlook.com (2603:10b6:5:3b8::35) by SJ0PR05MB9373.namprd05.prod.outlook.com (2603:10b6:a03:449::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.26; Tue, 24 Oct 2023 17:04:39 +0000 Received: from DM6NAM12FT078.eop-nam12.prod.protection.outlook.com (2603:10b6:5:3b8:cafe::ae) by DS7PR03CA0030.outlook.office365.com (2603:10b6:5:3b8::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6907.33 via Frontend Transport; Tue, 24 Oct 2023 17:04:38 +0000 X-MS-Exchange-Authentication-Results: spf=softfail (sender IP is 66.129.242.15) smtp.mailfrom=juniper.net; dkim=none (message not signed) header.d=none;dmarc=fail action=oreject header.from=juniper.net; Received-SPF: SoftFail (protection.outlook.com: domain of transitioning juniper.net discourages use of 66.129.242.15 as permitted sender) Received: from p-exchfe-eqx-02.jnpr.net (66.129.242.15) by DM6NAM12FT078.mail.protection.outlook.com (10.13.179.142) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6933.15 via Frontend Transport; Tue, 24 Oct 2023 17:04:38 +0000 Received: from p-exchbe-eqx-01.jnpr.net (10.104.9.14) by p-exchfe-eqx-02.jnpr.net (10.104.9.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30; Tue, 24 Oct 2023 12:04:37 -0500 Received: from p-mailhub01.juniper.net (10.104.20.6) by p-exchbe-eqx-01.jnpr.net (10.104.9.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.30 via Frontend Transport; Tue, 24 Oct 2023 12:04:37 -0500 Received: from idleski.juniper.net (idleski.juniper.net [172.25.4.10]) by p-mailhub01.juniper.net (8.14.4/8.11.3) with ESMTP id 39OH4aFv013931; Tue, 24 Oct 2023 10:04:37 -0700 (envelope-from phil@juniper.net) Received: from [172.25.4.169] (localhost [127.0.0.1]) by idleski.juniper.net (8.16.1/8.16.1) with ESMTP id 39OH5RkP000820; Tue, 24 Oct 2023 13:05:28 -0400 (EDT) (envelope-from phil@juniper.net) From: Phil Shafer To: Helge Oldach <75ypz71@oldach.net> CC: Kristof Provost , , , Subject: Re: git: 8bfa084a4bf3 - stable/13 - ndp: fix timestamp display output Date: Tue, 24 Oct 2023 13:04:35 -0400 X-Mailer: MailMate (1.14r5937) Message-ID: <9A751731-ED68-4823-806A-CB1C7DF3A4D7@juniper.net> In-Reply-To: <202310241244.39OCi1Zl054415@nuc.oldach.net> References: <202310241244.39OCi1Zl054415@nuc.oldach.net> List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM12FT078:EE_|SJ0PR05MB9373:EE_ X-MS-Office365-Filtering-Correlation-Id: 3866909a-91f2-44cf-5da3-08dbd4b34e88 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: EdI+gKXGtQbwJhnbOu9jEgOGcxKWYn31UcQb3OPptqk/zH+PBJfK0AFXMk9YbmyV7Jl+Et/3cvHAhcQ/pobh1xiXxHYEjW/Rrc/jFExpYZsCIrgWlSKvIowNrYYPNvhw7Rm1zPJO7hrD3HcsInONX+KEnKbQsjJ/CRP/dbWRptI7xcjSrJV0MLYs6xELDlEuPN2YDiWLtKCwFUjZ0oDcC6qcT1gI8QsN8OyS939n9AQ3gk4jtEGM8JnkOFwEnqBaE6GuIxkC03hqpYKkmHvI4g4hX8lG7kw0dwTEzyZwDx9gM88siRtNeYrYmlXK/hKyXJPbVKoh6wIrOCU1XjBI5kxGUX+Aaa/quXD8BKj5Z7nJaY5zNZyRKB1dDD3/DVDZQegUIBGS5rVDulLU+Z6uUubBjzShKGniUehTjCtFdq4LVll5uPDbAAtUV/20GeDimkQ+AvO7tkKFdW71RZFu46PtUN8M0qg9mEkG/b/K8tr2lVc6KuUSpjB+rFxz8L+xZ2ZelVf8uWKewoNRa22y1vyRtC25UCobYkpPX5z7GbNhohi+AYvdi4FJrgL8GksBASVm/1jFHujoOeWaM0JykqmRbI5NaZuOFnbwDJyj1xMkoS/m36q+Xhm+pEFzn5dQaMB+zwGnDV+/SuWOYZBL2USQwdCvPnywYaRVTbBvoNlRo5rPCtFD9ol8ZEXbakKMrYB/y9Mj9YlnEqbowvC/xhziJ6FnqG1FC1Wz0sosrhKmZ3b7MvtoFtd5GnNKabtbZtqckAYsRv0bO+gSbFZrn0yW6g92kkvebhn94YkmlYFfJ17Uzi7T88yLT1/iuxbL X-Forefront-Antispam-Report: CIP:66.129.242.15;CTRY:US;LANG:en;SCL:1;SRV:;IPV:CAL;SFV:NSPM;H:p-exchfe-eqx-02.jnpr.net;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230031)(4636009)(376002)(39860400002)(396003)(136003)(346002)(230922051799003)(82310400011)(451199024)(1800799009)(64100799003)(186009)(46966006)(36840700001)(40470700004)(83380400001)(40460700003)(336012)(426003)(26005)(40480700001)(81166007)(82740400003)(356005)(36756003)(86362001)(33656002)(47076005)(36860700001)(8936002)(8676002)(4326008)(316002)(70206006)(6916009)(70586007)(54906003)(4001150100001)(2906002)(5660300002)(41300700001)(7126003)(2616005)(6666004)(53546011)(966005)(478600001)(36900700001);DIR:OUT;SFP:1102; X-OriginatorOrg: juniper.net X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Oct 2023 17:04:38.3913 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 3866909a-91f2-44cf-5da3-08dbd4b34e88 X-MS-Exchange-CrossTenant-Id: bea78b3c-4cdb-4130-854a-1d193232e5f4 X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=bea78b3c-4cdb-4130-854a-1d193232e5f4;Ip=[66.129.242.15];Helo=[p-exchfe-eqx-02.jnpr.net] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM12FT078.eop-nam12.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR05MB9373 X-Proofpoint-ORIG-GUID: PVAk02BmjGy_ebWVYyfJDBerwgmkljyZ X-Proofpoint-GUID: PVAk02BmjGy_ebWVYyfJDBerwgmkljyZ X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.980,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-10-24_16,2023-10-24_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_spam_notspam policy=outbound_spam score=0 impostorscore=0 mlxlogscore=975 bulkscore=0 phishscore=0 mlxscore=0 suspectscore=0 spamscore=0 lowpriorityscore=0 malwarescore=0 priorityscore=1501 clxscore=1011 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2310170001 definitions=main-2310240147 X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:26211, ipnet:208.84.65.0/24, country:US] X-Rspamd-Queue-Id: 4SFJMJ0hN0z3Jmv Looking at: - xo_emit("{:tv_sec/%lld}{:tv_usec/%lld}%02d:%02d:%02d.%06u ", + xo_emit("{e:tv_sec/%lld}{e:tv_usec/%lld}{d:/%02d:%02d:%02d.%06u} ", tvp->tv_sec, tvp->tv_usec, I wonder if, while it makes sense to keep the encoded-only raw data, the = hr:mn:sc data would also be useful in the encoded styles (JSON,XML)? Thanks, Phil On 24 Oct 2023, at 8:44, Helge Oldach wrote: > [External Email. Be cautious of content] > > > Kristof Provost wrote on Tue, 24 Oct 2023 14:27:48 +0200 (CEST): >> The branch stable/13 has been updated by kp: >> >> URL: https://urldefense.com/v3/__https://cgit.FreeBSD.org/src/commit/?= id=3D8bfa084a4bf331b6baf2cc530b9752c4cbe573ad__;!!NEt6yMaO-gk!DiOM9v8cS3N= mBZU7Rg8KHHB7nfjV6jXCvws459nr40kayMsrO1OWkjeDGtmEsv2bfOuQrimOiUqQPfQ$ >> >> commit 8bfa084a4bf331b6baf2cc530b9752c4cbe573ad >> Author: R. Christian McDonald >> AuthorDate: 2023-10-17 16:57:22 +0000 >> Commit: Kristof Provost >> CommitDate: 2023-10-24 07:45:38 +0000 >> >> ndp: fix timestamp display output >> >> The current xo_format string is incorrect. This restores the displ= ay >> format prior to libxo-ification work while also explicitly marking= >> tv_sec and tv_usec as encoded output only. > > A couple of other xo_emit formats in ndp had also been damaged by the > libxo-ification. Please see patch in PR 272749. > > Kind regards > Helge From nobody Tue Oct 24 18:03:58 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFKgg1xFxz4yK4Y; Tue, 24 Oct 2023 18:03: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 4SFKgg1FkFz3SvY; Tue, 24 Oct 2023 18:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698170639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2Iro/WmIVbTI9H33HYVp+Y2mRYFtTB57qztTlc0LtdY=; b=IKM846z/Nk9KkvvPXe4SHu3oQurK2E4RffwtiYPHZoykoy7WDXC6iqbvBdkXS+L0ELKmEs IaSNiK3KF3kRWrarTHyqahDPU+x+wWqg7/NKNlXCWxWW7pQaoRZqTDJ3UgB9d9hpEU+sRg cOZ/ofppPpQKVeICbYKe6RYK7sY6phTPdL4mfPs1L7OA6OoVVW2YjGqDq801+654P6pl+b kmgL14YzIdEdqhpOyJbvx87oT3BPe7cwVDHLv0odpGeWasx/ZM+5QKS842snDL+0E28tME 1mwOTA+LNsNOGW34+jNCOc1Ex6gOj84Szgb2ZoUWaQJWTaidMussG8UNgh2BjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698170639; a=rsa-sha256; cv=none; b=igumORM98cmb9Zn3Gld0tk9D5Pkd7FymLYVyNz6P/C8bOkC4L5cXXlJxp6dqMHTDBJb1jx UCtCOP/naXNlfXTLgK8m0RgKG5pSqvjpHTddXDBomz4KFZOhXucTY+FEZaaleWCtQOz2OT Cvk+9pYU+HErT7ZWv1W2Wgcj7QY6QYXFiN9DOjyjGgybI02bjIQhBOIZNIYs4yXaXfrUvE OGxgAOPm249d6xdWY14rbXJwps8ykpw1jXYu5q917F8o18KBAJqzfz2IXQq4JMYATYaaFv SR9OAgsLiOSjEX2EPJzSNFRiZAlgX32HHd0I6ZgGH/0CP1stQXaz1Jf5frMNKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698170639; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2Iro/WmIVbTI9H33HYVp+Y2mRYFtTB57qztTlc0LtdY=; b=gjZNJmp93SWjG1OFVNw7XzbTNfZWsbmp/Qp+v4Vq40cPi2RsruBLWDvYySowGfoxOimeaX VHIkOorh4RzeT+A0+kyAt9YFTHu2fT24mXEpICEekwYoRgGzwCk6Fn9BHLJdqrsCVXwXOC mAkxNvofCDG6jTJyB4smUdRMOJBggwRqk0NdJrRDPYxSmhq8gjWqVJzB7L+LjEXfLwDQqF UB76/IHcaTE1Vw42WQtlQSG+JDhAhyo7nef/FmRw1AWzndvQO+T50GZOT4jz2RKZTZW67q +5XbsuYmXR3+OZGsOuk3CYNZWjK3e8W4K6nTGkC8alFmQ1EJO3TwZAOxbjEEHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFKgg0Js7zY2p; Tue, 24 Oct 2023 18:03:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OI3wEP036981; Tue, 24 Oct 2023 18:03:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OI3wBC036978; Tue, 24 Oct 2023 18:03:58 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:03:58 GMT Message-Id: <202310241803.39OI3wBC036978@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: 7259e54556f2 - stable/13 - Revert "socket tests: Build fix" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: 7259e54556f21f34dc6c161cb1bb9d8d42e49777 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=7259e54556f21f34dc6c161cb1bb9d8d42e49777 commit 7259e54556f21f34dc6c161cb1bb9d8d42e49777 Author: Mark Johnston AuthorDate: 2023-10-24 18:03:23 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 18:03:27 +0000 Revert "socket tests: Build fix" This reverts commit 1b07f630c11ccf899612a7d02777fe0855e3bb25. This test will require extra work to port to stable/13. --- tests/sys/kern/socket_msg_trunc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/kern/socket_msg_trunc.c b/tests/sys/kern/socket_msg_trunc.c index ff0499c4540d..279170158643 100644 --- a/tests/sys/kern/socket_msg_trunc.c +++ b/tests/sys/kern/socket_msg_trunc.c @@ -231,7 +231,7 @@ ATF_TC_BODY(recvmsg_trunc_ktrace_uio, tc) nbytes = read(fd, &ktr, sizeof(ktr)); ATF_REQUIRE_MSG(nbytes >= 0, "read failed: %s", strerror(errno)); ATF_REQUIRE((size_t)nbytes == sizeof(ktr)); - ATF_REQUIRE((ktr.ktr_type & ~KTR_TYPE) == KTR_GENIO); + ATF_REQUIRE_MSG((ktr.ktr_type & ~KTR_TYPE) == KTR_GENIO); ATF_REQUIRE(close(fd) == 0); ATF_REQUIRE(close(sd[0]) == 0); From nobody Tue Oct 24 18:04:00 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFKgh3Bqnz4yK7L; Tue, 24 Oct 2023 18:04: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 4SFKgh2Dy7z3Ssk; Tue, 24 Oct 2023 18:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698170640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ArWWRefXyw/qDZ22VQuqjuVqTTQ+y/37LjkkN8x/PU=; b=IubiiMP5kmmnHCW2sC4Yjl/rHLGfmhMGitNtxVYzNXTHhYZO+5DSfJYdKB3R11rN59zhsd RUmTTJEJwyWh5BtaVM2U42MwzvH0o48e0e3HQZBNJppNIeNUwuXpTG29vbee7TXckZ2tre 3K0nb6B38Sn3gzPtacDihIRJ14OX1d1deO4+5xUsKUlGHxm7Enb0tLPknRyqXJxsofkTSg w/LurRBiwbYXuIcz6zuy9z40AQyKCLCb0cr1NiTSX52dfMUdz75DDlkqNb0AnJiR66XiAi //QZD0didu1oz5SCiz33adBSU2RaCq/JyTTYebL3jReBAJPRXv+NBNmroL5iDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698170640; a=rsa-sha256; cv=none; b=pgkDKKF+agYuRiXC/p02LOcBIgdrJNwmm2JoCUvxABlGugSYXuPfWZF+acXmWdfDX5YwYz iQTpijmAN33XNgujIsdfv8d83azd7wpbtNlO9PPS79/+ZadqV7ePhLHO1LITVc7GJnR+qK ur9U/8kNuyPPY1YNGkdT6LR9lnxrdr4cJrNlj8ViXylHjuSkQB3gglxdWnvVbnKRSZsHhy jo3oA5w7d7/FOPQZGFfoQ4sXI7oW33UEPsoLAg8u030NIsmGtj4RWgs4mAAsP0j1w7SOOi zE8qseJ3JDRPQUWMtZ6WAKwM/0p1N6k/iUUC+YzsH8qNiorXRn+keQfInnxtMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698170640; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1ArWWRefXyw/qDZ22VQuqjuVqTTQ+y/37LjkkN8x/PU=; b=HkpO/ZtKWzDWiljjQlbZDxAWDuPmAetRv3vijkZvjKytdt07iVKnFCbNXLLIOZPR11lBB/ AE44srYw+qTpbilrM8SIt/NmvFWwst1WOTy96lbm+NhnJvcRH2p00SlTCXZsTCOaWlLZry UM5HApn18xwrP9WENyAFD5538SUMk7RLQg2aKtwj+BGPhJOVprt8JL+nxlF0e+ua3BGmTr QmB4GA8owWwzh8/QTANbDdW9tkXNsG6Qo1Vs/iSwd1cxZ6YIKh6CZJSvyV2iZpJYDfU2Ii qmyXXqLJ3wBG244r2i2YN6d1IRDZPAE58Ygbn4v49BBPrSA6gSiMlT8oFyV7rQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFKgh1JzlzXnv; Tue, 24 Oct 2023 18:04:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OI40qb037050; Tue, 24 Oct 2023 18:04:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OI40qh037047; Tue, 24 Oct 2023 18:04:00 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:04:00 GMT Message-Id: <202310241804.39OI40qh037047@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: 4bf16a282503 - stable/13 - Revert "socket tests: Add a regression test for ktrace+recv(MSG_TRUNC)" List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: 4bf16a282503fb1b9091e7e431220d97e72e25f9 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4bf16a282503fb1b9091e7e431220d97e72e25f9 commit 4bf16a282503fb1b9091e7e431220d97e72e25f9 Author: Mark Johnston AuthorDate: 2023-10-24 18:03:49 +0000 Commit: Mark Johnston CommitDate: 2023-10-24 18:03:49 +0000 Revert "socket tests: Add a regression test for ktrace+recv(MSG_TRUNC)" This reverts commit f5a9a849e9034c597c2b0a9014673a44834b9516. This test will require extra work to port to stable/13. --- tests/sys/kern/socket_msg_trunc.c | 57 --------------------------------------- 1 file changed, 57 deletions(-) diff --git a/tests/sys/kern/socket_msg_trunc.c b/tests/sys/kern/socket_msg_trunc.c index 279170158643..469b9e1503cd 100644 --- a/tests/sys/kern/socket_msg_trunc.c +++ b/tests/sys/kern/socket_msg_trunc.c @@ -27,13 +27,11 @@ #include #include -#include #include #include #include -#include #include #include #include @@ -184,67 +182,12 @@ ATF_TC_BODY(recv_trunc_afunix_seqpacket, tc) ATF_REQUIRE(close(ss) == 0); } -/* - * Exercise the case where ktrace was used to dump a truncated buffer. - */ -ATF_TC_WITHOUT_HEAD(recvmsg_trunc_ktrace_uio); -ATF_TC_BODY(recvmsg_trunc_ktrace_uio, tc) -{ - struct ktr_header ktr; - struct msghdr msg; - struct iovec iov; - const char *tracepath; - char buf[128]; - ssize_t nbytes; - int error, fd, sd[2]; - - tracepath = "ktrace"; - - error = socketpair(AF_UNIX, SOCK_DGRAM, 0, sd); - ATF_REQUIRE(error == 0); - - memset(buf, 0, sizeof(buf)); - nbytes = send(sd[0], buf, sizeof(buf), 0); - ATF_REQUIRE_MSG(nbytes >= 0, "send failed: %s", strerror(errno)); - ATF_REQUIRE((size_t)nbytes == sizeof(buf)); - - fd = open(tracepath, O_RDWR | O_CREAT | O_TRUNC, 0644); - ATF_REQUIRE_MSG(fd >= 0, "open failed: %s", strerror(errno)); - error = ktrace(tracepath, KTROP_SET, KTRFAC_GENIO, getpid()); - ATF_REQUIRE_MSG(error == 0, - "ktrace(SET) failed: %s", strerror(errno)); - - iov.iov_base = buf; - iov.iov_len = sizeof(buf) - 1; /* truncate */ - memset(&msg, 0, sizeof(msg)); - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - nbytes = recvmsg(sd[1], &msg, MSG_TRUNC); - ATF_REQUIRE_MSG(nbytes >= 0, "recvmsg failed: %s", strerror(errno)); - ATF_REQUIRE((size_t)nbytes == sizeof(buf)); - ATF_REQUIRE((msg.msg_flags & MSG_TRUNC) != 0); - - error = ktrace(tracepath, KTROP_CLEARFILE, 0, getpid()); - ATF_REQUIRE_MSG(error == 0, - "ktrace(CLEARFILE) failed: %s", strerror(errno)); - - nbytes = read(fd, &ktr, sizeof(ktr)); - ATF_REQUIRE_MSG(nbytes >= 0, "read failed: %s", strerror(errno)); - ATF_REQUIRE((size_t)nbytes == sizeof(ktr)); - ATF_REQUIRE_MSG((ktr.ktr_type & ~KTR_TYPE) == KTR_GENIO); - - ATF_REQUIRE(close(fd) == 0); - ATF_REQUIRE(close(sd[0]) == 0); - ATF_REQUIRE(close(sd[1]) == 0); -} - ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, recv_trunc_afinet_udp); ATF_TP_ADD_TC(tp, recv_trunc_afinet6_udp); ATF_TP_ADD_TC(tp, recv_trunc_afunix_dgram); ATF_TP_ADD_TC(tp, recv_trunc_afunix_seqpacket); - ATF_TP_ADD_TC(tp, recvmsg_trunc_ktrace_uio); return (atf_no_error()); } From nobody Tue Oct 24 18:36:55 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPh0NnFz4yLqt; Tue, 24 Oct 2023 18:36: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 4SFLPg6tlkz3Xn9; Tue, 24 Oct 2023 18:36:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cTGznOHKahjOyOaHN+7hlLcsbOM+zhTcm9ykrh8ioMY=; b=buqYFdYiRxPpbMiiwUMhlQE0c4wL7p97t1pKlvVeDxNXfPQhOvOYJHdxgaWC9wcmNftPC5 KdJTWe0n0ZuXFDtsQh2aMf6e6Be6mvuQR02dMCwCQalzbgRgvuA7iOUSmAvv7vgBeDTDpV rmmgIRegzTIDfk9xOD+ml6qbsLFFmFvsc4FHnvTJARXUmxJsaO0exhX2AfPrnmKeP1lkvy 3VJdbuuVscryYO0Hnj6xzbEQIT2lmmyw2mb8tmN6Ifse88iiGVN4jRsTZ9v068bty8Mfoj MFETx0nRBDSw1E7uCh8/8EZ/Xwnj4/pjsdJvCEBFWB4EyElbOfPfGYk5GQwctA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172616; a=rsa-sha256; cv=none; b=eyFhqfD+5ZpEQqUduCSR9zUtZpXJEJdhcQ16/joJLMDZpYqmOToJhVdXInWyZuuaR3SurL xqtgRJD2d4XHIhtR1C7IcZVV1+/g27Sr2AhVihTMOEA80B9iJg7a5bAPe+O/rT41d9bgst 3+sdcqoIw87ow06K1egCetPrfaddms/L6+JGcXgccefwJEyCEPDZFPPEO5YoXXtoGOa2eK prIWuo6BK7zfCPXuZLcQmPJN2ZIayD40xlbh3uN2CTCxQh9cve0OfmEFcsbxpb31+0cULB uIsKMxIZ+CfxDLWKx8EH4CX2zf7GmIWn5X9I827oo8YpGuh7SXuvpkhC+jn0Iw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cTGznOHKahjOyOaHN+7hlLcsbOM+zhTcm9ykrh8ioMY=; b=F4xXv6/f3ssTM8g13Ax7eZ076Wp1315fF0h3UqXsUImuhtBZn/9Os6OD3+KbEtjBZyMAhU RLK09NiTFO/iVzAwbyYMZYW9mL+bm8VKc/fyq0/dgQt2pGXdZ9cCOEbgs+xVPiz/W0o3/i ug4//hltyIkB/KGuhK6YOve7ZxZ/+RvF0w4rJo7gpueMfWu+lD7GUPvBfiHH15lqR/oYKw Z+Z1Tqv+9ZoQlBi18/GwTotMH7ylqyUN8hzpC6jksyYfNH3DyEo0BD8pWSGDCZq+84usRT IdQ5yYEtHgfkhOFTn9TBmP/0DXVEyJ41jNwL4f7k7lBbTCUEpsgaPmNJKMqyQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPg5zkBzZ2y; Tue, 24 Oct 2023 18:36:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIatTU087337; Tue, 24 Oct 2023 18:36:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIatX0087334; Tue, 24 Oct 2023 18:36:55 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:36:55 GMT Message-Id: <202310241836.39OIatX0087334@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 83a00a92dab0 - stable/14 - Move kern_extattr_* prototypes to List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 83a00a92dab019a4f4cd413c2a2b79f861ec0788 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=83a00a92dab019a4f4cd413c2a2b79f861ec0788 commit 83a00a92dab019a4f4cd413c2a2b79f861ec0788 Author: John Baldwin AuthorDate: 2023-09-08 23:36:28 +0000 Commit: John Baldwin CommitDate: 2023-10-24 17:00:57 +0000 Move kern_extattr_* prototypes to All of the kern_* prototypes belong in this header. While here, sort the prototypes by function name. Reviewed by: dchagin Fixes: 6453d4240f6b vfs: Export exattr methods to reuse by Linuxulator Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D41766 (cherry picked from commit 3555be0124a4f105c72d932f00071f332691e8cf) --- sys/kern/vfs_extattr.c | 1 + sys/sys/extattr.h | 22 ---------------------- sys/sys/syscallsubr.h | 20 ++++++++++++++++++++ 3 files changed, 21 insertions(+), 22 deletions(-) diff --git a/sys/kern/vfs_extattr.c b/sys/kern/vfs_extattr.c index e178589067c1..dc1bbb58644b 100644 --- a/sys/kern/vfs_extattr.c +++ b/sys/kern/vfs_extattr.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include diff --git a/sys/sys/extattr.h b/sys/sys/extattr.h index a6689c869c0c..a16ef238656f 100644 --- a/sys/sys/extattr.h +++ b/sys/sys/extattr.h @@ -62,33 +62,11 @@ #ifdef _KERNEL #include -enum uio_seg; -struct uio; struct thread; struct ucred; struct vnode; int extattr_check_cred(struct vnode *vp, int attrnamespace, struct ucred *cred, struct thread *td, accmode_t accmode); -int kern_extattr_set_path(struct thread *td, const char *path, - int attrnamespace, const char *attrname, void *data, - size_t nbytes, int follow, enum uio_seg pathseg); -int kern_extattr_set_fd(struct thread *td, int fd, int attrnamespace, - const char *attrname, void *data, size_t nbytes); -int kern_extattr_get_path(struct thread *td, const char *path, - int attrnamespace, const char *attrname, void *data, - size_t nbytes, int follow, enum uio_seg pathseg); -int kern_extattr_get_fd(struct thread *td, int fd, int attrnamespace, - const char *attrname, void *data, size_t nbytes); -int kern_extattr_delete_path(struct thread *td, const char *path, - int attrnamespace, const char *attrname, int follow, - enum uio_seg pathseg); -int kern_extattr_delete_fd(struct thread *td, int fd, int attrnamespace, - const char *attrname); -int kern_extattr_list_path(struct thread *td, const char *path, - int attrnamespace, struct uio *auiop, int follow, - enum uio_seg pathseg); -int kern_extattr_list_fd(struct thread *td, int fd, int attrnamespace, - struct uio *auiop); #else #include diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index 8be860dc0fd4..0480eda2fca4 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -139,6 +139,26 @@ int kern_cpuset_setid(struct thread *td, cpuwhich_t which, int kern_dup(struct thread *td, u_int mode, int flags, int old, int new); int kern_execve(struct thread *td, struct image_args *args, struct mac *mac_p, struct vmspace *oldvmspace); +int kern_extattr_delete_fd(struct thread *td, int fd, int attrnamespace, + const char *attrname); +int kern_extattr_delete_path(struct thread *td, const char *path, + int attrnamespace, const char *attrname, int follow, + enum uio_seg pathseg); +int kern_extattr_get_fd(struct thread *td, int fd, int attrnamespace, + const char *attrname, void *data, size_t nbytes); +int kern_extattr_get_path(struct thread *td, const char *path, + int attrnamespace, const char *attrname, void *data, + size_t nbytes, int follow, enum uio_seg pathseg); +int kern_extattr_list_fd(struct thread *td, int fd, int attrnamespace, + struct uio *auiop); +int kern_extattr_list_path(struct thread *td, const char *path, + int attrnamespace, struct uio *auiop, int follow, + enum uio_seg pathseg); +int kern_extattr_set_fd(struct thread *td, int fd, int attrnamespace, + const char *attrname, void *data, size_t nbytes); +int kern_extattr_set_path(struct thread *td, const char *path, + int attrnamespace, const char *attrname, void *data, + size_t nbytes, int follow, enum uio_seg pathseg); int kern_fchmodat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, mode_t mode, int flag); int kern_fchownat(struct thread *td, int fd, const char *path, From nobody Tue Oct 24 18:36:56 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPj1P7Qz4yM3m; Tue, 24 Oct 2023 18:36: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 4SFLPj0l58z3XqN; Tue, 24 Oct 2023 18:36:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5tuBSTbHLmiG0JQLIqVXaDQpzZkmjQtA58mvi5KU+Xo=; b=nNky3ak+Wrto7bT5xJLmmXJMKjji3TPiRpZgJSQj5TorsM7Oqhz7ReSULPTh4JrGmV1akf zSB161jsL9zdJHTJQpt4B/fUG+pxpOpxbiihvA2ZTlVUPk/MxvSCgmGIzbfm5HO81jKRJt 5+zP9nzYuf63w8vdlyu7JZjnvTRreSwS5Q4gVdSgXZ091LXYyq/UMUNJ472FPF0V3KF4q5 k9dvH8JSnDozaJulKyRywEXt7FM3uTMnczNMn38+7XSVoKYsuJHUHi65i86bIFEEoamMxT kkPrP9CQ1rLTeY/62TsXaBD4ysbAY9RX1gCm9Ahzgn6rEluyDqi7OPtnFfxaDA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172617; a=rsa-sha256; cv=none; b=DCqu3S48VvB0RNv+y/xhg+QDuyUtShIACUBunsutxXigVJxF6Gy/IX8Q8teJHW4q27O8fs zrBMa2RWHeM8QzukhPO4dsja9VvcV1PJcKi+5VKZkdhcVZqqWRn3ygWC0hSsqqPgxdGpzG sxxGgT1xtLoa9bIrj7cCJIZZqF/vi4mcI9qUrS2cSkqI/zIyBHg59inNg1rruL/1swzw6W M8l3bVRUe1G3kvePg3m1pTeCIniXAtKG7tU31OIVU9de6/Z/uu2+/jlQH4UzU0GnDNygjT Q9L8MVzFHZMlqBXNgZPo0CvLgWSkPTwGS5CA09Av8cHynB8R5ZUseTu0EEEtFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172617; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5tuBSTbHLmiG0JQLIqVXaDQpzZkmjQtA58mvi5KU+Xo=; b=hpMpxm23GR5j5tcoe8QFroETVAXqRYHYIPpi49yACs7dhhvIbEC0A0ovqVue0Nxr3Jck8l ed5uTwKpj8Ld0BNLgJ9vbCgEx6r1282dMMJgYEgad2K+coB3SLpy0iXxxiND9tEMb5jrfs +oJ4xZyujkxYTVJBzKdCTeVGCR8j/ZWQjqQgOGRknpc/R8C2aYciP3aPmWlZaNZGCUU2UK K+nHeMfbwM14SlVKc9k4DSs9Muw/NxPuD0cL99Vj9XZ12KbYc+n0sj1iB1MqzTb2dRWuPJ F6JjHdneu3Ocw8UlO3V5NT+OJV530e+RBIVv+49Nad//vWVdb6FlXq/JlgUBrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPh6gDlzYmL; Tue, 24 Oct 2023 18:36:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIaufI087394; Tue, 24 Oct 2023 18:36:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIauDE087391; Tue, 24 Oct 2023 18:36:56 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:36:56 GMT Message-Id: <202310241836.39OIauDE087391@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: e949b671c555 - stable/14 - makeman: Use ${make} instead of plain make to compute ${requireds} List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e949b671c5550266ab88bd9d08e096af6a1550e4 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e949b671c5550266ab88bd9d08e096af6a1550e4 commit e949b671c5550266ab88bd9d08e096af6a1550e4 Author: John Baldwin AuthorDate: 2023-09-08 23:36:52 +0000 Commit: John Baldwin CommitDate: 2023-10-24 17:01:07 +0000 makeman: Use ${make} instead of plain make to compute ${requireds} This is currently a no-op but can matter for downstreams whose ${make} includes additional settings. Reviewed by: imp, emaste Obtained from: CheriBSD Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D41777 (cherry picked from commit 9c80d66ec1b4c5b9ac7aaf5b0fdbb1628d49c181) --- tools/build/options/makeman | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/build/options/makeman b/tools/build/options/makeman index ac5aaa8b8b03..4e44c78b0278 100755 --- a/tools/build/options/makeman +++ b/tools/build/options/makeman @@ -116,7 +116,7 @@ show() exit 1 ;; esac - requireds=`env -i make -f ${srcdir}/share/mk/src.opts.mk \ + requireds=`env -i ${make} -f ${srcdir}/share/mk/src.opts.mk \ -V '${__REQUIRED_OPTIONS:ts,}'` env -i ${make} .MAKE.MODE=normal "$@" showconfig __MAKE_CONF=/dev/null \ SRCCONF=/dev/null | From nobody Tue Oct 24 18:36:57 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPk2QPhz4yM3s; Tue, 24 Oct 2023 18:36: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 4SFLPk1bLMz3Xr9; Tue, 24 Oct 2023 18:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zPNqPpaJtlqWM5v61qniv05+Ma3B6tQtZv7xApf3N28=; b=BH6ixgDZkBsHVls76hiS+CNocrOrH5rPyTeeTe4v+Yx8dWvG2QK+Dh11tPmoHjGGdMwZds 0oetbgu070IKmbVEsKYVxsPfnQXDbEMqRGhdDH8kK0piWzTZ3TuaceS9407kXpZ/HBKhiA scSXqB47a28ZcYFgfACnmnCjKu33XPeoVYFraXSUo+L7BZpY7fwKM6UqhgohuYFP4lnp7C YNzK/QfxvekVW1iX5h7ry+h6Y8NmWlhiCezNfLKCbebS6ihR6i7mcVE4YPrG1ir6j+CROX 92Tz9oDXdaKn7EL4qKBOMEUt6C5iOa7ZMICfqsexUK9bHCmNw/4I8N/7kSQ80g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172618; a=rsa-sha256; cv=none; b=LUPTZsFas9Ufa19Xtvpiwemr4ghhZxzZh9u4ZLa/YEWuxhst+dWpunziiS2vdmsSj9gJUT YvAWFuhJj14R34/+Av5DhDqlQB7GxlONoIKZJpl0XruOU1XsUbUJ80Fkm3RCr7+k01/dIQ j3VPIPCGZn5CoEABGODmnVx0JfT1rWZ7RMFz5hofKI+GTQSoZ0aatSZ3o71/ZmvTa4RAHe c3XU9stkYu/Tah22XVzmnD/HYr3Q+3Vh/YqyIZb4hXmZ4koAFfsKjZMN1FUX3Kkc4kMuhG 98Br4FPoyGe8up7kr7rBrbDRGG0QFy9Vy1eSPGRvc1okaF4Kmh31F7at5fdXOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zPNqPpaJtlqWM5v61qniv05+Ma3B6tQtZv7xApf3N28=; b=euEFAgoAljiOFE84tasfYk7f6lWxhs1/Sb7OSPR33rCdhSQUTMoJeyARmanJVJyjPJRSP7 EZHvlOFDtgYuQxOa2ABkGV4zKOm7xclYgoqOT8bHqQ0fk1Kkz6Y/ZQ3JwuLFTRuVsn23vj +FIsAMWAoDbLcmfwrlrKiucK7fM3i8yLOoLBpotSUCFF6VlUWOz9dOvDbotxK+F4i4iMy/ pYIhcrsc/GVzcPFfYjjz86uPmxJkspLm2HJ0HZV9WPIQrXAA1x9wVdwUkdsgRWuvEm1M3B wuqJsvg/KR6ydWBtDTVazSjaq9O7NaYDpTKz2zXsmmy1YeujIHARCcbi5vTuzw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPk0K4gzYZv; Tue, 24 Oct 2023 18:36:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIavRp087438; Tue, 24 Oct 2023 18:36:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIavdc087436; Tue, 24 Oct 2023 18:36:57 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:36:57 GMT Message-Id: <202310241836.39OIavdc087436@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 973e31028bf9 - stable/14 - ifconfig/ifvlan.c: Whitespace fix List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 973e31028bf905230ed464ee8f0e6a5ed5238d6b Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=973e31028bf905230ed464ee8f0e6a5ed5238d6b commit 973e31028bf905230ed464ee8f0e6a5ed5238d6b Author: John Baldwin AuthorDate: 2023-09-23 20:27:49 +0000 Commit: John Baldwin CommitDate: 2023-10-24 17:01:13 +0000 ifconfig/ifvlan.c: Whitespace fix (cherry picked from commit 701468baa415c7d563d1ad28d3133d0a976908e6) --- sbin/ifconfig/ifvlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifvlan.c b/sbin/ifconfig/ifvlan.c index 7fb63b8142f4..90854885b561 100644 --- a/sbin/ifconfig/ifvlan.c +++ b/sbin/ifconfig/ifvlan.c @@ -4,7 +4,7 @@ * Copyright (c) 1999 Bill Paul * Copyright (c) 2012 ADARA Networks, Inc. * All rights reserved. - * + * * Portions of this software were developed by Robert N. M. Watson under * contract to ADARA Networks, Inc. * From nobody Tue Oct 24 18:36:59 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPl3n4Wz4yLpH; Tue, 24 Oct 2023 18:36: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 4SFLPl2HRvz3XtC; Tue, 24 Oct 2023 18:36:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h2UWjFeG7QSt0ZdZw4b4n3DOiYNxGasp11nWcr2bjeQ=; b=jU6EPAye8QyTFyhGn20Bc2HXsC5iACqsUR3e1WGYb9p4SfpRTQP46iY1cu0P+KpaAqG/rT pGxhsvxdqcon2jnaomGZCCacZA40FK1turk1jpUYeDeUjME2+m0SeCGsDTi6n3dN5eL2Pj 3rX8sBm6NYP3sFMoZpFOfZyCj0hlM6KsDt/OHTWO6oLbMO3rcXqabLA0zETxxdW03g1XyV 0uvlb8uya8DqSKLnw1/YhBIag2bNe2bZVgd0uVkcegxnoDdp96q2A9p2k7HJqrKRy/HQUZ XWVdLyPwR085oc+BxizfuVB1YWkuVnhQPZucyLlFAahS0P3Y/fl0UtYd1KT/Rw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172619; a=rsa-sha256; cv=none; b=azyspgHiXcaddeVCbvfJBEcwSrls+feGclIJHgSTJ5N+KoGA/j7hylydC0XeHyfR5BoU5s H69qS+eqzaPB5/51qKi1lblfLB99prRY1JyYZfWkDzcLN65vml4A8I3gQyMGEGDWgXBSVg F8TqwnDzFbcv3/47jUy1CGRmv2xrmoDTxp5eYa8qfKOkLPm1K+6V4UAqoKpWEEpzG3WrRm 5SrLwBilPsUDV0l1CmK4/V07o/xnJmj3jBHDWf/LkJqEINyt9++sYTH/lRH1KqPl5ROGB6 xJGL7N72gzA6pYTO/maz0Y3AFxfJsPt5oRTB7h7kHbeEkvcMICzkX6seBIMsIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172619; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=h2UWjFeG7QSt0ZdZw4b4n3DOiYNxGasp11nWcr2bjeQ=; b=Upn2kq9mv4IZIYsSYyYp6ujQ0AcbxgMfAGhvWIYvl10zekIL5/yM3sMYG4ggYHnOqg8cmT +klnpyilpKeKK4cmkV0mzhUqzsOjoDQB352vU9O7jHvfrZznTcwr3rnssgaQDQTidu+M88 9qyPc1LlfM0T5EmXz/V2kRmTmz4fTmDKAzZeDvwR6YNF8q/R4GA6Beg4t7MvtGyy6UXi10 rC7fyGDd5JCnEu7D6TAmlmDtElPgWOjnNVc5hDJlEyx59e1sWHDP4oa/+FnObA8jyhbCnk ImDg0UqUDzp8RtO4W4xdikNpm9MkN3GioNNwQJREBYMoOTwiA1r6/sDnTuejYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPl1LCdzYmM; Tue, 24 Oct 2023 18:36:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIaxGP087498; Tue, 24 Oct 2023 18:36:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIax42087495; Tue, 24 Oct 2023 18:36:59 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:36:59 GMT Message-Id: <202310241836.39OIax42087495@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a74d0e30bfd6 - stable/14 - factor: Remove an empty #ifdef __FBSDID clause List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a74d0e30bfd6833fcbed1c710b68eccf09bb0fdc Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a74d0e30bfd6833fcbed1c710b68eccf09bb0fdc commit a74d0e30bfd6833fcbed1c710b68eccf09bb0fdc Author: John Baldwin AuthorDate: 2023-09-23 21:49:11 +0000 Commit: John Baldwin CommitDate: 2023-10-24 17:02:32 +0000 factor: Remove an empty #ifdef __FBSDID clause (cherry picked from commit f2f73fa7bd4b24c22ced0ff4566e03115dc9cb5f) --- usr.bin/factor/factor.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.bin/factor/factor.c b/usr.bin/factor/factor.c index cc25b9dd2bf5..53a369f10506 100644 --- a/usr.bin/factor/factor.c +++ b/usr.bin/factor/factor.c @@ -42,8 +42,6 @@ __SCCSID("@(#)factor.c 8.4 (Berkeley) 5/4/95"); #ifdef __RCSID __RCSID("$NetBSD: factor.c,v 1.19 2009/08/12 05:54:31 dholland Exp $"); #endif -#ifdef __FBSDID -#endif #endif /* not lint */ /* From nobody Tue Oct 24 18:37:00 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPm3vnfz4yLbn; Tue, 24 Oct 2023 18:37: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 4SFLPm35b4z3Y6p; Tue, 24 Oct 2023 18:37:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+LOd5bse5POtzVW1rz+ZIiXC/ICSybnhZ/BzJJwnd9I=; b=s3dYC40SBeZR6bVBU1DxAjufXFjXrV6aM4vq3zU4z1vLr+gCY9Tqn0O4aCJPsrWen/VDMn PEd3VRvnbZtFyQjATktkNAgdl9bvxYxCKoGzW5WKc9eJCQ7EMCr3wz79eET4bXl9YrYWx/ 3BiVQFpt7gl3Y4p1ahB1F3GLzHS7Buc/Z15aXvOkOisr3bPs3jABpol7il5RVTrxC1hXyH 84lb0gA2fTaGavsHWj8/cuKjOwOvx0vE8eOOlf2VjiWw9WLw7M3rXwSyHX2RKXDOG0rAg4 HkJpYqPuOnRvZyWupC3P2KUGcuaVpUmUvY1Fg+4bwSclce9oyJVBIRU0zpsP8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172620; a=rsa-sha256; cv=none; b=EzilzfEu/uLAW6tB3dDiPmkiDjaG1CMH94PLpW/IBipBosAB6ff73wcS7B4OJVgxi5zVwT UxjKXAYgpTROp2p/m0a5srUNJwmKQ2bAjFLbt18mQFgucFs0gRgVYIpdyQCDxJoMbtmUfq sdBFF5Q8TAYGdEcpKBHPXaZFPubbVC5q0mosZ9ne9eiNsskDvuU6sLMg99ynLXCPPOQmYE hpDGGZYGqiOj7wE37woo2iJYUn4Fl0bajy/rwg6h+h9RHlkTLjdQ/CTh37KlqrlUZS5sdL wHDcKN8r8lZM7pEVzOh86XppG3+Iolls62UGzNN7Nm0rIuLs2TfRP/tOZN8uZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172620; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+LOd5bse5POtzVW1rz+ZIiXC/ICSybnhZ/BzJJwnd9I=; b=p5nDS9OuEZaztX5DqQeLQuqkO4p/5TyfJIEt8M8jRFxG3awL6XfEKqddmznoKPOckhXL0R bJXSnqwlkmnBUB7mDwUfVotbObI0ZKscB9rONBn+N4AsKkYuG9eXw7jAGmRTaYjGqJHgAZ 4VcMXgyqqdYYiKoXRjvF/vFePXeimbuqKk8ar5GJqNVqJrV2VyVcgBeOVYabIxPcnLiHpc hkqSWrjLb8Q+3L1drSS212HscgQvHmnMadmUpwhci1J8BjJxw/33wjNaHsPQ3Ff1iWorOG EpIwxVJDCimCB2t7+bvwobJDRzg1bDNZKT5KsYD80lCaCPYdxTmGPvltbmKYHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPm1vPKzZ30; Tue, 24 Oct 2023 18:37:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIb0Mb087677; Tue, 24 Oct 2023 18:37:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIb0K1087655; Tue, 24 Oct 2023 18:37:00 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:00 GMT Message-Id: <202310241837.39OIb0K1087655@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a2972d873753 - stable/14 - make_*_driver.sh: Don't include $FreeBSD$ in generated files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a2972d87375377858698a3cfdfda171d79440a65 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a2972d87375377858698a3cfdfda171d79440a65 commit a2972d87375377858698a3cfdfda171d79440a65 Author: John Baldwin AuthorDate: 2023-09-25 14:46:09 +0000 Commit: John Baldwin CommitDate: 2023-10-24 17:02:54 +0000 make_*_driver.sh: Don't include $FreeBSD$ in generated files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41950 (cherry picked from commit 97232e04ca07dffeef629c1628f1cc95f062b41a) --- share/examples/drivers/make_device_driver.sh | 8 -------- share/examples/drivers/make_pseudo_driver.sh | 6 ------ 2 files changed, 14 deletions(-) diff --git a/share/examples/drivers/make_device_driver.sh b/share/examples/drivers/make_device_driver.sh index 3ed8d784c1c0..5b8f8efa6469 100755 --- a/share/examples/drivers/make_device_driver.sh +++ b/share/examples/drivers/make_device_driver.sh @@ -34,8 +34,6 @@ else fi UPPER=`echo ${1} |tr "[:lower:]" "[:upper:]"` -RCS_KEYWORD=FreeBSD - if [ -d ${TOP}/modules/${1} ]; then echo "There appears to already be a module called ${1}" echo -n "Should it be overwritten? [Y]" @@ -90,7 +88,6 @@ DONE ####################################################################### cat >${TOP}/i386/conf/${UPPER} <${TOP}/dev/${1}/${1}.c < -__FBSDID("\$${RCS_KEYWORD}$"); - #include #include #include /* cdevsw stuff */ @@ -956,8 +950,6 @@ fi cat >${TOP}/modules/${1}/Makefile <${TOP}/i386/conf/${UPPER} <${TOP}/dev/${1}/${1}.c < -__FBSDID("\$FreeBSD\$"); - #include #include #include /* SYSINIT stuff */ @@ -389,8 +385,6 @@ fi cat >${TOP}/modules/${1}/Makefile < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 4ebc032713d5 - stable/13 - ifconfig/ifvlan.c: Whitespace fix List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4ebc032713d523879b831c6b1fa3cd98803a9012 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4ebc032713d523879b831c6b1fa3cd98803a9012 commit 4ebc032713d523879b831c6b1fa3cd98803a9012 Author: John Baldwin AuthorDate: 2023-09-23 20:27:49 +0000 Commit: John Baldwin CommitDate: 2023-10-24 18:13:18 +0000 ifconfig/ifvlan.c: Whitespace fix (cherry picked from commit 701468baa415c7d563d1ad28d3133d0a976908e6) --- sbin/ifconfig/ifvlan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/ifconfig/ifvlan.c b/sbin/ifconfig/ifvlan.c index 40e1f697db7a..214af72f56fc 100644 --- a/sbin/ifconfig/ifvlan.c +++ b/sbin/ifconfig/ifvlan.c @@ -4,7 +4,7 @@ * Copyright (c) 1999 Bill Paul * Copyright (c) 2012 ADARA Networks, Inc. * All rights reserved. - * + * * Portions of this software were developed by Robert N. M. Watson under * contract to ADARA Networks, Inc. * From nobody Tue Oct 24 18:37:01 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPn4FWXz4yLt5; Tue, 24 Oct 2023 18:37: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 4SFLPn3pGdz3Y7M; Tue, 24 Oct 2023 18:37:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D3WDoyKXHDNWtfZFCSsQGFKWbahuuQYyMig7a0/xphY=; b=MSY1OxDogBKur5JTfvvbblypb/ygbMVIiPmkd7TymU4wi9WVBzl6MzTDqvw79VHVTDOGET n0FVhaUbHU3yxLJ0WVh4R5fR4nm/8OV8cQJXOq1jaIhyf82H21i5XWAtDr+igCsP8H6Sah xAEYn8V2wBObKp1KR/tzg1c+lo7XpGyRmwU706GkRLAbctOsr94zGQqoT0O+hTziLu3SEr L6iOl51bZg9e0DivgTDFWAhCbttqfIypo3wt2Nn9jPrkMYw1ZgiEpNOCq9EVCw+EFIUxNq HJlHiDpXC0Lr4gRaoaRn5no/VfmHcgbLeLla0rmAwqKSGZLuG/zc50oeYXW2nw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172621; a=rsa-sha256; cv=none; b=mvavLQPBivfnlBefQcq52szSaWM7y7ilvmZpDTU0UnXFqGlB3DYbJc6doNNriyuP0iPoo1 VER17MjeAlE/hvDoAROi/7sZKTUuZ49RbZPRYoItNKVCYBi1IafKvbxzIkgau2KJsBBUTg KZ/Po5JT63kxFc+vQxYWBR1O1beGxHoeK26eEiiGHnyRZCxcAAoy9x8eZetvhXhwWjDV2l DR3DiYeO46pCWiosZ5QcCPMhO5vkgYkoai/PVcvptU1xz8kqxwYdBvo3ZRF6GJNt45lHoQ 9JfAs/0pBFWA9hl+N0uvbR2J9h9yg3bHPWyT1QoEjiR4Gic5Ci4jEFWgUE0ywQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=D3WDoyKXHDNWtfZFCSsQGFKWbahuuQYyMig7a0/xphY=; b=XvBTYw2ZLc+FYr9+mBHR50XJAfZBnwhpkzh0+F3WkuIxZ5WkVdVfmaikDgCmiGcU8Zug2r pxMk/0sS95s3ZJ6N9ua8m9z23iBnp6bex6d5Y8th6OkTUV0ZxrlGFI3MsLqTfRucKfKee8 Vhv+kTl/n6+hXVV+dBWJ1nEIYC+p/gAMdgolI74v3NHNZydRjKu+P8ZZdzjOnUGu0bGqOH Jw/Mn98tbx6j8OapMYpGT+yEWbssmLTBt0QEuoIHTGDsr4dg6VXyHYPfiVVrHdYF2LjXsB a9ecbLz5Y4VnQkajbPYntW3jiDXndQD2Y5UJpt2xCmLbQ8wlyYOJolMipYjWvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPn2tDyzYqD; Tue, 24 Oct 2023 18:37:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIb18q087779; Tue, 24 Oct 2023 18:37:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIb1b9087777; Tue, 24 Oct 2023 18:37:01 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:01 GMT Message-Id: <202310241837.39OIb1b9087777@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 7a5518ed1a88 - stable/13 - factor: Remove an empty #ifdef __FBSDID clause List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7a5518ed1a88b07d7e571c74bbbd67d77cc286c2 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7a5518ed1a88b07d7e571c74bbbd67d77cc286c2 commit 7a5518ed1a88b07d7e571c74bbbd67d77cc286c2 Author: John Baldwin AuthorDate: 2023-09-23 21:49:11 +0000 Commit: John Baldwin CommitDate: 2023-10-24 18:13:18 +0000 factor: Remove an empty #ifdef __FBSDID clause (cherry picked from commit f2f73fa7bd4b24c22ced0ff4566e03115dc9cb5f) --- usr.bin/factor/factor.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.bin/factor/factor.c b/usr.bin/factor/factor.c index 8591976b70ed..279028572fe3 100644 --- a/usr.bin/factor/factor.c +++ b/usr.bin/factor/factor.c @@ -42,8 +42,6 @@ __SCCSID("@(#)factor.c 8.4 (Berkeley) 5/4/95"); #ifdef __RCSID __RCSID("$NetBSD: factor.c,v 1.19 2009/08/12 05:54:31 dholland Exp $"); #endif -#ifdef __FBSDID -#endif #endif /* not lint */ /* From nobody Tue Oct 24 18:37:01 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPn4BYzz4yLt3; Tue, 24 Oct 2023 18:37: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 4SFLPn3cDtz3Y0X; Tue, 24 Oct 2023 18:37:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8nHgN3UvA51VS53NzQ1+8ih/zpGfl15IWavvbg161GA=; b=oFUwspUqTei11dktcKC/AzCz8wmNWhY5ZmcJXF9TUCzd4xr95kRlAYD13d+E1pGg/vYSGr ThG2dZ+svg2/du+ZrpHeUlal5kDts7rxxHUQwjSBAx5rKtfiu0HyGMv9bhQRzjG6fZFneW 6L7/8BBlsKyb+aHASYCzqJLU/KzBkgKeUuB2p7S+iG9oXVqTWcej+q05mAygS8pizoBxEo /qD1QgA6PPtUs/05RULqAUpNF2i+SRoV+dHWe6nG5lc0VHJPiRdqHS/V/FyC7EFNpJQlAW uIzhZO6HbkoJ1ZfMKHutV2GlyC5eAbeT/YS/GN5x4+eGP+trneKlBq88ymraYA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172621; a=rsa-sha256; cv=none; b=B8hQ8PMaQScFJsIe1CLLYKYTR/ztGvEC2MaHm1kV846MgrQSm8EODWbYBdWc2QMeE9bVTx 8lipZdoxI86GcuSKcpCBmWuMJsCgr0kevnu+dYgV4aT1Zk+K6lFjbstST5Rym8WDc6U0Kn Icr8vUOU74qWNJ/nYTD7qdSdv25WOMWtd1xYGkeE+SLo2uzRTjhRMkwVzeF3PTGZ7uHo27 lI9CanD7+Fsfw85bzpOFNbaLvfsEIrv+vl2DSFrchz35Rp7ZEo9DVdz/EGWexv4qqGRRT+ PAyPSpWSfb2z2TXLgRUxc7dhp1zOqh7yY8DGoY3wbGBoZSuWjQNM5mf/ODNflw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172621; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8nHgN3UvA51VS53NzQ1+8ih/zpGfl15IWavvbg161GA=; b=uy/GhOiow1MM7FfpHpuoir3qHImTtyDnTQzGoLYbjiFEmcXm8HHQr9TGSQPXjy9MXhuIXD 81SPwE2vD6OiwB9W/DgF30xUS2c9Tdgf4+0TZ3MDplUF3ds3ErCe4JRaB6S6/rUOQowDBj AmO31CCyt9z+n3iwX0+BPz5c/KJO1cc4ruKh2RLAwWXwwtoCn/0YOLNWDN5yuvesUfS6tn yvcRtTWD/0oU0ie9DL1lxNMB4/fGxzAPnvtbp5rwneKq+kPtW/1pxN5YcZ7RU4OyuffV9f 4nk+6h2thlEs6Ua9hKNvtlk/RUsHR5wSZAnm6OKgOQ1E453F6t//Yg7JtZvFxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPn2jjZzYX7; Tue, 24 Oct 2023 18:37:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIb1J2087780; Tue, 24 Oct 2023 18:37:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIb1j6087771; Tue, 24 Oct 2023 18:37:01 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:01 GMT Message-Id: <202310241837.39OIb1j6087771@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 495a10475144 - stable/14 - Retire old diskless setup scripts List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 495a1047514482ec66edca26190c1049fff3518d Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=495a1047514482ec66edca26190c1049fff3518d commit 495a1047514482ec66edca26190c1049fff3518d Author: John Baldwin AuthorDate: 2023-09-25 14:46:21 +0000 Commit: John Baldwin CommitDate: 2023-10-24 17:08:05 +0000 Retire old diskless setup scripts These scripts predate /etc/rc.diskless* and use a different scheme. A comment was added to them back in 2002 noting they were 3 years old at that point. Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D41951 (cherry picked from commit 7736786b08e8c9edb07088db3229695d0afed600) (cherry picked from commit f97a3f6a017103b2afaf451af055ec4131a455a9) --- ObsoleteFiles.inc | 6 + share/examples/Makefile | 8 - share/examples/diskless/ME | 52 ------ share/examples/diskless/README.BOOTP | 172 ----------------- share/examples/diskless/README.TEMPLATING | 301 ------------------------------ share/examples/diskless/clone_root | 137 -------------- 6 files changed, 6 insertions(+), 670 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index dbb4eda24416..82caeac0db1d 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -58,6 +58,12 @@ OLD_FILES+=usr/tests/sys/netinet/tcp6_v4unmapped_bind_test OLD_FILES+=usr/share/man/man9/cr_seeothergids.9.gz OLD_FILES+=usr/share/man/man9/cr_seeotheruids.9.gz +# 20230925 +OLD_FILES+=usr/share/examples/diskless/ME +OLD_FILES+=usr/share/examples/diskless/README.BOOTP +OLD_FILES+=usr/share/examples/diskless/README.TEMPLATING +OLD_FILES+=usr/share/examples/diskless/clone_root + # 20230906: caroot bundle updated OLD_FILES+=usr/share/certs/trusted/E-Tugra_Certification_Authority.pem OLD_FILES+=usr/share/certs/trusted/E-Tugra_Global_Root_CA_ECC_v3.pem diff --git a/share/examples/Makefile b/share/examples/Makefile index 3ee7d8c0d840..06d10a0bc149 100644 --- a/share/examples/Makefile +++ b/share/examples/Makefile @@ -11,7 +11,6 @@ LDIRS= BSD_daemon \ IPv6 \ bootforth \ csh \ - diskless \ drivers \ etc \ find_interface \ @@ -74,13 +73,6 @@ SE_BOOTFORTH= \ SE_DIRS+= csh SE_CSH= dot.cshrc -SE_DIRS+= diskless -SE_DISKLESS= \ - ME \ - README.BOOTP \ - README.TEMPLATING \ - clone_root - SE_DIRS+= drivers SE_DRIVERS= \ README \ diff --git a/share/examples/diskless/ME b/share/examples/diskless/ME deleted file mode 100644 index ff06be2c5393..000000000000 --- a/share/examples/diskless/ME +++ /dev/null @@ -1,52 +0,0 @@ -IMPORTANT NOTE: - -As of Feb. 11, 2002 (and indeed, for quite some time before that), -the /etc/rc.diskless{1,2} scripts support a slightly different -diskless boot process than the one documented in the rest of -this file (which is 3 years old). - -I am not deleting the information below because it contains some -useful background information on diskless operation, but for the -actual details you should look at /etc/rc.diskless1, /etc/rc.diskless2, -and the /usr/share/examples/diskless/clone_root script which can -be useful to set up clients and server for diskless boot. - ---- $FreeBSD$ --- ------------------------------------------------------------------------- - -When templating, /conf/ME is typically a softlink to -/conf/. When doing a diskless boot, /conf/ME is -retargeted by /etc/rc.diskless1 from pointing to the server to pointing -to the client's directory, /conf/. The retargeting -is accomplished through an MFS -o union mount. - -When templating, this softlink should be different for each machine. -When doing a diskless boot, this softlink is typically part of the / NFS -mount from the server and points to the server's conf directory, but gets -retargeted during the /etc/rc.diskless1 phase. - -System-wide configuration files must generally be targeted through /conf/ME. -For example, your /etc/rc.conf.local should become a softlink to -/conf/ME/rc.conf.local and your real rc.conf.local should go into the -appropriate /conf/ directory. This is also true of -/etc/rc.local, /etc/fstab, /etc/syslog.conf, /etc/ccd.conf, /etc/ipfw.conf, -/etc/motd, /etc/resolv.conf, and possibly even /etc/ttys ( if you want -to start an X session up on boot on certain of your machines ). - -When templating, you duplicate your / and /usr partitions on each machine's -local disk from a single master ( assuming /var and /home reside elsewhere ), -EXCEPT for the /conf/ME softlink. The /conf/ME softlink is the only thing -on / that should be different for each machine. - -There are often categories of configuration files. For example, all of your -shell machines may use one resolv.conf while all of your mail proxies may -use another. Configuration files can be categorized fairly easily through -/conf/HT. directories. You put the actual configuration file in -/conf/HT. and make a softlink from -/conf/ME//config-file to "../HT.. - - In the BOOTP workstation /conf/$IP/rc.conf.local, you must typically - turn *OFF* most of the system option defaults in /etc/rc.conf as well - as do additional custom configuration of your environment - - The /usr/src/share/examples/diskless directory contains a typical - X session / sshd based workstation configuration. The directories - involved are HT.DISKLESS/ and 192.157.86.12/. - - Essentially, the $IP/ directory ( which rc.diskless looks for in - /conf/$IP/ ) contains all the junk. The HT.DISKLESS directory exists - to hold common elements of your custom configuration so you do not have - to repeat those elements for each workstation. The example /conf - structure included here shows how to create a working sshd setup ( so - you can sshd into the diskless workstation ), retarget xdm's pid and error - files to R+W directories if /usr is mounted read-only, and retarget - syslogd and other programs. This example is not designed to run out of - the box and some modifications are required. - - >> NOTE << HT.DISKLESS/ttys contains the typical configuration required - to bring X up at boot time. Essentially, it runs xdm in the foreground - with the appropriate arguments rather then a getty on ttyv0. You must - run xdm on ttyv0 in order to prevent xdm racing with getty on a virtual - terminal. Such a race can cause your keyboard to be directed away from - the X session, essentially making the session unusable. - - Typically you should start with a clean slate by tar-copying this example - directory to /conf and then hack on it in /conf rather then in - /usr/share/examples/diskless. - - BOOTP CLIENT SETUP - - Here is a typical kernel configuration. If you have only one ethernet - interface you do not need to wire BOOTP to a specific interface name. - BOOTP requires NFS and NFS_ROOT, and our boot scripts require MFS. If - your /tmp is *not* a softlink to /var/tmp, the scripts also require NULLFS - -# BootP -# -options BOOTP # Use BOOTP to obtain IP address/hostname -options BOOTP_NFSROOT # NFS mount root filesystem using BOOTP info -options "BOOTP_NFSV3" # Use NFS v3 to NFS mount rootoptions -options BOOTP_COMPAT # Workaround for broken bootp daemons. -#options "BOOTP_WIRED_TO=de0" - -options MFS # Memory File System -options NFS # Network Filesystem -options NFS_ROOT # Nfs can be root -options NULLFS # nullfs to map /var/tmp to /tmp - - BOOTP SERVER SETUP - - The BOOTP server must be running on the same logical LAN as the - BOOTP client(s). You need to setup two things: - - (1) You need to NFS-export /, /usr, and /var. - - (2) You need to run a BOOTP server. DHCPD can do this. - - - NFS Export: - - Here is an example "/etc/exports" file. - -/ -ro -maproot=root: -network 192.157.86.0 -mask 255.255.255.192 -/usr -ro -maproot=root: -network 192.157.86.0 -mask 255.255.255.192 -/var -ro -maproot=root: -network 192.157.86.0 -mask 255.255.255.192 - - In order to be an NFS server, the server must run portmap, mountd, - nfsd, and rpc.statd. The standard NFS server options in /etc/rc.conf - will work ( you should put your overrides in /etc/rc.conf.local on the - server and not edit the distribution /etc/rc.conf, though ). - - BOOTP Server: - - This configuration file "/etc/dhcpd.conf" example is for - the '/usr/ports/net/isc-dhcp' dhcpd port. - - subnet 192.157.86.0 netmask 255.255.255.192 { - # range if you want to run the core dhcpd service of - # dynamic IP assignment, but it is not used with BOOTP - # workstations - range 192.157.86.32 192.157.86.62; - - # misc configuration. - # - option routers 192.157.86.2; - option domain-name-servers 192.157.86.2; - - server-name "apollo.fubar.com"; - option subnet-mask 255.255.255.192; - option domain-name-servers 192.157.86.2; - option domain-name "fubar.com"; - option broadcast-address 192.157.86.63; - option routers 192.157.86.2; - } - - host test1 { - hardware ethernet 00:a0:c9:d3:38:25; - fixed-address 192.157.86.11; - option root-path "192.157.86.2:/"; - option option-128 "192.157.86.2:/images/swap"; - } - - host test2 { - # hardware ethernet 00:e0:29:1d:16:09; - hardware ethernet 00:10:5a:a8:94:0e; - fixed-address 192.157.86.12; - option root-path "192.157.86.2:/"; - option option-128 "192.157.86.2:/images/swap"; - } - - SWAP. This example includes options to automatically BOOTP configure - NFS swap on each workstation. In order to use this capabilities you - need to NFS-export a swap directory READ+WRITE to the workstations. - - You must then create a swap directory for each workstation you wish to - assign swap to. In this example I created a dummy user 'lander' and - did an NFS export of /images/swap enforcing a UID of 'lander' for - all accesses. - - apollo:/usr/ports/net# ls -la /images/swap - total 491786 - drwxr-xr-x 2 root wheel 512 Dec 28 07:00 . - drwxr-xr-x 8 root wheel 512 Jan 20 10:54 .. - -rw-r--r-- 1 lander wheel 33554432 Dec 23 14:35 swap.192.157.86.11 - -rw-r--r-- 1 lander wheel 335544320 Jan 24 16:55 swap.192.157.86.12 - -rw-r--r-- 1 lander wheel 134217728 Jan 21 17:19 swap.192.157.86.6 - - A swap file is best created with dd: - - # create a 32MB swap file for a BOOTP workstation - dd if=/dev/zero of=swap.IPADDRESS bs=1m count=32 - - It is generally a good idea to give your workstations some swap space, - but not a requirement if they have a lot of memory. - diff --git a/share/examples/diskless/README.TEMPLATING b/share/examples/diskless/README.TEMPLATING deleted file mode 100644 index 48984e02b1da..000000000000 --- a/share/examples/diskless/README.TEMPLATING +++ /dev/null @@ -1,301 +0,0 @@ -IMPORTANT NOTE: - -As of Feb. 11, 2002 (and indeed, for quite some time before that), -the /etc/rc.diskless{1,2} scripts support a slightly different -diskless boot process than the one documented in the rest of -this file (which is 3 years old). - -I am not deleting the information below because it contains some -useful background information on diskless operation, but for the -actual details you should look at /etc/rc.diskless1, /etc/rc.diskless2, -and the /usr/share/examples/diskless/clone_root script which can -be useful to set up clients and server for diskless boot. - ---- $FreeBSD$ --- ------------------------------------------------------------------------- - - TEMPLATING machine configurations - - Matthew Dillon - dillon@backplane.com - - This document describes a general mechanism by which you can template - / and /usr. That is, to keep a 'master template' of / and /usr on a - separate machine which is then used to update the rest of your machines. - - Generally speaking, you can't simply mirror /. You might be able to - get away with mirroring /usr. There are two main problems involved with - templating: - - (1) Avoiding overwriting run-time generated files - - By default, the system maintains a number of files in the root - partition. For example, sendmail will dbm /etc/aliases into - /etc/aliases.db. vipw or chpass or other password related routines - will regenerate the password dbm's /etc/spwd.db, /etc/pwd.db, and - passwd. /etc/namedb/s might contain generated secondaries. And - so forth. - - The templating mechanism must avoid copying over such files. - - (2) Customizing machines. - - Customizing machines is actually considerably simpler. You create - a configuration hierarchy and convert the configuration files that - have to be customized into softlinks that run through a special - softlink in the configuration directory. This will work for every - configuration file except possibly /etc/master.passwd - - For example, /etc/resolv.conf would be turned into a softlink to - /conf/ME/resolv.conf, and /conf/ME itself would be a softlink to - /conf/. The actual resolv.conf configuration file - would reside in /conf/. - - If you have a lot of hosts, some configuration files may be commonly - classified. For example, all your shell machines might have the - same /etc/resolv.conf. The solution is to make - /conf//resolv.conf a softlink to a common directory, say - /conf/HT.SHELL/resolv.conf. It may sound a little messy, but this - sort of categorization actually makes the sysadmins job much, much - easier. - - The /conf/ directory hierarchy is stored on the template and - distributed to all the machines along with the rest of the root - partition. - - This type of customization is taken from my direct experience - instituting such a system at BEST. At the time, BEST had over 45 - machines managed from a single template. - - RUN-TIME GENERATED OR MODIFIED FILES IN / or /USR - - /etc/aliases.db - /etc/master.passwd - /etc/spwd.db - /etc/pwd.db - /etc/passwd - /etc/namedb/s - /root/.history - /root/.ssh/identity - /root/.ssh/identity.pub - /root/.ssh/random_seed - /root/.ssh/known_hosts - /conf/ME - /kernel* ( note 2 ) - /dev ( note 3 ) - /var ( note 4 ) - /home ( note 4 ) - /lost+found - - /usr/lost+found - /usr/home ( note 4 ) - /usr/crash ( note 5 ) - /usr/obj ( note 5 ) - /usr/ports ( note 5 ) - /usr/src ( note 5 ) - /usr/local/crack ( note 5 ) - /usr/local/lib/X11/xdm/xdm-errors ( note 6 ) - /usr/local/lib/X11/xdm/xdm-pid ( note 6 ) - /usr/local/etc/ssh_host_key ( note 6 ) - /usr/local/etc/ssh_host_key.pub ( note 6 ) - /usr/local/etc/ssh_random_seed ( note 6 ) - - /conf/ME ( note 7 ) - - note 2: You typically want to update kernels manually and *NOT* - template them as a safety measure. This also allows you to run - different kernels on different machines or. - - note 3: /dev must be updated manually. Some devices, such as tty's and - pty's, use the access and/or modify time and/or user/group - operationally and regenerating the devices on the fly would be - bad. - - note 4: /var and /home are usually separately mounted partitions and - thus would not fall under the template, but as a safety measure - the template copier refuse to copy directories named 'home'. - - note 5: These are directories that are as often created directly on - /usr as they are separately-mounted partitions. You typically - do not want to template such directories. - - note 6: Note that you can solve the problem of xdm and sshd creating - files in /usr. With xdm, edit /usr/local/lib/xdm/xdm-config - and change the errorLogFile and pidFile config lines. - - With sshd, add 'HostKey' and 'RandomSeed' directives to specify - /var/db for the location of the host key and run-time sshd - random seed: - - HostKey /var/db/ssh_host_key - RandomSeed /var/db/ssh_random_seed - - note 7: In this example, /conf/ME is the machine customizer and must - be pointed to the /conf// directory, which is - different for each machine. Thus, the /conf/ME softlink - should never be overwritten by the templating copy. - - - TYPICAL CUSTOMIZED CONFIGURATION SOFTLINKS - - The following files typically need to be turned into softlinks - to /conf/ME/: - - /etc/ccd.conf -> /conf/ME/ccd.conf - /etc/ipfw.conf ... - /etc/fstab - /etc/motd - /etc/resolv.conf - /etc/aliases - /etc/sendmail.cw - /etc/organization - /etc/named.conf - /etc/rc.conf.local - /etc/printcap - /etc/inetd.conf - /etc/login.conf - /etc/gettytab - /etc/ntp.conf - /etc/exports - /root/.k5login -> /conf/ME/root/.k5login - - And, of course, /conf/ME is usually a softlink to the appropriate - /conf//. Depending on your system configuration, - there may be other files not listed above that you have to worry about. - - In many cases, /conf/ME/filename is itself a softlink to - "../HT.xxxx/filename", where HT.xxxx is something like HT.STD ... this - added complexity actually makes it easier to manage multiple - classifications of machines. - - DELETION OF FILES - - Any file found on the template destination that does not exist in the - source and is not listed as an exception by the source should be deleted. - However, deletion can be dangerous and cpdup will ask for confirmation - by default. Once you know you aren't going to blow things up, you can - turn this feature off and update your systems automatically from cron. - - By formalizing the delete operation, you can be 100% sure that it is - possible to recreate / and /usr on any machine with only the original - template and a backup of the ( relatively few ) explicitly-excepted - files. The most common mistake a sysop makes is to make a change to a - file in / or /usr on a target machine instead of the template machine. - If the target machine is updated once a night from cron, the sysop - quickly learns not to do this ( because his changes get overwritten - overnight ). With a manual update, these sorts of mistakes can propagate - for weeks or months before they are caught. - - TEMPLATE COPYING AND SAFETY - THE CPDUP PROGRAM - - The 'cpdup' program is a program which efficiently duplicates a directory - tree. The program copies source to destination, duplicating devices, - softlinks, hardlinks, files, modification times, uid, gid, flags, perms, - and so forth. The program incorporates several major features: - - * The program refuses, absolutely, to cross partition boundaries. - i.e. if you were copying the template /usr from an NFS mount to - your /usr, and you had a mount point called /usr/home, the - template copying program would *NOT* descend into /usr/home on - the destination. - - This is a safety. - - * The program accesses a file called .cpignore in each directory - it descends into on the source to obtain a list of exceptions - for that directory -- that is, files not to copy or mess with. - - This is a templating function. - - * The program refuses to delete a directory on the destination - being replaced by a softlink or file on the source. - - This is a safety mechanism - - * The program is capable of maintaining MD5 check cache files and - doing an MD5 check between source and destination during the - scan. - - * The program is capable of deleting files/directories on the - destination that do not exist on the source, but asks for - confirmation by default. - - This is a templating and a safety mechanism. - - * The program uses a copy-to-tmp-and-rename methodology allowing - it to be used to update live filesystems. - - This is a templating mechanism. - - * The program, by default, tries to determine if a copy is required - by checking modify times, file size, perms, and other stat - elements. If the elements match, it does not bother to copy - ( unless an MD5 check is being made, in which case it must read - the destination file ). - - You typically run cpdup on the target machine. The target machine - temporarily mounts the template machine's / and /usr via NFS, read-only, - and runs cpdup to update / and /usr. If you use this methodology note - that THERE ARE SECURITY CONSIDERATIONS! See 'SECURITY CONSIDERATIONS WITH - NFS' below. - - Whatever script you use that does the NFS mounts should ensure that the - mount succeeded before continuing with the cpdup. - - You should create .cpignore files in the appropriate directories on the - template machine's / and /usr partitions so as not to overwrite active - files on the target. The most critical .cpignore files should be - protected with 'chflags schg .cpignore'. Specifically, the ones in / - and /etc, but possibly others as well. For example, the .cpignore - hierarchy for protect /root is: - - # /root/.cpignore contains - .history - - # /root/.ssh/.cpignore contains - random_seed - known_hosts - authorized_keys - identity - identity.pub - - WHEN INITIALLY CONVERTING A TARGET MACHINE TO USE TEMPLATING, ALWAYS - MAKE A FULL BACKUP OF THE TARGET MACHINE FIRST! You may accidentally - delete files on the target during the conversion due to forgetting to - enter items into appropriate .cpignore files on the source. - - SECURITY CONSIDERATIONS WITH NFS ROOT EXPORT FROM TEMPLATE MACHINE - SECURITY CONSIDERATIONS WITH NFS USR EXPORT FROM TEMPLATE MACHINE - - There are some serious security considerations that must be taken into - account when exporting / and /usr on the template machine. - - * only export read-only - - * the password file ( aka vipw ) may not contain any crypted passwords - at all. You MUST use ssh or kerberos to access the template machine. - - You can get away with giving only root a crypted password, but only - if you disallow network root logins and only allow direct root - logins on the console. - - * The machine's private ssh_host_key usually resides in /usr/local/etc. - You must move this key to /var/db. You can softlink link so no - modification of sshd_config is required. - - * The machine's private ~root/.ssh/identity file is also exposed by - the NFS export, you should move this file to /var/db as well and - put a softlink in ~root/.ssh. - - * DON'T EXPORT /var ! Either that, or don't put the private keys - in /var/db ... put them somewhere else. - - * You may want to redirect the location of the random_seed file, which - can be done by editing ~root/.ssh/sshd_config and - /usr/local/etc/sshd_config so it is not exposed either. - - -Matt - Matthew Dillon - dillon@backplane.com - diff --git a/share/examples/diskless/clone_root b/share/examples/diskless/clone_root deleted file mode 100755 index be5d2d2a9efd..000000000000 --- a/share/examples/diskless/clone_root +++ /dev/null @@ -1,137 +0,0 @@ -#!/bin/sh -# -# (C) 2001 Luigi Rizzo, Gabriele Cecchetti -# -# Revised 2001.04.16 -# -# -# clone root filesystem for diskless root stuff -# -# usage -# clone_root all to do a full copy (e.g. bin, sbin...) -# clone_root update to recreate /var (including devices) -# clone_root to copy /conf and password-related files -# -# This script assumes that you use a shared readonly root and /usr -# partition. The script creates a partial clone of the root partition, -# and puts it into ${DEST} (defaults to /diskless_root ) on the server, -# where it is read. -# -# To run a diskless install you need to do the following: -# -# create /conf/default/etc/fstab -# this will replace the standard /etc/fstab and should contain -# as a minimum the following lines -# ${SERVER}:${DEST} / nfs ro 0 0 -# ${SERVER}:/usr /usr nfs ro 0 0 -# proc /proc procfs rw 0 0 -# -# create /conf/default/etc/rc.conf -# this will replace the standard rc.conf and should contain -# the startup options for the diskless client. Most likely -# you will not need to set hostname and ifconfig_* because these -# will be already set by the startup code. You will also -# probably need to set local_startup="" so that the server's -# local startup files will not be used. -# -# create a kernel config file in /sys/i386/conf/DISKLESS with -# options MD_ROOT -# options BOOTP -# options BOOTP_NFSROOT -# options BOOTP_COMPAT -# and do a full build of the kernel. -# If you use the firewall, remember to default to open or your kernel -# will not be able to send/receive the bootp packets. -# -# On the server: -# enable NFS server and set /etc/exports as -# ${DEST} -maproot=0 -alldirs -# /usr -alldirs -# -# enable bootpd by uncommenting the bootps line in /etc/inetd.conf -# and putting at least the following entries in /etc/bootptab: -# .default:\ -# hn:ht=1:vm=rfc1048:\ -# :sm=255.255.255.0:\ -# :sa=${SERVER}:\ -# :gw=${GATEWAY}:\ -# :rp="${SERVER}:${DEST}": -# -# client1:ha=0123456789ab:tc=.default -# -# and make sure that client1 is listed in /etc/hosts - -# VARIABLES: -# some manual init is needed here. -# DEST the diskless_root dir (goes into /etc/bootptab and /etc/exports -# on the server) -DEST=/diskless_root - -# you should not touch these vars: -# SYSDIRS system directories and mountpoints -# DIRS mountpoints (empty dirs) -# PWFILES files related to passwords -# TOCOPY files and dirs to copy from root partition - -SYSDIRS="dev proc root usr var" -DIRS="cdrom home mnt" -PWFILES="master.passwd passwd spwd.db pwd.db" -TOCOPY="bin boot compat etc modules sbin stand sys" - -init_diskless_root() { - echo "Cleaning old diskless root ($DEST)" - cd / - rm -rf ${DEST} && echo "Old diskless root removed." - echo "Creating $DEST..." - mkdir -p $DEST && echo "New diskless root created." - echo "+++ Now copy original tree from / ..." - ex="" - (cd / ; tar -clf - ${TOCOPY} ) | (cd $DEST; tar xvf - ) - #(cd / ; find -x dev | cpio -o -H newc ) | \ - # (cd $DEST; cpio -i -H newc -d ) - echo "+++ Fixing permissions on some objects" - chmod 555 $DEST/sbin/init -} - -update_conf_and_pw() { - echo "+++ Copying files in /conf and password files" - (cd ${DEST} ; rm -rf conf ) - (cd / ; tar clf - conf ) | (cd ${DEST}; tar xvf - ) - mkdir -p ${DEST}/conf/etc # used to mount things - (cd /etc ; tar cvf - ${PWFILES} ) | (cd ${DEST}/etc ; tar xf - ) -} - -update() { - echo "+++ update: create mountpoints and device entries, kernel" - for i in ${SYSDIRS} ${DIRS} - do - rm -r -f ${DEST}/$i - mkdir -p ${DEST}/$i && chown root:wheel ${DEST}/$i && echo -n "$i " - done - echo "." - ln -s /var/tmp ${DEST}/tmp - echo "+++ Copying kernel from /sys/compile/DISKLESS" - cp /sys/compile/DISKLESS/kernel $DEST/kernel - echo "." -} - - -# Main entry point -case $1 in - all) # clean and reinstall the whole diskless_root - init_diskless_root - update - update_conf_and_pw - ;; - - update) # clean and rebuild mountpoints and device entries - update - update_conf_and_pw - ;; - - *) # copy /conf and password files - update_conf_and_pw - ;; -esac -exit 0 -### end of file ### From nobody Tue Oct 24 18:37:02 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPp5CGVz4yLfn; Tue, 24 Oct 2023 18:37: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 4SFLPp4l3Rz3Y7y; Tue, 24 Oct 2023 18:37:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X0bYV2co8G+2lCTijdImJqR6Q0yODnjdy0KgXlLbHtI=; b=qeLhOnnEIjBj5IOLIfJkrqmCag93qLIqxNmwaRVQR2cKWWi2kGrEqDXmOrkPv2GHBeTKWW osZ8JdbTK/crKaXcuWtK2RfGMaYiKIj9B9THFGbAU41hXNQ7lCZ5q8IIrO5Ts8TVGFfyH0 sE4Bmy3C+h2ZZuzD8rDq2JvsO2kLXRhyG6Gcp4KRGKPx1ztdgNcnmjjzOreUex4LtAxTjw kqtSZOWn302sbPwAf4G4hem5m4I0D9jYrarm83+fK3JjvbgbqCy3KJ8Usv6tA6amLMNz2H z47bTVJlOpyDs/SRG+6qoRGt1mnE8WUuInq3Rpe/B2xx8Iycz5PHpwS/T/KK0g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172622; a=rsa-sha256; cv=none; b=Wey52fv+dk7cBDl9h7NSVhF9NlK0dTsfivEZ905iTAuxeIsN8NYKo3zh24CQ1YApmM1zkq g2ct7OKyjg64CyjxAakTSkfFZbi1cYp8YH/AJTD2+RJ4SMVbYRQeQnfaaitt6z54azHcMG g/qPrMirMFTHPk5/jMWBMlO5a4z4EsUfuaGSrkc6Hdj2u0wzaylY8HeCqmC2oz47k8zdr7 dm8R6HaB6yxsLmssynls33sTjxLy3plHUAuWGSiq2KgWnaSvITq8fjeuASTngrjIPEA60w w7z1yH6jqtbIEVPL3hF3oPoV6nIUY9pd3fGZlqf+3d5AMlZI7C0cC28Rz7/xKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X0bYV2co8G+2lCTijdImJqR6Q0yODnjdy0KgXlLbHtI=; b=k3x6QUr0eohQwolI8uWr9eLHML9+B9kEiicuklztvE0RkTYnfvz5wKEbhekEt5kX0eYU2x KN+xn0BoycJTGDVDA1E1TenBI1WaXklBZo0ppOMMB+8F/hrbHf4trVCY8oVxr1+bTP3T6T HRh9mifkl0KJac0FAVxSHhefMB5Tzjjw3SE85ADjqtNT225j4ogo/rYYIquUBW7ZXc8AnW yDlZgXWbQT0ffPY8XVhqTJ4onuFghFkcSx6lQZGwyd0lkXeV1bk6jnJMbIfNLkcFYu8k7h p7IRzIWaejG22Jpi5veqw96Q2e52E+l7XrES3jMNtvSTBq6ia0AaVYwSdbWedQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPp3lSYzYqF; Tue, 24 Oct 2023 18:37:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIb2Vt087875; Tue, 24 Oct 2023 18:37:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIb2f1087867; Tue, 24 Oct 2023 18:37:02 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:02 GMT Message-Id: <202310241837.39OIb2f1087867@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: c6dc53e7c80d - stable/14 - videomode/devlist2h.awk: Don't include $FreeBSD$ in generated files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: c6dc53e7c80dc2acddc3df9470fd1e3bc783c8ea Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=c6dc53e7c80dc2acddc3df9470fd1e3bc783c8ea commit c6dc53e7c80dc2acddc3df9470fd1e3bc783c8ea Author: John Baldwin AuthorDate: 2023-09-25 14:46:53 +0000 Commit: John Baldwin CommitDate: 2023-10-24 17:08:19 +0000 videomode/devlist2h.awk: Don't include $FreeBSD$ in generated files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41952 (cherry picked from commit bd524e2ddb77e1c691f308359ab917414ecb8bed) --- sys/dev/videomode/devlist2h.awk | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/videomode/devlist2h.awk b/sys/dev/videomode/devlist2h.awk index 2bae373cd307..7fc75df2e8d0 100644 --- a/sys/dev/videomode/devlist2h.awk +++ b/sys/dev/videomode/devlist2h.awk @@ -39,7 +39,6 @@ NR == 1 { gsub("\\$", "", VERSION) gsub(/ $/, "", VERSION) - printf("/*\t$FreeBSD" "$\t*/\n\n") > dfile printf("/*\n") > dfile printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ > dfile @@ -48,7 +47,6 @@ NR == 1 { printf(" *\t%s\n", VERSION) > dfile printf(" */\n") > dfile - printf("/*\t$NetBSD" "$\t*/\n\n") > hfile printf("/*\n") > hfile printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ > hfile From nobody Tue Oct 24 18:37:02 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPp5xx1z4yM4b; Tue, 24 Oct 2023 18:37: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 4SFLPp4vBXz3Y80; Tue, 24 Oct 2023 18:37:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R1nxWOMZAGjzBe40crYgO8dTG53Xw/QVHGJifZHHZLc=; b=ob3DYmGyp4Y0egey2qA3trIJyoZQBStsYWIvsd3z0Rb8WFP0Jx5hcwyl8Sfo9XvRAMyjIz FZ4YpnIb0o+it15Y0C5lflOog0C9ojNgd7sweWxsTWc5rNkek9pa1vjLs8ittRRys65yq/ ZFesLWPQyvDFbSszy3KPWNVSRJo+4XBrJjNdBG/hrxO3uzsOeSiOPbyy+qW9d/n5pmd3jN dwW3Yk4AVyjvOzOun+gkR4RHEIOqMeoGk3fVeUDoCnUSDAAhUoFQSJd5Wllyw/prNc4IYG 8vnehCPc4FPGHodade8QnDS5ouVaJ5yCf6wnJabIpQ1ZzRdgGWpysYs5URubtQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172622; a=rsa-sha256; cv=none; b=S068Rjg+lph4z3PTvth/XEvbtPK6oz9Lf6yNRpYXom5zPQq4DcMzr251bDXLBSmdUemJzI wi3g50zCBcqFcfxbw5VvGJsf2GfhvL74nr/O8uqUVlDWs+Oq26heIqJ9pmH7m5LKAT4qJH mSd0UTMUNeFEnO+9Z66L+tqWMy4P4Z8Bvx6xFP58iMDGiXcFgdgCTtba2mpBgYmnowofCg Rn8xTQkMZ1Q+yewK4AuFkScemTPv49RRtkXZe/sRaMoDXW11xpr2wFswpqQOzi2zoX1nvk 3KLcZLiUhtFdkoAL86vSt94lLKvTdfyCUk1C1jm7EcVYBk6f+9dGatk2mdGzgw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R1nxWOMZAGjzBe40crYgO8dTG53Xw/QVHGJifZHHZLc=; b=DZCtIRJaOSnH5FGLajiLPfqEXMcZqRWKtQ1JKFE8c1GLTzgYXyCoWAXuhWndLFTCyCDkxr FkBf0L+iMpL8ROUa7qN2ouV+5fjzHYE3vN2VnHdEgg1S5puftEjUliPaZsNnFNi6v1s0gg Rzk/eh88ARjiWP779M/aHpl0E4rpkg9UM5rXkSbKF+vnOwQBNSpiabI0YBbR975P3r8eYE KRQU1lyWdi2BJTLS/ZhXl92Q9HjiWQ7uxGiI/SbHlGM2Roqf94ngf0kzTCWtvDHE0ZxEet pukwfP2tlADjtaM0mo2B5fLPpOKiBY/e8ITv7io1fUpH+nGv5yMcwEFU5ZUV8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPp3W5qzYmN; Tue, 24 Oct 2023 18:37:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIb2fh087876; Tue, 24 Oct 2023 18:37:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIb2at087872; Tue, 24 Oct 2023 18:37:02 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:02 GMT Message-Id: <202310241837.39OIb2at087872@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 70b875694e35 - stable/13 - make_*_driver.sh: Don't include $FreeBSD$ in generated files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 70b875694e352e6c1ea6a3cd90e554381046a58c Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=70b875694e352e6c1ea6a3cd90e554381046a58c commit 70b875694e352e6c1ea6a3cd90e554381046a58c Author: John Baldwin AuthorDate: 2023-09-25 14:46:09 +0000 Commit: John Baldwin CommitDate: 2023-10-24 18:13:18 +0000 make_*_driver.sh: Don't include $FreeBSD$ in generated files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41950 (cherry picked from commit 97232e04ca07dffeef629c1628f1cc95f062b41a) --- share/examples/drivers/make_device_driver.sh | 8 -------- share/examples/drivers/make_pseudo_driver.sh | 6 ------ 2 files changed, 14 deletions(-) diff --git a/share/examples/drivers/make_device_driver.sh b/share/examples/drivers/make_device_driver.sh index 3ed8d784c1c0..5b8f8efa6469 100755 --- a/share/examples/drivers/make_device_driver.sh +++ b/share/examples/drivers/make_device_driver.sh @@ -34,8 +34,6 @@ else fi UPPER=`echo ${1} |tr "[:lower:]" "[:upper:]"` -RCS_KEYWORD=FreeBSD - if [ -d ${TOP}/modules/${1} ]; then echo "There appears to already be a module called ${1}" echo -n "Should it be overwritten? [Y]" @@ -90,7 +88,6 @@ DONE ####################################################################### cat >${TOP}/i386/conf/${UPPER} <${TOP}/dev/${1}/${1}.c < -__FBSDID("\$${RCS_KEYWORD}$"); - #include #include #include /* cdevsw stuff */ @@ -956,8 +950,6 @@ fi cat >${TOP}/modules/${1}/Makefile <${TOP}/i386/conf/${UPPER} <${TOP}/dev/${1}/${1}.c < -__FBSDID("\$FreeBSD\$"); - #include #include #include /* SYSINIT stuff */ @@ -389,8 +385,6 @@ fi cat >${TOP}/modules/${1}/Makefile < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 62ba76f3d149 - stable/14 - videomode: Regenerate files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 62ba76f3d149fae73ca204ae75edc8cf5d388664 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=62ba76f3d149fae73ca204ae75edc8cf5d388664 commit 62ba76f3d149fae73ca204ae75edc8cf5d388664 Author: John Baldwin AuthorDate: 2023-09-25 14:49:30 +0000 Commit: John Baldwin CommitDate: 2023-10-24 17:08:29 +0000 videomode: Regenerate files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41953 (cherry picked from commit fc3cc652e500bd8e33b4b77449d167f1df073acb) --- sys/dev/videomode/ediddevs.h | 13 +++++++++++-- sys/dev/videomode/ediddevs_data.h | 3 +-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/dev/videomode/ediddevs.h b/sys/dev/videomode/ediddevs.h index a0dc4e2b181c..872192882c3e 100644 --- a/sys/dev/videomode/ediddevs.h +++ b/sys/dev/videomode/ediddevs.h @@ -1,9 +1,8 @@ - /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: ediddevs,v 1.1 2006/05/11 01:49:53 gdamore Exp + * NetBSD: ediddevs,v 1.2 2007/03/07 18:47:13 macallan Exp */ /*- @@ -81,6 +80,16 @@ #define EDID_VENDOR_VSC "ViewSonic" #define EDID_VENDOR_ZCM "Zenith" +/* + * List of known products, grouped and sorted by vendor. + * + * EDID version 1.3 requires that monitors expose the monitor name with + * the ASCII descriptor type 0xFC, so for monitors using that block, this + * information is redundant, and there is not point in listing them here, + * unless it is desired to have a symbolic macro to detect the monitor in + * special handling code or somesuch. + */ + /* Dell - this exists for now as a sample. I don't have one of these. */ #define EDID_PRODUCT_DEL_ULTRASCAN14XE_REVA 0x139A /* Ultrascan 14XE */ #define EDID_PRODUCT_DEL_ULTRASCAN14XE_REVB 0x139B /* Ultrascan 14XE */ diff --git a/sys/dev/videomode/ediddevs_data.h b/sys/dev/videomode/ediddevs_data.h index a953bcbf9981..c798bd85809d 100644 --- a/sys/dev/videomode/ediddevs_data.h +++ b/sys/dev/videomode/ediddevs_data.h @@ -1,9 +1,8 @@ - /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: ediddevs,v 1.1 2006/05/11 01:49:53 gdamore Exp + * NetBSD: ediddevs,v 1.2 2007/03/07 18:47:13 macallan Exp */ /*- From nobody Tue Oct 24 18:37:03 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPq6zzkz4yLrJ; Tue, 24 Oct 2023 18:37: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 4SFLPq5Vcjz3Y5j; Tue, 24 Oct 2023 18:37:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OPlDcgpED/KTQPLWdxdVQfZcWzZ2CeFWFYZmk4fJbj0=; b=LwObSzo+CiAFyKrLmFotK8zjQY8dEJ5eNLqb32qGDPOLcGAnN3hh3kISMTz3MXuinpRBJ3 Ps8biYdqojxHQWdl/ml5tmPSdpPpvA4o0d5HMjqkbJ2esbuyJw6J51J63F8hzakGjKwDJT LpQ+HuffkvhgSFExfRdy9lh14bf25BKYQEWH12XOedfZN7PqKHxM/W/iEx0tKdobqMCnpl y6hxLtACGMGVHzhpY9BFumdoxptAAbm8N4f3gOtDBg07t2eq1TuMFRDQMFOB2AkSpPfeh+ +7+WaxurnT20A8vrSBuwheUSab1tVjbt2t0HT0vIFpLaCHfWL/L1qz9On6yHhg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172623; a=rsa-sha256; cv=none; b=WZmg7u8DAck82L586z3M2Yjdg3pMRw6xvgcxHfDFb9z8gtWU7EZeLNWdgw1TeCDQ/Lh/BT KBPESkOjTdhiMN8RqUX66NawVBXCAcHUClw9ZyI1QdNkckwaH6ioUrJalaErK2QRA9vQTy tkXaCbIaVfuALEH4SSPAkoJEhSlc5eHzolt4VPIc9AY8bDqZKAXx84EQqPxtzKObw9waG9 GQKlYemoiUy3aMhYTE9lRz6PWic9yKv9fQkjQ0iYsvUP6OMSYH4gldjfq0DbA9u/e1KqoB MpdyFxErX10K6Su4/eFMF/3vt8epz8CQ/GEBRSl2JA1Z780QtLb/lD9/wnt0ZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172623; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OPlDcgpED/KTQPLWdxdVQfZcWzZ2CeFWFYZmk4fJbj0=; b=FzRInBKYIWqwFOkPECgY5hKvMs0MsHVmTiYORo9d/g9qZYZJhFEq/n+IFN/PhItRhcgdMc eY0y6qPPVvoJb7yhJ/de8IcLc3XnPaFVeoYuu5cQtdY2hj4991hwgaHBT9nOmXmh7FO8X6 4DbLTUbBS1TU+OgLq7KsjG1TzW1+VoUNv+ud3k+uVo06i4EtLQAj+EDVF0nuC8lXv29/TY tWAgFglZQQ87zVmV5FxFavropfWYf86ILqcnAIgnpyWHi/WeAPz9QOTPYg5+uoIPC+PLYI pqmTZ2DPuxPs3ET0J73V825+iqB2OLoSI6wb6VQY7HkAv/SSbmVTjK3Yqfb19g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPq4XG3zZ31; Tue, 24 Oct 2023 18:37:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIb37a087969; Tue, 24 Oct 2023 18:37:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIb31Z087966; Tue, 24 Oct 2023 18:37:03 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:03 GMT Message-Id: <202310241837.39OIb31Z087966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: acbf45f5fc8d - stable/13 - videomode/devlist2h.awk: Don't include $FreeBSD$ in generated files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: acbf45f5fc8d858c8fa143b4f429f2d76ba7ed8f Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=acbf45f5fc8d858c8fa143b4f429f2d76ba7ed8f commit acbf45f5fc8d858c8fa143b4f429f2d76ba7ed8f Author: John Baldwin AuthorDate: 2023-09-25 14:46:53 +0000 Commit: John Baldwin CommitDate: 2023-10-24 18:13:18 +0000 videomode/devlist2h.awk: Don't include $FreeBSD$ in generated files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41952 (cherry picked from commit bd524e2ddb77e1c691f308359ab917414ecb8bed) --- sys/dev/videomode/devlist2h.awk | 2 -- 1 file changed, 2 deletions(-) diff --git a/sys/dev/videomode/devlist2h.awk b/sys/dev/videomode/devlist2h.awk index 2bae373cd307..7fc75df2e8d0 100644 --- a/sys/dev/videomode/devlist2h.awk +++ b/sys/dev/videomode/devlist2h.awk @@ -39,7 +39,6 @@ NR == 1 { gsub("\\$", "", VERSION) gsub(/ $/, "", VERSION) - printf("/*\t$FreeBSD" "$\t*/\n\n") > dfile printf("/*\n") > dfile printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ > dfile @@ -48,7 +47,6 @@ NR == 1 { printf(" *\t%s\n", VERSION) > dfile printf(" */\n") > dfile - printf("/*\t$NetBSD" "$\t*/\n\n") > hfile printf("/*\n") > hfile printf(" * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT.\n") \ > hfile From nobody Tue Oct 24 18:37:04 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPr6ybpz4yLrK; Tue, 24 Oct 2023 18:37: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 4SFLPr5xyDz3Y49; Tue, 24 Oct 2023 18:37:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NtbtbzJOD+ATtsUDg1tO9uw3oi2cVImldtRbx/wce3s=; b=ToBHHb+q//fjQo3X7vQcwnmqxL+B72+AylAd0xoyRIaMWPXyBQhg86r0NAL7FoRhG5DvOT myG47NMs5/n2ad7BExqw7bJ5TNNsgLtufAKbFOnbYD1ov6Jhm27K0p7ssmSDLm/xq+uFew l7ud2K/EnEwKppcWQCmiQbY4bF8cC20BGoCTWNQAMb0e608ywShHW/2aWWctXAqoOLVFxA iijnhr7Ii35aS1In6O+YsxjBwZa26amw9xCkZ+Mkrwc83/mJ4NYmIlB1ds3vh0PYdJecmy ymq8h+G98DGBbps/KN7DjHjPFlaZSsO/EKRJMuTBPryGmQmH9K3l8bB0L2EyUg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172624; a=rsa-sha256; cv=none; b=i1xSStSzyA7OH/TvanUTBoJ3y0CpimURGosKlbx2faEqOWTgsnp3TjvBxszVvp2NPpire3 2nD6SyVMDnRdWV32QzU4/XKjCtXpVrwtccqQq5EHB6Mrsrd0bT+Eiq77sRIJ1LoyXPa7vu fb4cqQQdqHL4V1M142X8nQqEvttk77hCTAnuROzz7Z46/rnsbrwHmg78Lou/RAaBZHniDN 61BmwxquxyAvZaI0A76rJwf+7N6LTfqNCTFIa4AxfeZkG1epuOuQ1uUNdsM3QEiHvRGYwC 4ehILg2evjKGiH/0vopcFgyd9GuspAPRAbjBCMwpTcQaW4eraoKGH0twEjCpRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NtbtbzJOD+ATtsUDg1tO9uw3oi2cVImldtRbx/wce3s=; b=JhWBVqBXoJ18eaDBGKs/p2FNqB3lbYtIHsLBsE7NgYIAvxqSls+QgollnbwQykDphmMekv PSRyiwEc2bb8/f+v+kj7JZs7d9cerxed7mGG4QsSrYcbn8Bw0SdsfeiV832GzcW+aGhRBs ZRI1tYJlk7YRuNVaIJfDM5O4H6Gr04lOWtQtEfEV1myMx/gkiG5tojlFnaesroJRuUV4J8 2VgZlwjxJcMYFhNzrE7B8lAiqpqWUmitwF+4nyirkpuRqZoC+7Aq4bHKPiZzmxyWOt3rwh c+HKuCkPPBecOTGJlOpNbHCF/01E4Hcu6g7gPWXbhMHwPL367WDoFl+QfAg7Rw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPr532SzYX8; Tue, 24 Oct 2023 18:37:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIb4na088061; Tue, 24 Oct 2023 18:37:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIb4KF088053; Tue, 24 Oct 2023 18:37:04 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:04 GMT Message-Id: <202310241837.39OIb4KF088053@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 43a0b925c1b3 - stable/13 - videomode: Regenerate files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 43a0b925c1b3bf3ef4f9ff801ad65baacd750030 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=43a0b925c1b3bf3ef4f9ff801ad65baacd750030 commit 43a0b925c1b3bf3ef4f9ff801ad65baacd750030 Author: John Baldwin AuthorDate: 2023-09-25 14:49:30 +0000 Commit: John Baldwin CommitDate: 2023-10-24 18:13:18 +0000 videomode: Regenerate files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41953 (cherry picked from commit fc3cc652e500bd8e33b4b77449d167f1df073acb) --- sys/dev/videomode/ediddevs.h | 13 +++++++++++-- sys/dev/videomode/ediddevs_data.h | 3 +-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/dev/videomode/ediddevs.h b/sys/dev/videomode/ediddevs.h index a0dc4e2b181c..872192882c3e 100644 --- a/sys/dev/videomode/ediddevs.h +++ b/sys/dev/videomode/ediddevs.h @@ -1,9 +1,8 @@ - /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: ediddevs,v 1.1 2006/05/11 01:49:53 gdamore Exp + * NetBSD: ediddevs,v 1.2 2007/03/07 18:47:13 macallan Exp */ /*- @@ -81,6 +80,16 @@ #define EDID_VENDOR_VSC "ViewSonic" #define EDID_VENDOR_ZCM "Zenith" +/* + * List of known products, grouped and sorted by vendor. + * + * EDID version 1.3 requires that monitors expose the monitor name with + * the ASCII descriptor type 0xFC, so for monitors using that block, this + * information is redundant, and there is not point in listing them here, + * unless it is desired to have a symbolic macro to detect the monitor in + * special handling code or somesuch. + */ + /* Dell - this exists for now as a sample. I don't have one of these. */ #define EDID_PRODUCT_DEL_ULTRASCAN14XE_REVA 0x139A /* Ultrascan 14XE */ #define EDID_PRODUCT_DEL_ULTRASCAN14XE_REVB 0x139B /* Ultrascan 14XE */ diff --git a/sys/dev/videomode/ediddevs_data.h b/sys/dev/videomode/ediddevs_data.h index a953bcbf9981..c798bd85809d 100644 --- a/sys/dev/videomode/ediddevs_data.h +++ b/sys/dev/videomode/ediddevs_data.h @@ -1,9 +1,8 @@ - /* * THIS FILE AUTOMATICALLY GENERATED. DO NOT EDIT. * * generated from: - * NetBSD: ediddevs,v 1.1 2006/05/11 01:49:53 gdamore Exp + * NetBSD: ediddevs,v 1.2 2007/03/07 18:47:13 macallan Exp */ /*- From nobody Tue Oct 24 18:37:04 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPs0FGqz4yLc4; Tue, 24 Oct 2023 18:37: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 4SFLPr6C3mz3Y8r; Tue, 24 Oct 2023 18:37:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8yAzyEjWeaZEZl53fIyIJ9UJAvDgBKobiC8Nd/ntNJo=; b=wqhcWOLw+3kTwz/RwemWsjm6hKW5QWM6Y6u3e73qnfbK1XgE6ETv1xa3OYKdE7Rdc2apKy kQImwnMHT3NYIe6t79wBKuWMAnAuJusyTeJEl1TwgSYpNpIAbppIWIGIU+rNblNf98m71R kVcTvPczXT8Dcj8h+6y/d6rIOjex6VNQt4AL3uc8PchsfOQdRd3CKan209XS3X4/TTaNxI qYRxSRUP2WV4Ghu5Nx7mlsmb9N8mK4SH89cWYMqRAM9draxZkBg69M8fpMXVQd8244F3HS 2Mvug62PUlYkMGdM1LmqJGpNwOoLPGzPq5bTQCjQOmdZp6j2LoPdShET3sH5yQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172624; a=rsa-sha256; cv=none; b=ysqGi4CmGft8EObdk4WroZw5fk87tlAvMoCszfO0Dd5dLRoim7tAgJfxhF5e78j1IkArf3 m8uxBW0te0s54JTHkTmQq70PHF5N43ri1AJfVzm70/cmC0TxWiqDT81XW80EuUy16SRzN3 82qJyTN57DbJQfWuqa+BnDnki5SDUB8jX4d3fDbLsP+uBFc4JBUIN//l/LPSGGymqUEPF0 LXautMjD4GcA7JDGOSmr4ssNClcA4X0Uhj73e+Qno4QdHECGbLkG7Nqgt2NRItyie7FS3N bnp4JhCQwoAwdBp2oaeBrLBMbsm0THVLNrr+d2HNPxs3Zf0kYIPGN0AO+7yy1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8yAzyEjWeaZEZl53fIyIJ9UJAvDgBKobiC8Nd/ntNJo=; b=fbPFrv4aHMsPOTRE3wHjrusrMaNUR5PMJtWx+aybi0SYE4pQx9/lm4sFhclPhrNWHZozSu P+lyY7RA8fRcvGa89dGsEkjweRLcYXTJ0Hj7yKobBXPV3vxqzIFbGu9OQZSbvIXrQALvN3 usu71skj1UVREOUyHqWaAVZgC3/v017K2Y60aPC39gbnJdbOLky/P3ILdWi16Uy1qgb3i5 cNdFGaqTVHXWdGYBUeBGvNIj7TtQrdG/UwmpnddqaS+urBMDlw6rgEtOWLC2/omYmrvqjN BxJIH+C+ZhxAgvth91R7YSs+xIut1zgBhiC6P9h3hbtPtFBMBfd8XqhZmzpatg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPr5JkhzYZw; Tue, 24 Oct 2023 18:37:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIb4Ia088062; Tue, 24 Oct 2023 18:37:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIb4eF088058; Tue, 24 Oct 2023 18:37:04 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:04 GMT Message-Id: <202310241837.39OIb4eF088058@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 5db9e9e29605 - stable/14 - Remove a few more stray __FBSDID uses List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 5db9e9e29605616f071fc6a4cb01ff464d47848f Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=5db9e9e29605616f071fc6a4cb01ff464d47848f commit 5db9e9e29605616f071fc6a4cb01ff464d47848f Author: John Baldwin AuthorDate: 2023-09-25 14:49:52 +0000 Commit: John Baldwin CommitDate: 2023-10-24 17:08:46 +0000 Remove a few more stray __FBSDID uses Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41954 (cherry picked from commit 16837d353cdde87672d08112610e51e4121c4e50) --- lib/libc/tests/sys/cpuset_test.c | 3 --- sys/arm/mv/clk/armada38x_coreclk.c | 3 --- sys/dev/enic/enic.h | 3 --- 3 files changed, 9 deletions(-) diff --git a/lib/libc/tests/sys/cpuset_test.c b/lib/libc/tests/sys/cpuset_test.c index 52c0dc877ab8..53d6a8215bbc 100644 --- a/lib/libc/tests/sys/cpuset_test.c +++ b/lib/libc/tests/sys/cpuset_test.c @@ -25,9 +25,6 @@ * SUCH DAMAGE. */ -#include -__FBSDID("$FreeBSD"); - #include #include #include diff --git a/sys/arm/mv/clk/armada38x_coreclk.c b/sys/arm/mv/clk/armada38x_coreclk.c index 14887ce88fb3..21e630d18b06 100644 --- a/sys/arm/mv/clk/armada38x_coreclk.c +++ b/sys/arm/mv/clk/armada38x_coreclk.c @@ -24,9 +24,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#include -__FBSDID("$FressBSD$"); - #include #include #include diff --git a/sys/dev/enic/enic.h b/sys/dev/enic/enic.h index a2a40334986f..6d0eb8563efd 100644 --- a/sys/dev/enic/enic.h +++ b/sys/dev/enic/enic.h @@ -3,9 +3,6 @@ * Copyright 2007 Nuova Systems, Inc. All rights reserved. */ -#include -__FBSDID("$FreeBSD: $"); - #ifndef _ENIC_H #define _ENIC_H From nobody Tue Oct 24 18:37:05 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPt0ThLz4yM91; Tue, 24 Oct 2023 18:37: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 4SFLPs6tXRz3YQD; Tue, 24 Oct 2023 18:37:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BTnQ+2P3FLVhMzdzT5XeKtQuyz63i10U0xA88V9LhlQ=; b=YDYJftiw3r0KSBje6hoZfqcGxKoKNV+Cm8e8DH4Fibmvpt0Xi6/VkngEpZ28K1LHbSqSIX wmLQ2FlamaqJnPgJeOvQwQAQ/XttUPBPaHs9s0NZvKbv3qiUKJHvt6KIpHqZJaMBc+jwWR RE/SbHyf0UA8S4UOIsYmjZf6RITLZg2n88FhcFxk+kfzLi0OlgE02DovTVDbUOX1v7uhge d4v8GFrn+bk/OonuAa23pRghYHmWJvd55F2szv1aNsc1DtCVJr9sr+NPke08hQ5A8XsqB+ af8bznuGEEtHDFc1/xTNOYpTvrzmek8+n8QkjuECSP+eIOTwwiW3rEc4dAoKEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172626; a=rsa-sha256; cv=none; b=WRX67OJ7e3/K5J748raxS8k0KZ+2om9VGedzJ2Idzqoq8EiBCUibVWl3fWSVMIqGGYDBIb c6K1f9n/tmzQAHACPBedsQ/LIXvUi8RLnpBc3vLR9UQNWMPRAo5rJaHmPPF98ab/UkP/tJ EEr37GarVDgrFr23V6BQZrYqHIJngRbXCrE8qzs1zysh+AuTpQmRNUtDv4ADpi5+APozmX WTuLl8pgZvlw92ASeFQYmhUSnYc+0cA2b4doW0IFx+HweW9TErIADQFVWZbtylwh7HlfIZ HSrD1oumRYGwYNSwzLDMTKp+03LXl3dLaoNUS/1ZH0WoIhjxSFcDiycYuBb6yA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BTnQ+2P3FLVhMzdzT5XeKtQuyz63i10U0xA88V9LhlQ=; b=FOAqJqL91BWI8N/baL/QdO7QkYjGPOwtIr5HaoP70iHTZ0+9EMz/UfmgsUmZ9DtfOHjvnP jRhPyNg+67zAPTP6lcCVD+j6ewGFcS6vJbX3oiDy8lR0rUkI/cwHsIcO5toudXNw8IECBH lBac4ktaL5NAoNu572O5c8t1eJcy6sUMa4JkkQg9oEEUc0xUfbHNbi5WcH82JptOSGl5vx Z6DQem2D+ydPo8Z6D2XnIGOBgun5L1j9oioKUyfQXWdElXy+1iUclTXtiavo9X9EWxZ7gb 2m1b28nsvwdf3Fu72/UQ/CfHdarn8JKno/qW2gDX8oIIQ8/HOi1DvqfqJV3JuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPs5xwZzZ3V; Tue, 24 Oct 2023 18:37:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIb5wo088172; Tue, 24 Oct 2023 18:37:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIb5ZC088161; Tue, 24 Oct 2023 18:37:05 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:05 GMT Message-Id: <202310241837.39OIb5ZC088161@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: a94d45499f9f - stable/13 - Remove a few more stray __FBSDID uses List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a94d45499f9f6eec6bf04dac55cf5f2720df6509 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=a94d45499f9f6eec6bf04dac55cf5f2720df6509 commit a94d45499f9f6eec6bf04dac55cf5f2720df6509 Author: John Baldwin AuthorDate: 2023-09-25 14:49:52 +0000 Commit: John Baldwin CommitDate: 2023-10-24 18:13:18 +0000 Remove a few more stray __FBSDID uses Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41954 (cherry picked from commit 16837d353cdde87672d08112610e51e4121c4e50) --- lib/libc/tests/sys/cpuset_test.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/libc/tests/sys/cpuset_test.c b/lib/libc/tests/sys/cpuset_test.c index 52c0dc877ab8..53d6a8215bbc 100644 --- a/lib/libc/tests/sys/cpuset_test.c +++ b/lib/libc/tests/sys/cpuset_test.c @@ -25,9 +25,6 @@ * SUCH DAMAGE. */ -#include -__FBSDID("$FreeBSD"); - #include #include #include From nobody Tue Oct 24 18:37:05 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPt0ZRBz4yLrS; Tue, 24 Oct 2023 18:37: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 4SFLPt03Lcz3YKb; Tue, 24 Oct 2023 18:37:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ktvN3jMEshPCPrHJbejFlB9speUGyuAmyXv/farkLfc=; b=UljSYz7nJzyTbkqyI2P8bNJgU63jHmywd08tPXQYbpvrT2e/gbMgW/Yzjqef6IKyycgwxw HCuuoV2p3ar6u3jafxyxAFAFhc6zK8OPVFQRQ9Up40TfZkcJ44cb+EzpCjgBsbnxbRXIxZ 4oQuN8cPrxRqV6timhw91uiQdoARLq7G26Z6wj9H19Oa3abCYbO05bq7AHn4rY3a+L/m1E Cse4pZuX1EzYiMvul7FXZlsHRvWxJjjL1t2TH+CJtJKPqjbnZQgAhaxYxfjWEsgoMpnrPm UqfO0nnjaF6HiA1pzPrKKmQHGRJmzj6dN+hFhOKehdjSAEY9FTWVVirmMTh04w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172626; a=rsa-sha256; cv=none; b=ntx6YwPxDhDcVXQeT72hueSbbAlhlNmC/p0SSs4cTTCsEtj1ipfDnB8zK71J75zMnbq53J L7aI9G49GAwjpRK9PYIhX841ME9mCnSkwR4eExTeCbokdIRFDx+nc/gzEf2YYA/OSLLV3N 8Y/Q9GRa1cOqlKG+WHuwbHjWitlVFBhBTB7ocE/HyeCws6sOJZfgjDD3sF29/LTIL3GJHz KDmIHeKRQA+6rFPWdxtKarsHAkEqmFYVuuPR8wqnUCMyKiuBCBG2WJVuEib139aGa+m/rO SjTqSWEUbFnSoZ6Fe/r2Eg0gTjGfAqtOZ+dl20hcwhlfX6bNxOCf1L1UoOZOTw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ktvN3jMEshPCPrHJbejFlB9speUGyuAmyXv/farkLfc=; b=oB7YnM3StawxKCvj/WckI61X/Jb8jr+8dp2XIhA44/lnoq+UA+aUWYcngaWVvoPzRXMKPC qTFhd4/DjBW+wygxYc+DXs90KkoumuW+ojCAFpo6vjHKzAnNWsU95H5r7fWU9Wc29y2XhI tBsS1M1Vu1mJYDiXsKv1BZatKHDihFsDezCrFxuFYNz7VFOsmqW5KCmoQ/4Yu0UUBUj0se qfMiOVNHygH57TbGECwVYaePYqvLKw4w+4ED2LmSw+PdQZX34pIouML7kTCIhjfOHzSmq0 kYjugpBkQwPRgdTQ7ac/6XBxx/xwjd+BFvmeE+Aw8mJGjXl9RzR6l9fL7bKipQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPs6BygzYmP; Tue, 24 Oct 2023 18:37:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIb5QU088173; Tue, 24 Oct 2023 18:37:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIb5WW088169; Tue, 24 Oct 2023 18:37:05 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:05 GMT Message-Id: <202310241837.39OIb5WW088169@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: efb26b3fe6ca - stable/14 - Update a couple of tools to not embed __FBSDID in generated files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: efb26b3fe6ca47738754b89d4d2e82fcd7473619 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=efb26b3fe6ca47738754b89d4d2e82fcd7473619 commit efb26b3fe6ca47738754b89d4d2e82fcd7473619 Author: John Baldwin AuthorDate: 2023-09-25 14:50:11 +0000 Commit: John Baldwin CommitDate: 2023-10-24 17:09:55 +0000 Update a couple of tools to not embed __FBSDID in generated files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41955 (cherry picked from commit 99159b076a278d1feb0e18ae99fd866c90443893) --- sys/dev/bnxt/convert_hsi.pl | 6 ------ tools/tools/drm/radeon/mkregtable/mkregtable.c | 5 ----- 2 files changed, 11 deletions(-) diff --git a/sys/dev/bnxt/convert_hsi.pl b/sys/dev/bnxt/convert_hsi.pl index df59aeab6cc9..19f5d2d3aea1 100755 --- a/sys/dev/bnxt/convert_hsi.pl +++ b/sys/dev/bnxt/convert_hsi.pl @@ -55,9 +55,6 @@ print OUT < -__FBSDID("\$FreeBSD\$"); - END_OF_NOTICE # Convert line endings @@ -132,9 +129,6 @@ if ($do_decode) { * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #include - __FBSDID("\$FreeBSD\$"); - END_OF_NOTICE if(!open(HDR, ">", "hsi_struct_decode.h")) { diff --git a/tools/tools/drm/radeon/mkregtable/mkregtable.c b/tools/tools/drm/radeon/mkregtable/mkregtable.c index e0b94561f5cd..e39264fbcd2b 100644 --- a/tools/tools/drm/radeon/mkregtable/mkregtable.c +++ b/tools/tools/drm/radeon/mkregtable/mkregtable.c @@ -593,11 +593,6 @@ static void table_print(struct table *t) nlloop = (t->nentry + 3) / 4; c = t->nentry; - printf( - "#include \n" - "__FBSDID(\"$" "FreeBSD" "$\");\n" - "\n" - ); printf("static const unsigned %s_reg_safe_bm[%d] = {\n", t->gpu_prefix, t->nentry); for (i = 0, id = 0; i < nlloop; i++) { From nobody Tue Oct 24 18:37:06 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPv188Rz4yLrY; Tue, 24 Oct 2023 18:37: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 4SFLPv0Yzsz3YL9; Tue, 24 Oct 2023 18:37:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rQXxAZLGxEiZeMHri71TzxEX9YJiLz9AJdrItzzzpnU=; b=lhJvlNQcmQS0arO+MeMy7JRL6XSp4Y1v2MclqHDj9hCbKfCUtYVunPAzS+JjSGRdzqBooX QO/E8slYoQxRYIpatZwiAL5I1XxjTgPGmVe2SPP66fN+DbreUxbzdJ6kMelg+RTFRDEZ9c 3SuBrkF/MsR+4IIxepxBY68LD4b2FQivvENOpC36zBTO3yC6bYxO+QyOWlXhIUSybY9wwF 2mEhKXpmHC/dFzchAuvsw6AiorMC/udVAID+SZAYjC4gYd+WVmD9YLbXTKPtZXaDtWkip8 qdwePY8uLfoqTg6PDKvjZJY0r6t2ZwTX8S8NJdn6tCp/oFgcFtigZT1dynZrhw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172627; a=rsa-sha256; cv=none; b=rPA1wbtfzzEoKTx+67lTRfcwzEAwJr3eLchO0f2fi29lZkJAcbs/TDMeVdeFisG+owT2w/ MsDfzp65KyZAun2RjhzpvewbTiDzZsUkMcIJh9dkWra7QqIlvIeyTLqrbRjwYtUuW80yK7 PfwGYSEAdbWT82aGu9l5q4GxpR7SdCetNyEGAVEDB8xebwPaAqnTwZxdiZ/sXLI4Xv4AQi RChGZUoPKayeIiWNEwgxhYDEahHgZUwgp0qz0xeYIXFoXyW+xlKQs6QloV/l7gJVlx2JtM tQ0KMed9NY/DyH8izofWMULsPxudjvkDaW2yoKsdmB2iartf+COMx3vyym3Y5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rQXxAZLGxEiZeMHri71TzxEX9YJiLz9AJdrItzzzpnU=; b=buMLTweh3FcZzAavmrcu06O8rZN5p1bMbr4n7iFK8NxCOLFYvrR5yWx7VWn0XrilshZOou T88x/5qoxBoI4Dm3WfLbvtNyMHrImTpkqZMBQSFK+7cRaRF7kMxtB95EnI+Wo+hVWTsELD hbUNMZFJDPHfbxctD1345gQNxLbv3mw5aCUR2x3brRQXMeia90rhGJPCnKP2LUTQt4uFZU ScNgR0qDGNZmjy0mfUxLiOthQTJS3IrFbvnqEI26ESPS9Eg4shSGIDLAlyouVKKCBoenq+ Kh/NZJ8lp2sb7mKmiFQBf95SLEdtSPVRu5mfQ3xj7ls3jA3MkAr/F8rMPtGx0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPt6myFzYX9; Tue, 24 Oct 2023 18:37:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIb6ZC088287; Tue, 24 Oct 2023 18:37:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIb6tZ088272; Tue, 24 Oct 2023 18:37:06 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:06 GMT Message-Id: <202310241837.39OIb6tZ088272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 97cb7bde896d - stable/14 - lpr: Remove now unused fallback definition for __FBSDID List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 97cb7bde896d2661bd0405b94d60297c51eb7c7c Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=97cb7bde896d2661bd0405b94d60297c51eb7c7c commit 97cb7bde896d2661bd0405b94d60297c51eb7c7c Author: John Baldwin AuthorDate: 2023-09-25 14:50:33 +0000 Commit: John Baldwin CommitDate: 2023-10-24 17:10:04 +0000 lpr: Remove now unused fallback definition for __FBSDID Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41956 (cherry picked from commit e4c68414d0854b5e43dfd1b2b0cfbc295702e831) --- usr.sbin/lpr/common_source/lp.cdefs.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/usr.sbin/lpr/common_source/lp.cdefs.h b/usr.sbin/lpr/common_source/lp.cdefs.h index c3ca409b6a8b..f5adf6e0ba5d 100644 --- a/usr.sbin/lpr/common_source/lp.cdefs.h +++ b/usr.sbin/lpr/common_source/lp.cdefs.h @@ -81,20 +81,6 @@ # define __unused #endif -/* - * All the lpr source files will want to reference __FBSDID() to - * handle rcs id's. - */ -#if !defined(__FBSDID) -# if defined(lint) || defined(STRIP_FBSDID) -# define __FBSDID(s) struct skip_rcsid_struct -# elif defined(__IDSTRING) /* NetBSD */ -# define __FBSDID(s) __IDSTRING(rcsid,s) -# else -# define __FBSDID(s) static const char rcsid[] __unused = s -# endif -#endif /* __FBSDID */ - /* * Some lpr include files use __BEGIN_DECLS and __END_DECLS. */ From nobody Tue Oct 24 18:37:06 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPv18Mhz4yM94; Tue, 24 Oct 2023 18:37: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 4SFLPv0f2mz3YQn; Tue, 24 Oct 2023 18:37:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sdkQM8Cw/G4FMpzfnnQxWI9doemqzaXoyzYyIAChcWw=; b=niaQouM3Ivuhv2/NxGE1UTGkPan7RXXXoAp4VSoEgGZweHVgmKr/6lWG1s6Fqn0nLWUeUR AKGieE3woyRGUkArf73NPMNCYfESki8DZi3CqhlaXBXTfMef2O62i12H4X4Lodk9SgcSsp RF+fRarEp1OtLmwUHSpAb5tR86z0+X59YHIVS69OMogen/dbUePevDRYIcFONrFqfG5S6y iLZEulT8bJJMvzZFtrlnw/PLyC4yz6NwcaynU8QWi++WZ6MZIwi2z/fW/DV85rvWpaYy1D jU/YkJnvX0bktptVRTdg8MbBFuT9ADVVPpx38qz+bVUeXX1ZUXbZ8+phCZxe1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172627; a=rsa-sha256; cv=none; b=BR9a2O4rLRU2cKGXhl+vGHG/eEclqBC3CDNn/yNCt0f22XFyYvbmPa5XkSLxKsoDgtXrBS owZbdbVMq2gARav+cLvhYQW3Hf6eKahBG9iuyQEcDDa22pfMi31TCj/j94veAemmmtmo+s XXebIhMW9LrPT8N7YKe4ecvccjtp9k3QTD0PD4SOJoiRcZ5NbyDWHU2YDW6UODPaw3BZKh OKtHoCrktJWGfqgb3xD1DQ/T2SUR0b4f7H0Sj9EITfdwLlx7k2mzItyG+YmViRPaGvoVpR TUkrX7HJlN0S7DOWodwMJW6ORyP2eoZ1Iq0Ju+alH6ew/zaOIikRMYVVSuE88g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sdkQM8Cw/G4FMpzfnnQxWI9doemqzaXoyzYyIAChcWw=; b=nZZRagqpAZmEQuIPzRBLf6viV5A81iM5qRL8/zewl1mNG7Ebh9cHyfxEK5vj0XRIbHeY9N xSXdZ6efnZ5veQYtGW93vQgvg6qxk7UtDAVhSmHE9JpRmSFPrMYPJvZP4bsXwXk5177HCZ 94JJs9ISiaM8G2IG4jXSKS8jx+COfwnswUGDMkF/CLXX52s9LpXOdGH1DfN1TXzbc8xpE0 ezQrg7k6bhfYLquYs+uXLkd6AAhvMr86xCj+NwBGjUA+p45VtXu89GXFTO5lqBxJa7Rudi lf0QcjO7Sr5DHPnOCtUYqKk4QmxttvadQVsOKXgD5N03aiuuhXRipyC+s53SEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPt6rBzzYmQ; Tue, 24 Oct 2023 18:37:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIb6FR088288; Tue, 24 Oct 2023 18:37:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIb6bc088285; Tue, 24 Oct 2023 18:37:06 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:06 GMT Message-Id: <202310241837.39OIb6bc088285@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 8cc22227ffdf - stable/13 - Update a couple of tools to not embed __FBSDID in generated files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8cc22227ffdf98a49c6761431e493146fbeabf87 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8cc22227ffdf98a49c6761431e493146fbeabf87 commit 8cc22227ffdf98a49c6761431e493146fbeabf87 Author: John Baldwin AuthorDate: 2023-09-25 14:50:11 +0000 Commit: John Baldwin CommitDate: 2023-10-24 18:13:18 +0000 Update a couple of tools to not embed __FBSDID in generated files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41955 (cherry picked from commit 99159b076a278d1feb0e18ae99fd866c90443893) --- sys/dev/bnxt/convert_hsi.pl | 6 ------ tools/tools/drm/radeon/mkregtable/mkregtable.c | 5 ----- 2 files changed, 11 deletions(-) diff --git a/sys/dev/bnxt/convert_hsi.pl b/sys/dev/bnxt/convert_hsi.pl index df59aeab6cc9..19f5d2d3aea1 100755 --- a/sys/dev/bnxt/convert_hsi.pl +++ b/sys/dev/bnxt/convert_hsi.pl @@ -55,9 +55,6 @@ print OUT < -__FBSDID("\$FreeBSD\$"); - END_OF_NOTICE # Convert line endings @@ -132,9 +129,6 @@ if ($do_decode) { * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ - #include - __FBSDID("\$FreeBSD\$"); - END_OF_NOTICE if(!open(HDR, ">", "hsi_struct_decode.h")) { diff --git a/tools/tools/drm/radeon/mkregtable/mkregtable.c b/tools/tools/drm/radeon/mkregtable/mkregtable.c index e0b94561f5cd..e39264fbcd2b 100644 --- a/tools/tools/drm/radeon/mkregtable/mkregtable.c +++ b/tools/tools/drm/radeon/mkregtable/mkregtable.c @@ -593,11 +593,6 @@ static void table_print(struct table *t) nlloop = (t->nentry + 3) / 4; c = t->nentry; - printf( - "#include \n" - "__FBSDID(\"$" "FreeBSD" "$\");\n" - "\n" - ); printf("static const unsigned %s_reg_safe_bm[%d] = {\n", t->gpu_prefix, t->nentry); for (i = 0, id = 0; i < nlloop; i++) { From nobody Tue Oct 24 18:37:07 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPw26ZSz4yMCg; Tue, 24 Oct 2023 18: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 4SFLPw1NYvz3YTg; Tue, 24 Oct 2023 18:37:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xs5zCulZtWtHVL40+6pBNlB+ni/JPYms7pfO4G3sX4w=; b=r7O3KAwB17t18EDoentvM04SXVc2aFcDGL1DHW8I0Mz1EDRo/ZZMqd+fA92XuGtyAHeHZh tk9W/QQOeOyNULW8qPvJoEImMJd4WE1Mh5tMHlSPHORYJQximcFXjhe6SVkIHRl6d/wqqF oiRdPeKwAwwRJqgqtM8HBoZjmPxqp7gA1iSPLNceXBrpqqDOj6k4azeVyvkZl0467t7qGo 76kgRpU842As/y/2JE2P5knZEKk8DDXpRrZuq/X72YxotZeenkvhdUchqp+46u/vvQH/QC 4ZNKj50k9r6goDV+BTJxJdxlhc+Wtl6rKaT4z7bp+CH0vGvCmLWBqtChWxMWBA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172628; a=rsa-sha256; cv=none; b=l1fP6SoU68vmnh0z+1JOvXHDDsMaMa5fM8WrNzMz1ZGnHryWKsY4EgTjDnlxe7/dngQRuF loIXfjqjL1GjCaqdrK9LIWjxBdgAt5Qg1Rgs6sx2/ihiRhS8AFyY5QtTsctamVVvntN5v+ /5EcNw0x8JqL1pWhJ3rdHXMIrOvYyauquNCAtCG/FrmCQmzdEnzxQavBkB/voq7GrhjeVi 0tIl3XjP+B2qweQrMB7eH88ChNNw0+PdiuzTrOCi6oMkQ2yVFWFdRLojtFE11sPNpT2FbL 0NT21G7arb+PQvnUFsz8aRAFXo/bedEpcoX3Xsr72RfrRXtaJbBNMFrzfGTnCA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Xs5zCulZtWtHVL40+6pBNlB+ni/JPYms7pfO4G3sX4w=; b=xiJp/uKesNzgIKMrWZuZqUAgQeWAWZkbf+h8dpmXIJhpw5pKnzv4rHIk/XnQNf4UtE/o8g TaGB9G0VAvG1fdhbDWmIgwbqLa/Mmid3Vmx76zwOW+3ihhAqBxEW1px7xzr11Oh7cNW2Om vAo9se9V9EQ9Ny36d5cIQPywyoc+f+/v8rktKTxHabSgNT4kJ+msPfdpizMqq0nJVz4n2X rrz/YGeITZPffiN1scnRZ3Cw6A6sKzr0RAfrzU5dovtGtRZlAGrFrDn4TG0Qdq5g4qgnoA r3KfeD0mh5WDkx5bxsIrvltyDIZCl55fuk817XVZRmm7gUJmvzT2DIPgCNIOvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPw0Sp7zYZx; Tue, 24 Oct 2023 18:37:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIb8jb088383; Tue, 24 Oct 2023 18:37:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIb7DB088375; Tue, 24 Oct 2023 18:37:07 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:07 GMT Message-Id: <202310241837.39OIb7DB088375@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 7ccea130e810 - stable/13 - lpr: Remove now unused fallback definition for __FBSDID List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 7ccea130e81099f1cd11ec97239e387b31a2a661 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=7ccea130e81099f1cd11ec97239e387b31a2a661 commit 7ccea130e81099f1cd11ec97239e387b31a2a661 Author: John Baldwin AuthorDate: 2023-09-25 14:50:33 +0000 Commit: John Baldwin CommitDate: 2023-10-24 18:13:18 +0000 lpr: Remove now unused fallback definition for __FBSDID Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41956 (cherry picked from commit e4c68414d0854b5e43dfd1b2b0cfbc295702e831) --- usr.sbin/lpr/common_source/lp.cdefs.h | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/usr.sbin/lpr/common_source/lp.cdefs.h b/usr.sbin/lpr/common_source/lp.cdefs.h index c3ca409b6a8b..f5adf6e0ba5d 100644 --- a/usr.sbin/lpr/common_source/lp.cdefs.h +++ b/usr.sbin/lpr/common_source/lp.cdefs.h @@ -81,20 +81,6 @@ # define __unused #endif -/* - * All the lpr source files will want to reference __FBSDID() to - * handle rcs id's. - */ -#if !defined(__FBSDID) -# if defined(lint) || defined(STRIP_FBSDID) -# define __FBSDID(s) struct skip_rcsid_struct -# elif defined(__IDSTRING) /* NetBSD */ -# define __FBSDID(s) __IDSTRING(rcsid,s) -# else -# define __FBSDID(s) static const char rcsid[] __unused = s -# endif -#endif /* __FBSDID */ - /* * Some lpr include files use __BEGIN_DECLS and __END_DECLS. */ From nobody Tue Oct 24 18:37:07 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPw2HJyz4yLrc; Tue, 24 Oct 2023 18: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 4SFLPw1ypNz3YXF; Tue, 24 Oct 2023 18:37:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s2xeznI4gVFqIk4QmJ2LyjhSZ3mFZrtQa49yRXcCJ7Q=; b=JQeJbplXe3Wrmb4GvkH20+Yz6fHRUBMHP+Hp1WNRdchnzBQUObJB2C0sHdPTZzKT6WUwyU kcus8G6Hkc4z7tIHbg24/LrbxIBbu3gbIzgwQZ1nME/vxotGrU6xeumrP0XnoAfjMN4wFN tifaz6YCNsfzXzjfboA/lotZEpKSRCNk/+/hLk/Ue/qHxtnOa4k8a5XtjZq+otCUpDQhES J4EofIc2Lrk7iDPm+DoEFG2jAcN7cW43hpVMiZRZJ+gJ1VfbcCRIEWq2vn8QmWU8iB3St6 glyaRBgGE7GDjIXTyxS21pvQ5V7DsUeDEn4fHsABM9lnho6ZCNrGuY8rVxEDHw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172628; a=rsa-sha256; cv=none; b=MBWDTHobHjWFlR8021r5tOaJjcz3ISedbvZx0qIr+MmQbl1g2Xx0dc0xCeLRvzMDc6IL3N mbLA5WXZ5Jbi0Wv14bflnlLDBR9GOvgcKn8DQAXQ5jF3qzMlJgBDAVKeXebQtMZ7vaN+rw makCictfyafqbsgNtAfjP0ajUUVJv1prsw4WJ7+Ev760JqZiIE2y3z+SvhL4gk1vakGuDh 4yLYzvMagEr1caEp5KY8zwsfcM2ZEvXrQXu9xowvBE3JJsIAMp+/b3TImrhOboe2r7Luhu c1RjA0W+enLQQwc6BIwmUegVnsozXkwudIsKEdVAzRQ34NMpG8rHv5m9todyqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s2xeznI4gVFqIk4QmJ2LyjhSZ3mFZrtQa49yRXcCJ7Q=; b=J+GY1XKU+ZYYVcsMixbuKz+1YQMQVjQD2pD3g3Y8v1WS7NjK5oivgMng9dWBCZihq3Vph2 5mzU1RYek6Ost3tHoyxrBkBv+98TayNIE0uuAyd2S7l6kDYRA5hxuqaHGcSX70UK61fni7 WfW3JfS86BHhYA0RG4Kch84ZXvxJa3gJqT+UaiAn/yThTgnTlcOFzNt4M5lrT8UCcHyluX X2fL3SNLvxIakQ6lSxDzl674vgUD08kjuppF2833qqCj/2arqzBw7TygRUqRE6o/V/Mk/l so6Cao4qutgcQKCuQ1cpai/Lxvlsr6imJRnjh+BJwo0FyN/xfreNJzu6QyRteg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPw0mpDzZ32; Tue, 24 Oct 2023 18:37:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIb8oX088387; Tue, 24 Oct 2023 18:37:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIb7bn088380; Tue, 24 Oct 2023 18:37:07 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:07 GMT Message-Id: <202310241837.39OIb7bn088380@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 260bab9f1e6f - stable/14 - Purge more stray embedded $FreeBSD$ strings List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 260bab9f1e6f2a770eab029f5b37e6f4fa12edbe Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=260bab9f1e6f2a770eab029f5b37e6f4fa12edbe commit 260bab9f1e6f2a770eab029f5b37e6f4fa12edbe Author: John Baldwin AuthorDate: 2023-09-25 14:54:56 +0000 Commit: John Baldwin CommitDate: 2023-10-24 17:10:12 +0000 Purge more stray embedded $FreeBSD$ strings These do not use __FBSDID but instead use bare char arrays. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41957 (cherry picked from commit eba230afba4932f02a1ca44efc797cf7499a5cb0) --- lib/lib80211/lib80211_regdomain.c | 3 --- lib/libc/net/nslexer.l | 6 ------ lib/libc/powerpc/gen/syncicache.c | 5 ----- lib/libc/powerpc64/gen/syncicache.c | 5 ----- lib/msun/src/e_sqrtf.c | 4 ---- lib/msun/src/s_modf.c | 4 ---- lib/msun/src/w_cabsf.c | 5 ----- libexec/atrun/atrun.c | 5 ----- libexec/atrun/gloadavg.c | 5 ----- libexec/atrun/gloadavg.h | 3 --- libexec/comsat/comsat.c | 2 -- libexec/fingerd/fingerd.c | 2 -- libexec/getty/init.c | 2 -- libexec/getty/subr.c | 2 -- libexec/mknetid/hash.c | 5 ----- libexec/mknetid/mknetid.c | 5 ----- libexec/mknetid/parse_group.c | 2 -- libexec/rbootd/bpf.c | 2 -- libexec/rbootd/conf.c | 2 -- libexec/rbootd/parseconf.c | 2 -- libexec/rbootd/rmpproto.c | 2 -- libexec/rbootd/utils.c | 2 -- libexec/revnetgroup/hash.c | 5 ----- libexec/revnetgroup/parse_netgroup.c | 5 ----- libexec/revnetgroup/revnetgroup.c | 5 ----- libexec/rpc.rstatd/rstat_proc.c | 2 -- libexec/rpc.rstatd/rstatd.c | 5 ----- libexec/rpc.rusersd/rusers_proc.c | 5 ----- libexec/rpc.rusersd/rusersd.c | 5 ----- libexec/rpc.sprayd/sprayd.c | 5 ----- libexec/rtld-elf/rtld_malloc.c | 1 - libexec/talkd/announce.c | 2 -- libexec/talkd/print.c | 2 -- libexec/talkd/process.c | 2 -- libexec/talkd/table.c | 2 -- libexec/talkd/talkd.c | 2 -- sbin/dump/dumprmt.c | 2 -- sbin/dump/itime.c | 2 -- sbin/dump/main.c | 2 -- sbin/dump/optr.c | 2 -- sbin/dump/tape.c | 2 -- sbin/dump/traverse.c | 2 -- sbin/dump/unctime.c | 2 -- sbin/dumpfs/dumpfs.c | 2 -- sbin/ffsinfo/ffsinfo.c | 5 ----- sbin/fsck_msdosfs/boot.c | 2 -- sbin/fsck_msdosfs/check.c | 2 -- sbin/fsck_msdosfs/dir.c | 2 -- sbin/fsck_msdosfs/fat.c | 2 -- sbin/fsck_msdosfs/main.c | 2 -- sbin/fsdb/fsdb.c | 5 ----- sbin/fsdb/fsdbutil.c | 5 ----- sbin/fsirand/fsirand.c | 5 ----- sbin/growfs/debug.c | 5 ----- sbin/ifconfig/af_inet.c | 5 ----- sbin/ifconfig/af_inet6.c | 5 ----- sbin/ifconfig/af_link.c | 5 ----- sbin/ifconfig/af_nd6.c | 5 ----- sbin/ifconfig/ifbridge.c | 5 ----- sbin/ifconfig/ifclone.c | 5 ----- sbin/ifconfig/ifconfig.c | 2 -- sbin/ifconfig/ifgif.c | 5 ----- sbin/ifconfig/ifgroup.c | 5 ----- sbin/ifconfig/iflagg.c | 5 ----- sbin/ifconfig/ifvlan.c | 5 ----- sbin/ifconfig/sfp.c | 5 ----- sbin/init/init.c | 2 -- sbin/mknod/mknod.c | 2 -- sbin/mount/mount_fs.c | 2 -- sbin/mount_cd9660/mount_cd9660.c | 2 -- sbin/mount_msdosfs/mount_msdosfs.c | 5 ----- sbin/mount_nullfs/mount_nullfs.c | 2 -- sbin/mount_unionfs/mount_unionfs.c | 3 --- sbin/newfs_msdos/mkfs_msdos.c | 5 ----- sbin/newfs_msdos/newfs_msdos.c | 5 ----- sbin/nos-tun/nos-tun.c | 5 ----- sbin/restore/dirs.c | 2 -- sbin/restore/symtab.c | 2 -- sbin/restore/utilities.c | 2 -- sbin/umount/umount.c | 2 -- stand/libsa/powerpc/syncicache.c | 5 ----- sys/netpfil/ipfilter/netinet/fil.c | 1 - sys/netpfil/ipfilter/netinet/ip_auth.c | 1 - sys/netpfil/ipfilter/netinet/ip_frag.c | 1 - sys/netpfil/ipfilter/netinet/ip_nat.c | 1 - usr.bin/locate/locate/locate.c | 2 -- usr.bin/mktemp/mktemp.c | 5 ----- usr.bin/morse/morse.c | 2 -- usr.bin/nfsstat/nfsstat.c | 2 -- usr.bin/number/number.c | 2 -- usr.bin/primes/pattern.c | 2 -- usr.bin/primes/pr_tbl.c | 2 -- usr.bin/primes/primes.c | 2 -- usr.bin/printf/printf.c | 2 -- usr.bin/showmount/showmount.c | 2 -- usr.bin/tee/tee.c | 2 -- usr.bin/time/time.c | 2 -- usr.bin/truncate/truncate.c | 3 --- usr.bin/ul/ul.c | 2 -- usr.bin/uniq/uniq.c | 2 -- usr.bin/units/units.c | 5 ----- usr.bin/yes/yes.c | 2 -- usr.sbin/apmd/apmd.c | 5 ----- usr.sbin/btxld/btxld.c | 5 ----- usr.sbin/ckdist/ckdist.c | 5 ----- usr.sbin/config/main.cc | 2 -- usr.sbin/config/mkheaders.c | 2 -- usr.sbin/config/mkmakefile.cc | 2 -- usr.sbin/config/mkoptions.cc | 2 -- usr.sbin/flowctl/flowctl.c | 5 ----- usr.sbin/keyserv/crypt_server.c | 5 ----- usr.sbin/keyserv/keyserv.c | 2 -- usr.sbin/keyserv/setkey.c | 2 -- usr.sbin/mptable/mptable.c | 5 ----- usr.sbin/nfsd/nfsd.c | 2 -- usr.sbin/pciconf/cap.c | 5 ----- usr.sbin/pciconf/err.c | 5 ----- usr.sbin/pciconf/pciconf.c | 5 ----- usr.sbin/pw/bitmap.c | 5 ----- usr.sbin/pw/cpdir.c | 5 ----- usr.sbin/pw/grupd.c | 5 ----- usr.sbin/pw/psdate.c | 5 ----- usr.sbin/pw/pw.c | 5 ----- usr.sbin/pw/pw_conf.c | 5 ----- usr.sbin/pw/pw_group.c | 5 ----- usr.sbin/pw/pw_log.c | 5 ----- usr.sbin/pw/pw_nis.c | 5 ----- usr.sbin/pw/pw_user.c | 5 ----- usr.sbin/pw/pw_vpw.c | 5 ----- usr.sbin/pw/pwupd.c | 5 ----- usr.sbin/pw/rm_r.c | 5 ----- usr.sbin/rpc.lockd/test.c | 1 - usr.sbin/rpc.statd/test.c | 5 ----- usr.sbin/rpc.umntall/rpc.umntall.c | 5 ----- usr.sbin/rpc.ypupdated/update.c | 2 -- usr.sbin/spray/spray.c | 5 ----- usr.sbin/traceroute6/traceroute6.c | 2 -- usr.sbin/vidcontrol/decode.c | 5 ----- usr.sbin/vidcontrol/vidcontrol.c | 5 ----- 139 files changed, 476 deletions(-) diff --git a/lib/lib80211/lib80211_regdomain.c b/lib/lib80211/lib80211_regdomain.c index f5ed236467f5..189d4661c78b 100644 --- a/lib/lib80211/lib80211_regdomain.c +++ b/lib/lib80211/lib80211_regdomain.c @@ -22,9 +22,6 @@ * (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 lint -static const char rcsid[] = "$FreeBSD$"; -#endif /* not lint */ #include #include diff --git a/lib/libc/net/nslexer.l b/lib/libc/net/nslexer.l index bd3c02dcacf4..ce0f18670e21 100644 --- a/lib/libc/net/nslexer.l +++ b/lib/libc/net/nslexer.l @@ -32,12 +32,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include -#if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = - "$FreeBSD$"; -#endif /* LIBC_SCCS and not lint */ - #include "namespace.h" #include #define _NS_PRIVATE diff --git a/lib/libc/powerpc/gen/syncicache.c b/lib/libc/powerpc/gen/syncicache.c index 5192d1356153..6376cb0e576d 100644 --- a/lib/libc/powerpc/gen/syncicache.c +++ b/lib/libc/powerpc/gen/syncicache.c @@ -33,11 +33,6 @@ * $NetBSD: syncicache.c,v 1.2 1999/05/05 12:36:40 tsubai Exp $ */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #if defined(_KERNEL) || defined(_STANDALONE) #include diff --git a/lib/libc/powerpc64/gen/syncicache.c b/lib/libc/powerpc64/gen/syncicache.c index d96529bc3833..7885a36bd1d1 100644 --- a/lib/libc/powerpc64/gen/syncicache.c +++ b/lib/libc/powerpc64/gen/syncicache.c @@ -33,11 +33,6 @@ * $NetBSD: syncicache.c,v 1.2 1999/05/05 12:36:40 tsubai Exp $ */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #if defined(_KERNEL) || defined(_STANDALONE) #include diff --git a/lib/msun/src/e_sqrtf.c b/lib/msun/src/e_sqrtf.c index 1fd0cec447fb..f9e2a320f20e 100644 --- a/lib/msun/src/e_sqrtf.c +++ b/lib/msun/src/e_sqrtf.c @@ -13,10 +13,6 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif - #include "math.h" #include "math_private.h" diff --git a/lib/msun/src/s_modf.c b/lib/msun/src/s_modf.c index ab13191b9004..ffb1702751fa 100644 --- a/lib/msun/src/s_modf.c +++ b/lib/msun/src/s_modf.c @@ -10,10 +10,6 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif - /* * modf(double x, double *iptr) * return fraction part of x, and return x's integral part in *iptr. diff --git a/lib/msun/src/w_cabsf.c b/lib/msun/src/w_cabsf.c index b5065c8a5683..aedbdef217ca 100644 --- a/lib/msun/src/w_cabsf.c +++ b/lib/msun/src/w_cabsf.c @@ -5,11 +5,6 @@ * Placed into the Public Domain, 1994. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include "math_private.h" diff --git a/libexec/atrun/atrun.c b/libexec/atrun/atrun.c index e9e49146ba7a..ee312591ccd4 100644 --- a/libexec/atrun/atrun.c +++ b/libexec/atrun/atrun.c @@ -26,11 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - /* System Headers */ #include diff --git a/libexec/atrun/gloadavg.c b/libexec/atrun/gloadavg.c index 86651aac3e67..e513183a391c 100644 --- a/libexec/atrun/gloadavg.c +++ b/libexec/atrun/gloadavg.c @@ -25,11 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #ifndef __FreeBSD__ #define _POSIX_SOURCE 1 diff --git a/libexec/atrun/gloadavg.h b/libexec/atrun/gloadavg.h index f0ae6b45e868..a202cf0b3700 100644 --- a/libexec/atrun/gloadavg.h +++ b/libexec/atrun/gloadavg.h @@ -26,6 +26,3 @@ */ double gloadavg(void); -#if 0 -static char atrun_h_rcsid[] = "$FreeBSD$"; -#endif diff --git a/libexec/comsat/comsat.c b/libexec/comsat/comsat.c index c9d490d2cf6e..138881db9e4a 100644 --- a/libexec/comsat/comsat.c +++ b/libexec/comsat/comsat.c @@ -39,8 +39,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)comsat.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/fingerd/fingerd.c b/libexec/fingerd/fingerd.c index ff8d5046a577..dd51064a00a6 100644 --- a/libexec/fingerd/fingerd.c +++ b/libexec/fingerd/fingerd.c @@ -39,8 +39,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)fingerd.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/getty/init.c b/libexec/getty/init.c index 79b9601a2be1..e09cbf2c3e94 100644 --- a/libexec/getty/init.c +++ b/libexec/getty/init.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)from: init.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/getty/subr.c b/libexec/getty/subr.c index 68682df6d5bd..2c262e0968ca 100644 --- a/libexec/getty/subr.c +++ b/libexec/getty/subr.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)from: subr.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/mknetid/hash.c b/libexec/mknetid/hash.c index d340142aad90..5375b80fbe3b 100644 --- a/libexec/mknetid/hash.c +++ b/libexec/mknetid/hash.c @@ -38,11 +38,6 @@ #include #include "hash.h" -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - /* * This hash function is stolen directly from the * Berkeley DB package. It already exists inside libc, but diff --git a/libexec/mknetid/mknetid.c b/libexec/mknetid/mknetid.c index 3a39b4b3e675..a5c8281ef34d 100644 --- a/libexec/mknetid/mknetid.c +++ b/libexec/mknetid/mknetid.c @@ -55,11 +55,6 @@ #include "hash.h" -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #define LINSIZ 1024 #define OPSYS "unix" diff --git a/libexec/mknetid/parse_group.c b/libexec/mknetid/parse_group.c index e876bd9f2ff0..59ebf44eab37 100644 --- a/libexec/mknetid/parse_group.c +++ b/libexec/mknetid/parse_group.c @@ -33,8 +33,6 @@ #if 0 static const char sccsid[] = "@(#)getgrent.c 8.2 (Berkeley) 3/21/94"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/rbootd/bpf.c b/libexec/rbootd/bpf.c index 0edcc06ccf7e..6fbe34111a67 100644 --- a/libexec/rbootd/bpf.c +++ b/libexec/rbootd/bpf.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)bpf.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/conf.c b/libexec/rbootd/conf.c index af46f53c3c88..a48d3efdb9c1 100644 --- a/libexec/rbootd/conf.c +++ b/libexec/rbootd/conf.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)conf.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/parseconf.c b/libexec/rbootd/parseconf.c index 9585e87185c6..262f81fb68d7 100644 --- a/libexec/rbootd/parseconf.c +++ b/libexec/rbootd/parseconf.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)parseconf.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/rmpproto.c b/libexec/rbootd/rmpproto.c index a31ec1de8abf..2603e697d8b8 100644 --- a/libexec/rbootd/rmpproto.c +++ b/libexec/rbootd/rmpproto.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)rmpproto.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/utils.c b/libexec/rbootd/utils.c index f5c2d62d30d7..36a7116a05c4 100644 --- a/libexec/rbootd/utils.c +++ b/libexec/rbootd/utils.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)utils.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/revnetgroup/hash.c b/libexec/revnetgroup/hash.c index 2dd1a3f91d74..db8e95e3040c 100644 --- a/libexec/revnetgroup/hash.c +++ b/libexec/revnetgroup/hash.c @@ -32,11 +32,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/revnetgroup/parse_netgroup.c b/libexec/revnetgroup/parse_netgroup.c index a1e954164ea9..3d6a7939fa1d 100644 --- a/libexec/revnetgroup/parse_netgroup.c +++ b/libexec/revnetgroup/parse_netgroup.c @@ -32,11 +32,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - /* * This is a specially hacked-up version of getnetgrent.c used to parse * data from the stored hash table of netgroup info rather than from a diff --git a/libexec/revnetgroup/revnetgroup.c b/libexec/revnetgroup/revnetgroup.c index 11fba515a7ba..34ec0d9491c4 100644 --- a/libexec/revnetgroup/revnetgroup.c +++ b/libexec/revnetgroup/revnetgroup.c @@ -38,11 +38,6 @@ * Columbia University, New York City */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c index 1f1bb7cf4048..cc488657c077 100644 --- a/libexec/rpc.rstatd/rstat_proc.c +++ b/libexec/rpc.rstatd/rstat_proc.c @@ -32,8 +32,6 @@ static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro"; static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* diff --git a/libexec/rpc.rstatd/rstatd.c b/libexec/rpc.rstatd/rstatd.c index 6a6b09b9ae0c..7cc3bac71c5d 100644 --- a/libexec/rpc.rstatd/rstatd.c +++ b/libexec/rpc.rstatd/rstatd.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/rpc.rusersd/rusers_proc.c b/libexec/rpc.rusersd/rusers_proc.c index bfb65dadb004..3bc4169a989f 100644 --- a/libexec/rpc.rusersd/rusers_proc.c +++ b/libexec/rpc.rusersd/rusers_proc.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #ifdef DEBUG #include #endif diff --git a/libexec/rpc.rusersd/rusersd.c b/libexec/rpc.rusersd/rusersd.c index e1e77398c8ff..cf00dd8d181e 100644 --- a/libexec/rpc.rusersd/rusersd.c +++ b/libexec/rpc.rusersd/rusersd.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/rpc.sprayd/sprayd.c b/libexec/rpc.sprayd/sprayd.c index 209d74af59af..2a71a93bf4ef 100644 --- a/libexec/rpc.sprayd/sprayd.c +++ b/libexec/rpc.sprayd/sprayd.c @@ -27,11 +27,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/rtld-elf/rtld_malloc.c b/libexec/rtld-elf/rtld_malloc.c index 4b5140551675..dafbc222322e 100644 --- a/libexec/rtld-elf/rtld_malloc.c +++ b/libexec/rtld-elf/rtld_malloc.c @@ -31,7 +31,6 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)malloc.c 5.11 (Berkeley) 2/23/91";*/ -static char *rcsid = "$FreeBSD$"; #endif /* LIBC_SCCS and not lint */ /* diff --git a/libexec/talkd/announce.c b/libexec/talkd/announce.c index 9cf326669998..b1b1acc09553 100644 --- a/libexec/talkd/announce.c +++ b/libexec/talkd/announce.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)announce.c 8.3 (Berkeley) 4/28/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/talkd/print.c b/libexec/talkd/print.c index 4d10329dd7f8..47ccb89f20d6 100644 --- a/libexec/talkd/print.c +++ b/libexec/talkd/print.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* debug print routines */ diff --git a/libexec/talkd/process.c b/libexec/talkd/process.c index 2bd22a1becb2..886fc038ab97 100644 --- a/libexec/talkd/process.c +++ b/libexec/talkd/process.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)process.c 8.2 (Berkeley) 11/16/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/talkd/table.c b/libexec/talkd/table.c index ed1560f86ff8..495d63b02b06 100644 --- a/libexec/talkd/table.c +++ b/libexec/talkd/table.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)table.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/talkd/talkd.c b/libexec/talkd/talkd.c index eb609207b156..76d0ec5a09ad 100644 --- a/libexec/talkd/talkd.c +++ b/libexec/talkd/talkd.c @@ -39,8 +39,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)talkd.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/sbin/dump/dumprmt.c b/sbin/dump/dumprmt.c index d1769faa3daf..a8b2d9c221da 100644 --- a/sbin/dump/dumprmt.c +++ b/sbin/dump/dumprmt.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)dumprmt.c 8.3 (Berkeley) 4/28/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/itime.c b/sbin/dump/itime.c index cb6d55625e6d..d9121e4df05a 100644 --- a/sbin/dump/itime.c +++ b/sbin/dump/itime.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)itime.c 8.1 (Berkeley) 6/5/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/main.c b/sbin/dump/main.c index 779db5fb4b43..a5b4eaa6f8ac 100644 --- a/sbin/dump/main.c +++ b/sbin/dump/main.c @@ -39,8 +39,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/1/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c index 8eb163516c72..d3ca5b2a926e 100644 --- a/sbin/dump/optr.c +++ b/sbin/dump/optr.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)optr.c 8.2 (Berkeley) 1/6/94"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/tape.c b/sbin/dump/tape.c index c123f7fa9404..3a3574f6d44d 100644 --- a/sbin/dump/tape.c +++ b/sbin/dump/tape.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)tape.c 8.4 (Berkeley) 5/1/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c index 08e902667759..281cffcdf6f2 100644 --- a/sbin/dump/traverse.c +++ b/sbin/dump/traverse.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)traverse.c 8.7 (Berkeley) 6/15/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/unctime.c b/sbin/dump/unctime.c index 3e03a65f1a7c..5f44c80f9358 100644 --- a/sbin/dump/unctime.c +++ b/sbin/dump/unctime.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)unctime.c 8.2 (Berkeley) 6/14/94"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index 739f281feb7f..7d2598c190e8 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -54,8 +54,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)dumpfs.c 8.5 (Berkeley) 4/29/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/ffsinfo/ffsinfo.c b/sbin/ffsinfo/ffsinfo.c index 9d447d209ffd..539cbd1631e1 100644 --- a/sbin/ffsinfo/ffsinfo.c +++ b/sbin/ffsinfo/ffsinfo.c @@ -48,11 +48,6 @@ Copyright (c) 1980, 1989, 1993 The Regents of the University of California.\n\ All rights reserved.\n"; #endif /* not lint */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - /* ********************************************************** INCLUDES ***** */ #include #include diff --git a/sbin/fsck_msdosfs/boot.c b/sbin/fsck_msdosfs/boot.c index 3d1657ad66f3..f91609470ad7 100644 --- a/sbin/fsck_msdosfs/boot.c +++ b/sbin/fsck_msdosfs/boot.c @@ -29,8 +29,6 @@ #include #ifndef lint __RCSID("$NetBSD: boot.c,v 1.22 2020/01/11 16:29:07 christos Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/fsck_msdosfs/check.c b/sbin/fsck_msdosfs/check.c index 654ceeb9c5ca..f672a2ac515c 100644 --- a/sbin/fsck_msdosfs/check.c +++ b/sbin/fsck_msdosfs/check.c @@ -29,8 +29,6 @@ #include #ifndef lint __RCSID("$NetBSD: check.c,v 1.14 2006/06/05 16:51:18 christos Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #ifdef HAVE_LIBUTIL_H diff --git a/sbin/fsck_msdosfs/dir.c b/sbin/fsck_msdosfs/dir.c index 02fe07880e0e..c60eaab59b12 100644 --- a/sbin/fsck_msdosfs/dir.c +++ b/sbin/fsck_msdosfs/dir.c @@ -32,8 +32,6 @@ #include #ifndef lint __RCSID("$NetBSD: dir.c,v 1.20 2006/06/05 16:51:18 christos Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/fsck_msdosfs/fat.c b/sbin/fsck_msdosfs/fat.c index e35e2f27d305..567bfcd428cb 100644 --- a/sbin/fsck_msdosfs/fat.c +++ b/sbin/fsck_msdosfs/fat.c @@ -30,8 +30,6 @@ #include #ifndef lint __RCSID("$NetBSD: fat.c,v 1.18 2006/06/05 16:51:18 christos Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/fsck_msdosfs/main.c b/sbin/fsck_msdosfs/main.c index de54cd18eae7..0713189daa2d 100644 --- a/sbin/fsck_msdosfs/main.c +++ b/sbin/fsck_msdosfs/main.c @@ -29,8 +29,6 @@ #include #ifndef lint __RCSID("$NetBSD: main.c,v 1.10 1997/10/01 02:18:14 enami Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c index 2d8c75cce5fe..48526ad4044b 100644 --- a/sbin/fsdb/fsdb.c +++ b/sbin/fsdb/fsdb.c @@ -30,11 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/fsdb/fsdbutil.c b/sbin/fsdb/fsdbutil.c index c8a3a8a525e3..737dabba643f 100644 --- a/sbin/fsdb/fsdbutil.c +++ b/sbin/fsdb/fsdbutil.c @@ -30,11 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c index cd60093e3642..2a5eb0c5136d 100644 --- a/sbin/fsirand/fsirand.c +++ b/sbin/fsirand/fsirand.c @@ -32,11 +32,6 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include diff --git a/sbin/growfs/debug.c b/sbin/growfs/debug.c index e0dfc997fcf6..456e67dbc5c2 100644 --- a/sbin/growfs/debug.c +++ b/sbin/growfs/debug.c @@ -41,11 +41,6 @@ * */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include diff --git a/sbin/ifconfig/af_inet.c b/sbin/ifconfig/af_inet.c index bcf2a8ab0ffd..5e3084165b33 100644 --- a/sbin/ifconfig/af_inet.c +++ b/sbin/ifconfig/af_inet.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/ifconfig/af_inet6.c b/sbin/ifconfig/af_inet6.c index b3da21758982..fcd04139a8c1 100644 --- a/sbin/ifconfig/af_inet6.c +++ b/sbin/ifconfig/af_inet6.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/ifconfig/af_link.c b/sbin/ifconfig/af_link.c index 17de87539d9a..6c23f7016806 100644 --- a/sbin/ifconfig/af_link.c +++ b/sbin/ifconfig/af_link.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/ifconfig/af_nd6.c b/sbin/ifconfig/af_nd6.c index 7eeb86585197..73044e95740a 100644 --- a/sbin/ifconfig/af_nd6.c +++ b/sbin/ifconfig/af_nd6.c @@ -25,11 +25,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - *** 1173 LINES SKIPPED *** From nobody Tue Oct 24 18:37:09 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPx4GrCz4yMG8; Tue, 24 Oct 2023 18:37: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 4SFLPx2RGvz3YXY; Tue, 24 Oct 2023 18:37:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s29XMgTmCj2uuMruxrOpiS7DavA8atb6qJC6jGXwH6Q=; b=tXUY5o5bW7dNuhmPPAZME77RsWvvu+DR0jK0KNNBoC2Hl6WCSW4CSUyitkG90KLYeLFpO7 wX7ab4GKmIuGmlxyLpYxy9tWAapYI33Yd1P5Ilk8yKsq3YWlqAmWgw42LuCz5GtQ7Vyo4E /Z8vfLvUeLgJA9q48fvwd6RPa0Eb2+8Dt1lNLA39zOkAnFJuLMSja5v7fMCqFP8BujMFRf HZP5vDKEz0FK9n2kr7RzC4N9xEzjJ/WhyiGcrRWzi1bMiXUo5VpQBwkt8Po8WElP/nagAy eqgc3ptmiOeKXRdYLX89HaKlj355zr5AuZLENIcnpTFPR0MgBoz6uMmrRer6xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172629; a=rsa-sha256; cv=none; b=XepDQqD1WX1sZz9njYBE/K2tQq3yc5PA6c6WxCCrUeea5pKKzT/3U986QEaGwoDUSvSzxs V+YQwfd9eKvBlxE86caqw4bP8P5cMS0ioCNey39CNr0yN4hE79xUO2E4bI0kQ3r8g1yXby lvkuncRwXila4ejLmoe2i+di3QKCJHa40G41GESCDlowkFeuNxSxWSJoxemeDYCWbCoy+w vZ6ICmOIGlYZXuUa/eGPc0xfanklUy1urPFKASyNcYOut7ut12qODznV22ENlEbnw5g2Fy l5udCpcvM130/nX+3zzkIb88JLg3jiTh/x+8p/v3ZRoIfC11RHtn7it4Ucip9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=s29XMgTmCj2uuMruxrOpiS7DavA8atb6qJC6jGXwH6Q=; b=qpgE13D214gfggbL15uK29MHpsnK7TEY/zIYj6ytiLUqii+TiyxLBwnItG5lM7ArIN15lu olSO3WqJa9eN/X0iI+u7cc0iXpik2IR0CdVaXHEGFFofIzpuuk+id5n93gN4GFi0oWL0EK 5g+JRcz3lTv/n6qUihaZ2xkvQIC/0TKMj7nkjmOUEz/LJfwhwXI8k0nm68jcCFN30q2nHw jtbKq4Gz8KyyCeScK7vEzb4GVk1oyRI7/LW4WHYpT/KGV/0kPMLEYSyFsKzLVF3pSgOHrf ovVdCRguuMa43+jVH1zQdougc68VahKKavgHsx8aRVp2eA+EcBn/juwXqV6mpw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPx1Y6FzZ3W; Tue, 24 Oct 2023 18:37:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIb94G088482; Tue, 24 Oct 2023 18:37:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIb9oX088480; Tue, 24 Oct 2023 18:37:09 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:09 GMT Message-Id: <202310241837.39OIb9oX088480@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 058aa09fa32f - stable/14 - powerpc/generate-hfs.sh: Don't include $FreeBSD$ in prefix to uuencoded image List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 058aa09fa32f4b97887dacffa0651f455379546e Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=058aa09fa32f4b97887dacffa0651f455379546e commit 058aa09fa32f4b97887dacffa0651f455379546e Author: John Baldwin AuthorDate: 2023-09-25 14:55:18 +0000 Commit: John Baldwin CommitDate: 2023-10-24 17:11:12 +0000 powerpc/generate-hfs.sh: Don't include $FreeBSD$ in prefix to uuencoded image Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41958 (cherry picked from commit 5919ab299160e6d330bfd8bacf7bd1c5ad8cabb9) --- release/powerpc/generate-hfs.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/release/powerpc/generate-hfs.sh b/release/powerpc/generate-hfs.sh index 46f66d601ce3..50f77933f273 100755 --- a/release/powerpc/generate-hfs.sh +++ b/release/powerpc/generate-hfs.sh @@ -55,7 +55,6 @@ rm loader.tmp bzip2 $OUTPUT_FILE echo 'HFS boot filesystem created by generate-hfs.sh' > $OUTPUT_FILE.bz2.uu echo 'DO NOT EDIT' >> $OUTPUT_FILE.bz2.uu -echo '$FreeBSD$' >> $OUTPUT_FILE.bz2.uu uuencode $OUTPUT_FILE.bz2 $OUTPUT_FILE.bz2 >> $OUTPUT_FILE.bz2.uu rm $OUTPUT_FILE.bz2 From nobody Tue Oct 24 18:37:09 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPx4HVzz4yMG9; Tue, 24 Oct 2023 18:37: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 4SFLPx2WfYz3YJY; Tue, 24 Oct 2023 18:37:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6GEASAnILP3M1IcyhN35xi12k6TExdf/yo24RGciwFw=; b=O+nmEaQii+6P8wcKT4noU3lo0gaklb/2SgnUbHnyeMCUGpOCF7WFVzSGlEEerNIPBVqsOU fc0rO1/MsXpFMKHea+YJhkWrGMbW/elcwlW/kavNVTo4OJHizc6qxWLSe1TezfiGh3Exc3 s0qZSUu9/ayvzj6ZbD4iFaeoy34vod8NpRKSDvG4RvbWQXyiQxWvrolgYjC1WICQGaJak7 OWVOCc/tJPH+FleDBV6/3nZMsz/jDZMkztN/mIJYOckYGtHw8c1UQdald1LaA5d07dGWTS PCu8ZDkQ1Ou1wZGgQ6Nr8WVAbLBXZxSD8uRY5nNHUBkTKwlRRPtPN4a7iUbsbg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172629; a=rsa-sha256; cv=none; b=UwHdMrYAqnDlYx3gj08d3230JQr0yJCaXIA+b1/1Haw7ryRlBgdLiHNknmExandUAZ4sMM l+A9ZAerYRtMzjWWq6KlMyMcow31L5uvdXUBfUSipr5Jpbpj8gIqp120BoQbwfizKQOcaT zYRgUy55x+dx1ZSmBMpCyErqpRT/LVAaDC7R/HNAU4GlYXqAgieHPSTlgqbpxpGovJl+2v 54cXD+ZC3+bHLrEYMB7onMV3papv28xWs4HibHwlVeVUq9gbG0tAA5Kr9MQ5fer9LLOC8S 13cAYw8swnQoEmM0h71QLYwar1EbDp8xzjWuwpZ6eqwzZjRms/o45Xs+TMUXEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6GEASAnILP3M1IcyhN35xi12k6TExdf/yo24RGciwFw=; b=Nw/LVvEwY7fZOd7hk/+M1JYMZtlzuc34CqeUbESxTzHrLhr5niBiJYpE4SMFc2K7DUr1rn Fg/oVtRXFyM7z7FXQgTbXoqmwdIKA8PuqoUHGCQCRnbY5Sm040fXK2vVvXw9nihs/bxEe4 SW59hD+X9AYZPiS6AkTqzQTOp1GzVSj+Ho6931TVIzTVgKtxJ76W1AZvxmk1mQwrYv6vSA mA+IclW9a8NJ07H1P15yuizNExw2P5e7TaMD63fDzt6ykSKmrf4ZpbBeewhnkykubNkrxS O2TwhdRynz//XccSt+kmwrINDYVRfxgl46eoad61sicw6ZR8g368Q/5ZNhXiLw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPx1czwzYlN; Tue, 24 Oct 2023 18:37:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIb9js088486; Tue, 24 Oct 2023 18:37:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIb96h088475; Tue, 24 Oct 2023 18:37:09 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:09 GMT Message-Id: <202310241837.39OIb96h088475@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: de270f81b246 - stable/13 - Purge more stray embedded $FreeBSD$ strings List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: de270f81b246e154640c0d250696c458ff1c0e3b Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=de270f81b246e154640c0d250696c458ff1c0e3b commit de270f81b246e154640c0d250696c458ff1c0e3b Author: John Baldwin AuthorDate: 2023-09-25 14:54:56 +0000 Commit: John Baldwin CommitDate: 2023-10-24 18:13:18 +0000 Purge more stray embedded $FreeBSD$ strings These do not use __FBSDID but instead use bare char arrays. Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41957 (cherry picked from commit eba230afba4932f02a1ca44efc797cf7499a5cb0) --- lib/lib80211/lib80211_regdomain.c | 3 --- lib/libc/net/nslexer.l | 6 ------ lib/libc/powerpc/gen/syncicache.c | 5 ----- lib/libc/powerpc64/gen/syncicache.c | 5 ----- lib/msun/src/e_sqrtf.c | 4 ---- lib/msun/src/s_modf.c | 4 ---- lib/msun/src/w_cabsf.c | 5 ----- libexec/atrun/atrun.c | 5 ----- libexec/atrun/gloadavg.c | 5 ----- libexec/atrun/gloadavg.h | 3 --- libexec/comsat/comsat.c | 2 -- libexec/fingerd/fingerd.c | 2 -- libexec/getty/init.c | 2 -- libexec/getty/subr.c | 2 -- libexec/mknetid/hash.c | 5 ----- libexec/mknetid/mknetid.c | 5 ----- libexec/mknetid/parse_group.c | 2 -- libexec/rbootd/bpf.c | 2 -- libexec/rbootd/conf.c | 2 -- libexec/rbootd/parseconf.c | 2 -- libexec/rbootd/rmpproto.c | 2 -- libexec/rbootd/utils.c | 2 -- libexec/revnetgroup/hash.c | 5 ----- libexec/revnetgroup/parse_netgroup.c | 5 ----- libexec/revnetgroup/revnetgroup.c | 5 ----- libexec/rpc.rstatd/rstat_proc.c | 2 -- libexec/rpc.rstatd/rstatd.c | 5 ----- libexec/rpc.rusersd/rusers_proc.c | 5 ----- libexec/rpc.rusersd/rusersd.c | 5 ----- libexec/rpc.sprayd/sprayd.c | 5 ----- libexec/rtld-elf/rtld_malloc.c | 1 - libexec/talkd/announce.c | 2 -- libexec/talkd/print.c | 2 -- libexec/talkd/process.c | 2 -- libexec/talkd/table.c | 2 -- libexec/talkd/talkd.c | 2 -- sbin/dump/dumprmt.c | 2 -- sbin/dump/itime.c | 2 -- sbin/dump/main.c | 2 -- sbin/dump/optr.c | 2 -- sbin/dump/tape.c | 2 -- sbin/dump/traverse.c | 2 -- sbin/dump/unctime.c | 2 -- sbin/dumpfs/dumpfs.c | 2 -- sbin/ffsinfo/ffsinfo.c | 5 ----- sbin/fsck_msdosfs/boot.c | 2 -- sbin/fsck_msdosfs/check.c | 2 -- sbin/fsck_msdosfs/dir.c | 2 -- sbin/fsck_msdosfs/fat.c | 2 -- sbin/fsck_msdosfs/main.c | 2 -- sbin/fsdb/fsdb.c | 5 ----- sbin/fsdb/fsdbutil.c | 5 ----- sbin/fsirand/fsirand.c | 5 ----- sbin/growfs/debug.c | 5 ----- sbin/ifconfig/af_inet.c | 5 ----- sbin/ifconfig/af_inet6.c | 5 ----- sbin/ifconfig/af_link.c | 5 ----- sbin/ifconfig/af_nd6.c | 5 ----- sbin/ifconfig/ifbridge.c | 5 ----- sbin/ifconfig/ifclone.c | 5 ----- sbin/ifconfig/ifconfig.c | 2 -- sbin/ifconfig/ifgif.c | 5 ----- sbin/ifconfig/ifgroup.c | 5 ----- sbin/ifconfig/iflagg.c | 5 ----- sbin/ifconfig/ifvlan.c | 5 ----- sbin/ifconfig/sfp.c | 5 ----- sbin/init/init.c | 2 -- sbin/mknod/mknod.c | 2 -- sbin/mount/mount_fs.c | 2 -- sbin/mount_cd9660/mount_cd9660.c | 2 -- sbin/mount_msdosfs/mount_msdosfs.c | 5 ----- sbin/mount_nullfs/mount_nullfs.c | 2 -- sbin/mount_unionfs/mount_unionfs.c | 3 --- sbin/newfs_msdos/mkfs_msdos.c | 5 ----- sbin/newfs_msdos/newfs_msdos.c | 5 ----- sbin/nos-tun/nos-tun.c | 5 ----- sbin/restore/dirs.c | 2 -- sbin/restore/symtab.c | 2 -- sbin/restore/utilities.c | 2 -- sbin/umount/umount.c | 2 -- stand/libsa/powerpc/syncicache.c | 5 ----- sys/netpfil/ipfilter/netinet/fil.c | 1 - sys/netpfil/ipfilter/netinet/ip_auth.c | 1 - sys/netpfil/ipfilter/netinet/ip_frag.c | 1 - sys/netpfil/ipfilter/netinet/ip_nat.c | 1 - usr.bin/locate/locate/locate.c | 2 -- usr.bin/mktemp/mktemp.c | 5 ----- usr.bin/morse/morse.c | 2 -- usr.bin/nfsstat/nfsstat.c | 2 -- usr.bin/number/number.c | 2 -- usr.bin/primes/pattern.c | 2 -- usr.bin/primes/pr_tbl.c | 2 -- usr.bin/primes/primes.c | 2 -- usr.bin/printf/printf.c | 2 -- usr.bin/showmount/showmount.c | 2 -- usr.bin/tee/tee.c | 2 -- usr.bin/time/time.c | 2 -- usr.bin/truncate/truncate.c | 3 --- usr.bin/ul/ul.c | 2 -- usr.bin/uniq/uniq.c | 2 -- usr.bin/units/units.c | 5 ----- usr.bin/yes/yes.c | 2 -- usr.sbin/apmd/apmd.c | 5 ----- usr.sbin/btxld/btxld.c | 5 ----- usr.sbin/ckdist/ckdist.c | 5 ----- usr.sbin/config/main.c | 2 -- usr.sbin/config/mkheaders.c | 2 -- usr.sbin/config/mkmakefile.c | 2 -- usr.sbin/config/mkoptions.c | 2 -- usr.sbin/flowctl/flowctl.c | 5 ----- usr.sbin/keyserv/crypt_server.c | 5 ----- usr.sbin/keyserv/keyserv.c | 2 -- usr.sbin/keyserv/setkey.c | 2 -- usr.sbin/mptable/mptable.c | 5 ----- usr.sbin/nfsd/nfsd.c | 2 -- usr.sbin/pciconf/cap.c | 5 ----- usr.sbin/pciconf/err.c | 5 ----- usr.sbin/pciconf/pciconf.c | 5 ----- usr.sbin/pw/bitmap.c | 5 ----- usr.sbin/pw/cpdir.c | 5 ----- usr.sbin/pw/grupd.c | 5 ----- usr.sbin/pw/psdate.c | 5 ----- usr.sbin/pw/pw.c | 5 ----- usr.sbin/pw/pw_conf.c | 5 ----- usr.sbin/pw/pw_group.c | 5 ----- usr.sbin/pw/pw_log.c | 5 ----- usr.sbin/pw/pw_nis.c | 5 ----- usr.sbin/pw/pw_user.c | 5 ----- usr.sbin/pw/pw_vpw.c | 5 ----- usr.sbin/pw/pwupd.c | 5 ----- usr.sbin/pw/rm_r.c | 5 ----- usr.sbin/rpc.lockd/test.c | 1 - usr.sbin/rpc.statd/test.c | 5 ----- usr.sbin/rpc.umntall/rpc.umntall.c | 5 ----- usr.sbin/rpc.ypupdated/update.c | 2 -- usr.sbin/spray/spray.c | 5 ----- usr.sbin/traceroute6/traceroute6.c | 2 -- usr.sbin/vidcontrol/decode.c | 5 ----- usr.sbin/vidcontrol/vidcontrol.c | 5 ----- 139 files changed, 476 deletions(-) diff --git a/lib/lib80211/lib80211_regdomain.c b/lib/lib80211/lib80211_regdomain.c index f5ed236467f5..189d4661c78b 100644 --- a/lib/lib80211/lib80211_regdomain.c +++ b/lib/lib80211/lib80211_regdomain.c @@ -22,9 +22,6 @@ * (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 lint -static const char rcsid[] = "$FreeBSD$"; -#endif /* not lint */ #include #include diff --git a/lib/libc/net/nslexer.l b/lib/libc/net/nslexer.l index bd3c02dcacf4..ce0f18670e21 100644 --- a/lib/libc/net/nslexer.l +++ b/lib/libc/net/nslexer.l @@ -32,12 +32,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#include -#if defined(LIBC_SCCS) && !defined(lint) -static char *rcsid = - "$FreeBSD$"; -#endif /* LIBC_SCCS and not lint */ - #include "namespace.h" #include #define _NS_PRIVATE diff --git a/lib/libc/powerpc/gen/syncicache.c b/lib/libc/powerpc/gen/syncicache.c index 5192d1356153..6376cb0e576d 100644 --- a/lib/libc/powerpc/gen/syncicache.c +++ b/lib/libc/powerpc/gen/syncicache.c @@ -33,11 +33,6 @@ * $NetBSD: syncicache.c,v 1.2 1999/05/05 12:36:40 tsubai Exp $ */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #if defined(_KERNEL) || defined(_STANDALONE) #include diff --git a/lib/libc/powerpc64/gen/syncicache.c b/lib/libc/powerpc64/gen/syncicache.c index d96529bc3833..7885a36bd1d1 100644 --- a/lib/libc/powerpc64/gen/syncicache.c +++ b/lib/libc/powerpc64/gen/syncicache.c @@ -33,11 +33,6 @@ * $NetBSD: syncicache.c,v 1.2 1999/05/05 12:36:40 tsubai Exp $ */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #if defined(_KERNEL) || defined(_STANDALONE) #include diff --git a/lib/msun/src/e_sqrtf.c b/lib/msun/src/e_sqrtf.c index 1fd0cec447fb..f9e2a320f20e 100644 --- a/lib/msun/src/e_sqrtf.c +++ b/lib/msun/src/e_sqrtf.c @@ -13,10 +13,6 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif - #include "math.h" #include "math_private.h" diff --git a/lib/msun/src/s_modf.c b/lib/msun/src/s_modf.c index ab13191b9004..ffb1702751fa 100644 --- a/lib/msun/src/s_modf.c +++ b/lib/msun/src/s_modf.c @@ -10,10 +10,6 @@ * ==================================================== */ -#ifndef lint -static char rcsid[] = "$FreeBSD$"; -#endif - /* * modf(double x, double *iptr) * return fraction part of x, and return x's integral part in *iptr. diff --git a/lib/msun/src/w_cabsf.c b/lib/msun/src/w_cabsf.c index b5065c8a5683..aedbdef217ca 100644 --- a/lib/msun/src/w_cabsf.c +++ b/lib/msun/src/w_cabsf.c @@ -5,11 +5,6 @@ * Placed into the Public Domain, 1994. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include "math_private.h" diff --git a/libexec/atrun/atrun.c b/libexec/atrun/atrun.c index 78d4ab32157b..28b3fe0fe1cf 100644 --- a/libexec/atrun/atrun.c +++ b/libexec/atrun/atrun.c @@ -26,11 +26,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - /* System Headers */ #include diff --git a/libexec/atrun/gloadavg.c b/libexec/atrun/gloadavg.c index 86651aac3e67..e513183a391c 100644 --- a/libexec/atrun/gloadavg.c +++ b/libexec/atrun/gloadavg.c @@ -25,11 +25,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #ifndef __FreeBSD__ #define _POSIX_SOURCE 1 diff --git a/libexec/atrun/gloadavg.h b/libexec/atrun/gloadavg.h index f0ae6b45e868..a202cf0b3700 100644 --- a/libexec/atrun/gloadavg.h +++ b/libexec/atrun/gloadavg.h @@ -26,6 +26,3 @@ */ double gloadavg(void); -#if 0 -static char atrun_h_rcsid[] = "$FreeBSD$"; -#endif diff --git a/libexec/comsat/comsat.c b/libexec/comsat/comsat.c index c9d490d2cf6e..138881db9e4a 100644 --- a/libexec/comsat/comsat.c +++ b/libexec/comsat/comsat.c @@ -39,8 +39,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)comsat.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/fingerd/fingerd.c b/libexec/fingerd/fingerd.c index ff8d5046a577..dd51064a00a6 100644 --- a/libexec/fingerd/fingerd.c +++ b/libexec/fingerd/fingerd.c @@ -39,8 +39,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)fingerd.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/getty/init.c b/libexec/getty/init.c index 79b9601a2be1..e09cbf2c3e94 100644 --- a/libexec/getty/init.c +++ b/libexec/getty/init.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)from: init.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/getty/subr.c b/libexec/getty/subr.c index 68682df6d5bd..2c262e0968ca 100644 --- a/libexec/getty/subr.c +++ b/libexec/getty/subr.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)from: subr.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/mknetid/hash.c b/libexec/mknetid/hash.c index d340142aad90..5375b80fbe3b 100644 --- a/libexec/mknetid/hash.c +++ b/libexec/mknetid/hash.c @@ -38,11 +38,6 @@ #include #include "hash.h" -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - /* * This hash function is stolen directly from the * Berkeley DB package. It already exists inside libc, but diff --git a/libexec/mknetid/mknetid.c b/libexec/mknetid/mknetid.c index 3a39b4b3e675..a5c8281ef34d 100644 --- a/libexec/mknetid/mknetid.c +++ b/libexec/mknetid/mknetid.c @@ -55,11 +55,6 @@ #include "hash.h" -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #define LINSIZ 1024 #define OPSYS "unix" diff --git a/libexec/mknetid/parse_group.c b/libexec/mknetid/parse_group.c index e876bd9f2ff0..59ebf44eab37 100644 --- a/libexec/mknetid/parse_group.c +++ b/libexec/mknetid/parse_group.c @@ -33,8 +33,6 @@ #if 0 static const char sccsid[] = "@(#)getgrent.c 8.2 (Berkeley) 3/21/94"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/rbootd/bpf.c b/libexec/rbootd/bpf.c index 0edcc06ccf7e..6fbe34111a67 100644 --- a/libexec/rbootd/bpf.c +++ b/libexec/rbootd/bpf.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)bpf.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/conf.c b/libexec/rbootd/conf.c index af46f53c3c88..a48d3efdb9c1 100644 --- a/libexec/rbootd/conf.c +++ b/libexec/rbootd/conf.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)conf.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/parseconf.c b/libexec/rbootd/parseconf.c index 9585e87185c6..262f81fb68d7 100644 --- a/libexec/rbootd/parseconf.c +++ b/libexec/rbootd/parseconf.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)parseconf.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/rmpproto.c b/libexec/rbootd/rmpproto.c index a31ec1de8abf..2603e697d8b8 100644 --- a/libexec/rbootd/rmpproto.c +++ b/libexec/rbootd/rmpproto.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)rmpproto.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/rbootd/utils.c b/libexec/rbootd/utils.c index f5c2d62d30d7..36a7116a05c4 100644 --- a/libexec/rbootd/utils.c +++ b/libexec/rbootd/utils.c @@ -46,8 +46,6 @@ #if 0 static const char sccsid[] = "@(#)utils.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/revnetgroup/hash.c b/libexec/revnetgroup/hash.c index 2dd1a3f91d74..db8e95e3040c 100644 --- a/libexec/revnetgroup/hash.c +++ b/libexec/revnetgroup/hash.c @@ -32,11 +32,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/revnetgroup/parse_netgroup.c b/libexec/revnetgroup/parse_netgroup.c index a1e954164ea9..3d6a7939fa1d 100644 --- a/libexec/revnetgroup/parse_netgroup.c +++ b/libexec/revnetgroup/parse_netgroup.c @@ -32,11 +32,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - /* * This is a specially hacked-up version of getnetgrent.c used to parse * data from the stored hash table of netgroup info rather than from a diff --git a/libexec/revnetgroup/revnetgroup.c b/libexec/revnetgroup/revnetgroup.c index 11fba515a7ba..34ec0d9491c4 100644 --- a/libexec/revnetgroup/revnetgroup.c +++ b/libexec/revnetgroup/revnetgroup.c @@ -38,11 +38,6 @@ * Columbia University, New York City */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c index f0f2ffd65b57..7d363f65d7d1 100644 --- a/libexec/rpc.rstatd/rstat_proc.c +++ b/libexec/rpc.rstatd/rstat_proc.c @@ -32,8 +32,6 @@ static char sccsid[] = "from: @(#)rpc.rstatd.c 1.1 86/09/25 Copyr 1984 Sun Micro"; static char sccsid[] = "from: @(#)rstat_proc.c 2.2 88/08/01 4.0 RPCSRC"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* diff --git a/libexec/rpc.rstatd/rstatd.c b/libexec/rpc.rstatd/rstatd.c index 6a6b09b9ae0c..7cc3bac71c5d 100644 --- a/libexec/rpc.rstatd/rstatd.c +++ b/libexec/rpc.rstatd/rstatd.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/rpc.rusersd/rusers_proc.c b/libexec/rpc.rusersd/rusers_proc.c index bfb65dadb004..3bc4169a989f 100644 --- a/libexec/rpc.rusersd/rusers_proc.c +++ b/libexec/rpc.rusersd/rusers_proc.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #ifdef DEBUG #include #endif diff --git a/libexec/rpc.rusersd/rusersd.c b/libexec/rpc.rusersd/rusersd.c index e1e77398c8ff..cf00dd8d181e 100644 --- a/libexec/rpc.rusersd/rusersd.c +++ b/libexec/rpc.rusersd/rusersd.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/rpc.sprayd/sprayd.c b/libexec/rpc.sprayd/sprayd.c index 209d74af59af..2a71a93bf4ef 100644 --- a/libexec/rpc.sprayd/sprayd.c +++ b/libexec/rpc.sprayd/sprayd.c @@ -27,11 +27,6 @@ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/libexec/rtld-elf/rtld_malloc.c b/libexec/rtld-elf/rtld_malloc.c index 4b5140551675..dafbc222322e 100644 --- a/libexec/rtld-elf/rtld_malloc.c +++ b/libexec/rtld-elf/rtld_malloc.c @@ -31,7 +31,6 @@ #if defined(LIBC_SCCS) && !defined(lint) /*static char *sccsid = "from: @(#)malloc.c 5.11 (Berkeley) 2/23/91";*/ -static char *rcsid = "$FreeBSD$"; #endif /* LIBC_SCCS and not lint */ /* diff --git a/libexec/talkd/announce.c b/libexec/talkd/announce.c index 9cf326669998..b1b1acc09553 100644 --- a/libexec/talkd/announce.c +++ b/libexec/talkd/announce.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)announce.c 8.3 (Berkeley) 4/28/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/libexec/talkd/print.c b/libexec/talkd/print.c index 4d10329dd7f8..47ccb89f20d6 100644 --- a/libexec/talkd/print.c +++ b/libexec/talkd/print.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)print.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* debug print routines */ diff --git a/libexec/talkd/process.c b/libexec/talkd/process.c index 2bd22a1becb2..886fc038ab97 100644 --- a/libexec/talkd/process.c +++ b/libexec/talkd/process.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)process.c 8.2 (Berkeley) 11/16/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/talkd/table.c b/libexec/talkd/table.c index ed1560f86ff8..495d63b02b06 100644 --- a/libexec/talkd/table.c +++ b/libexec/talkd/table.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)table.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/libexec/talkd/talkd.c b/libexec/talkd/talkd.c index eb609207b156..76d0ec5a09ad 100644 --- a/libexec/talkd/talkd.c +++ b/libexec/talkd/talkd.c @@ -39,8 +39,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)talkd.c 8.1 (Berkeley) 6/4/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ /* diff --git a/sbin/dump/dumprmt.c b/sbin/dump/dumprmt.c index d1769faa3daf..a8b2d9c221da 100644 --- a/sbin/dump/dumprmt.c +++ b/sbin/dump/dumprmt.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)dumprmt.c 8.3 (Berkeley) 4/28/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/itime.c b/sbin/dump/itime.c index cb6d55625e6d..d9121e4df05a 100644 --- a/sbin/dump/itime.c +++ b/sbin/dump/itime.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)itime.c 8.1 (Berkeley) 6/5/93"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/main.c b/sbin/dump/main.c index bbc54d7ab5d7..59e538051a29 100644 --- a/sbin/dump/main.c +++ b/sbin/dump/main.c @@ -39,8 +39,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)main.c 8.6 (Berkeley) 5/1/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/optr.c b/sbin/dump/optr.c index 8eb163516c72..d3ca5b2a926e 100644 --- a/sbin/dump/optr.c +++ b/sbin/dump/optr.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)optr.c 8.2 (Berkeley) 1/6/94"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/tape.c b/sbin/dump/tape.c index c123f7fa9404..3a3574f6d44d 100644 --- a/sbin/dump/tape.c +++ b/sbin/dump/tape.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)tape.c 8.4 (Berkeley) 5/1/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/traverse.c b/sbin/dump/traverse.c index 08e902667759..281cffcdf6f2 100644 --- a/sbin/dump/traverse.c +++ b/sbin/dump/traverse.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)traverse.c 8.7 (Berkeley) 6/15/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dump/unctime.c b/sbin/dump/unctime.c index 3e03a65f1a7c..5f44c80f9358 100644 --- a/sbin/dump/unctime.c +++ b/sbin/dump/unctime.c @@ -33,8 +33,6 @@ #if 0 static char sccsid[] = "@(#)unctime.c 8.2 (Berkeley) 6/14/94"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/dumpfs/dumpfs.c b/sbin/dumpfs/dumpfs.c index 7f3e7bb3e910..7e5b52a23067 100644 --- a/sbin/dumpfs/dumpfs.c +++ b/sbin/dumpfs/dumpfs.c @@ -54,8 +54,6 @@ static const char copyright[] = #if 0 static char sccsid[] = "@(#)dumpfs.c 8.5 (Berkeley) 4/29/95"; #endif -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/ffsinfo/ffsinfo.c b/sbin/ffsinfo/ffsinfo.c index 9bd3210986a9..b1c86a60ff2b 100644 --- a/sbin/ffsinfo/ffsinfo.c +++ b/sbin/ffsinfo/ffsinfo.c @@ -48,11 +48,6 @@ Copyright (c) 1980, 1989, 1993 The Regents of the University of California.\n\ All rights reserved.\n"; #endif /* not lint */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - /* ********************************************************** INCLUDES ***** */ #include #include diff --git a/sbin/fsck_msdosfs/boot.c b/sbin/fsck_msdosfs/boot.c index 3d1657ad66f3..f91609470ad7 100644 --- a/sbin/fsck_msdosfs/boot.c +++ b/sbin/fsck_msdosfs/boot.c @@ -29,8 +29,6 @@ #include #ifndef lint __RCSID("$NetBSD: boot.c,v 1.22 2020/01/11 16:29:07 christos Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/fsck_msdosfs/check.c b/sbin/fsck_msdosfs/check.c index 654ceeb9c5ca..f672a2ac515c 100644 --- a/sbin/fsck_msdosfs/check.c +++ b/sbin/fsck_msdosfs/check.c @@ -29,8 +29,6 @@ #include #ifndef lint __RCSID("$NetBSD: check.c,v 1.14 2006/06/05 16:51:18 christos Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #ifdef HAVE_LIBUTIL_H diff --git a/sbin/fsck_msdosfs/dir.c b/sbin/fsck_msdosfs/dir.c index 02c93c10faac..be3d5ddc5425 100644 --- a/sbin/fsck_msdosfs/dir.c +++ b/sbin/fsck_msdosfs/dir.c @@ -32,8 +32,6 @@ #include #ifndef lint __RCSID("$NetBSD: dir.c,v 1.20 2006/06/05 16:51:18 christos Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/fsck_msdosfs/fat.c b/sbin/fsck_msdosfs/fat.c index e35e2f27d305..567bfcd428cb 100644 --- a/sbin/fsck_msdosfs/fat.c +++ b/sbin/fsck_msdosfs/fat.c @@ -30,8 +30,6 @@ #include #ifndef lint __RCSID("$NetBSD: fat.c,v 1.18 2006/06/05 16:51:18 christos Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/fsck_msdosfs/main.c b/sbin/fsck_msdosfs/main.c index de54cd18eae7..0713189daa2d 100644 --- a/sbin/fsck_msdosfs/main.c +++ b/sbin/fsck_msdosfs/main.c @@ -29,8 +29,6 @@ #include #ifndef lint __RCSID("$NetBSD: main.c,v 1.10 1997/10/01 02:18:14 enami Exp $"); -static const char rcsid[] = - "$FreeBSD$"; #endif /* not lint */ #include diff --git a/sbin/fsdb/fsdb.c b/sbin/fsdb/fsdb.c index 1564810ee79d..8f1cac3aaa87 100644 --- a/sbin/fsdb/fsdb.c +++ b/sbin/fsdb/fsdb.c @@ -30,11 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/fsdb/fsdbutil.c b/sbin/fsdb/fsdbutil.c index c8a3a8a525e3..737dabba643f 100644 --- a/sbin/fsdb/fsdbutil.c +++ b/sbin/fsdb/fsdbutil.c @@ -30,11 +30,6 @@ * POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/fsirand/fsirand.c b/sbin/fsirand/fsirand.c index ca9a808f6717..c1900dc9e479 100644 --- a/sbin/fsirand/fsirand.c +++ b/sbin/fsirand/fsirand.c @@ -32,11 +32,6 @@ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include diff --git a/sbin/growfs/debug.c b/sbin/growfs/debug.c index e0dfc997fcf6..456e67dbc5c2 100644 --- a/sbin/growfs/debug.c +++ b/sbin/growfs/debug.c @@ -41,11 +41,6 @@ * */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include diff --git a/sbin/ifconfig/af_inet.c b/sbin/ifconfig/af_inet.c index c5c40de155d6..37c681ea6df9 100644 --- a/sbin/ifconfig/af_inet.c +++ b/sbin/ifconfig/af_inet.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/ifconfig/af_inet6.c b/sbin/ifconfig/af_inet6.c index 08902b934ad8..f883c88949da 100644 --- a/sbin/ifconfig/af_inet6.c +++ b/sbin/ifconfig/af_inet6.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/ifconfig/af_link.c b/sbin/ifconfig/af_link.c index fb7a235b2f49..cd5422c5541c 100644 --- a/sbin/ifconfig/af_link.c +++ b/sbin/ifconfig/af_link.c @@ -29,11 +29,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - #include #include #include diff --git a/sbin/ifconfig/af_nd6.c b/sbin/ifconfig/af_nd6.c index d1be5a4dc00f..3116d03534bc 100644 --- a/sbin/ifconfig/af_nd6.c +++ b/sbin/ifconfig/af_nd6.c @@ -25,11 +25,6 @@ * SUCH DAMAGE. */ -#ifndef lint -static const char rcsid[] = - "$FreeBSD$"; -#endif /* not lint */ - *** 1173 LINES SKIPPED *** From nobody Tue Oct 24 18:37:10 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPy56LYz4yMJX; Tue, 24 Oct 2023 18:37: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 4SFLPy35GCz3YPc; Tue, 24 Oct 2023 18:37:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4GMZzk/5NL136dzfQyuxLxCu7g4OhKFI3MBf7Z9E27o=; b=pUeSE1wLLuVTuj+5n6HQCxS6w4GFqeSbF4zpht0n5THn9tgaNuDAs8OcQBdhNQ743amyo9 xkuDnGBZJZGjA7UNNXpKLGDmxCzQy+3VxubO7j8VRfpZWgm/P5EjUS+hqRvY3QMhaRcoLf N48sbmfJbb3sd1XibJR090fr+uvaVhGRl4hNJpT+gSvm3X6BIdQlbhT4ZfM04W2yMfUPaQ NAuo408BZJKB2amiLk1KkeJi+/2oUOqBHpwWxQvTHLVino9TDsoK8pPoMdr7kGshv3lYm7 Is+ZqzrzpjjA0xxPBEoYfxW8OwMe00MAL7ERgdjPm6Cjp05rs/C+b2zUaolTZA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172630; a=rsa-sha256; cv=none; b=e83G8e7OR3i8BO99Z7tHT6obUYnbkTE7pELZIQpEfI41hV/o7CNCw0H5fg+cSrsLZ2M/1V xJGUOoR0Vfbz8aHsEVrnmovgupN55DqtfRSgdhpW8W4MfiBilSgG4UfNLjeYVfGpHV2je/ EakPHByyK9ysYomo0Da2/ok4a0siaLiUZEsUWvtgBNWsa6WYnTTzut/8ovaLxfgzErliqO 7kBFJ8tY4Xys+y2m0CCpWZPu99ddHSAkf1uAT4b0/mJG3ZaMKDYI0jPr74mwyFsJly64W4 L9K7BnnsC3YVlhZKp8jt4XuNE4ZaNuAZASMoFwFxt8TBstkSIvfp+6cStwAXOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4GMZzk/5NL136dzfQyuxLxCu7g4OhKFI3MBf7Z9E27o=; b=XHDISFoRa2BJXTGanwaxot4fMlRL386koKiJPZwhU6wWrgGLZcAQ785odkSwfJUrkfdupG j4pJN+31c57IjFd9w2Hq7cZu1Obc4cKYkl/Ear6oNUJPESJXRRKXGkWVc5+8v+/MOawq5h +4HcMCEAyCjkeCia+1qIafepBwlc6bKJdLwZC2tP34dF2cY20eGLHb5AN3Y1sSGkp96psk wyk851oDW0Uo39nVDYrzDMqj0cO7LRYEdKYCJY06yejBfLct3/+hSj22L75fhI2a4CUeJ2 JCVNJzv8IgXe0o7g6AxELAAYTkWEgE13zcdHZkhrAdYXqiHlfSAXLh3wUVd4Yw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPy2BzvzYvJ; Tue, 24 Oct 2023 18:37:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIbAT3088603; Tue, 24 Oct 2023 18:37:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIbAcj088601; Tue, 24 Oct 2023 18:37:10 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:10 GMT Message-Id: <202310241837.39OIbAcj088601@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: bc1cddbd4ae7 - stable/13 - powerpc/generate-hfs.sh: Don't include $FreeBSD$ in prefix to uuencoded image List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: bc1cddbd4ae70fedcb26d8f0f4e5aa1ff10e3e8e Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bc1cddbd4ae70fedcb26d8f0f4e5aa1ff10e3e8e commit bc1cddbd4ae70fedcb26d8f0f4e5aa1ff10e3e8e Author: John Baldwin AuthorDate: 2023-09-25 14:55:18 +0000 Commit: John Baldwin CommitDate: 2023-10-24 18:13:18 +0000 powerpc/generate-hfs.sh: Don't include $FreeBSD$ in prefix to uuencoded image Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41958 (cherry picked from commit 5919ab299160e6d330bfd8bacf7bd1c5ad8cabb9) --- release/powerpc/generate-hfs.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/release/powerpc/generate-hfs.sh b/release/powerpc/generate-hfs.sh index 46f66d601ce3..50f77933f273 100755 --- a/release/powerpc/generate-hfs.sh +++ b/release/powerpc/generate-hfs.sh @@ -55,7 +55,6 @@ rm loader.tmp bzip2 $OUTPUT_FILE echo 'HFS boot filesystem created by generate-hfs.sh' > $OUTPUT_FILE.bz2.uu echo 'DO NOT EDIT' >> $OUTPUT_FILE.bz2.uu -echo '$FreeBSD$' >> $OUTPUT_FILE.bz2.uu uuencode $OUTPUT_FILE.bz2 $OUTPUT_FILE.bz2 >> $OUTPUT_FILE.bz2.uu rm $OUTPUT_FILE.bz2 From nobody Tue Oct 24 18:37:10 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPy5Hk5z4yLrg; Tue, 24 Oct 2023 18:37: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 4SFLPy34XVz3YRt; Tue, 24 Oct 2023 18:37:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dUOGDdzp0ChbC4d28yes41g7lpvUjUYirMRf5FyTGDY=; b=INi+uDrlnX2Z9kA84NGil+s5cF/cJTc/4Qa3ZiaJs4dAGMvnbM/DzeI8awwZK1u2zFsFz9 hN7zDMKdy8Qq2brhYr2WhICYIFmhAb/M2Hu5fAe5f4l2uv0d2/oEEBuHuK10AlfayoWM1M o5jjAGO1FDjxdLPXT04EihonZVFAi96FUJoIjAbkohM7AVV1gf8nLsHQUV+zgPI5q5GHWs Dww8YYtfF4vEbotaI9IvldNgeo/jK9Xmh7DdGIU04rR0BQyD5dImMI1UOAoAaocg5uv8um zi3KRGUi2jTdFVnxxDqqBf74X0Apf0xm2ZcozQHN5zmZCRGR0qkpbhPoUscQ3g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172630; a=rsa-sha256; cv=none; b=Xr0Zo67dVm/tNTCsdWjWnkhybInWamv0bOqoAUHods2Z+PN5nDkYfHyTIx4AjLE2kgQKag 1a8eQBe6aoVl1+aNUJe12zQIJYY0dSoqssecXjP2BHLdNpzN9aX5xadDoG7kzkxgNA9V+r xX0zEMVLeQCV77hr89TyoXGY1JyPjsO0wmNPJkozEzo8AwNUf5jaEMH6xXMnfn3IF7Cjgj ENlPyzrKXayHxhDymaVTM5Ne1Esd159eTs1uMmWF3hzNJ/ZXMqK5NRqSKX5ViLxOJ1NdxX wobFCaQcPxoIkH/aBb5XBnyncW7GV1xC9mrMsDHKwGwszeyg6M9BRMrdYDoGKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dUOGDdzp0ChbC4d28yes41g7lpvUjUYirMRf5FyTGDY=; b=S/8KjouYNjLHJIw97q1c7kRdXnIUE7EVtjeSOtXHMksI9m83FmcSdB5rCmPbNMChjoIzqg TXAwsttp0AZ4JHy167NGFkzintvSNKQ399N+HHK2NxTb/qhp0XOwLSp/ahMbti1dtC4IQB t/HR1mZNOCX+zm2L8AxMAwaxRwMyFx3UyDPcPGRErOeHCmM/zRp23AF6Z7DLL2iMBx+2vx WIWtwdevwv6+w4UYnRmbol3VntYQoL2xaDf4BCca5GV6UqM+m3QbMBlpVmm1DDQC+wogiG +yIlNrX72BBLOQcVMl2ZI6DGDAvipSzWniF67EwWr657jaAv8ekELva/SkJWbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPy2BRKzZ3X; Tue, 24 Oct 2023 18:37:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIbAYC088604; Tue, 24 Oct 2023 18:37:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIbAkl088596; Tue, 24 Oct 2023 18:37:10 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:10 GMT Message-Id: <202310241837.39OIbAkl088596@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 8f7aafe29f4a - stable/14 - Update a few tools to not embed $FreeBSD$ in generated files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 8f7aafe29f4a3716635a501ea3ef0177a5fdffe9 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8f7aafe29f4a3716635a501ea3ef0177a5fdffe9 commit 8f7aafe29f4a3716635a501ea3ef0177a5fdffe9 Author: John Baldwin AuthorDate: 2023-09-25 14:55:43 +0000 Commit: John Baldwin CommitDate: 2023-10-24 17:11:20 +0000 Update a few tools to not embed $FreeBSD$ in generated files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41959 (cherry picked from commit c4e2333cb2a59e44004d824a1093d9bf1d9fe273) --- tools/test/iconv/tablegen/tablegen.c | 2 -- tools/tools/drm/gen-drm_pciids | 4 ---- tools/tools/locale/tools/cldr2def.pl | 1 - 3 files changed, 7 deletions(-) diff --git a/tools/test/iconv/tablegen/tablegen.c b/tools/test/iconv/tablegen/tablegen.c index 843f8f6cb135..ecc1c7fdb44d 100644 --- a/tools/test/iconv/tablegen/tablegen.c +++ b/tools/test/iconv/tablegen/tablegen.c @@ -254,7 +254,6 @@ main (int argc, char *argv[]) if (dflag && iconvctl(cd, ICONV_SET_FALLBACKS, &fbs) != 0) err(1, NULL); if (cflag) { - printf("# $FreeBSD$\n\n"); printf("TYPE\t\tROWCOL\n"); printf("NAME\t\tUCS/%s\n", argv[0]); printf("%s", citrus_common); @@ -266,7 +265,6 @@ main (int argc, char *argv[]) if (dflag && (iconvctl(cd, ICONV_SET_FALLBACKS, &fbs) != 0)) err(1, NULL); if (cflag) { - printf("# $FreeBSD$\n\n"); printf("TYPE\t\tROWCOL\n"); printf("NAME\t\t%s/UCS\n", argv[0]); printf("%s", citrus_common); diff --git a/tools/tools/drm/gen-drm_pciids b/tools/tools/drm/gen-drm_pciids index ecb8e3aef6e4..472c75cb80dc 100755 --- a/tools/tools/drm/gen-drm_pciids +++ b/tools/tools/drm/gen-drm_pciids @@ -156,10 +156,6 @@ foreach my $vendor_define (sort keys(%linux_pciids)) { print STDERR "\nWrite FreeBSD header to stdout...\n"; print <<"EOF"; -/* - * \$FreeBSD\$ - */ - /* * Generated by $progname from: * o previous FreeBSD's drm_pciids.h diff --git a/tools/tools/locale/tools/cldr2def.pl b/tools/tools/locale/tools/cldr2def.pl index 8e48f32f263c..e59e6d3b13a1 100755 --- a/tools/tools/locale/tools/cldr2def.pl +++ b/tools/tools/locale/tools/cldr2def.pl @@ -947,7 +947,6 @@ sub make_makefile { } open(FOUT, ">$TYPE.draft/Makefile"); print FOUT < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 37d19dd86af3 - stable/14 - sendmail: Drop $FreeBSD$ from .mc files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 37d19dd86af32bb44f82f7b00c5a95cbee7642dc Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=37d19dd86af32bb44f82f7b00c5a95cbee7642dc commit 37d19dd86af32bb44f82f7b00c5a95cbee7642dc Author: John Baldwin AuthorDate: 2023-09-25 14:56:02 +0000 Commit: John Baldwin CommitDate: 2023-10-24 17:11:29 +0000 sendmail: Drop $FreeBSD$ from .mc files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41960 (cherry picked from commit 3aaa7724d68fb001ca3c7e75950edcb617aaeb65) --- etc/sendmail/freebsd.mc | 1 - etc/sendmail/freebsd.submit.mc | 1 - etc/sendmail/freefall.mc | 1 - 3 files changed, 3 deletions(-) diff --git a/etc/sendmail/freebsd.mc b/etc/sendmail/freebsd.mc index 5fd201da3900..cf80a3133c74 100644 --- a/etc/sendmail/freebsd.mc +++ b/etc/sendmail/freebsd.mc @@ -48,7 +48,6 @@ divert(-1) # divert(0) -VERSIONID(`$FreeBSD$') OSTYPE(freebsd6) DOMAIN(generic) diff --git a/etc/sendmail/freebsd.submit.mc b/etc/sendmail/freebsd.submit.mc index 165c5f8eadf8..e14a6bc56500 100644 --- a/etc/sendmail/freebsd.submit.mc +++ b/etc/sendmail/freebsd.submit.mc @@ -14,7 +14,6 @@ divert(-1) # divert(0)dnl -VERSIONID(`$FreeBSD$') define(`confCF_VERSION', `Submit')dnl define(`__OSTYPE__',`')dnl dirty hack to keep proto.m4 from complaining define(`_USE_DECNET_SYNTAX_', `1')dnl support DECnet diff --git a/etc/sendmail/freefall.mc b/etc/sendmail/freefall.mc index df07fea8b673..6406ab502ae1 100644 --- a/etc/sendmail/freefall.mc +++ b/etc/sendmail/freefall.mc @@ -40,7 +40,6 @@ divert(-1) # divert(0)dnl -VERSIONID(`$FreeBSD$') OSTYPE(freebsd6) FEATURE(nullclient, smarthost.ysv.freebsd.org) From nobody Tue Oct 24 18:37:11 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SFLPz4ftLz4yMJd; Tue, 24 Oct 2023 18:37: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 4SFLPz3vMWz3YrZ; Tue, 24 Oct 2023 18:37:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CpRbGzY7mGVpG970IQFbNA02Kkt3nIqKAHsJho+X5jY=; b=oDEZDtOlwvPINnm4+DrJoSytmoJK+g8RWc1etnsth8SWooHIDJBS3o2cDsgPNjLzxk391x Srwp/AA/8ym8bH6YQzh2YmlmOrW62BXDgbNb4Y3RjmD3rBFoS0l5mni4YEjhJUwH+irOqW G46yzoVWKuko6iaCiPICPYmVz8gDIVx5NNMw9RnhAFldJ/mGVFqAndWzMQMpY4U8n3r3H8 xA25zMJ6qOmwuwLmNWY+BrahvSZ/9bonHDz1ci0If7JTllYQKII7xhpFohanH3QVB4ifmW 1/wvjKeRZJCsNw+TyZjF3ia4AXKwe/phBtG4xZTyU3RZFuZLrcB/+huSC6aUmg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698172631; a=rsa-sha256; cv=none; b=scMfW/Nlgo9FQCOvOENuffX+RVw0//yVClttsjO8Q1vq6Ps1XzMggU4C9hqrmhProdQlFQ AK2ete1VmybVJbZvSGeW03Xs3XLjoPuOAzdX41Uh5twamIN129U5rwKvuY63vcvDl5kKk/ WSIkUn0K57o1rKFCIOApiUXoMwIhElv+h2AzNWndrSZWfnYIlj16ZLq5b5iidYSCirBf6+ k5bUwSVF/YAvLiTwzkz36nqDzqi5z5dH+RV6iDlrmErwuXmF/blhn4iAdtVjRwea74Vei0 BQ/adE0YmTmD1uABHElKMeeF10KiqQFn6rfSNZ8LHwnhFxyRNISwCZG2umZSmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698172631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CpRbGzY7mGVpG970IQFbNA02Kkt3nIqKAHsJho+X5jY=; b=fYznK38imis96EyWmy9H1K58vO8bo0WYvGG1D8Qo22GdvmJwNawICZdZ8M0PlbTTD4iPOB /8ev/2sxLvz4rRiZFyd1TS4/NzElxuhEXUideOZDhCT9gz08jThgU593g/kJutBtPGkqH9 9fw7wsTfyrbCH8bxO9sYSLdA8cxFkiXuiaTX/GVKyUA3anNqlucgnRxdkXg2XCS4RTUIqm l+Rn1lJw+9aJApGnjPz6SvYjOMeFo2JH1CGnVyh5q+/jjwZm3xcO6RSoVViIWxJIjtEfAn oe9rsNesFq7C0TfyLXFMUi4fmoNmXQYOdqBoRUgjvDzerJKoM5uxeEpETUB8RQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SFLPz30Q7zYmR; Tue, 24 Oct 2023 18:37:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39OIbBJS088709; Tue, 24 Oct 2023 18:37:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39OIbBBb088705; Tue, 24 Oct 2023 18:37:11 GMT (envelope-from git) Date: Tue, 24 Oct 2023 18:37:11 GMT Message-Id: <202310241837.39OIbBBb088705@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 050bfa51fe96 - stable/13 - Update a few tools to not embed $FreeBSD$ in generated files List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 050bfa51fe968a024763afaa67dd6caebc2a7c66 Auto-Submitted: auto-generated The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=050bfa51fe968a024763afaa67dd6caebc2a7c66 commit 050bfa51fe968a024763afaa67dd6caebc2a7c66 Author: John Baldwin AuthorDate: 2023-09-25 14:55:43 +0000 Commit: John Baldwin CommitDate: 2023-10-24 18:13:18 +0000 Update a few tools to not embed $FreeBSD$ in generated files Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41959 (cherry picked from commit c4e2333cb2a59e44004d824a1093d9bf1d9fe273) --- tools/test/iconv/tablegen/tablegen.c | 2 -- tools/tools/drm/gen-drm_pciids | 4 ---- tools/tools/locale/tools/cldr2def.pl | 1 - 3 files changed, 7 deletions(-) diff --git a/tools/test/iconv/tablegen/tablegen.c b/tools/test/iconv/tablegen/tablegen.c index 6cb7ff1a4095..8c544d9a0aa5 100644 --- a/tools/test/iconv/tablegen/tablegen.c +++ b/tools/test/iconv/tablegen/tablegen.c @@ -254,7 +254,6 @@ main (int argc, char *argv[]) if (dflag && iconvctl(cd, ICONV_SET_FALLBACKS, &fbs) != 0) err(1, NULL); if (cflag) { - printf("# $FreeBSD$\n\n"); printf("TYPE\t\tROWCOL\n"); printf("NAME\t\tUCS/%s\n", argv[0]); printf("%s", citrus_common); @@ -266,7 +265,6 @@ main (int argc, char *argv[]) if (dflag && (iconvctl(cd, ICONV_SET_FALLBACKS, &fbs) != 0)) err(1, NULL); if (cflag) { - printf("# $FreeBSD$\n\n"); printf("TYPE\t\tROWCOL\n"); printf("NAME\t\t%s/UCS\n", argv[0]); printf("%s", citrus_common); diff --git a/tools/tools/drm/gen-drm_pciids b/tools/tools/drm/gen-drm_pciids index ecb8e3aef6e4..472c75cb80dc 100755 --- a/tools/tools/drm/gen-drm_pciids +++ b/tools/tools/drm/gen-drm_pciids @@ -156,10 +156,6 @@ foreach my $vendor_define (sort keys(%linux_pciids)) { print STDERR "\nWrite FreeBSD header to stdout...\n"; print <<"EOF"; -/* - * \$FreeBSD\$ - */ - /* * Generated by $progname from: * o previous FreeBSD's drm_pciids.h diff --git a/tools/tools/locale/tools/cldr2def.pl b/tools/tools/locale/tools/cldr2def.pl index 4d3711664869..4f6adefedd78 100755 --- a/tools/tools/locale/tools/cldr2def.pl +++ b/tools/tools/locale/tools/cldr2def.pl @@ -982,7 +982,6 @@ sub make_makefile { } open(FOUT, ">$TYPE.draft/Makefile"); print FOUT < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: bfa1565246cf - stable/14 - Trim various $FreeBSD$ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bfa1565246cf02153749d2635814b03ad5d61d38 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=bfa1565246cf02153749d2635814b03ad5d61d38 commit bfa1565246cf02153749d2635814b03ad5d61d38 Author: John Baldwin AuthorDate: 2023-10-10 17:34:43 +0000 Commit: John Baldwin CommitDate: 2023-10-24 18:22:23 +0000 Trim various $FreeBSD$ Approved by: markj (cddl/contrib changes) Reviewed by: imp, emaste Differential Revision: https://reviews.freebsd.org/D41961 (cherry picked from commit f53355131f65d64e7643d734dbcd4fb2a5de20ed) --- cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 | 2 -- cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 | 2 -- cddl/usr.sbin/dwatch/dwatch | 1 - include/rpc/rpcb_prot.x | 2 -- lib/ofed/libirdma/Makefile | 2 -- share/man/man4/pcf8591.4 | 2 -- share/vt/keymaps/colemak-dh.acc.kbd | 2 -- stand/kboot/arch/powerpc64/ldscript.powerpc | 2 -- sys/dev/firmware/xilinx/zynqmp_firmware_if.m | 2 -- sys/modules/ath12k/Makefile | 2 -- sys/modules/mt76/mt7996/Makefile | 2 -- tools/tools/editing/freebsd.vim | 2 -- tools/tools/locale/etc/charmaps.xml | 1 - usr.sbin/ypldap/ypldap.c | 1 - 14 files changed, 25 deletions(-) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 index 42367b99b786..1745519c2c1a 100644 --- a/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 +++ b/cddl/contrib/opensolaris/cmd/dtrace/dtrace.1 @@ -18,8 +18,6 @@ .\" CDDL HEADER END .\" Copyright (c) 2006, Sun Microsystems, Inc. All Rights Reserved. .\" -.\" $FreeBSD$ -.\" .Dd February 24, 2023 .Dt DTRACE 1 .Os diff --git a/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 b/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 index c649e21bb67e..6c9657fa5406 100644 --- a/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 +++ b/cddl/contrib/opensolaris/cmd/lockstat/lockstat.1 @@ -19,8 +19,6 @@ .\" CDDL HEADER END .\" Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved. .\" -.\" $FreeBSD$ -.\" .Dd February 25, 2020 .Dt LOCKSTAT 1 .Os diff --git a/cddl/usr.sbin/dwatch/dwatch b/cddl/usr.sbin/dwatch/dwatch index 9adde7eb8d49..c9af8258f4ac 100755 --- a/cddl/usr.sbin/dwatch/dwatch +++ b/cddl/usr.sbin/dwatch/dwatch @@ -1327,7 +1327,6 @@ PSARGS_ACTION=$( cat <&9 ) * SUCH DAMAGE. * * $TITLE dtrace(1) script to log process(es) triggering $PROBE $ - * \$FreeBSD$ */ $( echo "$DTRACE_PRAGMA" | awk ' diff --git a/include/rpc/rpcb_prot.x b/include/rpc/rpcb_prot.x index a34bcc12502a..b5de5c6d865d 100644 --- a/include/rpc/rpcb_prot.x +++ b/include/rpc/rpcb_prot.x @@ -1,6 +1,4 @@ %/*- -% * $FreeBSD$ -% * % * Copyright (c) 2009, Sun Microsystems, Inc. % * All rights reserved. % * diff --git a/lib/ofed/libirdma/Makefile b/lib/ofed/libirdma/Makefile index 368bd536c587..349590672b44 100644 --- a/lib/ofed/libirdma/Makefile +++ b/lib/ofed/libirdma/Makefile @@ -1,5 +1,3 @@ -# $FreeBSD: releng/12.1/lib/ofed/libirdma/Makefile 336568 2018-07-20 23:49:57Z kib $ - _spath= ${SRCTOP}/contrib/ofed/libirdma _ipath= ${SRCTOP}/contrib/ofed/include lin_inc=/usr/src/sys/compat/linuxkpi/common/include diff --git a/share/man/man4/pcf8591.4 b/share/man/man4/pcf8591.4 index 6133d6cfa0d8..9acaf6502b38 100644 --- a/share/man/man4/pcf8591.4 +++ b/share/man/man4/pcf8591.4 @@ -24,8 +24,6 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.\" $FreeBSD: head/share/man/man4/cp2112.4 364144 2020-08-12 09:42:05Z avg $ -.\" .Dd November 6, 2021 .Dt PCF8591 4 .Os diff --git a/share/vt/keymaps/colemak-dh.acc.kbd b/share/vt/keymaps/colemak-dh.acc.kbd index 82c5faa2c6a6..b3f1b7d5ba83 100644 --- a/share/vt/keymaps/colemak-dh.acc.kbd +++ b/share/vt/keymaps/colemak-dh.acc.kbd @@ -1,5 +1,3 @@ -# $FreeBSD $ -# # Colemak Mod-DH (rev. 2) layout for FreeBSD console # 2006-01-01 Shai Coleman (http://colemak.com/), # 2014-10-27 Steve P (http://colemakmods.github.io/mod-dh/). diff --git a/stand/kboot/arch/powerpc64/ldscript.powerpc b/stand/kboot/arch/powerpc64/ldscript.powerpc index 662871eb7c09..f9fcc37f02d8 100644 --- a/stand/kboot/arch/powerpc64/ldscript.powerpc +++ b/stand/kboot/arch/powerpc64/ldscript.powerpc @@ -1,5 +1,3 @@ -/* $FreeBSD: user/nwhitehorn/kboot/powerpc/kboot/ldscript.powerpc 272888 2014-10-10 06:24:09Z bapt $ */ - OUTPUT_FORMAT("elf32-powerpc-freebsd", "elf32-powerpc-freebsd", "elf32-powerpc-freebsd") OUTPUT_ARCH(powerpc:common) diff --git a/sys/dev/firmware/xilinx/zynqmp_firmware_if.m b/sys/dev/firmware/xilinx/zynqmp_firmware_if.m index 1007d721952d..53b9fa5399bb 100644 --- a/sys/dev/firmware/xilinx/zynqmp_firmware_if.m +++ b/sys/dev/firmware/xilinx/zynqmp_firmware_if.m @@ -23,8 +23,6 @@ # 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$ INTERFACE zynqmp_firmware; diff --git a/sys/modules/ath12k/Makefile b/sys/modules/ath12k/Makefile index e72d061d0c08..674a68e12813 100644 --- a/sys/modules/ath12k/Makefile +++ b/sys/modules/ath12k/Makefile @@ -1,5 +1,3 @@ -# $FreeBSD$ - DEVATH12KDIR= ${SRCTOP}/sys/contrib/dev/athk/ath12k .PATH: ${DEVATH12KDIR} diff --git a/sys/modules/mt76/mt7996/Makefile b/sys/modules/mt76/mt7996/Makefile index 3a4a56d839a5..a43721b6079e 100644 --- a/sys/modules/mt76/mt7996/Makefile +++ b/sys/modules/mt76/mt7996/Makefile @@ -1,5 +1,3 @@ -# $FreeBSD$ - DEVDIR= ${SRCTOP}/sys/contrib/dev/mediatek/mt76/mt7996 .PATH: ${DEVDIR} diff --git a/tools/tools/editing/freebsd.vim b/tools/tools/editing/freebsd.vim index fa7977b30361..e515f81890df 100644 --- a/tools/tools/editing/freebsd.vim +++ b/tools/tools/editing/freebsd.vim @@ -21,8 +21,6 @@ " THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT " (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF " THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -" -" $FreeBSD$ " This is a plugin for Vim (tested with Vim v7.1) to follow the FreeBSD style(9) " indentation. It registers a macro (see below) for changing a buffer's diff --git a/tools/tools/locale/etc/charmaps.xml b/tools/tools/locale/etc/charmaps.xml index dcf1644e4371..0193912b9a01 100644 --- a/tools/tools/locale/etc/charmaps.xml +++ b/tools/tools/locale/etc/charmaps.xml @@ -1,4 +1,3 @@ - +[CVE-2023-5363]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-5363 [CVE-2023-4807]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-4807 [CVE-2023-3817]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-3817 [CVE-2023-3446]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-3446 diff --git a/crypto/openssl/INSTALL.md b/crypto/openssl/INSTALL.md index ad4a51026d7c..fef408e9d1e3 100644 --- a/crypto/openssl/INSTALL.md +++ b/crypto/openssl/INSTALL.md @@ -2,8 +2,8 @@ Build and Install ================= This document describes installation on all supported operating -systems (the Unix/Linux family, including macOS), OpenVMS, -and Windows). +systems: the Unix/Linux family (including macOS), OpenVMS, +and Windows. Table of Contents ================= diff --git a/crypto/openssl/NEWS.md b/crypto/openssl/NEWS.md index f7ca47baff87..8f0d973e057b 100644 --- a/crypto/openssl/NEWS.md +++ b/crypto/openssl/NEWS.md @@ -18,6 +18,11 @@ OpenSSL Releases OpenSSL 3.0 ----------- +### Major changes between OpenSSL 3.0.11 and OpenSSL 3.0.12 [24 Oct 2023] + + * Mitigate incorrect resize handling for symmetric cipher keys and IVs. + ([CVE-2023-5363]) + ### Major changes between OpenSSL 3.0.10 and OpenSSL 3.0.11 [19 Sep 2023] * Fix POLY1305 MAC implementation corrupting XMM registers on Windows @@ -1453,6 +1458,7 @@ OpenSSL 0.9.x +[CVE-2023-5363]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-5363 [CVE-2023-4807]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-4807 [CVE-2023-3817]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-3817 [CVE-2023-3446]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-3446 diff --git a/crypto/openssl/VERSION.dat b/crypto/openssl/VERSION.dat index c4157a86274d..9d9448118e6d 100644 --- a/crypto/openssl/VERSION.dat +++ b/crypto/openssl/VERSION.dat @@ -1,7 +1,7 @@ MAJOR=3 MINOR=0 -PATCH=11 +PATCH=12 PRE_RELEASE_TAG= BUILD_METADATA= -RELEASE_DATE="19 Sep 2023" +RELEASE_DATE="24 Oct 2023" SHLIB_VERSION=3 diff --git a/crypto/openssl/apps/dgst.c b/crypto/openssl/apps/dgst.c index e12389197de4..3f02af0d5738 100644 --- a/crypto/openssl/apps/dgst.c +++ b/crypto/openssl/apps/dgst.c @@ -320,6 +320,8 @@ int dgst_main(int argc, char **argv) sigkey = app_keygen(mac_ctx, mac_name, 0, 0 /* not verbose */); /* Verbose output would make external-tests gost-engine fail */ EVP_PKEY_CTX_free(mac_ctx); + if (sigkey == NULL) + goto end; } if (hmac_key != NULL) { diff --git a/crypto/openssl/apps/dhparam.c b/crypto/openssl/apps/dhparam.c index 43906cea5649..2a54dca9d8b5 100644 --- a/crypto/openssl/apps/dhparam.c +++ b/crypto/openssl/apps/dhparam.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -222,6 +222,8 @@ int dhparam_main(int argc, char **argv) } tmppkey = app_paramgen(ctx, alg); + if (tmppkey == NULL) + goto end; EVP_PKEY_CTX_free(ctx); ctx = NULL; if (dsaparam) { diff --git a/crypto/openssl/apps/dsaparam.c b/crypto/openssl/apps/dsaparam.c index b5555282be6e..ca91beb5b893 100644 --- a/crypto/openssl/apps/dsaparam.c +++ b/crypto/openssl/apps/dsaparam.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -218,6 +218,8 @@ int dsaparam_main(int argc, char **argv) goto end; } pkey = app_keygen(ctx, "DSA", numbits, verbose); + if (pkey == NULL) + goto end; assert(private); if (outformat == FORMAT_ASN1) i = i2d_PrivateKey_bio(out, pkey); diff --git a/crypto/openssl/apps/enc.c b/crypto/openssl/apps/enc.c index b3bf4cc2592d..c275046cf57a 100644 --- a/crypto/openssl/apps/enc.c +++ b/crypto/openssl/apps/enc.c @@ -624,7 +624,10 @@ int enc_main(int argc, char **argv) } } if (!BIO_flush(wbio)) { - BIO_printf(bio_err, "bad decrypt\n"); + if (enc) + BIO_printf(bio_err, "bad encrypt\n"); + else + BIO_printf(bio_err, "bad decrypt\n"); goto end; } diff --git a/crypto/openssl/apps/gendsa.c b/crypto/openssl/apps/gendsa.c index 27feb793fed2..8aefca65566c 100644 --- a/crypto/openssl/apps/gendsa.c +++ b/crypto/openssl/apps/gendsa.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -146,6 +146,8 @@ int gendsa_main(int argc, char **argv) goto end; } pkey = app_keygen(ctx, "DSA", nbits, verbose); + if (pkey == NULL) + goto end; assert(private); if (!PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, passout)) { diff --git a/crypto/openssl/apps/genpkey.c b/crypto/openssl/apps/genpkey.c index d00754eeaca0..705e5c76b47d 100644 --- a/crypto/openssl/apps/genpkey.c +++ b/crypto/openssl/apps/genpkey.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -183,6 +183,8 @@ int genpkey_main(int argc, char **argv) pkey = do_param ? app_paramgen(ctx, algname) : app_keygen(ctx, algname, 0, 0 /* not verbose */); + if (pkey == NULL) + goto end; if (do_param) { rv = PEM_write_bio_Parameters(out, pkey); diff --git a/crypto/openssl/apps/genrsa.c b/crypto/openssl/apps/genrsa.c index 4436b7fa1745..6a683517a15f 100644 --- a/crypto/openssl/apps/genrsa.c +++ b/crypto/openssl/apps/genrsa.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -203,6 +203,8 @@ opthelp: goto end; } pkey = app_keygen(ctx, "RSA", num, verbose); + if (pkey == NULL) + goto end; if (verbose) { BIGNUM *e = NULL; diff --git a/crypto/openssl/apps/lib/apps.c b/crypto/openssl/apps/lib/apps.c index 572f6a3f8f28..a632b0cff2bf 100644 --- a/crypto/openssl/apps/lib/apps.c +++ b/crypto/openssl/apps/lib/apps.c @@ -960,10 +960,14 @@ int load_key_certs_crls_suppress(const char *uri, int format, int maybe_stdin, ctx = OSSL_STORE_open_ex(uri, libctx, propq, get_ui_method(), &uidata, params, NULL, NULL); } - if (ctx == NULL) + if (ctx == NULL) { + BIO_printf(bio_err, "Could not open file or uri for loading"); goto end; - if (expect > 0 && !OSSL_STORE_expect(ctx, expect)) + } + if (expect > 0 && !OSSL_STORE_expect(ctx, expect)) { + BIO_printf(bio_err, "Internal error trying to load"); goto end; + } failed = NULL; while (cnt_expectations > 0 && !OSSL_STORE_eof(ctx)) { @@ -3359,8 +3363,8 @@ EVP_PKEY *app_keygen(EVP_PKEY_CTX *ctx, const char *alg, int bits, int verbose) BIO_printf(bio_err, "Warning: generating random key material may take a long time\n" "if the system has a poor entropy source\n"); if (EVP_PKEY_keygen(ctx, &res) <= 0) - app_bail_out("%s: Error generating %s key\n", opt_getprog(), - alg != NULL ? alg : "asymmetric"); + BIO_printf(bio_err, "%s: Error generating %s key\n", opt_getprog(), + alg != NULL ? alg : "asymmetric"); return res; } @@ -3372,8 +3376,8 @@ EVP_PKEY *app_paramgen(EVP_PKEY_CTX *ctx, const char *alg) BIO_printf(bio_err, "Warning: generating random key parameters may take a long time\n" "if the system has a poor entropy source\n"); if (EVP_PKEY_paramgen(ctx, &res) <= 0) - app_bail_out("%s: Generating %s key parameters failed\n", - opt_getprog(), alg != NULL ? alg : "asymmetric"); + BIO_printf(bio_err, "%s: Generating %s key parameters failed\n", + opt_getprog(), alg != NULL ? alg : "asymmetric"); return res; } diff --git a/crypto/openssl/apps/req.c b/crypto/openssl/apps/req.c index 926f0796bc8f..41191803aef4 100644 --- a/crypto/openssl/apps/req.c +++ b/crypto/openssl/apps/req.c @@ -685,6 +685,8 @@ int req_main(int argc, char **argv) EVP_PKEY_CTX_set_app_data(genctx, bio_err); pkey = app_keygen(genctx, keyalgstr, newkey_len, verbose); + if (pkey == NULL) + goto end; EVP_PKEY_CTX_free(genctx); genctx = NULL; diff --git a/crypto/openssl/apps/speed.c b/crypto/openssl/apps/speed.c index f30435704d19..1113d775b8ab 100644 --- a/crypto/openssl/apps/speed.c +++ b/crypto/openssl/apps/speed.c @@ -3700,7 +3700,8 @@ static void multiblock_speed(const EVP_CIPHER *evp_cipher, int lengths_single, } else { int pad; - RAND_bytes(out, 16); + if (RAND_bytes(inp, 16) <= 0) + app_bail_out("error setting random bytes\n"); len += 16; aad[11] = (unsigned char)(len >> 8); aad[12] = (unsigned char)(len); diff --git a/crypto/openssl/crypto/aes/asm/aesv8-armx.pl b/crypto/openssl/crypto/aes/asm/aesv8-armx.pl index 544dc7e8effe..d0e0be6187bd 100755 --- a/crypto/openssl/crypto/aes/asm/aesv8-armx.pl +++ b/crypto/openssl/crypto/aes/asm/aesv8-armx.pl @@ -3661,6 +3661,9 @@ if ($flavour =~ /64/) { ######## 64-bit code s/\.[ui]?64//o and s/\.16b/\.2d/go; s/\.[42]([sd])\[([0-3])\]/\.$1\[$2\]/o; + # Switch preprocessor checks to aarch64 versions. + s/__ARME([BL])__/__AARCH64E$1__/go; + print $_,"\n"; } } else { ######## 32-bit code diff --git a/crypto/openssl/crypto/arm_arch.h b/crypto/openssl/crypto/arm_arch.h index 45d7e1556475..ec4a087fede2 100644 --- a/crypto/openssl/crypto/arm_arch.h +++ b/crypto/openssl/crypto/arm_arch.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2011-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -21,11 +21,6 @@ # elif defined(__GNUC__) # if defined(__aarch64__) # define __ARM_ARCH__ 8 -# if __BYTE_ORDER__==__ORDER_BIG_ENDIAN__ -# define __ARMEB__ -# else -# define __ARMEL__ -# endif /* * Why doesn't gcc define __ARM_ARCH__? Instead it defines * bunch of below macros. See all_architectures[] table in diff --git a/crypto/openssl/crypto/bn/bn_gcd.c b/crypto/openssl/crypto/bn/bn_gcd.c index 59d024f674eb..cd0b0151ec7e 100644 --- a/crypto/openssl/crypto/bn/bn_gcd.c +++ b/crypto/openssl/crypto/bn/bn_gcd.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -611,9 +611,9 @@ int BN_gcd(BIGNUM *r, const BIGNUM *in_a, const BIGNUM *in_b, BN_CTX *ctx) for (i = 0; i < m; i++) { /* conditionally flip signs if delta is positive and g is odd */ - cond = (-delta >> (8 * sizeof(delta) - 1)) & g->d[0] & 1 + cond = ((unsigned int)-delta >> (8 * sizeof(delta) - 1)) & g->d[0] & 1 /* make sure g->top > 0 (i.e. if top == 0 then g == 0 always) */ - & (~((g->top - 1) >> (sizeof(g->top) * 8 - 1))); + & (~((unsigned int)(g->top - 1) >> (sizeof(g->top) * 8 - 1))); delta = (-cond & -delta) | ((cond - 1) & delta); r->neg ^= cond; /* swap */ @@ -625,7 +625,7 @@ int BN_gcd(BIGNUM *r, const BIGNUM *in_a, const BIGNUM *in_b, BN_CTX *ctx) goto err; BN_consttime_swap(g->d[0] & 1 /* g is odd */ /* make sure g->top > 0 (i.e. if top == 0 then g == 0 always) */ - & (~((g->top - 1) >> (sizeof(g->top) * 8 - 1))), + & (~((unsigned int)(g->top - 1) >> (sizeof(g->top) * 8 - 1))), g, temp, top); if (!BN_rshift1(g, g)) goto err; diff --git a/crypto/openssl/crypto/build.info b/crypto/openssl/crypto/build.info index b90390ae864c..c04db5591120 100644 --- a/crypto/openssl/crypto/build.info +++ b/crypto/openssl/crypto/build.info @@ -97,8 +97,6 @@ $UTIL_COMMON=\ context.c sparse_array.c asn1_dsa.c packet.c param_build.c \ param_build_set.c der_writer.c threads_lib.c params_dup.c -SHARED_SOURCE[../libssl]=sparse_array.c - SOURCE[../libcrypto]=$UTIL_COMMON \ mem.c mem_sec.c \ cversion.c info.c cpt_err.c ebcdic.c uid.c o_time.c o_dir.c \ diff --git a/crypto/openssl/crypto/cms/cms_enc.c b/crypto/openssl/crypto/cms/cms_enc.c index f7007c12319e..ae88df33a7f0 100644 --- a/crypto/openssl/crypto/cms/cms_enc.c +++ b/crypto/openssl/crypto/cms/cms_enc.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -15,6 +15,7 @@ #include #include #include "crypto/evp.h" +#include "crypto/asn1.h" #include "cms_local.h" /* CMS EncryptedData Utilities */ @@ -81,7 +82,7 @@ BIO *ossl_cms_EncryptedContent_init_bio(CMS_EncryptedContentInfo *ec, if (enc) { calg->algorithm = OBJ_nid2obj(EVP_CIPHER_CTX_get_type(ctx)); - if (calg->algorithm == NULL) { + if (calg->algorithm == NULL || calg->algorithm->nid == NID_undef) { ERR_raise(ERR_LIB_CMS, CMS_R_UNSUPPORTED_CONTENT_ENCRYPTION_ALGORITHM); goto err; } diff --git a/crypto/openssl/crypto/cms/cms_err.c b/crypto/openssl/crypto/cms/cms_err.c index dcbea201c8e5..4bd6a0dc1bf1 100644 --- a/crypto/openssl/crypto/cms/cms_err.c +++ b/crypto/openssl/crypto/cms/cms_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -154,6 +154,8 @@ static const ERR_STRING_DATA CMS_str_reasons[] = { "unsupported recipientinfo type"}, {ERR_PACK(ERR_LIB_CMS, 0, CMS_R_UNSUPPORTED_RECIPIENT_TYPE), "unsupported recipient type"}, + {ERR_PACK(ERR_LIB_CMS, 0, CMS_R_UNSUPPORTED_SIGNATURE_ALGORITHM), + "unsupported signature algorithm"}, {ERR_PACK(ERR_LIB_CMS, 0, CMS_R_UNSUPPORTED_TYPE), "unsupported type"}, {ERR_PACK(ERR_LIB_CMS, 0, CMS_R_UNWRAP_ERROR), "unwrap error"}, {ERR_PACK(ERR_LIB_CMS, 0, CMS_R_UNWRAP_FAILURE), "unwrap failure"}, diff --git a/crypto/openssl/crypto/cms/cms_sd.c b/crypto/openssl/crypto/cms/cms_sd.c index 53c8e378f318..2093657a2a4a 100644 --- a/crypto/openssl/crypto/cms/cms_sd.c +++ b/crypto/openssl/crypto/cms/cms_sd.c @@ -354,11 +354,16 @@ CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms, if (md == NULL) { int def_nid; - if (EVP_PKEY_get_default_digest_nid(pk, &def_nid) <= 0) + + if (EVP_PKEY_get_default_digest_nid(pk, &def_nid) <= 0) { + ERR_raise_data(ERR_LIB_CMS, CMS_R_NO_DEFAULT_DIGEST, + "pkey nid=%d", EVP_PKEY_get_id(pk)); goto err; + } md = EVP_get_digestbynid(def_nid); if (md == NULL) { - ERR_raise(ERR_LIB_CMS, CMS_R_NO_DEFAULT_DIGEST); + ERR_raise_data(ERR_LIB_CMS, CMS_R_NO_DEFAULT_DIGEST, + "default md nid=%d", def_nid); goto err; } } @@ -398,8 +403,11 @@ CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms, } } - if (!(flags & CMS_KEY_PARAM) && !cms_sd_asn1_ctrl(si, 0)) + if (!(flags & CMS_KEY_PARAM) && !cms_sd_asn1_ctrl(si, 0)) { + ERR_raise_data(ERR_LIB_CMS, CMS_R_UNSUPPORTED_SIGNATURE_ALGORITHM, + "pkey nid=%d", EVP_PKEY_get_id(pk)); goto err; + } if (!(flags & CMS_NOATTR)) { /* * Initialize signed attributes structure so other attributes diff --git a/crypto/openssl/crypto/dh/dh_check.c b/crypto/openssl/crypto/dh/dh_check.c index f4173e21371e..7ba2beae7fd6 100644 --- a/crypto/openssl/crypto/dh/dh_check.c +++ b/crypto/openssl/crypto/dh/dh_check.c @@ -259,7 +259,8 @@ int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) */ int ossl_dh_check_pub_key_partial(const DH *dh, const BIGNUM *pub_key, int *ret) { - return ossl_ffc_validate_public_key_partial(&dh->params, pub_key, ret); + return ossl_ffc_validate_public_key_partial(&dh->params, pub_key, ret) + && *ret == 0; } int ossl_dh_check_priv_key(const DH *dh, const BIGNUM *priv_key, int *ret) diff --git a/crypto/openssl/crypto/dh/dh_key.c b/crypto/openssl/crypto/dh/dh_key.c index 4e9705beef73..d84ea99241b9 100644 --- a/crypto/openssl/crypto/dh/dh_key.c +++ b/crypto/openssl/crypto/dh/dh_key.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -190,7 +190,6 @@ static int dh_bn_mod_exp(const DH *dh, BIGNUM *r, static int dh_init(DH *dh) { dh->flags |= DH_FLAG_CACHE_MONT_P; - ossl_ffc_params_init(&dh->params); dh->dirty_cnt++; return 1; } diff --git a/crypto/openssl/crypto/dh/dh_lib.c b/crypto/openssl/crypto/dh/dh_lib.c index 29cda5d7bfa8..5577413e1e0c 100644 --- a/crypto/openssl/crypto/dh/dh_lib.c +++ b/crypto/openssl/crypto/dh/dh_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -116,6 +116,8 @@ static DH *dh_new_intern(ENGINE *engine, OSSL_LIB_CTX *libctx) goto err; #endif /* FIPS_MODULE */ + ossl_ffc_params_init(&ret->params); + if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { ERR_raise(ERR_LIB_DH, ERR_R_INIT_FAIL); goto err; diff --git a/crypto/openssl/crypto/dsa/dsa_check.c b/crypto/openssl/crypto/dsa/dsa_check.c index 7ee914a477ec..fb0e9129a295 100644 --- a/crypto/openssl/crypto/dsa/dsa_check.c +++ b/crypto/openssl/crypto/dsa/dsa_check.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -39,7 +39,8 @@ int ossl_dsa_check_params(const DSA *dsa, int checktype, int *ret) */ int ossl_dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret) { - return ossl_ffc_validate_public_key(&dsa->params, pub_key, ret); + return ossl_ffc_validate_public_key(&dsa->params, pub_key, ret) + && *ret == 0; } /* @@ -49,7 +50,8 @@ int ossl_dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret) */ int ossl_dsa_check_pub_key_partial(const DSA *dsa, const BIGNUM *pub_key, int *ret) { - return ossl_ffc_validate_public_key_partial(&dsa->params, pub_key, ret); + return ossl_ffc_validate_public_key_partial(&dsa->params, pub_key, ret) + && *ret == 0; } int ossl_dsa_check_priv_key(const DSA *dsa, const BIGNUM *priv_key, int *ret) diff --git a/crypto/openssl/crypto/dsa/dsa_lib.c b/crypto/openssl/crypto/dsa/dsa_lib.c index ccc701659217..2ae3f8e36b26 100644 --- a/crypto/openssl/crypto/dsa/dsa_lib.c +++ b/crypto/openssl/crypto/dsa/dsa_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -176,6 +176,8 @@ static DSA *dsa_new_intern(ENGINE *engine, OSSL_LIB_CTX *libctx) goto err; #endif + ossl_ffc_params_init(&ret->params); + if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { ERR_raise(ERR_LIB_DSA, ERR_R_INIT_FAIL); goto err; diff --git a/crypto/openssl/crypto/dsa/dsa_ossl.c b/crypto/openssl/crypto/dsa/dsa_ossl.c index 62f7c70149f4..8fd66a950e37 100644 --- a/crypto/openssl/crypto/dsa/dsa_ossl.c +++ b/crypto/openssl/crypto/dsa/dsa_ossl.c @@ -441,7 +441,6 @@ static int dsa_do_verify(const unsigned char *dgst, int dgst_len, static int dsa_init(DSA *dsa) { dsa->flags |= DSA_FLAG_CACHE_MONT_P; - ossl_ffc_params_init(&dsa->params); dsa->dirty_cnt++; return 1; } diff --git a/crypto/openssl/crypto/engine/eng_pkey.c b/crypto/openssl/crypto/engine/eng_pkey.c index 6e6d6df35b2b..f84fcde46016 100644 --- a/crypto/openssl/crypto/engine/eng_pkey.c +++ b/crypto/openssl/crypto/engine/eng_pkey.c @@ -1,5 +1,5 @@ /* - * Copyright 2001-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2001-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -79,6 +79,48 @@ EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id, ERR_raise(ERR_LIB_ENGINE, ENGINE_R_FAILED_LOADING_PRIVATE_KEY); return NULL; } + /* We enforce check for legacy key */ + switch (EVP_PKEY_get_id(pkey)) { + case EVP_PKEY_RSA: + { + RSA *rsa = EVP_PKEY_get1_RSA(pkey); + EVP_PKEY_set1_RSA(pkey, rsa); + RSA_free(rsa); + } + break; +# ifndef OPENSSL_NO_EC + case EVP_PKEY_SM2: + case EVP_PKEY_EC: + { + EC_KEY *ec = EVP_PKEY_get1_EC_KEY(pkey); + EVP_PKEY_set1_EC_KEY(pkey, ec); + EC_KEY_free(ec); + } + break; +# endif +# ifndef OPENSSL_NO_DSA + case EVP_PKEY_DSA: + { + DSA *dsa = EVP_PKEY_get1_DSA(pkey); + EVP_PKEY_set1_DSA(pkey, dsa); + DSA_free(dsa); + } + break; +#endif +# ifndef OPENSSL_NO_DH + case EVP_PKEY_DH: + { + DH *dh = EVP_PKEY_get1_DH(pkey); + EVP_PKEY_set1_DH(pkey, dh); + DH_free(dh); + } + break; +#endif + default: + /*Do nothing */ + break; + } + return pkey; } diff --git a/crypto/openssl/crypto/engine/eng_table.c b/crypto/openssl/crypto/engine/eng_table.c index 3138a1526002..9dc3144bbfd7 100644 --- a/crypto/openssl/crypto/engine/eng_table.c +++ b/crypto/openssl/crypto/engine/eng_table.c @@ -97,6 +97,7 @@ int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup, if (added && !engine_cleanup_add_first(cleanup)) { lh_ENGINE_PILE_free(&(*table)->piles); *table = NULL; + goto end; } while (num_nids--) { tmplate.nid = *nids; diff --git a/crypto/openssl/crypto/err/openssl.txt b/crypto/openssl/crypto/err/openssl.txt index a6f61ca3b02f..e51504b7abd5 100644 --- a/crypto/openssl/crypto/err/openssl.txt +++ b/crypto/openssl/crypto/err/openssl.txt @@ -375,6 +375,7 @@ CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM:179:\ CMS_R_UNSUPPORTED_LABEL_SOURCE:193:unsupported label source CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE:155:unsupported recipientinfo type CMS_R_UNSUPPORTED_RECIPIENT_TYPE:154:unsupported recipient type +CMS_R_UNSUPPORTED_SIGNATURE_ALGORITHM:195:unsupported signature algorithm CMS_R_UNSUPPORTED_TYPE:156:unsupported type CMS_R_UNWRAP_ERROR:157:unwrap error CMS_R_UNWRAP_FAILURE:180:unwrap failure diff --git a/crypto/openssl/crypto/evp/evp_enc.c b/crypto/openssl/crypto/evp/evp_enc.c index b178d1086473..4e6f83e3d0a9 100644 --- a/crypto/openssl/crypto/evp/evp_enc.c +++ b/crypto/openssl/crypto/evp/evp_enc.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -192,7 +192,12 @@ static int evp_cipher_init_internal(EVP_CIPHER_CTX *ctx, #endif } - if (cipher->prov != NULL) { + if (!ossl_assert(cipher->prov != NULL)) { + ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR); + return 0; + } + + if (cipher != ctx->fetched_cipher) { if (!EVP_CIPHER_up_ref((EVP_CIPHER *)cipher)) { ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR); return 0; @@ -218,6 +223,42 @@ static int evp_cipher_init_internal(EVP_CIPHER_CTX *ctx, return 0; } +#ifndef FIPS_MODULE + /* + * Fix for CVE-2023-5363 + * Passing in a size as part of the init call takes effect late + * so, force such to occur before the initialisation. + * + * The FIPS provider's internal library context is used in a manner + * such that this is not an issue. + */ + if (params != NULL) { + OSSL_PARAM param_lens[3] = { OSSL_PARAM_END, OSSL_PARAM_END, + OSSL_PARAM_END }; + OSSL_PARAM *q = param_lens; + const OSSL_PARAM *p; + + p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_KEYLEN); + if (p != NULL) + memcpy(q++, p, sizeof(*q)); + + /* + * Note that OSSL_CIPHER_PARAM_AEAD_IVLEN is a synomym for + * OSSL_CIPHER_PARAM_IVLEN so both are covered here. + */ + p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_IVLEN); + if (p != NULL) + memcpy(q++, p, sizeof(*q)); + + if (q != param_lens) { + if (!EVP_CIPHER_CTX_set_params(ctx, param_lens)) { + ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_LENGTH); + return 0; + } + } + } +#endif + if (enc) { if (ctx->cipher->einit == NULL) { ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR); diff --git a/crypto/openssl/crypto/evp/legacy_sha.c b/crypto/openssl/crypto/evp/legacy_sha.c index 3859286eeb20..ca9a3264978a 100644 --- a/crypto/openssl/crypto/evp/legacy_sha.c +++ b/crypto/openssl/crypto/evp/legacy_sha.c @@ -1,5 +1,5 @@ /* - * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -71,7 +71,11 @@ static int sha1_int_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void *p2) static int shake_ctrl(EVP_MD_CTX *evp_ctx, int cmd, int p1, void *p2) { - KECCAK1600_CTX *ctx = evp_ctx->md_data; + KECCAK1600_CTX *ctx; + + if (evp_ctx == NULL) + return 0; + ctx = evp_ctx->md_data; switch (cmd) { case EVP_MD_CTRL_XOF_LEN: diff --git a/crypto/openssl/crypto/evp/p_lib.c b/crypto/openssl/crypto/evp/p_lib.c index 59a7a867ecbb..04b148a91218 100644 --- a/crypto/openssl/crypto/evp/p_lib.c +++ b/crypto/openssl/crypto/evp/p_lib.c @@ -1201,7 +1201,7 @@ int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx) { - return print_pkey(pkey, out, indent, EVP_PKEY_KEYPAIR, NULL, + return print_pkey(pkey, out, indent, EVP_PKEY_PRIVATE_KEY, NULL, (pkey->ameth != NULL ? pkey->ameth->priv_print : NULL), pctx); } diff --git a/crypto/openssl/crypto/evp/pmeth_lib.c b/crypto/openssl/crypto/evp/pmeth_lib.c index ce6e1a1ccbd5..ba1971ce461d 100644 --- a/crypto/openssl/crypto/evp/pmeth_lib.c +++ b/crypto/openssl/crypto/evp/pmeth_lib.c @@ -251,10 +251,11 @@ static EVP_PKEY_CTX *int_ctx_new(OSSL_LIB_CTX *libctx, */ if (e != NULL) pmeth = ENGINE_get_pkey_meth(e, id); - else if (pkey != NULL && pkey->foreign) + else +# endif /* OPENSSL_NO_ENGINE */ + if (pkey != NULL && pkey->foreign) pmeth = EVP_PKEY_meth_find(id); else -# endif app_pmeth = pmeth = evp_pkey_meth_find_added_by_application(id); /* END legacy */ diff --git a/crypto/openssl/crypto/ex_data.c b/crypto/openssl/crypto/ex_data.c index 40223f06e4ec..13b928899456 100644 --- a/crypto/openssl/crypto/ex_data.c +++ b/crypto/openssl/crypto/ex_data.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -163,6 +163,8 @@ int ossl_crypto_get_ex_new_index_ex(OSSL_LIB_CTX *ctx, int class_index, * "app_data" routines use ex_data index zero. See RT 3710. */ if (ip->meth == NULL || !sk_EX_CALLBACK_push(ip->meth, NULL)) { + sk_EX_CALLBACK_free(ip->meth); + ip->meth = NULL; ERR_raise(ERR_LIB_CRYPTO, ERR_R_MALLOC_FAILURE); goto err; } diff --git a/crypto/openssl/crypto/ffc/ffc_key_validate.c b/crypto/openssl/crypto/ffc/ffc_key_validate.c index 342789621d6d..a4a2a58e9a7f 100644 --- a/crypto/openssl/crypto/ffc/ffc_key_validate.c +++ b/crypto/openssl/crypto/ffc/ffc_key_validate.c @@ -26,7 +26,7 @@ int ossl_ffc_validate_public_key_partial(const FFC_PARAMS *params, *ret = 0; if (params == NULL || pub_key == NULL || params->p == NULL) { *ret = FFC_ERROR_PASSED_NULL_PARAM; - return 0; + return 1; } ctx = BN_CTX_new_ex(NULL); @@ -39,18 +39,14 @@ int ossl_ffc_validate_public_key_partial(const FFC_PARAMS *params, if (tmp == NULL || !BN_set_word(tmp, 1)) goto err; - if (BN_cmp(pub_key, tmp) <= 0) { + if (BN_cmp(pub_key, tmp) <= 0) *ret |= FFC_ERROR_PUBKEY_TOO_SMALL; - goto err; - } /* Step(1): Verify pub_key <= p-2 */ if (BN_copy(tmp, params->p) == NULL || !BN_sub_word(tmp, 1)) goto err; - if (BN_cmp(pub_key, tmp) >= 0) { + if (BN_cmp(pub_key, tmp) >= 0) *ret |= FFC_ERROR_PUBKEY_TOO_LARGE; - goto err; - } ok = 1; err: if (ctx != NULL) { @@ -73,7 +69,7 @@ int ossl_ffc_validate_public_key(const FFC_PARAMS *params, if (!ossl_ffc_validate_public_key_partial(params, pub_key, ret)) return 0; - if (params->q != NULL) { + if (*ret == 0 && params->q != NULL) { ctx = BN_CTX_new_ex(NULL); if (ctx == NULL) goto err; @@ -84,10 +80,8 @@ int ossl_ffc_validate_public_key(const FFC_PARAMS *params, if (tmp == NULL || !BN_mod_exp(tmp, pub_key, params->q, params->p, ctx)) goto err; - if (!BN_is_one(tmp)) { + if (!BN_is_one(tmp)) *ret |= FFC_ERROR_PUBKEY_INVALID; - goto err; - } } ok = 1; diff --git a/crypto/openssl/crypto/lhash/lhash.c b/crypto/openssl/crypto/lhash/lhash.c index 1cd988f01fc7..a01cfa725e38 100644 --- a/crypto/openssl/crypto/lhash/lhash.c +++ b/crypto/openssl/crypto/lhash/lhash.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -266,12 +266,12 @@ static void contract(OPENSSL_LHASH *lh) if (n == NULL) { /* fputs("realloc error in lhash",stderr); */ lh->error++; - return; + } else { + lh->b = n; } lh->num_alloc_nodes /= 2; lh->pmax /= 2; lh->p = lh->pmax - 1; - lh->b = n; } else *** 1726 LINES SKIPPED *** From nobody Thu Oct 26 03:52:19 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGBh35twHz4ySF9; Thu, 26 Oct 2023 03:52: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 4SGBh35S38z4grK; Thu, 26 Oct 2023 03:52:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698292339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n5ddSW1M1v0Ah2juyRu0qW+0ElWNe8284a5+s2URcX8=; b=SueeyhcgGOUzNyk8XJp3xZVZ85NkemuESP1mvAx1BonZMACObQV6Jlm02zxmviyO8HczeM 1xvlwnIWG/vLy38ES9LEm1E0nZzXEBFvLa43hxUOL5+SX2xFHV5DWYBqbhox0+AHatnfwD W0xidQwRiJBtO5yyxyL7960ek9Vzk0ayY/bg/6MVRsUvPhUebVdXhZRzuzOiWoKM4WXrXV hErAWBp0ObbNNwThGkvLV8PwAg7O5lZ8RtuxJ2tRUUleYVU+RwAn5RtMu9zApBnvfCBzTN LeiB3gAQbDdrMgOAnscL2o5BrJZq8h3wIRVXP/bqWhmHl57d/+nUZqsHb7+P5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698292339; a=rsa-sha256; cv=none; b=fd9fb1M7Dosy8rRrC+PWjvvdqPt+EvsVAzwhci4WtR63aqM5iS5fB67JU5ICDddMX0LGLh cApwxbDoE5nAvE1voSPBWG6GJBjfTM6hifU+yn37hH+eq/NNZslmnDHSeWvlcQI6dJKkzI krtTxugD2cKzxG/zZ3TzZC6X5ae8V7kLs4UUmmQAMSIRa+5dZs4hex0+qz+arCrHtTRB2f THe+znCdlKlSW5Th/zBBszEaaoZf2/nQuJaU4lhuRlmcWn18PgtuOJ6B0g6sJycrQ+rCFE 5EDvCrHbvzEUapsAxvbOI0Hk4yMebbqcu6F7RbRxaOjji8JfEPEveYz5kG8VSQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698292339; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=n5ddSW1M1v0Ah2juyRu0qW+0ElWNe8284a5+s2URcX8=; b=fIRHNyIdEZVohL6fkhOAHb/bhnjQah9mPfwsMrP2iXREasrhLj5JX9emInFxEdOBWPjNT2 BPXv4uASSotCsNqf2+mEmN8UeLlighr0DuqHJq3PRxkDnIHM6EptIfLFFNWV1QeR0aVn3G zRnFse9WEOk6FyJXRpXyREbdnxW7xA03sY9ZB1DHqlC9QEDAPZ0ZGBmCmdD9N6xsCrO1IT PZi4utrTM3bp3aY0pXFD28DGdxA7QuDopKlPgajO8wimbZZTkTgmpUz7mS3e8/IUB+wdcz KYoKTHdoOUfJTBHb8cvBwIuENT7QVlgswQV/eiopDe02BQfb0zgEhKbEF2SQBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGBh34WS2z1qk; Thu, 26 Oct 2023 03:52:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39Q3qJXD021795; Thu, 26 Oct 2023 03:52:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39Q3qJFo021792; Thu, 26 Oct 2023 03:52:19 GMT (envelope-from git) Date: Thu, 26 Oct 2023 03:52:19 GMT Message-Id: <202310260352.39Q3qJFo021792@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 0e5b8fe9ea5c - stable/13 - makesyscalls.lua: Make more luaish List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 0e5b8fe9ea5c2bf2080df1491477c7dcb557a2fb Auto-Submitted: auto-generated The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=0e5b8fe9ea5c2bf2080df1491477c7dcb557a2fb commit 0e5b8fe9ea5c2bf2080df1491477c7dcb557a2fb Author: Warner Losh AuthorDate: 2023-04-20 22:15:57 +0000 Commit: Warner Losh CommitDate: 2023-10-26 03:48:35 +0000 makesyscalls.lua: Make more luaish x["y"] can be written as x.y, which looks better and is a more typical lua idiom. Sponsored by: Netflix Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D39709 (cherry picked from commit 1dd350fce0aad85c559b962654f71d1449f21727) --- sys/tools/makesyscalls.lua | 174 ++++++++++++++++++++++----------------------- 1 file changed, 87 insertions(+), 87 deletions(-) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 9efda5db52d1..63e86f6c0269 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -333,41 +333,41 @@ local function process_compat() nval = nval << 1 for _, v in pairs(compat_options) do - if v["stdcompat"] ~= nil then - local stdcompat = v["stdcompat"] - v["definition"] = "COMPAT_" .. stdcompat:upper() - v["compatlevel"] = tonumber(stdcompat:match("([0-9]+)$")) - v["flag"] = stdcompat:gsub("FREEBSD", "COMPAT") - v["prefix"] = stdcompat:lower() .. "_" - v["descr"] = stdcompat:lower() + if v.stdcompat ~= nil then + local stdcompat = v.stdcompat + v.definition = "COMPAT_" .. stdcompat:upper() + v.compatlevel = tonumber(stdcompat:match("([0-9]+)$")) + v.flag = stdcompat:gsub("FREEBSD", "COMPAT") + v.prefix = stdcompat:lower() .. "_" + v.descr = stdcompat:lower() end - local tmpname = "sys" .. v["flag"]:lower() + local tmpname = "sys" .. v.flag:lower() local dcltmpname = tmpname .. "dcl" files[tmpname] = io.tmpfile() files[dcltmpname] = io.tmpfile() - v["tmp"] = tmpname - v["dcltmp"] = dcltmpname + v.tmp = tmpname + v.dcltmp = dcltmpname - known_flags[v["flag"]] = nval - v["mask"] = nval + known_flags[v.flag] = nval + v.mask = nval nval = nval << 1 - v["count"] = 0 + v.count = 0 end end local function process_abi_flags() - local flags, mask = config["abi_flags"], 0 + local flags, mask = config.abi_flags, 0 for txtflag in flags:gmatch("([^|]+)") do if known_abi_flags[txtflag] == nil then abort(1, "Unknown abi_flag: " .. txtflag) end - mask = mask | known_abi_flags[txtflag]["value"] + mask = mask | known_abi_flags[txtflag].value end - config["abi_flags_mask"] = mask + config.abi_flags_mask = mask end local function abi_changes(name) @@ -375,11 +375,11 @@ local function abi_changes(name) abort(1, "abi_changes: unknown flag: " .. name) end - return config["abi_flags_mask"] & known_abi_flags[name]["value"] ~= 0 + return config.abi_flags_mask & known_abi_flags[name].value ~= 0 end local function strip_abi_prefix(funcname) - local abiprefix = config["abi_func_prefix"] + local abiprefix = config.abi_func_prefix local stripped_name if abiprefix ~= "" and funcname:find("^" .. abiprefix) then stripped_name = funcname:gsub("^" .. abiprefix, "") @@ -427,7 +427,7 @@ local process_syscall_def -- These patterns are processed in order on any line that isn't empty. local pattern_table = { { - pattern = "%s*$" .. config['os_id_keyword'], + pattern = "%s*$" .. config.os_id_keyword, process = function(_, _) -- Ignore... ID tag end, @@ -503,9 +503,9 @@ local function process_sysfile(file) local function do_match(nextline, prevline) local pattern, handler, dump for _, v in pairs(pattern_table) do - pattern = v['pattern'] - handler = v['process'] - dump = v['dump_prevline'] + pattern = v.pattern + handler = v.process + dump = v.dump_prevline if nextline:match(pattern) then if dump and prevline then process_syscall_def(prevline) @@ -578,7 +578,7 @@ end local function check_abi_changes(arg) for k, v in pairs(known_abi_flags) do - local expr = v["expr"] + local expr = v.expr if abi_changes(k) and expr ~= nil and arg:find(expr) then return true end @@ -606,7 +606,7 @@ local function process_args(args) -- XX TODO: Forward declarations? See: sysstubfwd in CheriBSD if abi_change then - local abi_type_suffix = config["abi_type_suffix"] + local abi_type_suffix = config.abi_type_suffix argtype = argtype:gsub("_native ", "") argtype = argtype:gsub("(struct [^ ]*)", "%1" .. abi_type_suffix) @@ -628,7 +628,7 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, auditev, syscallret, funcname, funcalias, funcargs, argalias) local argssize - if #funcargs > 0 or flags & known_flags["NODEF"] ~= 0 then + if #funcargs > 0 or flags & known_flags.NODEF ~= 0 then argssize = "AS(" .. argalias .. ")" else argssize = "0" @@ -654,8 +654,8 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, local argtype, argname for idx, arg in ipairs(funcargs) do - argtype = arg["type"] - argname = arg["name"] + argtype = arg.type + argname = arg.name argtype = trim(argtype:gsub("__restrict$", ""), nil) -- Pointer arg? @@ -672,7 +672,7 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, if isptrtype(argtype) then write_line("systrace", string.format( "\t\tuarg[%d] = (%s)p->%s; /* %s */\n", - idx - 1, config["ptr_intptr_t_cast"], + idx - 1, config.ptr_intptr_t_cast, argname, argtype)) elseif argtype == "union l_semun" then write_line("systrace", string.format( @@ -708,7 +708,7 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, write_line("sysarg", string.format("struct %s {\n", argalias)) for _, v in ipairs(funcargs) do - local argname, argtype = v["name"], v["type"] + local argname, argtype = v.name, v.type write_line("sysarg", string.format( "\tchar %s_l_[PADL_(%s)]; %s %s; char %s_r_[PADR_(%s)];\n", argname, argtype, @@ -738,14 +738,14 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, end write_line("sysdcl", ";\n") write_line("sysaue", string.format("#define\t%sAUE_%s\t%s\n", - config['syscallprefix'], funcalias, auditev)) + config.syscallprefix, funcalias, auditev)) end write_line("sysent", string.format("\t{ .sy_narg = %s, .sy_call = (sy_call_t *)", argssize)) local column = 8 + 2 + #argssize + 15 - if flags & known_flags["NOSTD"] ~= 0 then + if flags & known_flags.NOSTD ~= 0 then write_line("sysent", string.format( "lkmressys, .sy_auevent = AUE_NULL, " .. ".sy_flags = %s, .sy_thrcnt = SY_THR_ABSENT },", @@ -774,9 +774,9 @@ local function handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, write_line("sysnames", string.format("\t\"%s\",\t\t\t/* %d = %s */\n", funcalias, sysnum, funcalias)) - if flags & known_flags["NODEF"] == 0 then + if flags & known_flags.NODEF == 0 then write_line("syshdr", string.format("#define\t%s%s\t%d\n", - config['syscallprefix'], funcalias, sysnum)) + config.syscallprefix, funcalias, sysnum)) write_line("sysmk", string.format(" \\\n\t%s.o", funcalias)) end @@ -801,36 +801,36 @@ local function handle_compat(sysnum, thr_flag, flags, sysflags, rettype, auditev, funcname, funcalias, funcargs, argalias) local argssize, out, outdcl, wrap, prefix, descr - if #funcargs > 0 or flags & known_flags["NODEF"] ~= 0 then + if #funcargs > 0 or flags & known_flags.NODEF ~= 0 then argssize = "AS(" .. argalias .. ")" else argssize = "0" end for _, v in pairs(compat_options) do - if flags & v["mask"] ~= 0 then - if config["mincompat"] > v["compatlevel"] then + if flags & v.mask ~= 0 then + if config.mincompat > v.compatlevel then funcname = strip_abi_prefix(funcname) - funcname = v["prefix"] .. funcname + funcname = v.prefix .. funcname return handle_obsol(sysnum, funcname, funcname) end - v["count"] = v["count"] + 1 - out = v["tmp"] - outdcl = v["dcltmp"] - wrap = v["flag"]:lower() - prefix = v["prefix"] - descr = v["descr"] + v.count = v.count + 1 + out = v.tmp + outdcl = v.dcltmp + wrap = v.flag:lower() + prefix = v.prefix + descr = v.descr goto compatdone end end ::compatdone:: local dprotoflags = get_mask({"NOPROTO", "NODEF"}) - local nargflags = dprotoflags | known_flags["NOARGS"] + local nargflags = dprotoflags | known_flags.NOARGS if #funcargs > 0 and flags & nargflags == 0 then write_line(out, string.format("struct %s {\n", argalias)) for _, v in ipairs(funcargs) do - local argname, argtype = v["name"], v["type"] + local argname, argtype = v.name, v.type write_line(out, string.format( "\tchar %s_l_[PADL_(%s)]; %s %s; char %s_r_[PADR_(%s)];\n", argname, argtype, @@ -847,11 +847,11 @@ local function handle_compat(sysnum, thr_flag, flags, sysflags, rettype, "%s\t%s%s(struct thread *, struct %s *);\n", rettype, prefix, funcname, argalias)) write_line("sysaue", string.format( - "#define\t%sAUE_%s%s\t%s\n", config['syscallprefix'], + "#define\t%sAUE_%s%s\t%s\n", config.syscallprefix, prefix, funcname, auditev)) end - if flags & known_flags['NOSTD'] ~= 0 then + if flags & known_flags.NOSTD ~= 0 then write_line("sysent", string.format( "\t{ .sy_narg = %s, .sy_call = (sy_call_t *)%s, " .. ".sy_auevent = %s, .sy_flags = 0, " .. @@ -878,9 +878,9 @@ local function handle_compat(sysnum, thr_flag, flags, sysflags, rettype, write_line("syshdr", string.format( "\t\t\t\t/* %d is %s %s */\n", sysnum, descr, funcalias)) - elseif flags & known_flags["NODEF"] == 0 then + elseif flags & known_flags.NODEF == 0 then write_line("syshdr", string.format("#define\t%s%s%s\t%d\n", - config['syscallprefix'], prefix, funcalias, sysnum)) + config.syscallprefix, prefix, funcalias, sysnum)) write_line("sysmk", string.format(" \\\n\t%s%s.o", prefix, funcalias)) end @@ -958,7 +958,7 @@ process_syscall_def = function(line) abort(1, "Range only allowed with RESERVED and UNIMPL: " .. line) end - if (flags & known_flags["NOTSTATIC"]) ~= 0 then + if (flags & known_flags.NOTSTATIC) ~= 0 then thr_flag = "SY_THR_ABSENT" end @@ -1052,16 +1052,16 @@ process_syscall_def = function(line) sysflags = "0" -- NODEF events do not get audited - if flags & known_flags['NODEF'] ~= 0 then + if flags & known_flags.NODEF ~= 0 then auditev = 'AUE_NULL' end -- If applicable; strip the ABI prefix from the name local stripped_name = strip_abi_prefix(funcname) - if flags & known_flags['CAPENABLED'] ~= 0 or - config["capenabled"][funcname] ~= nil or - config["capenabled"][stripped_name] ~= nil then + if flags & known_flags.CAPENABLED ~= 0 or + config.capenabled[funcname] ~= nil or + config.capenabled[stripped_name] ~= nil then sysflags = "SYF_CAPENABLED" end @@ -1073,11 +1073,11 @@ process_syscall_def = function(line) local argprefix = '' if abi_changes("pointer_args") then for _, v in ipairs(funcargs) do - if isptrtype(v["type"]) then + if isptrtype(v.type) then -- argalias should be: -- COMPAT_PREFIX + ABI Prefix + funcname - argprefix = config['abi_func_prefix'] - funcalias = config['abi_func_prefix'] .. + argprefix = config.abi_func_prefix + funcalias = config.abi_func_prefix .. funcname goto ptrfound end @@ -1091,11 +1091,11 @@ process_syscall_def = function(line) if argalias == nil and funcname ~= nil then argalias = argprefix .. funcname .. "_args" for _, v in pairs(compat_options) do - local mask = v["mask"] + local mask = v.mask if (flags & mask) ~= 0 then -- Multiple aliases doesn't seem to make -- sense. - argalias = v["prefix"] .. argalias + argalias = v.prefix .. argalias goto out end end @@ -1109,7 +1109,7 @@ process_syscall_def = function(line) local compatflags = get_mask_pat("COMPAT.*") -- Now try compat... if flags & compatflags ~= 0 then - if flags & known_flags['STD'] ~= 0 then + if flags & known_flags.STD ~= 0 then abort(1, "Incompatible COMPAT/STD: " .. line) end handle_compat(sysnum, thr_flag, flags, sysflags, rettype, @@ -1118,11 +1118,11 @@ process_syscall_def = function(line) handle_noncompat(sysnum, thr_flag, flags, sysflags, rettype, auditev, syscallret, funcname, funcalias, funcargs, argalias) - elseif flags & known_flags["OBSOL"] ~= 0 then + elseif flags & known_flags.OBSOL ~= 0 then handle_obsol(sysnum, funcname, funcomment) - elseif flags & known_flags["RESERVED"] ~= 0 then + elseif flags & known_flags.RESERVED ~= 0 then handle_reserved(sysnum, sysstart, sysend) - elseif flags & known_flags["UNIMPL"] ~= 0 then + elseif flags & known_flags.UNIMPL ~= 0 then handle_unimpl(sysnum, sysstart, sysend, funcomment) else abort(1, "Bad flags? " .. line) @@ -1157,18 +1157,18 @@ if configfile ~= nil then end -- We ignore errors here if we're relying on the default configuration. -if not config_modified["capenabled"] then - config["capenabled"] = grab_capenabled(config['capabilities_conf'], - config_modified["capabilities_conf"] == nil) -elseif config["capenabled"] ~= "" then +if not config_modified.capenabled then + config.capenabled = grab_capenabled(config.capabilities_conf, + config_modified.capabilities_conf == nil) +elseif config.capenabled ~= "" then -- Due to limitations in the config format mostly, we'll have a comma -- separated list. Parse it into lines local capenabled = {} - -- print("here: " .. config["capenabled"]) - for sysc in config["capenabled"]:gmatch("([^,]+)") do + -- print("here: " .. config.capenabled) + for sysc in config.capenabled:gmatch("([^,]+)") do capenabled[sysc] = true end - config["capenabled"] = capenabled + config.capenabled = capenabled end process_compat() process_abi_flags() @@ -1203,7 +1203,7 @@ write_line("sysent", string.format([[ /* The casts are bogus but will do for now. */ struct sysent %s[] = { -]], config['switchname'])) +]], config.switchname)) write_line("syssw", string.format([[/* * System call switch table. @@ -1212,7 +1212,7 @@ write_line("syssw", string.format([[/* * $%s$ */ -]], generated_tag, config['os_id_keyword'])) +]], generated_tag, config.os_id_keyword)) write_line("sysarg", string.format([[/* * System call prototypes. @@ -1250,10 +1250,10 @@ struct thread; #define PADR_(t) 0 #endif -]], generated_tag, config['os_id_keyword'], config['sysproto_h'], - config['sysproto_h'])) +]], generated_tag, config.os_id_keyword, config.sysproto_h, + config.sysproto_h)) for _, v in pairs(compat_options) do - write_line(v["tmp"], string.format("\n#ifdef %s\n\n", v["definition"])) + write_line(v.tmp, string.format("\n#ifdef %s\n\n", v.definition)) end write_line("sysnames", string.format([[/* @@ -1264,7 +1264,7 @@ write_line("sysnames", string.format([[/* */ const char *%s[] = { -]], generated_tag, config['os_id_keyword'], config['namesname'])) +]], generated_tag, config.os_id_keyword, config.namesname)) write_line("syshdr", string.format([[/* * System call numbers. @@ -1273,12 +1273,12 @@ write_line("syshdr", string.format([[/* * $%s$ */ -]], generated_tag, config['os_id_keyword'])) +]], generated_tag, config.os_id_keyword)) write_line("sysmk", string.format([[# FreeBSD system call object files. # DO NOT EDIT-- this file is automatically %s. # $%s$ -MIASM = ]], generated_tag, config['os_id_keyword'])) +MIASM = ]], generated_tag, config.os_id_keyword)) write_line("systrace", string.format([[/* * System call argument to DTrace register array converstion. @@ -1293,7 +1293,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) { int64_t *iarg = (int64_t *)uarg; switch (sysnum) { -]], generated_tag, config['os_id_keyword'])) +]], generated_tag, config.os_id_keyword)) write_line("systracetmp", [[static void systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) @@ -1318,7 +1318,7 @@ write_line("sysinc", "\n#define AS(name) (sizeof(struct name) / sizeof(register_t))\n") for _, v in pairs(compat_options) do - if v["count"] > 0 then + if v.count > 0 then write_line("sysinc", string.format([[ #ifdef %s @@ -1326,11 +1326,11 @@ for _, v in pairs(compat_options) do #else #define %s(n, name) .sy_narg = 0, .sy_call = (sy_call_t *)nosys #endif -]], v["definition"], v["flag"]:lower(), v["prefix"], v["flag"]:lower())) +]], v.definition, v.flag:lower(), v.prefix, v.flag:lower())) end - write_line(v["dcltmp"], string.format("\n#endif /* %s */\n\n", - v["definition"])) + write_line(v.dcltmp, string.format("\n#endif /* %s */\n\n", + v.definition)) end write_line("sysprotoend", string.format([[ @@ -1340,14 +1340,14 @@ write_line("sysprotoend", string.format([[ #undef PADR_ #endif /* !%s */ -]], config["sysproto_h"])) +]], config.sysproto_h)) write_line("sysmk", "\n") write_line("sysent", "};\n") write_line("sysnames", "};\n") -- maxsyscall is the highest seen; MAXSYSCALL should be one higher write_line("syshdr", string.format("#define\t%sMAXSYSCALL\t%d\n", - config["syscallprefix"], maxsyscall + 1)) + config.syscallprefix, maxsyscall + 1)) write_line("systrace", [[ default: *n_args = 0; @@ -1381,8 +1381,8 @@ write_line("syssw", read_file("sysent")) write_line("sysproto", read_file("sysarg")) write_line("sysproto", read_file("sysdcl")) for _, v in pairs(compat_options) do - write_line("sysproto", read_file(v["tmp"])) - write_line("sysproto", read_file(v["dcltmp"])) + write_line("sysproto", read_file(v.tmp)) + write_line("sysproto", read_file(v.dcltmp)) end write_line("sysproto", read_file("sysaue")) write_line("sysproto", read_file("sysprotoend")) From nobody Thu Oct 26 03:52:20 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGBh51MMHz4ySWr; Thu, 26 Oct 2023 03:52: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 4SGBh501vzz4hBr; Thu, 26 Oct 2023 03:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698292341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7tpdKrXzezjHx0TlNDDdgjf+L8gxJXzllM+Tby+Abtw=; b=tcDBZ9cdaCEj1q+a8erXs1hP2EUJ0cY05PHT67RHdb5vtvfGMV6IZ0tco9/s6Xn9SwjuNe pP1CmMVR7BazetQP281VjqlCrHYgHdilPRc2G0btP+5egAVw2oPduPXeJ0t6yH9vx38sGD tYL/FdAUXV9vzD/jKnQC/W8X4kM0guZvbe2DWbGWxFMqC9kL7kKp+ql5gZoaylSf2Gy6kg llzNZL8ujF4YF8bcO7hTrsFEMV9UjEGHypyyRP5w8ir+nGbYV0kv5iyNoLtdUjh/GHlHLD T3fZVAAIEyhtYTJg36FTu7tfLSHsv8OPfJv3GvQW31rWJ6R86lFRIi7VoJTK6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698292341; a=rsa-sha256; cv=none; b=v7yhnPPZeWUJVco0DPb78FfBDC00tShxvqBPZitVleCEvSQ6/dcCS3+GXYka9Rojo3CLYh Rcm+JJrI0hB2zoJEMvMMbCY6OiGwFPJ2uk7AEoHKP/x09/I8dgSvNYrrB8fEMHJ6ZpPz/k odbZ9C9I46h4iOQthlsCsTGh1UbVVcmPCfoDlJ3P4TLVwOAUa3sLhMT/I+laBFzumFLBpk A4/zPTRyBsEw6W2zpAOFoxiDTN8MGGdOI3Fj6oaema/+F1iiLhnR8IV+KbT4ebTdVb+xy5 vJpsY02LEpjl6Xa9dpN3smtQGU3eqai5aHTEVEljotieiOyqrmPfxquh6XWUQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698292341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7tpdKrXzezjHx0TlNDDdgjf+L8gxJXzllM+Tby+Abtw=; b=cqXelSiOhdi9HEmEW/zo+LHMlAM4b1X9x9nZzm31vPQNQ+E8LgqklLYBNBu+Ea7n++kw8p nEOfraL9FgK6MaxU6BJjkGECOTxzWcEwzM+Wkg6Zl6yB+XfnALsDqWdH0KRoeFtsb9ievO 8MzEsN2dVpBWyKVbe0UL5iVbp0wBRjtlgUuqFfhenntUQycny4k2LcYYQoYvqUH0cOxMyK /EF8cz+Kdm3Rpk25j0aItTJXWROL/kNEI9Fpx+5ouF6zPAn3ZOnqi2/TvCUNjzeKkpaht1 xHNteRQd/rpg3EOhUxnlm1s2XGLl6UpObD5ba+ubLWjfVpA0hrWKybak3c0T6A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGBh45kL5z1ql; Thu, 26 Oct 2023 03:52:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39Q3qKKr021834; Thu, 26 Oct 2023 03:52:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39Q3qKSA021831; Thu, 26 Oct 2023 03:52:20 GMT (envelope-from git) Date: Thu, 26 Oct 2023 03:52:20 GMT Message-Id: <202310260352.39Q3qKSA021831@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 3a13adb4c55c - stable/13 - makesyscalls.lua: Minor fluff removal List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 3a13adb4c55c6447082e93aea660f49a04a51348 Auto-Submitted: auto-generated The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3a13adb4c55c6447082e93aea660f49a04a51348 commit 3a13adb4c55c6447082e93aea660f49a04a51348 Author: Warner Losh AuthorDate: 2023-04-20 22:16:16 +0000 Commit: Warner Losh CommitDate: 2023-10-26 03:48:35 +0000 makesyscalls.lua: Minor fluff removal luacheck pointed out two minor issues: line isn't declared as a global, so declare it local. Also remove an unused parameter. Suggested by: kevans Sponsored by: Netflix (cherry picked from commit c1e987e0624ebf509a6d86099dd47ae6d72a8c03) --- sys/tools/makesyscalls.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index 63e86f6c0269..aa7e18bef853 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -450,12 +450,12 @@ local pattern_table = { maxsyscall = savesyscall end line = line .. "\n" - write_line('sysent', line) - write_line('sysdcl', line) - write_line('sysarg', line) - write_line_pfile('syscompat[0-9]*$', line) - write_line('sysnames', line) - write_line_pfile('systrace.*', line) + write_line("sysent", line) + write_line("sysdcl", line) + write_line("sysarg", line) + write_line_pfile("syscompat[0-9]*$", line) + write_line("sysnames", line) + write_line_pfile("systrace.*", line) end, }, { @@ -906,7 +906,7 @@ local function handle_unimpl(sysnum, sysstart, sysend, comment) end end -local function handle_reserved(sysnum, sysstart, sysend, comment) +local function handle_reserved(sysnum, sysstart, sysend) handle_unimpl(sysnum, sysstart, sysend, "reserved for local use") end From nobody Thu Oct 26 03:52:21 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGBh61x9Yz4ySWt; Thu, 26 Oct 2023 03:52: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 4SGBh60hMBz4h8q; Thu, 26 Oct 2023 03:52:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698292342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F+eSN+kmQlSYJGjGr4SbHCJ0QI66zgATTb/xHHK4qN4=; b=mtYhioLBnwHmoEzNHuzrutsLAKiwyQrQNz4XGx82OZ1Zm5NDzrSeuTzW6Foj4/l0xvs6lE aBO5KvL4BeIhUpl8KkIKIDBDe5NYdqVFovuDfIrtbQXJ74ovsRmXAd8zeSb0b/EMU1yf9v 3IzbcLtMWvR7AtzTnzLVXBjRgqGhH40BYRx8jlakLaU1Rek4tO0NvAMM/E5hzbbtio85xU 0O5uKx0mpySHpCYzWRzPzz00Jnu48s4th2+ziu0xWVAZk60CqgOJo/ty/aXWddijN1QnE+ wxHT9wNCPg7hKF9cZI/jsf47/53qwt87jSF7jsFRSDsY88KtpxlnS4Enibid7A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698292342; a=rsa-sha256; cv=none; b=l/CqxryGkasYtJ5VWw2exLRH8hyuLwZ38nlzCXkqVjoVHopATIkYxMVpZv5GyMF7M2wjLP HS6e57FyGHWAh4QvSuHi0Nv4iK7iTJZg6o2Wjr4PIGwH/mgbaEfk4uijNvoB/18kCW6c5U y2nnROD/0w0ZR6XEA6T8iOPLNV3koPcFenx+/UmrVVOSERt8i4PN9JReh5Ud2tohPqxaRf 5jhONWhJvzskAhyzYWwGaTHugr5SiZ7O4Ni4xqnW4bGzpo2gpoNM5rDHUQu3aLPbgWhzeO N5jwqgCWJLIIM15EbtBpdz9NzvkKnm2pwQdmVSv5nSgs28MxodFwtZg1XbDOWQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698292342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=F+eSN+kmQlSYJGjGr4SbHCJ0QI66zgATTb/xHHK4qN4=; b=tPY6HSDXppmcug/gc0oWZU+/gEUHbMeJT0MxR2LKg3kl44jDK4kClfA7nK3REk7A44OQry lFwW+TK3PdGPbajNxEAKkrVygOW7vxHRYcc6uMMCtNJtTuTWdjr2Rfiae/e+n1V5V/JQAi I9Nyx3gSH3m4ajIaAUmGcqZSRo/Wub0yuO1RIGBp1WX/t2YGJfwDyFpTGR+W+hamvS6xPL raU+4+mksDDxsyXqhUcMUyH/GJ5/ToIHtvWZ3+SXJGH0875zXwMmNjgRjBmU2g7k95WZs1 Z/h6UmqKfvpJ/UtiQiZ1R2JtCKKjIUKYoWY2Ayhgq+/jFYsbUNiAdIprdgzJcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGBh56Xf8z1qm; Thu, 26 Oct 2023 03:52:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39Q3qLtd021873; Thu, 26 Oct 2023 03:52:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39Q3qL0N021870; Thu, 26 Oct 2023 03:52:21 GMT (envelope-from git) Date: Thu, 26 Oct 2023 03:52:21 GMT Message-Id: <202310260352.39Q3qL0N021870@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: c8456bb18643 - stable/13 - makesyscall: Stop generating $FreeBSD$ List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/stable/13 X-Git-Reftype: branch X-Git-Commit: c8456bb18643d3a8ff79955c10b7242f0a599071 Auto-Submitted: auto-generated The branch stable/13 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c8456bb18643d3a8ff79955c10b7242f0a599071 commit c8456bb18643d3a8ff79955c10b7242f0a599071 Author: Warner Losh AuthorDate: 2023-06-09 13:26:07 +0000 Commit: Warner Losh CommitDate: 2023-10-26 03:48:35 +0000 makesyscall: Stop generating $FreeBSD$ With 14 coming, we no longer need to generate the $FreeBSD$. We can likely MFC that to 13 as well. MFC After: 2 weeks Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D39879 (cherry picked from commit 61fe63f698148f8d63fe6f366c5e20bc7ad60b87) --- sys/tools/makesyscalls.lua | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/sys/tools/makesyscalls.lua b/sys/tools/makesyscalls.lua index aa7e18bef853..cc2a4f1362ae 100644 --- a/sys/tools/makesyscalls.lua +++ b/sys/tools/makesyscalls.lua @@ -40,7 +40,7 @@ local generated_tag = "@" .. "generated" -- Default configuration; any of these may get replaced by a configuration file -- optionally specified. local config = { - os_id_keyword = "FreeBSD", + os_id_keyword = "FreeBSD", -- obsolete, ignored on input, not generated abi_func_prefix = "", sysnames = "syscalls.c", sysproto = "../sys/sysproto.h", @@ -427,6 +427,7 @@ local process_syscall_def -- These patterns are processed in order on any line that isn't empty. local pattern_table = { { + -- To be removed soon pattern = "%s*$" .. config.os_id_keyword, process = function(_, _) -- Ignore... ID tag @@ -1209,16 +1210,14 @@ write_line("syssw", string.format([[/* * System call switch table. * * DO NOT EDIT-- this file is automatically %s. - * $%s$ */ -]], generated_tag, config.os_id_keyword)) +]], generated_tag)) write_line("sysarg", string.format([[/* * System call prototypes. * * DO NOT EDIT-- this file is automatically %s. - * $%s$ */ #ifndef %s @@ -1250,7 +1249,7 @@ struct thread; #define PADR_(t) 0 #endif -]], generated_tag, config.os_id_keyword, config.sysproto_h, +]], generated_tag, config.sysproto_h, config.sysproto_h)) for _, v in pairs(compat_options) do write_line(v.tmp, string.format("\n#ifdef %s\n\n", v.definition)) @@ -1260,31 +1259,27 @@ write_line("sysnames", string.format([[/* * System call names. * * DO NOT EDIT-- this file is automatically %s. - * $%s$ */ const char *%s[] = { -]], generated_tag, config.os_id_keyword, config.namesname)) +]], generated_tag, config.namesname)) write_line("syshdr", string.format([[/* * System call numbers. * * DO NOT EDIT-- this file is automatically %s. - * $%s$ */ -]], generated_tag, config.os_id_keyword)) +]], generated_tag)) write_line("sysmk", string.format([[# FreeBSD system call object files. # DO NOT EDIT-- this file is automatically %s. -# $%s$ -MIASM = ]], generated_tag, config.os_id_keyword)) +MIASM = ]], generated_tag)) write_line("systrace", string.format([[/* * System call argument to DTrace register array converstion. * * DO NOT EDIT-- this file is automatically %s. - * $%s$ * This file is part of the DTrace syscall provider. */ @@ -1293,7 +1288,7 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) { int64_t *iarg = (int64_t *)uarg; switch (sysnum) { -]], generated_tag, config.os_id_keyword)) +]], generated_tag)) write_line("systracetmp", [[static void systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) From nobody Thu Oct 26 17:03:07 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGXDW42L1z4y35T; Thu, 26 Oct 2023 17:03: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 4SGXDW3T92z4TCD; Thu, 26 Oct 2023 17:03:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698339787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x9H7pwiHiVFI44FpDPJJvdWtMXvjdwEHxO9puVYIQ2k=; b=BDk8wudutW5amnbHDJxFEXsDP3RWNVFLVjy3XYcRa9QUzciziCcev9eRK96XjiAb+8Ifd+ +vuXpuRj44ph0jePcspCRgNjri42nUgFCXeiMMGNqgBnHfVNRJebDy/W+qQ2yzjTEuSmjr OAGp5o2o/5kYvcN35urk83oW98/FFGrzK+FSWoNrr7ajMxzw34ISRVQkBc202dcp1yRSIr 7letubL4lE+UO/U/2ggOfFQ+EcU+AIaG3w5DWwJtYuAMDETY51ZjlZG38ebN5Ud2srzV+Q msnUQ7llFXF/oot5uv/lV8w6TemJsoSEE0tnybnX5lrPuqvBxxLXka+//xFUvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698339787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x9H7pwiHiVFI44FpDPJJvdWtMXvjdwEHxO9puVYIQ2k=; b=lF3oM7YQsQo0nbqGpspd5ttQqb2T36w7gtthYA/biJd0mrfFXdEPPkrfinklYYOGIxo/Mg tVV0S/ixjo2/EYpgk6QAPZsrp8zwE7GNmHdZOSAP11nlb99DA1lmTAey2TIxD0+DS77r5G EyX7vwrXlJgSWA9YfmKOPPHF07hXsOyVPnS9qc7wRVRGCaiscDcHUKxGAdXVZ7rjEJpoEe rtzQ75lJo6ZK+UydcCn+OqQ/iKMWXcKjypVHov+TpxIkh/0FTFA3V6EIwZnm6zNCErtO5i be0ir/i+pig0JUHl4u2DgNgwI+TRvXxH/I2/pnrsqSswjaN0b8ZtwU07En8rTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698339787; a=rsa-sha256; cv=none; b=wob9FrOahL9034Op7PSQU2SA2n+qQbYMRVLbwH/bp7nF+sn5CNR0X1u0CQdO8OMwovooOV hXjr0Eiv/wGTn7jixkREqc9m6X+vVP9m3FYGaA7MeZmlhtGYKflxeJJ7Hc6vFqK8VQfwAD HVXk4hc0vO7Rsbv/P0Fn/zHE7ZL2OZcOhmSHfDejXEOt+dTKUeRl4AlObPbFKkY12I+lKM 66rUDuaY0GCMbxJ5wrQbDyHl2PgLBV4NbILuCIUbKbYtN0Vl8cfS7ABFXnnVFdS6nwh8/9 V+dkx4iIuBoSbZueljm3kCnNY6R5Trnpdqy7ixAy6BYq+L3KLPqH37u30AVLwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGXDW2Nt6zf7j; Thu, 26 Oct 2023 17:03:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QH37oA039486; Thu, 26 Oct 2023 17:03:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QH373i039483; Thu, 26 Oct 2023 17:03:07 GMT (envelope-from git) Date: Thu, 26 Oct 2023 17:03:07 GMT Message-Id: <202310261703.39QH373i039483@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: 930cec16d9ee - releng/14.0 - OpenSSL: update to 3.0.12 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 930cec16d9ee11584a10130bef9be002113e31de Auto-Submitted: auto-generated The branch releng/14.0 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=930cec16d9ee11584a10130bef9be002113e31de commit 930cec16d9ee11584a10130bef9be002113e31de Author: Ed Maste AuthorDate: 2023-10-24 18:55:56 +0000 Commit: Ed Maste CommitDate: 2023-10-26 17:02:36 +0000 OpenSSL: update to 3.0.12 OpenSSL 3.0.12 addresses: * Fix incorrect key and IV resizing issues when calling EVP_EncryptInit_ex2(), EVP_DecryptInit_ex2() or EVP_CipherInit_ex2() with OSSL_PARAM parameters that alter the key or IV length ([CVE-2023-5363]). Relnotes: Yes Sponsored by: The FreeBSD Foundation (cherry picked from commit ad991e4c142ebabad7aef488ad97b189ecabb270) (cherry picked from commit 575878a533823aa3e5bab715928d9cdffbc4dcbc) (cherry picked from commit e833378cf9589171562ccad4c6ff59c3713770bd) Approved by: so Approved by: re (gjb) --- crypto/openssl/CHANGES.md | 9 +++ crypto/openssl/INSTALL.md | 4 +- crypto/openssl/NEWS.md | 6 ++ crypto/openssl/VERSION.dat | 4 +- crypto/openssl/apps/dgst.c | 2 + crypto/openssl/apps/dhparam.c | 4 +- crypto/openssl/apps/dsaparam.c | 4 +- crypto/openssl/apps/enc.c | 5 +- crypto/openssl/apps/gendsa.c | 4 +- crypto/openssl/apps/genpkey.c | 4 +- crypto/openssl/apps/genrsa.c | 4 +- crypto/openssl/apps/lib/apps.c | 16 ++++-- crypto/openssl/apps/req.c | 2 + crypto/openssl/apps/speed.c | 3 +- crypto/openssl/crypto/aes/asm/aesv8-armx.pl | 3 + crypto/openssl/crypto/arm_arch.h | 7 +-- crypto/openssl/crypto/bn/bn_gcd.c | 8 +-- crypto/openssl/crypto/build.info | 2 - crypto/openssl/crypto/cms/cms_enc.c | 5 +- crypto/openssl/crypto/cms/cms_err.c | 4 +- crypto/openssl/crypto/cms/cms_sd.c | 14 ++++- crypto/openssl/crypto/dh/dh_check.c | 3 +- crypto/openssl/crypto/dh/dh_key.c | 3 +- crypto/openssl/crypto/dh/dh_lib.c | 4 +- crypto/openssl/crypto/dsa/dsa_check.c | 8 ++- crypto/openssl/crypto/dsa/dsa_lib.c | 4 +- crypto/openssl/crypto/dsa/dsa_ossl.c | 1 - crypto/openssl/crypto/engine/eng_pkey.c | 44 ++++++++++++++- crypto/openssl/crypto/engine/eng_table.c | 1 + crypto/openssl/crypto/err/openssl.txt | 1 + crypto/openssl/crypto/evp/evp_enc.c | 45 ++++++++++++++- crypto/openssl/crypto/evp/legacy_sha.c | 8 ++- crypto/openssl/crypto/evp/p_lib.c | 2 +- crypto/openssl/crypto/evp/pmeth_lib.c | 5 +- crypto/openssl/crypto/ex_data.c | 4 +- crypto/openssl/crypto/ffc/ffc_key_validate.c | 16 ++---- crypto/openssl/crypto/lhash/lhash.c | 6 +- crypto/openssl/crypto/mem.c | 12 +++- crypto/openssl/crypto/modes/asm/ghashv8-armx.pl | 5 +- crypto/openssl/crypto/objects/obj_dat.c | 7 ++- crypto/openssl/crypto/param_build_set.c | 13 +++-- .../openssl/crypto/poly1305/asm/poly1305-armv8.pl | 26 ++++----- crypto/openssl/crypto/property/property_parse.c | 34 +++++++++-- crypto/openssl/crypto/rsa/rsa_backend.c | 14 +---- crypto/openssl/crypto/rsa/rsa_lib.c | 32 ++++++++--- crypto/openssl/doc/man3/CMS_add1_signer.pod | 8 ++- crypto/openssl/doc/man3/DH_generate_parameters.pod | 6 +- .../openssl/doc/man3/DSA_generate_parameters.pod | 4 +- crypto/openssl/doc/man3/EVP_aes_128_gcm.pod | 8 +-- crypto/openssl/doc/man3/EVP_aria_128_gcm.pod | 2 +- crypto/openssl/doc/man3/EVP_bf_cbc.pod | 2 +- crypto/openssl/doc/man3/EVP_blake2b512.pod | 2 +- crypto/openssl/doc/man3/EVP_camellia_128_ecb.pod | 2 +- crypto/openssl/doc/man3/EVP_cast5_cbc.pod | 2 +- crypto/openssl/doc/man3/EVP_chacha20.pod | 2 +- crypto/openssl/doc/man3/EVP_des_cbc.pod | 2 +- crypto/openssl/doc/man3/EVP_desx_cbc.pod | 2 +- crypto/openssl/doc/man3/EVP_idea_cbc.pod | 2 +- crypto/openssl/doc/man3/EVP_md2.pod | 2 +- crypto/openssl/doc/man3/EVP_md4.pod | 2 +- crypto/openssl/doc/man3/EVP_md5.pod | 2 +- crypto/openssl/doc/man3/EVP_mdc2.pod | 2 +- crypto/openssl/doc/man3/EVP_rc2_cbc.pod | 2 +- crypto/openssl/doc/man3/EVP_rc4.pod | 2 +- crypto/openssl/doc/man3/EVP_rc5_32_12_16_cbc.pod | 2 +- crypto/openssl/doc/man3/EVP_ripemd160.pod | 2 +- crypto/openssl/doc/man3/EVP_seed_cbc.pod | 2 +- crypto/openssl/doc/man3/EVP_sha1.pod | 2 +- crypto/openssl/doc/man3/EVP_sha224.pod | 2 +- crypto/openssl/doc/man3/EVP_sha3_224.pod | 2 +- crypto/openssl/doc/man3/EVP_sm3.pod | 2 +- crypto/openssl/doc/man3/EVP_sm4_cbc.pod | 2 +- crypto/openssl/doc/man3/EVP_whirlpool.pod | 2 +- crypto/openssl/doc/man3/PKCS5_PBKDF2_HMAC.pod | 5 +- .../openssl/doc/man3/SSL_CONF_CTX_set_ssl_ctx.pod | 10 +++- .../openssl/doc/man3/SSL_CTX_set_info_callback.pod | 16 ++++-- .../openssl/doc/man3/d2i_PKCS8PrivateKey_bio.pod | 4 +- crypto/openssl/doc/man3/d2i_X509.pod | 26 +++++++-- crypto/openssl/include/openssl/cmserr.h | 3 +- crypto/openssl/include/openssl/evp.h | 4 +- crypto/openssl/include/openssl/opensslv.h | 10 ++-- crypto/openssl/include/openssl/pkcs7.h.in | 6 +- crypto/openssl/providers/fips-sources.checksums | 40 ++++++------- crypto/openssl/providers/fips.checksum | 2 +- .../encode_decode/encode_key2text.c | 65 +++++++++------------- .../providers/implementations/keymgmt/dh_kmgmt.c | 2 +- .../providers/implementations/macs/kmac_prov.c | 6 +- secure/lib/libcrypto/Makefile.inc | 4 +- sys/crypto/openssl/aarch64/aesv8-armx.S | 6 +- sys/crypto/openssl/aarch64/arm_arch.h | 7 +-- sys/crypto/openssl/aarch64/ghashv8-armx.S | 26 ++++----- sys/crypto/openssl/aarch64/poly1305-armv8.S | 24 ++++---- 92 files changed, 471 insertions(+), 281 deletions(-) diff --git a/crypto/openssl/CHANGES.md b/crypto/openssl/CHANGES.md index a26bdbdd0ad0..f464b2320e9c 100644 --- a/crypto/openssl/CHANGES.md +++ b/crypto/openssl/CHANGES.md @@ -28,6 +28,14 @@ breaking changes, and mappings for the large list of deprecated functions. [Migration guide]: https://github.com/openssl/openssl/tree/master/doc/man7/migration_guide.pod +### Changes between 3.0.11 and 3.0.12 [24 Oct 2023] + + * Fix incorrect key and IV resizing issues when calling EVP_EncryptInit_ex2(), + EVP_DecryptInit_ex2() or EVP_CipherInit_ex2() with OSSL_PARAM parameters + that alter the key or IV length ([CVE-2023-5363]). + + *Paul Dale* + ### Changes between 3.0.10 and 3.0.11 [19 Sep 2023] * Fix POLY1305 MAC implementation corrupting XMM registers on Windows. @@ -19732,6 +19740,7 @@ ndif +[CVE-2023-5363]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-5363 [CVE-2023-4807]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-4807 [CVE-2023-3817]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-3817 [CVE-2023-3446]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-3446 diff --git a/crypto/openssl/INSTALL.md b/crypto/openssl/INSTALL.md index ad4a51026d7c..fef408e9d1e3 100644 --- a/crypto/openssl/INSTALL.md +++ b/crypto/openssl/INSTALL.md @@ -2,8 +2,8 @@ Build and Install ================= This document describes installation on all supported operating -systems (the Unix/Linux family, including macOS), OpenVMS, -and Windows). +systems: the Unix/Linux family (including macOS), OpenVMS, +and Windows. Table of Contents ================= diff --git a/crypto/openssl/NEWS.md b/crypto/openssl/NEWS.md index f7ca47baff87..8f0d973e057b 100644 --- a/crypto/openssl/NEWS.md +++ b/crypto/openssl/NEWS.md @@ -18,6 +18,11 @@ OpenSSL Releases OpenSSL 3.0 ----------- +### Major changes between OpenSSL 3.0.11 and OpenSSL 3.0.12 [24 Oct 2023] + + * Mitigate incorrect resize handling for symmetric cipher keys and IVs. + ([CVE-2023-5363]) + ### Major changes between OpenSSL 3.0.10 and OpenSSL 3.0.11 [19 Sep 2023] * Fix POLY1305 MAC implementation corrupting XMM registers on Windows @@ -1453,6 +1458,7 @@ OpenSSL 0.9.x +[CVE-2023-5363]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-5363 [CVE-2023-4807]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-4807 [CVE-2023-3817]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-3817 [CVE-2023-3446]: https://www.openssl.org/news/vulnerabilities.html#CVE-2023-3446 diff --git a/crypto/openssl/VERSION.dat b/crypto/openssl/VERSION.dat index c4157a86274d..9d9448118e6d 100644 --- a/crypto/openssl/VERSION.dat +++ b/crypto/openssl/VERSION.dat @@ -1,7 +1,7 @@ MAJOR=3 MINOR=0 -PATCH=11 +PATCH=12 PRE_RELEASE_TAG= BUILD_METADATA= -RELEASE_DATE="19 Sep 2023" +RELEASE_DATE="24 Oct 2023" SHLIB_VERSION=3 diff --git a/crypto/openssl/apps/dgst.c b/crypto/openssl/apps/dgst.c index e12389197de4..3f02af0d5738 100644 --- a/crypto/openssl/apps/dgst.c +++ b/crypto/openssl/apps/dgst.c @@ -320,6 +320,8 @@ int dgst_main(int argc, char **argv) sigkey = app_keygen(mac_ctx, mac_name, 0, 0 /* not verbose */); /* Verbose output would make external-tests gost-engine fail */ EVP_PKEY_CTX_free(mac_ctx); + if (sigkey == NULL) + goto end; } if (hmac_key != NULL) { diff --git a/crypto/openssl/apps/dhparam.c b/crypto/openssl/apps/dhparam.c index 43906cea5649..2a54dca9d8b5 100644 --- a/crypto/openssl/apps/dhparam.c +++ b/crypto/openssl/apps/dhparam.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -222,6 +222,8 @@ int dhparam_main(int argc, char **argv) } tmppkey = app_paramgen(ctx, alg); + if (tmppkey == NULL) + goto end; EVP_PKEY_CTX_free(ctx); ctx = NULL; if (dsaparam) { diff --git a/crypto/openssl/apps/dsaparam.c b/crypto/openssl/apps/dsaparam.c index b5555282be6e..ca91beb5b893 100644 --- a/crypto/openssl/apps/dsaparam.c +++ b/crypto/openssl/apps/dsaparam.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -218,6 +218,8 @@ int dsaparam_main(int argc, char **argv) goto end; } pkey = app_keygen(ctx, "DSA", numbits, verbose); + if (pkey == NULL) + goto end; assert(private); if (outformat == FORMAT_ASN1) i = i2d_PrivateKey_bio(out, pkey); diff --git a/crypto/openssl/apps/enc.c b/crypto/openssl/apps/enc.c index b3bf4cc2592d..c275046cf57a 100644 --- a/crypto/openssl/apps/enc.c +++ b/crypto/openssl/apps/enc.c @@ -624,7 +624,10 @@ int enc_main(int argc, char **argv) } } if (!BIO_flush(wbio)) { - BIO_printf(bio_err, "bad decrypt\n"); + if (enc) + BIO_printf(bio_err, "bad encrypt\n"); + else + BIO_printf(bio_err, "bad decrypt\n"); goto end; } diff --git a/crypto/openssl/apps/gendsa.c b/crypto/openssl/apps/gendsa.c index 27feb793fed2..8aefca65566c 100644 --- a/crypto/openssl/apps/gendsa.c +++ b/crypto/openssl/apps/gendsa.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -146,6 +146,8 @@ int gendsa_main(int argc, char **argv) goto end; } pkey = app_keygen(ctx, "DSA", nbits, verbose); + if (pkey == NULL) + goto end; assert(private); if (!PEM_write_bio_PrivateKey(out, pkey, enc, NULL, 0, NULL, passout)) { diff --git a/crypto/openssl/apps/genpkey.c b/crypto/openssl/apps/genpkey.c index d00754eeaca0..705e5c76b47d 100644 --- a/crypto/openssl/apps/genpkey.c +++ b/crypto/openssl/apps/genpkey.c @@ -1,5 +1,5 @@ /* - * Copyright 2006-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2006-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -183,6 +183,8 @@ int genpkey_main(int argc, char **argv) pkey = do_param ? app_paramgen(ctx, algname) : app_keygen(ctx, algname, 0, 0 /* not verbose */); + if (pkey == NULL) + goto end; if (do_param) { rv = PEM_write_bio_Parameters(out, pkey); diff --git a/crypto/openssl/apps/genrsa.c b/crypto/openssl/apps/genrsa.c index 4436b7fa1745..6a683517a15f 100644 --- a/crypto/openssl/apps/genrsa.c +++ b/crypto/openssl/apps/genrsa.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -203,6 +203,8 @@ opthelp: goto end; } pkey = app_keygen(ctx, "RSA", num, verbose); + if (pkey == NULL) + goto end; if (verbose) { BIGNUM *e = NULL; diff --git a/crypto/openssl/apps/lib/apps.c b/crypto/openssl/apps/lib/apps.c index 572f6a3f8f28..a632b0cff2bf 100644 --- a/crypto/openssl/apps/lib/apps.c +++ b/crypto/openssl/apps/lib/apps.c @@ -960,10 +960,14 @@ int load_key_certs_crls_suppress(const char *uri, int format, int maybe_stdin, ctx = OSSL_STORE_open_ex(uri, libctx, propq, get_ui_method(), &uidata, params, NULL, NULL); } - if (ctx == NULL) + if (ctx == NULL) { + BIO_printf(bio_err, "Could not open file or uri for loading"); goto end; - if (expect > 0 && !OSSL_STORE_expect(ctx, expect)) + } + if (expect > 0 && !OSSL_STORE_expect(ctx, expect)) { + BIO_printf(bio_err, "Internal error trying to load"); goto end; + } failed = NULL; while (cnt_expectations > 0 && !OSSL_STORE_eof(ctx)) { @@ -3359,8 +3363,8 @@ EVP_PKEY *app_keygen(EVP_PKEY_CTX *ctx, const char *alg, int bits, int verbose) BIO_printf(bio_err, "Warning: generating random key material may take a long time\n" "if the system has a poor entropy source\n"); if (EVP_PKEY_keygen(ctx, &res) <= 0) - app_bail_out("%s: Error generating %s key\n", opt_getprog(), - alg != NULL ? alg : "asymmetric"); + BIO_printf(bio_err, "%s: Error generating %s key\n", opt_getprog(), + alg != NULL ? alg : "asymmetric"); return res; } @@ -3372,8 +3376,8 @@ EVP_PKEY *app_paramgen(EVP_PKEY_CTX *ctx, const char *alg) BIO_printf(bio_err, "Warning: generating random key parameters may take a long time\n" "if the system has a poor entropy source\n"); if (EVP_PKEY_paramgen(ctx, &res) <= 0) - app_bail_out("%s: Generating %s key parameters failed\n", - opt_getprog(), alg != NULL ? alg : "asymmetric"); + BIO_printf(bio_err, "%s: Generating %s key parameters failed\n", + opt_getprog(), alg != NULL ? alg : "asymmetric"); return res; } diff --git a/crypto/openssl/apps/req.c b/crypto/openssl/apps/req.c index 926f0796bc8f..41191803aef4 100644 --- a/crypto/openssl/apps/req.c +++ b/crypto/openssl/apps/req.c @@ -685,6 +685,8 @@ int req_main(int argc, char **argv) EVP_PKEY_CTX_set_app_data(genctx, bio_err); pkey = app_keygen(genctx, keyalgstr, newkey_len, verbose); + if (pkey == NULL) + goto end; EVP_PKEY_CTX_free(genctx); genctx = NULL; diff --git a/crypto/openssl/apps/speed.c b/crypto/openssl/apps/speed.c index f30435704d19..1113d775b8ab 100644 --- a/crypto/openssl/apps/speed.c +++ b/crypto/openssl/apps/speed.c @@ -3700,7 +3700,8 @@ static void multiblock_speed(const EVP_CIPHER *evp_cipher, int lengths_single, } else { int pad; - RAND_bytes(out, 16); + if (RAND_bytes(inp, 16) <= 0) + app_bail_out("error setting random bytes\n"); len += 16; aad[11] = (unsigned char)(len >> 8); aad[12] = (unsigned char)(len); diff --git a/crypto/openssl/crypto/aes/asm/aesv8-armx.pl b/crypto/openssl/crypto/aes/asm/aesv8-armx.pl index 544dc7e8effe..d0e0be6187bd 100755 --- a/crypto/openssl/crypto/aes/asm/aesv8-armx.pl +++ b/crypto/openssl/crypto/aes/asm/aesv8-armx.pl @@ -3661,6 +3661,9 @@ if ($flavour =~ /64/) { ######## 64-bit code s/\.[ui]?64//o and s/\.16b/\.2d/go; s/\.[42]([sd])\[([0-3])\]/\.$1\[$2\]/o; + # Switch preprocessor checks to aarch64 versions. + s/__ARME([BL])__/__AARCH64E$1__/go; + print $_,"\n"; } } else { ######## 32-bit code diff --git a/crypto/openssl/crypto/arm_arch.h b/crypto/openssl/crypto/arm_arch.h index 45d7e1556475..ec4a087fede2 100644 --- a/crypto/openssl/crypto/arm_arch.h +++ b/crypto/openssl/crypto/arm_arch.h @@ -1,5 +1,5 @@ /* - * Copyright 2011-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2011-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -21,11 +21,6 @@ # elif defined(__GNUC__) # if defined(__aarch64__) # define __ARM_ARCH__ 8 -# if __BYTE_ORDER__==__ORDER_BIG_ENDIAN__ -# define __ARMEB__ -# else -# define __ARMEL__ -# endif /* * Why doesn't gcc define __ARM_ARCH__? Instead it defines * bunch of below macros. See all_architectures[] table in diff --git a/crypto/openssl/crypto/bn/bn_gcd.c b/crypto/openssl/crypto/bn/bn_gcd.c index 59d024f674eb..cd0b0151ec7e 100644 --- a/crypto/openssl/crypto/bn/bn_gcd.c +++ b/crypto/openssl/crypto/bn/bn_gcd.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -611,9 +611,9 @@ int BN_gcd(BIGNUM *r, const BIGNUM *in_a, const BIGNUM *in_b, BN_CTX *ctx) for (i = 0; i < m; i++) { /* conditionally flip signs if delta is positive and g is odd */ - cond = (-delta >> (8 * sizeof(delta) - 1)) & g->d[0] & 1 + cond = ((unsigned int)-delta >> (8 * sizeof(delta) - 1)) & g->d[0] & 1 /* make sure g->top > 0 (i.e. if top == 0 then g == 0 always) */ - & (~((g->top - 1) >> (sizeof(g->top) * 8 - 1))); + & (~((unsigned int)(g->top - 1) >> (sizeof(g->top) * 8 - 1))); delta = (-cond & -delta) | ((cond - 1) & delta); r->neg ^= cond; /* swap */ @@ -625,7 +625,7 @@ int BN_gcd(BIGNUM *r, const BIGNUM *in_a, const BIGNUM *in_b, BN_CTX *ctx) goto err; BN_consttime_swap(g->d[0] & 1 /* g is odd */ /* make sure g->top > 0 (i.e. if top == 0 then g == 0 always) */ - & (~((g->top - 1) >> (sizeof(g->top) * 8 - 1))), + & (~((unsigned int)(g->top - 1) >> (sizeof(g->top) * 8 - 1))), g, temp, top); if (!BN_rshift1(g, g)) goto err; diff --git a/crypto/openssl/crypto/build.info b/crypto/openssl/crypto/build.info index b90390ae864c..c04db5591120 100644 --- a/crypto/openssl/crypto/build.info +++ b/crypto/openssl/crypto/build.info @@ -97,8 +97,6 @@ $UTIL_COMMON=\ context.c sparse_array.c asn1_dsa.c packet.c param_build.c \ param_build_set.c der_writer.c threads_lib.c params_dup.c -SHARED_SOURCE[../libssl]=sparse_array.c - SOURCE[../libcrypto]=$UTIL_COMMON \ mem.c mem_sec.c \ cversion.c info.c cpt_err.c ebcdic.c uid.c o_time.c o_dir.c \ diff --git a/crypto/openssl/crypto/cms/cms_enc.c b/crypto/openssl/crypto/cms/cms_enc.c index f7007c12319e..ae88df33a7f0 100644 --- a/crypto/openssl/crypto/cms/cms_enc.c +++ b/crypto/openssl/crypto/cms/cms_enc.c @@ -1,5 +1,5 @@ /* - * Copyright 2008-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2008-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -15,6 +15,7 @@ #include #include #include "crypto/evp.h" +#include "crypto/asn1.h" #include "cms_local.h" /* CMS EncryptedData Utilities */ @@ -81,7 +82,7 @@ BIO *ossl_cms_EncryptedContent_init_bio(CMS_EncryptedContentInfo *ec, if (enc) { calg->algorithm = OBJ_nid2obj(EVP_CIPHER_CTX_get_type(ctx)); - if (calg->algorithm == NULL) { + if (calg->algorithm == NULL || calg->algorithm->nid == NID_undef) { ERR_raise(ERR_LIB_CMS, CMS_R_UNSUPPORTED_CONTENT_ENCRYPTION_ALGORITHM); goto err; } diff --git a/crypto/openssl/crypto/cms/cms_err.c b/crypto/openssl/crypto/cms/cms_err.c index dcbea201c8e5..4bd6a0dc1bf1 100644 --- a/crypto/openssl/crypto/cms/cms_err.c +++ b/crypto/openssl/crypto/cms/cms_err.c @@ -1,6 +1,6 @@ /* * Generated by util/mkerr.pl DO NOT EDIT - * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -154,6 +154,8 @@ static const ERR_STRING_DATA CMS_str_reasons[] = { "unsupported recipientinfo type"}, {ERR_PACK(ERR_LIB_CMS, 0, CMS_R_UNSUPPORTED_RECIPIENT_TYPE), "unsupported recipient type"}, + {ERR_PACK(ERR_LIB_CMS, 0, CMS_R_UNSUPPORTED_SIGNATURE_ALGORITHM), + "unsupported signature algorithm"}, {ERR_PACK(ERR_LIB_CMS, 0, CMS_R_UNSUPPORTED_TYPE), "unsupported type"}, {ERR_PACK(ERR_LIB_CMS, 0, CMS_R_UNWRAP_ERROR), "unwrap error"}, {ERR_PACK(ERR_LIB_CMS, 0, CMS_R_UNWRAP_FAILURE), "unwrap failure"}, diff --git a/crypto/openssl/crypto/cms/cms_sd.c b/crypto/openssl/crypto/cms/cms_sd.c index 53c8e378f318..2093657a2a4a 100644 --- a/crypto/openssl/crypto/cms/cms_sd.c +++ b/crypto/openssl/crypto/cms/cms_sd.c @@ -354,11 +354,16 @@ CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms, if (md == NULL) { int def_nid; - if (EVP_PKEY_get_default_digest_nid(pk, &def_nid) <= 0) + + if (EVP_PKEY_get_default_digest_nid(pk, &def_nid) <= 0) { + ERR_raise_data(ERR_LIB_CMS, CMS_R_NO_DEFAULT_DIGEST, + "pkey nid=%d", EVP_PKEY_get_id(pk)); goto err; + } md = EVP_get_digestbynid(def_nid); if (md == NULL) { - ERR_raise(ERR_LIB_CMS, CMS_R_NO_DEFAULT_DIGEST); + ERR_raise_data(ERR_LIB_CMS, CMS_R_NO_DEFAULT_DIGEST, + "default md nid=%d", def_nid); goto err; } } @@ -398,8 +403,11 @@ CMS_SignerInfo *CMS_add1_signer(CMS_ContentInfo *cms, } } - if (!(flags & CMS_KEY_PARAM) && !cms_sd_asn1_ctrl(si, 0)) + if (!(flags & CMS_KEY_PARAM) && !cms_sd_asn1_ctrl(si, 0)) { + ERR_raise_data(ERR_LIB_CMS, CMS_R_UNSUPPORTED_SIGNATURE_ALGORITHM, + "pkey nid=%d", EVP_PKEY_get_id(pk)); goto err; + } if (!(flags & CMS_NOATTR)) { /* * Initialize signed attributes structure so other attributes diff --git a/crypto/openssl/crypto/dh/dh_check.c b/crypto/openssl/crypto/dh/dh_check.c index f4173e21371e..7ba2beae7fd6 100644 --- a/crypto/openssl/crypto/dh/dh_check.c +++ b/crypto/openssl/crypto/dh/dh_check.c @@ -259,7 +259,8 @@ int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, int *ret) */ int ossl_dh_check_pub_key_partial(const DH *dh, const BIGNUM *pub_key, int *ret) { - return ossl_ffc_validate_public_key_partial(&dh->params, pub_key, ret); + return ossl_ffc_validate_public_key_partial(&dh->params, pub_key, ret) + && *ret == 0; } int ossl_dh_check_priv_key(const DH *dh, const BIGNUM *priv_key, int *ret) diff --git a/crypto/openssl/crypto/dh/dh_key.c b/crypto/openssl/crypto/dh/dh_key.c index 4e9705beef73..d84ea99241b9 100644 --- a/crypto/openssl/crypto/dh/dh_key.c +++ b/crypto/openssl/crypto/dh/dh_key.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -190,7 +190,6 @@ static int dh_bn_mod_exp(const DH *dh, BIGNUM *r, static int dh_init(DH *dh) { dh->flags |= DH_FLAG_CACHE_MONT_P; - ossl_ffc_params_init(&dh->params); dh->dirty_cnt++; return 1; } diff --git a/crypto/openssl/crypto/dh/dh_lib.c b/crypto/openssl/crypto/dh/dh_lib.c index 29cda5d7bfa8..5577413e1e0c 100644 --- a/crypto/openssl/crypto/dh/dh_lib.c +++ b/crypto/openssl/crypto/dh/dh_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -116,6 +116,8 @@ static DH *dh_new_intern(ENGINE *engine, OSSL_LIB_CTX *libctx) goto err; #endif /* FIPS_MODULE */ + ossl_ffc_params_init(&ret->params); + if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { ERR_raise(ERR_LIB_DH, ERR_R_INIT_FAIL); goto err; diff --git a/crypto/openssl/crypto/dsa/dsa_check.c b/crypto/openssl/crypto/dsa/dsa_check.c index 7ee914a477ec..fb0e9129a295 100644 --- a/crypto/openssl/crypto/dsa/dsa_check.c +++ b/crypto/openssl/crypto/dsa/dsa_check.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -39,7 +39,8 @@ int ossl_dsa_check_params(const DSA *dsa, int checktype, int *ret) */ int ossl_dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret) { - return ossl_ffc_validate_public_key(&dsa->params, pub_key, ret); + return ossl_ffc_validate_public_key(&dsa->params, pub_key, ret) + && *ret == 0; } /* @@ -49,7 +50,8 @@ int ossl_dsa_check_pub_key(const DSA *dsa, const BIGNUM *pub_key, int *ret) */ int ossl_dsa_check_pub_key_partial(const DSA *dsa, const BIGNUM *pub_key, int *ret) { - return ossl_ffc_validate_public_key_partial(&dsa->params, pub_key, ret); + return ossl_ffc_validate_public_key_partial(&dsa->params, pub_key, ret) + && *ret == 0; } int ossl_dsa_check_priv_key(const DSA *dsa, const BIGNUM *priv_key, int *ret) diff --git a/crypto/openssl/crypto/dsa/dsa_lib.c b/crypto/openssl/crypto/dsa/dsa_lib.c index ccc701659217..2ae3f8e36b26 100644 --- a/crypto/openssl/crypto/dsa/dsa_lib.c +++ b/crypto/openssl/crypto/dsa/dsa_lib.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -176,6 +176,8 @@ static DSA *dsa_new_intern(ENGINE *engine, OSSL_LIB_CTX *libctx) goto err; #endif + ossl_ffc_params_init(&ret->params); + if ((ret->meth->init != NULL) && !ret->meth->init(ret)) { ERR_raise(ERR_LIB_DSA, ERR_R_INIT_FAIL); goto err; diff --git a/crypto/openssl/crypto/dsa/dsa_ossl.c b/crypto/openssl/crypto/dsa/dsa_ossl.c index 62f7c70149f4..8fd66a950e37 100644 --- a/crypto/openssl/crypto/dsa/dsa_ossl.c +++ b/crypto/openssl/crypto/dsa/dsa_ossl.c @@ -441,7 +441,6 @@ static int dsa_do_verify(const unsigned char *dgst, int dgst_len, static int dsa_init(DSA *dsa) { dsa->flags |= DSA_FLAG_CACHE_MONT_P; - ossl_ffc_params_init(&dsa->params); dsa->dirty_cnt++; return 1; } diff --git a/crypto/openssl/crypto/engine/eng_pkey.c b/crypto/openssl/crypto/engine/eng_pkey.c index 6e6d6df35b2b..f84fcde46016 100644 --- a/crypto/openssl/crypto/engine/eng_pkey.c +++ b/crypto/openssl/crypto/engine/eng_pkey.c @@ -1,5 +1,5 @@ /* - * Copyright 2001-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2001-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -79,6 +79,48 @@ EVP_PKEY *ENGINE_load_private_key(ENGINE *e, const char *key_id, ERR_raise(ERR_LIB_ENGINE, ENGINE_R_FAILED_LOADING_PRIVATE_KEY); return NULL; } + /* We enforce check for legacy key */ + switch (EVP_PKEY_get_id(pkey)) { + case EVP_PKEY_RSA: + { + RSA *rsa = EVP_PKEY_get1_RSA(pkey); + EVP_PKEY_set1_RSA(pkey, rsa); + RSA_free(rsa); + } + break; +# ifndef OPENSSL_NO_EC + case EVP_PKEY_SM2: + case EVP_PKEY_EC: + { + EC_KEY *ec = EVP_PKEY_get1_EC_KEY(pkey); + EVP_PKEY_set1_EC_KEY(pkey, ec); + EC_KEY_free(ec); + } + break; +# endif +# ifndef OPENSSL_NO_DSA + case EVP_PKEY_DSA: + { + DSA *dsa = EVP_PKEY_get1_DSA(pkey); + EVP_PKEY_set1_DSA(pkey, dsa); + DSA_free(dsa); + } + break; +#endif +# ifndef OPENSSL_NO_DH + case EVP_PKEY_DH: + { + DH *dh = EVP_PKEY_get1_DH(pkey); + EVP_PKEY_set1_DH(pkey, dh); + DH_free(dh); + } + break; +#endif + default: + /*Do nothing */ + break; + } + return pkey; } diff --git a/crypto/openssl/crypto/engine/eng_table.c b/crypto/openssl/crypto/engine/eng_table.c index 3138a1526002..9dc3144bbfd7 100644 --- a/crypto/openssl/crypto/engine/eng_table.c +++ b/crypto/openssl/crypto/engine/eng_table.c @@ -97,6 +97,7 @@ int engine_table_register(ENGINE_TABLE **table, ENGINE_CLEANUP_CB *cleanup, if (added && !engine_cleanup_add_first(cleanup)) { lh_ENGINE_PILE_free(&(*table)->piles); *table = NULL; + goto end; } while (num_nids--) { tmplate.nid = *nids; diff --git a/crypto/openssl/crypto/err/openssl.txt b/crypto/openssl/crypto/err/openssl.txt index a6f61ca3b02f..e51504b7abd5 100644 --- a/crypto/openssl/crypto/err/openssl.txt +++ b/crypto/openssl/crypto/err/openssl.txt @@ -375,6 +375,7 @@ CMS_R_UNSUPPORTED_KEY_ENCRYPTION_ALGORITHM:179:\ CMS_R_UNSUPPORTED_LABEL_SOURCE:193:unsupported label source CMS_R_UNSUPPORTED_RECIPIENTINFO_TYPE:155:unsupported recipientinfo type CMS_R_UNSUPPORTED_RECIPIENT_TYPE:154:unsupported recipient type +CMS_R_UNSUPPORTED_SIGNATURE_ALGORITHM:195:unsupported signature algorithm CMS_R_UNSUPPORTED_TYPE:156:unsupported type CMS_R_UNWRAP_ERROR:157:unwrap error CMS_R_UNWRAP_FAILURE:180:unwrap failure diff --git a/crypto/openssl/crypto/evp/evp_enc.c b/crypto/openssl/crypto/evp/evp_enc.c index b178d1086473..4e6f83e3d0a9 100644 --- a/crypto/openssl/crypto/evp/evp_enc.c +++ b/crypto/openssl/crypto/evp/evp_enc.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -192,7 +192,12 @@ static int evp_cipher_init_internal(EVP_CIPHER_CTX *ctx, #endif } - if (cipher->prov != NULL) { + if (!ossl_assert(cipher->prov != NULL)) { + ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR); + return 0; + } + + if (cipher != ctx->fetched_cipher) { if (!EVP_CIPHER_up_ref((EVP_CIPHER *)cipher)) { ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR); return 0; @@ -218,6 +223,42 @@ static int evp_cipher_init_internal(EVP_CIPHER_CTX *ctx, return 0; } +#ifndef FIPS_MODULE + /* + * Fix for CVE-2023-5363 + * Passing in a size as part of the init call takes effect late + * so, force such to occur before the initialisation. + * + * The FIPS provider's internal library context is used in a manner + * such that this is not an issue. + */ + if (params != NULL) { + OSSL_PARAM param_lens[3] = { OSSL_PARAM_END, OSSL_PARAM_END, + OSSL_PARAM_END }; + OSSL_PARAM *q = param_lens; + const OSSL_PARAM *p; + + p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_KEYLEN); + if (p != NULL) + memcpy(q++, p, sizeof(*q)); + + /* + * Note that OSSL_CIPHER_PARAM_AEAD_IVLEN is a synomym for + * OSSL_CIPHER_PARAM_IVLEN so both are covered here. + */ + p = OSSL_PARAM_locate_const(params, OSSL_CIPHER_PARAM_IVLEN); + if (p != NULL) + memcpy(q++, p, sizeof(*q)); + + if (q != param_lens) { + if (!EVP_CIPHER_CTX_set_params(ctx, param_lens)) { + ERR_raise(ERR_LIB_EVP, EVP_R_INVALID_LENGTH); + return 0; + } + } + } +#endif + if (enc) { if (ctx->cipher->einit == NULL) { ERR_raise(ERR_LIB_EVP, EVP_R_INITIALIZATION_ERROR); diff --git a/crypto/openssl/crypto/evp/legacy_sha.c b/crypto/openssl/crypto/evp/legacy_sha.c index 3859286eeb20..ca9a3264978a 100644 --- a/crypto/openssl/crypto/evp/legacy_sha.c +++ b/crypto/openssl/crypto/evp/legacy_sha.c @@ -1,5 +1,5 @@ /* - * Copyright 2019-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 2019-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -71,7 +71,11 @@ static int sha1_int_ctrl(EVP_MD_CTX *ctx, int cmd, int p1, void *p2) static int shake_ctrl(EVP_MD_CTX *evp_ctx, int cmd, int p1, void *p2) { - KECCAK1600_CTX *ctx = evp_ctx->md_data; + KECCAK1600_CTX *ctx; + + if (evp_ctx == NULL) + return 0; + ctx = evp_ctx->md_data; switch (cmd) { case EVP_MD_CTRL_XOF_LEN: diff --git a/crypto/openssl/crypto/evp/p_lib.c b/crypto/openssl/crypto/evp/p_lib.c index 59a7a867ecbb..04b148a91218 100644 --- a/crypto/openssl/crypto/evp/p_lib.c +++ b/crypto/openssl/crypto/evp/p_lib.c @@ -1201,7 +1201,7 @@ int EVP_PKEY_print_public(BIO *out, const EVP_PKEY *pkey, int EVP_PKEY_print_private(BIO *out, const EVP_PKEY *pkey, int indent, ASN1_PCTX *pctx) { - return print_pkey(pkey, out, indent, EVP_PKEY_KEYPAIR, NULL, + return print_pkey(pkey, out, indent, EVP_PKEY_PRIVATE_KEY, NULL, (pkey->ameth != NULL ? pkey->ameth->priv_print : NULL), pctx); } diff --git a/crypto/openssl/crypto/evp/pmeth_lib.c b/crypto/openssl/crypto/evp/pmeth_lib.c index ce6e1a1ccbd5..ba1971ce461d 100644 --- a/crypto/openssl/crypto/evp/pmeth_lib.c +++ b/crypto/openssl/crypto/evp/pmeth_lib.c @@ -251,10 +251,11 @@ static EVP_PKEY_CTX *int_ctx_new(OSSL_LIB_CTX *libctx, */ if (e != NULL) pmeth = ENGINE_get_pkey_meth(e, id); - else if (pkey != NULL && pkey->foreign) + else +# endif /* OPENSSL_NO_ENGINE */ + if (pkey != NULL && pkey->foreign) pmeth = EVP_PKEY_meth_find(id); else -# endif app_pmeth = pmeth = evp_pkey_meth_find_added_by_application(id); /* END legacy */ diff --git a/crypto/openssl/crypto/ex_data.c b/crypto/openssl/crypto/ex_data.c index 40223f06e4ec..13b928899456 100644 --- a/crypto/openssl/crypto/ex_data.c +++ b/crypto/openssl/crypto/ex_data.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -163,6 +163,8 @@ int ossl_crypto_get_ex_new_index_ex(OSSL_LIB_CTX *ctx, int class_index, * "app_data" routines use ex_data index zero. See RT 3710. */ if (ip->meth == NULL || !sk_EX_CALLBACK_push(ip->meth, NULL)) { + sk_EX_CALLBACK_free(ip->meth); + ip->meth = NULL; ERR_raise(ERR_LIB_CRYPTO, ERR_R_MALLOC_FAILURE); goto err; } diff --git a/crypto/openssl/crypto/ffc/ffc_key_validate.c b/crypto/openssl/crypto/ffc/ffc_key_validate.c index 342789621d6d..a4a2a58e9a7f 100644 --- a/crypto/openssl/crypto/ffc/ffc_key_validate.c +++ b/crypto/openssl/crypto/ffc/ffc_key_validate.c @@ -26,7 +26,7 @@ int ossl_ffc_validate_public_key_partial(const FFC_PARAMS *params, *ret = 0; if (params == NULL || pub_key == NULL || params->p == NULL) { *ret = FFC_ERROR_PASSED_NULL_PARAM; - return 0; + return 1; } ctx = BN_CTX_new_ex(NULL); @@ -39,18 +39,14 @@ int ossl_ffc_validate_public_key_partial(const FFC_PARAMS *params, if (tmp == NULL || !BN_set_word(tmp, 1)) goto err; - if (BN_cmp(pub_key, tmp) <= 0) { + if (BN_cmp(pub_key, tmp) <= 0) *ret |= FFC_ERROR_PUBKEY_TOO_SMALL; - goto err; - } /* Step(1): Verify pub_key <= p-2 */ if (BN_copy(tmp, params->p) == NULL || !BN_sub_word(tmp, 1)) goto err; - if (BN_cmp(pub_key, tmp) >= 0) { + if (BN_cmp(pub_key, tmp) >= 0) *ret |= FFC_ERROR_PUBKEY_TOO_LARGE; - goto err; - } ok = 1; err: if (ctx != NULL) { @@ -73,7 +69,7 @@ int ossl_ffc_validate_public_key(const FFC_PARAMS *params, if (!ossl_ffc_validate_public_key_partial(params, pub_key, ret)) return 0; - if (params->q != NULL) { + if (*ret == 0 && params->q != NULL) { ctx = BN_CTX_new_ex(NULL); if (ctx == NULL) goto err; @@ -84,10 +80,8 @@ int ossl_ffc_validate_public_key(const FFC_PARAMS *params, if (tmp == NULL || !BN_mod_exp(tmp, pub_key, params->q, params->p, ctx)) goto err; - if (!BN_is_one(tmp)) { + if (!BN_is_one(tmp)) *ret |= FFC_ERROR_PUBKEY_INVALID; - goto err; - } } ok = 1; diff --git a/crypto/openssl/crypto/lhash/lhash.c b/crypto/openssl/crypto/lhash/lhash.c index 1cd988f01fc7..a01cfa725e38 100644 --- a/crypto/openssl/crypto/lhash/lhash.c +++ b/crypto/openssl/crypto/lhash/lhash.c @@ -1,5 +1,5 @@ /* - * Copyright 1995-2022 The OpenSSL Project Authors. All Rights Reserved. + * Copyright 1995-2023 The OpenSSL Project Authors. All Rights Reserved. * * Licensed under the Apache License 2.0 (the "License"). You may not use * this file except in compliance with the License. You can obtain a copy @@ -266,12 +266,12 @@ static void contract(OPENSSL_LHASH *lh) if (n == NULL) { /* fputs("realloc error in lhash",stderr); */ lh->error++; - return; + } else { + lh->b = n; } lh->num_alloc_nodes /= 2; *** 1730 LINES SKIPPED *** From nobody Thu Oct 26 17:37:32 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGY0F1Z6Cz4y5Fm; Thu, 26 Oct 2023 17:37: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 4SGY0F127Yz4ZPl; Thu, 26 Oct 2023 17:37:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698341853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JTpKZG3R+aMwxNYlKBuqpqZ75T5MoaUTNcMjg1kvTzI=; b=jfVYwKGhASZLUEOEssYhpKogrx6dYo391wzCz+FM9mCs5Oh25xfNJQqUJsWEeg0E52IWeM CvxrzhmWCvcgbCV0kLXrT2ym4pHmtrlOPKCWD9XsU8NdQKIYviE3QFdR564I4VWxrEmwOh aIC8OYTNpcxbVyTZjS8xw5cZa8Mc3wgpZYIcjjzY53cFfXqdnJNM5UUBzx9PoejvoRgO8p j3kPuvd3Vd0j3iKGDkn66Rd+QpMVdrnaDqNg7DxsHPcSfVVca4ZCJiaA2p1ub2tNEljqhu S8GXK7JK6uz0x6LcBaUc6cmglM7SPVPwKskYo6l/gieGlPhUpXO4a2KoD87qIA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698341853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JTpKZG3R+aMwxNYlKBuqpqZ75T5MoaUTNcMjg1kvTzI=; b=u1h8vXdfJQlGWZRGEbJpdEJgXPB1jaOAZXKKs4Gj8WqmkNtbMEFZqChBxh+MhdwApXpNYF sgmhczAcFbGzxas+51OeKDRyfNjM0bgDSxtV9lRJVgn3FRjCUSxc3gFYk8hh7uSpTgGcPb 4mE4LmF9Tnfzl99eBNoAdNmS9RAwdoUIWkYTaORMavxWeSp8lMz0D2wqmGRxg+nCMWlAcZ LvPI4BaUF/hccfKpOgQjz7JIBHLUFJJAdJZQJfbEroVZQ3s7HV7uI88Fs82WVyqKlADcGJ gn2f1eKlMZNOwDBavy76IyEnxITzkQ66J+t4PApLvKX1hfH2VdOmZnNftInxZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698341853; a=rsa-sha256; cv=none; b=G2c64+vBZxwgGm/U/6jIHLryq8SM4fn8UUaceYWl8fJ6rnZRJ7lKfn7wbN15UYDeaiL+4s 9oeu6bVaPoDwiE2XUCdsAAfWiUke+NCQ8Y4bhjhCjO/ImzOJTP5DNFLwnr5z/LQQKJ1ZCq 9shtfC5jt16yVLOPtjGvY4LzH6XFOx0lxh1c0zEZzkUDRSON0rwMTlKx5sIsqQMgRLKzhe zDpjOhyvidEZ8XYCNGb9YMcJE9DPISHozESKTaIO8QHE1sDvN8GPXvODMK9/aFMQd/NgHH cF28xt24uDtzhC/moIoNcwu51L1MPK/TjetAnmebIZ23t+VwIV2UAPqW1yO9FA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGY0F07Qczgcr; Thu, 26 Oct 2023 17:37:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QHbWcH089669; Thu, 26 Oct 2023 17:37:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QHbWZG089666; Thu, 26 Oct 2023 17:37:32 GMT (envelope-from git) Date: Thu, 26 Oct 2023 17:37:32 GMT Message-Id: <202310261737.39QHbWZG089666@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: b2f6c1f5488f - stable/14 - libprocstat: style: space after switch List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: b2f6c1f5488f93601e8d197bb6f5f6a99a0a9847 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=b2f6c1f5488f93601e8d197bb6f5f6a99a0a9847 commit b2f6c1f5488f93601e8d197bb6f5f6a99a0a9847 Author: Brooks Davis AuthorDate: 2023-10-02 21:50:00 +0000 Commit: Brooks Davis CommitDate: 2023-10-25 23:30:37 +0000 libprocstat: style: space after switch Style demands a space after the switch keyword. Noticed reviewing code in CheriBSD that propagated the style bug. Reported by: markj Sponsored by: DARPA Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D42041 (cherry picked from commit ccac440f7cbb013de41aa3933f3f7be77225c44f) --- lib/libprocstat/libprocstat.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index 0af79b6e63a0..a302310dfb9a 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -347,7 +347,7 @@ struct filestat_list * procstat_getfiles(struct procstat *procstat, struct kinfo_proc *kp, int mmapped) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: return (procstat_getfiles_kvm(procstat, kp, mmapped)); case PROCSTAT_SYSCTL: @@ -1527,7 +1527,7 @@ procstat_get_socket_info_kvm(kvm_t *kd, struct filestat *fst, /* * Protocol specific data. */ - switch(dom.dom_family) { + switch (dom.dom_family) { case AF_INET: case AF_INET6: if (proto.pr_protocol == IPPROTO_TCP) { @@ -1600,7 +1600,7 @@ procstat_get_socket_info_sysctl(struct filestat *fst, struct sockstat *sock, /* * Protocol specific data. */ - switch(sock->dom_family) { + switch (sock->dom_family) { case AF_INET: case AF_INET6: if (sock->proto == IPPROTO_TCP) { @@ -1961,7 +1961,7 @@ procstat_getvmmap(struct procstat *procstat, struct kinfo_proc *kp, unsigned int *cntp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: warnx("kvm method is not supported"); return (NULL); @@ -2066,7 +2066,7 @@ gid_t * procstat_getgroups(struct procstat *procstat, struct kinfo_proc *kp, unsigned int *cntp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: return (procstat_getgroups_kvm(procstat->kd, kp, cntp)); case PROCSTAT_SYSCTL: @@ -2144,7 +2144,7 @@ int procstat_getumask(struct procstat *procstat, struct kinfo_proc *kp, unsigned short *maskp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: return (procstat_getumask_kvm(procstat->kd, kp, maskp)); case PROCSTAT_SYSCTL: @@ -2234,7 +2234,7 @@ int procstat_getrlimit(struct procstat *procstat, struct kinfo_proc *kp, int which, struct rlimit* rlimit) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: return (procstat_getrlimit_kvm(procstat->kd, kp, which, rlimit)); @@ -2293,7 +2293,7 @@ int procstat_getpathname(struct procstat *procstat, struct kinfo_proc *kp, char *pathname, size_t maxlen) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: /* XXX: Return empty string. */ if (maxlen > 0) @@ -2366,7 +2366,7 @@ procstat_getosrel_core(struct procstat_core *core, int *osrelp) int procstat_getosrel(struct procstat *procstat, struct kinfo_proc *kp, int *osrelp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: return (procstat_getosrel_kvm(procstat->kd, kp, osrelp)); case PROCSTAT_SYSCTL: @@ -2506,7 +2506,7 @@ Elf_Auxinfo * procstat_getauxv(struct procstat *procstat, struct kinfo_proc *kp, unsigned int *cntp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: warnx("kvm method is not supported"); return (NULL); @@ -2620,7 +2620,7 @@ struct kinfo_kstack * procstat_getkstack(struct procstat *procstat, struct kinfo_proc *kp, unsigned int *cntp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: warnx("kvm method is not supported"); return (NULL); @@ -2749,7 +2749,7 @@ fail: struct advlock_list * procstat_getadvlock(struct procstat *procstat) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: warnx("kvm method is not supported"); return (NULL); From nobody Thu Oct 26 17:37:34 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGY0G2ZKWz4y5Bx; Thu, 26 Oct 2023 17:37: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 4SGY0G1wTBz4ZVx; Thu, 26 Oct 2023 17:37:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698341854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uGh5oHmQtzmz4BuaIVJbCmjFdkR7HDYOFNMCLWsu4UQ=; b=w67pulvgoTTrorsql390YlkF+kWKfAWSN3QVqt/3XGrRX2B1U/bw7x+N/8pJWmlw1vOytu oZiXoeT+1iErulgglnXtM1/bolldp3Ukt9jW5Nz33+RXl+rn/LBw2rg29NTdcd9aqTB854 GpJ9JsgKw0Gu02bYAZG6ytPu3Rs8aqaYm3J6SB+gpJjbvgS2FiGBtm86CopUxhhJpXD9kR icReHYtLbxbfbEnQ9cRWBN43EnwVtszxd4jfb/abYZy9I76Adc1ykQK+x7d5JS3nemczEm dK29pqR49mCWEHfP/NZFjIvbjfHAALCjz9xLBHq3A5yKk/JkC1HLjrztrCaIew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698341854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uGh5oHmQtzmz4BuaIVJbCmjFdkR7HDYOFNMCLWsu4UQ=; b=J/1ebFkR+Wd8C8lN+8mZ/crt+/daWCVEeFCk42fEZy4rFvi/Qr0sWarbiBTwcAw0eQPO/E hjPZYmVWsW2i3fEhalT+YPLIM7pQK+NroF06cWlNB3DwRVA+/4wDTwHJqtB0wmMgZ9+elz 79xreriupSoWzwyZnZE4r98c0mR5JAI4y5DYmaO8OwAgbSSIbGX50YoFUy7nNcw8pgLngS KQ5ulOfINilo0ke0FwM9kLfklR1jgI6CcEDn2mm+nFoXxKnjfAdWyjtDHV6jfXMJJSgkRR c9a8szbFsBGEtNJEXE98GIjG14NPVdnQFFneOaW805Mezv17wNqmlw70LZW1lQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698341854; a=rsa-sha256; cv=none; b=oaT9ubttz4ukuGCPhcUhKvk5jy+7HoyzOkvjDcquS+3Dx34Xf2Y0WBl8asZSZJtKpcJ6jo 46pZglnLUTsGHDoJX4bH/OAYghlg3FNG/k0biLGPHw8lD9sPhJLARjrEkEKFJ0LOuTSwrn ZEnR8J/EEQnM1cI6VGcT+TtS2R39TSqa07MTyHO2UBzjkYhZM4/Te2hAUa1csS4oO5w6me xrEqYFuOXtBWICLBq4vHVodeVF+4oUc8gq7t7jmWT10MITOLAs+Nz+5YrsmKcPEeqLKKjM mW3B4bnW7y0x4XS+reMmVPTH4sfawWLxI5O5DFouvC7fIM9haLd2VyKnVfiWOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGY0G0xwVzgcs; Thu, 26 Oct 2023 17:37:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QHbYb1089711; Thu, 26 Oct 2023 17:37:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QHbY84089708; Thu, 26 Oct 2023 17:37:34 GMT (envelope-from git) Date: Thu, 26 Oct 2023 17:37:34 GMT Message-Id: <202310261737.39QHbY84089708@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: d65a002ded1f - stable/14 - libprocstat: simplify auxv value conversion List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d65a002ded1fef6a9dce796252a73bd65104e1af Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=d65a002ded1fef6a9dce796252a73bd65104e1af commit d65a002ded1fef6a9dce796252a73bd65104e1af Author: Brooks Davis AuthorDate: 2023-10-16 16:52:57 +0000 Commit: Brooks Davis CommitDate: 2023-10-25 23:30:45 +0000 libprocstat: simplify auxv value conversion Avoid a weird dance through the union and treat all 32-bit values as unsigned integers. This avoids sign extension of flags and userspace pointers. Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42198 (cherry picked from commit 9735cc0e41825bb9e95d16433d381ffe4c190f38) --- lib/libprocstat/libprocstat.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index a302310dfb9a..e5481c53eea1 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -2414,7 +2414,6 @@ procstat_getauxv32_sysctl(pid_t pid, unsigned int *cntp) { Elf_Auxinfo *auxv; Elf32_Auxinfo *auxv32; - void *ptr; size_t len; unsigned int i, count; int name[4]; @@ -2448,8 +2447,17 @@ procstat_getauxv32_sysctl(pid_t pid, unsigned int *cntp) * necessarily true. */ auxv[i].a_type = auxv32[i].a_type; - ptr = &auxv32[i].a_un; - auxv[i].a_un.a_val = *((uint32_t *)ptr); + /* + * Don't sign extend values. Existing entries are positive + * integers or pointers. Under freebsd32, programs typically + * have a full [0, 2^32) address space (perhaps minus the last + * page) and treating this as a signed integer would be + * confusing since these are not kernel pointers. + * + * XXX: A more complete translation would be ABI and + * type-aware. + */ + auxv[i].a_un.a_val = (uint32_t)auxv32[i].a_un.a_val; } *cntp = count; out: From nobody Thu Oct 26 17:37:35 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGY0H3r3Hz4y5Fn; Thu, 26 Oct 2023 17:37: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 4SGY0H2vbPz4ZQg; Thu, 26 Oct 2023 17:37:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698341855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Og/RGHdOFHlDXLNSSgqowtj0B73c6+rNIIpNWytt+dI=; b=wYORRVn5imR3MiD7B0E8dgd6jlmtvfieb/sG6vfHjAZrTk0CN6HC5NvBe10WB4i9u+eJL5 UMjGOLZBhX1DxaCJaYZC3t7J77C/UqjCv86o9PA6BsU8QJtampRQdw9R/tVG63qtbbglhO oF/FdfoeH2pRhzW7132R7ThlOedSghzFly8iS1fsJy2KU4zWoIKwFNZoC3/9D8kGFmp0+f SmUQt3NtOdRElrqOadDZfO4UNd/SsoX+F4tIomozoMxijdPchwGwiYZ3UExRzsM9DwlrDB gvF+lwalAxL0gQM6vQYSwDBO/bTI5SwNfPoqEMERY57XoZjXpVtAILeGs4Su2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698341855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Og/RGHdOFHlDXLNSSgqowtj0B73c6+rNIIpNWytt+dI=; b=oS/Bs8Cuod3PhxBQQzgN8MXfrYWt8TCpf3vTLHt28Y6J+JGELrKLu5lomSz7SdHw/OfLfC DkmkEOOYGeHYPTqPc00KdH6IO7mA4m6BjdBZdjXgCuO9pzcavJkgnkBKw4KaLXF6Zxzr4r Idakhik4DBCZZZgPmPZJyj0aZZqNuYuo1Plic5c/kAXPCApsOGvOq4SQscaU92SzNB1L8I ur1tX2HwxRMKzdQ6yOG1XJ3//Uqhb4stjEUwmLf5YBhEY6WKkGsUVzxTxjVRho2f3xEnrm sfVIXfOjZcVEpafcgx5Nftu4mHHoeUrQnJYYIIkruh4uYujHVM7x2KdRvv1rCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698341855; a=rsa-sha256; cv=none; b=DXsE0nsvgoH1c10B60eeAuLVNuybPJakJbRQHlDQ5NaT0Z412NSbiuSbi1YGlSRtv1SK90 A3XTPBzYtX7eu5nZ7liBu3AP93iGwoHWBfYthtthzzcYnans+TcGLUDCwO8a/0MoQBo9rg TigboVYxF6WNqG6M3FRoPjJ48TgGoYI58gRPjgL+yPKOvHTg6YWO7d8CMLA7VN+JkxKO9O Xjug0qKTYC8MGf84aezeYj5uG9R4cGubSzJEAVaezs6p9slSNkXEguD67urbpr6sjsJp1v YdrprQWh587rXiklx4rqLSx2DRsc+hyfJ3JT/86qf7Zf9fpVJsYGm8H+z4C5oQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGY0H1xfGzgq4; Thu, 26 Oct 2023 17:37:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QHbZBQ089758; Thu, 26 Oct 2023 17:37:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QHbZml089755; Thu, 26 Oct 2023 17:37:35 GMT (envelope-from git) Date: Thu, 26 Oct 2023 17:37:35 GMT Message-Id: <202310261737.39QHbZml089755@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 9b48cb8e89c8 - stable/14 - libprocstat: make sv_name not static List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9b48cb8e89c86128c1d9d89eea67ef4b28a38c52 Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=9b48cb8e89c86128c1d9d89eea67ef4b28a38c52 commit 9b48cb8e89c86128c1d9d89eea67ef4b28a38c52 Author: Brooks Davis AuthorDate: 2023-10-16 16:53:11 +0000 Commit: Brooks Davis CommitDate: 2023-10-25 23:30:51 +0000 libprocstat: make sv_name not static Making this variable static makes is_elf32_sysctl() and callers thread unsafe. Use a less absurd length for sv_name. The longest name in the system is "FreeBSD ELF64 V2" which tips the scales at 16+1 bytes. We'll almost certainly have other problems if we exceed 32 characters. Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42199 (cherry picked from commit 72a4ee26a7c665ae1c31abe1c6feeaa7ccaba140) --- lib/libprocstat/libprocstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index e5481c53eea1..84502bb895b7 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -2392,7 +2392,7 @@ is_elf32_sysctl(pid_t pid) { int error, name[4]; size_t len, i; - static char sv_name[256]; + char sv_name[32]; name[0] = CTL_KERN; name[1] = KERN_PROC; From nobody Thu Oct 26 17:37:36 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGY0J4QLZz4y5Jj; Thu, 26 Oct 2023 17:37: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 4SGY0J3xSjz4ZqQ; Thu, 26 Oct 2023 17:37:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698341856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O0D7yc17cAmU54B5DFFb0m3hZxzN3o3S6AqtUkh7fhQ=; b=FMSDfT+YZjmdTiw1V317IuU5nMWMDm/k8TngPwBcWUYgHOebYhIcjg/TcqUkk+QZllVzcy 0mv6dohIsYhhTUnZljgqFDc61KXCsj2cf9dsQgD1hvz/eJxuzaziJiBYT6M9sq74PPbud0 M3Fx2UnaKlm/D+PP6dSVKk3EImbdXiTPu2U06g4figI6DLFqft80sxRUvadBkfggSWQaz/ PtyYQRWN23dbZiCvfmvSyMSC7f22nuHCXKfW3QqLCsGG1JTdNMCBvh3wXRFcm0/yQR8vni lwuHCa7+8FqPWtLkpoVs16FD4iNIRwF7azrX2UxW1f2wpIt/1Ljn4rik6H6u8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698341856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O0D7yc17cAmU54B5DFFb0m3hZxzN3o3S6AqtUkh7fhQ=; b=U6xF2Rrlzn9E83+BOn3ssTC6s8hVOtLzhth1l3AqgOwm9K5sEZ6R1jClPtO1hH6e6TWPW2 /VbW4EJx1IJmhRfqcDokLzLEXOIEPS+atb71BA1fNins40FdVWAOlfgAO23kJqk3XtycER Xx8XvIWR20ft1Xl6W5i1VaY91TG0+vftvMSnTkX0T9CZKB9iHbZXbnZXII0sW2F/eIuCpb r742lBgy9gKYDACHf/gZyXVRB55x3lncWkl5/wzjp8KHfJQ1hdatFLqiYs0QxXH8nKddJ5 yQjY80k7hmfGhkpgsTxUjx0r2YvDhwvO/PW6d7Ie2r2NYHbSx0pPKyWCjztQkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698341856; a=rsa-sha256; cv=none; b=kmeaa853T++z5SlEOG5ZXWiOuRI2pMfwUBXOyWB/zjT6ZLfJqdTnLQrU5/yaz5c6sdJPyT 64riU28xA0RGyIF6+YdB+k2Ee5DdRhHGdykvvXOcoD6UyQ4ns92jSKvOYbkdxYtuhodreN cGu/yoDndE5TsR66sirleaZ4pRtRBVXjHsEopB0bBjOGMQdgJFnAaU9LHefFXcQaq9DA5R f63XQHyeWp/tmZ+U5U6DluZ7nWK2/naASV9zQBdLXLg64OIsZR+1TyYtShs6Yeb/ubDcV7 Wqqc5GwMspId++kCceF9Bppn1shdMglQ2aHNJiFkSI0sJ5roJBI+CEZS6c9IUA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGY0J2xxWzglv; Thu, 26 Oct 2023 17:37:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QHbaaq089809; Thu, 26 Oct 2023 17:37:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QHbabT089806; Thu, 26 Oct 2023 17:37:36 GMT (envelope-from git) Date: Thu, 26 Oct 2023 17:37:36 GMT Message-Id: <202310261737.39QHbabT089806@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: ff90744045e3 - stable/14 - libprocstat: copy all the 32-bit auxv entries List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ff90744045e310acae79669c07f70f0ecb5fbc0a Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=ff90744045e310acae79669c07f70f0ecb5fbc0a commit ff90744045e310acae79669c07f70f0ecb5fbc0a Author: Brooks Davis AuthorDate: 2023-10-16 16:53:22 +0000 Commit: Brooks Davis CommitDate: 2023-10-25 23:30:56 +0000 libprocstat: copy all the 32-bit auxv entries Use source struct size not the destination struct size so we copy all the auxv entries, not just the first half of them. Fix a style issue on an adjacent line. Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42200 (cherry picked from commit 8f06fabe39ac3ebca4ab448a456945008305a23f) --- lib/libprocstat/libprocstat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index 84502bb895b7..031294387ca7 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -2434,8 +2434,8 @@ procstat_getauxv32_sysctl(pid_t pid, unsigned int *cntp) warn("sysctl: kern.proc.auxv: %d: %d", pid, errno); goto out; } - count = len / sizeof(Elf_Auxinfo); - auxv = malloc(count * sizeof(Elf_Auxinfo)); + count = len / sizeof(Elf32_Auxinfo); + auxv = malloc(count * sizeof(Elf_Auxinfo)); if (auxv == NULL) { warn("malloc(%zu)", count * sizeof(Elf_Auxinfo)); goto out; From nobody Thu Oct 26 17:37:37 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGY0L0Gpwz4y5Fx; Thu, 26 Oct 2023 17:37: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 4SGY0K57WCz4ZnZ; Thu, 26 Oct 2023 17:37:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698341857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qrtA6uTStpwpzJDd8TWWHcy7C0EUbv7PaGVC2afbbWk=; b=HGUaSV1k36wOykTN05GWpHpU3r6hLaZcGwaPShGGqj1Ttt2NoLk+dZTy8uT4pcNhYKAFhR 3cf9H88SzpTTIhYp9Xi5YySd8t9hv73Sl4h+n+O9HCE4ducXeNh0Ehm+HG8tlLXEBkGbV9 DzuEdEVSnsoBlZZCUYEzhq5867pOeOLcxz7ax5j5t8aqtrVOfw2jeqFRSHOGxNq/ghGiKt /C5xdDUq6ZZk1O9io/8ODpHGaHzVQ3I94ipbROygEyU7qb+vkxXfY0BfIU/u3kR50cvu+1 7z0Z8pnS8VaZ52z21tuJNF+TQafANDjKnwc3+CAVsHBfN0tw+oS0j3W5HmkVZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698341857; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qrtA6uTStpwpzJDd8TWWHcy7C0EUbv7PaGVC2afbbWk=; b=axePVlxEYOLxW1rbihdSo88LK0VNIBhh+nc0Web9uHlMy5bq6EZApjFMm2P2rtHtbgdEVH /WRX318XH+Enpq6A97cawB+l3lMet+IurTLTK/nxl5RlkLEXVLpJH6p6DFJDcKSTQYuSKP u3z0RUUg61H/tZ6NNCyqP0ZimMsVSUX5lP78NJ7/2Mh7HNCBHmbMip+d+wRRM+Zf1rZoT7 dOtVWteJq5SUraDEoKopIPzOrdldQx//9BIxXQpMevMtppfZIIc07UpNqZ1fhdDR7vmGzi NqWUPGRfYiURzn7b9a5g8jz1teHA7PKIGUeZMiSi1yy7U3Dz1YO4PAcDI3h8XA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698341857; a=rsa-sha256; cv=none; b=HluPcW3hxLgMrLbtnHTReYyt3o3PNXaOMiveG5EAp9xpOPRQ64bS9NG6ofbpqYsMnkFyBq /73ThGmEk6SjLfJrAihStAIKl+yW4/3oFnCyqkzk4yQIaENUPlwlvLOrOHax3QK/FCCzH4 W0kull8aTze7BwWAVY2EQcuITKBQocOj+bkIsEnPn9dd+pVRI6MRGHdg2RR1pYLss3coog 77EBIpKXDyI4IpV2M1CJ6rKSHs2gSrMuj0ZxVhaM65nWcIG8Tw7ytVhpKfK6mqqboaqPLP Eu2KaZYebDXYlTLDp0oxUaAzfMKif3D/CtqJLrirk5C3V0k/XcB8k6Oe6+/qVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGY0K3y7Qzgfy; Thu, 26 Oct 2023 17:37:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QHbbFg089859; Thu, 26 Oct 2023 17:37:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QHbbHJ089857; Thu, 26 Oct 2023 17:37:37 GMT (envelope-from git) Date: Thu, 26 Oct 2023 17:37:37 GMT Message-Id: <202310261737.39QHbbHJ089857@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 58a50eabf390 - stable/14 - libprocstat: improve conditional for 32-bit compat List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 58a50eabf390afd621a00dad46ea15fd343189fc Auto-Submitted: auto-generated The branch stable/14 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=58a50eabf390afd621a00dad46ea15fd343189fc commit 58a50eabf390afd621a00dad46ea15fd343189fc Author: Brooks Davis AuthorDate: 2023-10-16 16:53:29 +0000 Commit: Brooks Davis CommitDate: 2023-10-25 23:31:02 +0000 libprocstat: improve conditional for 32-bit compat Include support for translating 32-bit auxv vectors on non-64-bit platforms that aren't riscv (which has no 32-bit ABI support and probably never will). Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42201 (cherry picked from commit 248fe3d3483cb3ec2c78dd31dc02a467060a6577) --- lib/libprocstat/libprocstat.c | 6 +++--- lib/libprocstat/libprocstat.h | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index 031294387ca7..c6a225a021a7 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -2381,7 +2381,7 @@ procstat_getosrel(struct procstat *procstat, struct kinfo_proc *kp, int *osrelp) #define PROC_AUXV_MAX 256 -#if __ELF_WORD_SIZE == 64 +#ifdef PS_ARCH_HAS_FREEBSD32 static const char *elf32_sv_names[] = { "Linux ELF32", "FreeBSD ELF32", @@ -2464,7 +2464,7 @@ out: free(auxv32); return (auxv); } -#endif /* __ELF_WORD_SIZE == 64 */ +#endif /* PS_ARCH_HAS_FREEBSD32 */ static Elf_Auxinfo * procstat_getauxv_sysctl(pid_t pid, unsigned int *cntp) @@ -2473,7 +2473,7 @@ procstat_getauxv_sysctl(pid_t pid, unsigned int *cntp) int name[4]; size_t len; -#if __ELF_WORD_SIZE == 64 +#ifdef PS_ARCH_HAS_FREEBSD32 if (is_elf32_sysctl(pid)) return (procstat_getauxv32_sysctl(pid, cntp)); #endif diff --git a/lib/libprocstat/libprocstat.h b/lib/libprocstat/libprocstat.h index 0df01817663e..3d30b4db4018 100644 --- a/lib/libprocstat/libprocstat.h +++ b/lib/libprocstat/libprocstat.h @@ -102,6 +102,11 @@ #define PS_FST_FFLAG_EXEC 0x2000 #define PS_FST_FFLAG_HASLOCK 0x4000 +#if !defined(__ILP32__) && !defined(__riscv) +/* Target architecture supports 32-bit compat */ +#define PS_ARCH_HAS_FREEBSD32 1 +#endif + struct kinfo_kstack; struct kinfo_proc; struct kinfo_vmentry; From nobody Thu Oct 26 19:07:46 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGb0M0wmqz4y9Mm; Thu, 26 Oct 2023 19:07: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 4SGb0M09Dbz3LfT; Thu, 26 Oct 2023 19:07:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698347267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9VD+gSndxr00YMoqBkCqMpXEQGcjRPTWV7mr8xQkggI=; b=GKRf3arhRqsaB2ssosKj30lg5NJLg+3u6oaj42hJrajYxafW94kCxdiGmvQULZGJh+J7Ru V5moOmp00G1Wot1AL+gxDi4Q1FVQKArXmiZCggHjC8aeXU/yUb7XNKX+9gwFgzn23A+96x hOHh1kF688DNLmSLm0+M/GhbDzt8qb6+7Qlj0w79RSceqkmy66W2z7ciRRTpKCwuWRiRIr ZonGAo3HVqSTbBNjj/d1yRBWKydMUn2l2YtkrIdvlgTEzsAPI3zpFXd3kkRovcssVnOyWu CPHke3jL6TrsO9ZiEVwhwpfPnUXoerzZKC/PgdArZOfkEl8a32Bnw//KEVxnhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698347267; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9VD+gSndxr00YMoqBkCqMpXEQGcjRPTWV7mr8xQkggI=; b=Jlp20l28i+/DB0COYplvvQqhPnYIn4IUwGRB/gXfUbcwkU/D0xaX+1OpP1H3MpcMwahHGb IIY7g40iLyhm7YgvVEAWy0b26uGf672elQZV8c2DnbzjdpDVkxVNWzovsebWh57/XQC66y 9Rc/KSLn5O29iGceTE/yrIwgeE5StNepbtZ3Bf1GnlL4UYHNudvWUXlyyOUp4as4NjXJbc K3MUdmPtnZY2U8XpYoaookr/Kfj1ZzqDbGQvm0rG8a9+VdRyGP2yC2qLfcncrU2DIoBjup 2SICr896ofKHiqhVj8I+d9C43SLJhqEtg+C0J/oghH8EdLfivC21caAnhURdpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698347267; a=rsa-sha256; cv=none; b=gx74Nr9v0x3nk5DsQEjIK+R5Dk6yix4B94ER9M+wU+RTPJFE5iXRfRoocZ1zWNNPQmVFVb iZsHr1TrCkmwJdL6RA6UE+iWdfqNeDf/KFX27lOsIzCa4nWr9Vtxeky/An+DnrdJ1Ulo/Z CGV3dBBpqXK5KDdvVDU1XAaSvERN8nQYazA34dBXj/0IvsKYCiFw54bpfijN/pxlnxoMV4 wJgyhZhOf/Lj3bTypacuKiWPyT/OAOK0kY+NvH3dBtOBuXldMo+kIxJDmTAmexdfXBlXh4 LP1EHrNe34ATyEFWBA9l/MJYDaQQ3EN66UbXaDiCL5hGV+gd1pZ7Dl30eCqFQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGb0L6LjQzjGP; Thu, 26 Oct 2023 19:07:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QJ7kNg041026; Thu, 26 Oct 2023 19:07:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QJ7k5t041023; Thu, 26 Oct 2023 19:07:46 GMT (envelope-from git) Date: Thu, 26 Oct 2023 19:07:46 GMT Message-Id: <202310261907.39QJ7k5t041023@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: 27272d3d97c8 - stable/13 - add pmap_active_cpus() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: 27272d3d97c8e363e3f454f1de3b1be307c8a033 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=27272d3d97c8e363e3f454f1de3b1be307c8a033 commit 27272d3d97c8e363e3f454f1de3b1be307c8a033 Author: Konstantin Belousov AuthorDate: 2021-10-07 22:25:54 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-26 04:07:29 +0000 add pmap_active_cpus() (cherry picked from commit 8882b7852acf2588d87ccb6d4c6bf7694511fc56) --- sys/amd64/amd64/pmap.c | 6 ++++++ sys/arm/arm/pmap-v6.c | 6 ++++++ sys/arm64/include/pmap.h | 2 ++ sys/i386/i386/pmap_base.c | 6 ++++++ sys/powerpc/powerpc/pmap_dispatch.c | 6 ++++++ sys/riscv/riscv/pmap.c | 6 ++++++ sys/vm/pmap.h | 2 ++ sys/vm/vm_kern.c | 26 ++++++++++++++++++++++++++ 8 files changed, 60 insertions(+) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 4fba61269352..8f1541bc8637 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -10000,6 +10000,12 @@ pmap_activate_boot(pmap_t pmap) PCPU_SET(ucr3, PMAP_NO_CR3); } +void +pmap_active_cpus(pmap_t pmap, cpuset_t *res) +{ + *res = pmap->pm_active; +} + void pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) { diff --git a/sys/arm/arm/pmap-v6.c b/sys/arm/arm/pmap-v6.c index f00589a75c6d..0446a67bdbcf 100644 --- a/sys/arm/arm/pmap-v6.c +++ b/sys/arm/arm/pmap-v6.c @@ -6212,6 +6212,12 @@ pmap_activate(struct thread *td) critical_exit(); } +void +pmap_active_cpus(pmap_t pmap, cpuset_t *res) +{ + *res = pmap->pm_active; +} + /* * Perform the pmap work for mincore(2). If the page is not both referenced and * modified by this pmap, returns its physical address so that the caller can diff --git a/sys/arm64/include/pmap.h b/sys/arm64/include/pmap.h index 7305b8d32e87..a8e1041163be 100644 --- a/sys/arm64/include/pmap.h +++ b/sys/arm64/include/pmap.h @@ -149,6 +149,8 @@ extern struct pmap kernel_pmap_store; (uint64_t)(asid) << TTBR_ASID_SHIFT; \ }) +#define PMAP_WANT_ACTIVE_CPUS_NAIVE + extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; diff --git a/sys/i386/i386/pmap_base.c b/sys/i386/i386/pmap_base.c index cc840865218f..8e2403682a78 100644 --- a/sys/i386/i386/pmap_base.c +++ b/sys/i386/i386/pmap_base.c @@ -944,6 +944,12 @@ pmap_kremove(vm_offset_t va) pmap_methods_ptr->pm_kremove(va); } +void +pmap_active_cpus(pmap_t pmap, cpuset_t *res) +{ + *res = pmap->pm_active; +} + extern struct pmap_methods pmap_pae_methods, pmap_nopae_methods; int pae_mode; SYSCTL_INT(_vm_pmap, OID_AUTO, pae_mode, CTLFLAG_RDTUN | CTLFLAG_NOFETCH, diff --git a/sys/powerpc/powerpc/pmap_dispatch.c b/sys/powerpc/powerpc/pmap_dispatch.c index 0b899a8e6020..2e7539cf09cb 100644 --- a/sys/powerpc/powerpc/pmap_dispatch.c +++ b/sys/powerpc/powerpc/pmap_dispatch.c @@ -253,3 +253,9 @@ pmap_is_valid_memattr(pmap_t pmap __unused, vm_memattr_t mode) return (FALSE); } } + +void +pmap_active_cpus(pmap_t pmap, cpuset_t *res) +{ + *res = pmap->pm_active; +} diff --git a/sys/riscv/riscv/pmap.c b/sys/riscv/riscv/pmap.c index 665d257fe6c5..d1996dabbc2c 100644 --- a/sys/riscv/riscv/pmap.c +++ b/sys/riscv/riscv/pmap.c @@ -4693,6 +4693,12 @@ pmap_activate_boot(pmap_t pmap) PCPU_SET(curpmap, pmap); } +void +pmap_active_cpus(pmap_t pmap, cpuset_t *res) +{ + *res = pmap->pm_active; +} + void pmap_sync_icache(pmap_t pmap, vm_offset_t va, vm_size_t sz) { diff --git a/sys/vm/pmap.h b/sys/vm/pmap.h index 7272882132e0..65e909df9b8f 100644 --- a/sys/vm/pmap.h +++ b/sys/vm/pmap.h @@ -90,6 +90,7 @@ typedef struct pmap_statistics *pmap_statistics_t; #include #ifdef _KERNEL +#include struct thread; /* @@ -118,6 +119,7 @@ extern vm_offset_t kernel_vm_end; #define PMAP_TS_REFERENCED_MAX 5 void pmap_activate(struct thread *td); +void pmap_active_cpus(pmap_t pmap, cpuset_t *res); void pmap_advise(pmap_t pmap, vm_offset_t sva, vm_offset_t eva, int advice); void pmap_align_superpage(vm_object_t, vm_ooffset_t, vm_offset_t *, diff --git a/sys/vm/vm_kern.c b/sys/vm/vm_kern.c index 4c50d32a1e33..2d5d20d931d3 100644 --- a/sys/vm/vm_kern.c +++ b/sys/vm/vm_kern.c @@ -77,6 +77,7 @@ #include #include #include +#include #include #include #include @@ -883,6 +884,31 @@ kmem_bootstrap_free(vm_offset_t start, vm_size_t size) #endif } +#ifdef PMAP_WANT_ACTIVE_CPUS_NAIVE +void +pmap_active_cpus(pmap_t pmap, cpuset_t *res) +{ + struct thread *td; + struct proc *p; + struct vmspace *vm; + int c; + + CPU_ZERO(res); + CPU_FOREACH(c) { + td = cpuid_to_pcpu[c]->pc_curthread; + p = td->td_proc; + if (p == NULL) + continue; + vm = vmspace_acquire_ref(p); + if (vm == NULL) + continue; + if (pmap == vmspace_pmap(vm)) + CPU_SET(c, res); + vmspace_free(vm); + } +} +#endif + /* * Allow userspace to directly trigger the VM drain routine for testing * purposes. From nobody Thu Oct 26 19:07:47 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGb0N2G5vz4y9nC; Thu, 26 Oct 2023 19:07: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 4SGb0N1M2rz3Lqc; Thu, 26 Oct 2023 19:07:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698347268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z7NzxqD6Gy2gyo2NkAt/eVcL7XHiLbFcp1B2Kpbz79I=; b=htcEPeM0xszcFF62VEjPFKtl6TyI/vskHBFHuN1SDFiiyQf0c5PWhQHFrVS0ateC8sLfej fWiWex6/d4lFU2lM0aORHncdFEhQDZUamRAE+7L7ARapWrYJoE0wyKNFZmMyHbc/UthVKM EA1O399MLC/2Tb6aCMPuMonV65ghXuy6Ydj024ORBszifFPAEnq1HmtTaiJblhvlSlsKcF s4HjgjGxY24Y6+DKUbba/TiESxkK0oj7XdGYjpciD1IuYePDlrkdIi3bOOhX3/gks6Lyt4 ScheXOr30KVkYUxkYHVh8u0jYiO7HuWaxdHbAzr6D5CIT9dexfd3OlbuK4oYuA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698347268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z7NzxqD6Gy2gyo2NkAt/eVcL7XHiLbFcp1B2Kpbz79I=; b=VsWZnR1Ln4LxYL1kGkvUTCwekEYKguODSo+iXg4u2wO/oSbdoFotgWWwsDa+U5lSXgieKJ xvX0AAtbjuo1GuU7w3BjfnT+MEHtioC5ZSQSZcbQsCyMSvNRVJgB1s8i8aUr7iJBJo+HVZ y5jw2CQc3AkSpSXXcd1oH2OpUHEno8sGujUUWJK5wI8QUoLBIuXTYSUJCueF57EmFE0awu oQ2waeOoT4qsHvKCX4gSewnISqjdcD3yCkOJzBtFX6H8Nql362yB6zqs/bZFwFXYo5TcH+ PUtKLkdtypVkVKF+n/4lG4wTGvH8kPja+Pj7XR/cb3TNH7/aGBiKV49PAck46g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698347268; a=rsa-sha256; cv=none; b=rLt94ZHUW7sZadJqgfpRJ/W9yQenvPoqLtF1yGaPAyGvV//nmyw2OxheykABf6bfJx7v1S sPMN5Bi3R1foKhs1u7udigr0SHpacDqF4w7hHN9u1BwVz5QH3bSKnrFC/om1kVVdXQLzz3 EccozykYgMTqdpNVEQ5RH7Aew9Esptd91/jhsyWrkTGjJs525hlPZ7mREkwOcGzHY4phyw GIyd33LhpNqEaJmKWUah322gsGdEtr9do/g+2r6HqIQK/usy/BsPaQuuH6Ud+gbWFAriPv ygrKjgppJWvmlG/h2+kbp8gJyyQsQNZEIyVFHFmGLJ/LA+PlCuE+eS8jU2z7ZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGb0N0BxxzjwC; Thu, 26 Oct 2023 19:07:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QJ7lPq041060; Thu, 26 Oct 2023 19:07:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QJ7lHw041057; Thu, 26 Oct 2023 19:07:47 GMT (envelope-from git) Date: Thu, 26 Oct 2023 19:07:47 GMT Message-Id: <202310261907.39QJ7lHw041057@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: ef71fbf692af - stable/13 - Add cpu_sync_core() List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: ef71fbf692af963b1a4fa072e88d0d1256f1f897 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ef71fbf692af963b1a4fa072e88d0d1256f1f897 commit ef71fbf692af963b1a4fa072e88d0d1256f1f897 Author: Konstantin Belousov AuthorDate: 2021-10-07 21:57:55 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-26 04:07:29 +0000 Add cpu_sync_core() (cherry picked from commit 74ccb8ecf6c115a79f008bc32d4981f1126b63a8) --- sys/amd64/amd64/support.S | 21 +++++++++++++++++++++ sys/arm/arm/vm_machdep.c | 5 +++++ sys/arm64/arm64/vm_machdep.c | 11 +++++++++++ sys/i386/i386/support.s | 8 ++++++++ sys/powerpc/powerpc/vm_machdep.c | 10 ++++++++++ sys/riscv/riscv/vm_machdep.c | 7 +++++++ sys/sys/proc.h | 1 + 7 files changed, 63 insertions(+) diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index f070973913a0..936065a78879 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -1970,3 +1970,24 @@ ENTRY(mds_handler_silvermont) popq %rax retq END(mds_handler_silvermont) + +/* + * Do the same as Linux and execute IRET explicitly, despite IPI + * return does it as well. + */ +ENTRY(cpu_sync_core) +/* + * Can utilize SERIALIZE when instruction is moved from + * 'future extensions' to SDM. + */ + movq (%rsp), %rdx + movl %ss, %eax + pushq %rax + pushq %rsp + addq $16, (%rsp) + pushfq + movl %cs, %eax + pushq %rax + pushq %rdx + iretq +END(cpu_sync_core) diff --git a/sys/arm/arm/vm_machdep.c b/sys/arm/arm/vm_machdep.c index 2dcd0158fd93..03816df5760f 100644 --- a/sys/arm/arm/vm_machdep.c +++ b/sys/arm/arm/vm_machdep.c @@ -305,3 +305,8 @@ cpu_procctl(struct thread *td __unused, int idtype __unused, id_t id __unused, return (EINVAL); } + +void +cpu_sync_core(void) +{ +} diff --git a/sys/arm64/arm64/vm_machdep.c b/sys/arm64/arm64/vm_machdep.c index f1ff0742418a..ea8e88b7201d 100644 --- a/sys/arm64/arm64/vm_machdep.c +++ b/sys/arm64/arm64/vm_machdep.c @@ -302,3 +302,14 @@ cpu_procctl(struct thread *td __unused, int idtype __unused, id_t id __unused, return (EINVAL); } + +void +cpu_sync_core(void) +{ + /* + * Do nothing. According to ARM ARMv8 D1.11 Exception return + * If FEAT_ExS is not implemented, or if FEAT_ExS is + * implemented and the SCTLR_ELx.EOS field is set, exception + * return from ELx is a context synchronization event. + */ +} diff --git a/sys/i386/i386/support.s b/sys/i386/i386/support.s index e017e67d0fa7..2995469405df 100644 --- a/sys/i386/i386/support.s +++ b/sys/i386/i386/support.s @@ -634,3 +634,11 @@ ENTRY(mds_handler_silvermont) movl %eax, %cr0 3: ret END(mds_handler_silvermont) + +ENTRY(cpu_sync_core) + popl %eax + pushfl + pushl %cs + pushl %eax + iretl +END(cpu_sync_core) diff --git a/sys/powerpc/powerpc/vm_machdep.c b/sys/powerpc/powerpc/vm_machdep.c index 47a4dd0d4c4a..c99748149f39 100644 --- a/sys/powerpc/powerpc/vm_machdep.c +++ b/sys/powerpc/powerpc/vm_machdep.c @@ -234,3 +234,13 @@ cpu_procctl(struct thread *td __unused, int idtype __unused, id_t id __unused, return (EINVAL); } + +void +cpu_sync_core(void) +{ + /* + * Linux performs "rfi" there. Our rendezvous IPI handler on + * the target cpu does "rfi" before and lwsync/sync after the + * action, which is stronger than required. + */ +} diff --git a/sys/riscv/riscv/vm_machdep.c b/sys/riscv/riscv/vm_machdep.c index 3b2553996bb8..58acf5df9e14 100644 --- a/sys/riscv/riscv/vm_machdep.c +++ b/sys/riscv/riscv/vm_machdep.c @@ -49,6 +49,7 @@ #include #include +#include #include #include #include @@ -267,3 +268,9 @@ cpu_procctl(struct thread *td __unused, int idtype __unused, id_t id __unused, return (EINVAL); } + +void +cpu_sync_core(void) +{ + fence_i(); +} diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 0e8156e308b6..369bc607e9c7 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -1162,6 +1162,7 @@ void cpu_idle(int); int cpu_idle_wakeup(int); extern void (*cpu_idle_hook)(sbintime_t); /* Hook to machdep CPU idler. */ void cpu_switch(struct thread *, struct thread *, struct mtx *); +void cpu_sync_core(void); void cpu_throw(struct thread *, struct thread *) __dead2; bool curproc_sigkilled(void); void userret(struct thread *, struct trapframe *); From nobody Thu Oct 26 19:07:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGb0Q2b5qz4y9hC; Thu, 26 Oct 2023 19:07: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 4SGb0P5dB7z3Ll6; Thu, 26 Oct 2023 19:07:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698347269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q4PyG08kZ6Wum/HNSDVZjSe6qbyIPnA/HD9Pxxoo138=; b=T1Q6qtLEN1UW6xZPja7tZ39fB+8Zl1luhW1GRpk02cejfXqkpaowgIZO4KWVsP5ybQEsLM cb70AhLOGHuoSqBtTcrl6CgbrnCdRn2WnoIAdwA4vzOeANpFfLK4r+nXJMGCD5jqSMirpO Py3aUWqn5wPVLhjYHpnjlkRo1+Pyrs7ArTSf4IuJ0q86EqbA/I+OXqxWP+tufqNzFSas9a 2TIXYC2wcFbZ5vKYxI93jVaiC9mKnD7F2DK2UBUQevRccTQ4OLdsq/VTd7HwrTpXCl8PsM 73Sns9FnOwPZQEqgF4SQS6AbUGICHN/kKsiU0rx9phbIQU0ZZUsv68Icu1aSKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698347269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q4PyG08kZ6Wum/HNSDVZjSe6qbyIPnA/HD9Pxxoo138=; b=ysZK7X6IkNFscLgLuv1jY39tE4zDtjVPGQ4LZ0pRzbygozI8VZc+EABl8vEtfgfm3udBUg ULJKNSuUMiGpwsqNPntek/53UyWMePqRIVwc/qClT6ftYoEFz6NtvooMKaw5lApNmyVNKh RLBGGmcZjw+Bk1K6uA7nI95dHTeNdsx147LJYmBzKbHa6XFx9ZR3U/08cY0bDmnwPYOLp4 96U57C6DMhN6KIgZlW+apSsSCTQ8XlpCxAsCOpYZwMx5sDjV49W1BmwF3LGj0+Qz7Ajd9U 6Guxx0Jgvz1FxN5MthGPoa9/O6PSM5GttHxxxCaUf1fJXc16hTAQh4WlrVL0SA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698347269; a=rsa-sha256; cv=none; b=wWYexasDBEkG2ZPfpCVRz8eiuZjLeok9wuMJIjJUbbPZ5q/07cg3huD/u/qIMd0mNguTPH QxwgrGPTVLRqgYAHIV221HeTWwd7qInt9Ih7i0Cb60gf79nlLJxfvEx3negUjvzEOhRNcb DXwbhbmo8Ersv/4GcgjdFEzHf6xJIWnuPQ7J6owKi7tm/molMq49Qt3W9FzjWJy99Xl2ik VSU4Pub8kIRgibQ0wx7j5Bst1mE0UjlAdiH30wfOBRMf+/1hAHJqtdGIU9EUKjWyr+34Xv zPkiP2qMo0zRQXjUSjwa5XQpc+MsaHVlRAUWTqWv+rVDPPidnpeLOn7UiI2D5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGb0P1jjlzjGQ; Thu, 26 Oct 2023 19:07:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QJ7nHP041093; Thu, 26 Oct 2023 19:07:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QJ7nux041090; Thu, 26 Oct 2023 19:07:49 GMT (envelope-from git) Date: Thu, 26 Oct 2023 19:07:49 GMT Message-Id: <202310261907.39QJ7nux041090@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: 46a2f8227470 - stable/13 - Add membarrier(2) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: 46a2f82274701912ef16ba2ef48ab30f4eb6a227 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=46a2f82274701912ef16ba2ef48ab30f4eb6a227 commit 46a2f82274701912ef16ba2ef48ab30f4eb6a227 Author: Konstantin Belousov AuthorDate: 2021-10-07 21:10:07 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-26 04:07:29 +0000 Add membarrier(2) (cherry picked from commit 4a69fc16a583face922319c476f3e739d9ce9140) --- lib/libc/sys/Symbol.map | 1 + sys/conf/files | 1 + sys/kern/kern_exec.c | 2 + sys/kern/kern_membarrier.c | 239 +++++++++++++++++++++++++++++++++++++++++++++ sys/kern/syscalls.master | 8 ++ sys/sys/membarrier.h | 70 +++++++++++++ sys/sys/proc.h | 6 ++ sys/sys/syscallsubr.h | 2 + 8 files changed, 329 insertions(+) diff --git a/lib/libc/sys/Symbol.map b/lib/libc/sys/Symbol.map index a5cafd1977b3..f9af2922ed3c 100644 --- a/lib/libc/sys/Symbol.map +++ b/lib/libc/sys/Symbol.map @@ -418,6 +418,7 @@ FBSD_1.6 { FBSD_1.7 { _Fork; kqueuex; + membarrier; swapoff; }; diff --git a/sys/conf/files b/sys/conf/files index 5f2e09eb8c2f..4b624a71c772 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3874,6 +3874,7 @@ kern/kern_lockstat.c optional kdtrace_hooks kern/kern_loginclass.c standard kern/kern_malloc.c standard kern/kern_mbuf.c standard +kern/kern_membarrier.c standard kern/kern_mib.c standard kern/kern_module.c standard kern/kern_mtxpool.c standard diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index c02e644aae91..e8e3d8d8801d 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -827,6 +827,8 @@ interpret: p->p_flag2 &= ~P2_NOTRACE; if ((p->p_flag2 & P2_STKGAP_DISABLE_EXEC) == 0) p->p_flag2 &= ~P2_STKGAP_DISABLE; + p->p_flag2 &= ~(P2_MEMBAR_PRIVE | P2_MEMBAR_PRIVE_SYNCORE | + P2_MEMBAR_GLOBE); if (p->p_flag & P_PPWAIT) { p->p_flag &= ~(P_PPWAIT | P_PPTRACE); cv_broadcast(&p->p_pwait); diff --git a/sys/kern/kern_membarrier.c b/sys/kern/kern_membarrier.c new file mode 100644 index 000000000000..eabd00e8ddf4 --- /dev/null +++ b/sys/kern/kern_membarrier.c @@ -0,0 +1,239 @@ +/*- + * Copyright (c) 2021 The FreeBSD Foundation + * + * This software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 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 +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include + +#define MEMBARRIER_SUPPORTED_CMDS ( \ + MEMBARRIER_CMD_GLOBAL | \ + MEMBARRIER_CMD_GLOBAL_EXPEDITED | \ + MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED | \ + MEMBARRIER_CMD_PRIVATE_EXPEDITED | \ + MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED | \ + MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE | \ + MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE) + +static void +membarrier_action_seqcst(void *arg __unused) +{ + atomic_thread_fence_seq_cst(); +} + +static void +membarrier_action_seqcst_sync_core(void *arg __unused) +{ + atomic_thread_fence_seq_cst(); + cpu_sync_core(); +} + +static void +do_membarrier_ipi(cpuset_t *csp, void (*func)(void *)) +{ + atomic_thread_fence_seq_cst(); + smp_rendezvous_cpus(*csp, smp_no_rendezvous_barrier, func, + smp_no_rendezvous_barrier, NULL); + atomic_thread_fence_seq_cst(); +} + +static void +check_cpu_switched(int c, cpuset_t *csp, uint64_t *swt, bool init) +{ + struct pcpu *pc; + uint64_t sw; + + if (CPU_ISSET(c, csp)) + return; + + pc = cpuid_to_pcpu[c]; + if (pc->pc_curthread == pc->pc_idlethread) { + CPU_SET(c, csp); + return; + } + + /* + * Sync with context switch to ensure that override of + * pc_curthread with non-idle thread pointer is visible before + * reading of pc_switchtime. + */ + atomic_thread_fence_acq(); + + sw = pc->pc_switchtime; + if (init) + swt[c] = sw; + else if (sw != swt[c]) + CPU_SET(c, csp); +} + +/* + * + * XXXKIB: We execute the requested action (seq_cst and possibly + * sync_core) on current CPU as well. There is no guarantee that + * current thread executes anything with the full fence semantics + * during syscall execution. Similarly, cpu_core_sync() semantics + * might be not provided by the syscall return. E.g. on amd64 we + * typically return without IRET. + */ +int +kern_membarrier(struct thread *td, int cmd, unsigned flags, int cpu_id) +{ + struct proc *p, *p1; + struct thread *td1; + cpuset_t cs; + uint64_t *swt; + int c, error; + bool first; + + if (flags != 0 || (cmd & ~MEMBARRIER_SUPPORTED_CMDS) != 0) + return (EINVAL); + + if (cmd == MEMBARRIER_CMD_QUERY) { + td->td_retval[0] = MEMBARRIER_SUPPORTED_CMDS; + return (0); + } + + p = td->td_proc; + error = 0; + + switch (cmd) { + case MEMBARRIER_CMD_GLOBAL: + swt = malloc((mp_maxid + 1) * sizeof(*swt), M_TEMP, M_WAITOK); + CPU_ZERO(&cs); + sched_pin(); + CPU_SET(PCPU_GET(cpuid), &cs); + for (first = true; error == 0; first = false) { + CPU_FOREACH(c) + check_cpu_switched(c, &cs, swt, first); + if (CPU_CMP(&cs, &all_cpus) == 0) + break; + error = pause_sig("mmbr", 1); + if (error == EWOULDBLOCK) + error = 0; + } + sched_unpin(); + free(swt, M_TEMP); + atomic_thread_fence_seq_cst(); + break; + + case MEMBARRIER_CMD_GLOBAL_EXPEDITED: + if ((td->td_proc->p_flag2 & P2_MEMBAR_GLOBE) == 0) { + error = EPERM; + } else { + CPU_ZERO(&cs); + CPU_FOREACH(c) { + td1 = cpuid_to_pcpu[c]->pc_curthread; + p1 = td1->td_proc; + if (p1 != NULL && + (p1->p_flag2 & P2_MEMBAR_GLOBE) != 0) + CPU_SET(c, &cs); + } + do_membarrier_ipi(&cs, membarrier_action_seqcst); + } + break; + + case MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED: + if ((p->p_flag2 & P2_MEMBAR_GLOBE) == 0) { + PROC_LOCK(p); + p->p_flag2 |= P2_MEMBAR_GLOBE; + PROC_UNLOCK(p); + } + break; + + case MEMBARRIER_CMD_PRIVATE_EXPEDITED: + if ((td->td_proc->p_flag2 & P2_MEMBAR_PRIVE) == 0) { + error = EPERM; + } else { + pmap_active_cpus(vmspace_pmap(p->p_vmspace), &cs); + do_membarrier_ipi(&cs, membarrier_action_seqcst); + } + break; + + case MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED: + if ((p->p_flag2 & P2_MEMBAR_PRIVE) == 0) { + PROC_LOCK(p); + p->p_flag2 |= P2_MEMBAR_PRIVE; + PROC_UNLOCK(p); + } + break; + + case MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE: + if ((td->td_proc->p_flag2 & P2_MEMBAR_PRIVE_SYNCORE) == 0) { + error = EPERM; + } else { + /* + * Calculating the IPI multicast mask from + * pmap active mask means that we do not call + * cpu_sync_core() on CPUs that were missed + * from pmap active mask but could be switched + * from or to meantime. This is fine at least + * on amd64 because threads always use slow + * (IRETQ) path to return from syscall after + * context switch. + */ + pmap_active_cpus(vmspace_pmap(p->p_vmspace), &cs); + + do_membarrier_ipi(&cs, + membarrier_action_seqcst_sync_core); + } + break; + + case MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE: + if ((p->p_flag2 & P2_MEMBAR_PRIVE_SYNCORE) == 0) { + PROC_LOCK(p); + p->p_flag2 |= P2_MEMBAR_PRIVE_SYNCORE; + PROC_UNLOCK(p); + } + break; + + default: + error = EINVAL; + break; + } + + return (error); +} + +int +sys_membarrier(struct thread *td, struct membarrier_args *uap) +{ + return (kern_membarrier(td, uap->cmd, uap->flags, uap->cpu_id)); +} diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index d383a50ce3d1..0a977ca0eff3 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -3287,6 +3287,14 @@ u_int flags ); } +584 AUE_NULL STD|CAPENABLED { + int membarrier( + int cmd, + unsigned flags, + int cpu_id + ); + } + ; Please copy any additions and changes to the following compatability tables: ; sys/compat/freebsd32/syscalls.master diff --git a/sys/sys/membarrier.h b/sys/sys/membarrier.h new file mode 100644 index 000000000000..958b769da23e --- /dev/null +++ b/sys/sys/membarrier.h @@ -0,0 +1,70 @@ +/*- + * Copyright (c) 2021 The FreeBSD Foundation + * + * This software were developed by Konstantin Belousov + * under sponsorship from the FreeBSD Foundation. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 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 __SYS_MEMBARRIER_H__ +#define __SYS_MEMBARRIER_H__ + +#include + +/* + * The enum membarrier_cmd values are bits. The MEMBARRIER_CMD_QUERY + * command returns a bitset indicating which commands are supported. + * Also the value of MEMBARRIER_CMD_QUERY is zero, so it is + * effectively not returned by the query. + */ +enum membarrier_cmd { + MEMBARRIER_CMD_QUERY = 0x00000000, + MEMBARRIER_CMD_GLOBAL = 0x00000001, + MEMBARRIER_CMD_SHARED = MEMBARRIER_CMD_GLOBAL, + MEMBARRIER_CMD_GLOBAL_EXPEDITED = 0x00000002, + MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED = 0x00000004, + MEMBARRIER_CMD_PRIVATE_EXPEDITED = 0x00000008, + MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED = 0x00000010, + MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE = 0x00000020, + MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE = 0x00000040, + + /* + * RSEQ constants are defined for source compatibility but are + * not yes supported, MEMBARRIER_CMD_QUERY does not return + * them in the mask. + */ + MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ = 0x00000080, + MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ = 0x00000100, +}; + +enum membarrier_cmd_flag { + MEMBARRIER_CMD_FLAG_CPU = 0x00000001, +}; + +#ifndef _KERNEL +__BEGIN_DECLS +int membarrier(int, unsigned, int); +__END_DECLS +#endif /* _KERNEL */ + +#endif /* __SYS_MEMBARRIER_H__ */ diff --git a/sys/sys/proc.h b/sys/sys/proc.h index 369bc607e9c7..b279839dbf8d 100644 --- a/sys/sys/proc.h +++ b/sys/sys/proc.h @@ -838,6 +838,12 @@ struct proc { external thread_single() is permitted */ #define P2_REAPKILLED 0x00080000 +#define P2_MEMBAR_PRIVE 0x00100000 /* membar private expedited + registered */ +#define P2_MEMBAR_PRIVE_SYNCORE 0x00200000 /* membar private expedited + sync core registered */ +#define P2_MEMBAR_GLOBE 0x00400000 /* membar global expedited + registered */ /* Flags protected by proctree_lock, kept in p_treeflags. */ #define P_TREE_ORPHANED 0x00000001 /* Reparented, on orphan list */ diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index de3c7780fc2c..aabcb19448cc 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -201,6 +201,8 @@ int kern_minherit(struct thread *td, uintptr_t addr, size_t len, int inherit); int kern_mkdirat(struct thread *td, int fd, const char *path, enum uio_seg segflg, int mode); +int kern_membarrier(struct thread *td, int cmd, unsigned flags, + int cpu_id); int kern_mkfifoat(struct thread *td, int fd, const char *path, enum uio_seg pathseg, int mode); int kern_mknodat(struct thread *td, int fd, const char *path, From nobody Thu Oct 26 19:07:50 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGb0R4Lr6z4y9qD; Thu, 26 Oct 2023 19:07: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 4SGb0Q4qLLz3LlC; Thu, 26 Oct 2023 19:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698347270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/gJnI3uIG92yx17uHM8enDkbK914L9Xn7Pn8jGmhadQ=; b=lWpE5n9tS/fw9iJEJ6TbvpVGt0bFd/BQXm9nWvHRbOZoB9ZAUxy77S27QoIU4GrIwQ7JZT T15UgnSpcMxm/b3jJl0gfCwl/aDFpjNpXSSub5ln8fIw5hSQ+TNGxuhpQzgWwtXN9WhODr e56SqDl0FOVKva5cbubxC3oj2DzKHUMvVEWt8+E0lcAqTe0J75HrnQ7JjzI8W9KyZZtWgG Q/qfufA4BkLkmsH/ZSgZj05EYx7+ifWvI44aQZvCgRdV7RqitOoXtSE+hy1iAVVJEkEVju sDfE9/oNSQOVd2Bwd3pQzYnFSU/zKuTIW7M+YBFel7AgrCedyJV23NYtis54rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698347270; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/gJnI3uIG92yx17uHM8enDkbK914L9Xn7Pn8jGmhadQ=; b=UtbT+BrdJm+mxM7Fe2aIz9N2XWnbwfyM51QJM7XVMDTZBqmRa5mCikV0zAWu0B+XN4pK/o k7EHPwyXM2/r7DPLPomWJwe32TOIWmWMBRkoOAf5d0/lC+OgdZew20PwAO5htvzU2a3OG3 BTT9xi9PeWscgQYLB93i+UyMrIDgbnPNKFOHcIeMrELAW01kzx30es3pHqfAp9Ou/vGyDz Ujq15JFa/g0Mj5YTQn3crDzO56YvpLUBxLJmKPDQt+ms+BIB5N9btgqTy/ZNCVvCS93t1A npuvKKgp0hmU4pN9Y8TIvp7q0G8kIG7Xg18i7kRm2vkRwN8Yn0ItTTQjxlvm6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698347270; a=rsa-sha256; cv=none; b=Z+lcwCOTCmWcwSsfnzekFa53mgloi/HbyDmBAqvLLBwCGRhxn/ZOt8RbICsmCCcZVp1SR4 Aa+ysbfQvyrMGxjWwens6RqP/Crtz3s7tO25yoVa94HR6zeGvV2vDYjNLLO+7rUcOJdMUy 4mswnl/ukoEjFagxWgK/vO6WnG7kiNy6PRHMGc1xlI5aF62mBFQabX77mvR58IMEauV7Pv b6GWsXUH3OHoTnfCbS739WSeUShQxwkHVQBH5Zxhip57CXNxtQ51fi3rkd1xT1BrhXV9h+ RDaQu3Dlp/JT8igyp/o1fID+jJOXh1LKdccl7QNnN4Vej2yIXPHAg107r+SNNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGb0Q23RHzjyd; Thu, 26 Oct 2023 19:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QJ7o6U041123; Thu, 26 Oct 2023 19:07:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QJ7oKL041120; Thu, 26 Oct 2023 19:07:50 GMT (envelope-from git) Date: Thu, 26 Oct 2023 19:07:50 GMT Message-Id: <202310261907.39QJ7oKL041120@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: 0437db781b7c - stable/13 - Regen List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: 0437db781b7cf3b011665d0e21b9a035ab3e0272 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0437db781b7cf3b011665d0e21b9a035ab3e0272 commit 0437db781b7cf3b011665d0e21b9a035ab3e0272 Author: Konstantin Belousov AuthorDate: 2023-10-26 04:06:56 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-26 04:07:29 +0000 Regen --- sys/kern/init_sysent.c | 1 + sys/kern/syscalls.c | 1 + sys/kern/systrace_args.c | 30 ++++++++++++++++++++++++++++++ sys/sys/syscall.h | 3 ++- sys/sys/syscall.mk | 3 ++- sys/sys/sysproto.h | 7 +++++++ 6 files changed, 43 insertions(+), 2 deletions(-) diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c index 26e2d93e2eb7..b2d0120da519 100644 --- a/sys/kern/init_sysent.c +++ b/sys/kern/init_sysent.c @@ -638,4 +638,5 @@ struct sysent sysent[] = { { .sy_narg = 0, .sy_call = (sy_call_t *)sys_sched_getcpu, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 581 = sched_getcpu */ { .sy_narg = AS(swapoff_args), .sy_call = (sy_call_t *)sys_swapoff, .sy_auevent = AUE_SWAPOFF, .sy_flags = 0, .sy_thrcnt = SY_THR_STATIC }, /* 582 = swapoff */ { .sy_narg = AS(kqueuex_args), .sy_call = (sy_call_t *)sys_kqueuex, .sy_auevent = AUE_KQUEUE, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 583 = kqueuex */ + { .sy_narg = AS(membarrier_args), .sy_call = (sy_call_t *)sys_membarrier, .sy_auevent = AUE_NULL, .sy_flags = SYF_CAPENABLED, .sy_thrcnt = SY_THR_STATIC }, /* 584 = membarrier */ }; diff --git a/sys/kern/syscalls.c b/sys/kern/syscalls.c index e0f0bd3b4148..22475e2ee226 100644 --- a/sys/kern/syscalls.c +++ b/sys/kern/syscalls.c @@ -589,4 +589,5 @@ const char *syscallnames[] = { "sched_getcpu", /* 581 = sched_getcpu */ "swapoff", /* 582 = swapoff */ "kqueuex", /* 583 = kqueuex */ + "membarrier", /* 584 = membarrier */ }; diff --git a/sys/kern/systrace_args.c b/sys/kern/systrace_args.c index b24cae6c1207..00e3bead052e 100644 --- a/sys/kern/systrace_args.c +++ b/sys/kern/systrace_args.c @@ -3418,6 +3418,15 @@ systrace_args(int sysnum, void *params, uint64_t *uarg, int *n_args) *n_args = 1; break; } + /* membarrier */ + case 584: { + struct membarrier_args *p = params; + iarg[0] = p->cmd; /* int */ + uarg[1] = p->flags; /* unsigned */ + iarg[2] = p->cpu_id; /* int */ + *n_args = 3; + break; + } default: *n_args = 0; break; @@ -9133,6 +9142,22 @@ systrace_entry_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) break; }; break; + /* membarrier */ + case 584: + switch (ndx) { + case 0: + p = "int"; + break; + case 1: + p = "unsigned"; + break; + case 2: + p = "int"; + break; + default: + break; + }; + break; default: break; }; @@ -11091,6 +11116,11 @@ systrace_return_setargdesc(int sysnum, int ndx, char *desc, size_t descsz) if (ndx == 0 || ndx == 1) p = "int"; break; + /* membarrier */ + case 584: + if (ndx == 0 || ndx == 1) + p = "int"; + break; default: break; }; diff --git a/sys/sys/syscall.h b/sys/sys/syscall.h index 7f65d6eb994e..26d541f4548c 100644 --- a/sys/sys/syscall.h +++ b/sys/sys/syscall.h @@ -519,4 +519,5 @@ #define SYS_sched_getcpu 581 #define SYS_swapoff 582 #define SYS_kqueuex 583 -#define SYS_MAXSYSCALL 584 +#define SYS_membarrier 584 +#define SYS_MAXSYSCALL 585 diff --git a/sys/sys/syscall.mk b/sys/sys/syscall.mk index fdab69b1291e..2be42554587d 100644 --- a/sys/sys/syscall.mk +++ b/sys/sys/syscall.mk @@ -424,4 +424,5 @@ MIASM = \ aio_readv.o \ sched_getcpu.o \ swapoff.o \ - kqueuex.o + kqueuex.o \ + membarrier.o diff --git a/sys/sys/sysproto.h b/sys/sys/sysproto.h index ab327d43a0fb..64ee28267df3 100644 --- a/sys/sys/sysproto.h +++ b/sys/sys/sysproto.h @@ -1856,6 +1856,11 @@ struct swapoff_args { struct kqueuex_args { char flags_l_[PADL_(u_int)]; u_int flags; char flags_r_[PADR_(u_int)]; }; +struct membarrier_args { + char cmd_l_[PADL_(int)]; int cmd; char cmd_r_[PADR_(int)]; + char flags_l_[PADL_(unsigned)]; unsigned flags; char flags_r_[PADR_(unsigned)]; + char cpu_id_l_[PADL_(int)]; int cpu_id; char cpu_id_r_[PADR_(int)]; +}; int nosys(struct thread *, struct nosys_args *); void sys_sys_exit(struct thread *, struct sys_exit_args *); int sys_fork(struct thread *, struct fork_args *); @@ -2253,6 +2258,7 @@ int sys_aio_readv(struct thread *, struct aio_readv_args *); int sys_sched_getcpu(struct thread *, struct sched_getcpu_args *); int sys_swapoff(struct thread *, struct swapoff_args *); int sys_kqueuex(struct thread *, struct kqueuex_args *); +int sys_membarrier(struct thread *, struct membarrier_args *); #ifdef COMPAT_43 @@ -3200,6 +3206,7 @@ int freebsd12_closefrom(struct thread *, struct freebsd12_closefrom_args *); #define SYS_AUE_sched_getcpu AUE_NULL #define SYS_AUE_swapoff AUE_SWAPOFF #define SYS_AUE_kqueuex AUE_KQUEUE +#define SYS_AUE_membarrier AUE_NULL #undef PAD_ #undef PADL_ From nobody Thu Oct 26 20:21:59 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGcdz3htXz4yF4N; Thu, 26 Oct 2023 20:21: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 4SGcdz36nVz3RGP; Thu, 26 Oct 2023 20:21:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698351719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XE2KSkIKeTUrSONsXV9hWNEtB+kh7CGxRM2oBsS0fyM=; b=coFJZ4z4MuhI2qtYnyXAh/Bh6y1KGHaAmgRUbUASn8jPkgHfB1YTxxxZ2Yfil2atqP/OSk mPcXkWwpiMRtsX+4ww/zMz2GxyADL5WKoqWI7m7AS4HEEfBbEvEfPtyU9Uqr8uj5JQ1JpN Dz8EFnGXy/R2zHyz280MjI1uT5e286agWFJAlu33vLALV2vDw5qBWnkHwjk7VfT5xYIe+T ppise6rI64lV5w6Zga7kb1PYqr84KRYop5yvZ1km9nHu7NSnTE2WA9AjNPl9OMPBVcWCl7 R+fKjXR9bXR2dBwawAmFHJClTLVdHxLCtkYaeQ3D27p1uVgfhGiLZyy3WGEUpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698351719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XE2KSkIKeTUrSONsXV9hWNEtB+kh7CGxRM2oBsS0fyM=; b=rbcB8/VgmR7FnmMyk5om4G5aFUngAb9ZxrGdb5aBJdDNKKQzMvSVzlHieWO9yWpMZenL0+ N4Pkxj8QIZNx+HqsEPalilXv5miAk13w5wMYNkC/cjVJ4ovZ7vq+8N8WG5QVCgWAamiAys fLRlzXE+qARI+ug5BGpzY/Okc63c6RvKdNQZjzyVotm4+NmlIjkyFEyzFDbP49Uj5qK1ug 98O6CreKlg3sbS9sjRn35Exjgb0NveIZkBhF2c+Sy7aB8Wj2E1fTert3a39qjG4iLTrIsd 8HaykuI2Y4yEHmXe9W8E9Xiaaxi9e3l266Q1Tq90/5muA6clcOG6TNpXfGQoSw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698351719; a=rsa-sha256; cv=none; b=jSknGDJ/+7gnniDyZ1OmKwNrMHjabb28r6fIW+PDQZwALrIQp7Rmhi8Vt9OIQ5wvih41Pl 1ixi2O2qWqRE9hseddbJHuQoNsV8xNrOtglMhHf3D+x6XGvmSV5cp7k+Aer6lYoZ9PxXZk Ymt86Bh/T8LQY8qN6TOZHhwg3mJ09TJkfZLmTtG/t8kU4nOa6J38syGzK2pi+LFKSnl1/7 z9j7cMPyeSOoB+fCg8fvev+C4vkPB7RcDTIzQaq4oA9M9boGW69taL4reIsRMQgnA46lTH z9uP2psgnquM2B3kFY143lMEJv9vllR47Ewy6Eof5fWKgXEAPM6Bu0g7Tzb7+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGcdz29PyzlFQ; Thu, 26 Oct 2023 20:21:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QKLxSJ070976; Thu, 26 Oct 2023 20:21:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QKLxm9070973; Thu, 26 Oct 2023 20:21:59 GMT (envelope-from git) Date: Thu, 26 Oct 2023 20:21:59 GMT Message-Id: <202310262021.39QKLxm9070973@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: 6f1ccbd58790 - stable/14 - bhyve: fix arguments to ioctl(VMIO_SIOCSIFFLAGS) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: 6f1ccbd587907c5eaf05ddd77d1e9f5e16b7aedc Auto-Submitted: auto-generated The branch stable/14 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6f1ccbd587907c5eaf05ddd77d1e9f5e16b7aedc commit 6f1ccbd587907c5eaf05ddd77d1e9f5e16b7aedc Author: Gleb Smirnoff AuthorDate: 2023-10-26 09:59:21 +0000 Commit: Mark Johnston CommitDate: 2023-10-26 20:21:22 +0000 bhyve: fix arguments to ioctl(VMIO_SIOCSIFFLAGS) ioctl(2)'s with integer argument shall pass command argument by value, not by pointer. The ioctl(2) manual page is not very clear about that. See sys/kern/sys_generic.c:sys_ioctl() near IOC_VOID. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D42366 Fixes: fd8b9c73a5a63a7aa438a73951d7a535b4f25d9a (cherry picked from commit f407a72a506d2630d60d9096c42058f12dff874e) --- usr.sbin/bhyve/net_backends.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/net_backends.c b/usr.sbin/bhyve/net_backends.c index 99781cfdcbb6..de6afab53854 100644 --- a/usr.sbin/bhyve/net_backends.c +++ b/usr.sbin/bhyve/net_backends.c @@ -238,7 +238,7 @@ tap_init(struct net_backend *be, const char *devname, goto error; } - if (ioctl(be->fd, VMIO_SIOCSIFFLAGS, &up)) { + if (ioctl(be->fd, VMIO_SIOCSIFFLAGS, up)) { WPRINTF(("tap device link up failed")); goto error; } From nobody Thu Oct 26 20:29:03 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGcp80cHKz4yFMr; Thu, 26 Oct 2023 20:29:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4SGcp805cnz3RLW; Thu, 26 Oct 2023 20:29:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698352144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lAl2iyVubCbQXUQI6PfZsPDN9neZOktLTRDiz0TLt2Q=; b=jHavH+4rix87V/UVrrdRS7FzcTWSKHj2E4q/kJA79oMPMCSJN0ORRcTv86cfRqJn720X5f EzuQL++ic5heSCj7bSabIW81uXAHnH2UZ7y/ZiST7Vd3lDyxIh0viQRNC7eJwmtoU/QUVL XRXQfCdG/DMkd/2z541jahsrvPQedEtJn0LrHk2HXdQSWfojFuHTbd8r9HkxFxEjJ7iE7C ssFmafx6cXB/GZZ6rJjlwIhFfBxOQM4vqAqPNnjJaC72X1eYubqaFzE9It7Rk4sBXMjepo OOtmC/TP83D7DepKlbaHx5YmSSMoWmHioFLbmHzpNVczaQto18h9Z/bTZl5zdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698352144; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lAl2iyVubCbQXUQI6PfZsPDN9neZOktLTRDiz0TLt2Q=; b=sWCx1qYfIG9PorAtRhIWAgzXCP3xtGWhgkWQJqZcrFDQL+M1G6T7HEcDfScOQYE/6SEG0J lelg12ffq/1yc4esokiX0bIfQ6hzd0pwDwl8CTtgkiZv0rbg9II1TG1yVIvFyxkRHS5umZ 4+HdRLMJvRE7UZ+BXMWw3R3p6JCMetp+GBHzBvCNyUF0onUvIeoT1NVLlC1q2Wiu3bseyV S+LUvJJr2WjmbeRMHo5gpYAhkKfOhZgWLrNYwPYPfABx605rl88Nz611H82h5jZECbW+as Fy+9myEi9F9gZfJnXQWWh57WY6vHHQAi1bOK4Yf4zqh/j2OX2cyV2E3c3eAwGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698352144; a=rsa-sha256; cv=none; b=ZJpfPuqYTMta3rKHQRyfN/sPfzcVwDX4PRy01w9I9d2vEcirUI60GqGoNZpb4b/WQkQOit G1r7tyj7t6rmtEEvUOPrkPMpgTtPs9PFUYfpS5hukIp6wO9AM63NP7WCrbi5oOaEert8EL zWsVhrKQ5EtGGnwml136ZxGOF0+S3NNGsCBuIbSUApDF4BwDX2NPSxDR9WDOpd1lFVTese qcb1N8RfQZQyjTGejeRooKmLz/a5P2lRMXUPpSktp/zqrSXkieGj4iaDgCtvdS2fJ3i04T JSESuGSZ5MdNf/VVXeoDOdBzmE0rxosPrlU4Sy9PVuXuQ+nYLIzQhi5zSI7A8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGcp76GGnzlj3; Thu, 26 Oct 2023 20:29:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QKT3g7074206; Thu, 26 Oct 2023 20:29:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QKT346074203; Thu, 26 Oct 2023 20:29:03 GMT (envelope-from git) Date: Thu, 26 Oct 2023 20:29:03 GMT Message-Id: <202310262029.39QKT346074203@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: abf5807ffc36 - releng/14.0 - bhyve: fix arguments to ioctl(VMIO_SIOCSIFFLAGS) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14.0 X-Git-Reftype: branch X-Git-Commit: abf5807ffc36516976426a83d94caf135d3ea814 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=abf5807ffc36516976426a83d94caf135d3ea814 commit abf5807ffc36516976426a83d94caf135d3ea814 Author: Gleb Smirnoff AuthorDate: 2023-10-26 09:59:21 +0000 Commit: Mark Johnston CommitDate: 2023-10-26 20:28:23 +0000 bhyve: fix arguments to ioctl(VMIO_SIOCSIFFLAGS) ioctl(2)'s with integer argument shall pass command argument by value, not by pointer. The ioctl(2) manual page is not very clear about that. See sys/kern/sys_generic.c:sys_ioctl() near IOC_VOID. Approved by: re (gjb) Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D42366 Fixes: fd8b9c73a5a63a7aa438a73951d7a535b4f25d9a (cherry picked from commit f407a72a506d2630d60d9096c42058f12dff874e) (cherry picked from commit 6f1ccbd587907c5eaf05ddd77d1e9f5e16b7aedc) --- usr.sbin/bhyve/net_backends.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/net_backends.c b/usr.sbin/bhyve/net_backends.c index 99781cfdcbb6..de6afab53854 100644 --- a/usr.sbin/bhyve/net_backends.c +++ b/usr.sbin/bhyve/net_backends.c @@ -238,7 +238,7 @@ tap_init(struct net_backend *be, const char *devname, goto error; } - if (ioctl(be->fd, VMIO_SIOCSIFFLAGS, &up)) { + if (ioctl(be->fd, VMIO_SIOCSIFFLAGS, up)) { WPRINTF(("tap device link up failed")); goto error; } From nobody Thu Oct 26 20:39:11 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGd1q5qLYz4yFjN; Thu, 26 Oct 2023 20:39: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 4SGd1q5Grzz3Sy8; Thu, 26 Oct 2023 20:39:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698352751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=htNyb1Cwo//dhFEltxTTZko1IjS64omwZpiOGNjRPsE=; b=VThQemXGhf12ErMzoWETYP/sziENmDQnmaNlUHFtWJcFdrCuC6BwzQydLk5P4sxNab0u9O xAcGXi/pLyXuwmbfuy+JedLdMo3r343k2un8WulTniaLUP/0vllZp27cDAyKjS1mhDET7m x0elcrFGOI/fqnKEbgateQ6XUUMhiLwjzPFgFES3B0CV4nOMfZIMjOZauD6kWil7tSmSQT vE9U4EAClGA7Eo8FhCBtOp25i5Sg8NvDsHPwkRTqtlpeY2Gsv+5/ErkZUtdooLYmm9M5XS luqivZb7wAXoCOc7HzVwDYZptjIjzBZ/6VQd0ZcSHV83K6IiHTubD6zn7xYbbw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698352751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=htNyb1Cwo//dhFEltxTTZko1IjS64omwZpiOGNjRPsE=; b=owHrMr9vCN9r+R7YX9HEk6+Gj8X6z98KvsSqq7LUDIuFuFCwoSPBg2RBp9zMF3l09m5AA1 lKkb3SldmEaD3A3pw8AtztCQyvoJI/uMh9idQInM/OANcKn+9HTxl6GTmYJQ4UCWsRdt/4 VLEhE2MVdha6MVqVbHgWZjfF/BhLN3TGJI6PEEqBLSTZh4YzyGGL2mVctHrD4DtQTa6WrE mJYwVOyXnpv05xwbchLghKOxnbG5YQkKn4YECgOUjzzeEiav87cG2OMAOc1Vv7ZE548MQ2 jJ60hrLf6gVBsgxURf4jdDbVXwCtR2IfuPOYPnBUPFiyuOi3w2GohEGvz8conA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698352751; a=rsa-sha256; cv=none; b=PNyxA9YN/RO9lIueCLKWg5Q7caV+bEGXNUy9cXEdxGjAq6pt2+H+umpbM18nySt+Vx+wOD nCPRPOin1TjkiZPgR/mrp0ZsKVvh5/TEwuC0uk6/f9bw7VOps0lkgifLpr9DoP9MvxUwyr 3IAnsZ9nAlsvnA6sYWKw6EIk3Cf9SVVNi6fZzKgOrAb6qBpwWxZb74XoDZDHwEp6o2Chgs TCBsGKe39bUO+XCJdzlBkjaeJTVQZUCAkZJFSrTU4ueuOfMCo3J/VWUZ3bt1MP1mRbpjEb q/coRo2QpkkE+L5WHYWq392Jr32QPxAunrJT907WVS947o07aNxcZzBWRlrNlQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGd1q41m3zm5t; Thu, 26 Oct 2023 20:39:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QKdBQh091458; Thu, 26 Oct 2023 20:39:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QKdBhn091455; Thu, 26 Oct 2023 20:39:11 GMT (envelope-from git) Date: Thu, 26 Oct 2023 20:39:11 GMT Message-Id: <202310262039.39QKdBhn091455@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 8888b14f1b77 - stable/13 - libprocstat: style: space after switch List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8888b14f1b771e65013601801a82b27ca539a5e0 Auto-Submitted: auto-generated The branch stable/13 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=8888b14f1b771e65013601801a82b27ca539a5e0 commit 8888b14f1b771e65013601801a82b27ca539a5e0 Author: Brooks Davis AuthorDate: 2023-10-26 20:38:40 +0000 Commit: Brooks Davis CommitDate: 2023-10-26 20:38:40 +0000 libprocstat: style: space after switch Style demands a space after the switch keyword. Noticed reviewing code in CheriBSD that propagated the style bug. Reported by: markj Sponsored by: DARPA Reviewed by: kib, markj Differential Revision: https://reviews.freebsd.org/D42041 (cherry picked from commit ccac440f7cbb013de41aa3933f3f7be77225c44f) --- lib/libprocstat/libprocstat.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index 3a676c3e0ffc..d27c9f773151 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -350,7 +350,7 @@ struct filestat_list * procstat_getfiles(struct procstat *procstat, struct kinfo_proc *kp, int mmapped) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: return (procstat_getfiles_kvm(procstat, kp, mmapped)); case PROCSTAT_SYSCTL: @@ -1530,7 +1530,7 @@ procstat_get_socket_info_kvm(kvm_t *kd, struct filestat *fst, /* * Protocol specific data. */ - switch(dom.dom_family) { + switch (dom.dom_family) { case AF_INET: case AF_INET6: if (proto.pr_protocol == IPPROTO_TCP) { @@ -1603,7 +1603,7 @@ procstat_get_socket_info_sysctl(struct filestat *fst, struct sockstat *sock, /* * Protocol specific data. */ - switch(sock->dom_family) { + switch (sock->dom_family) { case AF_INET: case AF_INET6: if (sock->proto == IPPROTO_TCP) { @@ -1964,7 +1964,7 @@ procstat_getvmmap(struct procstat *procstat, struct kinfo_proc *kp, unsigned int *cntp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: warnx("kvm method is not supported"); return (NULL); @@ -2069,7 +2069,7 @@ gid_t * procstat_getgroups(struct procstat *procstat, struct kinfo_proc *kp, unsigned int *cntp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: return (procstat_getgroups_kvm(procstat->kd, kp, cntp)); case PROCSTAT_SYSCTL: @@ -2147,7 +2147,7 @@ int procstat_getumask(struct procstat *procstat, struct kinfo_proc *kp, unsigned short *maskp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: return (procstat_getumask_kvm(procstat->kd, kp, maskp)); case PROCSTAT_SYSCTL: @@ -2237,7 +2237,7 @@ int procstat_getrlimit(struct procstat *procstat, struct kinfo_proc *kp, int which, struct rlimit* rlimit) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: return (procstat_getrlimit_kvm(procstat->kd, kp, which, rlimit)); @@ -2296,7 +2296,7 @@ int procstat_getpathname(struct procstat *procstat, struct kinfo_proc *kp, char *pathname, size_t maxlen) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: /* XXX: Return empty string. */ if (maxlen > 0) @@ -2369,7 +2369,7 @@ procstat_getosrel_core(struct procstat_core *core, int *osrelp) int procstat_getosrel(struct procstat *procstat, struct kinfo_proc *kp, int *osrelp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: return (procstat_getosrel_kvm(procstat->kd, kp, osrelp)); case PROCSTAT_SYSCTL: @@ -2509,7 +2509,7 @@ Elf_Auxinfo * procstat_getauxv(struct procstat *procstat, struct kinfo_proc *kp, unsigned int *cntp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: warnx("kvm method is not supported"); return (NULL); @@ -2623,7 +2623,7 @@ struct kinfo_kstack * procstat_getkstack(struct procstat *procstat, struct kinfo_proc *kp, unsigned int *cntp) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: warnx("kvm method is not supported"); return (NULL); @@ -2752,7 +2752,7 @@ fail: struct advlock_list * procstat_getadvlock(struct procstat *procstat) { - switch(procstat->type) { + switch (procstat->type) { case PROCSTAT_KVM: warnx("kvm method is not supported"); return (NULL); From nobody Thu Oct 26 20:39:12 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGd1r67lDz4yFpv; Thu, 26 Oct 2023 20:39: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 4SGd1r5XMdz3T6K; Thu, 26 Oct 2023 20:39:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698352752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JETW80MqBT+TnU1u8L4IB6qkwrqlBWsHp63Eh4CG6hI=; b=voP072H+aNKaUy4JHmNh2fRpAZ89mtsMR/HoUWU75F7LWSJ2lo/bMyqlRAMZQfeHTkt3nz iniQcGxb7vuxlsvoPcG6xPA4aCepAM8wbyQgG5shwWPIuXE4WNsTMy64ZikoctfHGKfzPp bYPmZeCoW8HN5jqJbwSVnXKUt4mvBuKeH6eL8TO+BaKkInJlJLDOe+hsI7VlwOMrMulmlp 7bprj1XcB2jlua8iNTEB36BHBOfHvPN+R7+00F5rgjU1MA+DX+oqIeLTe8oKFrvj9WcHIi BJqZUGmrvLrfWwDpvdGwZDasIoVlR735JY7cPP8CBfgQx+strILln0bhR0dabw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698352752; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JETW80MqBT+TnU1u8L4IB6qkwrqlBWsHp63Eh4CG6hI=; b=ekdywGnxEl5UjQzs/4LpOsn2fn4CI2n6GY7kCIP3/St4zeRNlXqsuRC2UjOykId+nCbD+B CGohTWWe2QrZnFxjJG9Esk+MCjPImRZZdO/jECE1SPsVo8t4eRvrh+3dnviJN9veev1PYG gRMw3UKyra1HTluMlg9pluHS6ONIjy29ow8L4kn5wiMitPVP8q4yfnxF/DKofnFcWtJj3N Xmet7eP6NWy6Jp9o7QVpARPPhGQsGtbiEtBKGAbPJemOsJVqnn3WUuds0xJkhD/EpNsCze EmZLz3H8QuN8Rl4sMdU6INzyHMTxH6NiEMCQ/uLLW67eVC+cSZKLZ62g1ARn+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698352752; a=rsa-sha256; cv=none; b=lPquzjwxunStPOoXllvEY+wjcAtXp/1mWi7EglzokMfqesFTb3nJNHiXQ/uwuUDtrCCcOm nWSkt0y4kvjXqJ8lUuNhecnVKscSzRWdPGSunhDTwpShLxFCGzV+Dbppfj06N/Fds2Jc0w pOfL3FnxmLSnM1VfpkxYivrU7hGXLlJPpjsjqVBBOSGfVX4rfJlDyB34GT344rPwt3OUbu w0e39vwLLA1OgI44/AUbBpZnJoJhHYbeW7z9K403R9+8z7rVTDap90euqxl3vH7YOC0LjU H3lh2Bug+U/LzawFtDef+deky/cqufaR+965WuarBIYdakNT8IaU762By7LkTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGd1r4dYlzldJ; Thu, 26 Oct 2023 20:39:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QKdCDO091506; Thu, 26 Oct 2023 20:39:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QKdCAi091503; Thu, 26 Oct 2023 20:39:12 GMT (envelope-from git) Date: Thu, 26 Oct 2023 20:39:12 GMT Message-Id: <202310262039.39QKdCAi091503@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 9fcbd4c0d19c - stable/13 - libprocstat: simplify auxv value conversion List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 9fcbd4c0d19cdbfa1fb4711c00c9c9cf84dbefb0 Auto-Submitted: auto-generated The branch stable/13 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=9fcbd4c0d19cdbfa1fb4711c00c9c9cf84dbefb0 commit 9fcbd4c0d19cdbfa1fb4711c00c9c9cf84dbefb0 Author: Brooks Davis AuthorDate: 2023-10-26 20:38:41 +0000 Commit: Brooks Davis CommitDate: 2023-10-26 20:38:41 +0000 libprocstat: simplify auxv value conversion Avoid a weird dance through the union and treat all 32-bit values as unsigned integers. This avoids sign extension of flags and userspace pointers. Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42198 (cherry picked from commit 9735cc0e41825bb9e95d16433d381ffe4c190f38) --- lib/libprocstat/libprocstat.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index d27c9f773151..0d7a0bcc2649 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -2417,7 +2417,6 @@ procstat_getauxv32_sysctl(pid_t pid, unsigned int *cntp) { Elf_Auxinfo *auxv; Elf32_Auxinfo *auxv32; - void *ptr; size_t len; unsigned int i, count; int name[4]; @@ -2451,8 +2450,17 @@ procstat_getauxv32_sysctl(pid_t pid, unsigned int *cntp) * necessarily true. */ auxv[i].a_type = auxv32[i].a_type; - ptr = &auxv32[i].a_un; - auxv[i].a_un.a_val = *((uint32_t *)ptr); + /* + * Don't sign extend values. Existing entries are positive + * integers or pointers. Under freebsd32, programs typically + * have a full [0, 2^32) address space (perhaps minus the last + * page) and treating this as a signed integer would be + * confusing since these are not kernel pointers. + * + * XXX: A more complete translation would be ABI and + * type-aware. + */ + auxv[i].a_un.a_val = (uint32_t)auxv32[i].a_un.a_val; } *cntp = count; out: From nobody Thu Oct 26 20:39:13 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGd1t1rqYz4yFjX; Thu, 26 Oct 2023 20:39: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 4SGd1s6FkMz3TBw; Thu, 26 Oct 2023 20:39:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698352753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g3i9QPbFafHPgntWqKAR6UCxNv971L66ENduTHU1OUQ=; b=xht+nczeJnFFdmogciyszdBqyEdM9JmO4Fy7SP1WgqtP9WHxynUG2A/V+A3iVkBphAaoTc 9gli1lnFTOviC0YVMQhW4sTuP/IDvAmiFjbvdx867BGvkm+fxc250bdbEmYT2mNwecdQ5k hv3/B8cnr21lHphxkry8/wVN3Fb8qlBG2nwBdT4BChADgeMc1pt4tY8r7TPoyFUOhUhGNB QmSuhf/TmK498DjdxkVjFCaf3KoMGEkH/CQgRnbY/K0KaWklmszQvM9WAntxbo0gN3Dkit HAqlm9clWuffbpWm/l9BVPe4x7h87hScvvTJ4k3f5RvCAYEaj0mLfwmtt3TUDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698352753; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=g3i9QPbFafHPgntWqKAR6UCxNv971L66ENduTHU1OUQ=; b=l4PwUINslqQTj+HU3SOa7GkiXBqXnkGB8c0FY1T0aRQhwD/2+LfFihQ8qUMUhZgA5xxAwh AoJOzIqtmcde0MoMbKIRM8cZvl0oe/zE9jWJV0Wne+L2xnAwx8oWYWMLF/6sU8UYOn2U9y r1FXedUdPAWYvsqHpcKvzEeNAQ1tJYAu0V8xztM5BfSwwhvKmS2I/sK1rwp2eHHuOhfMma SwHy/VMqH4ARYfody6mQb/1jvdSTNyLVEDO7HAUptqkWjufME+Dr0g2qmcO/1r8ejY2GSj 0Qt+FKksMQ+/gswirFAFz4gn7YCqImwhGfLbm7JMhQnHMgmhNri7sYkwnOAIRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698352753; a=rsa-sha256; cv=none; b=KKPqjpmpC+1EmcFL71JTNeALjtRP4J4hyI99GwQl7wdCSLK/jOh8ldFcfHDkJ8RPtNIP2n JKEfGAh1wfq/Bsh/dx3VtbuLt/FZ/fGcx15MLjN7ja0j9eauvqfqyzmtZQaFpn14NFkx3H jud42TcwCRNZ9j2F+XSYP2E9KG2IixMALwmiO8Krxh6Eo/k8DENFxPtkBHUgQlM9YDrXWu lGqPvDQ7+anKfgud/rFH+ZzB4px+bzjfG8gUWai4WAHYuuggkeg2Q4j0WuOgcBRxT7l9wo ZDZM6CtdAyEDcSo3xIs7OIyusJ2mUj+3uPhMDXZx5TLXc4oTfqjZAI2tI8PIdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGd1s5McKzm47; Thu, 26 Oct 2023 20:39:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QKdDpF091549; Thu, 26 Oct 2023 20:39:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QKdD3S091546; Thu, 26 Oct 2023 20:39:13 GMT (envelope-from git) Date: Thu, 26 Oct 2023 20:39:13 GMT Message-Id: <202310262039.39QKdD3S091546@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: efeba8da1d2d - stable/13 - libprocstat: make sv_name not static List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: efeba8da1d2da9d2c471936415cfad5f63daae76 Auto-Submitted: auto-generated The branch stable/13 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=efeba8da1d2da9d2c471936415cfad5f63daae76 commit efeba8da1d2da9d2c471936415cfad5f63daae76 Author: Brooks Davis AuthorDate: 2023-10-26 20:38:41 +0000 Commit: Brooks Davis CommitDate: 2023-10-26 20:38:41 +0000 libprocstat: make sv_name not static Making this variable static makes is_elf32_sysctl() and callers thread unsafe. Use a less absurd length for sv_name. The longest name in the system is "FreeBSD ELF64 V2" which tips the scales at 16+1 bytes. We'll almost certainly have other problems if we exceed 32 characters. Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42199 (cherry picked from commit 72a4ee26a7c665ae1c31abe1c6feeaa7ccaba140) --- lib/libprocstat/libprocstat.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index 0d7a0bcc2649..b23a0a5b2120 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -2395,7 +2395,7 @@ is_elf32_sysctl(pid_t pid) { int error, name[4]; size_t len, i; - static char sv_name[256]; + char sv_name[32]; name[0] = CTL_KERN; name[1] = KERN_PROC; From nobody Thu Oct 26 20:39:14 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGd1v0tHPz4yFwQ; Thu, 26 Oct 2023 20:39: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 4SGd1v0JvLz3TN4; Thu, 26 Oct 2023 20:39:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698352755; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OTsb2L1LODZZav1AMB6YX4WaXAMGiCa1waJ4KDZu/3M=; b=LCyUaWiArx2IWjhty3kdb1sQL2/3z1pD/aA5DWgVS0aLZgdrlvLko98jKERwnnDjy4zObp YC/pQZL0rkMP9X/QhbCSWHeRbn12mtMZz/pex6o0VnSb+CoxcsI1vZNfRPy+P2h+Im5kaN N/ctvOo4+LLZ8pV9KfEURD84zd5+nhK8Hkxb/a1NMtYUy6gLQlDekDnZQCPZo0061hj/6m RLXcehHvkk7oCbXGp9fc5l8W2ocI5hxe6owJ5jMES1hCozWv1xgtrq/SYVYINku35lt9Gf 5gaJYJRL0j4WHFED3jAefhQhPcN5hoxMgQZnen9Mbp4E+6BSu9C4KgV/Um6bZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698352755; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OTsb2L1LODZZav1AMB6YX4WaXAMGiCa1waJ4KDZu/3M=; b=YgkIcfm5rrrYIBq5NuBkfgI0eSRAO5WmjAGfF3U62sMwmSmB62B+MP1HCYYV/jCQ4eY1AU JlgdlOgUGWCQtk+gUNCagG0Pej1MPDBvZAixQSL5zugWrcyI3EitNCBa35nS6av6OhWEx/ jLkYRrpMrh8jOPVNz7Ti1Wk3v5hEXqYyjJkIQ/TiKzbq64+BzUnKnq7aB6oDYPndQgV31H tnNZv7tY4WLQpsHGL4ASRlG6+pTqr749xUhxoLeX6joJ0RNzhCr6Fc/IjM0cJxyHO5BMKS v2YCqu1d2FAGSz2g0KZh/KMU9RqahY0FNi80YYwX9MRYvAnHhCphB7YKzoBmcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698352755; a=rsa-sha256; cv=none; b=RJVvpxYbYfyXE+uV8wKbrUaUgfTMzAxMxBSIJP2+0FfGODInRP1zxgKSnBYPZDHyFseC9j llOjwyBNM89Ag/M8DYWf13S0CzF9DJNxP7YZGQemXkX79tRrKXESf6MWXL6tj8aBUOW9/l qOzUYquNdiR9bCiP/oY4ARkhgvi6SIs9iCq2aFoyXpwWJSsVrPASs7vhIFauvZxfc2LYZb Oni73ELeUNMi24tTgY4TSJvgKpknJQ44GEoV923MXsJzGKT2qSFkzFWQ1eDQXC3ozYS/sF 1OMY2aIzmF2OUjhsZ8oF3ommzZNYdf0ZyTDrJKM0K16VKkeI5ivxbh/WNaTEEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGd1t6Pt7zlV7; Thu, 26 Oct 2023 20:39:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QKdE9d091597; Thu, 26 Oct 2023 20:39:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QKdEAg091594; Thu, 26 Oct 2023 20:39:14 GMT (envelope-from git) Date: Thu, 26 Oct 2023 20:39:14 GMT Message-Id: <202310262039.39QKdEAg091594@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: ea7f064a780b - stable/13 - libprocstat: copy all the 32-bit auxv entries List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: ea7f064a780b6f6bb023757a5eb8b997bd272687 Auto-Submitted: auto-generated The branch stable/13 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=ea7f064a780b6f6bb023757a5eb8b997bd272687 commit ea7f064a780b6f6bb023757a5eb8b997bd272687 Author: Brooks Davis AuthorDate: 2023-10-26 20:38:41 +0000 Commit: Brooks Davis CommitDate: 2023-10-26 20:38:41 +0000 libprocstat: copy all the 32-bit auxv entries Use source struct size not the destination struct size so we copy all the auxv entries, not just the first half of them. Fix a style issue on an adjacent line. Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42200 (cherry picked from commit 8f06fabe39ac3ebca4ab448a456945008305a23f) --- lib/libprocstat/libprocstat.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index b23a0a5b2120..f0542587cbdb 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -2437,8 +2437,8 @@ procstat_getauxv32_sysctl(pid_t pid, unsigned int *cntp) warn("sysctl: kern.proc.auxv: %d: %d", pid, errno); goto out; } - count = len / sizeof(Elf_Auxinfo); - auxv = malloc(count * sizeof(Elf_Auxinfo)); + count = len / sizeof(Elf32_Auxinfo); + auxv = malloc(count * sizeof(Elf_Auxinfo)); if (auxv == NULL) { warn("malloc(%zu)", count * sizeof(Elf_Auxinfo)); goto out; From nobody Thu Oct 26 20:39:15 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGd1w1ng2z4yFyP; Thu, 26 Oct 2023 20:39: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 4SGd1w1P5lz3TCw; Thu, 26 Oct 2023 20:39:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698352756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xDIGF93MN3WVTYdi+FPyCRBbvW8lGLkvswlgp1YD6AU=; b=A+DFAIZutfm+tRX3durvNBLLtvRXPc6dNPi1nEUua4MqVqAb6bsWiD3/hRCPX0zQ0WX8tE Y5V/pSXpUagpfDHfjRDAbZafyJEtuYP6kBo2J+Yvk5rwxxH3LqpuPsjmRqRM5/SRCz8hzl S12VmvbJeExKfuYTGg6U9lvVQg13az0DH+dBsTVG90WrnZ6GZa0+gVY6zeZ/LxzcyL8GJp b0DBXyO4Fpttt/D9oW3KAd+pByuOeRimu7aH+qGD4Mme3hs1dF09MtD7I4mm52PVstzRRK glNfZKqbdMH+0epj9N8zwG9VDO+3I3HAx7oSEEpcS3UxkdRdttHRd2gIkV05gw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698352756; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xDIGF93MN3WVTYdi+FPyCRBbvW8lGLkvswlgp1YD6AU=; b=Qp8LnrGRvdh6lbjrhtm5Ccha2v9Nh7YtZWmi7jzkube1YLNu1rYfOXQuiFzYW7wlBLN1eR isOD5pKR5s6eLQvUTUkt0HI8WdlWusIPU1ZdnZX7NEWgj321c4vYWQsBXhPlw0qe9Jeqrf EnWL7zVugye0toNi62+Jqoizs4B1jTIMkSLsmud1s4DF7edAERjJgP/n0c2gc1fT/Ggc+q g8rTTW62BKuYpplMIfRtfVTtc/QG9DcZ/huO2WqH1BJESj8j1/3L8nuury9i2Inuhu+AiH Rn+VtZZPDZcJ7pRxlG+uRhnNB0VMykSP44E1+Iz3Dj4CqtnOsgPwooU9NgkJZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698352756; a=rsa-sha256; cv=none; b=UdmmaKiD4mPKlQRoYqhji/pqtTcre4hysVNQl1gmA193TsmzmG/4iy7szlrg2ascNkbVsL CftWlq5Tm1LaHiLsCDHW/vZCAAgBDOEorrsFBwSHoL8BG3hGj8mUpIVAQkWkENTlsxYfSg nEtbvlgMMFfsIs9Tw7SYn7HVCxVcLI+2PTK+JBo/mDGIwZOBxtYgBU/V8c4b1H4BOlTGdC sHy5smHjnQgCJGbs+n8hchdSal/jwUrY5BnY9v4yfrYtGxRyOBf1zXibyJjRUd52wkojbb KHFjCXfvri1j4Zd9GZl7CCFl191bak12wMmG5BRaNljbjEoNx9xZH7/RN1jRfw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGd1w0NBBzlsd; Thu, 26 Oct 2023 20:39:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QKdFd4091642; Thu, 26 Oct 2023 20:39:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QKdFml091639; Thu, 26 Oct 2023 20:39:15 GMT (envelope-from git) Date: Thu, 26 Oct 2023 20:39:15 GMT Message-Id: <202310262039.39QKdFml091639@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Brooks Davis Subject: git: 302ff7e6aff0 - stable/13 - libprocstat: improve conditional for 32-bit compat List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 302ff7e6aff0da1ea3b4de79940aac8103e4bb9c Auto-Submitted: auto-generated The branch stable/13 has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=302ff7e6aff0da1ea3b4de79940aac8103e4bb9c commit 302ff7e6aff0da1ea3b4de79940aac8103e4bb9c Author: Brooks Davis AuthorDate: 2023-10-26 20:38:41 +0000 Commit: Brooks Davis CommitDate: 2023-10-26 20:38:41 +0000 libprocstat: improve conditional for 32-bit compat Include support for translating 32-bit auxv vectors on non-64-bit platforms that aren't riscv (which has no 32-bit ABI support and probably never will). Reviewed by: markj Sponsored by: DARPA Differential Revision: https://reviews.freebsd.org/D42201 (cherry picked from commit 248fe3d3483cb3ec2c78dd31dc02a467060a6577) --- lib/libprocstat/libprocstat.c | 6 +++--- lib/libprocstat/libprocstat.h | 5 +++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/lib/libprocstat/libprocstat.c b/lib/libprocstat/libprocstat.c index f0542587cbdb..936bf867328a 100644 --- a/lib/libprocstat/libprocstat.c +++ b/lib/libprocstat/libprocstat.c @@ -2384,7 +2384,7 @@ procstat_getosrel(struct procstat *procstat, struct kinfo_proc *kp, int *osrelp) #define PROC_AUXV_MAX 256 -#if __ELF_WORD_SIZE == 64 +#ifdef PS_ARCH_HAS_FREEBSD32 static const char *elf32_sv_names[] = { "Linux ELF32", "FreeBSD ELF32", @@ -2467,7 +2467,7 @@ out: free(auxv32); return (auxv); } -#endif /* __ELF_WORD_SIZE == 64 */ +#endif /* PS_ARCH_HAS_FREEBSD32 */ static Elf_Auxinfo * procstat_getauxv_sysctl(pid_t pid, unsigned int *cntp) @@ -2476,7 +2476,7 @@ procstat_getauxv_sysctl(pid_t pid, unsigned int *cntp) int name[4]; size_t len; -#if __ELF_WORD_SIZE == 64 +#ifdef PS_ARCH_HAS_FREEBSD32 if (is_elf32_sysctl(pid)) return (procstat_getauxv32_sysctl(pid, cntp)); #endif diff --git a/lib/libprocstat/libprocstat.h b/lib/libprocstat/libprocstat.h index 0df01817663e..3d30b4db4018 100644 --- a/lib/libprocstat/libprocstat.h +++ b/lib/libprocstat/libprocstat.h @@ -102,6 +102,11 @@ #define PS_FST_FFLAG_EXEC 0x2000 #define PS_FST_FFLAG_HASLOCK 0x4000 +#if !defined(__ILP32__) && !defined(__riscv) +/* Target architecture supports 32-bit compat */ +#define PS_ARCH_HAS_FREEBSD32 1 +#endif + struct kinfo_kstack; struct kinfo_proc; struct kinfo_vmentry; From nobody Thu Oct 26 21:38:19 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGfL417v0z4yJxr; Thu, 26 Oct 2023 21:38: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 4SGfL375jTz3bCn; Thu, 26 Oct 2023 21:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698356300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f5/ZStNOU3IE4GlaZvGT0QXl2/RKpN7Zkt6wOTVAdX4=; b=ndtGRM1UJY+/GX3/+yB/1HXtNWzIyIDCp2yVar/ruCOPd6m6hX0fTZiYbPS3MOu0SOu83M 8FMvaxYmcmOLZuI1iTi70LDtj4Bmzqv2rmQk/q5CElUL3aqdfxNg6xSrbKeeZiMw5egrHn Kz5uoyHptMENDiS8kH82iOkPiL8JJrAMevfUmvzJXVNe4gr9V5OCBCSJ5ihL7uYtS3mvqq 1EfrWJXBrTtzEAoFvuq7bkBb2uN26o+L2LBnJxAgLiGbAkdrBpSnR3BEe4FMGmUo7HaXyN XwVY1rsfBun2AYD+jMSN5/w7931U0yMvfcyIJBHSBVwhy42Oa2rWQ4A8azH3gg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698356300; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f5/ZStNOU3IE4GlaZvGT0QXl2/RKpN7Zkt6wOTVAdX4=; b=IILQnS8JWbC/SvFXIjP5tTFaFVtppEOFSlOIkbzkZrDEeJUSWzBRc3JcGPiLTwC39ETSUP yz64oEUK5qDFd69icWYj5jua7nNIGtwekmvybbprNnrzSZ7OhIyaL3OUGXF3D8S01uEOLw bNL6T8lxNbz2REFFPnO6EqOPqOEPTV7eH99byHTfDusqdq8qkUrlDnvwt6adQ9OM8BAC6q /UjtYmxUr9qt5/bp2DLV5hcwECcQZ+J804wDnFPdtexjfqmrWHOulN3gWJJ1NHGlbFMFEK tl7bnzV7UhaFUEhmIgEhTQBS89dF+J9FobTDax6WunO8xnmAAvDQ0P7ZZqiYnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698356300; a=rsa-sha256; cv=none; b=mf8PLtbNzAk6M1f5s/KcwaxaJLtaW07F4khBg5HTwhea3DzevF3HxHoebt2C67uCxVsEh8 uVc55bMelXTZEx+HpSr13CA0J+cfgwfpaQt5+4KTWOdTE8vnYhi0VOgyvTrz3xTG4sFTnG lCGDa/U+vdG0GCyr/eNjkdaxoIGUCBZpHdszdLv0srB5G7ITOExToODrGmDU2gmVjp6Pen dNra0F41eg+IGMTBOADUdJwIAbrgU2RPB2g0MtuQEW9pBsbFOPSxNSLXBgMUlCThMVLqVF 169UwF57xTEFOUVy99JttJ2zPXFNCm4LhMW9hPBJQf+if2TWezTyP4JpS1++Ew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGfL3691hznM3; Thu, 26 Oct 2023 21:38:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QLcJCj092082; Thu, 26 Oct 2023 21:38:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QLcJiV092079; Thu, 26 Oct 2023 21:38:19 GMT (envelope-from git) Date: Thu, 26 Oct 2023 21:38:19 GMT Message-Id: <202310262138.39QLcJiV092079@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 859d674e1745 - stable/14 - gpart: Be less picky about GPT Tables in some cases List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/stable/14 X-Git-Reftype: branch X-Git-Commit: 859d674e1745d0a37c9c8d77e21a3fadd713ef49 Auto-Submitted: auto-generated The branch stable/14 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=859d674e1745d0a37c9c8d77e21a3fadd713ef49 commit 859d674e1745d0a37c9c8d77e21a3fadd713ef49 Author: Warner Losh AuthorDate: 2023-10-26 16:14:54 +0000 Commit: Warner Losh CommitDate: 2023-10-26 21:34:25 +0000 gpart: Be less picky about GPT Tables in some cases When we're recoverying a damangae GPT, or when we're restoring a backed up partition tables, don't enforce the 4k alignment for start/end LBAs. This is useful for 512e/4kn drives when we're creating a new partition table or partition. However, when we're trying to fix / restore an old partition, we shouldn't force this alignment, since in that case it's more important to use the partition table as is than to optimize performance by rounding (which isn't required by the standard). MFC After: 1 week (pushed more quickly per re@) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42359 (cherry picked from commit 5c9f0f72f47ea5315e5147185e47c2efca2e8c85) --- sys/geom/part/g_part_gpt.c | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/sys/geom/part/g_part_gpt.c b/sys/geom/part/g_part_gpt.c index 990ace4a25d4..c4cc840f583d 100644 --- a/sys/geom/part/g_part_gpt.c +++ b/sys/geom/part/g_part_gpt.c @@ -103,7 +103,8 @@ struct g_part_gpt_entry { static void g_gpt_printf_utf16(struct sbuf *, uint16_t *, size_t); static void g_gpt_utf8_to_utf16(const uint8_t *, uint16_t *, size_t); -static void g_gpt_set_defaults(struct g_part_table *, struct g_provider *); +static void g_gpt_set_defaults(struct g_part_table *, struct g_provider *, + struct g_part_parms *); static int g_part_gpt_add(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); @@ -717,7 +718,7 @@ g_part_gpt_create(struct g_part_table *basetable, struct g_part_parms *gpp) table->hdr->hdr_entries = basetable->gpt_entries; table->hdr->hdr_entsz = sizeof(struct gpt_ent); - g_gpt_set_defaults(basetable, pp); + g_gpt_set_defaults(basetable, pp, gpp); return (0); } @@ -1083,7 +1084,7 @@ g_part_gpt_recover(struct g_part_table *basetable) table = (struct g_part_gpt_table *)basetable; pp = LIST_FIRST(&basetable->gpt_gp->consumer)->provider; gpt_create_pmbr(table, pp); - g_gpt_set_defaults(basetable, pp); + g_gpt_set_defaults(basetable, pp, NULL); basetable->gpt_corrupt = 0; return (0); } @@ -1300,7 +1301,8 @@ g_part_gpt_write(struct g_part_table *basetable, struct g_consumer *cp) } static void -g_gpt_set_defaults(struct g_part_table *basetable, struct g_provider *pp) +g_gpt_set_defaults(struct g_part_table *basetable, struct g_provider *pp, + struct g_part_parms *gpp) { struct g_part_entry *baseentry; struct g_part_gpt_entry *entry; @@ -1334,14 +1336,29 @@ g_gpt_set_defaults(struct g_part_table *basetable, struct g_provider *pp) if (entry->ent.ent_lba_end > max) max = entry->ent.ent_lba_end; } - spb = 4096 / pp->sectorsize; - if (spb > 1) { - lba = start + ((start % spb) ? spb - start % spb : 0); - if (lba <= min) - start = lba; - lba = end - (end + 1) % spb; - if (max <= lba) - end = lba; + /* + * Don't force alignment of any kind whatsoever on resize, restore or + * recover. resize doesn't go through this path, recover has a NULL gpp + * and restore has flags == restore (maybe with an appended 'C' to + * commit the operation). For these operations, we have to trust the + * user knows what they are doing. + * + * Otherwise it some flavor of creation of a new partition, so we align + * to a 4k offset on the drive, to make 512e/4kn drives more performant + * by default. + */ + if (gpp == NULL || + (gpp->gpp_parms & G_PART_PARM_FLAGS) == 0 || + strstr(gpp->gpp_flags, "restore") == NULL) { + spb = 4096 / pp->sectorsize; + if (spb > 1) { + lba = start + ((start % spb) ? spb - start % spb : 0); + if (lba <= min) + start = lba; + lba = end - (end + 1) % spb; + if (max <= lba) + end = lba; + } } table->hdr->hdr_lba_start = start; table->hdr->hdr_lba_end = end; From nobody Thu Oct 26 22:27:49 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGgR949dtz4yMGt; Thu, 26 Oct 2023 22:27: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 4SGgR91zfFz3djk; Thu, 26 Oct 2023 22:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698359269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4g5IhfTi+ZetaMK5WQuvSkBvjP8cBHsiGzVyl5Z8GkU=; b=sgYw/qs0H0IlA+U63gN//CbHfdbBsgmaX4l4YDIi5ooMNCDXAA/5OXF7tWBkuuE2W4Q9r+ Deck6LSbfHSHKgX6de7yz544fH08Zy6ZOLOO6tSkE707f9ZTCN5TDBhGOa5+C37pesp795 1Y9J6RwvUUGdudTcqqQULCiun3ceWSKmBWpk0gPOBv6rxs704qoABi3/lFAlJX5DADL18G +meWlF0/LG2P9o6DZP0H6mJG9XhpgBlixhlnc+uXsOXgpqyQ/BDMxXHhHMy2oqao/LONYu zEokxFoiljjMtKV8w4uNpOj8bW+vV92pzpEU33eUrfwxva2FauY1vKrNdzaPgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698359269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4g5IhfTi+ZetaMK5WQuvSkBvjP8cBHsiGzVyl5Z8GkU=; b=F7op36TxLsAARh0Ul72jKntMFrhQP46nT69srJU4BYOZXaGMdZPwMlaQcYeCilDvAVs0mB 58YV+pMb88y7uEzV1PqCvRhHekV1+eRIfg/BRBxiWiQ1tNcXPrsAhATnxzRXV0BYA8L9By TpCkExZDSnevTxXeHLnmScoM9Z1ZwNXBp9b9nYee8/sbLBvuIazL4P9pd0EspcmiYDEvqP ymomdRMM50Fodw4vmXNQcu4ymPgipGB5lP8uPpvwmmaWQTHcS+R0tjYKl1hzXJ9KefrMRb 9NTKNrH9u/pbah3vQIG0ThiEECFhD/ktmS90swh6GIrLX3RrNfncy8SMfb8Wgg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698359269; a=rsa-sha256; cv=none; b=HntTOtlYMD54G9+OJ7966rJuFLlvqOMuTSRhSIqtWcZYJB79vGRkS5VQetfMAG5q/GDY83 Mmlkhs9I5xQkx58gCN7p7f8BLGIhrMY/aBCxzPo+Dk8J6Pv6jpJMj5QmmNhV2D2dFe0c8R Rzsu1LbWUGSJVFNwf5YZDTw/EJodrutvFd6/B6h5Y6mitDDLXEvEBOYkzCvfLntmo3hIks gFmm6bxI4H1GKKNyfVQ3+V8bxoHF8tQQp7IVSLn0UZPwtuujNZ8TQTn1gQxKwanxJGwAF3 f/zpSbmNHQyQ4wf/fKo9Fqbgz9ettN6zzHsQiiM+VJdFOiYiTk10/bFtSK9P9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGgR913GSzpl9; Thu, 26 Oct 2023 22:27:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QMRnZ8075010; Thu, 26 Oct 2023 22:27:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QMRnBd075007; Thu, 26 Oct 2023 22:27:49 GMT (envelope-from git) Date: Thu, 26 Oct 2023 22:27:49 GMT Message-Id: <202310262227.39QMRnBd075007@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: 4e24a146dca4 - stable/13 - mips: add enough glue for membarrier(2) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: 4e24a146dca44b84a29bffc52e346ae6a6f5da51 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4e24a146dca44b84a29bffc52e346ae6a6f5da51 commit 4e24a146dca44b84a29bffc52e346ae6a6f5da51 Author: Konstantin Belousov AuthorDate: 2023-10-26 22:26:46 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-26 22:27:25 +0000 mips: add enough glue for membarrier(2) This is direct commit to stable/13. --- sys/mips/include/pmap.h | 2 ++ sys/mips/mips/vm_machdep.c | 5 +++++ 2 files changed, 7 insertions(+) diff --git a/sys/mips/include/pmap.h b/sys/mips/include/pmap.h index b38895c9c8c2..eeff154a297d 100644 --- a/sys/mips/include/pmap.h +++ b/sys/mips/include/pmap.h @@ -161,6 +161,8 @@ extern vm_paddr_t physmem_desc[PHYS_AVAIL_COUNT]; extern vm_offset_t virtual_avail; extern vm_offset_t virtual_end; +#define PMAP_WANT_ACTIVE_CPUS_NAIVE + #define pmap_page_get_memattr(m) (((m)->md.pv_flags & PV_MEMATTR_MASK) >> PV_MEMATTR_SHIFT) #define pmap_page_is_mapped(m) (!TAILQ_EMPTY(&(m)->md.pv_list)) #define pmap_page_is_write_mapped(m) (((m)->a.flags & PGA_WRITEABLE) != 0) diff --git a/sys/mips/mips/vm_machdep.c b/sys/mips/mips/vm_machdep.c index 3758cdb7152f..48b5ff405628 100644 --- a/sys/mips/mips/vm_machdep.c +++ b/sys/mips/mips/vm_machdep.c @@ -470,6 +470,11 @@ cpu_set_user_tls(struct thread *td, void *tls_base) return (0); } +void +cpu_sync_core(void) +{ +} + #ifdef DDB #include From nobody Thu Oct 26 23:22:28 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGhfD70ttz4yPmq; Thu, 26 Oct 2023 23:22: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 4SGhfD6KCbz4F7s; Thu, 26 Oct 2023 23:22:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698362548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KaJMMHAo5hmTN4j2czb2NeAU/x4I6zloeeBUZyJCne4=; b=YP5y6LGxmO/MjXWXML1uIBJbvcRgVZXMGQizMc9xX63RYG4hjMbb4Fk96Ifwvdr+9liAaw i9OSWC0ufNITa2SV3DXVAe70C/M6G+WhIRymd+4ghxE1R9Gz06YCDbGb6GApvgWj5MJcix uuE1uCedcE368CUrA1TfNl4ZKQm1h+AEZrIRKiTWZGp9gUNbdtvGVUvuHieP6RgICzaI+R HdvFb2aAqDqP9ooAQn6kubi5lk4cF2mL9t+MNA+hOosT+jtdElCtVb8vIB5cAD/zcAuRvU Tcx/rV5DYnffObJ1hIeI1xL6mfDeTN0WUrZBkv9r71q10QUJyPWtPyaRKz2eFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698362548; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KaJMMHAo5hmTN4j2czb2NeAU/x4I6zloeeBUZyJCne4=; b=ggWj2xLuakSUFvZ/TdVJJsCP30hHCqu6kccy4uDn2B1q+ZnXUeCBEagYJ6jiOWZlsVw+ew nW7pujjkgCpQWg561xLNKBBnEwUMIYgyGE57dIAFLElINTj3I8LNp4U3u4+imVhRpwJKcV QTKcWIVZR2K71X+/jZYwAgJcvX0nLuk6azSuNP4nl2IKXWcnAcLyX9QFLt/hczH5Vj6f8D rCAp7bjYPKb/Or8shIQAVEYNa4yhNkI6sWLlXLeUt/HLd6Ja9qZEh+oXRJCF+7dTSuVQEi csQ7oew5xMdeGvJzMLBtIsidZm4AEyhGS6PFvTijAqYTUTdlbxAH6+APpxjTow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698362548; a=rsa-sha256; cv=none; b=HQbGzkukdocRKcdwtnQOop8AnMFm1mfTGLRYGtTQOZj6Ggpo5dIb6NIr9EQNN2NhjGFQtB 9qDHduLQ79Pe6MUED/Nh7Od8wp1Wl2Xzb3B4yklYOgZxDxBzHyflWwFQou0oN1OBAusqKM ikV/tnJuZhAIL27o+vJStSIa8qWGcioJAC3aFbLumdjxbE82BF6lwE+4xKjsd75IGg8dFh M6dCuTikMki3Z3RKNlFRyFHP+l6YV2hZedZTtEtOmM7XZOjlTfMyK3pCZ2wzCmQVFk7gHz 54x7av0OB85oC0nplNKBw841pca3iemoy5Ly6wJsErWVuZNjk6DgqL8uzHK78w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGhfD5Q1gzqnk; Thu, 26 Oct 2023 23:22:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39QNMSbZ074071; Thu, 26 Oct 2023 23:22:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39QNMS3D074068; Thu, 26 Oct 2023 23:22:28 GMT (envelope-from git) Date: Thu, 26 Oct 2023 23:22:28 GMT Message-Id: <202310262322.39QNMS3D074068@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Warner Losh Subject: git: 7bdb67cb1cfe - releng/14.0 - gpart: Be less picky about GPT Tables in some cases List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/releng/14.0 X-Git-Reftype: branch X-Git-Commit: 7bdb67cb1cfe161de68bfe0cd35bab73d4c77e3c Auto-Submitted: auto-generated The branch releng/14.0 has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7bdb67cb1cfe161de68bfe0cd35bab73d4c77e3c commit 7bdb67cb1cfe161de68bfe0cd35bab73d4c77e3c Author: Warner Losh AuthorDate: 2023-10-26 16:14:54 +0000 Commit: Warner Losh CommitDate: 2023-10-26 23:18:38 +0000 gpart: Be less picky about GPT Tables in some cases When we're recoverying a damangae GPT, or when we're restoring a backed up partition tables, don't enforce the 4k alignment for start/end LBAs. This is useful for 512e/4kn drives when we're creating a new partition table or partition. However, when we're trying to fix / restore an old partition, we shouldn't force this alignment, since in that case it's more important to use the partition table as is than to optimize performance by rounding (which isn't required by the standard). MFC After: 1 week (pushed more quickly per re@) Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D42359 (cherry picked from commit 5c9f0f72f47ea5315e5147185e47c2efca2e8c85) (cherry picked from commit 859d674e1745d0a37c9c8d77e21a3fadd713ef49) Approved-by: re (gjb) --- sys/geom/part/g_part_gpt.c | 41 +++++++++++++++++++++++++++++------------ 1 file changed, 29 insertions(+), 12 deletions(-) diff --git a/sys/geom/part/g_part_gpt.c b/sys/geom/part/g_part_gpt.c index 990ace4a25d4..c4cc840f583d 100644 --- a/sys/geom/part/g_part_gpt.c +++ b/sys/geom/part/g_part_gpt.c @@ -103,7 +103,8 @@ struct g_part_gpt_entry { static void g_gpt_printf_utf16(struct sbuf *, uint16_t *, size_t); static void g_gpt_utf8_to_utf16(const uint8_t *, uint16_t *, size_t); -static void g_gpt_set_defaults(struct g_part_table *, struct g_provider *); +static void g_gpt_set_defaults(struct g_part_table *, struct g_provider *, + struct g_part_parms *); static int g_part_gpt_add(struct g_part_table *, struct g_part_entry *, struct g_part_parms *); @@ -717,7 +718,7 @@ g_part_gpt_create(struct g_part_table *basetable, struct g_part_parms *gpp) table->hdr->hdr_entries = basetable->gpt_entries; table->hdr->hdr_entsz = sizeof(struct gpt_ent); - g_gpt_set_defaults(basetable, pp); + g_gpt_set_defaults(basetable, pp, gpp); return (0); } @@ -1083,7 +1084,7 @@ g_part_gpt_recover(struct g_part_table *basetable) table = (struct g_part_gpt_table *)basetable; pp = LIST_FIRST(&basetable->gpt_gp->consumer)->provider; gpt_create_pmbr(table, pp); - g_gpt_set_defaults(basetable, pp); + g_gpt_set_defaults(basetable, pp, NULL); basetable->gpt_corrupt = 0; return (0); } @@ -1300,7 +1301,8 @@ g_part_gpt_write(struct g_part_table *basetable, struct g_consumer *cp) } static void -g_gpt_set_defaults(struct g_part_table *basetable, struct g_provider *pp) +g_gpt_set_defaults(struct g_part_table *basetable, struct g_provider *pp, + struct g_part_parms *gpp) { struct g_part_entry *baseentry; struct g_part_gpt_entry *entry; @@ -1334,14 +1336,29 @@ g_gpt_set_defaults(struct g_part_table *basetable, struct g_provider *pp) if (entry->ent.ent_lba_end > max) max = entry->ent.ent_lba_end; } - spb = 4096 / pp->sectorsize; - if (spb > 1) { - lba = start + ((start % spb) ? spb - start % spb : 0); - if (lba <= min) - start = lba; - lba = end - (end + 1) % spb; - if (max <= lba) - end = lba; + /* + * Don't force alignment of any kind whatsoever on resize, restore or + * recover. resize doesn't go through this path, recover has a NULL gpp + * and restore has flags == restore (maybe with an appended 'C' to + * commit the operation). For these operations, we have to trust the + * user knows what they are doing. + * + * Otherwise it some flavor of creation of a new partition, so we align + * to a 4k offset on the drive, to make 512e/4kn drives more performant + * by default. + */ + if (gpp == NULL || + (gpp->gpp_parms & G_PART_PARM_FLAGS) == 0 || + strstr(gpp->gpp_flags, "restore") == NULL) { + spb = 4096 / pp->sectorsize; + if (spb > 1) { + lba = start + ((start % spb) ? spb - start % spb : 0); + if (lba <= min) + start = lba; + lba = end - (end + 1) % spb; + if (max <= lba) + end = lba; + } } table->hdr->hdr_lba_start = start; table->hdr->hdr_lba_end = end; From nobody Fri Oct 27 00:02:18 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGjXC58S4z4xSFp; Fri, 27 Oct 2023 00: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 4SGjXC1PZqz4HBT; Fri, 27 Oct 2023 00:02:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698364939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NUJTt93O2H80zE8RHgQbQW4MjuRptV0poJxpcYcNKyY=; b=NNnXaaEAE4T5A2x+pvz66bNH9cSGy1/61mxScEVeefCFOpUSPIsOpVV8X3cCPLp3EyCNQg 8m+64SlM2GOGOZMubEb4Vzf8CFEKMzNtDCGDLN0+jWoclBEFcq9loV73nyyHFtFRcMPndY BxiwzwzPaH5p/ofNTZzDDDK34T1o1JMQmyz7dDXRc2PTIUrRYoZUgqsiWAGZ+2oHK4KwVz /V1bisZmU8x+sG/wAfla3+p01KQr7IFvf8IvbUgRGavsNa16kb7aRYSRUw65E87cHiidKn zSs/7PRGw/hhKPIimmS3mIYCnYxyB9+pWeFR5ZxRIBwfcvuoWQDcm5IKG7A+Wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698364939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NUJTt93O2H80zE8RHgQbQW4MjuRptV0poJxpcYcNKyY=; b=XpOpd5SWt5ZdhfK1yi28mikNwF2VeEVfK8WaikLlR4mJuF9zTyvqc87GXsGXfkcGKa1d9m jWHSMWrt6fVuEszefAijWz+wowPfK9UNqChWHBPL1McD6ehg5EKQGLkfkmr2wP5ZTJ6ixr 5iILE7lOQb+hdtJmdKgL0UrgNi7ukBX02J0+8jaLEiOxY0FQa1O33OYAOaSQEcrld7lgWs MOi0XXyOeofGuwMSyN5DQ7C6Sn3W89YnJiVhfQ6v3Q/MzWZCSGLQKDePnVkk9BRdciLbRn u/N56050x0EVh1BOh9zjAzzHyvebevOIcdT/qylr4SRzyJKXrAWqorQVIMcICw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698364939; a=rsa-sha256; cv=none; b=cBq7lAfu7PDrFv7TZAi3+jAInUhNUvOKq3rbBvYhLf8W14j5CgdQXpMd/GyNq+WxU8ZcYI PKqwY+AWnqbSqLtQn9xlhvXO6OJjBs2CCoMx7XkOdcK1zsEx24TwSj9YKJ4KP+VDVu4FPp SahXgeksttbSBjL1pZC8oBiTGCYcpYItD8BomEnxEC/lxR3EV06wurvE+UmvL0yoROEYSp +Q9Oi2c0jOngmZlaNfmy2NXkodaFD39ovf7BkpNVND9PFZSA+icsYg725x19y9HB9SJS9g 8Cq678Tky6bfk+ggrkAvk5H4oNKlR12AMTBUDFBXfIpDRmPObEl+Wkh9nN3OGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGjXC0VG0zrnn; Fri, 27 Oct 2023 00:02:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39R02Iih040283; Fri, 27 Oct 2023 00:02:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39R02IRh040280; Fri, 27 Oct 2023 00:02:18 GMT (envelope-from git) Date: Fri, 27 Oct 2023 00:02:18 GMT Message-Id: <202310270002.39R02IRh040280@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Glen Barber Subject: git: c6cfdc130554 - releng/14.0 - release: update releng/14.0 to RC3 List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gjb X-Git-Repository: src X-Git-Refname: refs/heads/releng/14.0 X-Git-Reftype: branch X-Git-Commit: c6cfdc130554c42c02538622cc627c3d737104f7 Auto-Submitted: auto-generated The branch releng/14.0 has been updated by gjb: URL: https://cgit.FreeBSD.org/src/commit/?id=c6cfdc130554c42c02538622cc627c3d737104f7 commit c6cfdc130554c42c02538622cc627c3d737104f7 Author: Glen Barber AuthorDate: 2023-10-27 00:01:56 +0000 Commit: Glen Barber CommitDate: 2023-10-27 00:01:56 +0000 release: update releng/14.0 to RC3 Approved by: re (implicit) Sponsored by: GoFundMe https://www.gofundme.com/f/gjbbsd Sponsored by: PayPal https://paypal.me/gjbbsd --- sys/conf/newvers.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh index b2bd54bb1ee9..26ed02969303 100644 --- a/sys/conf/newvers.sh +++ b/sys/conf/newvers.sh @@ -53,7 +53,7 @@ TYPE="FreeBSD" REVISION="14.0" -BRANCH="RC2" +BRANCH="RC3" if [ -n "${BRANCH_OVERRIDE}" ]; then BRANCH=${BRANCH_OVERRIDE} fi From nobody Fri Oct 27 08:35:17 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGww56ylcz4xyQF; Fri, 27 Oct 2023 08:35: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 4SGww56Mn0z3TZh; Fri, 27 Oct 2023 08:35:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698395717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EXrfmuRVBUJ3JAPIT9la4X9cyqtoM5N1dXftHja3uVQ=; b=I2L6wpTmbAQvqrx9xNQ6QgKRSbAqA6hh4+wsOTZiebsK6MffIyHkWiKXjhqzwRNrR5ehP8 Bgj43TISgG2KQZa36LurgkjA3Y+w7QNCE/Av4Rhcx3/GCCCCFWAJCbH68HoeKln6QQlKwq nQmiGeI0jtjY+8zgRgPKjReVMLWrMYxtv3FN26W4aX18i0pPcSUeE8LKahsIWwG965z8mW ONv5Lhh+xoBPVhNplNps3cMhj5cd8Q2BofV+EvoPiwVWqRbWYJGOqjw08qB5cW2FFIxnfa 1np0e+vY9zmcemDbcw1HQK5xveaSUJzdpR9jVhBUaTNrSMhyYRKiX3zK1sE4Tw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698395717; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EXrfmuRVBUJ3JAPIT9la4X9cyqtoM5N1dXftHja3uVQ=; b=wsYrkDh8wSHH7wJh5gZR3V7pzfoL4jRMd/LM8Yt/FAZ/LiwWsUFK6lTC4tI4FH1e8SElj+ o3ModT1Ytp13IXxX8KOuv0pgXww4A0a1f1AW6Cz3K3Uod3MnOyH1r7idLI5lSjF/20sUbc 9oLXrPjwKa6zxQimum2/7mDkmPaHoKuxTS69YgiWxmbhCrT2/HdgfB7wIDKmmZr4CcisNh kPXZ+wgK7zGZdphjFS7HgrUKUfBM0yPqNbOQOc2tpGYr9LrMzq0ToETMGrChyRxybrTdVE D5M0BACnDeLZmi4tiriG3POOAfS2FoS1jiKDa05Yv3dJXbqGzm9p0q32vDuX6A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698395717; a=rsa-sha256; cv=none; b=avd+1R7Ge7tpBo2dghmMrjXIzgwZd6P4SLu0kjHg9zttIg/3R0g9jG+d922a0j2t5ZfEQh 6Hc5mdt/ta/8f8npmiLklmeb5+TUWnEbUdWWMyEofV9Vnj1Wdq/qwk5xgRb3GTAzVVSNZi 9fMFk6vaLJscdPQ4suVEusSPO+UyNxcPXMWJ/I5RJqus0u1cBEci8YIsw2fcQ6qE+uyxuO 2gbd1FF22O8vSziJ7/h6pq41O69wmFZTv/P6saFhwEUXHJaRGYPphDhhUJcSCmciuUsGSa fXXQ8nc3mZmBXIbnNxY+voxeYpxDGZM5DSD2ESujNnJkZIctKc5m30501GD4cA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGww55PvRz168D; Fri, 27 Oct 2023 08:35:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39R8ZH0q091902; Fri, 27 Oct 2023 08:35:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39R8ZH40091899; Fri, 27 Oct 2023 08:35:17 GMT (envelope-from git) Date: Fri, 27 Oct 2023 08:35:17 GMT Message-Id: <202310270835.39R8ZH40091899@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: 4671836d7ba3 - stable/14 - pfctl: fix incorrect mask on dynamic address List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 4671836d7ba30db56bc3efbfe64859e314aae7d9 Auto-Submitted: auto-generated The branch stable/14 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4671836d7ba30db56bc3efbfe64859e314aae7d9 commit 4671836d7ba30db56bc3efbfe64859e314aae7d9 Author: Kristof Provost AuthorDate: 2023-10-06 12:20:17 +0000 Commit: Kristof Provost CommitDate: 2023-10-27 07:45:55 +0000 pfctl: fix incorrect mask on dynamic address A PF rule using an IPv4 address followed by an IPv6 address and then a dynamic address, e.g. "pass from {192.0.2.1 2001:db8::1} to (pppoe0)", will have an incorrect /32 mask applied to the dynamic address. MFC after: 3 weeks Obtained from: OpenBSD See also: https://ftp.openbsd.org/pub/OpenBSD/patches/5.6/common/007_pfctl.patch.sig Sponsored by: Rubicon Communications, LLC ("Netgate") Event: Oslo Hackathon at Modirum (cherry picked from commit 7ce98cf2f87a22240b66e4c38fd887431a25bf7d) --- sbin/pfctl/parse.y | 39 +++++++++++++++++++++++++++++++++++- sbin/pfctl/pfctl_parser.c | 30 ++++++++++++++++++++++----- sbin/pfctl/pfctl_parser.h | 1 + sbin/pfctl/tests/files/pf0102.ok | 4 ++-- sbin/pfctl/tests/files/pf1018.in | 1 + sbin/pfctl/tests/files/pf1018.ok | 2 ++ sbin/pfctl/tests/pfctl_test_list.inc | 1 + 7 files changed, 70 insertions(+), 8 deletions(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index 041dcb0587b3..17227b674814 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -4720,6 +4720,10 @@ natrule : nataction interface af proto fromto tag tagged rtable remove_invalid_hosts(&$9->host, &r.af); if (invalid_redirect($9->host, r.af)) YYERROR; + if ($9->host->addr.type == PF_ADDR_DYNIFTL) { + if (($9->host = gen_dynnode($9->host, r.af)) == NULL) + err(1, "calloc"); + } if (check_netmask($9->host, r.af)) YYERROR; @@ -4936,6 +4940,10 @@ binatrule : no BINAT natpasslog interface af proto FROM ipspec toipspec tag yyerror("binat ip versions must match"); YYERROR; } + if ($8->addr.type == PF_ADDR_DYNIFTL) { + if (($8 = gen_dynnode($8, binat.af)) == NULL) + err(1, "calloc"); + } if (check_netmask($8, binat.af)) YYERROR; memcpy(&binat.src.addr, &$8->addr, @@ -4951,6 +4959,10 @@ binatrule : no BINAT natpasslog interface af proto FROM ipspec toipspec tag yyerror("binat ip versions must match"); YYERROR; } + if ($9->addr.type == PF_ADDR_DYNIFTL) { + if (($9 = gen_dynnode($9, binat.af)) == NULL) + err(1, "calloc"); + } if (check_netmask($9, binat.af)) YYERROR; memcpy(&binat.dst.addr, &$9->addr, @@ -4980,6 +4992,10 @@ binatrule : no BINAT natpasslog interface af proto FROM ipspec toipspec tag "a single address"); YYERROR; } + if ($13->host->addr.type == PF_ADDR_DYNIFTL) { + if (($13->host = gen_dynnode($13->host, binat.af)) == NULL) + err(1, "calloc"); + } if (check_netmask($13->host, binat.af)) YYERROR; @@ -5982,7 +5998,7 @@ expand_rule(struct pfctl_rule *r, char tagname[PF_TAG_NAME_SIZE]; char match_tagname[PF_TAG_NAME_SIZE]; struct pf_pooladdr *pa; - struct node_host *h; + struct node_host *h, *osrch, *odsth; u_int8_t flags, flagset, keep_state; memcpy(label, r->label, sizeof(r->label)); @@ -6043,6 +6059,18 @@ expand_rule(struct pfctl_rule *r, sizeof(r->match_tagname)) >= sizeof(r->match_tagname)) errx(1, "expand_rule: strlcpy"); + osrch = odsth = NULL; + if (src_host->addr.type == PF_ADDR_DYNIFTL) { + osrch = src_host; + if ((src_host = gen_dynnode(src_host, r->af)) == NULL) + err(1, "expand_rule: calloc"); + } + if (dst_host->addr.type == PF_ADDR_DYNIFTL) { + odsth = dst_host; + if ((dst_host = gen_dynnode(dst_host, r->af)) == NULL) + err(1, "expand_rule: calloc"); + } + error += check_netmask(src_host, r->af); error += check_netmask(dst_host, r->af); @@ -6121,6 +6149,15 @@ expand_rule(struct pfctl_rule *r, added++; } + if (osrch && src_host->addr.type == PF_ADDR_DYNIFTL) { + free(src_host); + src_host = osrch; + } + if (odsth && dst_host->addr.type == PF_ADDR_DYNIFTL) { + free(dst_host); + dst_host = odsth; + } + )))))))))); FREE_LIST(struct node_if, interfaces); diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index 936c5ec53759..925848055bba 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1306,16 +1306,12 @@ int check_netmask(struct node_host *h, sa_family_t af) { struct node_host *n = NULL; - struct pf_addr *m; + struct pf_addr *m; for (n = h; n != NULL; n = n->next) { if (h->addr.type == PF_ADDR_TABLE) continue; m = &h->addr.v.a.mask; - /* fix up netmask for dynaddr */ - if (af == AF_INET && h->addr.type == PF_ADDR_DYNIFTL && - unmask(m, AF_INET6) > 32) - set_ipmask(n, 32); /* netmasks > 32 bit are invalid on v4 */ if (af == AF_INET && (m->addr32[1] || m->addr32[2] || m->addr32[3])) { @@ -1327,6 +1323,30 @@ check_netmask(struct node_host *h, sa_family_t af) return (0); } +struct node_host * +gen_dynnode(struct node_host *h, sa_family_t af) +{ + struct node_host *n; + struct pf_addr *m; + + if (h->addr.type != PF_ADDR_DYNIFTL) + return (NULL); + + if ((n = calloc(1, sizeof(*n))) == NULL) + return (NULL); + bcopy(h, n, sizeof(*n)); + n->ifname = NULL; + n->next = NULL; + n->tail = NULL; + + /* fix up netmask */ + m = &n->addr.v.a.mask; + if (af == AF_INET && unmask(m, AF_INET6) > 32) + set_ipmask(n, 32); + + return (n); +} + /* interface lookup routines */ static struct node_host *iftab; diff --git a/sbin/pfctl/pfctl_parser.h b/sbin/pfctl/pfctl_parser.h index 83a4880106a8..d0f3bc3c303c 100644 --- a/sbin/pfctl/pfctl_parser.h +++ b/sbin/pfctl/pfctl_parser.h @@ -360,6 +360,7 @@ extern const struct pf_timeout pf_timeouts[]; void set_ipmask(struct node_host *, u_int8_t); int check_netmask(struct node_host *, sa_family_t); int unmask(struct pf_addr *, sa_family_t); +struct node_host *gen_dynnode(struct node_host *, sa_family_t); void ifa_load(void); int get_query_socket(void); struct node_host *ifa_exists(char *); diff --git a/sbin/pfctl/tests/files/pf0102.ok b/sbin/pfctl/tests/files/pf0102.ok index 3233ca5a2643..1c76ec2725ba 100644 --- a/sbin/pfctl/tests/files/pf0102.ok +++ b/sbin/pfctl/tests/files/pf0102.ok @@ -1,8 +1,8 @@ pass inet from 1.1.1.1 to (self) flags S/SA keep state -pass inet6 from 2002:: to (self)/32 flags S/SA keep state +pass inet6 from 2002:: to (self) flags S/SA keep state pass inet6 from 2002:: to (self) flags S/SA keep state pass inet from 1.1.1.1 to (self) flags S/SA keep state pass inet from 1.1.1.1 to (self) flags S/SA keep state -pass inet6 from 2002:: to (self)/32 flags S/SA keep state +pass inet6 from 2002:: to (self)/40 flags S/SA keep state pass inet6 from 2002:: to (self)/40 flags S/SA keep state pass inet from 1.1.1.1 to (self) flags S/SA keep state diff --git a/sbin/pfctl/tests/files/pf1018.in b/sbin/pfctl/tests/files/pf1018.in new file mode 100644 index 000000000000..90f0a3a0bab7 --- /dev/null +++ b/sbin/pfctl/tests/files/pf1018.in @@ -0,0 +1 @@ +pass from { 192.0.2.1 2001:db8::1 } to (pppoe0) diff --git a/sbin/pfctl/tests/files/pf1018.ok b/sbin/pfctl/tests/files/pf1018.ok new file mode 100644 index 000000000000..04950f0035b8 --- /dev/null +++ b/sbin/pfctl/tests/files/pf1018.ok @@ -0,0 +1,2 @@ +pass inet from 192.0.2.1 to (pppoe0) flags S/SA keep state +pass inet6 from 2001:db8::1 to (pppoe0) flags S/SA keep state diff --git a/sbin/pfctl/tests/pfctl_test_list.inc b/sbin/pfctl/tests/pfctl_test_list.inc index 98ea3257d492..4a63c0ba48b7 100644 --- a/sbin/pfctl/tests/pfctl_test_list.inc +++ b/sbin/pfctl/tests/pfctl_test_list.inc @@ -126,3 +126,4 @@ PFCTL_TEST(1014, "Ethernet rule with one label") PFCTL_TEST(1015, "Ethernet rule with several labels") PFCTL_TEST(1016, "Ethernet rule with ridentifier and one label") PFCTL_TEST(1017, "Ethernet rule with ridentifier and several labels") +PFCTL_TEST(1018, "Test dynamic address mask") From nobody Fri Oct 27 08:35:18 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SGww71FTdz4xyQH; Fri, 27 Oct 2023 08:35: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 4SGww70Mzdz3TgF; Fri, 27 Oct 2023 08:35:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698395719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IhNpg+rcvH4YpzGSnDN3i8h/rjjZFctoBSS9OjJbVck=; b=QZNTqjl6RsD1vaxo4Sf8LSKTtANZzV3bY7t8NNzqEouciOE1EwNKHvDIvnoELdw7Q4uNSX QBVE4L/xKQfNr/70cMpiOzU8QtGYeRk4m0dM3fD1nR/aZNQT/5GRbb9ALuU9dflDQZFKqh qlaT8T0G2Yz6bnSSOmf8W1GyMUEL5M96zU4n3KlGfvK2w/0NxvOhb2eHz8owwcK2FJ1mIv jD3IxeK4TBO62TGY+tYLAkbAiNp92W9h5fWLiXr+U8Dx/ecUJidw7wMpE3aeFxteHBriQM PxjlF0BPAAq+SPIPm27a1Z08dbDsf1qRQvLVPxwFAYlzGrhyxx6A36l9tF5msQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698395719; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IhNpg+rcvH4YpzGSnDN3i8h/rjjZFctoBSS9OjJbVck=; b=YX4ZudfEYTBfV902LWmHcCXHjcj7aCac+ZXeQSbugOtTuLRI3JfieoK3JpOZGU57y9g5Vz 1GV6yzuUz3g2OXsRWlSM8HtbeRzPvi5R2MfNjAPMDXXo0DVP0ECm+WMtX44aTqPhsxu5kN WzVsCvhxRpPTaps2LyrQQ+gaFmzLaZjIbhMYekVP7S4ZSCYaNd0SE7MGtnGE94GX1Cc3Fm q6ESb96tfRcskS/ikWlRpIiV4RX6E5en+hh8t4FNZgDUBmtTQVzsx6/OvJF4Zj8kO+kv+a eAHZtNOVsN+3r5/OCY0rRR9AxP7qpfrOTQJxY2eM8gagj4F7TDnGuRy6mpX0mQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698395719; a=rsa-sha256; cv=none; b=wXx32invXlWnG224J2Umto0iVtprvYwUNm5N7NO/yD8NNZjiKDDCIFh5TBjkh7bq7Ivrn1 5iYh6IoRTnBU1pPnxJIFHng+k7kHGeoQfaty5P5aJnoDx0LO0iBESQwyiDC8qDrb6KuNJG 6K1L5l7lrbk1+9IunGE+Rn4Mp3G/u+ydb2bW+whNwHPomZKcOLQEOKsY+tpap1S/3JYP3Z jghwtT7cZJHNSttbWfWz/wDFLpQfNeyuIpi9Ix9/NVtS8ZSRzGID6EkO1X9XjSYKmO9P+O MMtQsXTLBKXlHrTlpUzTlZ6Udj41DKF/hlIlrWtucAS3na/l1TYR9IXJzw6Ctg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SGww6666sz168F; Fri, 27 Oct 2023 08:35:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39R8ZIZV092041; Fri, 27 Oct 2023 08:35:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39R8ZII4092038; Fri, 27 Oct 2023 08:35:18 GMT (envelope-from git) Date: Fri, 27 Oct 2023 08:35:18 GMT Message-Id: <202310270835.39R8ZII4092038@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kristof Provost Subject: git: dfaadbb4661d - stable/13 - pfctl: fix incorrect mask on dynamic address List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kp X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: dfaadbb4661de6d1a410205bf1e6653ca24f7610 Auto-Submitted: auto-generated The branch stable/13 has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=dfaadbb4661de6d1a410205bf1e6653ca24f7610 commit dfaadbb4661de6d1a410205bf1e6653ca24f7610 Author: Kristof Provost AuthorDate: 2023-10-06 12:20:17 +0000 Commit: Kristof Provost CommitDate: 2023-10-27 07:46:19 +0000 pfctl: fix incorrect mask on dynamic address A PF rule using an IPv4 address followed by an IPv6 address and then a dynamic address, e.g. "pass from {192.0.2.1 2001:db8::1} to (pppoe0)", will have an incorrect /32 mask applied to the dynamic address. MFC after: 3 weeks Obtained from: OpenBSD See also: https://ftp.openbsd.org/pub/OpenBSD/patches/5.6/common/007_pfctl.patch.sig Sponsored by: Rubicon Communications, LLC ("Netgate") Event: Oslo Hackathon at Modirum (cherry picked from commit 7ce98cf2f87a22240b66e4c38fd887431a25bf7d) --- sbin/pfctl/parse.y | 39 +++++++++++++++++++++++++++++++++++- sbin/pfctl/pfctl_parser.c | 30 ++++++++++++++++++++++----- sbin/pfctl/pfctl_parser.h | 1 + sbin/pfctl/tests/files/pf0102.ok | 4 ++-- sbin/pfctl/tests/files/pf1018.in | 1 + sbin/pfctl/tests/files/pf1018.ok | 2 ++ sbin/pfctl/tests/pfctl_test_list.inc | 1 + 7 files changed, 70 insertions(+), 8 deletions(-) diff --git a/sbin/pfctl/parse.y b/sbin/pfctl/parse.y index e0b9cdc1ee1f..6313e6dfcd15 100644 --- a/sbin/pfctl/parse.y +++ b/sbin/pfctl/parse.y @@ -4244,6 +4244,10 @@ natrule : nataction interface af proto fromto tag tagged rtable remove_invalid_hosts(&$9->host, &r.af); if (invalid_redirect($9->host, r.af)) YYERROR; + if ($9->host->addr.type == PF_ADDR_DYNIFTL) { + if (($9->host = gen_dynnode($9->host, r.af)) == NULL) + err(1, "calloc"); + } if (check_netmask($9->host, r.af)) YYERROR; @@ -4460,6 +4464,10 @@ binatrule : no BINAT natpasslog interface af proto FROM ipspec toipspec tag yyerror("binat ip versions must match"); YYERROR; } + if ($8->addr.type == PF_ADDR_DYNIFTL) { + if (($8 = gen_dynnode($8, binat.af)) == NULL) + err(1, "calloc"); + } if (check_netmask($8, binat.af)) YYERROR; memcpy(&binat.src.addr, &$8->addr, @@ -4475,6 +4483,10 @@ binatrule : no BINAT natpasslog interface af proto FROM ipspec toipspec tag yyerror("binat ip versions must match"); YYERROR; } + if ($9->addr.type == PF_ADDR_DYNIFTL) { + if (($9 = gen_dynnode($9, binat.af)) == NULL) + err(1, "calloc"); + } if (check_netmask($9, binat.af)) YYERROR; memcpy(&binat.dst.addr, &$9->addr, @@ -4504,6 +4516,10 @@ binatrule : no BINAT natpasslog interface af proto FROM ipspec toipspec tag "a single address"); YYERROR; } + if ($13->host->addr.type == PF_ADDR_DYNIFTL) { + if (($13->host = gen_dynnode($13->host, binat.af)) == NULL) + err(1, "calloc"); + } if (check_netmask($13->host, binat.af)) YYERROR; @@ -5412,7 +5428,7 @@ expand_rule(struct pfctl_rule *r, char tagname[PF_TAG_NAME_SIZE]; char match_tagname[PF_TAG_NAME_SIZE]; struct pf_pooladdr *pa; - struct node_host *h; + struct node_host *h, *osrch, *odsth; u_int8_t flags, flagset, keep_state; memcpy(label, r->label, sizeof(r->label)); @@ -5473,6 +5489,18 @@ expand_rule(struct pfctl_rule *r, sizeof(r->match_tagname)) >= sizeof(r->match_tagname)) errx(1, "expand_rule: strlcpy"); + osrch = odsth = NULL; + if (src_host->addr.type == PF_ADDR_DYNIFTL) { + osrch = src_host; + if ((src_host = gen_dynnode(src_host, r->af)) == NULL) + err(1, "expand_rule: calloc"); + } + if (dst_host->addr.type == PF_ADDR_DYNIFTL) { + odsth = dst_host; + if ((dst_host = gen_dynnode(dst_host, r->af)) == NULL) + err(1, "expand_rule: calloc"); + } + error += check_netmask(src_host, r->af); error += check_netmask(dst_host, r->af); @@ -5551,6 +5579,15 @@ expand_rule(struct pfctl_rule *r, added++; } + if (osrch && src_host->addr.type == PF_ADDR_DYNIFTL) { + free(src_host); + src_host = osrch; + } + if (odsth && dst_host->addr.type == PF_ADDR_DYNIFTL) { + free(dst_host); + dst_host = odsth; + } + )))))))))); FREE_LIST(struct node_if, interfaces); diff --git a/sbin/pfctl/pfctl_parser.c b/sbin/pfctl/pfctl_parser.c index c850056216ec..a3863cb23ac6 100644 --- a/sbin/pfctl/pfctl_parser.c +++ b/sbin/pfctl/pfctl_parser.c @@ -1146,16 +1146,12 @@ int check_netmask(struct node_host *h, sa_family_t af) { struct node_host *n = NULL; - struct pf_addr *m; + struct pf_addr *m; for (n = h; n != NULL; n = n->next) { if (h->addr.type == PF_ADDR_TABLE) continue; m = &h->addr.v.a.mask; - /* fix up netmask for dynaddr */ - if (af == AF_INET && h->addr.type == PF_ADDR_DYNIFTL && - unmask(m, AF_INET6) > 32) - set_ipmask(n, 32); /* netmasks > 32 bit are invalid on v4 */ if (af == AF_INET && (m->addr32[1] || m->addr32[2] || m->addr32[3])) { @@ -1167,6 +1163,30 @@ check_netmask(struct node_host *h, sa_family_t af) return (0); } +struct node_host * +gen_dynnode(struct node_host *h, sa_family_t af) +{ + struct node_host *n; + struct pf_addr *m; + + if (h->addr.type != PF_ADDR_DYNIFTL) + return (NULL); + + if ((n = calloc(1, sizeof(*n))) == NULL) + return (NULL); + bcopy(h, n, sizeof(*n)); + n->ifname = NULL; + n->next = NULL; + n->tail = NULL; + + /* fix up netmask */ + m = &n->addr.v.a.mask; + if (af == AF_INET && unmask(m, AF_INET6) > 32) + set_ipmask(n, 32); + + return (n); +} + /* interface lookup routines */ static struct node_host *iftab; diff --git a/sbin/pfctl/pfctl_parser.h b/sbin/pfctl/pfctl_parser.h index 06d52caf8e99..8cabf7e5bec2 100644 --- a/sbin/pfctl/pfctl_parser.h +++ b/sbin/pfctl/pfctl_parser.h @@ -340,6 +340,7 @@ extern const struct pf_timeout pf_timeouts[]; void set_ipmask(struct node_host *, u_int8_t); int check_netmask(struct node_host *, sa_family_t); int unmask(struct pf_addr *, sa_family_t); +struct node_host *gen_dynnode(struct node_host *, sa_family_t); void ifa_load(void); int get_query_socket(void); struct node_host *ifa_exists(char *); diff --git a/sbin/pfctl/tests/files/pf0102.ok b/sbin/pfctl/tests/files/pf0102.ok index 3233ca5a2643..1c76ec2725ba 100644 --- a/sbin/pfctl/tests/files/pf0102.ok +++ b/sbin/pfctl/tests/files/pf0102.ok @@ -1,8 +1,8 @@ pass inet from 1.1.1.1 to (self) flags S/SA keep state -pass inet6 from 2002:: to (self)/32 flags S/SA keep state +pass inet6 from 2002:: to (self) flags S/SA keep state pass inet6 from 2002:: to (self) flags S/SA keep state pass inet from 1.1.1.1 to (self) flags S/SA keep state pass inet from 1.1.1.1 to (self) flags S/SA keep state -pass inet6 from 2002:: to (self)/32 flags S/SA keep state +pass inet6 from 2002:: to (self)/40 flags S/SA keep state pass inet6 from 2002:: to (self)/40 flags S/SA keep state pass inet from 1.1.1.1 to (self) flags S/SA keep state diff --git a/sbin/pfctl/tests/files/pf1018.in b/sbin/pfctl/tests/files/pf1018.in new file mode 100644 index 000000000000..90f0a3a0bab7 --- /dev/null +++ b/sbin/pfctl/tests/files/pf1018.in @@ -0,0 +1 @@ +pass from { 192.0.2.1 2001:db8::1 } to (pppoe0) diff --git a/sbin/pfctl/tests/files/pf1018.ok b/sbin/pfctl/tests/files/pf1018.ok new file mode 100644 index 000000000000..04950f0035b8 --- /dev/null +++ b/sbin/pfctl/tests/files/pf1018.ok @@ -0,0 +1,2 @@ +pass inet from 192.0.2.1 to (pppoe0) flags S/SA keep state +pass inet6 from 2001:db8::1 to (pppoe0) flags S/SA keep state diff --git a/sbin/pfctl/tests/pfctl_test_list.inc b/sbin/pfctl/tests/pfctl_test_list.inc index 0def88f4d7e1..b73bcf2522b7 100644 --- a/sbin/pfctl/tests/pfctl_test_list.inc +++ b/sbin/pfctl/tests/pfctl_test_list.inc @@ -116,3 +116,4 @@ PFCTL_TEST(1004, "ALTQ with Codel") PFCTL_TEST(1005, "PR 231323") PFCTL_TEST(1006, "pfctl crashes with certain fairq configurations") PFCTL_TEST(1010, "POM_STICKYADDRESS test") +PFCTL_TEST(1018, "Test dynamic address mask") From nobody Fri Oct 27 17:33:48 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SH8sT1wKHz4yVC9; Fri, 27 Oct 2023 17:33: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 4SH8sT1RNjz3XqJ; Fri, 27 Oct 2023 17:33:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698428029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VV/YHokPzRCkWCm8pr90k9VUexLxt9v9rxyyOx6eZVI=; b=qvdKVi7OmtmdN0Wht883/Cdn+50YyLrCv71DUx6myJNDz+sauQ2epVGSmYTxkMxzUpwc17 2cefd5BECaHEdcKbA/u4PoRkFkJ2GjuTDOpnqCxiTsf7f2mm52j3BUjbADLC+a82gFiVSI poFr2xF5dV88QnN3MggUUdZDuCw1h1QsmgNr5mdhKZSK+4fuzBQCE7sfcMqX07kvMo3Eld 366mOaoS49jTJrOSAB47dy+f4+nMLaHjy13WKybyu3nFzsgNYrB41nLDsyh9b7hXNzzayM zPvVoiVDj6MbE9bx/GhXuQYYSEE/TC+WXF4tyEGW6vdwLIyD9CdrwlRbovr+Jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698428029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VV/YHokPzRCkWCm8pr90k9VUexLxt9v9rxyyOx6eZVI=; b=oAKgkf1mMWSkiF/y6XzawD6lbuJvRuZ45VZJsip5x92017NlbGkGDoKMnG4lNg31RiqQcS qZ/ieaGnqYlsspQqcoAJd6j+uZkWTG30LMozb21HNjb5jLZGJl4FMUu6S/bG+z8VX50a+n uCHl5bBy3+J8B2fHlfBwDWtIISJChNvjkKy596ABYvhTuLWYtYqyocaPB4ae02i7w+gHFS 8H49zErXy2uAIQUGUuMnb5CCNsLrg0HpKf5AoxFSNnOLmoKfLPpsLBqy9suWDS5jaiiT0Q 0cZ9O3YhXYp8E4NKUjBVIVFHXHyFDSIVo8Nv45cXh10lUvWPTsRAdy86WPG8Jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698428029; a=rsa-sha256; cv=none; b=GH6+M0W5dosK/OWa5QyT/veF+oZ3JcHNnd1r59HFUtRgZSu2roToEYtckj8TJiqct9bmKU 1U0JEWtaEvof/Xk6G95VA+f7lKUyAVfUcL+jVUhjTSK/U86zs7tft20luG1DYTMrFMC5Q3 tKFcsabitYWkynylD5hvyDfGbXezBiU4TvSY3ScBimmYLqMUV4g0CiST1YH1yN53GG432r 8D2TtMxatWGfMUri48+02CAhl/3KS/f3Vo3GoQex2Klc/9dif8cA1S6nK21h1sQ6cW7Uv3 yVIITSyBsKiXizxLCpONSyAQG4spEFcCQLz5Mr1KG4Fibegx5HX9vaesqsqEdg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SH8sT0Vv0z7mB; Fri, 27 Oct 2023 17:33:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39RHXmJv092475; Fri, 27 Oct 2023 17:33:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39RHXmI7092472; Fri, 27 Oct 2023 17:33:48 GMT (envelope-from git) Date: Fri, 27 Oct 2023 17:33:48 GMT Message-Id: <202310271733.39RHXmI7092472@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: ef161a35012f - stable/13 - bhyve: fix arguments to ioctl(VMIO_SIOCSIFFLAGS) List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: ef161a35012f187273dafc634751c5eb5db06092 Auto-Submitted: auto-generated The branch stable/13 has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=ef161a35012f187273dafc634751c5eb5db06092 commit ef161a35012f187273dafc634751c5eb5db06092 Author: Gleb Smirnoff AuthorDate: 2023-10-26 09:59:21 +0000 Commit: Mark Johnston CommitDate: 2023-10-27 17:33:34 +0000 bhyve: fix arguments to ioctl(VMIO_SIOCSIFFLAGS) ioctl(2)'s with integer argument shall pass command argument by value, not by pointer. The ioctl(2) manual page is not very clear about that. See sys/kern/sys_generic.c:sys_ioctl() near IOC_VOID. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D42366 Fixes: fd8b9c73a5a63a7aa438a73951d7a535b4f25d9a (cherry picked from commit f407a72a506d2630d60d9096c42058f12dff874e) --- usr.sbin/bhyve/net_backends.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/net_backends.c b/usr.sbin/bhyve/net_backends.c index 99781cfdcbb6..de6afab53854 100644 --- a/usr.sbin/bhyve/net_backends.c +++ b/usr.sbin/bhyve/net_backends.c @@ -238,7 +238,7 @@ tap_init(struct net_backend *be, const char *devname, goto error; } - if (ioctl(be->fd, VMIO_SIOCSIFFLAGS, &up)) { + if (ioctl(be->fd, VMIO_SIOCSIFFLAGS, up)) { WPRINTF(("tap device link up failed")); goto error; } From nobody Sat Oct 28 04:45:19 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SHRmH4Mnwz4yNyc; Sat, 28 Oct 2023 04:45: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 4SHRmH3mSMz3Rbx; Sat, 28 Oct 2023 04:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698468319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qlgd9jVxf0PRa5f6oX8g35k8i74Ku/ZxYCT+EOUltUA=; b=skn1Ubn4tB68oU0n+ozRBJEWC/mKCUt0lZdRM/t2XqczfhSKVs/riz0RiKEN04uKFakndl C6USmiOHquk/XDSnModAAQLKrGqMjIEtG4Myq5c6ZAc0DOaiu3xVxKbX41gwzYcfMPW5ZK ft+aZTscK/NZ8tuIHjJydpNFdgoG9B0WX4MiFhYWhbRVgae84F8A+uKoymuwokGP2wCbOK vQsvP+ND/lA7Mv+CcE1X3ufVc7jeSuO70qxDjcqSeU6utenmvrTxMlz5DEk+Q8B1yrcVuV dCjGKgadqX1ghHZAaLDctm2YmhcSba9FIk1RCqrVyF0VQ/DE7qDACTIqsYYjxQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698468319; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qlgd9jVxf0PRa5f6oX8g35k8i74Ku/ZxYCT+EOUltUA=; b=L44nsP3Z3qfL+KoO/7jZ1O17SkD7vMN0gVQq6ohIK9cnOHt0u4+IzxBxHsK8E9e7UMQ/JR Ohuv+nbVnwXtPzg5HE7DB4DNnfvyIML1/NrfzrkL5o+HLRCzjbtnWisNAkG1GyTcqQOnMy a/eTTREtoR0zp7o20dgeYSsT1+fC/veFgPfsGxT1IuYrR5sJpVuS0TAQBmSUymL1Iya0YF Yr5Zfh2gaBVXS72JF56SuYGk/Kir8LogLNTHyB8LRgThN4UTw2K7U9kZ4FFHjDnuhTE4pp C8UbDRCSpX6qVN/sYEO0AnbTZDqQs+igrqiXJS/jKbVJ+YZXpGdYYPiMe8mJiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698468319; a=rsa-sha256; cv=none; b=aRTU71n4L2fY5tihUDcOKZ5Ttp58QbjoPXUQLEUPFXGJsWk/sf2YPtBLe2yLRbP8R/ALWe TrZ0oJOm2ibfQxPf8PcQ8H8OogFVBoawfvE//bDg5fsODKWW5ZXfCFGQ13RN50IPAVtxcY nhkJllekncWia7FI2ZrV6d75q9BQMKf04DHP1embTDIcQNAJibCukXUjjm/G7meGDD1tFI iG/oKAclr2hYraFbCeAZBKoRNt++CAN42puCwnZrqIwpeOJHShN7V7O+9FC1qKJXDedpfZ 3ebAuu16bEY5rmQQf3ONuvenq/P0M///4HZeaOUHguCHNTEPX57UV0HLiwG4Aw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SHRmH2qmTzjZj; Sat, 28 Oct 2023 04:45:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39S4jJ0U012005; Sat, 28 Oct 2023 04:45:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39S4jJGi012002; Sat, 28 Oct 2023 04:45:19 GMT (envelope-from git) Date: Sat, 28 Oct 2023 04:45:19 GMT Message-Id: <202310280445.39S4jJGi012002@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: 6ce903e8a8a7 - stable/13 - ufs quotas: fix configuring soft quota grace time List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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: 6ce903e8a8a78cea2b8ff269c5accbf5529e3045 Auto-Submitted: auto-generated The branch stable/13 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=6ce903e8a8a78cea2b8ff269c5accbf5529e3045 commit 6ce903e8a8a78cea2b8ff269c5accbf5529e3045 Author: Mikel Lechner AuthorDate: 2023-10-21 06:08:38 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-28 04:44:44 +0000 ufs quotas: fix configuring soft quota grace time PR: 274552 (cherry picked from commit 2fee3974603bce6f2dc153eb6af459cb4f864ab4) --- sys/ufs/ufs/ufs_quota.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index 0119c5ba9eeb..8b53c4d2e61f 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -584,6 +584,15 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname) VN_LOCK_DSHARE(vp); VOP_UNLOCK(vp); *vpp = vp; + + /* + * Allow the getdq from getinoquota below to read the quota + * from file. + */ + UFS_LOCK(ump); + ump->um_qflags[type] &= ~QTF_CLOSING; + UFS_UNLOCK(ump); + /* * Save the credential of the process that turned on quotas. * Set up the time limits for this quota. @@ -598,13 +607,6 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname) ump->um_itime[type] = dq->dq_itime; dqrele(NULLVP, dq); } - /* - * Allow the getdq from getinoquota below to read the quota - * from file. - */ - UFS_LOCK(ump); - ump->um_qflags[type] &= ~QTF_CLOSING; - UFS_UNLOCK(ump); /* * Search vnodes associated with this mount point, * adding references to quota file being opened. From nobody Sat Oct 28 04:45:56 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SHRn033l9z4yP1x; Sat, 28 Oct 2023 04:45: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 4SHRn02Qtgz3Rty; Sat, 28 Oct 2023 04:45:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698468356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/3fKB8U8bIfY53ikB7lES7KSRM8NW75H38pqj1Ikz70=; b=mtrxBMbMzCWabt5SLu7ofLrqSMtTBAurnj8yCRy1jXzKdMDFEtGjVly43F/6Kdboz6q/dd Ql6L0YdyBhEZY5+RcrdoXo3ErGSX346R+yG5NoNGfisaXLszrZvSvgxc9/vsWfa4vDuCmF DIbgEHWCsZ4EYKDVeGggUxgElfUG1s6zmT0D9QQhTUhh4fe6u1KnmDsKWgjY6oF2odUNLh PNJwd5Plqw1XFDkz58WWRlBtJbicUvmzwGk3e+7FRWBeMt+zMV9h4KqEf+tC/Bk+trzPTE o+uS3c6PobEIkiWOg/V1iT1wuV/JFPD/dvtum3NeE6nGDNK4L0pUJyYRsPHdOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698468356; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/3fKB8U8bIfY53ikB7lES7KSRM8NW75H38pqj1Ikz70=; b=jMH8lE7IQwINqaHLCOWjw0w/GdENya7vnsfaSPOlS4SxSZwXgPhKM0fu775stfTxU2uxsJ foQ+lomFrHahC1jyPa07ZLf9F3eAI/yWG8h0+AtlWWb/k9lFudcEjA1BtjRysH1GN6yDHF TBYwTWKxUR6afNJiQaeMn/H/TTb32+pAWEFr1xBV8GuD4vwU1npbzn/HFITdirsy+rYpRe p46M0o+p2TK7QIPJXYlt1pJPkjJwln4OkepORmmjHs38x52fkEeNsWyxJgAIE1bh+FzWil mmKSl3bCoh3fOPPCFoZSRN4UujDR/Vep/DWXDOcHdWSsUDzz3akaiCDDYAldEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698468356; a=rsa-sha256; cv=none; b=EyvF0MlhlR2PNFJ8DXlWvoMh7xilTiXAwvytHIr8wA9c0acsEgahuaplYUWtkQHDDriNLo gXfpwpf/V5p1wENNwhIngeJgf6o4FBy/rrkTatrxkrjFCiupqAulgFf30WwatPRZttK8AD T3z5XYi0EHafE/hzzhDMDk4jS74Vi7OxCl29GNkV3lN7GZA8POvKGlngByaPE4I4H96xZ3 oFxnOLGlOLKtuwIzykTeGHb9xLkNcy07qFnYdCa60fmYowXuimfUUN0iufnAAGAs68CWEa k9+MDbI76VrqcPxmd7m7MS7LOo9Thn0teWt3uuz1nrxs1qS3apt6f6TsMxImlA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SHRn01TZqzjJg; Sat, 28 Oct 2023 04:45:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39S4juL9012239; Sat, 28 Oct 2023 04:45:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39S4juG2012236; Sat, 28 Oct 2023 04:45:56 GMT (envelope-from git) Date: Sat, 28 Oct 2023 04:45:56 GMT Message-Id: <202310280445.39S4juG2012236@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: 9db5ae255127 - stable/14 - ufs quotas: fix configuring soft quota grace time List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org 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/14 X-Git-Reftype: branch X-Git-Commit: 9db5ae255127e4b897d777d0a2fe22843644ceba Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=9db5ae255127e4b897d777d0a2fe22843644ceba commit 9db5ae255127e4b897d777d0a2fe22843644ceba Author: Mikel Lechner AuthorDate: 2023-10-21 06:08:38 +0000 Commit: Konstantin Belousov CommitDate: 2023-10-28 04:45:34 +0000 ufs quotas: fix configuring soft quota grace time MFC after: 1 week (cherry picked from commit 2fee3974603bce6f2dc153eb6af459cb4f864ab4) --- sys/ufs/ufs/ufs_quota.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/sys/ufs/ufs/ufs_quota.c b/sys/ufs/ufs/ufs_quota.c index 8f77fb3a95d2..78f539bcabd2 100644 --- a/sys/ufs/ufs/ufs_quota.c +++ b/sys/ufs/ufs/ufs_quota.c @@ -580,6 +580,15 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname, VN_LOCK_DSHARE(vp); VOP_UNLOCK(vp); *vpp = vp; + + /* + * Allow the getdq from getinoquota below to read the quota + * from file. + */ + UFS_LOCK(ump); + ump->um_qflags[type] &= ~QTF_CLOSING; + UFS_UNLOCK(ump); + /* * Save the credential of the process that turned on quotas. * Set up the time limits for this quota. @@ -594,13 +603,6 @@ quotaon(struct thread *td, struct mount *mp, int type, void *fname, ump->um_itime[type] = dq->dq_itime; dqrele(NULLVP, dq); } - /* - * Allow the getdq from getinoquota below to read the quota - * from file. - */ - UFS_LOCK(ump); - ump->um_qflags[type] &= ~QTF_CLOSING; - UFS_UNLOCK(ump); /* * Search vnodes associated with this mount point, * adding references to quota file being opened. From nobody Sat Oct 28 21:11:11 2023 X-Original-To: dev-commits-src-branches@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4SHsdq49ZNz4y2pK; Sat, 28 Oct 2023 21:11: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 4SHsdq2TsSz4SWY; Sat, 28 Oct 2023 21:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698527471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5k1rmCHHZLM2kUerXudgxyPjqgA6rR5XCJXf2VJCXCU=; b=BxuZyTA73Wnf3Q6stCoe2el+FR/MQ6LOCw1fw9XMJTgKirtiu5SG8Y9tWTq7rKF+UYYSH0 rIJ12CekT7066JHWwsChFqA64/QfHaGy5p+YpoBB+FjdVfJFB/K9HGIjm4R2p4eTXO1K0y mDDxRM0VAxn2UAMIsNs8krA1NF2qdRfOfM3A2jniAtIJRqIPRoqdmBoeK5AttNR8YElmtZ Xbt0wjfbF7zrUwBPP/l/X/uSSsNiokmF7FE5aEF6cmT7VZ6+jPYpFlSRmEHHtW/qNUV606 yVtFnhGriH93DiHdIRPfDPKRFNWUYpyItT1BnGelJx6b0x5yNnotZoWpsd92gQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1698527471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5k1rmCHHZLM2kUerXudgxyPjqgA6rR5XCJXf2VJCXCU=; b=m9NAYTtRQZjlgsYg1ueOA9PDZGXJts4rG1bmFmknK6GDtuMaC4DI6Dh+LO1uBlmPnsQNyS HLwaPdLIy1//NezaJe17VSkT8g4e9Pzy4nH8IeISvqylHRpjR70ZUCTm9D2pHvyyNW7+IH xmmbTC7qAJn0fu1e6lZBlFSo7dfd8sGsohBv0C3Ba8OeSYlFUgs22CjF1TPzhL9y0FqGVa DTsUjIOyJ+OoVKmXSRTdLLCW7yuMP+SrrA7YorVoGFPWtb9c2Y+0yGvBTZoYQaZLLeZEIm mf4R1nXbfZBfX01DM5CCFHoMvJ8KsJh3IuDznKKwjlo1mnR4X2h72t0VNltOxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1698527471; a=rsa-sha256; cv=none; b=r/flbr7e49tiu+AdZcEzVgUbJSg0qutC9yW2KwnyA2f6MTO78cd5B8wFlcUXPNb6iOIbj9 gQ6Xojv/v5PxFdnuCr/bvD60/RlYmBdVEXofj0V9XSwpoxiPPD/jBL/UnsyfqBuTqkBtfV FjzDlbY1zpA0hfJqjHmseSysi1z4rmJb2B3BhZLPg2HiRBFJ5dDHgi+zVGah0wksDRJz8w pVG6ApeAVl2Aof1BJyrFl6+JaEf5t7mdTy7Q7fAvXFFbXR3r0FvDUp8MpIRVtxivDi5hJ/ e3jCKQ8Cau7esS5bPvydHzwYosY1jqS14plF9dnfTfl8RbBeADbtig16Pib/8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4SHsdq1YXqz1BJS; Sat, 28 Oct 2023 21:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 39SLBB06055583; Sat, 28 Oct 2023 21:11:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 39SLBB8X055580; Sat, 28 Oct 2023 21:11:11 GMT (envelope-from git) Date: Sat, 28 Oct 2023 21:11:11 GMT Message-Id: <202310282111.39SLBB8X055580@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kirk McKusick Subject: git: 0bd8274c8529 - stable/14 - Fix a bug in fsck_ffs(8) triggered by corrupted filesystems. List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mckusick X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 0bd8274c8529145fb1cba77b538291545cd34c39 Auto-Submitted: auto-generated The branch stable/14 has been updated by mckusick: URL: https://cgit.FreeBSD.org/src/commit/?id=0bd8274c8529145fb1cba77b538291545cd34c39 commit 0bd8274c8529145fb1cba77b538291545cd34c39 Author: Kirk McKusick AuthorDate: 2023-10-20 22:14:46 +0000 Commit: Kirk McKusick CommitDate: 2023-10-28 21:09:36 +0000 Fix a bug in fsck_ffs(8) triggered by corrupted filesystems. Reported-by: Andreas Bock PR: 274404 (cherry picked from commit 1e39a0886e0999520a7e7136e3f7d09e9cd9a5f2) --- sbin/fsck_ffs/setup.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sbin/fsck_ffs/setup.c b/sbin/fsck_ffs/setup.c index 49e89f9221b0..d1d09d07b43a 100644 --- a/sbin/fsck_ffs/setup.c +++ b/sbin/fsck_ffs/setup.c @@ -299,6 +299,8 @@ checksnapinfo(struct inode *snapip) size = fragroundup(fs, DIP(snapip->i_dp, di_size) - lblktosize(fs, lbn)); bp = getdatablk(idesc.id_parent, size, BT_DATA); + if (bp->b_errs != 0) + return (0); snapblklist = (daddr_t *)bp->b_un.b_buf; /* * snapblklist[0] is the size of the list