From nobody Mon Jul 21 02:13:39 2025 X-Original-To: dev-commits-src-all@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 4blkTb5XLXz61xtj; Mon, 21 Jul 2025 02:13:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTb4z2Nz3Mtj; Mon, 21 Jul 2025 02:13:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Byq2GWoZsapLqJDuLirx2wC4fItkwRJ8YgmxN01ZX2Q=; b=HJWtwZhbgXMUIvvR+HAOMvT3t9m4viB/AIvIrjXDK6+8kVbwG1FE3GkxCblbFhFEAWK1QL 6JAWnDfz4L4vNSSjJMosanqjoJuveoujvC2k3sOEkBCPUliKC1hQHeeYVkYyzlDcsr2QoB YVVCNzMGFM4pd4EamIfGSlWy7oEQ5ZU0NkFMWu6WfM0lTF/ylX33e/MWmieRpuIqKCUvVt 8Gj+69up2DOM73uhawJy95Is1fcA/kMGWylwg/mqaxZ5tQONAT0/nu8IBr9WPHoRThU53j pwhNt9NJ/O914lG0e8tZ5zhGj96k2g7R7AemKwwZeLyRfZ/4NrVAzOVFPzPTqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064019; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Byq2GWoZsapLqJDuLirx2wC4fItkwRJ8YgmxN01ZX2Q=; b=YA3JIKvkceuRM482d388y2p8L6CHFlM/ZMZq5fFdlZuoe2nCy3Nm93y4I+vfofd5Sz9aFl lX4wjuGPne5mr6JITP9ltbULJoMsGQXxexVbeuZfNoU145mr/cKVd6uNvhyyJxN8ipINsK on/aVUorK4TGYy+GzgySwrp/9Vl4bqyqZIo5q8F3XJDPlWl7yAzDg9Ufzw4anjgjL3+sqz r9Twv5wQ2OVj5kETeJMae8yygvjBpuqrgdW014AqbqKSuLaegkgbM7WN9hgWOfyhjBOfcj AQ06jeN4UCu1QzaTfBC2yE4IZhk7dD9XOtdurOCZ3tlH+H3IL9170YaDOieLbQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064019; a=rsa-sha256; cv=none; b=fPK8zNa+uzNFaJRFR+p6iJvljgdimxXrS6VRzATOnXgEO+dBCfr17FyB/HVNtyM5jOHyAK gWwtoVw3dE9+qOzu12iHQq1pGuXLjwq7AkOlXdxryyoXKoi660Kw2R8jNUk/pgz0iVfKXg U4K+R8MVyJrwvLABIOmnS5VFe6DDxQYJPx09fzmVyVEWVyT4XW7nx7fZXxSgs8EbGWcs3H V36bVI8/aOVfuGP5EMVM6CDUfMos3iGf3EdhP26GBBkunylb1iEmhfFJ8PUgJtkfjRS0Sn 17WGSLP4kCklQyQKN0hRR0agf5v/4k0ZG4KnJ2K9Xicp1+sesZrAPPfAqAVviw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTb4Zk6zdym; Mon, 21 Jul 2025 02:13:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2DdXd013335; Mon, 21 Jul 2025 02:13:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2DdSp013332; Mon, 21 Jul 2025 02:13:39 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:39 GMT Message-Id: <202507210213.56L2DdSp013332@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: a2328a1338e0 - stable/14 - mk: add PLAIN_TESTS_PORCH support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a2328a1338e0bd17fc4c751228ba49b6de4ca5ec Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a2328a1338e0bd17fc4c751228ba49b6de4ca5ec commit a2328a1338e0bd17fc4c751228ba49b6de4ca5ec Author: Kyle Evans AuthorDate: 2024-10-21 01:31:50 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:23 +0000 mk: add PLAIN_TESTS_PORCH support porch(1), available via sysutils/porch, is an expect(1)-like program that uses lua instead of tcl for scripting. Imminent use will be to execute tests of tty canonicalization to ensure we don't regress some of the corner cases we've fixed, but tests for other interactive programs are being considered as well. PLAIN_TESTS_PORCH is being introduced primarily to get the metadata right without writing it out for every single test; required_programs ensures that we skip the tests if the port is not installed. Reviewed by: 0mp (previous version), ngie (cherry picked from commit 44f736c385f6b8d451feb9d6543220e8e61abcaa) --- share/mk/bsd.README | 3 +++ share/mk/plain.test.mk | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/share/mk/bsd.README b/share/mk/bsd.README index 24acc355b9b5..b68d7b66402d 100644 --- a/share/mk/bsd.README +++ b/share/mk/bsd.README @@ -702,6 +702,9 @@ PLAIN_TESTS_C The names of the plain (legacy) programs to build. PLAIN_TESTS_CXX The names of the plain (legacy) test programs to build. +PLAIN_TESTS_PORCH The names of the plain (legacy) porch(1)-based + test programs to build. + PLAIN_TESTS_SH The names of the plain (legacy) test programs to build. TAP_PERL_INTERPRETER diff --git a/share/mk/plain.test.mk b/share/mk/plain.test.mk index cc6d268185da..485a78f8ea47 100644 --- a/share/mk/plain.test.mk +++ b/share/mk/plain.test.mk @@ -43,6 +43,17 @@ TEST_INTERFACE.${_T}= plain .endfor .endif +.if !empty(PLAIN_TESTS_PORCH) +SCRIPTS+= ${PLAIN_TESTS_PORCH:S/$/.orch/} +_TESTS+= ${PLAIN_TESTS_PORCH} +.for _T in ${PLAIN_TESTS_PORCH} +SCRIPTSDIR_${_T}.orch= ${TESTSDIR} + +TEST_INTERFACE.${_T}= plain +TEST_METADATA.${_T}+= required_programs="porch" +.endfor +.endif + .if !empty(PLAIN_TESTS_SH) SCRIPTS+= ${PLAIN_TESTS_SH} _TESTS+= ${PLAIN_TESTS_SH} From nobody Mon Jul 21 02:13:40 2025 X-Original-To: dev-commits-src-all@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 4blkTd1MSbz61xnr; Mon, 21 Jul 2025 02:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTc6B4hz3N0b; Mon, 21 Jul 2025 02:13:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0csbvnz93KbFM3pBe/4Knes3aDMRCIbXmNkkXp3wSsk=; b=FtSBwtnhnNL1VcwrGm2Fh09Epb5mKPtIwy9ir9skAaH7w5Cc5mjVviuK4k+ALeLdz/3iFs JV/tLUwNyY7c4rhuJk9KUHN8VFLqAHMdwwfEtHRTjqKgnRQLXUquzVbxd9+HOC1qtS/Qas LIIyze8vInOnK+ImRQ9LNqB0PdAtGqB1yL3gZDqrut01c6O0UFxKPag2UugnOXUp+a74J1 VP2eL0L+ntZemRz8DhkVuzpiacOHCWRIj8Z0UnuRlxS5JUEfKF0hlFFbGtVrH4qfaVMf2s SjzfPMdFK4OJxenOGTLKg/iKuoDUxLpRsyoJBTrhQYgihh4hy197s5DDGarS8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064020; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0csbvnz93KbFM3pBe/4Knes3aDMRCIbXmNkkXp3wSsk=; b=sK+LzeR2r5kbt1WqpjFU38XXQZNnW5wDwNT3rugq9j7R0y2yq46tkTzOCOaE46ALMvfnjL Pz6yL/c+j0Rry21hdyGWkmJR/5vtJyE9Fd/ydB23SSglX2J0fms/OsmW7N0HLOQy7k8jcc UZJIxuGu0DosN6nS7qJXiIfFDgAClGOHudnQSdTEgVqEidwEy2YxKTT8ludCrxN7l2wmao gwSTp4ZiecOZclVaH64tvMfN0kgTg45Houi2Yu+PSb9gI+VG2Au8C3j92iC8V4H2OCbR2i CJnVEtOTtJDa5Ol8zERcb+1OO7E08427WYG89An0dDOh8kIM8yWWOwNbaMrKzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064020; a=rsa-sha256; cv=none; b=dDh+cg6ormkXrS3sxOyqc8Drlql3L2rqR/dxuN3BbvlX17/gvXJyguZ+ARTJR7/UX3rvT3 z9TiUGlWtPunBtjyUpTUKlW5RXU3e/7bktDTk6ahpo7iKZkIF/6SaYPDfF2VyFKpg2Ehe/ 7oPfUcEr8Yel9w6H6R3JXNib5TAHxIGvZh4vRL1OunEThjiFqBLqlU8iTqDin+laeL8VcJ zwZV94wuI1qXKrGtgd6oVVZFzUENMmIBOjGPjNAWoS5ViuWN+zRbykFAlAG2NW08Gmw6ue j5e0apMmF+u2Mfu0ywlCUFkp5EIO5IdpNXBnrFhJNtEbg9AOqx0cZNgNMK9ZwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTc5nYlzfdL; Mon, 21 Jul 2025 02:13:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2DeuS013376; Mon, 21 Jul 2025 02:13:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2De2s013373; Mon, 21 Jul 2025 02:13:40 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:40 GMT Message-Id: <202507210213.56L2De2s013373@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: 1bc0b2112e94 - stable/14 - tests: kern: add some porch(1)-based tty tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 1bc0b2112e94a8cb7243d9b3d229fa6ec6137368 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=1bc0b2112e94a8cb7243d9b3d229fa6ec6137368 commit 1bc0b2112e94a8cb7243d9b3d229fa6ec6137368 Author: Kyle Evans AuthorDate: 2024-10-21 01:31:59 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:24 +0000 tests: kern: add some porch(1)-based tty tests If sysutils/porch is installed, we'll do some basic testing of tty behavior. The existing tests primarily cover ICANON-related processing and corner cases that have been fixed somewhat recently, but I anticipate growing this out a bit in due time. Reviewed by: ngie (cherry picked from commit 096c39fae4ad5135a317925d8749b7d83f65ebf8) --- etc/mtree/BSD.tests.dist | 2 + tests/sys/kern/Makefile | 1 + tests/sys/kern/tty/Makefile | 12 +++ tests/sys/kern/tty/fionread.c | 21 +++++ tests/sys/kern/tty/readsz.c | 130 +++++++++++++++++++++++++++++ tests/sys/kern/tty/test_canon.orch | 102 ++++++++++++++++++++++ tests/sys/kern/tty/test_canon_fullbuf.orch | 23 +++++ tests/sys/kern/tty/test_ncanon.orch | 39 +++++++++ tests/sys/kern/tty/test_recanon.orch | 90 ++++++++++++++++++++ 9 files changed, 420 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index f29fad1395f8..6833d35bae76 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -826,6 +826,8 @@ .. pipe .. + tty + .. .. kqueue libkqueue diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index 89c993a39dc7..cb6c3066a03d 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -125,6 +125,7 @@ WARNS?= 3 TESTS_SUBDIRS+= acct TESTS_SUBDIRS+= execve TESTS_SUBDIRS+= pipe +TESTS_SUBDIRS+= tty .include diff --git a/tests/sys/kern/tty/Makefile b/tests/sys/kern/tty/Makefile new file mode 100644 index 000000000000..c362793a8b64 --- /dev/null +++ b/tests/sys/kern/tty/Makefile @@ -0,0 +1,12 @@ +TESTSDIR= ${TESTSBASE}/sys/kern/tty +BINDIR= ${TESTSDIR} + +PLAIN_TESTS_PORCH+= test_canon +PLAIN_TESTS_PORCH+= test_canon_fullbuf +PLAIN_TESTS_PORCH+= test_ncanon +PLAIN_TESTS_PORCH+= test_recanon + +PROGS+= fionread +PROGS+= readsz + +.include diff --git a/tests/sys/kern/tty/fionread.c b/tests/sys/kern/tty/fionread.c new file mode 100644 index 000000000000..929d613f883b --- /dev/null +++ b/tests/sys/kern/tty/fionread.c @@ -0,0 +1,21 @@ +/*- + * Copyright (c) 2024 Kyle Evans + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +#include +#include +#include + +int +main(void) +{ + int nb; + + assert(ioctl(STDIN_FILENO, FIONREAD, &nb) == 0); + printf("%d", nb); + return (0); +} diff --git a/tests/sys/kern/tty/readsz.c b/tests/sys/kern/tty/readsz.c new file mode 100644 index 000000000000..95dafa02472f --- /dev/null +++ b/tests/sys/kern/tty/readsz.c @@ -0,0 +1,130 @@ +/*- + * Copyright (c) 2024 Kyle Evans + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +static void +usage(void) +{ + + fprintf(stderr, "usage: %s [-b bytes | -c lines | -e] [-s buffer-size]\n", + getprogname()); + exit(1); +} + +int +main(int argc, char *argv[]) +{ + char *buf; + const char *errstr; + size_t bufsz = 0, reps; + ssize_t ret; + enum { MODE_BYTES, MODE_COUNT, MODE_EOF } mode; + int ch; + + /* + * -b specifies number of bytes. + * -c specifies number of read() calls. + * -e specifies eof (default) + * -s to pass a buffer size + * + * Reading N lines is the same as -c with a high buffer size. + */ + mode = MODE_EOF; + while ((ch = getopt(argc, argv, "b:c:es:")) != -1) { + switch (ch) { + case 'b': + mode = MODE_BYTES; + reps = strtonum(optarg, 0, SSIZE_MAX, &errstr); + if (errstr != NULL) + errx(1, "strtonum: %s", errstr); + break; + case 'c': + mode = MODE_COUNT; + reps = strtonum(optarg, 1, SSIZE_MAX, &errstr); + if (errstr != NULL) + errx(1, "strtonum: %s", errstr); + break; + case 'e': + mode = MODE_EOF; + break; + case 's': + bufsz = strtonum(optarg, 1, SSIZE_MAX, &errstr); + if (errstr != NULL) + errx(1, "strtonum: %s", errstr); + break; + default: + usage(); + } + } + + if (bufsz == 0) { + if (mode == MODE_BYTES) + bufsz = reps; + else + bufsz = LINE_MAX; + } + + buf = malloc(bufsz); + if (buf == NULL) + err(1, "malloc"); + + for (;;) { + size_t readsz; + + /* + * Be careful not to over-read if we're in byte-mode. In every other + * mode, we'll read as much as we can. + */ + if (mode == MODE_BYTES) + readsz = MIN(bufsz, reps); + else + readsz = bufsz; + + ret = read(STDIN_FILENO, buf, readsz); + if (ret == -1 && errno == EINTR) + continue; + if (ret == -1) + err(1, "read"); + if (ret == 0) { + if (mode == MODE_EOF) + return (0); + errx(1, "premature EOF"); + } + + /* Write out what we've got */ + write(STDOUT_FILENO, buf, ret); + + /* + * Bail out if we've hit our metric (byte mode / count mode). + */ + switch (mode) { + case MODE_BYTES: + reps -= ret; + if (reps == 0) + return (0); + break; + case MODE_COUNT: + reps--; + if (reps == 0) + return (0); + break; + default: + break; + } + } + + return (0); +} diff --git a/tests/sys/kern/tty/test_canon.orch b/tests/sys/kern/tty/test_canon.orch new file mode 100644 index 000000000000..28018edfdcd6 --- /dev/null +++ b/tests/sys/kern/tty/test_canon.orch @@ -0,0 +1,102 @@ +#!/usr/bin/env -S porch -f +-- +-- Copyright (c) 2024 Kyle Evans +-- +-- SPDX-License-Identifier: BSD-2-Clause +-- + +timeout(3) + +spawn("cat") + +write "Complete\r" +match "Complete\r" + +write "Basic\rIncomplete" +match "Basic\r" + +-- We shouldn't see any of the "Incomplete" line +fail(function() +end) + +match "Incomp" { + callback = function() + exit(1) + end +} + +fail(nil) + +-- Pushing a ^D along should force a flush of the tty, cat(1) will write the +-- result without a trailing newline. +write " line^D" +match "Incomplete line$" + +-- Erase! +write "Dog^H^D" +match "Do$" + +-- More erase! +write "Cat Dog^W^D" +match "Cat $" + +write "^D" +eof() + +local function fionread_test(str, expected) + spawn("fionread") + + write(str) + match(expected) +end + +-- Incomplete line +fionread_test("Hello", "0") +-- VEOF does not count +fionread_test("Hello^D", "5") +-- VEOF still doesn't count, even if the next line is an extra VEOF later +fionread_test("Hello^D^D", "5") +-- read(2) definitely won't return the second incomplete line +fionread_test("Hello^Dther", "5") +-- read(2) also won't return a second complete line at once +fionread_test("Hello^Dthere^D", "5") +-- Finally, send a VEOF to terminate a blank line and signal EOF in read(2) +fionread_test("^D", "0") + +-- \r will instead show up in the input stream to the application, so we must +-- make sure those are counted where VEOF generally wouldn't be. +fionread_test("Hello\r", "6") +fionread_test("Hello\rther", "6") +fionread_test("Hello\rthere\r", "6") +fionread_test("\r", "1") + +local function readsz_test(str, arg, expected) + spawn("readsz", table.unpack(arg)) + + if type(str) == "table" then + assert(#str == 2) + write(str[1]) + release() + + -- Give readsz a chance to consume the partial input before we send more + -- along. + sleep(1) + write(str[2]) + else + write(str) + end + match(expected) +end + +readsz_test("partial", {"-b", 3}, "^$") +readsz_test("partial^D", {"-b", 3}, "^par$") +readsz_test("partial^D", {"-c", 1}, "^partial$") +for s = 1, #"partial" do + readsz_test("partial^D", {"-s", s}, "^partial$") +end +-- Send part of the line, release and pause, then finish it. +readsz_test({"par", "tial^D"}, {"-c", 1}, "^partial$") +-- line is incomplete, so we'll just see the "partial" even if we want two +readsz_test("partial^Dline", {"-c", 2}, "^partial$") +readsz_test("partial^Dline^D", {"-c", 1}, "^partial$") +readsz_test("partial^Dline^D", {"-c", 2}, "^partialline$") diff --git a/tests/sys/kern/tty/test_canon_fullbuf.orch b/tests/sys/kern/tty/test_canon_fullbuf.orch new file mode 100644 index 000000000000..1833703e4f45 --- /dev/null +++ b/tests/sys/kern/tty/test_canon_fullbuf.orch @@ -0,0 +1,23 @@ +#!/usr/bin/env -S porch -f +-- +-- Copyright (c) 2024 Kyle Evans +-- +-- SPDX-License-Identifier: BSD-2-Clause +-- + +timeout(3) + +local TTYINQ_DATASIZE = 128 +local scream = string.rep("A", TTYINQ_DATASIZE - 1) + +spawn("cat") + +-- Fill up a whole block with screaming + VEOF +write(scream .. "^D") +match(scream .. "$") + +scream = scream .. "A" + +-- Now fill up the next block, but spill the VEOF over to a third block. +write(scream .. "^D") +match(scream .. "$") diff --git a/tests/sys/kern/tty/test_ncanon.orch b/tests/sys/kern/tty/test_ncanon.orch new file mode 100644 index 000000000000..14a34d82fa9a --- /dev/null +++ b/tests/sys/kern/tty/test_ncanon.orch @@ -0,0 +1,39 @@ +#!/usr/bin/env -S porch -f +-- +-- Copyright (c) 2024 Kyle Evans +-- +-- SPDX-License-Identifier: BSD-2-Clause +-- + +timeout(3) + +local function spawn_one(...) + spawn(...) + + stty("lflag", 0, tty.lflag.ICANON) +end + +-- We can send one byte... +spawn_one("readsz", "-c", 1) +write "H" +match "^H$" + +-- or many. +spawn_one("readsz", "-c", 1) +write "Hello" +match "^Hello$" + +-- VEOF is a normal character here, passed through as-is. +spawn_one("readsz", "-c", 1) +write "Hello^D" +match "^Hello\x04$" +spawn_one("readsz", "-c", 1) +write "^D" +match "^\x04$" + +-- Confirm that FIONREAD agrees that VEOF will be returned, even if it was sent +-- while the tty was still in canonical mode. +spawn("fionread") +write "^D" +stty("lflag", 0, tty.lflag.ICANON) +match "^1$" diff --git a/tests/sys/kern/tty/test_recanon.orch b/tests/sys/kern/tty/test_recanon.orch new file mode 100644 index 000000000000..e3943495ca5d --- /dev/null +++ b/tests/sys/kern/tty/test_recanon.orch @@ -0,0 +1,90 @@ +#!/usr/bin/env -S porch -f +-- +-- Copyright (c) 2024 Kyle Evans +-- +-- SPDX-License-Identifier: BSD-2-Clause +-- + +timeout(3) + +local TTYINQ_DATASIZE = 128 +local scream = string.rep("A", TTYINQ_DATASIZE - 1) + +local function ncanon() + stty("lflag", nil, tty.lflag.ICANON) +end + +local function canon() + stty("lflag", tty.lflag.ICANON) +end + +spawn("readsz", "-e") +ncanon() + +-- Fill up a whole block with screaming + VEOF; when it gets recanonicalized, +-- the next line should be pointing to the beginning of the next block. +write(scream .. "^D") + +canon() +match(scream .. "$") + +-- The same as above, but spilling VEOF over to the next block. +spawn("readsz", "-e") +ncanon() + +write(scream .. "A^D") + +canon() +match(scream .. "A$") + +-- We'll do it again, except with one character spilled over to the next block +-- before we recanonicalize. We should then have the scream, followed by a +-- partial line containing the spill over. +spawn("cat") +ncanon() + +write(scream .. "^DZ") + +canon() +match(scream .. "$") + +-- Sending "B^D" should give us "ZB" to make sure that we didn't lose anything +-- at the beginning of the next block. + +write("B^D") +match("^ZB$") + +-- Next we'll VEOF at the beginning. +spawn("readsz", "-e") +ncanon() + +write("^D") +match("^$") + +-- Finally, we'll trigger recanonicalization with an empty buffer. This one is +-- just about avoiding a panic. +spawn("true") + +ncanon() +canon() +release() +eof() + +spawn("readsz", "-c", "1") + +write("Test^Dfoo") +ncanon() + +match("^Test\x04foo$") + +-- Finally, swap VEOF out with ^F; before recent changes, we would remain +-- canonicalized at Test^D and the kernel would block on it unless a short +-- buffer was used since VEOF would not appear within the canonicalized bit. +spawn("readsz", "-c", 1) + +write("Test^DLine^F") +stty("cc", { + VEOF = "^F" +}) + +match("^Test\x04Line$") From nobody Mon Jul 21 02:13:41 2025 X-Original-To: dev-commits-src-all@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 4blkTf3z5rz61xT1; Mon, 21 Jul 2025 02:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTf00Zyz3Mlf; Mon, 21 Jul 2025 02:13:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CKVgpoW9zBVT0TG9HrNQ+Z2YFPqyM8STwhv1HqXZS0I=; b=YYRAWbrt4Ty92QPRmZwk+zWTRcdd0oEzNAsFOvqWWy4luXgVCPT8ymk2VLeM2YDyMwVMmy BjzBEV6rRnyJ9sTh9fb9TvoJDPEY6uG2Qv3jFZgsq0LOGZlAS2ABJTCD8z2B/8vz3qPwLV 5k83RgKwQAVEC0Gam9YAfepycmZu5xzi3HM2cQ13Hl9KdetDClThj3oH1g1zP5LL4Vl+f9 Wk8OF9yVBhqFxXgd2hHTg33U+hzoOPFGfQQpHa2RxNIPW6OBd5KwIFklhh/hWrCz+Ly1M5 3YVTfMy6rfsv0ERBua7oTi3jmDZ4oDtkZgP4QN5f/+HsEeL5sOUbAScmazD0Ag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CKVgpoW9zBVT0TG9HrNQ+Z2YFPqyM8STwhv1HqXZS0I=; b=SJILcYOBoReZ9CaKi9si/JjcDznirIhhVEJJQKx3LMB3MBiru3nyS/957xhqCJeMxn8X+b LPI6b8XZhqwGlCy2xxGse0nYw8LZI04W9f6AwsKXrz2Q2n+bYx++mTXw5+EFVYHRJ0x7A/ uQOIZAKkXb/HUKVG8uPny+NfPDCatIpVldOl9LXkdIe7g7roiaR/Tc+7f0PTi50EcJKDKF 5dEsngonHjwxIFU9R6Fa6l5sR2W2/E2zo2EyLKCJ4ge3YdQ4l4ttLL72r7MO/I4aiz8w34 TL/D2YfU0hQy61S0Gw0MkQZ61jbfup2p7974HR0YKqaAWTZ1hzBR5gQsJztApA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064022; a=rsa-sha256; cv=none; b=H5MZ+h+c2s2edYQ8eMDSvznARLemVuNUPzCevXVPQkP7BKI9O6CXe9JRahUbwHGEygMxJ5 5lDze9ziHo5Q1Zd/XJd69SSHTe3p4IzUrFa31TNFU4HxZZ5ijfRXw43Hq9h/B1pvbeF3JV D66N0qxbtdSfvwnMB9ClcSHlib9tp2pbhQkErf1lXkrqj+wgOgh5j3ndglKhyoaI55LP2B 7CgDMXGG1Q+dpIuQhEckjn7O/tHOdQk6bAB4KtD2EBCXxDHyxWyKG0bUgMRTIs9jxlucbl Uanrw2PTIwiRdeCKwfXHJlTS+qS2CpbM1QTRHza6QTaNEB/aye7kwYVLOz2sOA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTd6kBbzfgZ; Mon, 21 Jul 2025 02:13:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2Dfmp013410; Mon, 21 Jul 2025 02:13:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2DfHq013407; Mon, 21 Jul 2025 02:13:41 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:41 GMT Message-Id: <202507210213.56L2DfHq013407@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: 9e09ab407983 - stable/14 - loader: Fix orb position List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 9e09ab407983bcda008d4047f33e7de68d1d1c41 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=9e09ab407983bcda008d4047f33e7de68d1d1c41 commit 9e09ab407983bcda008d4047f33e7de68d1d1c41 Author: Emmanuel Vadot AuthorDate: 2025-01-07 08:57:57 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:24 +0000 loader: Fix orb position Fix the orb position to be aligned with the menu Reviewed by: imp, tsoome Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 1b4e1171315398decb1ad3fceffcacf29cff218b) --- stand/lua/drawer.lua | 4 ++-- stand/lua/gfx-orb.lua | 2 +- stand/lua/gfx-orbbw.lua | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/stand/lua/drawer.lua b/stand/lua/drawer.lua index 8c4307220642..1bf741b2373e 100644 --- a/stand/lua/drawer.lua +++ b/stand/lua/drawer.lua @@ -470,9 +470,9 @@ logodefs = { } brand_position = {x = 2, y = 1} -logo_position = {x = 46, y = 4} +logo_position = {x = 40, y = 10} menu_position = {x = 5, y = 10} -frame_size = {w = 42, h = 14} +frame_size = {w = 39, h = 14} default_shift = {x = 0, y = 0} shift = default_shift diff --git a/stand/lua/gfx-orb.lua b/stand/lua/gfx-orb.lua index 00f4aeb3bceb..cd834a2d6b8e 100644 --- a/stand/lua/gfx-orb.lua +++ b/stand/lua/gfx-orb.lua @@ -45,7 +45,7 @@ return { " .---.....----.\027[m", }, requires_color = true, - shift = {x = 2, y = 3}, + shift = {x = 2, y = -1}, image = "/boot/images/freebsd-logo-rev.png", image_rl = 15 } diff --git a/stand/lua/gfx-orbbw.lua b/stand/lua/gfx-orbbw.lua index 93ffd2366196..a97174a6a5a4 100644 --- a/stand/lua/gfx-orbbw.lua +++ b/stand/lua/gfx-orbbw.lua @@ -44,6 +44,6 @@ return { " .-- `--.", " .---.....----.", }, - shift = {x = 2, y = 4}, + shift = {x = 2, y = -1}, } } From nobody Mon Jul 21 02:13:42 2025 X-Original-To: dev-commits-src-all@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 4blkTh0SNkz61xtr; Mon, 21 Jul 2025 02:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTg18N1z3Mlt; Mon, 21 Jul 2025 02:13:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WYfN8NC3ou6JROygOTOzHQsBqsDTThj4Mpg/KtNyD3E=; b=THUT707WNShTUj/gW0dYeT3LyeRQA7VxfQfpZ5te8efJwPeIP089Jeepsc+yJdpxtnx6zh iXCdHW+5SNbmJUPUjzMQfu+eubzdGBFJ7XzzzkNpzMWojA1i8DfG9/IUcEr7KhnDFtTQ0F JllZknUOC5RHMniOCXaEUnO2cYZeaXbNwtmFfFdDBDn3JYgjDUZUXJzQonRoo/girjeZKd 0IzWrPOXyy50VHPUJzwXzz6FfWSrW02h4SN/aCO5i7ANNEIGCkkwRn0MhcEWnAF/zmaR7J taKv/newFtTfArDNQC/D0LkPNfAJpV6wgbU3ZKntZrZbeJmqxzB0MXkmOaazLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WYfN8NC3ou6JROygOTOzHQsBqsDTThj4Mpg/KtNyD3E=; b=KgP1/LPcePVgoiRp/tt4yLqH/aFn3OsTyjj+fFfI2m4d9vpzfJtn7c8B9IIeSWPLT/fQE0 XFUkYBESCReTQwh1omwSVHCp4nsWGvpnMevzpVlKrcOs+FJ/iQ1MRJUiGw4Xz9HWZx4Z4i xAA5tYInH2Z9RGzb1DRh2fzMO4GOCt7JTMXZ/Z7GbR2Q1x89j777WShdrsCB3CB60LWpg3 u6W0Vl49EamaE55AgHacJm4hJP1mHgrDWwTr3AdCjR+qN7Crh8V83kqRwBDlFg7HqW+owL 0+7FVqi1OgUp9NIBCp8VYokxxW4dDJc1UoBbSFBJ3IQ0AHv89ICJ2HVRqnFtIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064023; a=rsa-sha256; cv=none; b=ctV4aLlM/aFjHuFz6XqflqnL3PjwVGqR5lPQFNKZw6CIiParDDWx3do5WUbhXL7HearWeN kGbXmxKp9aht2F3ry44IYDYNWH7BZWTxdJoZMLnkDhWuE5APxiw5HmlMemTgg3+4tYzydv MGLZswhqgnTy3hNRrqeL/brraOJyYVhl/ABr3w3eQO7R3ESqoLGdT47kqALUq6AF1DG79c U5wW2jRmgelZweSc8D4XeuCPlNZlSRWvWGKSEKparmAHQR672R5IzqfrvgzAFPzUEqoV4f fv9CBlKKaIKTnu76wEIXBnBAOpbcWMFf4AdIA8Rmxae8OwkBtL2VXv24L6bPNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTg0XvgzfGN; Mon, 21 Jul 2025 02:13:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2DgkW013443; Mon, 21 Jul 2025 02:13:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2Dg65013440; Mon, 21 Jul 2025 02:13:42 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:42 GMT Message-Id: <202507210213.56L2Dg65013440@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: 410197011bdf - stable/14 - loader: ficl: restore isvirtualized? List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 410197011bdfbdf25b92d94f2bf3484e44eb209b Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=410197011bdfbdf25b92d94f2bf3484e44eb209b commit 410197011bdfbdf25b92d94f2bf3484e44eb209b Author: Kyle Evans AuthorDate: 2025-05-08 04:04:17 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:24 +0000 loader: ficl: restore isvirtualized? This word was accidentally removed when gfx bindings were made optional to remove some overhead not needed for all loaders. This one isn't graphics related, so we can safely restore it without irritating anyone. Reported by: sjg Reviewed by: adrian, imp Fixes: 9c8bf69a53f ("loader: Only create gfx 4th bindings when [...]") (cherry picked from commit 354fb783e6d5ff9abcb6529cbb17cbb2ff6a7375) --- stand/ficl/loader.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/stand/ficl/loader.c b/stand/ficl/loader.c index 69a65ebedb73..32ec2d6fc172 100644 --- a/stand/ficl/loader.c +++ b/stand/ficl/loader.c @@ -864,6 +864,9 @@ void ficlCompilePlatform(FICL_SYSTEM *pSys) dictAppendWord(dp, "ccall", ficlCcall, FW_DEFAULT); dictAppendWord(dp, "uuid-from-string", ficlUuidFromString, FW_DEFAULT); dictAppendWord(dp, "uuid-to-string", ficlUuidToString, FW_DEFAULT); +#ifndef TESTMAIN + dictAppendWord(dp, "isvirtualized?", ficlIsvirtualizedQ, FW_DEFAULT); +#endif SET_FOREACH(fnpp, X4th_compile_set) (*fnpp)(pSys); From nobody Mon Jul 21 02:13:44 2025 X-Original-To: dev-commits-src-all@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 4blkTj00kTz61xW1; Mon, 21 Jul 2025 02:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTh1l8Bz3NDs; Mon, 21 Jul 2025 02:13:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HYlf/UFxbAHEStE852Nj7FGq5ya28DS+Tg46rCxr1Fw=; b=BeEMYil/BzHGAOgv7zZ4WVX9X3qLlO2FYUtttoDwOQ2qT05IgfZ1CDIc4Bv3EJvBDh55pe 9dGQvLWOGvX9CJ26Nn9R5glI3Jkm4BbaMdgKE/ozoZEoB9mTAJaKhUPtjkr0Hrc3GkaDs6 o7pxYgrqwrRPU5fWiRhycSjwodshqFkohoUx9JcA0xxWmFds5Nzoyp+JUL973XHk7reae+ xqc5pdKoyFOEphtS07HfLC9FCC2yDiIjUDyBaQNyk/tAqulysPPDSKvPXYrsUFBVMaB2Y9 cRZaSyB0GDGwgYy8482u0qrjdOVvHpRqGPTsBBhNfTWQgeLq1i+v+ih8IUEqzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064024; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HYlf/UFxbAHEStE852Nj7FGq5ya28DS+Tg46rCxr1Fw=; b=B0HnEMTHZltFzaYCrfJekNAcNx5toziZQHSnUS/cmfCXZME2qeYjMV0tHVvxMddQ+nXuUO BzcHqpXRj3HPHRkzaGomdMQpq+D/JuwEZHznwatwJp9EMdsAe4iVp9RvEeGyE3zKCrFR4T zt4+GWcW7vnflE5961EJij9nnfFEctcwjEsyk6Q7aHVbvyBOKAx+KkIGnyshGGRKOBSEj1 yIGuAq5l6uyHfRyxqX7lBi7LrkC5JHykFWW7XhNMH/pSxybBb98IGy05vGlBuDBGBIalVr +0vpTSPNiFaGlwWXzv29tA3Bo3i5c59o93QQ9xIm7sc910v1IqSQVb2GuqDGYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064024; a=rsa-sha256; cv=none; b=QIdA8Hdwp8Qq3ap1myNy1J8B7vNwtQFJYY0gF3P7QWGY0PZsGiYbU/9W1nuoe1R7cBQaeO KUcgO4zrVzH9PN4BPwRu6K17MQbxEVYl078iDj8l/7dJNbyC1d61oy6nPrLS09QUhZN3RO qvi4+QH9Br2KmcjHjIWYyWf/eg04uQe9oSN9hW+BrHKmoyiEymBMIko1ksui5/k05z6RNv q5wtJc04hWsjz6Au9PhUIysAt5+YYlMWLXGnrCsR7G1qUi7POBrZisBTHGbIt2N5h6Q1at tQMpsVilJVgT1PhNKfz56OZPZ63fBBkwmRxv6aJBbE6fiEJWz8vzgpeXvxJ25g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTh1Jw1zdjs; Mon, 21 Jul 2025 02:13:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2Di7C013476; Mon, 21 Jul 2025 02:13:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2Dibe013473; Mon, 21 Jul 2025 02:13:44 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:44 GMT Message-Id: <202507210213.56L2Dibe013473@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: 785abf57ab46 - stable/14 - Merge commit '2a7e45eef31292cf9dd82caf3346eb2acb5b6225' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 785abf57ab46cd890e5f5efc05d897b27edb2f35 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=785abf57ab46cd890e5f5efc05d897b27edb2f35 commit 785abf57ab46cd890e5f5efc05d897b27edb2f35 Author: Kyle Evans AuthorDate: 2025-05-21 01:36:07 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:24 +0000 Merge commit '2a7e45eef31292cf9dd82caf3346eb2acb5b6225' Update wireguard-tools to the latest version, which has some stubbed out support for incremental Allowed-IPs updates that we would need to add kernel support for. (cherry picked from commit 137de4b34d45192985e21f6d6163533da547fbac) --- contrib/wireguard-tools/config.c | 23 +++++++++++++++++++++++ contrib/wireguard-tools/containers.h | 5 +++++ contrib/wireguard-tools/ipc-freebsd.h | 5 +++++ contrib/wireguard-tools/ipc-uapi.h | 2 +- contrib/wireguard-tools/man/wg.8 | 8 ++++++-- contrib/wireguard-tools/set.c | 2 +- contrib/wireguard-tools/show.c | 4 ++-- contrib/wireguard-tools/version.h | 2 +- 8 files changed, 44 insertions(+), 7 deletions(-) diff --git a/contrib/wireguard-tools/config.c b/contrib/wireguard-tools/config.c index 81ccb479c367..6b8aa58700ce 100644 --- a/contrib/wireguard-tools/config.c +++ b/contrib/wireguard-tools/config.c @@ -337,6 +337,20 @@ static bool validate_netmask(struct wgallowedip *allowedip) return true; } +static inline void parse_ip_prefix(struct wgpeer *peer, uint32_t *flags, char **mask) +{ + /* If the IP is prefixed with either '+' or '-' consider this an + * incremental change. Disable WGPEER_REPLACE_ALLOWEDIPS. */ + switch ((*mask)[0]) { + case '-': + *flags |= WGALLOWEDIP_REMOVE_ME; + /* fall through */ + case '+': + peer->flags &= ~WGPEER_REPLACE_ALLOWEDIPS; + ++(*mask); + } +} + static inline bool parse_allowedips(struct wgpeer *peer, struct wgallowedip **last_allowedip, const char *value) { struct wgallowedip *allowedip = *last_allowedip, *new_allowedip; @@ -353,10 +367,18 @@ static inline bool parse_allowedips(struct wgpeer *peer, struct wgallowedip **la } sep = mutable; while ((mask = strsep(&sep, ","))) { + uint32_t flags = 0; unsigned long cidr; char *end, *ip; + parse_ip_prefix(peer, &flags, &mask); + saved_entry = strdup(mask); + if (!saved_entry) { + perror("strdup"); + free(mutable); + return false; + } ip = strsep(&mask, "/"); new_allowedip = calloc(1, sizeof(*new_allowedip)); @@ -387,6 +409,7 @@ static inline bool parse_allowedips(struct wgpeer *peer, struct wgallowedip **la else goto err; new_allowedip->cidr = cidr; + new_allowedip->flags = flags; if (!validate_netmask(new_allowedip)) fprintf(stderr, "Warning: AllowedIP has nonzero host part: %s/%s\n", ip, mask); diff --git a/contrib/wireguard-tools/containers.h b/contrib/wireguard-tools/containers.h index a82e8ddee46a..8fd813aff342 100644 --- a/contrib/wireguard-tools/containers.h +++ b/contrib/wireguard-tools/containers.h @@ -28,6 +28,10 @@ struct timespec64 { int64_t tv_nsec; }; +enum { + WGALLOWEDIP_REMOVE_ME = 1U << 0, +}; + struct wgallowedip { uint16_t family; union { @@ -35,6 +39,7 @@ struct wgallowedip { struct in6_addr ip6; }; uint8_t cidr; + uint32_t flags; struct wgallowedip *next_allowedip; }; diff --git a/contrib/wireguard-tools/ipc-freebsd.h b/contrib/wireguard-tools/ipc-freebsd.h index 446f13cacac2..58e5e71ce5cb 100644 --- a/contrib/wireguard-tools/ipc-freebsd.h +++ b/contrib/wireguard-tools/ipc-freebsd.h @@ -307,6 +307,11 @@ static int kernel_set_device(struct wgdevice *dev) nvl_aips[j] = nvlist_create(0); if (!nvl_aips[j]) goto err_peer; + if (aip->flags) { + //TODO: implement me + ret = -EOPNOTSUPP; + goto err_peer; + } nvlist_add_number(nvl_aips[j], "cidr", aip->cidr); if (aip->family == AF_INET) nvlist_add_binary(nvl_aips[j], "ipv4", &aip->ip4, sizeof(aip->ip4)); diff --git a/contrib/wireguard-tools/ipc-uapi.h b/contrib/wireguard-tools/ipc-uapi.h index f582916ecc9f..1d8a2710250a 100644 --- a/contrib/wireguard-tools/ipc-uapi.h +++ b/contrib/wireguard-tools/ipc-uapi.h @@ -89,7 +89,7 @@ static int userspace_set_device(struct wgdevice *dev) continue; } else continue; - fprintf(f, "allowed_ip=%s/%d\n", ip, allowedip->cidr); + fprintf(f, "allowed_ip=%s%s/%d\n", (allowedip->flags & WGALLOWEDIP_REMOVE_ME) ? "-" : "", ip, allowedip->cidr); } } fprintf(f, "\n"); diff --git a/contrib/wireguard-tools/man/wg.8 b/contrib/wireguard-tools/man/wg.8 index 79845391ec02..a0fc04c04cf1 100644 --- a/contrib/wireguard-tools/man/wg.8 +++ b/contrib/wireguard-tools/man/wg.8 @@ -55,7 +55,7 @@ transfer-rx, transfer-tx, persistent-keepalive. Shows the current configuration of \fI\fP in the format described by \fICONFIGURATION FILE FORMAT\fP below. .TP -\fBset\fP \fI\fP [\fIlisten-port\fP \fI\fP] [\fIfwmark\fP \fI\fP] [\fIprivate-key\fP \fI\fP] [\fIpeer\fP \fI\fP [\fIremove\fP] [\fIpreshared-key\fP \fI\fP] [\fIendpoint\fP \fI:\fP] [\fIpersistent-keepalive\fP \fI\fP] [\fIallowed-ips\fP \fI/\fP[,\fI/\fP]...] ]... +\fBset\fP \fI\fP [\fIlisten-port\fP \fI\fP] [\fIfwmark\fP \fI\fP] [\fIprivate-key\fP \fI\fP] [\fIpeer\fP \fI\fP [\fIremove\fP] [\fIpreshared-key\fP \fI\fP] [\fIendpoint\fP \fI:\fP] [\fIpersistent-keepalive\fP \fI\fP] [\fIallowed-ips\fP \fI[+|-]/\fP[,\fI[+|-]/\fP]...] ]... Sets configuration values for the specified \fI\fP. Multiple \fIpeer\fPs may be specified, and if the \fIremove\fP argument is given for a peer, that peer is removed, not configured. If \fIlisten-port\fP @@ -72,7 +72,11 @@ the device. The use of \fIpreshared-key\fP is optional, and may be omitted; it adds an additional layer of symmetric-key cryptography to be mixed into the already existing public-key cryptography, for post-quantum resistance. If \fIallowed-ips\fP is specified, but the value is the empty string, all -allowed ips are removed from the peer. The use of \fIpersistent-keepalive\fP +allowed ips are removed from the peer. By default, \fIallowed-ips\fP replaces +a peer's allowed ips. If + or - is prepended to any of the ips then +the update is incremental; ips prefixed with '+' or '' are added to the peer's +allowed ips if not present while ips prefixed with '-' are removed if present. +The use of \fIpersistent-keepalive\fP is optional and is by default off; setting it to 0 or "off" disables it. Otherwise it represents, in seconds, between 1 and 65535 inclusive, how often to send an authenticated empty packet to the peer, for the purpose of keeping diff --git a/contrib/wireguard-tools/set.c b/contrib/wireguard-tools/set.c index 75560fd8cf62..992ffa205d6b 100644 --- a/contrib/wireguard-tools/set.c +++ b/contrib/wireguard-tools/set.c @@ -18,7 +18,7 @@ int set_main(int argc, const char *argv[]) int ret = 1; if (argc < 3) { - fprintf(stderr, "Usage: %s %s [listen-port ] [fwmark ] [private-key ] [peer [remove] [preshared-key ] [endpoint :] [persistent-keepalive ] [allowed-ips /[,/]...] ]...\n", PROG_NAME, argv[0]); + fprintf(stderr, "Usage: %s %s [listen-port ] [fwmark ] [private-key ] [peer [remove] [preshared-key ] [endpoint :] [persistent-keepalive ] [allowed-ips [+|-]/[,[+|-]/]...] ]...\n", PROG_NAME, argv[0]); return 1; } diff --git a/contrib/wireguard-tools/show.c b/contrib/wireguard-tools/show.c index 3fd3d9e2a151..13777cf04280 100644 --- a/contrib/wireguard-tools/show.c +++ b/contrib/wireguard-tools/show.c @@ -312,9 +312,9 @@ static bool ugly_print(struct wgdevice *device, const char *param, bool with_int else printf("off\n"); } else if (!strcmp(param, "endpoints")) { - if (with_interface) - printf("%s\t", device->name); for_each_wgpeer(device, peer) { + if (with_interface) + printf("%s\t", device->name); printf("%s\t", key(peer->public_key)); if (peer->endpoint.addr.sa_family == AF_INET || peer->endpoint.addr.sa_family == AF_INET6) printf("%s\n", endpoint(&peer->endpoint.addr)); diff --git a/contrib/wireguard-tools/version.h b/contrib/wireguard-tools/version.h index c3ca131aadf4..0a7ef8daf041 100644 --- a/contrib/wireguard-tools/version.h +++ b/contrib/wireguard-tools/version.h @@ -1,3 +1,3 @@ #ifndef WIREGUARD_TOOLS_VERSION -#define WIREGUARD_TOOLS_VERSION "1.0.20210914" +#define WIREGUARD_TOOLS_VERSION "1.0.20250521" #endif From nobody Mon Jul 21 02:13:45 2025 X-Original-To: dev-commits-src-all@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 4blkTj592Nz61xv2; Mon, 21 Jul 2025 02:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTj2dKZz3NF1; Mon, 21 Jul 2025 02:13:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iLmS7HjVE/G+Xza35+NHDWm8hZq4jmbYCl4oqOhovvU=; b=O1P5o9WiUMW87cZXP7mmYpYRYCUdbka1SGFKJFDqzOvH3fT46znYmzMDEMFszaLvTsC6YQ E75Dg5YjULekx2UxFVg1SDVThGXfoljeL5md7AE89JzeTYG/xGg+6CmJihDVvVd9tqJrPu TJ2j6JPvmN8ZLGkeykgOVRLJ7VHi08lJgdeMIwztFxUlIMktEKHw6R72CIrcSBR9iGM7NU nWbW+q6qEk1BbqMe/PbpjCQGWhMUqnfwN6Ye9HUlboC5GXwTmTIumEXmzVDT4QPGsFDuZ8 SMIfBZuYRkFCkGFswK8/Y7Ps6YiJpomblMGzeFwUI9JcFd71Xj8GHWS7EtmEnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064025; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iLmS7HjVE/G+Xza35+NHDWm8hZq4jmbYCl4oqOhovvU=; b=Hp+kmInw8Xp4KOBX1PouXWEeU7BTk66RuQ9oeGo4a967YNxhCEsurZEGxRjE883ZZjCKVz JCbY2fGoVLVtN+1ZKDQPSQ5OWQwwhrvrZVLu9BazFVFfw+F9AYficxjWDOUY2wuP4cAjku 8Zx8HjPLJw1/nWrgLvX7Ia6MyQrdnIZh0jpdmCwa/jVFmIbZhpIh4n4hEQKKBB/E9IOPBD Hfyx3ZwNawBaWevUtUXetV7JikAxmg5gVDGxw/g/7nBiPqoB0aKvZj32WOrPEbVYmHpe6x 3RoNbGGxh8aLgZVTRCUbDe/2efy3ej6Lzhlqz0DPXWU2ySjZoCj2Pp93Ep8Cvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064025; a=rsa-sha256; cv=none; b=Lm3yundr3TY2HiaFDH1gsuy4DMXSGohCOhKS033I4KFEOEgqqAy8jgbmiwZoGwO+6sqYmm Sord7Lu6XNhfPH9XXHjcnomrMNdXukTROXC1A+BETE3hqwlFwepS4uyvXXaLOk187IaGyX lkSRF3x7dPbi8j5ppgBi/MAlzR6E5nJMbH8WysTgMA3lFt0+9kR7xoY+oporZ8PEYZQbf0 yvptr+09uMiJ+pTTr7BL8062OPRxkZaT8dfKxkGMSk5oxW+6Pmu2DbzwVA4r64t6zAX3NL 9cqAfsDUNPaqH9ICsdSsK4jJ1Ws28ef5fCl+plfafxRix0dn4Bsvqnbn3w3HHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTj2BVPzfJh; Mon, 21 Jul 2025 02:13:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2DjbS013509; Mon, 21 Jul 2025 02:13:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2Dj9l013506; Mon, 21 Jul 2025 02:13:45 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:45 GMT Message-Id: <202507210213.56L2Dj9l013506@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: f099c6b3a423 - stable/14 - kern: tty: refactor TIOCSTI privilege checks slightly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: f099c6b3a423a78c1367a11fd987457ae592924f Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=f099c6b3a423a78c1367a11fd987457ae592924f commit f099c6b3a423a78c1367a11fd987457ae592924f Author: Kyle Evans AuthorDate: 2025-05-28 01:19:17 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:25 +0000 kern: tty: refactor TIOCSTI privilege checks slightly This removes some repetition from it and makes the flow a little more obvious. Future work may find some way to add more constraints to the unprivileged path, add a security sysctl to disable it, or perhaps some combination of the two. Reviewed by: kib, markj (cherry picked from commit 59fc4cda1bfa712c46d407d1e83bdd5c63e6e0e3) --- sys/kern/tty.c | 26 +++++++++++++++++++++----- 1 file changed, 21 insertions(+), 5 deletions(-) diff --git a/sys/kern/tty.c b/sys/kern/tty.c index b1b3b268d0e9..47f9f25cec37 100644 --- a/sys/kern/tty.c +++ b/sys/kern/tty.c @@ -1643,6 +1643,24 @@ tty_set_winsize(struct tty *tp, const struct winsize *wsz) tty_signal_pgrp(tp, SIGWINCH); } +static int +tty_sti_check(struct tty *tp, int fflag, struct thread *td) +{ + /* Root can bypass all of our constraints. */ + if (priv_check(td, PRIV_TTY_STI) == 0) + return (0); + + /* Unprivileged users must have it opened for read. */ + if ((fflag & FREAD) == 0) + return (EPERM); + + /* It must also be their controlling tty. */ + if (!tty_is_ctty(tp, td->td_proc)) + return (EACCES); + + return (0); +} + static int tty_generic_ioctl(struct tty *tp, u_long cmd, void *data, int fflag, struct thread *td) @@ -1988,11 +2006,9 @@ tty_generic_ioctl(struct tty *tp, u_long cmd, void *data, int fflag, tty_info(tp); return (0); case TIOCSTI: - if ((fflag & FREAD) == 0 && priv_check(td, PRIV_TTY_STI)) - return (EPERM); - if (!tty_is_ctty(tp, td->td_proc) && - priv_check(td, PRIV_TTY_STI)) - return (EACCES); + error = tty_sti_check(tp, fflag, td); + if (error != 0) + return (error); ttydisc_rint(tp, *(char *)data, 0); ttydisc_rint_done(tp); return (0); From nobody Mon Jul 21 02:13:46 2025 X-Original-To: dev-commits-src-all@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 4blkTl0S9Yz61xff; Mon, 21 Jul 2025 02:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTk3sVdz3NFN; Mon, 21 Jul 2025 02:13:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5XEEDkL2fDAESAxsQfEQS10r0XzxXhgbn9u18T7znTM=; b=eUHNp14ZPwYMl2r3Cho1lnR4iEl+u4raMY1Qwx37Z1xsgrcepyJb3nS62FX9/B32jINxTn 2KWgyiUmHmy81JGXxTOdtEoB/X0NoDZuw0znHTW2Robl1/EGu10d31t1XcvVl/bErP6wL9 oBfxsYNAEsIavBgDFr13Qb+lZRKAcJe73pa3zRyNJH16uifBDi4Jx1WNWw2gORK1nc2jKp sWQkelZlgUdemIN4gY5bCJfsJnc7b0VbroQl3wxF+vOXwYDAjA9dodVz+QS2sviU6De/ug 5kOTw3GwMaE6AhKImDDTCzjgCQ2HUzXp9IQ+dEgZohZDVlNRDbRULQRkEgE4Kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064026; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5XEEDkL2fDAESAxsQfEQS10r0XzxXhgbn9u18T7znTM=; b=DR9+TiQ4OxqmudAWSAn+qY/AJR2N+f7VTIZ97dExKapn8Ml3clE+tFotcCTvNXyagj5rEa BZq2S6a421Zrb2UTnWqt9jE5fnHgrJ2F94tmTRDYv9TpO3pZ08y0o0TEgakjk/EUbdV9U3 u6QntB57HYHBo6YtMAzSfc1w6CUWcaaoZyl4EvIsbLXEVFSVKUK+tOimgJt6rbzWpzGD0N YYwWYIJXnH/cASxlTg1TZHVSfIZKDps0anE0Y73xE+KmGuDhZVIJjweRUsi5vKM+251eO2 xYxewQ0ErAf276BsmPZIi39D22/TgwObH6pNo+gfRk7aXWQ5HpNdZBpdT71ksA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064026; a=rsa-sha256; cv=none; b=vItfgw/IhYep6yH01jYMRRVq/wU/ct2FRayQEuAyryXxTOBaRb9ef8QrubEtVUD42spsZY ADAipreoRZzW07jfxTJe4Gnn2JQvVCr+OoIMVlhMClr6BQsiiH1RXyGwVzAtRDa1CcLO7H e6/SZ7PmRk9gr+dTyVGJMkNYUlNy2mfiucxwXPhmacV5NPTiIp28iomnKtmUNLfLxHpRv1 ruyU8BJiFLQeyc+L4fYx0f337FCIePPGJmdPECaM+HGh5SAoukQ2Wi1fX4zEkNKVDIM13y YrxG0iXg9v4FJw1c+8yD5amzvSElwYsquXp6/K11IE1IW3RF4nVqcDactrptgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTk36gwzfcC; Mon, 21 Jul 2025 02:13:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2DkVU013545; Mon, 21 Jul 2025 02:13:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2DkXs013542; Mon, 21 Jul 2025 02:13:46 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:46 GMT Message-Id: <202507210213.56L2DkXs013542@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: 793f5473aa21 - stable/14 - tests: kern: add some tests for TIOCSTI List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 793f5473aa218f773314c9c1294c7067a4d2d15d Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=793f5473aa218f773314c9c1294c7067a4d2d15d commit 793f5473aa218f773314c9c1294c7067a4d2d15d Author: Kyle Evans AuthorDate: 2025-05-28 01:19:18 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:25 +0000 tests: kern: add some tests for TIOCSTI These offer at least rudimentary coverage of TIOCSTI, ensuring that it basically works and does what it's described to do and throws errors for unprivileged use that is supposed to be blocked. Reviewed by: kib (cherry picked from commit d094dd9071cea1a2f67c5058caa4d22611da20ad) --- tests/sys/kern/tty/Makefile | 3 + tests/sys/kern/tty/test_sti.c | 337 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 340 insertions(+) diff --git a/tests/sys/kern/tty/Makefile b/tests/sys/kern/tty/Makefile index c362793a8b64..8628ab79875f 100644 --- a/tests/sys/kern/tty/Makefile +++ b/tests/sys/kern/tty/Makefile @@ -5,8 +5,11 @@ PLAIN_TESTS_PORCH+= test_canon PLAIN_TESTS_PORCH+= test_canon_fullbuf PLAIN_TESTS_PORCH+= test_ncanon PLAIN_TESTS_PORCH+= test_recanon +ATF_TESTS_C+= test_sti PROGS+= fionread PROGS+= readsz +LIBADD.test_sti= util + .include diff --git a/tests/sys/kern/tty/test_sti.c b/tests/sys/kern/tty/test_sti.c new file mode 100644 index 000000000000..f792001b4e3f --- /dev/null +++ b/tests/sys/kern/tty/test_sti.c @@ -0,0 +1,337 @@ +/*- + * Copyright (c) 2025 Kyle Evans + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +enum stierr { + STIERR_CONFIG_FETCH, + STIERR_CONFIG, + STIERR_INJECT, + STIERR_READFAIL, + STIERR_BADTEXT, + STIERR_DATAFOUND, + STIERR_ROTTY, + STIERR_WOTTY, + STIERR_WOOK, + STIERR_BADERR, + + STIERR_MAXERR +}; + +static const struct stierr_map { + enum stierr stierr; + const char *msg; +} stierr_map[] = { + { STIERR_CONFIG_FETCH, "Failed to fetch ctty configuration" }, + { STIERR_CONFIG, "Failed to configure ctty in the child" }, + { STIERR_INJECT, "Failed to inject characters via TIOCSTI" }, + { STIERR_READFAIL, "Failed to read(2) from stdin" }, + { STIERR_BADTEXT, "read(2) data did not match injected data" }, + { STIERR_DATAFOUND, "read(2) data when we did not expected to" }, + { STIERR_ROTTY, "Failed to open tty r/o" }, + { STIERR_WOTTY, "Failed to open tty w/o" }, + { STIERR_WOOK, "TIOCSTI on w/o tty succeeded" }, + { STIERR_BADERR, "Received wrong error from failed TIOCSTI" }, +}; +_Static_assert(nitems(stierr_map) == STIERR_MAXERR, + "Failed to describe all errors"); + +/* + * Inject each character of the input string into the TTY. The caller can + * assume that errno is preserved on return. + */ +static ssize_t +inject(int fileno, const char *str) +{ + size_t nb = 0; + + for (const char *walker = str; *walker != '\0'; walker++) { + if (ioctl(fileno, TIOCSTI, walker) != 0) + return (-1); + nb++; + } + + return (nb); +} + +/* + * Forks off a new process, stashes the parent's handle for the pty in *termfd + * and returns the pid. 0 for the child, >0 for the parent, as usual. + * + * Most tests fork so that we can do them while unprivileged, which we can only + * do if we're operating on our ctty (and we don't want to touch the tty of + * whatever may be running the tests). + */ +static int +init_pty(int *termfd, bool canon) +{ + int pid; + + pid = forkpty(termfd, NULL, NULL, NULL); + ATF_REQUIRE(pid != -1); + + if (pid == 0) { + struct termios term; + + /* + * Child reconfigures tty to disable echo and put it into raw + * mode if requested. + */ + if (tcgetattr(STDIN_FILENO, &term) == -1) + _exit(STIERR_CONFIG_FETCH); + term.c_lflag &= ~ECHO; + if (!canon) + term.c_lflag &= ~ICANON; + if (tcsetattr(STDIN_FILENO, TCSANOW, &term) == -1) + _exit(STIERR_CONFIG); + } + + return (pid); +} + +static void +finalize_child(pid_t pid, int signo) +{ + int status, wpid; + + while ((wpid = waitpid(pid, &status, 0)) != pid) { + if (wpid != -1) + continue; + ATF_REQUIRE_EQ_MSG(EINTR, errno, + "waitpid: %s", strerror(errno)); + } + + /* + * Some tests will signal the child for whatever reason, and we're + * expecting it to terminate it. For those cases, it's OK to just see + * that termination. For all other cases, we expect a graceful exit + * with an exit status that reflects a cause that we have an error + * mapped for. + */ + if (signo >= 0) { + ATF_REQUIRE(WIFSIGNALED(status)); + ATF_REQUIRE_EQ(signo, WTERMSIG(status)); + } else { + ATF_REQUIRE(WIFEXITED(status)); + if (WEXITSTATUS(status) != 0) { + int err = WEXITSTATUS(status); + + for (size_t i = 0; i < nitems(stierr_map); i++) { + const struct stierr_map *map = &stierr_map[i]; + + if ((int)map->stierr == err) { + atf_tc_fail("%s", map->msg); + __assert_unreachable(); + } + } + } + } +} + +ATF_TC(basic); +ATF_TC_HEAD(basic, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test for basic functionality of TIOCSTI"); + atf_tc_set_md_var(tc, "require.user", "unprivileged"); +} +ATF_TC_BODY(basic, tc) +{ + int pid, term; + + /* + * We don't canonicalize on this test because we can assume that the + * injected data will be available after TIOCSTI returns. This is all + * within a single thread for the basic test, so we simplify our lives + * slightly in raw mode. + */ + pid = init_pty(&term, false); + if (pid == 0) { + static const char sending[] = "Text"; + char readbuf[32]; + ssize_t injected, readsz; + + injected = inject(STDIN_FILENO, sending); + if (injected != sizeof(sending) - 1) + _exit(STIERR_INJECT); + + readsz = read(STDIN_FILENO, readbuf, sizeof(readbuf)); + + if (readsz < 0 || readsz != injected) + _exit(STIERR_READFAIL); + if (memcmp(readbuf, sending, readsz) != 0) + _exit(STIERR_BADTEXT); + + _exit(0); + } + + finalize_child(pid, -1); +} + +ATF_TC(root); +ATF_TC_HEAD(root, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that root can inject into another TTY"); + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(root, tc) +{ + static const char sending[] = "Text\r"; + ssize_t injected; + int pid, term; + + /* + * We leave canonicalization enabled for this one so that the read(2) + * below hangs until we have all of the data available, rather than + * having to signal OOB that it's safe to read. + */ + pid = init_pty(&term, true); + if (pid == 0) { + char readbuf[32]; + ssize_t readsz; + + readsz = read(STDIN_FILENO, readbuf, sizeof(readbuf)); + if (readsz < 0 || readsz != sizeof(sending) - 1) + _exit(STIERR_READFAIL); + + /* + * Here we ignore the trailing \r, because it won't have + * surfaced in our read(2). + */ + if (memcmp(readbuf, sending, readsz - 1) != 0) + _exit(STIERR_BADTEXT); + + _exit(0); + } + + injected = inject(term, sending); + ATF_REQUIRE_EQ_MSG(sizeof(sending) - 1, injected, + "Injected %zu characters, expected %zu", injected, + sizeof(sending) - 1); + + finalize_child(pid, -1); +} + +ATF_TC(unprivileged_fail_noctty); +ATF_TC_HEAD(unprivileged_fail_noctty, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that unprivileged cannot inject into non-controlling TTY"); + atf_tc_set_md_var(tc, "require.user", "unprivileged"); +} +ATF_TC_BODY(unprivileged_fail_noctty, tc) +{ + const char sending[] = "Text"; + ssize_t injected; + int pid, serrno, term; + + pid = init_pty(&term, false); + if (pid == 0) { + char readbuf[32]; + ssize_t readsz; + + /* + * This should hang until we get terminated by the parent. + */ + readsz = read(STDIN_FILENO, readbuf, sizeof(readbuf)); + if (readsz > 0) + _exit(STIERR_DATAFOUND); + + _exit(0); + } + + /* Should fail. */ + injected = inject(term, sending); + serrno = errno; + + /* Done with the child, just kill it now to avoid problems later. */ + kill(pid, SIGINT); + finalize_child(pid, SIGINT); + + ATF_REQUIRE_EQ_MSG(-1, (ssize_t)injected, + "TIOCSTI into non-ctty succeeded"); + ATF_REQUIRE_EQ(EACCES, serrno); +} + +ATF_TC(unprivileged_fail_noread); +ATF_TC_HEAD(unprivileged_fail_noread, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test that unprivileged cannot inject into TTY not opened for read"); + atf_tc_set_md_var(tc, "require.user", "unprivileged"); +} +ATF_TC_BODY(unprivileged_fail_noread, tc) +{ + int pid, term; + + /* + * Canonicalization actually doesn't matter for this one, we'll trust + * that the failure means we didn't inject anything. + */ + pid = init_pty(&term, true); + if (pid == 0) { + static const char sending[] = "Text"; + ssize_t injected; + int rotty, wotty; + + /* + * We open the tty both r/o and w/o to ensure we got the device + * name right; one of these will pass, one of these will fail. + */ + wotty = openat(STDIN_FILENO, "", O_EMPTY_PATH | O_WRONLY); + if (wotty == -1) + _exit(STIERR_WOTTY); + rotty = openat(STDIN_FILENO, "", O_EMPTY_PATH | O_RDONLY); + if (rotty == -1) + _exit(STIERR_ROTTY); + + /* + * This injection is expected to fail with EPERM, because it may + * be our controlling tty but it is not open for reading. + */ + injected = inject(wotty, sending); + if (injected != -1) + _exit(STIERR_WOOK); + if (errno != EPERM) + _exit(STIERR_BADERR); + + /* + * Demonstrate that it does succeed on the other fd we opened, + * which is r/o. + */ + injected = inject(rotty, sending); + if (injected != sizeof(sending) - 1) + _exit(STIERR_INJECT); + + _exit(0); + } + + finalize_child(pid, -1); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, basic); + ATF_TP_ADD_TC(tp, root); + ATF_TP_ADD_TC(tp, unprivileged_fail_noctty); + ATF_TP_ADD_TC(tp, unprivileged_fail_noread); + + return (atf_no_error()); +} From nobody Mon Jul 21 02:13:47 2025 X-Original-To: dev-commits-src-all@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 4blkTl6vT8z61xfj; Mon, 21 Jul 2025 02:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTl4JNDz3NG9; Mon, 21 Jul 2025 02:13:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rLSbwFjpifHANmFc13QXgJenve1UG+hsFh6679h4W8Q=; b=hv00yvrUzbT7BWpUE2KImIdpOwe+fprprMzl0C70tQQTML94OVVF9SK6WiE9ftkWc7B7xN TRQRUvaZH8eQ/0b+JkmHshbj97nCJMiJVqF+D6PFPde3w25k863h56Ewheeq0JiiRRJFoD NZduX+vbKn5Qf2K2XGiet6KTgN5Oba8nhgXKwG4HMTXKZVEkxwhOX3ARIcKrdn5OtJpVVU GoqVP1puZENma6pSuZ6gf3FtQyf4UG4pIgV0lxzYbsAyp+BP07MCv3UXWGeLJ5H7AehAGF 4IG0yDiAKqUPHos3mFwZqlI9rRcpADUQVBl7AeL8dCQ8x9UxA3Wg1uludEobyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064027; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rLSbwFjpifHANmFc13QXgJenve1UG+hsFh6679h4W8Q=; b=vc/0K4Ug9UhO3QkG+vm0BxM8JcHybUgDpOTYHAM+ilijZEAHcBO/uN5piG843D3DjHnYz0 yk1qeG558KoJYPLVPN10rfpDel53fHVExejm3erzyk9xBb5igYrFUuE481gBSd7t/a6Eyt Pfi9uzWOr3ktLAG7ZobOqpX5a/y/D8/A1eVp1i2Ip+bPdXYFe0lHHjvFlPeVirvC8HDfum xhIT7IRf/QFp1jtThnkgQXQXafkS/Mg+wNJmA6I4gQ7HZ6q80fq7sy1JFRZFUL4r+ThZZL xMUYqAx3tCtdD4uOK+pOXUTMI4eq/7k3pT6Freo/4kA3G/x0DLR6jKKwtMaGRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064027; a=rsa-sha256; cv=none; b=HutHJsU0IBhhxFgrgPfFyqLLMO6nPNV4ebVYzP0imXEK0n//1pi3nDm/M/FyWsyyX/9zqA 8bgBAGpWhBX1Vr8gP/T0bqnSE1wlBWE+gF9R/1K+Q75TuRCvLrBDFn3fAc0z9+3BkqJSAX babhMp9XA6Lnq9VO0xXe343bM3iyE3bCNCLNdCouyiUULcbe+rttvZAGm5AjrPX/28KyY6 S2pWyVgl12zNHn3Hcib8kfbbT5ebgzqHNymkNBvDGY1oTP2lUiNQSeOYamHSX87PyLNSBZ ofAVB2mCjNWwUZ8zdDo4pl4F9bT2IdcAUESIxDJlaiFApnA9tZ/TbBFVI1Yx5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTl3vmlzfdM; Mon, 21 Jul 2025 02:13:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2Dlpp013582; Mon, 21 Jul 2025 02:13:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2DlDU013579; Mon, 21 Jul 2025 02:13:47 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:47 GMT Message-Id: <202507210213.56L2DlDU013579@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: a934ad15516b - stable/14 - lualoader: allow graphical bits to be disabled with loader_gfx List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a934ad15516b47ff2018141381ddabab55061a56 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a934ad15516b47ff2018141381ddabab55061a56 commit a934ad15516b47ff2018141381ddabab55061a56 Author: Kyle Evans AuthorDate: 2025-06-06 14:44:14 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:25 +0000 lualoader: allow graphical bits to be disabled with loader_gfx Some people prefer the old ASCII art look and it's good to have a way to confirm that the fallbacks still work right on systems that have a functional framebuffer available. Add a loader_gfx loader.conf(5) variable to disable the eager use of graphics for these use-cases. While we're here, clean up the style in the area a little bit; the early porting that I did to lualoader did a lot of redundant ~= nil that has carried over into some of the later work. We can drop some of that, and also re-organize some of these variables to improve readability. ziaee notes that the positioning of the orb is a bit off; this is due to a change in positioning that happened in 1b4e1171315398dec ("loader: Fix orb position") to account for the image dimensions. This should be partially reverted to get it right; we shouldn't assume that we can use the same shift in gfx-* definitions for both the ASCII art and the associated image -- the {image, image_rl} pair should be converted to something more like an fbimg or gfx table that has the image, image width and a shift override to avoid messing up the ASCII positioning when disabled (or with no graphics available). Reviewed by: imp, manu, ziaee (manpages) (cherry picked from commit bef6d85b6de55e0e7adcfa1fd2e4abdcecbf9564) --- stand/defaults/loader.conf | 1 + stand/defaults/loader.conf.5 | 8 +++++++- stand/lua/drawer.lua | 30 +++++++++++++++--------------- 3 files changed, 23 insertions(+), 16 deletions(-) diff --git a/stand/defaults/loader.conf b/stand/defaults/loader.conf index 7397082ac29b..610f4e3be4f9 100644 --- a/stand/defaults/loader.conf +++ b/stand/defaults/loader.conf @@ -104,6 +104,7 @@ efi_max_resolution="1x1" # Set the max resolution for EFI loader to use: # WidthxHeight (e.g. 1920x1080) #kernels="kernel kernel.old" # Kernels to display in the boot menu kernels_autodetect="YES" # Auto-detect kernel directories in /boot +#loader_gfx="YES" # Use graphical images when available #loader_logo="orbbw" # Desired logo: orbbw, orb, fbsdbw, beastiebw, beastie, none #comconsole_speed="115200" # Set the current serial console speed #console="vidconsole" # A comma separated list of console(s) diff --git a/stand/defaults/loader.conf.5 b/stand/defaults/loader.conf.5 index 1e302172af46..2f1ced192857 100644 --- a/stand/defaults/loader.conf.5 +++ b/stand/defaults/loader.conf.5 @@ -21,7 +21,7 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.Dd July 8, 2024 +.Dd July 3, 2025 .Dt LOADER.CONF 5 .Os .Sh NAME @@ -410,6 +410,12 @@ be displayed. If set to .Dq YES , the beastie boot menu will be skipped. +.It Va loader_gfx +If set to +.Dq NO , +the ASCII art version of the brand and logo will be used even if graphical +versions are available. +Additionally, the menu frame will be drawn with ASCII art as well. .It Va loader_logo Pq Dq Li orbbw Selects a desired logo in the beastie boot menu. Possible values are: diff --git a/stand/lua/drawer.lua b/stand/lua/drawer.lua index 1bf741b2373e..013e7b43e126 100644 --- a/stand/lua/drawer.lua +++ b/stand/lua/drawer.lua @@ -213,6 +213,13 @@ local function defaultframe() return "double" end +local function gfxenabled() + return (loader.getenv("loader_gfx") or "yes"):lower() ~= "no" +end +local function gfxcapable() + return core.isFramebufferConsole() and gfx.term_putimage +end + local function drawframe() local x = menu_position.x - 3 local y = menu_position.y - 1 @@ -238,7 +245,7 @@ local function drawframe() x = x + shift.x y = y + shift.y - if core.isFramebufferConsole() and gfx.term_drawrect ~= nil then + if gfxenabled() and gfxcapable() then gfx.term_drawrect(x, y, x + w, y + h) return true end @@ -324,11 +331,9 @@ local function drawbrand() y = y + branddef.shift.y end - if core.isFramebufferConsole() and - gfx.term_putimage ~= nil and - branddef.image ~= nil then - if gfx.term_putimage(branddef.image, x, y, 0, 7, 0) - then + local gfx_requested = branddef.image and gfxenabled() + if gfx_requested and gfxcapable() then + if gfx.term_putimage(branddef.image, x, y, 0, 7, 0) then return true end end @@ -375,16 +380,11 @@ local function drawlogo() y = y + logodef.shift.y end - if core.isFramebufferConsole() and - gfx.term_putimage ~= nil and - logodef.image ~= nil then - local y1 = 15 + local gfx_requested = logodef.image and gfxenabled() + if gfx_requested and gfxcapable() then + local y1 = logodef.image_rl or 15 - if logodef.image_rl ~= nil then - y1 = logodef.image_rl - end - if gfx.term_putimage(logodef.image, x, y, 0, y + y1, 0) - then + if gfx.term_putimage(logodef.image, x, y, 0, y + y1, 0) then return true end end From nobody Mon Jul 21 02:13:48 2025 X-Original-To: dev-commits-src-all@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 4blkTm6YS4z61xW8; Mon, 21 Jul 2025 02:13:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTm5FYwz3NS7; Mon, 21 Jul 2025 02:13:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bumuwXIEJoDrKI1zwfc08imqLTJqQE9PE9eeeAwVPLk=; b=arlnWwZf2AO/zGPeQaMfQk0gZryQVtKefa2vjTApoK5nd1JiGR74JAU+L/GytH0o37ryFJ 9/Bii0BEQ3VApojfiY3Z77Pxr+z5MyEfl4BsRHvq3miBkE67/3tqWB9QDVLsZEKISKU+nl 7NmjPPDaUd9ixOs32fmSnnE7rKkySZhYPBE79Qr0O9PSr7aJqX+1LQWjbbdxQfNv3N6xnh EbRI+cPA5eWJlvJgxJZxXgacwVYPDAmIpt0Xq/AtQBIZ4O6hqmv0tBQuoAjM/HcwnsaMLX gBFejgLBLqvGmdfm4+GfM4OYeuVYJ3PJe9N1OGr8NGO/tR0s3AEX9diFSvj6KQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064028; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bumuwXIEJoDrKI1zwfc08imqLTJqQE9PE9eeeAwVPLk=; b=qutELjd95/z/FZKIgNGesYyLoymoCA4TRs8wFiQ9xjW7hwEZOPyNravD0/XY+20Tvlbb0y MWpwf0NKuHUP6ULQ8zzYMw/A6gUItVgs262k52iBaSVP8k+J/mvu3cWWpt5xVhZsYpi5cx xABEyAFRu+8eT8fCWeVjsSTgC7xVg2R252EQf6Q3A52j6A7eYh6wj1RpUjNP5Nyc2+4Owp WVMArbtAWwEA3iDfcEyOP36LtKjaFjqNibltE6Q8dmFKFwqe900GsYvI0ThwTcxIZ9DLWH RXSwnBL9GrNgFGHDfUgIglahPKW3ui4MVuOvfVOyuwV7MWeRQ9MonWlCDVgK/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064028; a=rsa-sha256; cv=none; b=jhGPYqCSw9NIdmi+cC1D7LEtiXlZtU73cb3Y/actZwaEVeh1sEUXoVW2zO43lEEyaGnF7b gYrZvtEzDFhbOX0TczXRHu4yzTAC4ter+GeAPqJbu+La4LMhqLd3zqp6EKZQv50EdS1PLl gEAUeEiIOK0kTr0Fi4Bx2pSuVEQpGRPquozwviUntMRLxYIaYHkURBJG54XmzE4l4eun5f uuFoR7M9SwOI3llC8XT9Bjh7fEwEvGy4t6H8rs/838qY2O4SbKwA36ZI1AQEwjE3ZLJFCg B0opMkT3XNlXNLAsP0XuN046u/BHzvwsHGma2uu1Fw8Z4450OKtMfFjzuv08dw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTm4p44zfgb; Mon, 21 Jul 2025 02:13:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2Dm68013615; Mon, 21 Jul 2025 02:13:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2DmVI013612; Mon, 21 Jul 2025 02:13:48 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:48 GMT Message-Id: <202507210213.56L2DmVI013612@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: 6b35b45202d5 - stable/14 - lualoader: rename loop variable to cleanup luacheck List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 6b35b45202d5855aaca0f90a5d8e948ba7dc8628 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=6b35b45202d5855aaca0f90a5d8e948ba7dc8628 commit 6b35b45202d5855aaca0f90a5d8e948ba7dc8628 Author: Kyle Evans AuthorDate: 2025-06-06 14:44:15 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:26 +0000 lualoader: rename loop variable to cleanup luacheck This shadows an `i` used for indexing earlier in the function, and we don't care that much about the name. (cherry picked from commit d0d5415881b7ed6908a2a734d893eb870b93b33f) --- stand/lua/core.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/stand/lua/core.lua b/stand/lua/core.lua index 3582720f2a81..d66d9719fdcb 100644 --- a/stand/lua/core.lua +++ b/stand/lua/core.lua @@ -280,11 +280,11 @@ function core.kernelList() -- actually find any kernels, we just assume that they know what they're -- doing and leave it alone. if default_kernel and not present[default_kernel] and #kernels > 1 then - for i = 1, #kernels do - if i == #kernels then - kernels[i] = nil + for n = 1, #kernels do + if n == #kernels then + kernels[n] = nil else - kernels[i] = kernels[i + 1] + kernels[n] = kernels[n + 1] end end end From nobody Mon Jul 21 02:13:50 2025 X-Original-To: dev-commits-src-all@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 4blkTq2w4Zz61xp4; Mon, 21 Jul 2025 02:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTq0FRCz3NGw; Mon, 21 Jul 2025 02:13:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IDeLGanJ/26D8deSTI0ziy9dJnUpvNom9lLi9IaXr4g=; b=Sspn3sQxKVzacGZBIdLYDDtoqSlLvjvxSaKd93NobrszdJ1gPdeQz3Lw0XBBDcteVSdu86 7ZapriwyVAE+CBeujapluqYO9vNPA7hROi50AQD3eBIabt4Qt3zYrnSefFBH9uWNju+o6H mx8I7BKO8AaEgSQXj5zVEwvlUYgmMIyJlVztlw1CoyJHdMth6Z0lH5MEGWNJk/0saGNWq6 V1dDjpTRr8LdMueHsWsPSYarWppR07BnslVIPUZ1d9j2wideH9nfYA3BHmxk135l17zpwE HBbh2n7GvYRZCx49jSS+nru9L6w3KZvB/dlSdrcaFkaF4TkTvztGfkOV0NO21w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064031; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IDeLGanJ/26D8deSTI0ziy9dJnUpvNom9lLi9IaXr4g=; b=a9gTAbe/Yp4fHTVv4xVUzb/QcfFRAcvGVNi5FLwNKdJPuImaePTI3YndD7Z+CKYMORSZAA szmq9XbWR3eoCKjwPsyJKoBKZYXOv7wP+TdgyPItHrTnS3M9GB+HuiNq4epMhJyaiX8Faa Law189ZJPDOWsQv+md/Ey/MiG6BJbDngPAOfdQS0tYD25bNrFMNAUw/f5iqewns75PXIyR FGKW5stj7Ois/wO9PMEvoG+aknPdxkeUgH0Q91NLpLXUq3HXgwz7/qvMnrfDMvIHkH+n8z +h8MoAaTmI1euxvfsKF3/osM+flINFuvIMW8mptojk9aomCGLm7mAgT569qr/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064031; a=rsa-sha256; cv=none; b=LY2TKoLxbWbg5C6ewJVIThSkfoCJJ3Go+Q636x7Nkd7pWjsG5sbhgg8ZwmzhYZGQg2784M k7RJry6DJ6zgpcubuIWgDrWskz29zHudyGzddb6x4I81rMZcf1vhVIK3DcWbucAgVUCUM2 768aHsv3a9/voukXbwUvI/V4nN7GEPbbEnDS6hu58A5VN7eSO8S2exLoEHPa7rUMd5fv85 aJAj7KA0KgkgY1b/5+Kv25bXBhL8pGf+vGlVXrBO8HgZ/OlGclHP4E8VAceKoQsMXTPL/o yRpAS3pQJMz0RtdxxBS7De/y4XZTovABaMMK8eEpKIxB/XmFDtDwy61A1AZFvw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTp6vwczdyn; Mon, 21 Jul 2025 02:13:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2Do3j013688; Mon, 21 Jul 2025 02:13:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2Dons013686; Mon, 21 Jul 2025 02:13:50 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:50 GMT Message-Id: <202507210213.56L2Dons013686@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: a0b8aa915469 - stable/14 - stand: lua: add a more productive comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a0b8aa91546934bb3d0e2ae30ada7a0a48522b3b Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=a0b8aa91546934bb3d0e2ae30ada7a0a48522b3b commit a0b8aa91546934bb3d0e2ae30ada7a0a48522b3b Author: Kyle Evans AuthorDate: 2025-06-13 02:31:54 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:26 +0000 stand: lua: add a more productive comment The global `shift` is a special little hack for shifting everything when the logo is gone, and we should explain that. Fixes: 33d3373faf30d ("stand: lua: convert orb to a new format [...]") (cherry picked from commit 1beab149d0b9768ad6d07501326a2060d7b0ba58) --- stand/lua/drawer.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stand/lua/drawer.lua b/stand/lua/drawer.lua index e853cc655269..01802d8e9d81 100644 --- a/stand/lua/drawer.lua +++ b/stand/lua/drawer.lua @@ -369,7 +369,9 @@ local function drawlogo() end end - -- XXX What the hell is going on here? + -- This is a special little hack for the "none" logo to re-align the + -- menu and the brand to avoid having a lot of extraneous whitespace on + -- the right side. if logodef and logodef.ascii.image == none then shift = logodef.shift else From nobody Mon Jul 21 02:13:49 2025 X-Original-To: dev-commits-src-all@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 4blkTp2bTJz61xWB; Mon, 21 Jul 2025 02:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTn6Drqz3NJs; Mon, 21 Jul 2025 02:13:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/B9ucaLRkWLxtzRCDAuVE9rbZpSBfYHM92u09oViO0c=; b=KSsmU7wgaI/2388Ilzjrru2irInXvG1YAdI4MGft/OSQYha5xoJibuvPj6DiCT1QylCgKL srKjftSVOqPGxrBxnPZUH8TgBY+Jn4aj/px5hCZ9SZaSnvqAkNV3iDTrFm5mbVJNh3RLh8 F/5Ql4TnzOgNRfCjqQZHRbXl7mQlGQjKvYiYszR4ckI2XEx0vxVlTbs036+k9kXw3wrj4Q KJjT91Gq9L9EyEXmN9hWoTYXm8wHI5dN8WKgacKerwgCjQVgf9WkcJ+CfpxsypE2IUbWoz WPaMEPP70EQnZMhptyvJVynSFqkFrP9i3zfWPoJIvwszh2Ni3VNpYnAkI61+3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064029; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/B9ucaLRkWLxtzRCDAuVE9rbZpSBfYHM92u09oViO0c=; b=eikG3BUvIcxvsf0dVS+NhGE945zd2h8Qd063x9miCkSAWHlsWahPbFmJdlTUfrwyzWn6KA i0uj6rrBHePi/DXRPZY5QGk2N+kIR4qIjXde+SNKm8fKDqCK8AQ3OInAqpmzbHELDjSx0v p5RZz0/ThzMO/GXzRi8npGzqZfhlm5KQehoxM31ba0WANbZk2MMxe7C44mMuYA5wfXYmy0 lBanFteuZhhKCw058JTp1j+Ei09iVD+oxPcp8HKJnXvuYrJ9mTantsY4q4Y9BfFF9va63C tLM3xmA18vh8f9bAINKclZzEpI4kntLWdNF7ZhpqyshnBd07oKCVfhQ2V2P1ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064029; a=rsa-sha256; cv=none; b=CmaPk99aGDpU6evh1EMgK3DbxRIKqdfO2ajOHwof2Z4FqAtEc2t2W8P8LZ+lZa4NL+eNsm BbyE9wiWPj7O7/QUwSRb/gmMGnROKBTqOEmanuGzMfFZ855hKsZW49RqJ6GPRn4CgyFGLf t+99IF540Yj2V4HaN/1K1KLJDfnbdAoRIFyGQmYVuHOKAY4L1IRu7ErbM2qn/rqiHsm0ir W1Sm4pgaAXbiwEgyn14bHEmpxuVhl6zqpOsRTwCrJmOCV6wy5Z99I86HQkNP+ztrmniQba 61mr7A3AXB+DkXdWrtbz8JrSHHfNApwZaCDqF5eeMlv3GpedlHQAYijbr1+jIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTn5pn8zfgc; Mon, 21 Jul 2025 02:13:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2Dnj3013653; Mon, 21 Jul 2025 02:13:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2Dn3B013649; Mon, 21 Jul 2025 02:13:49 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:49 GMT Message-Id: <202507210213.56L2Dn3B013649@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: 9dc4d7aef37d - stable/14 - stand: lua: convert orb to a new format that allows per-graphic shift List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 9dc4d7aef37d3c2b639bb3ed0d46c888028d7659 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=9dc4d7aef37d3c2b639bb3ed0d46c888028d7659 commit 9dc4d7aef37d3c2b639bb3ed0d46c888028d7659 Author: Kyle Evans AuthorDate: 2025-06-13 02:23:39 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:26 +0000 stand: lua: convert orb to a new format that allows per-graphic shift Previously, we had one shift that had to work for both the ASCII version and the image that we may draw if we have a framebuffer to play with. That makes it more difficult to get the positioning just right, so split them out into their own tables for convenience. While we're here, stop clipping off the bottom of the orb when the autoboot sequence is interrupted. There's plenty of space for it to move up a hair, so let's do that.. Reviewed by: imp, tsoome (cherry picked from commit 33d3373faf30d5e7a1890ab686d932c984bc4b75) --- stand/lua/drawer.lua | 104 ++++++++++++++++++++++++++++++++++-------------- stand/lua/gfx-orb.lua | 15 ++++--- stand/lua/gfx-orbbw.lua | 36 +++++++++-------- 3 files changed, 104 insertions(+), 51 deletions(-) diff --git a/stand/lua/drawer.lua b/stand/lua/drawer.lua index 013e7b43e126..e853cc655269 100644 --- a/stand/lua/drawer.lua +++ b/stand/lua/drawer.lua @@ -322,20 +322,23 @@ local function drawbrand() branddef = getBranddef(drawer.default_brand) end - local graphic = branddef.graphic + local graphic = branddef.ascii.image x = x + shift.x y = y + shift.y - if branddef.shift ~= nil then - x = x + branddef.shift.x - y = y + branddef.shift.y - end - local gfx_requested = branddef.image and gfxenabled() + local gfx_requested = branddef.fb and gfxenabled() if gfx_requested and gfxcapable() then - if gfx.term_putimage(branddef.image, x, y, 0, 7, 0) then + if branddef.fb.shift then + x = x + (branddef.fb.shift.x or 0) + y = y + (branddef.fb.shift.y or 0) + end + if gfx.term_putimage(branddef.fb.image, x, y, 0, 7, 0) then return true end + elseif branddef.ascii.shift then + x = x + (branddef.ascii.shift.x or 0) + y = y + (branddef.ascii.shift.y or 0) end draw(x, y, graphic) end @@ -351,8 +354,8 @@ local function drawlogo() local logodef = getLogodef(logo) - if logodef == nil or logodef.graphic == nil or - (not colored and logodef.requires_color) then + if logodef == nil or logodef.ascii == nil or + (not colored and logodef.ascii.requires_color) then -- Choose a sensible default if colored then logodef = getLogodef(drawer.default_color_logodef) @@ -366,7 +369,8 @@ local function drawlogo() end end - if logodef ~= nil and logodef.graphic == none then + -- XXX What the hell is going on here? + if logodef and logodef.ascii.image == none then shift = logodef.shift else shift = default_shift @@ -375,20 +379,23 @@ local function drawlogo() x = x + shift.x y = y + shift.y - if logodef ~= nil and logodef.shift ~= nil then - x = x + logodef.shift.x - y = y + logodef.shift.y - end - - local gfx_requested = logodef.image and gfxenabled() + local gfx_requested = logodef.fb and gfxenabled() if gfx_requested and gfxcapable() then - local y1 = logodef.image_rl or 15 + local y1 = logodef.fb.width or 15 - if gfx.term_putimage(logodef.image, x, y, 0, y + y1, 0) then + if logodef.fb.shift then + x = x + (logodef.fb.shift.x or 0) + y = y + (logodef.fb.shift.y or 0) + end + if gfx.term_putimage(logodef.fb.image, x, y, 0, y + y1, 0) then return true end + elseif logodef.ascii.shift then + x = x + (logodef.ascii.shift.x or 0) + y = y + (logodef.ascii.shift.y or 0) end - draw(x, y, logodef.graphic) + + draw(x, y, logodef.ascii.image) end local function drawitem(func) @@ -445,11 +452,15 @@ branddefs = { -- Indexed by valid values for loader_brand in loader.conf(5). Valid -- keys are: graphic (table depicting graphic) ["fbsd"] = { - graphic = fbsd_brand, - image = "/boot/images/freebsd-brand-rev.png", + ascii = { + image = fbsd_brand, + }, + fb = { + image = "/boot/images/freebsd-brand-rev.png", + }, }, ["none"] = { - graphic = none, + fb = { image = none }, }, } @@ -458,13 +469,19 @@ logodefs = { -- are: requires_color (boolean), graphic (table depicting graphic), and -- shift (table containing x and y). ["tribute"] = { - graphic = fbsd_brand, + ascii = { + image = fbsd_brand, + }, }, ["tributebw"] = { - graphic = fbsd_brand, + ascii = { + image = fbsd_brand, + }, }, ["none"] = { - graphic = none, + ascii = { + image = none, + }, shift = {x = 17, y = 0}, }, } @@ -484,14 +501,43 @@ drawer.default_bw_logodef = 'orbbw' -- drawer module in case it's a filesystem issue. drawer.default_fallback_logodef = 'none' --- These should go away after FreeBSD 13; only available for backwards --- compatibility with old logo- files. +-- Backwards compatibility shims for previous FreeBSD versions, please document +-- new additions +local function adapt_fb_shim(def) + -- In FreeBSD 14.x+, we have improved framebuffer support in the loader + -- and some graphics may have images that we can actually draw on the + -- screen. Those graphics may come with shifts that are distinct from + -- the ASCII version, so we move both ascii and image versions into + -- their own tables. + if not def.ascii then + def.ascii = { + image = def.graphic, + requires_color = def.requires_color, + shift = def.shift, + } + end + if def.image then + assert(not def.fb, + "Unrecognized graphic definition format") + + -- Legacy images may have adapted a shift from the ASCII + -- version, or perhaps we just didn't care enough to adjust it. + -- Steal the shift. + def.fb = { + image = def.image, + width = def.image_rl, + shift = def.shift, + } + end + return def +end + function drawer.addBrand(name, def) - branddefs[name] = def + branddefs[name] = adapt_fb_shim(def) end function drawer.addLogo(name, def) - logodefs[name] = def + logodefs[name] = adapt_fb_shim(def) end drawer.frame_styles = { diff --git a/stand/lua/gfx-orb.lua b/stand/lua/gfx-orb.lua index cd834a2d6b8e..6845d6fa07bb 100644 --- a/stand/lua/gfx-orb.lua +++ b/stand/lua/gfx-orb.lua @@ -27,7 +27,8 @@ return { logo = { - graphic = { + ascii = { + image = { " \027[31m``` \027[31;1m`\027[31m", " s` `.....---...\027[31;1m....--.``` -/\027[31m", " +o .--` \027[31;1m/y:` +.\027[31m", @@ -43,10 +44,14 @@ return { " `:` \027[31;1m`:`", " \027[31;1m.-- `--.", " .---.....----.\027[m", + }, + requires_color = true, + shift = {x = 5, y = -1}, + }, + fb = { + image = "/boot/images/freebsd-logo-rev.png", + width = 15, + shift = {x = 2, y = -2}, }, - requires_color = true, - shift = {x = 2, y = -1}, - image = "/boot/images/freebsd-logo-rev.png", - image_rl = 15 } } diff --git a/stand/lua/gfx-orbbw.lua b/stand/lua/gfx-orbbw.lua index a97174a6a5a4..135ff806b67c 100644 --- a/stand/lua/gfx-orbbw.lua +++ b/stand/lua/gfx-orbbw.lua @@ -27,23 +27,25 @@ return { logo = { - graphic = { - " ``` `", - " s` `.....---.......--.``` -/", - " +o .--` /y:` +.", - " yo`:. :o `+-", - " y/ -/` -o/", - " .- ::/sy+:.", - " / `-- /", - " `: :`", - " `: :`", - " / /", - " .- -.", - " -- -.", - " `:` `:`", - " .-- `--.", - " .---.....----.", + ascii = { + image = { + " ``` `", + " s` `.....---.......--.``` -/", + " +o .--` /y:` +.", + " yo`:. :o `+-", + " y/ -/` -o/", + " .- ::/sy+:.", + " / `-- /", + " `: :`", + " `: :`", + " / /", + " .- -.", + " -- -.", + " `:` `:`", + " .-- `--.", + " .---.....----.", + }, + shift = {x = 2, y = -1}, }, - shift = {x = 2, y = -1}, } } From nobody Mon Jul 21 02:13:53 2025 X-Original-To: dev-commits-src-all@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 4blkTs5bJ5z61y0F; Mon, 21 Jul 2025 02:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTs29fcz3NKb; Mon, 21 Jul 2025 02:13:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4CPcXfHH9lQY3G7dvXLWjyyxasNCFfgU2ej99o3pX7A=; b=WYQ9LKPf0WOw0GgJWoF18aHcAOy5Ph9WeJVX/ZrNVj+kubBj7KPWRVS7x6rzEInRiiE8tW AxNwd9wqzN8OCO1YS1U79CnnTY2YQ1htGGKx7zS20iPl2JvUdiWllyBjAMfzYBmLN/E+FW 61BT57dSEQXh75XE6VQ0KMyePC+xUyL/jx9xZyhQsCGn5lhIdvT7XClKTbqax2jPKRQM5R AR/SC4LsvozI/agUNqzMy4kpMjG6n29zxZrtivCTvDXaRBZeUSYefbEmu4yQjIsNctfc0q mTmGtVrmB2Cl4/Vfd48i1t5lUCXkk2RzMx4IwRqtc76BBZqEkSggZdvi4oe7qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064033; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4CPcXfHH9lQY3G7dvXLWjyyxasNCFfgU2ej99o3pX7A=; b=k1agGOLa0iHZetCrDdxMIJlCHa0PeP+bV96bgVrLhtHYJo5ijsMYRnLs3Ne7cH1KrCx05G gZTsbUiL+bRDqjQpM/aMRpC0xogGjuaz474oSKc2+sgnM+wlb58pzqVdxmU5lukt3UukB7 L/4rCl9ypD97iCvG3+Znr3oWBiHCIrQgP2076TgDpt3LIXlvyMIYLZZPyq42SG/KWBSINV zsOqb9JYTtlUIusR/LQ5EDMSZKU7KWfpFrBmZ1fqs9QZ5HXCXAqWu9iHSV2Jd/VYXQ0ez8 2aSdmFeXp1cTN6poTNVk3lBujSp3sJbdpkuHhfVu2dNNYIep0HfwfYidoFfv6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064033; a=rsa-sha256; cv=none; b=LISBontgl2zE14r2iEI2KAkU6SA6WClA8q8ZZ3jmrKDx8Mn+FK7QfWj8vNS4j57fMC5oTA Ijj9uzU4qqJWssoDWK66LTXZ8JZGzWwSQgsepTUv1nHr+lUQM7oQYy8VbdvK+in/MU1fT4 eiG7hwDGLz9GdPjYKsqZB1KSgMTE5x0gEiwsLhGx2iQLRl19fHeXWljK8oSUDj7aLE5Q1y Zn5Hpq6JrIjeNGoh/S1wDU37CQzYMVlRLbxCbAhyLfwRx1f6ZhDzttDEf3P4etRyK03gQc gIEfmA7lno4GQsgTF9J/5jI9PB/BalsVA9gGHjsPnNS+Xq3/A8gyCCw01hWOVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTs1lxJzfdP; Mon, 21 Jul 2025 02:13:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2Drrq013764; Mon, 21 Jul 2025 02:13:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2DrJa013761; Mon, 21 Jul 2025 02:13:53 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:53 GMT Message-Id: <202507210213.56L2DrJa013761@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: cd8ab8cecff5 - stable/14 - lualoader: adapt builtin brand/logo definitions as well List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: cd8ab8cecff5eca1b6aaf671a840ee840c8e73c7 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=cd8ab8cecff5eca1b6aaf671a840ee840c8e73c7 commit cd8ab8cecff5eca1b6aaf671a840ee840c8e73c7 Author: Kyle Evans AuthorDate: 2025-06-18 15:12:54 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:27 +0000 lualoader: adapt builtin brand/logo definitions as well While these should be moved to the new format, it wasn't my intention to force them over immediately. Downstreams may embed their own brands in drawer.lua, and we shouldn't break them for something like this. Move adapt_fb_shim() up and use it for preloaded definitions to avoid forcing the matter for now. Perhaps in the future we'll start writing out warnings for those that do need adapted. Reported by: 0x1eef on IRC (cherry picked from commit abdbd85d1b6af892c18eaae0330a146b01ff6712) --- stand/lua/drawer.lua | 68 ++++++++++++++++++++++++++++------------------------ 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/stand/lua/drawer.lua b/stand/lua/drawer.lua index 46390590352e..b8fcb0b35ba5 100644 --- a/stand/lua/drawer.lua +++ b/stand/lua/drawer.lua @@ -101,6 +101,39 @@ local function processFile(gfxname) return true end +-- Backwards compatibility shims for previous FreeBSD versions, please document +-- new additions +local function adapt_fb_shim(def) + -- In FreeBSD 14.x+, we have improved framebuffer support in the loader + -- and some graphics may have images that we can actually draw on the + -- screen. Those graphics may come with shifts that are distinct from + -- the ASCII version, so we move both ascii and image versions into + -- their own tables. + if not def.ascii then + def.ascii = { + image = def.graphic, + requires_color = def.requires_color, + shift = def.shift, + } + end + if def.image then + assert(not def.fb, + "Unrecognized graphic definition format") + + -- Legacy images may have adapted a shift from the ASCII + -- version, or perhaps we just didn't care enough to adjust it. + -- Steal the shift. + def.fb = { + image = def.image, + width = def.image_rl, + shift = def.shift, + } + end + + def.adapted = true + return def +end + local function getBranddef(brand) if brand == nil then return nil @@ -123,6 +156,8 @@ local function getBranddef(brand) end branddef = branddefs[brand] + elseif not branddef.adapted then + adapt_fb_shim(branddef) end return branddef @@ -150,6 +185,8 @@ local function getLogodef(logo) end logodef = logodefs[logo] + elseif not logodef.adapted then + adapt_fb_shim(logodef) end return logodef @@ -503,37 +540,6 @@ drawer.default_bw_logodef = 'orbbw' -- drawer module in case it's a filesystem issue. drawer.default_fallback_logodef = 'none' --- Backwards compatibility shims for previous FreeBSD versions, please document --- new additions -local function adapt_fb_shim(def) - -- In FreeBSD 14.x+, we have improved framebuffer support in the loader - -- and some graphics may have images that we can actually draw on the - -- screen. Those graphics may come with shifts that are distinct from - -- the ASCII version, so we move both ascii and image versions into - -- their own tables. - if not def.ascii then - def.ascii = { - image = def.graphic, - requires_color = def.requires_color, - shift = def.shift, - } - end - if def.image then - assert(not def.fb, - "Unrecognized graphic definition format") - - -- Legacy images may have adapted a shift from the ASCII - -- version, or perhaps we just didn't care enough to adjust it. - -- Steal the shift. - def.fb = { - image = def.image, - width = def.image_rl, - shift = def.shift, - } - end - return def -end - function drawer.addBrand(name, def) branddefs[name] = adapt_fb_shim(def) end From nobody Mon Jul 21 02:13:52 2025 X-Original-To: dev-commits-src-all@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 4blkTr6bfLz61xfs; Mon, 21 Jul 2025 02:13:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTr1TNBz3NKK; Mon, 21 Jul 2025 02:13:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vILUR2NaRtDiSkoQvepMlb4xFjGRrj9k6mnVcYt5bHk=; b=yQJSlrMOPodKM2HBexonOwAbVdcGqCNeconE6ENstNYYtBQaLDjMJKOYQCuijeqND5oSy/ lVoSMUCxks4708bm5TzrH55tV5iIA3B8R3U6HZ+tiYxNzRzKv1/fVZ/p2oNoYrQJyDAJrq Vh5Zm7drLXKoYCASwpe/BaCW75qhgDUNKn/RpR1aG0yKz1pI/2+s6UGVgqTc1pz7vmEoZa vzYAbdCivsdXtp9kE3g66tdU11JbpUYwZmzR7ofx9AK8BhAtCElFuJNbKR5aVQ2rZF8NVw VXhARLfchBKlkpYJwLi9/+nLt/ZeiWJ2CYZ93ySldog9FHPP0jCZtDXqwzDPIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vILUR2NaRtDiSkoQvepMlb4xFjGRrj9k6mnVcYt5bHk=; b=fQ8Q3UtfFkTdxAXucFybcNeZfNTD0OcGQDiClQixtKnmxiy2i6OYVVgUvPqzFGS9piPt8N 4+Oe3VnOLl5brWeKrgAV89pRLOKkuHn5VT/Ud5dZDgxqHF21WVCWac7lUAx2yHcDTVZG1G dY9Rp8NaybKjIGrfvThDgTn7wFv4iKRseYQijKbODH0W9NAHSQJS854hUvkGRphdZ1XkXk boAW1rtZ7yRd22eoFEYghEs70BN2MqZdcSLjuJ1hguQKJd9EmFVzf+JWRZBPsFBsE6Nd8R fYx59s9cfsV+sFrQfKggHQxk10+6YeBG9FQQKLXVLkYAS4LepXD3T0lExGUpXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064032; a=rsa-sha256; cv=none; b=ZuIgehiH4HQfZvQHZpf8yLKwE5UPlpXMH3SwoNAIVgncKZfhm+tEvbV0rVeBp920imKr+Y b8xi3/B+Vd0VjNbONEuv2Ovfw6ma5KZEnqb/1+i+9O1q6g3DEvm7DvpEy328ysD+NiT+il WVjktHhTCt270q2y/j7YikRF3Gzw0Iw4et4lxr4pX4ZfJ7ZZMXUtqE+W+U0tCkV0G15IdQ pSwsEByeHCZ0diiQw5uh/zffvuRdgUv7nadV/KY9gBtfj+AQWEksGL3i2BPsC+IGN/HLxd K2jbsgemAhyP/MXP1Ex1LSRDYETALwACw0rjv/pnHaEBfV5h9zc0UOA479Fw5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTr0tWDzfdN; Mon, 21 Jul 2025 02:13:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2DqHV013724; Mon, 21 Jul 2025 02:13:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2Dq7H013721; Mon, 21 Jul 2025 02:13:52 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:52 GMT Message-Id: <202507210213.56L2Dq7H013721@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: 8b6be727885d - stable/14 - loader: Fix loader_brand = none List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 8b6be727885d1b9eedae4b0e66674dc9cf2b69bb Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=8b6be727885d1b9eedae4b0e66674dc9cf2b69bb commit 8b6be727885d1b9eedae4b0e66674dc9cf2b69bb Author: Emmanuel Vadot AuthorDate: 2025-06-16 12:23:07 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:26 +0000 loader: Fix loader_brand = none Setting loader_brand to none in loader.conf now result in a lua error as we try to get a non-existant table Defines it Fixes: bef6d85b6de5 ("lualoader: allow graphical bits to be disabled with loader_gfx") Reviewed by: kevans, tsoome Sponsored by: Beckhoff Automation GmbH & Co. KG (cherry picked from commit 7e1930480bef285cca1c14c25b4fd62abdf5dabf) --- stand/lua/drawer.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stand/lua/drawer.lua b/stand/lua/drawer.lua index 01802d8e9d81..46390590352e 100644 --- a/stand/lua/drawer.lua +++ b/stand/lua/drawer.lua @@ -462,7 +462,7 @@ branddefs = { }, }, ["none"] = { - fb = { image = none }, + ascii = { image = none }, }, } From nobody Mon Jul 21 02:13:54 2025 X-Original-To: dev-commits-src-all@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 4blkTv00yfz61y0H; Mon, 21 Jul 2025 02:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTt32BDz3NKx; Mon, 21 Jul 2025 02:13:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8fPpGXYjxXoplQTSp6mv+cl7uiXk097vNgVCdvJmB2w=; b=uU0V6lDkh0wt1sD3Apzb0GVU5teq9GzCTwSrLhFsZ/bkDT6lIQblmNWSX/7PfTs8Ry3Wzb l/y8OxGgJ2tTbtaqvbA+Dl9LVjDZt+V7jmUV2Ivhz01qHRRAN97pwr+JINmMZ/OwquVHUG Vn7gZnT8Q4KwRGUif/jzkHomRbXA1T6Sq6q0C97qfoMEGkkCS2h+Adi8pDxY3BdQXr/vbk UwQEFI68fzUM+9JxI0SuBh5gh1eWEXK+2VVbivBiHWNvN1hstFjLe/9OIIj7ovcuKFQPO7 0btp16twSaHYoGjPSMyteA9OsokGx07RkW+1ST2EJGCG22FF7M8h7WhAeRPpqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064034; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8fPpGXYjxXoplQTSp6mv+cl7uiXk097vNgVCdvJmB2w=; b=jpQekMy0LL1SGxJF0Ua4IUOb3xQjFzUBkClTqm69Vwkjzvh+GCLWkHenSNJn+8OgHP2MoM cnRPLMeGmKDWuWjVb94k8cru6d2JOHTwgIo4KwY61y+LI0FcALMIqc4wJr+2vKZGuVL5iI kfqNk0AfAWSgWBuIjXzr8EEfhwRxutpgm/BGH1GD1ZPfO4UulPN8u+eHf5b08sgcbNAE6m lhvCoJQM/My+6zZqVSj8+RuGmYaTlpYLM3hsPBsZo/Zyu48TDCXNBOw4V8PRa3Dre13dFR tgRbSGWMGIkREGfoNIE72hE3STupy8UvQKLe9EpZTUggUz+kYJuliVXsuzyxyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064034; a=rsa-sha256; cv=none; b=NVcRHG/Et6FEQIHINqdyixHI479Ag48p7B7R4HoK9s/xEp13zRqs7KPfseYGfqwF3f/D5X qQaHgXOzFUch18Ce2UB5MwSIZ4NecZ1Q4NMtHfaPSxpYYjKfV4iL8bx7Psc914jQSY1nVH ttszlHflLvMvfJmT44kRcs7DxBm20coymImIaSxEU5LcvOI5JY87V7jCgug9xWHb99I7FK 7JFZia2DFOKGFkI7iQbyIUYYtPtaWFgZ9mMBBwMHWZrzwbuZ9/cwoMtxpBspwh8ZGtqe8n 072B/1BTLayF9EfBp5ntUxloAlqXkBoJCmPzsavQt/IkdWLVW2ShsMaXIcCfBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTt2Z5fzdyp; Mon, 21 Jul 2025 02:13:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2DshI013803; Mon, 21 Jul 2025 02:13:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2DsFY013800; Mon, 21 Jul 2025 02:13:54 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:54 GMT Message-Id: <202507210213.56L2DsFY013800@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: 462b13ebf6c6 - stable/14 - kern: send parent a SIGCHLD when the debugger has detached List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 462b13ebf6c6d71613ab88464b907e38492cf726 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=462b13ebf6c6d71613ab88464b907e38492cf726 commit 462b13ebf6c6d71613ab88464b907e38492cf726 Author: Kyle Evans AuthorDate: 2025-06-19 15:31:58 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:27 +0000 kern: send parent a SIGCHLD when the debugger has detached The practical scenario that leads to this is porch(1) spawning some utility and sending it a SIGSTOP as a debugging aide. The user then attaches a debugger and walks through how some specific input is processed, then detaches to allow the script to continue. When ptrace is detached, the process resumes execution but the parent is never notified and may be stuck in wait(2) for it to continue or terminate. Other platforms seem to re-suspend the process after the debugger is detached, but neither behavior seems unreasonable. Just notifying the parent that the child has resumed is a relatively low-risk departure from our current behavior and had apparently been considered in the past, based on pre-existing comments. Move p_flag and p_xsig handling into childproc_continued(), as just sending the SIGCHLD here isn't really useful without P_CONTINUED set and the other caller already sets these up as well. Reviewed by: kib, markj (cherry picked from commit ee9895e10d266b7bb0a25677aee3debdc17ab4bf) --- lib/libc/sys/ptrace.2 | 12 +++++++- lib/libc/sys/wait.2 | 8 ++++-- sys/kern/kern_sig.c | 5 ++-- sys/kern/sys_process.c | 11 +++++-- tests/sys/kern/ptrace_test.c | 68 ++++++++++++++++++++++++++++++++++++++++++++ 5 files changed, 97 insertions(+), 7 deletions(-) diff --git a/lib/libc/sys/ptrace.2 b/lib/libc/sys/ptrace.2 index 9b789a0e45b3..7aa24a3f820b 100644 --- a/lib/libc/sys/ptrace.2 +++ b/lib/libc/sys/ptrace.2 @@ -1,7 +1,7 @@ .\" $NetBSD: ptrace.2,v 1.2 1995/02/27 12:35:37 cgd Exp $ .\" .\" This file is in the public domain. -.Dd August 18, 2023 +.Dd June 19, 2025 .Dt PTRACE 2 .Os .Sh NAME @@ -473,6 +473,16 @@ This request is like PT_CONTINUE, except that it does not allow specifying an alternate place to continue execution, and after it succeeds, the traced process is no longer traced and continues execution normally. +.Pp +The parent of the traced process will be sent a +.Dv SIGCHLD +to indicate that the process has continued from a stopped state regardless of +whether the process was in a stopped state prior to the corresponding +.Dv PT_ATTACH +request. +A +.Xr wait 2 +for the traced process would indicate that it had been continued. .It Dv PT_GETREGS This request reads the traced process's machine registers into the .Do diff --git a/lib/libc/sys/wait.2 b/lib/libc/sys/wait.2 index b62ed585a333..165b79a7f36f 100644 --- a/lib/libc/sys/wait.2 +++ b/lib/libc/sys/wait.2 @@ -27,7 +27,7 @@ .\" .\" @(#)wait.2 8.2 (Berkeley) 4/19/94 .\" -.Dd June 24, 2022 +.Dd July 3, 2025 .Dt WAIT 2 .Os .Sh NAME @@ -275,6 +275,10 @@ Report the status of selected processes that have continued from a job control stop by receiving a .Dv SIGCONT signal. +.Xr ptrace 2 +can also cause a process to be continued, when a +.Dv PT_DETACH +request is issued to detach the debugger. .It Dv WNOHANG Do not block when there are no processes wishing to report status. @@ -452,7 +456,7 @@ value: .Bl -tag -width Ds .It Fn WIFCONTINUED status True if the process has not terminated, and -has continued after a job control stop. +has continued after a job control stop or detach of a debugger. This macro can be true only if the wait call specified the .Dv WCONTINUED option. diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index d8be29779386..eb5d0815caf8 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2458,8 +2458,6 @@ tdsendsignal(struct proc *p, struct thread *td, int sig, ksiginfo_t *ksi) PROC_SLOCK(p); if (p->p_numthreads == p->p_suspcount) { PROC_SUNLOCK(p); - p->p_flag |= P_CONTINUED; - p->p_xsig = SIGCONT; PROC_LOCK(p->p_pptr); childproc_continued(p); PROC_UNLOCK(p->p_pptr); @@ -3796,6 +3794,9 @@ childproc_stopped(struct proc *p, int reason) void childproc_continued(struct proc *p) { + PROC_LOCK_ASSERT(p, MA_OWNED); + p->p_flag |= P_CONTINUED; + p->p_xsig = SIGCONT; childproc_jobstate(p, CLD_CONTINUED, SIGCONT); } diff --git a/sys/kern/sys_process.c b/sys/kern/sys_process.c index a33e3fa4b73c..3fb4595bb5f7 100644 --- a/sys/kern/sys_process.c +++ b/sys/kern/sys_process.c @@ -1330,8 +1330,15 @@ kern_ptrace(struct thread *td, int req, pid_t pid, void *addr, int data) p->p_flag2 &= ~P2_PTRACE_FSTP; } - /* should we send SIGCHLD? */ - /* childproc_continued(p); */ + /* + * Send SIGCHLD and wakeup the parent as needed. It + * may be the case that they had stopped the child + * before it got ptraced, and now they're in the middle + * of a wait(2) for it to continue. + */ + PROC_LOCK(p->p_pptr); + childproc_continued(p); + PROC_UNLOCK(p->p_pptr); break; } diff --git a/tests/sys/kern/ptrace_test.c b/tests/sys/kern/ptrace_test.c index 50acda94642f..8831d298d554 100644 --- a/tests/sys/kern/ptrace_test.c +++ b/tests/sys/kern/ptrace_test.c @@ -4525,6 +4525,73 @@ ATF_TC_BODY(ptrace__PT_ATTACH_no_EINTR, tc) ATF_REQUIRE(timespeccmp(&shm->sleep_time, &twelve_sec, <=)); } +ATF_TC_WITHOUT_HEAD(ptrace__PT_DETACH_continued); +ATF_TC_BODY(ptrace__PT_DETACH_continued, tc) +{ + char buf[256]; + pid_t debuggee, debugger; + int dpipe[2] = {-1, -1}, status; + + /* Setup the debuggee's pipe, which we'll use to let it terminate. */ + ATF_REQUIRE(pipe(dpipe) == 0); + ATF_REQUIRE((debuggee = fork()) != -1); + + if (debuggee == 0) { + ssize_t readsz; + + /* + * The debuggee will just absorb everything until the parent + * closes it. In the process, we expect it to get SIGSTOP'd, + * then ptrace(2)d and finally, it should resume after we detach + * and the parent will be notified. + */ + close(dpipe[1]); + while ((readsz = read(dpipe[0], buf, sizeof(buf))) != 0) { + if (readsz > 0 || errno == EINTR) + continue; + _exit(1); + } + + _exit(0); + } + + close(dpipe[0]); + + ATF_REQUIRE(kill(debuggee, SIGSTOP) == 0); + REQUIRE_EQ(waitpid(debuggee, &status, WUNTRACED), debuggee); + ATF_REQUIRE(WIFSTOPPED(status)); + + /* Child is stopped, enter the debugger to attach/detach. */ + ATF_REQUIRE((debugger = fork()) != -1); + if (debugger == 0) { + REQUIRE_EQ(ptrace(PT_ATTACH, debuggee, 0, 0), 0); + REQUIRE_EQ(waitpid(debuggee, &status, 0), debuggee); + ATF_REQUIRE(WIFSTOPPED(status)); + REQUIRE_EQ(WSTOPSIG(status), SIGSTOP); + + REQUIRE_EQ(ptrace(PT_DETACH, debuggee, 0, 0), 0); + _exit(0); + } + + REQUIRE_EQ(waitpid(debugger, &status, 0), debugger); + ATF_REQUIRE(WIFEXITED(status)); + REQUIRE_EQ(WEXITSTATUS(status), 0); + + REQUIRE_EQ(waitpid(debuggee, &status, WCONTINUED), debuggee); + ATF_REQUIRE(WIFCONTINUED(status)); + + /* + * Closing the pipe will trigger the debuggee to exit now that the + * child has resumed following detach. + */ + close(dpipe[1]); + + REQUIRE_EQ(waitpid(debuggee, &status, 0), debuggee); + ATF_REQUIRE(WIFEXITED(status)); + REQUIRE_EQ(WEXITSTATUS(status), 0); + +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, ptrace__parent_wait_after_trace_me); @@ -4594,6 +4661,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, ptrace__PT_SC_REMOTE_getpid); ATF_TP_ADD_TC(tp, ptrace__reap_kill_stopped); ATF_TP_ADD_TC(tp, ptrace__PT_ATTACH_no_EINTR); + ATF_TP_ADD_TC(tp, ptrace__PT_DETACH_continued); return (atf_no_error()); } From nobody Mon Jul 21 02:13:56 2025 X-Original-To: dev-commits-src-all@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 4blkTw6sPZz61xrW; Mon, 21 Jul 2025 02:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTw4Vfjz3Nf6; Mon, 21 Jul 2025 02:13:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MxmpwUPmAXaCIzjChleCuxUsABb4WqoxXZehr5MNMU4=; b=sCOT6TrNgZPPcgMkKC7Ct5isolQTrbV6MtIPsEXlZh75MYzFxrkyvy0QKS2Iy04YqTXbHi rns+aePcVI6oVM6DrzOOzT5ZrndgbKyh1oba3NsMa6ssa/VQoax0Q+gHJKqgJDypGdOYUu bwJbY7LLqSZoCXUHdaPWG+P6YNokKf3cEoJ1Ei151Y925LqtUzm5QKSbnP30sraAdNZF/8 SXCh1eAg5GQCCND5SY1EDK1SZN7eK04wxyxHQfw2D0+KhYi0j/BhALTIkrmodt8wHfdsOb 0U7RxVpGAwJuVEilFWDddwCatiBkMUCeo6sf92s3oqAUgjlNkQQDcbx27iBBVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064036; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MxmpwUPmAXaCIzjChleCuxUsABb4WqoxXZehr5MNMU4=; b=sLU8kj3mCy1ZVLZp8N27F4wmxyCj8hnLDzieyFglxV+oY8QC343ichPgWuFpBxbsLbwww+ sG01t0jcTSiyO5DWExgxJUJkdjcCObBtI7O6GrnGM8hmsGvfMnfJC8r/GJN1ANiQ7NfYc/ 7q/sD+ZcibBXffSHO8h7fKHoNO0WH+y7BFlV3GaZacYIFppwPJrPwAhz2UAvq53QRlOS2K owZdOVV4UJM2KDfx9u/COGLAuOzOEnzRWlP/uB6m0IK81r7g8G5EejmWgBO8frQKBbZQHb uP3P3HBgr0ETPDz+3uhwZJnAIMEBudue37uJsHTsprYQ2KKwvacUzqQ9LxOQ4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064036; a=rsa-sha256; cv=none; b=ByY9Lqz+yDcYjl+xENRwTHL4XuhlCIyiT2vSCInZv95lAhb9+tEjBrAMNE9b/1AF3FZh/3 zKPQVIDD8C24Z2bGpgxByeU90Jd+AnpHQcMc1030p9q5NLRlkNuPb1KwP5t3pLHymbLw/H s6tkxKUGugMSsgvL4FR+k2BVNKM5w51PkiDYEkatI59+XNEmoZgvpJjnIRftL/zheyV2xd Jow/u1IH0k3TFiwyq5wm8U0N7INZELIqEARBrPr/rmeo5yqg0FquqEVwDwXaqjDlyUGtJI 1n73hhgY4ZynAFcqZuvp5Xtzg3h/9k6xlESvnux8t6Q/5ZGkAABNE9wkS91O1Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTw44j2zfDS; Mon, 21 Jul 2025 02:13:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2Dui1013873; Mon, 21 Jul 2025 02:13:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2Du3n013870; Mon, 21 Jul 2025 02:13:56 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:56 GMT Message-Id: <202507210213.56L2Du3n013870@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: 1cacf672e3ee - stable/14 - kern: wg: refactor out some repetitive bits in allowed-ip config List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 1cacf672e3ee3719b72534347cf7d5ce69cf716f Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=1cacf672e3ee3719b72534347cf7d5ce69cf716f commit 1cacf672e3ee3719b72534347cf7d5ce69cf716f Author: Kyle Evans AuthorDate: 2025-06-26 02:57:02 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:28 +0000 kern: wg: refactor out some repetitive bits in allowed-ip config The only difference in the wg_aip_add() call after IP validation is the address family. Just pull that out into a variable and avoid the two different callsites for wg_aip_add(). A future change will add a new call for each case to remove an address from the peer, so it's nice to avoid needing to repeat the logic for two different branches. Reviewed by: Aaron LI, Jason A. Donenfeld, ivy, jhb, markj (cherry picked from commit ba2607ae7dff17957d9e62ccd567ba716c168e77) --- sys/dev/wg/if_wg.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c index 2534929a1e37..9e86e1074ef5 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -2459,8 +2459,12 @@ wg_peer_add(struct wg_softc *sc, const nvlist_t *nvl) aipl = nvlist_get_nvlist_array(nvl, "allowed-ips", &allowedip_count); for (size_t idx = 0; idx < allowedip_count; idx++) { + sa_family_t ipaf; + if (!nvlist_exists_number(aipl[idx], "cidr")) continue; + + ipaf = AF_UNSPEC; cidr = nvlist_get_number(aipl[idx], "cidr"); if (nvlist_exists_binary(aipl[idx], "ipv4")) { addr = nvlist_get_binary(aipl[idx], "ipv4", &size); @@ -2468,19 +2472,23 @@ wg_peer_add(struct wg_softc *sc, const nvlist_t *nvl) err = EINVAL; goto out; } - if ((err = wg_aip_add(sc, peer, AF_INET, addr, cidr)) != 0) - goto out; + + ipaf = AF_INET; } else if (nvlist_exists_binary(aipl[idx], "ipv6")) { addr = nvlist_get_binary(aipl[idx], "ipv6", &size); if (addr == NULL || cidr > 128 || size != sizeof(struct in6_addr)) { err = EINVAL; goto out; } - if ((err = wg_aip_add(sc, peer, AF_INET6, addr, cidr)) != 0) - goto out; + + ipaf = AF_INET6; } else { continue; } + + MPASS(ipaf != AF_UNSPEC); + if ((err = wg_aip_add(sc, peer, ipaf, addr, cidr)) != 0) + goto out; } } if (remote != NULL) From nobody Mon Jul 21 02:13:55 2025 X-Original-To: dev-commits-src-all@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 4blkTv5Rfgz61xWJ; Mon, 21 Jul 2025 02:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTv4CQMz3NL5; Mon, 21 Jul 2025 02:13:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=unFdSOt/AFMc/s1VtRhiXyik3jup6lIVmhMiK+1Mr+k=; b=XVDY/vqM/xhV+KHRCK/hGpL24Rl1qslHP/P6uQzvJYA7t/1ZFfHuOKaX/qe3JKxITMAAUz 7U4Aq6QHQJTvowsLnSlPD8Si3iuXFzQdsld1aiw/DsJwq8A0EJgZM/Ki+akyEG/H9iOD8Q +qtfH18R34yHnBINpoGtA2mAhi4CE8njWD8fkyelle2TR6MmJuY4LWAu9O0t9Ibf7cAwuo I/GsKwR1LR++fcZGQ0QOjeLbazrBHOmhSi4iCg4atH0+5oPzgdQ4BDeeVL2rktqfTC1I+e CxiUIAnApQhyAz6tnkArP6icBGMYORgIzPBVKlC+SJBn44UEY8D8zzPWd++uOg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=unFdSOt/AFMc/s1VtRhiXyik3jup6lIVmhMiK+1Mr+k=; b=Q4NrUiqymJSiv5IFxjBnkLPnIkfn3ugQth89sKRzdetl2/2B2aRkG6Rq74vJ38JSq8nVug VSqLWhO/lSlzIMcZP9Tll5BnN/KtjzSIbRmSI2DQ6ioJa4oLyspaQuD0GNy6wU6CxI64X+ UVcLA1mLYjY4CIyWsxFKKYiCy3VA3ja40OdCIWHx0kY6nrlH4/AOJ3cqxibU5wdIx8mPgo P14LQ3XzEpmMCSbnoNlP8xJovzTospti9V5wW5WtU2WlLuyVpeYY/NxOgUkB8LzSevJJiT C8nrJ3s8Dl3oUMpKWQxBqa76R6AUB/GvghxJVwsEMM18vg8TiJxxZo9fouyhDw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064035; a=rsa-sha256; cv=none; b=AInbdp7BnX+GeDZlGbfOCF7gdlXkbVTo7e75xNaWZbZKhddtg4Da7LMsyn6zR/4xfIuz8b NZTwOm9aaE5nHv1/01lBkV5bpPxngc+Qd0fxFD24Gkc42fLmLcK9tyN5lgRk5YY3CaS+uu Hlw4NSnAT3xaj89fAahVBb10DKOqUBMukg5bqi8J9NMSeooeorDV6SfU75XHmmtx0PbI41 D/lrMkAGBV8Of6TPbUB13xL9j/1sZIwb+IbFUglJ9iihk5uxRCG4LoabfBRKkCUPl1sP6D yTP5xHU+fSJCmwcMsva23IpJTG7GEoZolm9YHrXpgOA+Bc+lWhF/45kyaSg28w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTv3HnRzdyq; Mon, 21 Jul 2025 02:13:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2Dt9i013838; Mon, 21 Jul 2025 02:13:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2Dt0F013835; Mon, 21 Jul 2025 02:13:55 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:55 GMT Message-Id: <202507210213.56L2Dt0F013835@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: 4354f62149b2 - stable/14 - pkill: better document ancestor-hiding List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 4354f62149b23feb7de04f73c46abc13eb34d63b Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=4354f62149b23feb7de04f73c46abc13eb34d63b commit 4354f62149b23feb7de04f73c46abc13eb34d63b Author: Kyle Evans AuthorDate: 2025-06-24 14:49:31 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:28 +0000 pkill: better document ancestor-hiding More prominently note that we'll hide ancestors in the first two paragraphs that provide an overview of pkill/pgrep. It also seems worth noting in the description of -a that we won't ever unhide the pgrep/pkill command itself, as mypid is skipped in all process iteration by way of PSKIP(). Reviewed by: allanjude, des Sponsored by: Klara, Inc. (cherry picked from commit 88a2d48d39d9845e36c8e95a9204001b11e7257e) --- bin/pkill/pkill.1 | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/bin/pkill/pkill.1 b/bin/pkill/pkill.1 index f06b448b5df8..40abbba96362 100644 --- a/bin/pkill/pkill.1 +++ b/bin/pkill/pkill.1 @@ -27,7 +27,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 5, 2020 +.Dd June 24, 2025 .Dt PKILL 1 .Os .Sh NAME @@ -71,12 +71,17 @@ The .Nm pgrep command searches the process table on the running system and prints the process IDs of all processes that match the criteria given on the command -line. +line, excluding itself and all direct ancestors unless the +.Fl a +option is specified. .Pp The .Nm pkill command searches the process table on the running system and signals all -processes that match the criteria given on the command line. +processes that match the criteria given on the command line, excluding itself +and all direct ancestors unless the +.Fl a +option is specified. .Pp The following options are available: .Bl -tag -width ".Fl F Ar pidfile" @@ -130,6 +135,16 @@ or process and all of its ancestors are excluded (unless .Fl v is used). +Note that the +.Fl a +option will not +.Dq unhide +the +.Nm pgrep +or +.Nm pkill +process itself, even with +.Fl v . .It Fl c Ar class Restrict matches to processes running with specified login class .Ar class . From nobody Mon Jul 21 02:13:57 2025 X-Original-To: dev-commits-src-all@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 4blkTy5QNNz61xvV; Mon, 21 Jul 2025 02:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTx6HWfz3NfQ; Mon, 21 Jul 2025 02:13:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=liGzPgikJ3zb8iwPapXj6Df7u66Rq00cz7p/9aaQUPo=; b=n8D9IZSKWJHTv8KGD7Z0+ebfGGxJYwBPsqFhEsCdSdT/FVBB6sBc6nvP53UiXvT70zqBfw NHFc2yrbhPeObkCZoeePLIpmWYi0fTOl5t/izqKOu2ff+w2HyClRw+1/KffF2UyXfrHeT5 3ge7ccVZatkc6Ic3hu02VVQt7+VL1CfVNP2c0zKQyJdsp5vFdggAYI/C4tFp94NEtMCKYB YbAsWY2ILsE8ZxUexwGT/7wLU4vEp/L8XlLgbydQ/UEpG7tSUjKrYVDzfY+f9miNWhuIAk +sCEfxnqLdn9KkeRyyDNqRYjxhMPZoPOeGviO/ngbnE87SAyq6MvT9c+wltY1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=liGzPgikJ3zb8iwPapXj6Df7u66Rq00cz7p/9aaQUPo=; b=H+SKgcJ7l4Dzg4hk7jHJg8qY6l6o6ixKnJZ365kCuAP43BVUZeX2KlkTDdtkbqxp+Dx6Mj bf2ELyNjAbDQIaatzvvltRA7gxiHNIW8uHm16FIU+AlA0YByrFV0Q/6qrVqgOINtZ8dsRz YwIYqpWw59/h3NMjGldYaiwI496t5oY0A9WMntQX3BBmpqBZJKlK/KLrZ9kxQxzQoNMVp/ TJsLj2e9bjg1apawIt4ng5m2L0SZyv0SMjNV3yQQMNPNq5sZ9HwGzNAR/U0Qoi9jAz5DD8 lZ1FjKF7zfLNbvJiOFvHJf6sK6BOIpVijXFZgvUxpCQ6enh7hHe5HccAEkaowQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064037; a=rsa-sha256; cv=none; b=LKv4DXjl3wd547IrUYq0Z526yC837G831ouFZKsTsLGH8fx1tX6c4ezPPJQ7legduUO8Kq yL5SpashD2yhmd6bEmBlT2iAYnMaU5vhoiDK/Ou+B+iodTBT3rNd29YoczpnC2szVONd+0 +CKc9Sgz/f7gM+18gRcQ+30xwafT9otL7FIuqKLFfZot6XEOSSq9acITKmYlvoYWQ2kdNO UjUtf+uvWAWQirjNuM9RBnQ/FhW30+9SWozyfqMx7Hi4gqNiAPCEdUI2fp+YZeFDrZIhcj LcvEFzMwmRhw1xwdy4GNf7JNrgazaDypKhcxRwt42UL7bR42OCw9t9cKrs9K9w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTx5NLVzfcD; Mon, 21 Jul 2025 02:13:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2DvGL013907; Mon, 21 Jul 2025 02:13:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2DvBW013904; Mon, 21 Jul 2025 02:13:57 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:57 GMT Message-Id: <202507210213.56L2DvBW013904@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: d0b6c358e748 - stable/14 - kern: wg: split address/mask construction out of wg_aip_add() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: d0b6c358e7486ac560f99f9dfb8166f1f5d014e4 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=d0b6c358e7486ac560f99f9dfb8166f1f5d014e4 commit d0b6c358e7486ac560f99f9dfb8166f1f5d014e4 Author: Kyle Evans AuthorDate: 2025-06-26 02:57:02 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:28 +0000 kern: wg: split address/mask construction out of wg_aip_add() We'll re-use these in a future wg_aip_del() to perfectly reconstruct what we expect to find in a_addr/a_mask. Reviewed by: ivy, markj (both earlier version), Aaron LI, jhb (cherry picked from commit 2475a3dab0d5c5614e303c0022a834f725e2a078) --- sys/dev/wg/if_wg.c | 63 ++++++++++++++++++++++++++++++++++-------------------- 1 file changed, 40 insertions(+), 23 deletions(-) diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c index 9e86e1074ef5..380e579eed07 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -312,7 +312,8 @@ static void wg_timers_run_send_keepalive(void *); static void wg_timers_run_new_handshake(void *); static void wg_timers_run_zero_key_material(void *); static void wg_timers_run_persistent_keepalive(void *); -static int wg_aip_add(struct wg_softc *, struct wg_peer *, sa_family_t, const void *, uint8_t); +static int wg_aip_add(struct wg_softc *, struct wg_peer *, sa_family_t, + const void *, uint8_t); static struct wg_peer *wg_aip_lookup(struct wg_softc *, sa_family_t, void *); static void wg_aip_remove_all(struct wg_softc *, struct wg_peer *); static struct wg_peer *wg_peer_create(struct wg_softc *, @@ -526,46 +527,62 @@ wg_peer_get_endpoint(struct wg_peer *peer, struct wg_endpoint *e) rw_runlock(&peer->p_endpoint_lock); } -/* Allowed IP */ static int -wg_aip_add(struct wg_softc *sc, struct wg_peer *peer, sa_family_t af, const void *addr, uint8_t cidr) +wg_aip_addrinfo(struct wg_aip *aip, const void *baddr, uint8_t cidr) { - struct radix_node_head *root; - struct radix_node *node; - struct wg_aip *aip; - int ret = 0; - - aip = malloc(sizeof(*aip), M_WG, M_WAITOK | M_ZERO); - aip->a_peer = peer; - aip->a_af = af; + struct aip_addr *addr, *mask; - switch (af) { + addr = &aip->a_addr; + mask = &aip->a_mask; + switch (aip->a_af) { #ifdef INET case AF_INET: if (cidr > 32) cidr = 32; - root = sc->sc_aip4; - aip->a_addr.in = *(const struct in_addr *)addr; - aip->a_mask.ip = htonl(~((1LL << (32 - cidr)) - 1) & 0xffffffff); - aip->a_addr.ip &= aip->a_mask.ip; - aip->a_addr.length = aip->a_mask.length = offsetof(struct aip_addr, in) + sizeof(struct in_addr); + addr->in = *(const struct in_addr *)baddr; + mask->ip = htonl(~((1LL << (32 - cidr)) - 1) & 0xffffffff); + addr->ip &= mask->ip; + addr->length = mask->length = offsetof(struct aip_addr, in) + sizeof(struct in_addr); break; #endif #ifdef INET6 case AF_INET6: if (cidr > 128) cidr = 128; - root = sc->sc_aip6; - aip->a_addr.in6 = *(const struct in6_addr *)addr; - in6_prefixlen2mask(&aip->a_mask.in6, cidr); + addr->in6 = *(const struct in6_addr *)baddr; + in6_prefixlen2mask(&mask->in6, cidr); for (int i = 0; i < 4; i++) - aip->a_addr.ip6[i] &= aip->a_mask.ip6[i]; - aip->a_addr.length = aip->a_mask.length = offsetof(struct aip_addr, in6) + sizeof(struct in6_addr); + addr->ip6[i] &= mask->ip6[i]; + addr->length = mask->length = offsetof(struct aip_addr, in6) + sizeof(struct in6_addr); break; #endif default: - free(aip, M_WG); return (EAFNOSUPPORT); } + return (0); +} + +/* Allowed IP */ +static int +wg_aip_add(struct wg_softc *sc, struct wg_peer *peer, sa_family_t af, + const void *baddr, uint8_t cidr) +{ + struct radix_node_head *root = NULL; + struct radix_node *node; + struct wg_aip *aip; + int ret = 0; + + aip = malloc(sizeof(*aip), M_WG, M_WAITOK | M_ZERO); + aip->a_peer = peer; + aip->a_af = af; + + ret = wg_aip_addrinfo(aip, baddr, cidr); + if (ret != 0) { + free(aip, M_WG); + return (ret); + } + + root = af == AF_INET ? sc->sc_aip4 : sc->sc_aip6; + MPASS(root != NULL); RADIX_NODE_HEAD_LOCK(root); node = root->rnh_addaddr(&aip->a_addr, &aip->a_mask, &root->rh, aip->a_nodes); if (node == aip->a_nodes) { From nobody Mon Jul 21 02:13:58 2025 X-Original-To: dev-commits-src-all@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 4blkTz3HSmz61xx7; Mon, 21 Jul 2025 02:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkTz0CH2z3NlB; Mon, 21 Jul 2025 02:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OkRGLPxyZAHnKc5jlkwmF94G2Va+V3tLeiAA9qrg6nY=; b=HgQAIZWEjhPHNO5S3jagzAjG9NFOJ0xcpXvuvw12GSVCMKz/2QIBRoNUAiixRTYjMjW3ZJ cWViD2P0Zx8CYFlMfw0K2FrgtkF2bnAVntuk0xsq0NhQO//Ft9clPrLvjdU+t7PV8OPVlb jZxyds35Ik9YY3JxHjVjg8lcOOy+CvDoHXZy48trdu3aQxoowq2zwDknSJcvDuWwoD7V9/ ChI4d4wKUs5SIwKG0mZ3k8ImS4vm5YVZ7UBjZ53f/0MTFOFWExEzOe1GM/YwKikQ8D+/TR rQP4fpyN2SD0TaQsrK9Mila6GjOlC2D+aUQSl3nqi3BR0zJ9/VA5IBSGohZh5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OkRGLPxyZAHnKc5jlkwmF94G2Va+V3tLeiAA9qrg6nY=; b=TWg/aOa51FnxMh03TZxbMwUT5LrgyzfqUMHGnVQ36/JRNekuvYnq7o7EHnILb+lHUqGY+G W2LiuDjaNT2NRWF6cRgR2OL7Sqq/wu/awgpLyVloX1Gw7eGCaHZ5ly+MxUF8VyN4Uq7afl iV4thPqF7yUwS8dHejVEFcLiyc0BCK5X0evlhyHRT8+uPdXNInjsjIaq21dJaDHqMDlEfr MmMPitIW0yEw9bMaXGFwtXnAsWlMZqWHrX6yWbKR1bM2KKQLRsLDh13Epd14MfqCpapXi6 TF1PmrH/nrNs3IGpTVfcvzKH2TPBSQLHi+TcP/RL2kGjw7j+7t+9yOVBj0Xb8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064039; a=rsa-sha256; cv=none; b=BQYvmAQOc7HpTom/XN5M7IG8lnbWLZc84Oj2VxoFoiLWoXpqUbTSpb3tzY4cuir61g6xDC yLqjVPoAceD8NnpEBP5jkzThAMXiE9bRmLYZFTTA1+nQtTTzhGqJdoIdE8NlgeX5oBBv/N Y3t9DCt6M0NSgdGJBRN9NXLyFp7kZVzDUpPlys/GLw3Ev/neQfOn1PURyAFpn/k+C4DFne PjPbnmxpJdbElxK5GskCh5vRrTV+z4Lwc+Q+W/ZEpgF6HWW5+dB22z7LmjfFrnWMxMHoSH 1DlpnqDJAAMxyhKPm1jv+kkolTvtRPAJJb5lvUsQ2AGcTUBBy7eFI26eHRzfGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTy6QBvzfgd; Mon, 21 Jul 2025 02:13:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2Dw5j013947; Mon, 21 Jul 2025 02:13:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2Dw1F013944; Mon, 21 Jul 2025 02:13:58 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:58 GMT Message-Id: <202507210213.56L2Dw1F013944@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: 684dd4e8c008 - stable/14 - kern: wg: add support for removing Allowed-IPs List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 684dd4e8c0085f4e64016a44d4cd699b2fc29681 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=684dd4e8c0085f4e64016a44d4cd699b2fc29681 commit 684dd4e8c0085f4e64016a44d4cd699b2fc29681 Author: Kyle Evans AuthorDate: 2025-06-26 02:57:02 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:12:59 +0000 kern: wg: add support for removing Allowed-IPs This was recently added to Linux to improve incremental update support, as you could previously add Allowed-IPs but not remove without replacing the whole set (and thus, potentially disrupting existing traffic). Removal is incredibly straightforward; we'll find it in p_aips first to ensure that it's actually valid for this peer, then we'll delete it from the radix tree before we remove the corresponding p_aips entry. Reviewed by: Jason A. Donenfeld, jhb (cherry picked from commit d15d610fac97df4fefed3f14b31dcfbdcec65bf9) (cherry picked from commit d1ac3e245f084ee0637bde9a446687621358c418) --- sys/dev/wg/if_wg.c | 72 +++++++++++++++++++++++++++++++++++++++++++++++++++++- sys/dev/wg/if_wg.h | 6 +++++ 2 files changed, 77 insertions(+), 1 deletion(-) diff --git a/sys/dev/wg/if_wg.c b/sys/dev/wg/if_wg.c index 380e579eed07..75af5e279669 100644 --- a/sys/dev/wg/if_wg.c +++ b/sys/dev/wg/if_wg.c @@ -314,6 +314,8 @@ static void wg_timers_run_zero_key_material(void *); static void wg_timers_run_persistent_keepalive(void *); static int wg_aip_add(struct wg_softc *, struct wg_peer *, sa_family_t, const void *, uint8_t); +static int wg_aip_del(struct wg_softc *, struct wg_peer *, sa_family_t, + const void *, uint8_t); static struct wg_peer *wg_aip_lookup(struct wg_softc *, sa_family_t, void *); static void wg_aip_remove_all(struct wg_softc *, struct wg_peer *); static struct wg_peer *wg_peer_create(struct wg_softc *, @@ -530,10 +532,12 @@ wg_peer_get_endpoint(struct wg_peer *peer, struct wg_endpoint *e) static int wg_aip_addrinfo(struct wg_aip *aip, const void *baddr, uint8_t cidr) { +#if defined(INET) || defined(INET6) struct aip_addr *addr, *mask; addr = &aip->a_addr; mask = &aip->a_mask; +#endif switch (aip->a_af) { #ifdef INET case AF_INET: @@ -608,6 +612,58 @@ wg_aip_add(struct wg_softc *sc, struct wg_peer *peer, sa_family_t af, return (ret); } +static int +wg_aip_del(struct wg_softc *sc, struct wg_peer *peer, sa_family_t af, + const void *baddr, uint8_t cidr) +{ + struct radix_node_head *root = NULL; + struct radix_node *dnode __diagused, *node; + struct wg_aip *aip, addr; + int ret = 0; + + /* + * We need to be sure that all padding is cleared, as it is above when + * new AllowedIPs are added, since we want to do a direct comparison. + */ + memset(&addr, 0, sizeof(addr)); + addr.a_af = af; + + ret = wg_aip_addrinfo(&addr, baddr, cidr); + if (ret != 0) + return (ret); + + root = af == AF_INET ? sc->sc_aip4 : sc->sc_aip6; + + MPASS(root != NULL); + RADIX_NODE_HEAD_LOCK(root); + + node = root->rnh_lookup(&addr.a_addr, &addr.a_mask, &root->rh); + if (node == NULL) { + RADIX_NODE_HEAD_UNLOCK(root); + return (0); + } + + aip = (struct wg_aip *)node; + if (aip->a_peer != peer) { + /* + * They could have specified an allowed-ip that belonged to a + * different peer, in which case our job is done because the + * AllowedIP has been removed. + */ + RADIX_NODE_HEAD_UNLOCK(root); + return (0); + } + + dnode = root->rnh_deladdr(&aip->a_addr, &aip->a_mask, &root->rh); + MPASS(dnode == node); + RADIX_NODE_HEAD_UNLOCK(root); + + LIST_REMOVE(aip, a_entry); + peer->p_aips_num--; + free(aip, M_WG); + return (0); +} + static struct wg_peer * wg_aip_lookup(struct wg_softc *sc, sa_family_t af, void *a) { @@ -2477,11 +2533,19 @@ wg_peer_add(struct wg_softc *sc, const nvlist_t *nvl) aipl = nvlist_get_nvlist_array(nvl, "allowed-ips", &allowedip_count); for (size_t idx = 0; idx < allowedip_count; idx++) { sa_family_t ipaf; + int ipflags; if (!nvlist_exists_number(aipl[idx], "cidr")) continue; ipaf = AF_UNSPEC; + ipflags = 0; + if (nvlist_exists_number(aipl[idx], "flags")) + ipflags = nvlist_get_number(aipl[idx], "flags"); + if ((ipflags & ~WGALLOWEDIP_VALID_FLAGS) != 0) { + err = EOPNOTSUPP; + goto out; + } cidr = nvlist_get_number(aipl[idx], "cidr"); if (nvlist_exists_binary(aipl[idx], "ipv4")) { addr = nvlist_get_binary(aipl[idx], "ipv4", &size); @@ -2504,7 +2568,13 @@ wg_peer_add(struct wg_softc *sc, const nvlist_t *nvl) } MPASS(ipaf != AF_UNSPEC); - if ((err = wg_aip_add(sc, peer, ipaf, addr, cidr)) != 0) + if ((ipflags & WGALLOWEDIP_REMOVE_ME) != 0) { + err = wg_aip_del(sc, peer, ipaf, addr, cidr); + } else { + err = wg_aip_add(sc, peer, ipaf, addr, cidr); + } + + if (err != 0) goto out; } } diff --git a/sys/dev/wg/if_wg.h b/sys/dev/wg/if_wg.h index f00b7f676319..801eaf38141d 100644 --- a/sys/dev/wg/if_wg.h +++ b/sys/dev/wg/if_wg.h @@ -32,4 +32,10 @@ struct wg_data_io { #define SIOCSWG _IOWR('i', 210, struct wg_data_io) #define SIOCGWG _IOWR('i', 211, struct wg_data_io) + +/* Keep these in sync with wireguard-tools:containers.h */ +#define WGALLOWEDIP_REMOVE_ME 0x0001 + +#define WGALLOWEDIP_VALID_FLAGS WGALLOWEDIP_REMOVE_ME + #endif /* __IF_WG_H__ */ From nobody Mon Jul 21 02:13:59 2025 X-Original-To: dev-commits-src-all@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 4blkV03ryLz61y0N; Mon, 21 Jul 2025 02:14: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkV00SYBz3NjR; Mon, 21 Jul 2025 02:14:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=50quHk369p6oZ0MOB7Lwx6BtgloIApUAXxkIVLv2tyg=; b=ADTGaJkGiXONZbR5spUFSCNB5SCgifiCd2icht0iTnIRg6AdrIFA0h360s+8WVR4AHRsJa PRb5TQsoitlEoIQeDnDIkAbmV2PrvanEqxPW2e9xEUWeGvQNrzDg4NE6pTrff80RVfAYdD 5Zy9aRAD1B/a5a27IiNsUWZzPXNLFVIvvKNX6bb32ddZhIMnJrxqTH2GtThDkMoQf/+woM wSQD2vMefmeMo2lfYSTKeAT2tQT6e1lyEp58iVGQ+dIa5WIqCe6N8UXyaQv1TXfK0VMT7z 0oTbnIYd2E6VM//LPsoD6yVsvYZFgyghgTJLxcKw1G899q1SGFCrzlOCv0fwOA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=50quHk369p6oZ0MOB7Lwx6BtgloIApUAXxkIVLv2tyg=; b=CE9r96Gu1RPhRnMCwjPygfOs8eTsQfeylHEAanJWZ6CXkTDjSVELCyoEIvVjf4ZXlLBsHV 6EzzntZ/vaxFf/RzPoqv41GC2TEJijfWc2UvHoSd9eWTy+ig0UE+Lv9m9uB8SrdUI2dk94 KnoWtG4umCVas+vzxJjGXAasmCyoTUGKYIx8ZE0UjXl+erdI+ZBBbfbHBzOxmoAYps0pqj QugSc6WOjpLqsHpdJaCg0dioNzpnLyY53NOw71OEm4YHn+0HGwXay7MeiHJWNjJ/15OEm2 kvbRaJA9Lh51JGVGSex5dAmE4IBai0ZDwtlXhXK8BDZvudWdP5WbDYesYKJf4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064040; a=rsa-sha256; cv=none; b=qokgJSETCT+vKsJSTVKv9RrFn63Doh1qZNdCZMu2nymjtvM9aQ9tNb7Vf8Gx9/2JXZPHTQ Ujf5xeyPJTmyRZ9R2vaKpa7JWphAZO+mytcxxA3Sv4/qgE6hpxeQ2uphWkkMIunnRkxbig I6tAsUrp5gqhpNsvTTzNvlPSwey7hduviqItq40Y51oTmCzE4oqqAr0q1y9OZFJMskiPHp YN1CZB5KWa/GKXGp+sLNFY6XGqoFgXJHMKHa2u9JSLhjU9fC56VXveyioxGb2W3mdX4JYO eVnFpjr3mP90XMSKKg5MvoF+u7L01mTZg9gASRtqXzfDumTZw9zol8rDKzhG7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkTz752ZzfcF; Mon, 21 Jul 2025 02:13:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2DxcT013982; Mon, 21 Jul 2025 02:13:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2DxCa013979; Mon, 21 Jul 2025 02:13:59 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:13:59 GMT Message-Id: <202507210213.56L2DxCa013979@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: e95cf8b04b47 - stable/14 - wg: ipc: add allowed-ip flags support for FreeBSD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: e95cf8b04b47ee9abf544bb754452e6f30b2dc18 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=e95cf8b04b47ee9abf544bb754452e6f30b2dc18 commit e95cf8b04b47ee9abf544bb754452e6f30b2dc18 Author: Kyle Evans AuthorDate: 2025-06-26 02:57:03 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:13:15 +0000 wg: ipc: add allowed-ip flags support for FreeBSD For $reasons, we can't rely on flags in wireguard-tools for the kernel side of WireGuard. Provide a mapping function that uses flags from the kernel that we're building against and fail the operation if we made it to the end without turning some wg(8) flag off. Signed-off-by: Kyle Evans Reviewed by: ivy (previous version), Jason A. Donenfeld, jhb (cherry picked from commit f6d9e22982a1d0354c0199e94ebdb4474eaa74b9) --- contrib/wireguard-tools/ipc-freebsd.h | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/contrib/wireguard-tools/ipc-freebsd.h b/contrib/wireguard-tools/ipc-freebsd.h index 58e5e71ce5cb..69077038a15a 100644 --- a/contrib/wireguard-tools/ipc-freebsd.h +++ b/contrib/wireguard-tools/ipc-freebsd.h @@ -307,11 +307,8 @@ static int kernel_set_device(struct wgdevice *dev) nvl_aips[j] = nvlist_create(0); if (!nvl_aips[j]) goto err_peer; - if (aip->flags) { - //TODO: implement me - ret = -EOPNOTSUPP; - goto err_peer; - } + if (aip->flags) + nvlist_add_number(nvl_aips[j], "flags", aip->flags); nvlist_add_number(nvl_aips[j], "cidr", aip->cidr); if (aip->family == AF_INET) nvlist_add_binary(nvl_aips[j], "ipv4", &aip->ip4, sizeof(aip->ip4)); From nobody Mon Jul 21 02:14:01 2025 X-Original-To: dev-commits-src-all@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 4blkV14tSnz61xTN; Mon, 21 Jul 2025 02:14: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blkV11bx6z3NbW; Mon, 21 Jul 2025 02:14:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xGnlh3V2RLeyq5hYGgOR7I/0AAAksdtoPP/bnz1XQMk=; b=HXfNPE9OdooeuBvgH8OLzQ3pBUGgitGfJHWVyE55hGRwmp9EfFJyvvOdGuVBSxtNUr/rL/ HSDZtbfoB5zHa6hod0oaztzYrZdur16ioJjIuKEMQy2Dl+rnnTwGzHeIkcnB9BsEKcEYVT TpCby2V1Uhqw45sE/Yg7DoEaNAAOsHajFpRlo+/4D3UuApiOVioJTan0USelTwpGdsa17u ogCzQTLUfwl3tH5bSz0WVE5UJiCLRkonayZd5Zf36DIap8zZ3g2O/vdFRIC2h/4uZIgDxw /QF1HGMiAx4OW7paQCv41obZuG/KVymy4aPGtVAXv65wROZbD8oFq8Il/3zz3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753064041; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xGnlh3V2RLeyq5hYGgOR7I/0AAAksdtoPP/bnz1XQMk=; b=xv81boiALiTA490NvfAdzz4yOjgpvsJ9/PF43OLPEsvw3VToE4F/BPv+cs69A8U4aC/wbm sujhmxiCMF+/FxamqPAALeokpjQYMlQWICnATnSogQ5s3PRYYq45VpbMtjasWO87EcwGcB kTALHkRHrpqZPtJ/G2IpLLoBSC+7ubtpNRlIx1e4zp1DUu/HZ773rvuiWH/I1KMah7rW3U ACZilVLUWPmR3mvTZePZIMTpQU3yPJDIy1d1Mo7DAwOt5Z4M5fUu4JYG4PQNke3bHnRDW9 ztEA3ckJZ785317yZ3M6TH+NS8rWlfCGavQexis2giI1c4zb0OyWBegPw0qLUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753064041; a=rsa-sha256; cv=none; b=uvjwfmnZ5nkZfeTuSFL/8O6VNub0TNg92EPAfN/5j/UPWnBQaMCfes9+RN+drCM7yIjuLY I2kkt2hWzbwJOB7ihk3T7Cmygc8aqg7VhjNpr58xz4mrsBuhVsC2ElwmkF6+DY8WNP+Bvg +ktEY2xQv+TvD6TFt98PVWOyWTl0hJomRblRryRA1Kn+I+JFIRKSRLxu83wATYL0SoURD1 y8mMwq350pKbWee5iWFy1MYw4F9C+QMfVBSxAXsISm2m/qtqqzNtfjNeL8VjFdABrTnB2+ BDyuUXysG1Iz8Gwtg7azcXxHGW0MJhKaWRmHDrRteNrVyDyfzFRRVjEMtc59XA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blkV118Btzdjt; Mon, 21 Jul 2025 02:14:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L2E1nN014022; Mon, 21 Jul 2025 02:14:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L2E1aX014019; Mon, 21 Jul 2025 02:14:01 GMT (envelope-from git) Date: Mon, 21 Jul 2025 02:14:01 GMT Message-Id: <202507210214.56L2E1aX014019@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: 34f71ebee8bd - stable/14 - tests: extend wireguard test to cover incremental allowed-ips updates List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 34f71ebee8bd73d6d7bf56aaddf4aeffd754c8d0 Auto-Submitted: auto-generated The branch stable/14 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=34f71ebee8bd73d6d7bf56aaddf4aeffd754c8d0 commit 34f71ebee8bd73d6d7bf56aaddf4aeffd754c8d0 Author: Kyle Evans AuthorDate: 2025-06-26 02:57:03 +0000 Commit: Kyle Evans CommitDate: 2025-07-21 02:13:15 +0000 tests: extend wireguard test to cover incremental allowed-ips updates New +/- syntax in wg(8) allows us to add or remove just a single allowed-ip rather than forcing replacement or weird tricks to do an atomic removal. Ensure that it works now that we've added kernel support for it. Reviewed by: ivy (cherry picked from commit 716b6667b65b50c15900be9f88cc67f2326872b4) --- tests/sys/net/if_wg.sh | 205 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 205 insertions(+) diff --git a/tests/sys/net/if_wg.sh b/tests/sys/net/if_wg.sh index e5df6afface1..aaeec4b95964 100644 --- a/tests/sys/net/if_wg.sh +++ b/tests/sys/net/if_wg.sh @@ -424,6 +424,208 @@ wg_vnet_parent_routing_cleanup() vnet_cleanup } +# The kernel should now allow removing a single allowed-ip without having to +# replace the whole list. We can't really test the atomicity of it all that +# easily, but we'll trust that it worked right if just that addr/mask is gone. +atf_test_case "wg_allowedip_incremental" "cleanup" +wg_allowedip_incremental_head() +{ + atf_set descr "Add/remove allowed-ips from a peer with the +/- incremental syntax" + atf_set require.user root +} + +wg_allowedip_incremental_body() +{ + local pri1 pri2 pub1 pub2 wg1 + local tunnel1 tunnel2 tunnel3 + + kldload -n if_wg || atf_skip "This test requires if_wg and could not load it" + + pri1=$(wg genkey) + pri2=$(wg genkey) + pub2=$(echo "$pri2" | wg pubkey) + + tunnel1=169.254.0.1 + tunnel2=169.254.0.2 + tunnel3=169.254.0.3 + + vnet_mkjail wgtest1 + + wg1=$(jexec wgtest1 ifconfig wg create) + echo "$pri1" | jexec wgtest1 wg set $wg1 private-key /dev/stdin + pub1=$(jexec wgtest1 wg show $wg1 public-key) + + atf_check -s exit:0 \ + jexec wgtest1 wg set $wg1 peer $pub2 \ + allowed-ips "${tunnel1}/32,${tunnel2}/32" + + atf_check -o save:wg.allowed jexec wgtest1 wg show $wg1 allowed-ips + atf_check grep -q "${tunnel1}/32" wg.allowed + atf_check grep -q "${tunnel2}/32" wg.allowed + + atf_check -s exit:0 \ + jexec wgtest1 wg set $wg1 peer $pub2 \ + allowed-ips "-${tunnel2}/32" + + atf_check -o save:wg-2.allowed jexec wgtest1 wg show $wg1 allowed-ips + atf_check grep -q "${tunnel1}/32" wg-2.allowed + atf_check -s not-exit:0 grep -q "${tunnel2}/32" wg-2.allowed + + atf_check -s exit:0 \ + jexec wgtest1 wg set $wg1 peer $pub2 \ + allowed-ips "+${tunnel2}/32" + + atf_check -o save:wg-3.allowed jexec wgtest1 wg show $wg1 allowed-ips + atf_check grep -q "${tunnel1}/32" wg-3.allowed + atf_check grep -q "${tunnel2}/32" wg-3.allowed + + # Now attempt to add the address yet again to confirm that it's not + # harmful. + atf_check -s exit:0 \ + jexec wgtest1 wg set $wg1 peer $pub2 \ + allowed-ips "+${tunnel2}/32" + + atf_check -o save:wg-4.allowed -x \ + "jexec wgtest1 wg show $wg1 allowed-ips | cut -f2 | tr ' ' '\n'" + atf_check -o match:"2 wg-4.allowed$" wc -l wg-4.allowed + + # Finally, let's try removing an address that we never had at all and + # confirm that we still have our two addresses. + atf_check -s exit:0 \ + jexec wgtest1 wg set $wg1 peer $pub2 \ + allowed-ips "-${tunnel3}/32" + + atf_check -o save:wg-5.allowed -x \ + "jexec wgtest1 wg show $wg1 allowed-ips | cut -f2 | tr ' ' '\n'" + atf_check cmp -s wg-4.allowed wg-5.allowed +} + +wg_allowedip_incremental_cleanup() +{ + vnet_cleanup +} + +atf_test_case "wg_allowedip_incremental_inet6" "cleanup" +wg_allowedip_incremental_inet6_head() +{ + atf_set descr "Add/remove IPv6 allowed-ips from a peer with the +/- incremental syntax" + atf_set require.user root +} + +wg_allowedip_incremental_inet6_body() +{ + local pri1 pri2 pub1 pub2 wg1 + local tunnel1 tunnel2 + + kldload -n if_wg || atf_skip "This test requires if_wg and could not load it" + + pri1=$(wg genkey) + pri2=$(wg genkey) + pub2=$(echo "$pri2" | wg pubkey) + + tunnel1=2001:db8:1::1 + tunnel2=2001:db8:1::2 + + vnet_mkjail wgtest1 + + wg1=$(jexec wgtest1 ifconfig wg create) + echo "$pri1" | jexec wgtest1 wg set $wg1 private-key /dev/stdin + pub1=$(jexec wgtest1 wg show $wg1 public-key) + + atf_check -s exit:0 \ + jexec wgtest1 wg set $wg1 peer $pub2 \ + allowed-ips "${tunnel1}/128" + atf_check -o save:wg.allowed jexec wgtest1 wg show $wg1 allowed-ips + atf_check grep -q "${tunnel1}/128" wg.allowed + + atf_check -s exit:0 \ + jexec wgtest1 wg set $wg1 peer $pub2 \ + allowed-ips "+${tunnel2}/128" + atf_check -o save:wg-2.allowed jexec wgtest1 wg show $wg1 allowed-ips + atf_check grep -q "${tunnel1}/128" wg-2.allowed + atf_check grep -q "${tunnel2}/128" wg-2.allowed + + atf_check -s exit:0 \ + jexec wgtest1 wg set $wg1 peer $pub2 \ + allowed-ips "-${tunnel1}/128" + atf_check -o save:wg-3.allowed jexec wgtest1 wg show $wg1 allowed-ips + atf_check -s not-exit:0 grep -q "${tunnel1}/128" wg-3.allowed + atf_check grep -q "${tunnel2}/128" wg-3.allowed +} + +wg_allowedip_incremental_inet6_cleanup() +{ + vnet_cleanup +} + + +atf_test_case "wg_allowedip_incremental_stealing" "cleanup" +wg_allowedip_incremental_stealing_head() +{ + atf_set descr "Add/remove allowed-ips from a peer with the +/- incremental syntax to steal" + atf_set require.user root +} + +wg_allowedip_incremental_stealing_body() +{ + local pri1 pri2 pri3 pub1 pub2 pub3 wg1 + local regex2 regex3 + local tunnel1 tunnel2 + + kldload -n if_wg || atf_skip "This test requires if_wg and could not load it" + + pri1=$(wg genkey) + pri2=$(wg genkey) + pri3=$(wg genkey) + pub2=$(echo "$pri2" | wg pubkey) + pub3=$(echo "$pri3" | wg pubkey) + + regex2=$(echo "$pub2" | sed -e 's/[+]/[+]/g') + regex3=$(echo "$pub3" | sed -e 's/[+]/[+]/g') + + tunnel1=169.254.0.1 + tunnel2=169.254.0.2 + tunnel3=169.254.0.3 + + vnet_mkjail wgtest1 + + wg1=$(jexec wgtest1 ifconfig wg create) + echo "$pri1" | jexec wgtest1 wg set $wg1 private-key /dev/stdin + pub1=$(jexec wgtest1 wg show $wg1 public-key) + + atf_check -s exit:0 \ + jexec wgtest1 wg set $wg1 peer $pub2 \ + allowed-ips "${tunnel1}/32,${tunnel2}/32" + + atf_check -s exit:0 \ + jexec wgtest1 wg set $wg1 peer $pub3 \ + allowed-ips "${tunnel3}/32" + + # First, confirm that the negative syntax doesn't do anything because + # we have the wrong peer. + atf_check -s exit:0 \ + jexec wgtest1 wg set $wg1 peer $pub2 \ + allowed-ips "-${tunnel3}/32" + + atf_check -o save:wg.allowed jexec wgtest1 wg show $wg1 allowed-ips + atf_check grep -Eq "^${regex3}.+${tunnel3}/32" wg.allowed + + # Next, steal it with an incremental move and check that it moved. + atf_check -s exit:0 \ + jexec wgtest1 wg set $wg1 peer $pub2 \ + allowed-ips "+${tunnel3}/32" + + atf_check -o save:wg-2.allowed jexec wgtest1 wg show $wg1 allowed-ips + + atf_check grep -Eq "^${regex2}.+${tunnel3}/32" wg-2.allowed + atf_check grep -Evq "^${regex3}.+${tunnel3}/32" wg-2.allowed +} + +wg_allowedip_incremental_stealing_cleanup() +{ + vnet_cleanup +} + atf_init_test_cases() { atf_add_test_case "wg_basic" @@ -432,4 +634,7 @@ atf_init_test_cases() atf_add_test_case "wg_key_peerdev_shared" atf_add_test_case "wg_key_peerdev_makeshared" atf_add_test_case "wg_vnet_parent_routing" + atf_add_test_case "wg_allowedip_incremental" + atf_add_test_case "wg_allowedip_incremental_inet6" + atf_add_test_case "wg_allowedip_incremental_stealing" } From nobody Mon Jul 21 03:04:15 2025 X-Original-To: dev-commits-src-all@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 4bllbz66p1z621xY; Mon, 21 Jul 2025 03:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bllbz4VxBz3FvC; Mon, 21 Jul 2025 03:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753067055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TpLnWRw7PYAQaMefME59jd0qzPFyzcA/aARgpd9yB5Q=; b=OV2Kke88ammCM7owsu5mkMzS/VJK1PigQI0SMD/LRqdpGDPKHxuSYabcPK4cBq2B43ZMCN XUd4uF09t+/YD4hN6ey+kmtcDmnR8dACEu6JKpDB7bbdZ5dpYm1S9bNdYieSZs+0XsekYg kv7FrZJo+ozJcra1wsJvqfiLCYW66tBpVHPO+p7rDhgxoqSC4hli+iYFaZl2ueriEy5Nq6 ueYignjUayQep8dAMZ6JfKqWEiauL0m4+7oWT4ZQDwWDeKJFsu/13aYgbPc0DuRtTL0O1u P9LJVEBecSYI8tWS1yB/vbDedu6nt+zPFyAvqth9fgfOJua0RL1s4oOGSuGxcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753067055; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TpLnWRw7PYAQaMefME59jd0qzPFyzcA/aARgpd9yB5Q=; b=ROG7OUymqnjAykC3QKdIFyleFhX0qbsoLOqzD2x+joG4MUMPnBLsCwqOc75G0mTPOI0bGf H38xmX8z23igEq7nPdQbepMaJpWmE2V5HVBa4FgsJwO/J0M1N/+BxhiXOlhu3TXueFRA7K wXwxbWt/32qMPoSO+XFLmpXUTfDeOE3LJ0A8gFqor2mRoFkXu0CQRH2IaxY19y3VxUkJ6M P4OeNB6/tKztZVxs75GFlT5iGXGnx800IS69HJJJCWdk10gBfIMk1xm58rtFaeTRZJkYQH gGT/pGB1nueYqaoFqfychUYi629X5fOoekunsy+Se7SeL4kFNWviFY2i1QteMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753067055; a=rsa-sha256; cv=none; b=ivGp79xz1HOe39C8iZb94QzgHc1Q8HBooMFIbjfIYI8ackJ4pbrw5TulrrVmsjJP6XSkFX rEgItNAkI1n9OS6PNiZIhvU1WWL4EzpDjQkZMo1bBG3Rrqd9mC0+qvmKT1Q+pekcopEJXU yGXtKFEKf+aNXxUnJxGeRyhw9Ln6gNld4WKS7vIiCx7nRmDjV9A621ry1mpIFD+uWCi5pw 3RpUzZ7YQ7xd6wqWON+kHrMjaM3KZkBawkELtmU6q7MFIASR2WBnRsXLp0JJllb6sBlatj 5DsblHpX+Rgp6S7mDn7la2MydHV7OUoliflU38XGJfGYWiRdvwPkjPkwCkluCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bllbz40lzzgjy; Mon, 21 Jul 2025 03:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L34Ff6009737; Mon, 21 Jul 2025 03:04:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L34Fd0009734; Mon, 21 Jul 2025 03:04:15 GMT (envelope-from git) Date: Mon, 21 Jul 2025 03:04:15 GMT Message-Id: <202507210304.56L34Fd0009734@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Justin Hibbits Subject: git: e04d629d5394 - stable/14 - powerpc: Reserve correct scratch region size below stack List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: e04d629d5394ed85c53febeb8688344236fb9483 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=e04d629d5394ed85c53febeb8688344236fb9483 commit e04d629d5394ed85c53febeb8688344236fb9483 Author: Timothy Pearson AuthorDate: 2025-07-06 19:24:07 +0000 Commit: Justin Hibbits CommitDate: 2025-07-21 02:56:58 +0000 powerpc: Reserve correct scratch region size below stack According to the ELF ABI v2, two scratch regions are reserved below the stack pointer, one 288 byte general region and one 224 byte compiler region. FreeBSD only reserved the 288 byte region. Follow the ELV v2 ABI and reserve the full 512 byte region as specified. Signed-off-by: Timothy Pearson MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1756 (cherry picked from commit 645bb3efc3209a9ca6dfabb48b1c6475c1d965a9) --- sys/powerpc/powerpc/exec_machdep.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index 2e4e0ebfd7ed..bdd1da9c9cbd 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -214,10 +214,10 @@ sendsig(sig_t catcher, ksiginfo_t *ksi, sigset_t *mask) sfpsize = sizeof(sf); #ifdef __powerpc64__ /* - * 64-bit PPC defines a 288 byte scratch region - * below the stack. + * 64-bit PPC defines a 512 byte red zone below + * the existing stack (ELF ABI v2 §2.2.2.4) */ - rndfsize = 288 + roundup(sizeof(sf), 48); + rndfsize = 512 + roundup(sizeof(sf), 48); #else rndfsize = roundup(sizeof(sf), 16); #endif From nobody Mon Jul 21 03:04:16 2025 X-Original-To: dev-commits-src-all@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 4bllc06cXvz621rF; Mon, 21 Jul 2025 03:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bllc05rZ4z3GCN; Mon, 21 Jul 2025 03:04:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753067056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iDXXLUAU/BIJ1B1/VujWUj6QzoPNAslEKpfzqVcG4jU=; b=c+IgY/DhiOTGnWl7jFLW8KnGd/kCwTDu3r7ktMh9qM3E/BQOq3JOfoLLDm3IJ9qd5c6dne 32Z9CanILefQTDSHQX07Zqmv2nT65xZIh4ESHW9KqEhRysGSYclCxZgkZUgbDPf5hJdKeq 229ZBYYBK4+DWAuoocMNUCRjxvdFcTHrwy+6f7zFPYe2ph5hFa9tjkS8/e/DdZ2TqawBhR IZSLks2Y8Hp2jp/p19dJ6MtftJduq8Rx7Tj3kEH0pROy4ZR22VYwDjC/hyygeos02wj3tX W3W1zd5scL7z84Yolw0gDQ6abQjCxm4mnqLulZNbdyMfuOgCsW3k3nRCp+UJHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753067056; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iDXXLUAU/BIJ1B1/VujWUj6QzoPNAslEKpfzqVcG4jU=; b=s6f7+WfaASYpLGTbTgg7DRts/ih/mMdV7iXFxUACv1ogVM1INxBJgwhDipyUQV4KOX5ARv Os7SUOzwWVgQCagoYt2zmDjBvYKmkpyt8jXKiHidq7VSAgvOTVpR1AiGujTd7FPwdn+l55 QljO4I2dzLNv0o7OMGQi/7DOdDynmxAgZms77pHUGpk+hJi+emwjOndQ/S0ZJFLfeULBnr KsD9rdjraL5/WZ6N5r083GZ8BY5Vq/H5ML0WLOj/JXQJfSXNQLHvv++hYt5raET3LKGoll 9OAzRgRzP06lzGReDv9hNcvR40J/3YBVmayhnLC1CJG5a6XgVqCylEcYloa7Kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753067056; a=rsa-sha256; cv=none; b=ufiNmtBZupRcbL8/eHNdhmMHpJNS+J8wxY7sFC1drJw2sWp9xyUJU2+FhluBEVjUtmHu4v rv33B4V2ROO+L4dGjv7nD9chQ4WDEcOMiJtatlk5sbSUg2w72Q9aHBWOSvJN98Olz0Fb9n uSLQcQANMqiq+YrKCX/fbFxwo9CX8gixnOeLsxRPqfWCS7Oe5aQmTmQ4RB3y1EQQm81o3c ZkouaMyQHl061xBYbD/csRE084v2rss29JOjR/pMLer3eUZatUSnzEVOTwzK7829WIe4kT 8xHqI8cBCxrCyh0hyEHCZXgVfFdL0pqBKUY6gWF+cO/sNgWDcFVHHCMmJV1ZfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bllc04y8xzgk0; Mon, 21 Jul 2025 03:04:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L34GGR009771; Mon, 21 Jul 2025 03:04:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L34GHi009768; Mon, 21 Jul 2025 03:04:16 GMT (envelope-from git) Date: Mon, 21 Jul 2025 03:04:16 GMT Message-Id: <202507210304.56L34GHi009768@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Justin Hibbits Subject: git: 90a9ce456740 - stable/14 - powerpc: Fix multiple issues with FP/VSX save/restore List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 90a9ce456740d9e2ef20e781e5a57f5d611d1c83 Auto-Submitted: auto-generated The branch stable/14 has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=90a9ce456740d9e2ef20e781e5a57f5d611d1c83 commit 90a9ce456740d9e2ef20e781e5a57f5d611d1c83 Author: Timothy Pearson AuthorDate: 2025-07-06 19:28:30 +0000 Commit: Justin Hibbits CommitDate: 2025-07-21 02:56:59 +0000 powerpc: Fix multiple issues with FP/VSX save/restore Multiple issues existed within the powerpc FP/VSX save/restore functionality, leading to register corruption and loss of register contents in specific scenarios involving high signal load and use of both floating point and VSX instructions. Issue #1 On little endian systems the PCB used the wrong location for the shadowed FP register within the larger VSX register. This appears to have been an attempt to correct issue #2 without understanding how the vector load/store instructions actually operate. Issue #2 On little endian systems, the VSX state save/restore routines swapped 32-bit words within the 64-bit aliased double word for the associated floating point register. This was due to the use of a word-oriented load/store vs. doubleword oriented load/store. Issue #3 The FPU was turned off in the PCB but not in hardware, leading to a potential race condition if the same thread was scheduled immediately after sigreturn. The triggering codebase for this is Go, which makes heavy use of signals and and generates an unusual mix of floating point and VSX assembler. As a result, when combined with th powerpc lazy FPU restore, a condition was repeatedly hit whereby the thread was interrupted in FP+VSX mode, then restored in FP only mode, thus reliably triggering the issues above. Also clean up the associated asm() style issue flagged by GitHub Actions. Signed-off-by: Timothy Pearson MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1756 (cherry picked from commit 077e30e61d7e1c90af7df31989bb976a3ace0c69) --- sys/powerpc/include/pcb.h | 10 +--------- sys/powerpc/include/ucontext.h | 2 ++ sys/powerpc/powerpc/exec_machdep.c | 33 ++++++++++++++++++++++++--------- sys/powerpc/powerpc/fpu.c | 30 ++++++++++++++++++++++++++---- 4 files changed, 53 insertions(+), 22 deletions(-) diff --git a/sys/powerpc/include/pcb.h b/sys/powerpc/include/pcb.h index 050ada6b0f64..0230cf78aba7 100644 --- a/sys/powerpc/include/pcb.h +++ b/sys/powerpc/include/pcb.h @@ -66,16 +66,8 @@ struct pcb { #define PCB_VECREGS 0x200 /* Process had Altivec registers initialized */ struct fpu { union { -#if _BYTE_ORDER == _BIG_ENDIAN - double fpr; - uint32_t vsr[4]; -#else uint32_t vsr[4]; - struct { - double padding; - double fpr; - }; -#endif + double fpr; } fpr[32]; double fpscr; /* FPSCR stored as double for easier access */ } pcb_fpu; /* Floating point processor */ diff --git a/sys/powerpc/include/ucontext.h b/sys/powerpc/include/ucontext.h index d35c6c773fe0..dc87edd578bc 100644 --- a/sys/powerpc/include/ucontext.h +++ b/sys/powerpc/include/ucontext.h @@ -41,6 +41,7 @@ typedef struct __mcontext { int mc_flags; #define _MC_FP_VALID 0x01 #define _MC_AV_VALID 0x02 +#define _MC_VS_VALID 0x04 int mc_onstack; /* saved onstack flag */ int mc_len; /* sizeof(__mcontext) */ __uint64_t mc_avec[32*2]; /* vector register file */ @@ -56,6 +57,7 @@ typedef struct __mcontext32 { int mc_flags; #define _MC_FP_VALID 0x01 #define _MC_AV_VALID 0x02 +#define _MC_VS_VALID 0x04 int mc_onstack; /* saved onstack flag */ int mc_len; /* sizeof(__mcontext) */ uint64_t mc_avec[32*2]; /* vector register file */ diff --git a/sys/powerpc/powerpc/exec_machdep.c b/sys/powerpc/powerpc/exec_machdep.c index bdd1da9c9cbd..073266f87c46 100644 --- a/sys/powerpc/powerpc/exec_machdep.c +++ b/sys/powerpc/powerpc/exec_machdep.c @@ -349,13 +349,6 @@ sys_sigreturn(struct thread *td, struct sigreturn_args *uap) if (error != 0) return (error); - /* - * Save FPU state if needed. User may have changed it on - * signal handler - */ - if (uc.uc_mcontext.mc_srr1 & PSL_FP) - save_fpu(td); - kern_sigprocmask(td, SIG_SETMASK, &uc.uc_sigmask, NULL, 0); CTR3(KTR_SIG, "sigreturn: return td=%p pc=%#x sp=%#x", @@ -432,6 +425,7 @@ grab_mcontext(struct thread *td, mcontext_t *mcp, int flags) } if (pcb->pcb_flags & PCB_VSX) { + mcp->mc_flags |= _MC_VS_VALID; for (i = 0; i < 32; i++) memcpy(&mcp->mc_vsxfpreg[i], &pcb->pcb_fpu.fpr[i].vsr[2], sizeof(double)); @@ -481,6 +475,7 @@ set_mcontext(struct thread *td, mcontext_t *mcp) struct pcb *pcb; struct trapframe *tf; register_t tls; + register_t msr; int i; pcb = td->td_pcb; @@ -531,6 +526,22 @@ set_mcontext(struct thread *td, mcontext_t *mcp) tf->srr1 &= ~(PSL_FP | PSL_VSX | PSL_VEC); pcb->pcb_flags &= ~(PCB_FPU | PCB_VSX | PCB_VEC); + /* + * Ensure the FPU is also disabled in hardware. + * + * Without this, it's possible for the register reload to fail if we + * don't switch to a FPU disabled context before resuming the original + * thread. Specifically, if the FPU/VSX unavailable exception is never + * hit, then whatever data is still in the FP/VSX registers when + * sigresume is callled will used by the resumed thread, instead of the + * previously saved data from the mcontext. + */ + critical_enter(); + msr = mfmsr() & ~(PSL_FP | PSL_VSX | PSL_VEC); + isync(); + mtmsr(msr); + critical_exit(); + if (mcp->mc_flags & _MC_FP_VALID) { /* enable_fpu() will happen lazily on a fault */ pcb->pcb_flags |= PCB_FPREGS; @@ -539,8 +550,12 @@ set_mcontext(struct thread *td, mcontext_t *mcp) for (i = 0; i < 32; i++) { memcpy(&pcb->pcb_fpu.fpr[i].fpr, &mcp->mc_fpreg[i], sizeof(double)); - memcpy(&pcb->pcb_fpu.fpr[i].vsr[2], - &mcp->mc_vsxfpreg[i], sizeof(double)); + } + if (mcp->mc_flags & _MC_VS_VALID) { + for (i = 0; i < 32; i++) { + memcpy(&pcb->pcb_fpu.fpr[i].vsr[2], + &mcp->mc_vsxfpreg[i], sizeof(double)); + } } } diff --git a/sys/powerpc/powerpc/fpu.c b/sys/powerpc/powerpc/fpu.c index 8f5df2f7d576..a66dcf2ae3be 100644 --- a/sys/powerpc/powerpc/fpu.c +++ b/sys/powerpc/powerpc/fpu.c @@ -65,8 +65,19 @@ save_fpu_int(struct thread *td) * Save the floating-point registers and FPSCR to the PCB */ if (pcb->pcb_flags & PCB_VSX) { - #define SFP(n) __asm ("stxvw4x " #n ", 0,%0" \ +#if _BYTE_ORDER == _BIG_ENDIAN + #define SFP(n) __asm("stxvw4x " #n ", 0,%0" \ :: "b"(&pcb->pcb_fpu.fpr[n])); +#else + /* + * stxvw2x will swap words within the FP double word on LE systems, + * leading to corruption if VSX is used to store state and FP is + * subsequently used to restore state. + * Use stxvd2x instead. + */ + #define SFP(n) __asm("stxvd2x " #n ", 0,%0" \ + :: "b"(&pcb->pcb_fpu.fpr[n])); +#endif SFP(0); SFP(1); SFP(2); SFP(3); SFP(4); SFP(5); SFP(6); SFP(7); SFP(8); SFP(9); SFP(10); SFP(11); @@ -77,7 +88,7 @@ save_fpu_int(struct thread *td) SFP(28); SFP(29); SFP(30); SFP(31); #undef SFP } else { - #define SFP(n) __asm ("stfd " #n ", 0(%0)" \ + #define SFP(n) __asm("stfd " #n ", 0(%0)" \ :: "b"(&pcb->pcb_fpu.fpr[n].fpr)); SFP(0); SFP(1); SFP(2); SFP(3); SFP(4); SFP(5); SFP(6); SFP(7); @@ -150,8 +161,19 @@ enable_fpu(struct thread *td) :: "b"(&pcb->pcb_fpu.fpscr)); if (pcb->pcb_flags & PCB_VSX) { - #define LFP(n) __asm ("lxvw4x " #n ", 0,%0" \ +#if _BYTE_ORDER == _BIG_ENDIAN + #define LFP(n) __asm("lxvw4x " #n ", 0,%0" \ + :: "b"(&pcb->pcb_fpu.fpr[n])); +#else + /* + * lxvw4x will swap words within the FP double word on LE systems, + * leading to corruption if FP is used to store state and VSX is + * subsequently used to restore state. + * Use lxvd2x instead. + */ + #define LFP(n) __asm("lxvd2x " #n ", 0,%0" \ :: "b"(&pcb->pcb_fpu.fpr[n])); +#endif LFP(0); LFP(1); LFP(2); LFP(3); LFP(4); LFP(5); LFP(6); LFP(7); LFP(8); LFP(9); LFP(10); LFP(11); @@ -162,7 +184,7 @@ enable_fpu(struct thread *td) LFP(28); LFP(29); LFP(30); LFP(31); #undef LFP } else { - #define LFP(n) __asm ("lfd " #n ", 0(%0)" \ + #define LFP(n) __asm("lfd " #n ", 0(%0)" \ :: "b"(&pcb->pcb_fpu.fpr[n].fpr)); LFP(0); LFP(1); LFP(2); LFP(3); LFP(4); LFP(5); LFP(6); LFP(7); From nobody Mon Jul 21 03:04:17 2025 X-Original-To: dev-commits-src-all@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 4bllc2467nz621b9; Mon, 21 Jul 2025 03:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bllc16Ydsz3FrP; Mon, 21 Jul 2025 03:04:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753067057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7erx+m9NdKsTpXpDie6lNf1r1nVLOS8JCK6BccGNd7M=; b=QJ/Gj94GkNT6dp8hfZHDls8gKQzaAs3mXpyMAYb6ZAMKbYGHMvk6P/3JguNGCp+lbY93Hl o2syzGIlOtYLM1X4BZUbRGeAmdQOB45z43USdgH/mAhI5b77cEET7b6vzheidFIRATQr3N s3R88NsK6ms3r4ASxe9EpmnDkVHFcetY2hnvwK6EW1vsWAQOCcYSsvK5k/5wuPIe64t0sq JEoOOCYIdky9DMCjFsTjYsc/7VI7Af3ORgwm4PGfE/NGdxG/0xwr6C0vaJB7obo33iRC1h r8+dpEqXpRfj27jR9TeCM6A79vNkVpR6B7rsy0/zuUCVZhPW+vxA9iA9q3CPSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753067057; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7erx+m9NdKsTpXpDie6lNf1r1nVLOS8JCK6BccGNd7M=; b=OWeMpD8ZYDVNxVP9vcGbwBSAfjDQZhKr7y6x/dNyA5J0uU2BBdsHaA0NDqo1GjvZeQclOT QGDgl+P9iQSAtXlhoX0wOx7ZBGseK6sK5fmzvdhmIRHjyQ8GJebY5NvScD7IvgjO9Wmdhf XVgW1xWsqwJK9RKEemtiWxNQAO9lmIoJZ+gj0SZMjngA0mbkH8dcWfk3reZfMHtWWDMR/B cUZmatuj5LVKfQeB+Mm+KS8dsQiIr+i3QqYSjWVpDi9suojhYRKNC1AQtKcJVeyoV+Ui9N R5aNDFwRD4ZDD4LBGPbI8o1Yo0f/nQVxwN7NbuNFdwnyxpp6baPCiPdvEx+9eQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753067057; a=rsa-sha256; cv=none; b=V+ftSss8FrjsdTl6KTYWzWUrzz3Thy3s93xz7P9c4OVFXnHXYOH1RU5DBp/zi3QccdFw4j h/0Z53u/CRudkfpb3jsOoPC3oXhDWmjpHXR4sS16LimNBuF0+o6oXZskokpjcR/eW4ZHv2 Bd+KGlievcE4bcHL+FEQ7sseL2AcbRIBWfVf2m9bOOuj0EIrKAGVXSE9yTbgTVToUBJ8fd aAaJAl3NzHCfH2iq53bLEaO/wAZ2A4wJW7KYqHboWji9u0FL39ZX1yjQmtt6GctGnlnORx b0ld5aYTVSffncbY1Lf9KY6jnGX019m67SwP1ZOc2O2/xOpkvXXyPEHTAkt4kg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bllc15xtbzgk1; Mon, 21 Jul 2025 03:04:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L34Hs2009803; Mon, 21 Jul 2025 03:04:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L34HgV009800; Mon, 21 Jul 2025 03:04:17 GMT (envelope-from git) Date: Mon, 21 Jul 2025 03:04:17 GMT Message-Id: <202507210304.56L34HgV009800@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Justin Hibbits Subject: git: 6e211ff4902a - stable/14 - libc/powerpc64: Fix swapcontext(3) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6e211ff4902a4cab3552b7bc21b9688a7f0e6dbd Auto-Submitted: auto-generated The branch stable/14 has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=6e211ff4902a4cab3552b7bc21b9688a7f0e6dbd commit 6e211ff4902a4cab3552b7bc21b9688a7f0e6dbd Author: Timothy Pearson AuthorDate: 2025-07-08 13:41:15 +0000 Commit: Justin Hibbits CommitDate: 2025-07-21 02:56:59 +0000 libc/powerpc64: Fix swapcontext(3) On PowerPC platforms a valid link to the Table of Contents (TOC) is required for PLT lookups to function. This TOC pointer is stored in a dedicated register, and is used along with the stack pointer by both C prologue and PLT lookup code. When calling swapcontext() with uc_link != NULL, a PLT lookup to setcontext(3) is attempted from within the _ctx_done context. The exiting process has usually trashed both r1 and r2 at this point, leading to a crash within the PLT lookup before setcontext(2) is reached to restore the linked context. Save and restore r2 as in a regular function. This ensures the subsequent PLT lookup to setcontext(3) succeeds. Signed-off-by: Timothy Pearson MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/1759 (cherry picked from commit 8efa35fea384d209c683dfbae8f49f2737a41941) --- lib/libc/powerpc64/gen/_ctx_start.S | 14 ++++++++ lib/libc/powerpc64/gen/makecontext.c | 3 +- lib/libc/tests/sys/Makefile | 4 +-- lib/libc/tests/sys/swapcontext_test.c | 63 +++++++++++++++++++++++++++++++++++ 4 files changed, 81 insertions(+), 3 deletions(-) diff --git a/lib/libc/powerpc64/gen/_ctx_start.S b/lib/libc/powerpc64/gen/_ctx_start.S index c2f8abfd6486..98225f9c1138 100644 --- a/lib/libc/powerpc64/gen/_ctx_start.S +++ b/lib/libc/powerpc64/gen/_ctx_start.S @@ -34,6 +34,16 @@ ld %r2,8(%r14) ld %r14,0(%r14) #else + /* + * The stack frame was already set up in makecontext(), + * so we can safely use the guaranteed fields here. + * + * Note we do step on the allocated stack frame's TOC, + * but since we never return from this function (i.e. + * never restore the stack frame) this should be safe. + */ + std %r2,24(%r1) /* save TOC */ + /* Load global entry point */ mr %r12,%r14 #endif @@ -41,6 +51,10 @@ blrl /* branch to start function */ mr %r3,%r15 /* pass pointer to ucontext as argument */ nop +#if defined(_CALL_ELF) && _CALL_ELF != 1 + /* Restore TOC */ + ld %r2,24(%r1) +#endif bl CNAME(_ctx_done) /* branch to ctxt completion func */ /* * we should never return from the diff --git a/lib/libc/powerpc64/gen/makecontext.c b/lib/libc/powerpc64/gen/makecontext.c index 75c2d40bdd60..9e3a976fa1bd 100644 --- a/lib/libc/powerpc64/gen/makecontext.c +++ b/lib/libc/powerpc64/gen/makecontext.c @@ -78,7 +78,7 @@ __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...) */ stackargs = (argc > 8) ? argc - 8 : 0; sp = (char *) ucp->uc_stack.ss_sp + ucp->uc_stack.ss_size - - sizeof(uintptr_t)*(stackargs + 2); + - sizeof(uintptr_t)*(stackargs + 6); sp = (char *)((uintptr_t)sp & ~0x1f); mc = &ucp->uc_mcontext; @@ -119,6 +119,7 @@ __makecontext(ucontext_t *ucp, void (*start)(void), int argc, ...) mc->mc_srr0 = *(uintptr_t *)_ctx_start; #else mc->mc_srr0 = (uintptr_t) _ctx_start; + mc->mc_gpr[12] = (uintptr_t) _ctx_start;/* required for prologue */ #endif mc->mc_gpr[1] = (uintptr_t) sp; /* new stack pointer */ mc->mc_gpr[14] = (uintptr_t) start; /* r14 <- start */ diff --git a/lib/libc/tests/sys/Makefile b/lib/libc/tests/sys/Makefile index 380b3b511049..e93535288532 100644 --- a/lib/libc/tests/sys/Makefile +++ b/lib/libc/tests/sys/Makefile @@ -8,11 +8,11 @@ ATF_TESTS_C+= brk_test .endif ATF_TESTS_C+= cpuset_test ATF_TESTS_C+= errno_test +ATF_TESTS_C+= swapcontext_test ATF_TESTS_C+= queue_test ATF_TESTS_C+= sendfile_test -# TODO: clone, lwp_create, lwp_ctl, posix_fadvise, recvmmsg, -# swapcontext +# TODO: clone, lwp_create, lwp_ctl, posix_fadvise, recvmmsg NETBSD_ATF_TESTS_C+= access_test NETBSD_ATF_TESTS_C+= bind_test NETBSD_ATF_TESTS_C+= chroot_test diff --git a/lib/libc/tests/sys/swapcontext_test.c b/lib/libc/tests/sys/swapcontext_test.c new file mode 100644 index 000000000000..f341a746e515 --- /dev/null +++ b/lib/libc/tests/sys/swapcontext_test.c @@ -0,0 +1,63 @@ +/*- + * Copyright (c) 2025 Raptor Computing Systems, LLC + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include +#include + +#include + +#define STACK_SIZE (64ull << 10) + +static volatile int callback_reached = 0; + +static ucontext_t uctx_save, uctx_switch; + +static void swapcontext_callback() +{ + // Increment callback reached variable + // If this is called multiple times, we will fail the test + // If this is not called at all, we will fail the test + callback_reached++; +} + +ATF_TC(swapcontext_basic); +ATF_TC_HEAD(swapcontext_basic, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Verify basic functionality of swapcontext"); +} + +ATF_TC_BODY(swapcontext_basic, tc) +{ + char *stack; + int res; + + stack = malloc(STACK_SIZE); + ATF_REQUIRE_MSG(stack != NULL, "malloc failed: %s", strerror(errno)); + res = getcontext(&uctx_switch); + ATF_REQUIRE_MSG(res == 0, "getcontext failed: %s", strerror(errno)); + + uctx_switch.uc_stack.ss_sp = stack; + uctx_switch.uc_stack.ss_size = STACK_SIZE; + uctx_switch.uc_link = &uctx_save; + makecontext(&uctx_switch, swapcontext_callback, 0); + + res = swapcontext(&uctx_save, &uctx_switch); + + ATF_REQUIRE_MSG(res == 0, "swapcontext failed: %s", strerror(errno)); + ATF_REQUIRE_MSG(callback_reached == 1, + "callback failed, reached %d times", callback_reached); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, swapcontext_basic); + + return (atf_no_error()); +} + From nobody Mon Jul 21 04:40:17 2025 X-Original-To: dev-commits-src-all@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 4blnkp09Jrz626v8; Mon, 21 Jul 2025 04:40: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blnkn6Gk6z3FNw; Mon, 21 Jul 2025 04:40:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753072817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ign1e/8XZs9IeOIVsMOwCOPZBOQ46ejR7cbIXwoyjXY=; b=Q+jPRzn5UoCJ8dHg200UEVZ133tdiX6j9wrl3p7YsWnuJqrQUJe1P6nx9PZX95mDHgIUXt /QxuFwBCzhNVBDPZXrZydAl3ftzvkSMccJ5Ljal4XyjfV12srFd2HUuNxmwQCh6wKnGDyZ A+I3pDLkHfVqJxrUpomdiAYRME7x3a6WXDXTBiDtaf5JhUzFl8L9SzvfQe+uN1mowIrseZ BsxKpbDiyd4qBP8VntdOvN8wkS4zZ/+bptFb27LMTecfBl9VmmA/ee6TEYlgf+mdjdznSj IjkYZ3hD6sfJlXMoNHKisAzbnfOZUXU8llu0g26P24y1GcljuwXT2hvH9kqojw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753072817; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ign1e/8XZs9IeOIVsMOwCOPZBOQ46ejR7cbIXwoyjXY=; b=x33BTc8V8Wje0JjAgMnG70F8HEfwHKnrZUsfDRdgK3j2TLLBF0DyPwO4qJGkPRTvc/gvJ8 4zw+u2M92VG2ayKzRlG+sNcu2lh2b0mvRqVgOfHnXEnHFhazVKTkFdHk5R84kMMy9aCbx0 GaweXmxC6t9pwvpoXTXefLHCXSldiz0kEDFtlp4DQVHjlCTut/gMzqc6+tLToAwSXjywKv F5apyGafalTOri6rvVKQ1RxO7Zjh40eOEHlRCnCoJLM68voCAYeQlRRtA0Xh+wJvgsLsKz 7PiTxFlAkRrgJU0fgNHdwqpyPkr9l6MEjG+ebFi6IP9aZLy2xR+m6CYJGcD3+A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753072817; a=rsa-sha256; cv=none; b=hE6Qz6tace2gH6rzMQOlrZJCuSPvko/yVWCGC4hIJ/H5/hYIcXHs5YYUCL5j1piukzOyX8 2YC9eLBPh7iFEn37XPzMS9savye3bqcrIJ/ja231fwV8sh9Zyew6ZQ3uxQNGEdesH9NETm 0159xjUOSCEMEP7QzrD0jadmzCYCpxEqcco/w67Ekf0hhGqoPGTjqHWqjSrJjmaxCvnUYI WyFGgSBKPk/AolJU2jPOzppK0frjhw8tzpylbnplTsqf1vimKDsb5ixeikq0p/Rn2PViP0 Zsx31nuIPEQldz++4T2a4LTUcizWOQyfka0m7NQjroz16ZiyhX09mc90UlZrUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blnkn4gh4zjx1; Mon, 21 Jul 2025 04:40:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L4eHcT089885; Mon, 21 Jul 2025 04:40:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L4eHXK089876; Mon, 21 Jul 2025 04:40:17 GMT (envelope-from git) Date: Mon, 21 Jul 2025 04:40:17 GMT Message-Id: <202507210440.56L4eHXK089876@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 5df4eb5fd7f2 - main - krb5: Add pkgbase templates List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5df4eb5fd7f2057d62ea2a142e8be42dc8b41c59 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=5df4eb5fd7f2057d62ea2a142e8be42dc8b41c59 commit 5df4eb5fd7f2057d62ea2a142e8be42dc8b41c59 Author: Cy Schubert AuthorDate: 2025-07-21 04:37:38 +0000 Commit: Cy Schubert CommitDate: 2025-07-21 04:37:38 +0000 krb5: Add pkgbase templates Repored by: fluffy --- release/packages/ucl/krb5-all.ucl | 4 ++++ release/packages/ucl/krb5-lib-all.ucl | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/release/packages/ucl/krb5-all.ucl b/release/packages/ucl/krb5-all.ucl new file mode 100644 index 000000000000..e269aabe1e85 --- /dev/null +++ b/release/packages/ucl/krb5-all.ucl @@ -0,0 +1,4 @@ +comment = "KRB5 Utilities" +desc = < To: Cy Schubert Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 5df4eb5fd7f2 - main - krb5: Add pkgbase templates Message-ID: Mail-Followup-To: Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202507210440.56L4eHXK089876@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="an7zxtnjBA17Oi4B" Content-Disposition: inline In-Reply-To: <202507210440.56L4eHXK089876@gitrepo.freebsd.org> --an7zxtnjBA17Oi4B Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Cy Schubert: > krb5: Add pkgbase templates NB, a related review is open at which will restore the old package names for WITH_MITKRB5. --an7zxtnjBA17Oi4B Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHQEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaH3HQwAKCRD1nT63mIK/ YCqSAP91lPV/BPJcz4AD/h6aWrctsBnoenLrBntt/TczQxRBggD4gZnPWqgYn8h9 2NvHSPw2v1GBDT6cvlFNjq8bpOVLAw== =aJXH -----END PGP SIGNATURE----- --an7zxtnjBA17Oi4B-- From nobody Mon Jul 21 04:57:11 2025 X-Original-To: dev-commits-src-all@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 4blp6L6wXnz627lZ; Mon, 21 Jul 2025 04:57:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta003.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blp6L0mQVz3XnJ; Mon, 21 Jul 2025 04:57:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of cy.schubert@cschubert.com designates 3.97.99.32 as permitted sender) smtp.mailfrom=cy.schubert@cschubert.com; dmarc=permerror reason="p tag has invalid value: quarantine rua=mailto:p[ostmaster@cschubert.com" header.from=cschubert.com (policy=permerror) Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTPS id dUGbuIeqU9JM2diaPunwgW; Mon, 21 Jul 2025 04:57:13 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id diaOuoxWmWbOadiaOuMBqr; Mon, 21 Jul 2025 04:57:13 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=Q5lx4J2a c=1 sm=1 tr=0 ts=687dc8a9 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=Wb1JkmetP80A:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=uDgwQl3cNzfka0UZ6WAA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id A656F395; Sun, 20 Jul 2025 21:57:11 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 7C3D321A; Sun, 20 Jul 2025 21:57:11 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 5df4eb5fd7f2 - main - krb5: Add pkgbase templates In-reply-to: References: <202507210440.56L4eHXK089876@gitrepo.freebsd.org> Comments: In-reply-to Lexi Winter message dated "Mon, 21 Jul 2025 05:51:20 +0100." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Sun, 20 Jul 2025 21:57:11 -0700 Message-Id: <20250721045711.7C3D321A@slippy.cwsent.com> X-CMAE-Envelope: MS4xfClsS6vs/WtpUI3ttghUzlR1VP4H9EIYDvuwI7XMpfebhw0uWGP7t66WsE4PzG0kT/uaAu3V7zrFCPvN6mvk/uelK2GVBWT2evd5CoZTT3RThOlmv1O3 NZOqMSaYzHkUMLBw4H1rP5S+oZdqpG6xrTXLMSdPtuq8DDY/BmPeKuK165arFS5Q++u5X5sfzhzy1ofdx6BABvUywZyK/ToEZKLDQh4lUETMi4aXP+MUDPlj aGFxUiqEbAKogVamqSJmIRaCmwbFYopsSPRNxDrrIkw4ihezbzctfa+VuTN6vnwwue2YrirqoZsRGwIDIasFzL7xjC8ScIUQNK/GWxoiZxU= X-Spamd-Result: default: False [1.52 / 15.00]; NEURAL_SPAM_LONG(0.90)[0.900]; NEURAL_SPAM_MEDIUM(0.51)[0.512]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:3.97.99.32/31]; RCVD_IN_DNSWL_LOW(-0.10)[3.97.99.32:from]; MIME_GOOD(-0.10)[text/plain]; NEURAL_SPAM_SHORT(0.00)[0.005]; RCVD_VIA_SMTP_AUTH(0.00)[]; REPLYTO_EQ_FROM(0.00)[]; MIME_TRACE(0.00)[0:+]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; DMARC_BAD_POLICY(0.00)[cschubert.com : p tag has invalid value: quarantine rua=mailto:p[ostmaster@cschubert.com]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; R_DKIM_NA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4blp6L0mQVz3XnJ X-Spamd-Bar: + In message , Lexi Winter writes: > > > --an7zxtnjBA17Oi4B > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > > Cy Schubert: > > krb5: Add pkgbase templates > > NB, a related review is open at > which will restore the old package names for WITH_MITKRB5. I disagree. This will cause confusion between Heimdal and MIT KRB5. We can certainly entertain this idea after the last FreeBSD with Heimdal is EOL though. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Mon Jul 21 05:30:32 2025 X-Original-To: dev-commits-src-all@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 4blprn1H5Yz6293t; Mon, 21 Jul 2025 05:30: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blprn0V85z3vrZ; Mon, 21 Jul 2025 05:30:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753075833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l8LqzOkoAvX49lw9u5QG+UFhY2vDYbCeFrrfOqUxv2Y=; b=e4TIW2Bz4SjIAlZNb7sTljGDxMDyiSHkEyIKBzBYrJJHgCgBV4v3HFQ5QFkqce37kh6+WV Fbu13cWvCisrC9DTj1GzjdggefYS8Qhocnk0LnS+tglSbv3Jd9GD0ZqpiAeWKJNanoU+sj a32JyJcy/lZGnp8O0wAJCIaXjUAiRyPgSJqEPVdMPhs1K2ZGKFgjERn9ZdD42N9oK3zYAW REdDQx7iSpiLMFhTb1u9CJk/dXzh2ys85G+kc4F2fj4lQDSAkEl+OTX5xFqqygPW3hJkkv bA2eXKt61hpt6MdCNPhxKFcdi4tTT77TJ7ySNiJwKAhA4qLcUrnl+HJ+UoeSTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753075833; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l8LqzOkoAvX49lw9u5QG+UFhY2vDYbCeFrrfOqUxv2Y=; b=k6scpcIXW1uDefDpCIzpzIytpLd7XwAnmRXXpQVHZgznh8gFdFQ7iXTQmDIgjdXN+oEidL AiGUm5o35C2Fu+pMu+Nb5ZEntI9gyFXPwUo6/q4dlOTwWrjrqoadx0XMA87xQZjs2A1x0T tSlCXLE0hOQzUy9z2HD3pOI5jQGTEAzYCxvbhBVoJmu+Ykxf7pkXzukvmeE7gmRSnkaV1y ZHqrVCbTpIvh0R22f2lBug2cEAKKDEm2misfFW8e0ONKm0sCUmp0TwK7O82ZV1iP0C01Gu Q4LnnxsAGnT5GQG30kiiUmTbrQFRiXw+yNtqVvRe7e9hncyw7IkI8PPL4TYklQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753075833; a=rsa-sha256; cv=none; b=F1pp1Kun3Tc41wg4uX7iRJg4daPrL66a5wqWI9w9uisAU9OlCSOIN85uv5cNbeYO8fAuVu hD+uDGNlLQcigk0cOuLYVrARO3xTDNowMK0PYZJUeZLEAoUF7Iz5zmal1jDYTAZmCABcc2 8v0uxpJe2JP3/2vxZn5C1FqZV4wm6OP4v/GUDwP2w8GpmD3ldsBas9Rog71wcIv4d20+8Y Ik35UYjIjcsjC4TfW+fZcjPqcTc3XKTngU1lr6mvmCR3GKYDAd3+2qGJaR1evNKMJ1F+H7 D5LGbcFRhWA4oO4u/PZHSXofepy7yb/gGGmh63WCOicZFfCl6CrxdWNROxZk0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blprn03yHzlRv; Mon, 21 Jul 2025 05:30:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L5UWfJ084330; Mon, 21 Jul 2025 05:30:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L5UWoJ084327; Mon, 21 Jul 2025 05:30:32 GMT (envelope-from git) Date: Mon, 21 Jul 2025 05:30:32 GMT Message-Id: <202507210530.56L5UWoJ084327@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: db9ef9d5f517 - main - rtld: do not relocate tlsinit address twice List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: db9ef9d5f517a14160bb3d0a599b8392e01fb400 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=db9ef9d5f517a14160bb3d0a599b8392e01fb400 commit db9ef9d5f517a14160bb3d0a599b8392e01fb400 Author: Konstantin Belousov AuthorDate: 2025-07-21 04:09:53 +0000 Commit: Konstantin Belousov CommitDate: 2025-07-21 05:29:05 +0000 rtld: do not relocate tlsinit address twice The addend for PT_TLS p_vaddr value should be obj' relocbase and not mapbase. It does not matter for dso which is linked at the address zero, but for executables in direct-exec mode with non-zero link address mapbase is already at the link base. Then, adding mapbase to phtls->p_vaddr adds twice as much relocbase offset as needed. PR: 288334 Reported by: Jordan Gordeev Reviewed by: jrtc27 Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D51448 --- libexec/rtld-elf/map_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index 04d17072af77..c6a98b50a165 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -337,7 +337,7 @@ map_object(int fd, const char *path, const struct stat *sb, bool ismain) obj->tlsalign = phtls->p_align; obj->tlspoffset = phtls->p_offset; obj->tlsinitsize = phtls->p_filesz; - obj->tlsinit = mapbase + phtls->p_vaddr; + obj->tlsinit = obj->relocbase + phtls->p_vaddr; } obj->stack_flags = stack_flags; if (note_start < note_end) From nobody Mon Jul 21 06:17:13 2025 X-Original-To: dev-commits-src-all@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 4blqtd6DkWz62Cmw; Mon, 21 Jul 2025 06:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blqtd3SyPz3Sjv; Mon, 21 Jul 2025 06:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753078633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ko4PgCZn9aYjpZBV1Nd7aEP48ElF2OSc8h9e74TgzFI=; b=VB51vFwkyW3tIsNJK9M4hiUT01MIDVbXylVpBv0zv1oYFK0a2GP33upf4JVkM/hB5SCd+b d2ynN75OxF2ght0ysInP75g+dly5jhH2B/nk9gLMmAN9QwDNXEl6iypfdU9YmJsB/c1gGU vS96p+A9f+lo/hPtDyrqpWIFW8ixSiDpDAd1Btenv5xjItDvRCWMJDAVTNpCb2ileGGYoK B0NCeLHZdE2xlhXQU3OHKc3UOta3DdCIHNFZsw9j3TGzyvRef3rJyms9qgJYW23EO3suAs i+2DdRwGM0fpjuqznB0e616ih0yYk+8rK6HVJckhuMhsXb2AyoBqFJQ7z9P8JQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753078633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Ko4PgCZn9aYjpZBV1Nd7aEP48ElF2OSc8h9e74TgzFI=; b=csg0A+ODgvsmDxJ3Vaw+4BDL69eFGmzG4jmnCa1rjw9nFwlqJ99HPfcOWcH321JkFoz4C3 kfOriOtL+vSG+P2gd8mtLBlGb4F56QvfXQpkAeopbae0SW8vqZJoPKygxovtu1g+Pu3ZJg Ff+QG1kuVJWXw3WPxLvLaILB57TMQmkNira9Y0j4hPreFis5Wb3JJJHOIZk0dIXL7CTCgn T/+d5zr2EzCnzdwqjexL152QCEtaOaTMnnHT5vcPjN+jgFAs4iiDxNNa1htJpnOcA8iNZi dpXq9uW+qUAuuzJO72RPTWtBQiKkBPeHDCJu+Cw2qy2HENzIK9bV9yFyA+CKgQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753078633; a=rsa-sha256; cv=none; b=AVlEeFeupR10TWwQxJbvNkK5Kgu9f6oI5S4Ul5v/e61iIS7OMp8F56Dnuz06ZX8nqYvDGA 4X4emDoON6zJCZMyahcuNPs1h60c8LkCzAFqXLtxsSZjQiPzgnaBu8VhKSEKICrJgTFKYf YsG3ve6FR1K7jdFxX3cGujfedlW7rsudAb9SxV9LFGJqFCJmsUIScF+mXIE4oxC7E35i+s XzO48KDUPbguu75BUGakys5UUmREZva4jrbtOuzlTFV5gOp6f/vCTJkZmR6RuZZGV5GTl0 h7o7AUWEqM0XtoypC+8uum4vMbrK+/2HEtnIf0Xch0r9devnmSFzxuKcWoS9Pg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blqtd2MRyzmVR; Mon, 21 Jul 2025 06:17:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L6HDYt071268; Mon, 21 Jul 2025 06:17:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L6HD8M071265; Mon, 21 Jul 2025 06:17:13 GMT (envelope-from git) Date: Mon, 21 Jul 2025 06:17:13 GMT Message-Id: <202507210617.56L6HD8M071265@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: ShengYi Hung Subject: git: 1c675fb36545 - main - libusb: implement libusb_free_pollfds List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1c675fb36545e9da8eef995140275263fd169d3b Auto-Submitted: auto-generated The branch main has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=1c675fb36545e9da8eef995140275263fd169d3b commit 1c675fb36545e9da8eef995140275263fd169d3b Author: ShengYi Hung AuthorDate: 2025-07-09 07:38:17 +0000 Commit: ShengYi Hung CommitDate: 2025-07-21 06:15:15 +0000 libusb: implement libusb_free_pollfds libusb provides an API that frees the storage for pollfds regardless of their contents. It does not check whether the file descriptors inside are already closed. Approved by: markj (mentor), lwhsu(mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51221 --- lib/libusb/libusb.3 | 6 ++++++ lib/libusb/libusb.h | 3 ++- lib/libusb/libusb10_io.c | 9 +++++++++ 3 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/libusb/libusb.3 b/lib/libusb/libusb.3 index 74b85d4aa17e..da927f8985a8 100644 --- a/lib/libusb/libusb.3 +++ b/lib/libusb/libusb.3 @@ -775,6 +775,12 @@ argument can be either of LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED or LIBUSB_HOTPLUG_ .Ft void .Fn libusb_hotplug_deregister_callback "libusb_context *ctx" "libusb_hotplug_callback_handle handle" This function unregisters a hotplug filter. +.Pp +.Ft void +.Fn libusb_free_pollfds "const struct libusb_pollfd **pollfds" +This function releases the memory storage in +.Fa pollfds , +and is safe to call when the argument is NULL. .Sh LIBUSB VERSION 0.1 COMPATIBILITY The library is also compliant with LibUSB version 0.1.12. .Pp diff --git a/lib/libusb/libusb.h b/lib/libusb/libusb.h index 6fb1c19fad13..1962152c0b68 100644 --- a/lib/libusb/libusb.h +++ b/lib/libusb/libusb.h @@ -573,7 +573,8 @@ int libusb_handle_events(libusb_context * ctx); int libusb_handle_events_locked(libusb_context * ctx, struct timeval *tv); int libusb_get_next_timeout(libusb_context * ctx, struct timeval *tv); void libusb_set_pollfd_notifiers(libusb_context * ctx, libusb_pollfd_added_cb added_cb, libusb_pollfd_removed_cb removed_cb, void *user_data); -const struct libusb_pollfd **libusb_get_pollfds(libusb_context * ctx); +const struct libusb_pollfd **libusb_get_pollfds(libusb_context *ctx); +void libusb_free_pollfds(const struct libusb_pollfd **pollfds); /* Synchronous device I/O */ diff --git a/lib/libusb/libusb10_io.c b/lib/libusb/libusb10_io.c index dd541b09caa6..ea365162df5a 100644 --- a/lib/libusb/libusb10_io.c +++ b/lib/libusb/libusb10_io.c @@ -842,3 +842,12 @@ libusb_transfer_get_stream_id(struct libusb_transfer *transfer) /* get stream ID */ return (sxfer->stream_id); } + +void +libusb_free_pollfds(const struct libusb_pollfd **pollfds) +{ + if (pollfds == NULL) + return; + + free(pollfds); +} From nobody Mon Jul 21 06:17:15 2025 X-Original-To: dev-commits-src-all@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 4blqtg5zl6z62D7d; Mon, 21 Jul 2025 06:17: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blqtg3DThz3Sk5; Mon, 21 Jul 2025 06:17:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753078635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3mO631SF39AILQKZb9n0saDhXJwlN0BASHAyZv2XnyY=; b=n174vCgJ8T6UICxHx9XqZ28JJyk872wVbCE5NHRXxzSIXe2Py7Cf85P4xCDyWuCUnTeWFd KWagh2EdxArrEYdRmpL1ADPMOpcQn90PrfrrUPmCWDDh/2lm5WbyyOMtcX8FI6FgPbTBEK WbsNq2swttnVb+7y5maq/2CdY7ImbFOQvN1JSDwbz7RN2jSjnu9qMOyBYL1f41nQGmmjYu 8LcfSUKZMIAE/lo+bpV5Fe9pB0Yk8A8CygxTXp+5qI7jInUsE1UMhtfot/dF2VYgVkqXXK IF6CTghflHUvqhEGS+lN6BT4Sti2yD6Ci175YSAwyI7N4mPHshTpMbpH+MF9Vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753078635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3mO631SF39AILQKZb9n0saDhXJwlN0BASHAyZv2XnyY=; b=ReWZF+jgPivW+1+c3ccJDYBeYX6XwJi4UmbyrvO3p8qm8j7syQEhV1hFfGq3iFRkizSYGS XRlXkuxYC6GlwWDtRf+L63CPhX/LCLc6YcQ3ZkCo6a9CrGT4DmoM/M960p/NtF8SsKap5r 3+iW9IKAENLlmiNkk8RUmlJMJjTRqoOT7ZytkCLdyFVsmvMqpQ8V16J81tDJr0KktK8oZD +sG9fLeQup1NGtOGRtZa0Ht/LqfiUXAQvXVJQIhm9QuTyxjGYiis9OteE/iSKbo0QH6k0c kNONGrSNmYF+ySRAQUjY7SFwA7Edvp/deAdXycy/74mDmotfnPYwqR7H/ummRA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753078635; a=rsa-sha256; cv=none; b=Joqm2J7LdvzcIixJYRokF+4Qg5MwDBBjYA8qgItPt5LQsaychugqz9sY+sIITG0cLGm0fR D90YpZFcFFH1A9yfs5bOgvs7tUMoMAdrQhcY2liPRfC9Dsk0QurxIwf9zcOM5V5TdOVk3g na/AZ7cQkkp3Beb7OrkFTEjC56fkUhCghyKUyroCCEFPHtbTt4hy4R9fcAe43i0cwoQEuq MjQrM9sJOi6sPZZgN/cgn0ya6riD2r2/1s95G6RObtPldTJfsR1JUv87qEcJToQXBoSnXb cElfDmPl6jGGyuCDOpskXyr5KtDvsvxUS0eNmFzlaVCmI8+r/GI6etNMsHH0Tg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blqtg2pFBzm5L; Mon, 21 Jul 2025 06:17:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L6HFB0071336; Mon, 21 Jul 2025 06:17:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L6HFFL071333; Mon, 21 Jul 2025 06:17:15 GMT (envelope-from git) Date: Mon, 21 Jul 2025 06:17:15 GMT Message-Id: <202507210617.56L6HFFL071333@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: ShengYi Hung Subject: git: 776e26f56832 - main - libusb: implement libusb_dev_mem_{alloc,free} List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 776e26f56832cb25dc70713acfb579bda6105024 Auto-Submitted: auto-generated The branch main has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=776e26f56832cb25dc70713acfb579bda6105024 commit 776e26f56832cb25dc70713acfb579bda6105024 Author: ShengYi Hung AuthorDate: 2025-07-09 08:11:34 +0000 Commit: ShengYi Hung CommitDate: 2025-07-21 06:16:07 +0000 libusb: implement libusb_dev_mem_{alloc,free} libusb provides an API to create DMA buffers for USB packets from the kernel. However, this feature is only available on Linux. On unsupported platforms, the allocation function returns NULL, and the free function returns 'not supported'. Approved by: markj (mentor), lwhsu(mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51222 --- lib/libusb/libusb.3 | 19 ++++++++++++++++++- lib/libusb/libusb.h | 3 +++ lib/libusb/libusb10.c | 13 +++++++++++++ 3 files changed, 34 insertions(+), 1 deletion(-) diff --git a/lib/libusb/libusb.3 b/lib/libusb/libusb.3 index 2e2ac8b1e98b..9dc752f0fd7b 100644 --- a/lib/libusb/libusb.3 +++ b/lib/libusb/libusb.3 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 13, 2025 +.Dd July 9, 2025 .Dt LIBUSB 3 .Os .Sh NAME @@ -366,6 +366,23 @@ argument is non-zero the feature is enabled. Else disabled. Returns 0 on success and a LIBUSB_ERROR code on failure. +.Pp +.Ft unsigned char * +.Fn libusb_dev_mem_alloc "libusb_device_handle *devh" +This function attempts to allocate a DMA memory block from the given +.Fa devh +so that we can enjoy the zero-copy transfer from kernel. +This function is provided for compatibility and is currently unimplemented and always returns NULL. +.Pp +.Ft int +.Fn libusb_dev_mem_free "libusb_device_handle *devh" "unsigned char *buffer" "size_t size" +This function frees the DMA memory in +.Fa devh +from the given +.Fa buffer +with +.Fa size . +This function is unimplemented and always returns LIBUSB_ERROR_NOT_SUPPORTED. .Sh USB DESCRIPTORS .Ft int .Fn libusb_get_device_descriptor "libusb_device *dev" "libusb_device_descriptor *desc" diff --git a/lib/libusb/libusb.h b/lib/libusb/libusb.h index 520b81da3a75..57478c1787ee 100644 --- a/lib/libusb/libusb.h +++ b/lib/libusb/libusb.h @@ -513,6 +513,9 @@ int libusb_detach_kernel_driver(libusb_device_handle * devh, int interface); int libusb_attach_kernel_driver(libusb_device_handle * devh, int interface); int libusb_set_auto_detach_kernel_driver(libusb_device_handle *dev, int enable); int libusb_set_interface_alt_setting(libusb_device_handle * devh, int interface_number, int alternate_setting); +unsigned char *libusb_dev_mem_alloc(libusb_device_handle *devh); +int libusb_dev_mem_free(libusb_device_handle *devh, unsigned char *buffer, + size_t size); /* USB Descriptors */ diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c index 6f1ca877fc28..6bfc01eb8c4e 100644 --- a/lib/libusb/libusb10.c +++ b/lib/libusb/libusb10.c @@ -1904,3 +1904,16 @@ libusb_setlocale(const char *locale) return (LIBUSB_ERROR_INVALID_PARAM); } + +unsigned char * +libusb_dev_mem_alloc(libusb_device_handle *devh) +{ + return (NULL); +} + +int +libusb_dev_mem_free(libusb_device_handle *devh, unsigned char *buffer, + size_t size) +{ + return (LIBUSB_ERROR_NOT_SUPPORTED); +} From nobody Mon Jul 21 06:17:16 2025 X-Original-To: dev-commits-src-all@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 4blqth66Nkz62DJn; Mon, 21 Jul 2025 06:17: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blqth4RBHz3Sqx; Mon, 21 Jul 2025 06:17:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753078636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gdKB3jXMUcAhPRzgPvydRCZrO6h5SPxuvSo+SZnM6X0=; b=S8Y6ZFCvbVqhAQTJ2ki3sCaYDN4QmC4SBhQ1t1M5TKrkqQ2zq3krxu8/lH0fLl1XFZWIab Ifkkc/jBl1BakYjeos3G5hVv96eYqCVevjZySuSN4bcX6nbsRusoxYBW0sf4xK6Ah0tWww 6gn84d1GC4RYpdDtgkxCJ3VIY2FtnA+Lh6oWR5odepIHr++jsLZTBjmzK8D9wGtrLfB0+V 4ysW7hIzIrXMBv9Uel4luSydk3JoVXwkUZRuAzRddAjHt8ynMUPoPzTDNz76p1DZ5ndIns ywVLnruQe6egrI57CXvJMGdcJWYwoCf+yR/t3Gc8xFlzamLWEdn7PsGln45z/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753078636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gdKB3jXMUcAhPRzgPvydRCZrO6h5SPxuvSo+SZnM6X0=; b=jAeM1qHKrLkznnwi6wZOHyojHvKQiow5bBpyuorxAr7A32CPveYoZz4JUd7kXgafbFgvUT DtP+YIr/vGRaZiEBr7Y9OYDRX8kqi5+n9exfNQ5ek05979dOSkqBvAWylhN0UZqocV8jKh B2p0aSW4sSgTKRQRdCo+epWLhQ15D26M/ors7Pc0DkbpZjafZW1Zf2t3M7ngUTX5PLMOLt ZdDWPeL39CIF52KEo+pa5aox9S3NTZGKTJijOhO8IzhNz9leawNZyEjesqL1kgMoZ98WYy fHV93AwIKiDqQfdxQX7l0Cez1kuwja0guaVP0PHr6b4kRlbPc5+ytpkTLT48CA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753078636; a=rsa-sha256; cv=none; b=ORLxUACP1gy86J1x1aB2y3B6cj3XaW1LFHtp40v63rc7A2ryakd+YFqRYYgLPaWMOPeT0F 4v4BAf+3Z5R6lpyxWal0d47r081CoOmr5jIHwmR5EHVMPQvsyF4y4fIb1DtvJVeJzWQjg9 tXB83pGesyp/Qyd3Zda5nQnXdDiitSdMvIo+j4vA6yzLVTn7U50mlZXV+G7k6qgopgXU4n 9/8OlPyfqEbT6skxHEhK4VWqaXUSZyF8obMGLqJuXbm+iJS0f320U1mmtrV1eX1JWP3Njb fPD2ovuaxSwovSGIMUSObzt/X8Y8mfWgxuj66+XAAJz/DGKx96UnDha61PC4ng== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blqth42h0zmnL; Mon, 21 Jul 2025 06:17:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L6HGD4071371; Mon, 21 Jul 2025 06:17:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L6HGMj071368; Mon, 21 Jul 2025 06:17:16 GMT (envelope-from git) Date: Mon, 21 Jul 2025 06:17:16 GMT Message-Id: <202507210617.56L6HGMj071368@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: ShengYi Hung Subject: git: 3eda34934097 - main - libusb: implement libusb_fill_bulk_stream_transfer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3eda34934097f5cbf1e4a91d3b7acb58904be85e Auto-Submitted: auto-generated The branch main has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=3eda34934097f5cbf1e4a91d3b7acb58904be85e commit 3eda34934097f5cbf1e4a91d3b7acb58904be85e Author: ShengYi Hung AuthorDate: 2025-07-09 11:27:26 +0000 Commit: ShengYi Hung CommitDate: 2025-07-21 06:16:41 +0000 libusb: implement libusb_fill_bulk_stream_transfer Bulk streams are essentially bulk transfers with a stream ID. All requirements from both libusb20 and the kernel are already handled; we just need to set the stream ID. Approved by: markj (mentor), lwhsu(mentor) Differential Revision: https://reviews.freebsd.org/D51226 --- lib/libusb/libusb.h | 1 + lib/libusb/libusb10.c | 1 + lib/libusb/libusb10_io.c | 13 +++++++++++++ 3 files changed, 15 insertions(+) diff --git a/lib/libusb/libusb.h b/lib/libusb/libusb.h index 57478c1787ee..1803ff637738 100644 --- a/lib/libusb/libusb.h +++ b/lib/libusb/libusb.h @@ -122,6 +122,7 @@ enum libusb_transfer_type { LIBUSB_TRANSFER_TYPE_ISOCHRONOUS = 1, LIBUSB_TRANSFER_TYPE_BULK = 2, LIBUSB_TRANSFER_TYPE_INTERRUPT = 3, + LIBUSB_TRANSFER_TYPE_BULK_STREAM = 4, }; enum libusb_standard_request { diff --git a/lib/libusb/libusb10.c b/lib/libusb/libusb10.c index 6bfc01eb8c4e..5c116b39ea17 100644 --- a/lib/libusb/libusb10.c +++ b/lib/libusb/libusb10.c @@ -1530,6 +1530,7 @@ found: libusb20_tr_set_callback(pxfer0, libusb10_isoc_proxy); break; case LIBUSB_TRANSFER_TYPE_BULK: + case LIBUSB_TRANSFER_TYPE_BULK_STREAM: case LIBUSB_TRANSFER_TYPE_INTERRUPT: libusb20_tr_set_callback(pxfer0, libusb10_bulk_intr_proxy); break; diff --git a/lib/libusb/libusb10_io.c b/lib/libusb/libusb10_io.c index ea365162df5a..c99586ff650d 100644 --- a/lib/libusb/libusb10_io.c +++ b/lib/libusb/libusb10_io.c @@ -780,6 +780,19 @@ libusb_fill_interrupt_transfer(struct libusb_transfer *transfer, transfer->callback = callback; } +void +libusb_fill_bulk_stream_transfer(struct libusb_transfer *transfer, + libusb_device_handle *dev_handle, unsigned char endpoint, + uint32_t stream_id, unsigned char *buffer, int length, + libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout) +{ + libusb_fill_bulk_transfer(transfer, dev_handle, endpoint, buffer, + length, callback, user_data, timeout); + transfer->type = LIBUSB_TRANSFER_TYPE_BULK_STREAM; + + libusb_transfer_set_stream_id(transfer, stream_id); +} + void libusb_fill_iso_transfer(struct libusb_transfer *transfer, libusb_device_handle *devh, uint8_t endpoint, uint8_t *buf, From nobody Mon Jul 21 07:25:31 2025 X-Original-To: dev-commits-src-all@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 4blsPS37Hgz62HmX; Mon, 21 Jul 2025 07:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blsPR6zVfz3GNj; Mon, 21 Jul 2025 07:25:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753082732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O7LKE2uSFw/+vnUt20ZnTCTT3vbH05z9NWuySsVtg74=; b=ey140/2DrEFF+C6eB+/hEZH85EN49JqbIl6TrvAGIELQCXMjzeTeMOTCd1O84NYF+6dbyM WNP5SpWwyTDhQdp41tnfr+YjVu38qmhXUWJyA8X8WqHDF/elmMsbB5d6rIpnyhw0AwZ/JW s/j7dsDWzsQec/Q875Y1aVOZ7/ZD39HytZVg/ZD/oUn2oIdd+4Q6JLKQd9MuqwoMOTHsCa GArqZJdYakyoGdcuRHC3MmefLvga7ox3ilJItNrFVLHgMnfP1Wsy4bJdJP3SqNdkaDCngt DwNkK/M8uUwbmNiVl68ukpyjPToAaQgqFMwQiH2OAtcBmlxdakhvZHhOdPqvgw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753082732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O7LKE2uSFw/+vnUt20ZnTCTT3vbH05z9NWuySsVtg74=; b=lp55dW/ujEAPhUkZ1bGcs/fCmXLUyYAGeY4m6Juu2gAb9WhKtlPzTP7iHQbKlNTQ8/vTgC +HMAbLXbugZvq7VHiG7EEr6wf7Np7RLGi+KTIr/07HLzDbSpVjkKhJWaAy3ppjO526yRzL xuG0/qIC4VbaVPh/SmxL8KStuzFnOh9O8e9nY62DIVTBXthjaMT1DUgLqzissiPI/Yipga qArPLHgZWjI6kaetARRIYkOnvUJdM+5XFljNKeOygvfYUNAVyfD9pVssAHt1wIrtnQJCfg Yl5auOteWfzlCa+Wm98ySzvxrnUw2RkfTCYFQR17BrTMEd9jEs9sl2ATAmhXcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753082732; a=rsa-sha256; cv=none; b=dSYgQlIFUtk3kCSnAkdNmz9b6R/vWVO2qnvkTHrIsrIOSkwECgQxZZRP92+Byfufto4GQF HX8kUbpySQnY5nC/XUO6Y8VLNeqy8Gcz0AzXm1Ind9WV7xFJ+q54stNnBYjaJC3F8etsNC 6z6HigZwnK9TozzqwYS+dZly8AffmSoAkqr3Lr54q18BOrEz1QVZ1X0rR3ibGdQahJtNt8 tYCaJSfsyg0bDSoVhjhuoi+oMQtg8imkyIl4iXIuN51XfVwtpKT/HCiWyhfc4fHJ8VRy+9 muNh4J/yizLJOp1y1VjG6r9WWtL1tSQoMbEczcbu2o0bv/+4sBt9TLQQTwyXYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blsPR6495zpKK; Mon, 21 Jul 2025 07:25:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L7PV7D003175; Mon, 21 Jul 2025 07:25:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L7PVqS003172; Mon, 21 Jul 2025 07:25:31 GMT (envelope-from git) Date: Mon, 21 Jul 2025 07:25:31 GMT Message-Id: <202507210725.56L7PVqS003172@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider Subject: git: f8b632fb046d - main - man.sh: avoid endless loop List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f8b632fb046de18f82705eddd5a11f91d54036df Auto-Submitted: auto-generated The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=f8b632fb046de18f82705eddd5a11f91d54036df commit f8b632fb046de18f82705eddd5a11f91d54036df Author: Wolfram Schneider AuthorDate: 2025-07-21 07:23:45 +0000 Commit: Wolfram Schneider CommitDate: 2025-07-21 07:23:45 +0000 man.sh: avoid endless loop limit the number of .so includes to a value of 32 instead of infinity. PR: 287037 Differential Revision: https://reviews.freebsd.org/D51412 --- usr.bin/man/man.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/usr.bin/man/man.sh b/usr.bin/man/man.sh index ec20fc813bf4..18595042da5f 100755 --- a/usr.bin/man/man.sh +++ b/usr.bin/man/man.sh @@ -313,6 +313,8 @@ manpath_warnings() { # redirected to another source file. man_check_for_so() { local IFS line tstr + local counter_so=0 + local counter_so_limit=32 unset IFS if [ -n "$catpage" ]; then @@ -320,13 +322,16 @@ man_check_for_so() { fi # We need to loop to accommodate multiple .so directives. - while true + while [ $counter_so -lt $counter_so_limit ] do + counter_so=$((counter_so + 1)) + line=$($cattool "$manpage" 2>/dev/null | grep -E -m1 -v '^\.\\"[ ]*|^[ ]*$') case "$line" in '.so /'*) break ;; # ignore absolute path '.so '*) trim "${line#.so}" - decho "$manpage includes $tstr" + decho "$manpage includes $tstri level=$counter_so" + # Glob and check for the file. if ! check_man "$1/$tstr" ""; then decho " Unable to find $tstr" @@ -337,6 +342,10 @@ man_check_for_so() { esac done + if [ $counter_so -ge $counter_so_limit ]; then + decho ".so include limit of $counter_so_limit reached, stop" + fi + return 0 } From nobody Mon Jul 21 07:51:37 2025 X-Original-To: dev-commits-src-all@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 4blszY57nLz62K8f; Mon, 21 Jul 2025 07:51: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blszY3vkpz3ZtY; Mon, 21 Jul 2025 07:51:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753084297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MfHk6vrX0YdAx0FAjlPcsXma6fwDCeOUcLM6P0DSA7M=; b=uWfLbjZOE8ic8ZZsyL+a1uzVIxxGqaIiw90ZgdfbkRJEg7+A81vWRY+dolMdgeyP+uEcgl au3CeEmMwSP4dPvAiITFQ2g1I4bhR2Qx2UiMM9mNF+Pod995R3LE7D5nliqU0WPi4HEZRM gX1MhrDHL5YOQmC9ffmJhH1hi8iiUmy3QnASSBEJZBBZdWaVig13XDK0+4sgKCX9Fg4pPZ Ad3SMbWRDtL1N075/VpF6UpCHaJzfMekne6iVCw9iL18QmbXu8g9wf/2H2AZ0n3jhEx4tb EUBHiQKvTVgltyhQACaTT6GPS24Zhedld0qsLsTiJ9P7qQz91nAHd98pJekS2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753084297; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MfHk6vrX0YdAx0FAjlPcsXma6fwDCeOUcLM6P0DSA7M=; b=orAviEjHA/Aq24Nar61fdOLtZwlVNhxyhCS8UHH6qXDS+ZxddZbOxKBjU62b4cCn1598g3 Sckv6CFI5anL7Mkn6WxkJqXuQ1rKEhAyxUG3gaDO5DXPpZFCximbjZtadlF2F1Tip8t46Q QnHC5462r+ujE1ecZwdZMpI077QYllActXTB2bYaKvzECXlMV2VBdrHDvV8agQEnbxUpx+ +ZLf63WanlVlghAcq6Yc7T/3xzVZrfNYPzSeXC+2uRPhMPxP6nRiVaOJJFS5Lkg1TXoqpr 4GKj5YYKcLW4+SKLrk9SAxFVt4V6nwPxYccFDcngRPWeg+KsRhuRuFRQ6FyZew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753084297; a=rsa-sha256; cv=none; b=XS6z+eElBKTKZ/G5DPoqtqvTHJnsflTD9u+3TqAawZXg0gwKRh1r7NbkcCPbLE7+SG3kHX i/eM/vr9yr9ja/L+xar85oBx54tj3+uRrhLnkjglbW9Evlrvml3DL9liEWz6UghsY7/Y9y Ub6pXh5VQiuZcSPE39eBM3vpsOubtb/KbXtj75raQok1YMO86WaC7QqB80+Ih/UogKzTH0 N8Vf7TU0coJ4E6WtNSiZevG8Q48jr7LpNSXNhqbyrm5EDQxoej/2jNA4Gx0NfJtfVzedUu VS50f7rRzJklCgp2iflYtd9ELQFtP6YMkQ6YaQento9NZeIVn+r512+6pnY2Eg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blszY3WMxzpPM; Mon, 21 Jul 2025 07:51:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L7pbCx054499; Mon, 21 Jul 2025 07:51:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L7pbWN054496; Mon, 21 Jul 2025 07:51:37 GMT (envelope-from git) Date: Mon, 21 Jul 2025 07:51:37 GMT Message-Id: <202507210751.56L7pbWN054496@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 5f2ab75bcc79 - main - tcp rack: fix typos and whitespace changes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f2ab75bcc7982597c3304bae5264371073f9081 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=5f2ab75bcc7982597c3304bae5264371073f9081 commit 5f2ab75bcc7982597c3304bae5264371073f9081 Author: Peter Lei AuthorDate: 2025-07-21 07:47:42 +0000 Commit: Michael Tuexen CommitDate: 2025-07-21 07:47:42 +0000 tcp rack: fix typos and whitespace changes No functional changes intended. Reviewed by: tuexen MFC after: 1 week Sponsored by: Netflix, Inc. --- sys/netinet/tcp_stacks/rack.c | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 8e05498863b9..f52e6fbddfef 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -198,7 +198,7 @@ static uint32_t rack_pcm_blast = 0; static uint32_t rack_pcm_is_enabled = 1; static uint8_t rack_ssthresh_rest_rto_rec = 0; /* Do we restore ssthresh when we have rec -> rto -> rec */ -static uint32_t rack_gp_gain_req = 1200; /* Amount percent wise required to gain to record a round has "gaining" */ +static uint32_t rack_gp_gain_req = 1200; /* Amount percent wise required to gain to record a round as "gaining" */ static uint32_t rack_rnd_cnt_req = 0x10005; /* Default number of rounds if we are below rack_gp_gain_req where we exit ss */ @@ -938,7 +938,7 @@ rack_init_sysctls(void) SYSCTL_ADD_U32(&rack_sysctl_ctx, SYSCTL_CHILDREN(rack_probertt), OID_AUTO, "time_between", CTLFLAG_RW, - & rack_time_between_probertt, 96000000, + &rack_time_between_probertt, 96000000, "How many useconds between the lowest rtt falling must past before we enter probertt"); SYSCTL_ADD_U32(&rack_sysctl_ctx, SYSCTL_CHILDREN(rack_probertt), @@ -3554,8 +3554,7 @@ rack_get_measure_window(struct tcpcb *tp, struct tcp_rack *rack) * earlier. * * So lets calculate the BDP with the "known" b/w using - * the SRTT has our rtt and then multiply it by the - * goal. + * the SRTT as our rtt and then multiply it by the goal. */ bw = rack_get_bw(rack); srtt = (uint64_t)tp->t_srtt; @@ -5793,7 +5792,7 @@ rack_cong_signal(struct tcpcb *tp, uint32_t type, uint32_t ack, int line) tp->t_badrxtwin = 0; break; } - if ((CC_ALGO(tp)->cong_signal != NULL) && + if ((CC_ALGO(tp)->cong_signal != NULL) && (type != CC_RTO)){ tp->t_ccv.curack = ack; CC_ALGO(tp)->cong_signal(&tp->t_ccv, type); @@ -5904,7 +5903,7 @@ rack_calc_thresh_rack(struct tcp_rack *rack, uint32_t srtt, uint32_t cts, int li * * If reorder-fade is configured, then we track the last time we saw * re-ordering occur. If we reach the point where enough time as - * passed we no longer consider reordering has occuring. + * passed we no longer consider reordering as occurring. * * Or if reorder-face is 0, then once we see reordering we consider * the connection to alway be subject to reordering and just set lro @@ -7096,7 +7095,7 @@ rack_merge_rsm(struct tcp_rack *rack, l_rsm->r_flags |= RACK_TLP; if (r_rsm->r_flags & RACK_RWND_COLLAPSED) l_rsm->r_flags |= RACK_RWND_COLLAPSED; - if ((r_rsm->r_flags & RACK_APP_LIMITED) && + if ((r_rsm->r_flags & RACK_APP_LIMITED) && ((l_rsm->r_flags & RACK_APP_LIMITED) == 0)) { /* * If both are app-limited then let the @@ -8137,7 +8136,7 @@ rack_update_rsm(struct tcpcb *tp, struct tcp_rack *rack, * remove the lost desgination and reduce the * bytes considered lost. */ - rsm->r_flags &= ~RACK_WAS_LOST; + rsm->r_flags &= ~RACK_WAS_LOST; KASSERT((rack->r_ctl.rc_considered_lost >= (rsm->r_end - rsm->r_start)), ("rsm:%p rack:%p rc_considered_lost goes negative", rsm, rack)); if (rack->r_ctl.rc_considered_lost >= (rsm->r_end - rsm->r_start)) @@ -8832,7 +8831,7 @@ rack_apply_updated_usrtt(struct tcp_rack *rack, uint32_t us_rtt, uint32_t us_cts val = rack_probertt_lower_within * rack_time_between_probertt; val /= 100; - if ((rack->in_probe_rtt == 0) && + if ((rack->in_probe_rtt == 0) && (rack->rc_skip_timely == 0) && ((us_cts - rack->r_ctl.rc_lower_rtt_us_cts) >= (rack_time_between_probertt - val))) { rack_enter_probertt(rack, us_cts); @@ -10369,7 +10368,7 @@ more: * and yet before retransmitting we get an ack * which can happen due to reordering. */ - rsm->r_flags &= ~RACK_WAS_LOST; + rsm->r_flags &= ~RACK_WAS_LOST; KASSERT((rack->r_ctl.rc_considered_lost >= (rsm->r_end - rsm->r_start)), ("rsm:%p rack:%p rc_considered_lost goes negative", rsm, rack)); if (rack->r_ctl.rc_considered_lost >= (rsm->r_end - rsm->r_start)) @@ -11065,7 +11064,7 @@ rack_strike_dupack(struct tcp_rack *rack, tcp_seq th_ack) * We need to skip anything already set * to be retransmitted. */ - if ((rsm->r_dupack >= DUP_ACK_THRESHOLD) || + if ((rsm->r_dupack >= DUP_ACK_THRESHOLD) || (rsm->r_flags & RACK_MUST_RXT)) { rsm = TAILQ_NEXT(rsm, r_tnext); continue; @@ -16919,7 +16918,7 @@ do_output_now: } else if ((nxt_pkt == 0) && (tp->t_flags & TF_ACKNOW)) { goto do_output_now; } else if ((no_output == 1) && - (nxt_pkt == 0) && + (nxt_pkt == 0) && (tcp_in_hpts(rack->rc_tp) == 0)) { /* * We are not in hpts and we had a pacing timer up. Use @@ -17546,7 +17545,7 @@ rack_get_pacing_delay(struct tcp_rack *rack, struct tcpcb *tp, uint32_t len, str rack->r_ctl.rc_last_us_rtt, 88, __LINE__, NULL, gain); } - if (((bw_est == 0) || (rate_wanted == 0) || (rack->gp_ready == 0)) && + if (((bw_est == 0) || (rate_wanted == 0) || (rack->gp_ready == 0)) && (rack->use_fixed_rate == 0)) { /* * No way yet to make a b/w estimate or @@ -20043,7 +20042,7 @@ again: rack->r_ctl.pcm_max_seg = ctf_fixed_maxseg(tp) * 10; } } - if ((rack->r_ctl.pcm_max_seg != 0) && (rack->pcm_needed == 1)) { + if ((rack->r_ctl.pcm_max_seg != 0) && (rack->pcm_needed == 1)) { uint32_t rw_avail, cwa; if (tp->snd_wnd > ctf_outstanding(tp)) @@ -21031,7 +21030,7 @@ just_return_nolock: } else log = 1; } - /* Mark the last packet has app limited */ + /* Mark the last packet as app limited */ rsm = tqhash_max(rack->r_ctl.tqh); if (rsm && ((rsm->r_flags & RACK_APP_LIMITED) == 0)) { if (rack->r_ctl.rc_app_limited_cnt == 0) From nobody Mon Jul 21 07:59:49 2025 X-Original-To: dev-commits-src-all@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 4blt921zD7z62KSC; Mon, 21 Jul 2025 07:59: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4blt914B5Mz3f0R; Mon, 21 Jul 2025 07:59:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753084789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=21I/Pc3DASAGnGhF+8/HQTWCctFSw09Qoz/Hv+civpM=; b=sMquUD5qKcjlCysc2a+9mGUlAt6e9D1jb+I90nyYFCVMnG5IibQLSqghXegiYTI+4QQkCK oNWeIC2yn4ZhVzLjDY0R8s/yklj8VOXT0iL5yTmY7TjxESOX+zXSpv82vnyR7Mhr7uoKiI X3VfFwOcwjOl/frqhoSdyA/I2+POc8GfbWJkQPE7SD3PHrVwnR9Y2TsH0unYdNUxYo80nN a9Tey3vb/LfuQ6ALFm+HQT7YHfO+7XdanWQSXRx5kuBUo5+ToybZ2G+FfhJGCHGZ5LBDyy AcViObhxERos1oNh1qjiIcSoRbSdBVZzsEER9J3iiIfTtIedddmiL/36atMDBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753084789; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=21I/Pc3DASAGnGhF+8/HQTWCctFSw09Qoz/Hv+civpM=; b=eibgveUTkN1lYgxBIEwSCzlnU9VSIrzJvQt4HoucPGN6mND7PlWmYfywK48/F33kF9GwsL 39PWPmkxgUdlVkEzPdKWPlt/cr2Sl+OL4CECvvOzrSfNFN3B+yMCP2jOLjjN4N0FkEva5e IAypghGRckezNhcbHDiD1cLqovBLF8dyPpPNFw486JQqfSVQw7CwJEG+BnE656S5IAPyDz RPpO1joEkXfMgBpzqGEfA3RNt7yolXPuHXSKCfpKTGKdstVyseBzfrkZgBZXh7YqnxzN1h bWOadPfZW+TGONS4PmsdgbS2oKevIBZIe7eVoNU+g3wE0uWb3TuBO890sIowmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753084789; a=rsa-sha256; cv=none; b=E/AmQpxRvoSPKFlvNeD/mwkmFVnFM/y/nwkuHw+V0nk81G8GftqBijuQVLBifTja1uno4d IN/Orjo08q+F3mpgjzN1Tg1OQU6ONQj6AFvgS3l4YmaNTYOLS90Q5Ydy9Qki79RcWlM/TR uKQyITfeTT4pTM789tdWf9KZyXU3j/2YSxj139HQZNmDF7vVuaWdpNRO1LN5UVWPPKdrgr JQ//sm4Ph0zXWX45DVjNqwnDWEjNIUbg4EhkxGJ9OXdcgQfHMEc7ct+ujMMFjk/h3gu1T8 dX1dm5Dhnn6Nw3mjhbYehQbjBqu+JcHesST5bUDKSQM/ieXe7fhPkZeq4R65PA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4blt913nn1zq98; Mon, 21 Jul 2025 07:59:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L7xnM7061046; Mon, 21 Jul 2025 07:59:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L7xnQq061042; Mon, 21 Jul 2025 07:59:49 GMT (envelope-from git) Date: Mon, 21 Jul 2025 07:59:49 GMT Message-Id: <202507210759.56L7xnQq061042@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: e0838f8a2e61 - main - tcp rack: fix sendmap app limited count tracking List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e0838f8a2e61e73e37c1ae08eab9473daacaacb8 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=e0838f8a2e61e73e37c1ae08eab9473daacaacb8 commit e0838f8a2e61e73e37c1ae08eab9473daacaacb8 Author: Peter Lei AuthorDate: 2025-07-21 07:56:03 +0000 Commit: Michael Tuexen CommitDate: 2025-07-21 07:56:03 +0000 tcp rack: fix sendmap app limited count tracking rc_app_limited_cnt is an internal counter on the rack structure that tracks the number of sendmap entries that have the RACK_APP_LIMITED flag set. These entries gate goodput measurements. The counter is reported in a number of blackbox logging events. When a sendmap entry which has the RACK_APP_LIMITED flag set is cloned, the counter was not being maintained properly. While here, cleanup the counter check when a sendmap entry with the flag set is freed which previously hid this issue. Reviewed by: tuexen MFC after: 1 week Sponsored by: Netflix, Inc. --- sys/netinet/tcp_stacks/rack.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index f52e6fbddfef..b0342b4e3165 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -3480,9 +3480,9 @@ static void rack_free(struct tcp_rack *rack, struct rack_sendmap *rsm) { if (rsm->r_flags & RACK_APP_LIMITED) { - if (rack->r_ctl.rc_app_limited_cnt > 0) { - rack->r_ctl.rc_app_limited_cnt--; - } + KASSERT((rack->r_ctl.rc_app_limited_cnt > 0), + ("app_cnt %u, rsm %p", rack->r_ctl.rc_app_limited_cnt, rsm)); + rack->r_ctl.rc_app_limited_cnt--; } if (rsm->r_limit_type) { /* currently there is only one limit type */ @@ -7044,6 +7044,9 @@ rack_clone_rsm(struct tcp_rack *rack, struct rack_sendmap *nrsm, /* Push bit must go to the right edge as well */ if (rsm->r_flags & RACK_HAD_PUSH) rsm->r_flags &= ~RACK_HAD_PUSH; + /* Update the count if app limited */ + if (nrsm->r_flags & RACK_APP_LIMITED) + rack->r_ctl.rc_app_limited_cnt++; /* Clone over the state of the hw_tls flag */ nrsm->r_hw_tls = rsm->r_hw_tls; /* From nobody Mon Jul 21 08:03:52 2025 X-Original-To: dev-commits-src-all@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 4bltFh73vhz62Khx; Mon, 21 Jul 2025 08:03:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bltFh6V8pz3h6N; Mon, 21 Jul 2025 08:03:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753085032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VeOuEvrJ9vNkrZS3Kt0YKCStrpKG6ylhbn6+RnVShkQ=; b=VI0EXBxapDUTKndPX9vcS55JJ5utse9OmqHipA3taxYWWrj0TQSHIXrSZG3tHtwaFaslKb etj5WSeJJzINAIrc8qpmPEJWm5S9zrWhQZqPUmyxxa9ONhwrKKJ9irwkmv+AWr7NMH+MBy YWB/b5dNfi1thuL2L+Iw5wEREGp8AYkokg4U57wwlI9TBBsIdgXHCgu82aAxECjNcuF6wV 805PWRvuqAbH5NEp+UANnOpibU3wdsPD+8OE/KDkX2NBbu/rGO7StF47UQza55KhMMfdZd 1dy6ko6/bCZCNXMyfPx8ZoKNL5A4Lc9CfyhvLtvYmvnT+ySUC8caZRgmNod/pQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753085032; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=VeOuEvrJ9vNkrZS3Kt0YKCStrpKG6ylhbn6+RnVShkQ=; b=vyLqrCAtX2C2Kqs7Rhhs14q0eOdd7hEiLise80uzfn0KitoX9GWgsHPbM5BlgirDDnCcsn Pk/l+XCJ8AfwjKAZU79qYbWDpD0ze3xOy6jhjxQkJhKloTywur780OPRMaEfF3a17hBHTj Kp2Sbz5t2pAisr2e4NFVS9XyZZf7ptBTYmV1UMmwVyBiOFh9PKnrifD53mgFRKzR36zMTf Be1e2s7upZx99S49X8S1xIuXeowZPx0NIltHz7QPpcubroit/c1QDLFDB5qOdEmtsMuc3t 1xkL/vOhqLX9osElsXaAMVOm2r4IbMDfj9jpH/5TNo+6RK5KYP/XyxWpWPMJqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753085032; a=rsa-sha256; cv=none; b=c+OleJSnqSYrWEAPL5Hk/WPm1HWiHYtoqWg8eostm97D8ggghbERJgAEMLhqo54ZYb+dtm Knef+40WEtTxygSONGJLWkf/0Y18bTNhOFWlmzypnPsz4NuUeZmemWv7ujEshmZ9IaEn9K 7cnYo34dlw3arP73nkDi5qMWQjKCp8GbvBWkdwONkCG8jwst84kNAunYjFVz1IEGU6b9Kl kPXjDOx2Cl2cNZSrVUEzaSTWcGN8yewj9b+WfEt1ImSeVrfo6ppdV1uokQkwB8KNiwr567 DcB+8hgT/APf0lC5oIqNCkJmr/QkydMogvaJwLbDSI6FR8WydLGSm+SlTa4s9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bltFh642yzqBH; Mon, 21 Jul 2025 08:03:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L83qsP079581; Mon, 21 Jul 2025 08:03:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L83qAN079578; Mon, 21 Jul 2025 08:03:52 GMT (envelope-from git) Date: Mon, 21 Jul 2025 08:03:52 GMT Message-Id: <202507210803.56L83qAN079578@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 2385565fac21 - main - tcp rack: remove duplicate header include List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2385565fac21554085a818975d3b7a97f7a4591e Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=2385565fac21554085a818975d3b7a97f7a4591e commit 2385565fac21554085a818975d3b7a97f7a4591e Author: Peter Lei AuthorDate: 2025-07-21 08:02:29 +0000 Commit: Michael Tuexen CommitDate: 2025-07-21 08:02:29 +0000 tcp rack: remove duplicate header include Reviewed by: tuexen MFC after: 1 week Sponsored by: Netflix, Inc. --- sys/netinet/tcp_stacks/rack.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index b0342b4e3165..7ccfff66b20d 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -40,7 +40,6 @@ #endif #include #include -#include #include #include #include /* for proc0 declaration */ From nobody Mon Jul 21 08:10:30 2025 X-Original-To: dev-commits-src-all@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 4bltPM0gGvz62LBW; Mon, 21 Jul 2025 08:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bltPM0MvQz3kbd; Mon, 21 Jul 2025 08:10:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753085431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AAyaZvYOhozAewzPOypjGFm8yC1RlHCivAzDdfOJLsY=; b=LgpAKZt/RtDcYv3AQju6i4vt/IVr2em5dWAJ/39S+rK3WNRnAwmdDEITf6RaiLnbPlTUFc dh67QFZPnCUo1AqV2i/sMsHIMLA/f5Tjt59jO2QZamzwS+nTWJgUv5WhhkraFXOMTUZ7Px v1lDlB3Be6Wp4f2iRQxDcqf+RoLeW0w/H22jk1JUXwDWB7Wdq/hxA7zaiTWiHsPQlxZPHw ZuyVhuWSBnvSbnmxhObRw2bKieHbVG/+ewQ1+w0x6pKophBE3W0cEynFRw5he50hVxmG0j 5PrGi/w8/LW978nzcZIalITn4miBPCOVd0RWWS6J1QsVu05HFL0QpRSY6U1xhQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753085431; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AAyaZvYOhozAewzPOypjGFm8yC1RlHCivAzDdfOJLsY=; b=gbh3sPZ74LFTbILXk118E8y5yf6C3At8GLutIq6JZLcqAs3/IDmQNXTVd375CVXo7UAOHw +Rd0VvB6KvJHfz/B+xQ1PZwjdGN3e0mCLMdYo4Q39kMAu0MNj8rnBFxps+6Nq8F3qf7z4D N9Kz8s/QtKvpiBIGZme8XGtyir6ngUWYslmYvs7pBlecub+x2H4trdtBPng1T2AQovQt9r EoaZwpLwXIMMOWbi6YmNYYPvLCgfbfFsEw+tSnPCnYC8s8jY19pDgT2fb4dayx6r+PguMg AwmgyWSZdyIqy8W8NxPzZ0VkKVazk9UfWzewwOcQAI/K4aNtK8h7qZ0NGyk8Pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753085431; a=rsa-sha256; cv=none; b=iH7pPpMZTc3RgGu18KjaIHiJz+rQJrLMmonTjx149xypanr3eRJg0VQIizBbFqWE1qdaBD /ngJ5UVudnqwUUIbSSFk9bJl/vJssevZVK9DqNs028xMXt8uFwULX5V2JLJt6pB3RCN5+w Dw3P01cYZeUIGX509ZcI+MK+vE13/sTqtYVOZd8ilqE15Jjj/FhHfGi3AL/BnFNzc9x64g 1pUvSa/DNEgyTJEboeGs0irXtW0mX7zJSbbzL9wat/596OyysVpmQ7jG3rGYMfMv0XFL8N D1CKzfStUimG/wi7Y1c8m2244lVIDXgxjJuhsRtH++zFd4Q8Bd6QAhWMKIFvEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bltPL6SmNzq2d; Mon, 21 Jul 2025 08:10:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56L8AUOv090471; Mon, 21 Jul 2025 08:10:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56L8AUC5090468; Mon, 21 Jul 2025 08:10:30 GMT (envelope-from git) Date: Mon, 21 Jul 2025 08:10:30 GMT Message-Id: <202507210810.56L8AUC5090468@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: d31bdbc3661f - main - tcp: use a single counter for limiting the RST rate List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d31bdbc3661f6535d5ce4bc98c3687e10aa56720 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=d31bdbc3661f6535d5ce4bc98c3687e10aa56720 commit d31bdbc3661f6535d5ce4bc98c3687e10aa56720 Author: Michael Tuexen AuthorDate: 2025-07-21 08:07:36 +0000 Commit: Michael Tuexen CommitDate: 2025-07-21 08:07:36 +0000 tcp: use a single counter for limiting the RST rate Using two counters does not provide any benefit, but it provides an externally observable signal whether there is a listening port. Reviewed by: Nick Banks, Peter Lei MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D51440 --- sys/netinet/icmp_var.h | 9 ++++----- sys/netinet/ip_icmp.c | 3 +-- sys/netinet/tcp_input.c | 31 ++++++++++++++++++------------- sys/netinet/tcp_stacks/bbr.c | 22 +++++++++++----------- sys/netinet/tcp_stacks/rack.c | 22 +++++++++++----------- sys/netinet/tcp_stacks/rack_bbr_common.c | 2 +- 6 files changed, 46 insertions(+), 43 deletions(-) diff --git a/sys/netinet/icmp_var.h b/sys/netinet/icmp_var.h index b1f2b0ebf911..d6b75e482e35 100644 --- a/sys/netinet/icmp_var.h +++ b/sys/netinet/icmp_var.h @@ -104,11 +104,10 @@ extern int badport_bandlim(int); #define BANDLIM_ICMP_UNREACH 0 #define BANDLIM_ICMP_ECHO 1 #define BANDLIM_ICMP_TSTAMP 2 -#define BANDLIM_RST_CLOSEDPORT 3 /* No connection, and no listeners */ -#define BANDLIM_RST_OPENPORT 4 /* No connection, listener */ -#define BANDLIM_ICMP6_UNREACH 5 -#define BANDLIM_SCTP_OOTB 6 -#define BANDLIM_MAX 7 +#define BANDLIM_TCP_RST 3 +#define BANDLIM_ICMP6_UNREACH 4 +#define BANDLIM_SCTP_OOTB 5 +#define BANDLIM_MAX 6 #endif #endif diff --git a/sys/netinet/ip_icmp.c b/sys/netinet/ip_icmp.c index cb4b6df57c57..71b75d18efd0 100644 --- a/sys/netinet/ip_icmp.c +++ b/sys/netinet/ip_icmp.c @@ -1097,8 +1097,7 @@ static const char *icmp_rate_descrs[BANDLIM_MAX] = { [BANDLIM_ICMP_UNREACH] = "icmp unreach", [BANDLIM_ICMP_ECHO] = "icmp ping", [BANDLIM_ICMP_TSTAMP] = "icmp tstamp", - [BANDLIM_RST_CLOSEDPORT] = "closed port RST", - [BANDLIM_RST_OPENPORT] = "open port RST", + [BANDLIM_TCP_RST] = "tcp reset", [BANDLIM_ICMP6_UNREACH] = "icmp6 unreach", [BANDLIM_SCTP_OOTB] = "sctp ootb", }; diff --git a/sys/netinet/tcp_input.c b/sys/netinet/tcp_input.c index 1f60c0e07b13..de428ae1af6f 100644 --- a/sys/netinet/tcp_input.c +++ b/sys/netinet/tcp_input.c @@ -621,6 +621,7 @@ tcp_input_with_port(struct mbuf **mp, int *offp, int proto, uint16_t port) #endif /* INET6 */ struct tcpopt to; /* options in this segment */ char *s = NULL; /* address and port logging */ + bool closed_port = false; /* segment is hitting a closed port */ NET_EPOCH_ASSERT(); @@ -907,7 +908,8 @@ findpcb: log(LOG_INFO, "%s; %s: Connection attempt " "to closed port\n", s, __func__); } - rstreason = BANDLIM_RST_CLOSEDPORT; + rstreason = BANDLIM_TCP_RST; + closed_port = true; goto dropwithreset; } INP_LOCK_ASSERT(inp); @@ -998,12 +1000,14 @@ findpcb: * down or it is in the CLOSED state. Either way we drop the * segment and send an appropriate response. */ - rstreason = BANDLIM_RST_CLOSEDPORT; + rstreason = BANDLIM_TCP_RST; + closed_port = true; goto dropwithreset; } if ((tp->t_port != port) && (tp->t_state > TCPS_LISTEN)) { - rstreason = BANDLIM_RST_CLOSEDPORT; + rstreason = BANDLIM_TCP_RST; + closed_port = true; goto dropwithreset; } @@ -1094,7 +1098,7 @@ findpcb: * of the failure cause. */ INP_WUNLOCK(inp); - rstreason = BANDLIM_RST_OPENPORT; + rstreason = BANDLIM_TCP_RST; lookupflag &= ~INPLOOKUP_WILDCARD; goto findpcb; } @@ -1185,7 +1189,7 @@ tfo_socket_result: s, __func__); syncache_badack(&inc, port); /* XXX: Not needed! */ TCPSTAT_INC(tcps_badsyn); - rstreason = BANDLIM_RST_OPENPORT; + rstreason = BANDLIM_TCP_RST; goto dropwithreset; } /* @@ -1261,7 +1265,7 @@ tfo_socket_result: "Connection attempt to deprecated " "IPv6 address rejected\n", s, __func__); - rstreason = BANDLIM_RST_OPENPORT; + rstreason = BANDLIM_TCP_RST; goto dropwithreset; } } @@ -1382,9 +1386,10 @@ dropwithreset: * When blackholing do not respond with a RST but * completely ignore the segment and drop it. */ - if (((rstreason == BANDLIM_RST_OPENPORT && V_blackhole == 3) || - (rstreason == BANDLIM_RST_CLOSEDPORT && - ((V_blackhole == 1 && (thflags & TH_SYN)) || V_blackhole > 1))) && + if (rstreason == BANDLIM_TCP_RST && + ((!closed_port && V_blackhole == 3) || + (closed_port && + ((V_blackhole == 1 && (thflags & TH_SYN)) || V_blackhole > 1))) && (V_blackhole_local || ( #ifdef INET6 isipv6 ? !in6_localip(&ip6->ip6_src) : @@ -1967,7 +1972,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, if ((thflags & TH_ACK) && (SEQ_LEQ(th->th_ack, tp->snd_una) || SEQ_GT(th->th_ack, tp->snd_max))) { - rstreason = BANDLIM_RST_OPENPORT; + rstreason = BANDLIM_TCP_RST; tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); goto dropwithreset; } @@ -1980,7 +1985,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, * FIN, or a RST. */ if ((thflags & (TH_SYN|TH_ACK)) == (TH_SYN|TH_ACK)) { - rstreason = BANDLIM_RST_OPENPORT; + rstreason = BANDLIM_TCP_RST; tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); goto dropwithreset; } else if (thflags & TH_SYN) { @@ -2248,7 +2253,7 @@ tcp_do_segment(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, * for the "LAND" DoS attack. */ if (tp->t_state == TCPS_SYN_RECEIVED && SEQ_LT(th->th_seq, tp->irs)) { - rstreason = BANDLIM_RST_OPENPORT; + rstreason = BANDLIM_TCP_RST; tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); goto dropwithreset; } @@ -3427,7 +3432,7 @@ dropafterack: if (tp->t_state == TCPS_SYN_RECEIVED && (thflags & TH_ACK) && (SEQ_GT(tp->snd_una, th->th_ack) || SEQ_GT(th->th_ack, tp->snd_max)) ) { - rstreason = BANDLIM_RST_OPENPORT; + rstreason = BANDLIM_TCP_RST; tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); goto dropwithreset; } diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index e2cfec5c9275..d2636f01714e 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -8763,7 +8763,7 @@ bbr_do_syn_sent(struct mbuf *m, struct tcphdr *th, struct socket *so, (SEQ_LEQ(th->th_ack, tp->iss) || SEQ_GT(th->th_ack, tp->snd_max))) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } if ((thflags & (TH_ACK | TH_RST)) == (TH_ACK | TH_RST)) { @@ -8965,7 +8965,7 @@ bbr_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, (SEQ_LEQ(th->th_ack, tp->snd_una) || SEQ_GT(th->th_ack, tp->snd_max))) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } if (tp->t_flags & TF_FASTOPEN) { @@ -8977,7 +8977,7 @@ bbr_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, */ if ((thflags & (TH_SYN | TH_ACK)) == (TH_SYN | TH_ACK)) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } else if (thflags & TH_SYN) { /* non-initial SYN is ignored */ @@ -9010,7 +9010,7 @@ bbr_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, */ if (SEQ_LT(th->th_seq, tp->irs)) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } if (ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val)) { @@ -9288,7 +9288,7 @@ bbr_do_established(struct mbuf *m, struct tcphdr *th, struct socket *so, if (sbavail(&so->so_snd)) { if (ctf_progress_timeout_check(tp, true)) { bbr_log_progress_event(bbr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } } @@ -9385,7 +9385,7 @@ bbr_do_close_wait(struct mbuf *m, struct tcphdr *th, struct socket *so, if (sbavail(&so->so_snd)) { if (ctf_progress_timeout_check(tp, true)) { bbr_log_progress_event(bbr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } } @@ -9535,7 +9535,7 @@ bbr_do_fin_wait_1(struct mbuf *m, struct tcphdr *th, struct socket *so, if (sbavail(&so->so_snd)) { if (ctf_progress_timeout_check(tp, true)) { bbr_log_progress_event(bbr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } } @@ -9637,7 +9637,7 @@ bbr_do_closing(struct mbuf *m, struct tcphdr *th, struct socket *so, if (sbavail(&so->so_snd)) { if (ctf_progress_timeout_check(tp, true)) { bbr_log_progress_event(bbr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } } @@ -9739,7 +9739,7 @@ bbr_do_lastack(struct mbuf *m, struct tcphdr *th, struct socket *so, if (sbavail(&so->so_snd)) { if (ctf_progress_timeout_check(tp, true)) { bbr_log_progress_event(bbr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } } @@ -9848,7 +9848,7 @@ bbr_do_fin_wait_2(struct mbuf *m, struct tcphdr *th, struct socket *so, if (sbavail(&so->so_snd)) { if (ctf_progress_timeout_check(tp, true)) { bbr_log_progress_event(bbr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } } @@ -11510,7 +11510,7 @@ bbr_do_segment_nounlock(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, if ((tp->t_state == TCPS_SYN_SENT) && (thflags & TH_ACK) && (SEQ_LEQ(th->th_ack, tp->iss) || SEQ_GT(th->th_ack, tp->snd_max))) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } if (tiwin > bbr->r_ctl.rc_high_rwnd) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 7ccfff66b20d..5280f18dc983 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -12876,7 +12876,7 @@ rack_do_syn_sent(struct mbuf *m, struct tcphdr *th, struct socket *so, (SEQ_LEQ(th->th_ack, tp->iss) || SEQ_GT(th->th_ack, tp->snd_max))) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } if ((thflags & (TH_ACK | TH_RST)) == (TH_ACK | TH_RST)) { @@ -13090,7 +13090,7 @@ rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, (SEQ_LEQ(th->th_ack, tp->snd_una) || SEQ_GT(th->th_ack, tp->snd_max))) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } if (tp->t_flags & TF_FASTOPEN) { @@ -13103,7 +13103,7 @@ rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, */ if ((thflags & (TH_SYN | TH_ACK)) == (TH_SYN | TH_ACK)) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } else if (thflags & TH_SYN) { /* non-initial SYN is ignored */ @@ -13137,7 +13137,7 @@ rack_do_syn_recv(struct mbuf *m, struct tcphdr *th, struct socket *so, */ if (SEQ_LT(th->th_seq, tp->irs)) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } if (ctf_drop_checks(to, m, th, tp, &tlen, &thflags, &drop_hdrlen, &ret_val)) { @@ -13400,7 +13400,7 @@ rack_do_established(struct mbuf *m, struct tcphdr *th, struct socket *so, if (sbavail(&so->so_snd)) { if (ctf_progress_timeout_check(tp, true)) { rack_log_progress_event(rack, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } } @@ -13496,7 +13496,7 @@ rack_do_close_wait(struct mbuf *m, struct tcphdr *th, struct socket *so, if (ctf_progress_timeout_check(tp, true)) { rack_log_progress_event((struct tcp_rack *)tp->t_fb_ptr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } } @@ -13646,7 +13646,7 @@ rack_do_fin_wait_1(struct mbuf *m, struct tcphdr *th, struct socket *so, if (ctf_progress_timeout_check(tp, true)) { rack_log_progress_event((struct tcp_rack *)tp->t_fb_ptr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } } @@ -13747,7 +13747,7 @@ rack_do_closing(struct mbuf *m, struct tcphdr *th, struct socket *so, if (ctf_progress_timeout_check(tp, true)) { rack_log_progress_event((struct tcp_rack *)tp->t_fb_ptr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } } @@ -13849,7 +13849,7 @@ rack_do_lastack(struct mbuf *m, struct tcphdr *th, struct socket *so, if (ctf_progress_timeout_check(tp, true)) { rack_log_progress_event((struct tcp_rack *)tp->t_fb_ptr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } } @@ -13953,7 +13953,7 @@ rack_do_fin_wait_2(struct mbuf *m, struct tcphdr *th, struct socket *so, if (ctf_progress_timeout_check(tp, true)) { rack_log_progress_event((struct tcp_rack *)tp->t_fb_ptr, tp, tick, PROGRESS_DROP, __LINE__); - ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset_conn(m, tp, th, BANDLIM_TCP_RST, tlen); return (1); } } @@ -16656,7 +16656,7 @@ rack_do_segment_nounlock(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, if ((tp->t_state == TCPS_SYN_SENT) && (thflags & TH_ACK) && (SEQ_LEQ(th->th_ack, tp->iss) || SEQ_GT(th->th_ack, tp->snd_max))) { tcp_log_end_status(tp, TCP_EI_STATUS_RST_IN_FRONT); - ctf_do_dropwithreset(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); #ifdef TCP_ACCOUNTING sched_unpin(); #endif diff --git a/sys/netinet/tcp_stacks/rack_bbr_common.c b/sys/netinet/tcp_stacks/rack_bbr_common.c index da26b8cb1f9b..d1c4ba58bf55 100644 --- a/sys/netinet/tcp_stacks/rack_bbr_common.c +++ b/sys/netinet/tcp_stacks/rack_bbr_common.c @@ -672,7 +672,7 @@ ctf_do_dropafterack(struct mbuf *m, struct tcpcb *tp, struct tcphdr *th, int32_t (SEQ_GT(tp->snd_una, th->th_ack) || SEQ_GT(th->th_ack, tp->snd_max))) { *ret_val = 1; - ctf_do_dropwithreset(m, tp, th, BANDLIM_RST_OPENPORT, tlen); + ctf_do_dropwithreset(m, tp, th, BANDLIM_TCP_RST, tlen); return; } else *ret_val = 0; From nobody Mon Jul 21 12:31:23 2025 X-Original-To: dev-commits-src-all@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 4bm0BM6ntlz62ZrN; Mon, 21 Jul 2025 12:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm0BM415xz3w8Z; Mon, 21 Jul 2025 12:31:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753101083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5BOzwEotixHm/0KpBuG1k1cgxbB4BHuPd9THpxF/4Qo=; b=lCOzaXyjNjod39BtlblKJ2SQDgvtH7S6axaA8svQcHT2tQShAwWFIyOdH3SIgObOCap5db Iz5XHxkqJHOaIOTAhdEXa7QhQh6zl89rii4JS6V+IOTNtPmJ+1pzfA6EDdrF2sOd0JhJPF rfQPri4LUIFwyLlknRqc8kdyJjpR2sktQ7TeNbLGbA6EdEPoCkMuoVSZMxrE2MbJ0q3Mta 3idS8JQlCCTUT3nJZsJSF89MEM+FIxz94wYxjzQKRpmWw9oOQGgK8btBvVcouq+cmkLzbk c7XhmMnpIxViT/tyNhFleAowhFkSptP5+UJx29Rgm9WZZlfu1BfFz8yi75FBvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753101083; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5BOzwEotixHm/0KpBuG1k1cgxbB4BHuPd9THpxF/4Qo=; b=C6KI82tJwdLgHPgPd8kAlVAn/JFe/zJqQFQvQ3qhPMW7m8Ie6X9ZJzOsFGqymbcZySqaXz c+/8f5NV9Yq/m0T57hevkhyAIhTJXdbDbBbxSNRw0mNgvP1ocHgdHhYI30yisavcaUqMoU kMqaTiZmA4bMT+CmMYpwPy1uGXykwC4j+tmD0igtUyu9xxEj+ymEA/+g2pr2uMVSL7RnuK J6EQTFPyWp1hDIGGfmCBIDW8EvfvErCO3DBGNG1wfGPrypSvZG00YMQDkn6vcc/yj7c3t7 zI3mnYjnt/uMWpIipBOPvl9PC6x4Rok3Uirj6lUXeWt0X/ZSrFSU9S8ayIzbIw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753101083; a=rsa-sha256; cv=none; b=ZmS/UAXj2TWFMb4bUULPyhnBH7o4Wfy4gUYBT4kC9mbfMOR+7WawvkurIagl8U2KAJaIil 0I60Wc5djPZZ/LKBLxtHUDZZ+VhnDdLlCL7751B2sOYJvUfuO5wSSsi+z8HYHQ4kQHP5Co SuGRW610QCYOgfhYe5rHvL3XdYH6uO8/ELqSgZIvsLxwWp521RfDgJ559CW/VAX76FBSN4 6YPPeL6eS8+YP/odNFHKIiFBStROq1h3rkYTQr7cevEJ12ETlHbuNlGJODxgjknDlAId7l GknF1Udjra9w1E3HHRi2ddlt2EOlfLFAGqHOGk/bJrAycjoV/jM2DXGNIAATfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bm0BM3RPxzy0x; Mon, 21 Jul 2025 12:31:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56LCVNgW079839; Mon, 21 Jul 2025 12:31:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56LCVN56079836; Mon, 21 Jul 2025 12:31:23 GMT (envelope-from git) Date: Mon, 21 Jul 2025 12:31:23 GMT Message-Id: <202507211231.56LCVN56079836@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Turner Subject: git: 7fcdbfc9baf5 - main - dev/ofw: Add interrupt-map support List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: andrew X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7fcdbfc9baf5c5b6ba920df2b0afc1ce1ee4e58f Auto-Submitted: auto-generated The branch main has been updated by andrew: URL: https://cgit.FreeBSD.org/src/commit/?id=7fcdbfc9baf5c5b6ba920df2b0afc1ce1ee4e58f commit 7fcdbfc9baf5c5b6ba920df2b0afc1ce1ee4e58f Author: Andrew Turner AuthorDate: 2025-07-21 11:46:12 +0000 Commit: Andrew Turner CommitDate: 2025-07-21 12:07:14 +0000 dev/ofw: Add interrupt-map support Follow interrupt-map properties until either an interrupt controller or invalid node is found. In the former case return the translated details for the interrupt controller driver to decode. In the latter case return 0 as an error. Tested on the Arm DTS files that use interrupt-maps and with a userspace test. Sponsored by: Arm Ltd Differential Revision: https://reviews.freebsd.org/D51257 --- sys/dev/ofw/ofw_bus_subr.c | 101 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 95 insertions(+), 6 deletions(-) diff --git a/sys/dev/ofw/ofw_bus_subr.c b/sys/dev/ofw/ofw_bus_subr.c index 4d0479dfb957..b99d784929bc 100644 --- a/sys/dev/ofw/ofw_bus_subr.c +++ b/sys/dev/ofw/ofw_bus_subr.c @@ -634,11 +634,89 @@ ofw_bus_find_iparent(phandle_t node) return (iparent); } +static phandle_t +ofw_bus_search_iparent(phandle_t node) +{ + phandle_t iparent; + + do { + if (OF_getencprop(node, "interrupt-parent", &iparent, + sizeof(iparent)) > 0) { + node = OF_node_from_xref(iparent); + } else { + node = OF_parent(node); + } + if (node == 0) + return (0); + } while (!OF_hasprop(node, "#interrupt-cells")); + + return (OF_xref_from_node(node)); +} + +static int +ofw_bus_traverse_imap(phandle_t inode, phandle_t node, uint32_t *intr, + int intrsz, pcell_t *res, int ressz, phandle_t *iparentp) +{ + struct ofw_bus_iinfo ii; + void *reg; + uint32_t *intrp; + phandle_t iparent; + int rv = 0; + + /* We already have an interrupt controller */ + if (OF_hasprop(node, "interrupt-controller")) + return (0); + + intrp = malloc(intrsz, M_OFWPROP, M_WAITOK); + memcpy(intrp, intr, intrsz); + + while (true) { + /* There is no interrupt-map to follow */ + if (!OF_hasprop(inode, "interrupt-map")) { + free(intrp, M_OFWPROP); + return (0); + } + + memset(&ii, 0, sizeof(ii)); + ofw_bus_setup_iinfo(inode, &ii, sizeof(cell_t)); + + reg = NULL; + if (ii.opi_addrc > 0) + reg = malloc(ii.opi_addrc, M_OFWPROP, M_WAITOK); + + rv = ofw_bus_lookup_imap(node, &ii, reg, ii.opi_addrc, intrp, + intrsz, res, ressz, &iparent); + + free(reg, M_OFWPROP); + free(ii.opi_imap, M_OFWPROP); + free(ii.opi_imapmsk, M_OFWPROP); + free(intrp, M_OFWPROP); + + if (rv == 0) + return (0); + + node = inode; + inode = OF_node_from_xref(iparent); + + /* Stop when we have an interrupt controller */ + if (OF_hasprop(inode, "interrupt-controller")) { + *iparentp = iparent; + return (rv); + } + + intrsz = rv * sizeof(pcell_t); + intrp = malloc(intrsz, M_OFWPROP, M_WAITOK); + memcpy(intrp, res, intrsz); + } +} + int ofw_bus_intr_to_rl(device_t dev, phandle_t node, struct resource_list *rl, int *rlen) { - phandle_t iparent; + phandle_t iparent, iparent_node; + uint32_t result[16]; + uint32_t intrpcells, *intrp; uint32_t icells, *intr; int err, i, irqnum, nintr, rid; bool extended; @@ -646,15 +724,16 @@ ofw_bus_intr_to_rl(device_t dev, phandle_t node, nintr = OF_getencprop_alloc_multi(node, "interrupts", sizeof(*intr), (void **)&intr); if (nintr > 0) { - iparent = ofw_bus_find_iparent(node); + iparent = ofw_bus_search_iparent(node); if (iparent == 0) { device_printf(dev, "No interrupt-parent found, " "assuming direct parent\n"); iparent = OF_parent(node); iparent = OF_xref_from_node(iparent); } - if (OF_searchencprop(OF_node_from_xref(iparent), - "#interrupt-cells", &icells, sizeof(icells)) == -1) { + iparent_node = OF_node_from_xref(iparent); + if (OF_searchencprop(iparent_node, "#interrupt-cells", &icells, + sizeof(icells)) == -1) { device_printf(dev, "Missing #interrupt-cells " "property, assuming <1>\n"); icells = 1; @@ -677,7 +756,8 @@ ofw_bus_intr_to_rl(device_t dev, phandle_t node, for (i = 0; i < nintr; i += icells) { if (extended) { iparent = intr[i++]; - if (OF_searchencprop(OF_node_from_xref(iparent), + iparent_node = OF_node_from_xref(iparent); + if (OF_searchencprop(iparent_node, "#interrupt-cells", &icells, sizeof(icells)) == -1) { device_printf(dev, "Missing #interrupt-cells " "property\n"); @@ -691,7 +771,16 @@ ofw_bus_intr_to_rl(device_t dev, phandle_t node, break; } } - irqnum = ofw_bus_map_intr(dev, iparent, icells, &intr[i]); + + intrp = &intr[i]; + intrpcells = ofw_bus_traverse_imap(iparent_node, node, intrp, + icells * sizeof(intr[0]), result, sizeof(result), &iparent); + if (intrpcells > 0) + intrp = result; + else + intrpcells = icells; + + irqnum = ofw_bus_map_intr(dev, iparent, intrpcells, intrp); resource_list_add(rl, SYS_RES_IRQ, rid++, irqnum, irqnum, 1); } if (rlen != NULL) From nobody Mon Jul 21 12:49:06 2025 X-Original-To: dev-commits-src-all@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 4bm0Zp6vcCz62cBP; Mon, 21 Jul 2025 12:49: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm0Zp61X2z45Vm; Mon, 21 Jul 2025 12:49:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753102146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MOkYlD3fFzngluXCtcgXwJ2Wd5xtVmPsQxGpyGeezNg=; b=bKhOWwR5t2FTjE8BHnGkRGNNPec2y/rnNNc3QwYqX3iikJiiebOzCpSuOhtF0U1ajqMKGR gwol+tjp9qVB/HpIMIh8hZeaBE7Q8ZGAfbG/zJeIlw9vtRZUAk2SQIwyUFkD6CltUWysjk Ytorg13tdL//2OZPIpmf2ftl5jdj362q/X3XOW121f2HKhyocb4yH4KcsiFsMFY2d0wonH 5aBlxPJgwi2zpoLx29lYnxZ8C467RAzn6oBkrBZTj4VfYRD7LJxbCDIwKYRs8QnVlbi7jH 8wk2N80JtmC/5fCwBk06aFHxVSqMPlh09me4EymdK4moZHdJu/j9n2yHKPMtkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753102146; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MOkYlD3fFzngluXCtcgXwJ2Wd5xtVmPsQxGpyGeezNg=; b=tnjVBDIp9VF+KmWB5IB5q15vWhIDIdl7Pfch9uS7JM+1UNikKHlekiOa1HKZ3k97LLN18k Eajqstqupaqapo03Ay1g8hb49OC+XvKLxt9iXVk38Yy7H8nVX/B0HKYnVE1DhyfUAgoEVY W9oMNtKGUBq0zw5sPxPZ5KkVwM2xA6Q7GTtHXdsgsOr/3J3/kugDeSUxz/wEA8mDbTgdOB IUEy8p//4tK9nv2tWZL99j0qMAPOJmp87H9c9MRpmHJZws9HXSTUV5BGxiLazCbUgmOzyi vCKws9sxr+1WyWOcebpNhZw+Vv3UDwLkmT9D8LVsFD+BhsVe95Rzuw8bIGxP+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753102146; a=rsa-sha256; cv=none; b=u2bE5apE44RPA7EKC0i6WuO/mvduAdFC3M+TULw5WD5b1xwPfLuYPIpc+qed5WgqsmFtSA qeyh1qQoQR6aU/XEv1Z46cnKDQuNst/iwsJcY9GoP9053VS4d95aLTYveUeMvDPVWv0Clh oAl/1zqG7gZZW96jJFmZwkaB0NlsKqWiwj+EAAmU/Fa2XDA02s4m5TOEHdowMBvyA9EY4i etFJCC2vQTMH4A8P9hq4gpuxFUHvZikNQJhoVf9YzlhI5FO5Qs1pKSsWEVKCZfEHFB16D6 GNLRXlFE9mRKB9IbWhQqtaC9O+GeQkq3jbyTUbkwQd2IgbnKv118GE06strn5g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bm0Zp5VcFzy3X; Mon, 21 Jul 2025 12:49:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56LCn6Ka008468; Mon, 21 Jul 2025 12:49:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56LCn6bN008465; Mon, 21 Jul 2025 12:49:06 GMT (envelope-from git) Date: Mon, 21 Jul 2025 12:49:06 GMT Message-Id: <202507211249.56LCn6bN008465@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Rabson Subject: git: 2e2903faa6ec - main - release: Generalise the OCI image build's pkg config List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dfr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e2903faa6ec3e85a0923661f307a163fe66b086 Auto-Submitted: auto-generated The branch main has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=2e2903faa6ec3e85a0923661f307a163fe66b086 commit 2e2903faa6ec3e85a0923661f307a163fe66b086 Author: Doug Rabson AuthorDate: 2025-05-28 13:31:25 +0000 Commit: Doug Rabson CommitDate: 2025-07-21 12:43:21 +0000 release: Generalise the OCI image build's pkg config Allow building OCI images if the source tree is not /usr/src. This also removes the copy of /etc/pkg/FreeBSD.conf which is not needed for the OCI image build. MFC after: 3 days --- release/scripts/make-oci-image.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/release/scripts/make-oci-image.sh b/release/scripts/make-oci-image.sh index cc599c76bd51..8a620e9d8973 100644 --- a/release/scripts/make-oci-image.sh +++ b/release/scripts/make-oci-image.sh @@ -22,16 +22,16 @@ echo "Building OCI freebsd${major}-${image} image for ${abi}" init_repo() { local workdir=$1; shift local abi=$1; shift + local srcdir=$(realpath ${curdir}/..) mkdir -p ${workdir}/repos cat > ${workdir}/repos/base.conf < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Koichiro Iwao Subject: git: 93c2d7d5265c - main - if_gif(4): Support the NOCLAMP flag to change MTU handling for IPv6 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: meta X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 93c2d7d5265c56c8734e70c19f838bd56190954a Auto-Submitted: auto-generated The branch main has been updated by meta: URL: https://cgit.FreeBSD.org/src/commit/?id=93c2d7d5265c56c8734e70c19f838bd56190954a commit 93c2d7d5265c56c8734e70c19f838bd56190954a Author: Koichiro Iwao AuthorDate: 2025-07-11 12:58:10 +0000 Commit: Koichiro Iwao CommitDate: 2025-07-21 13:47:28 +0000 if_gif(4): Support the NOCLAMP flag to change MTU handling for IPv6 The patch was originally written by hrs [1], and later modified by meta to use named flags instead of generic link-layer flags. [1] https://reviews.freebsd.org/D45854 PR: 280736 Co-authored-by: Hiroki Sato Reviewed by: ae, ziaee, zlei, pauamma Reported by: Kazuki Shimizu Approved by: pauamma (manpages) Approved by: ae MFC after: 2 weeks Sponsored by: Cybertrust Japan Differential Revision: https://reviews.freebsd.org/D51297 --- sbin/ifconfig/ifconfig.8 | 16 ++++- sbin/ifconfig/ifgif.c | 3 + share/man/man4/gif.4 | 154 +++++++++++++++++++++++++++++++++++++++++++---- sys/net/if_gif.h | 3 +- sys/netinet6/in6_gif.c | 18 ++++-- 5 files changed, 176 insertions(+), 18 deletions(-) diff --git a/sbin/ifconfig/ifconfig.8 b/sbin/ifconfig/ifconfig.8 index 6c61af48abec..b6e7d3ff2c63 100644 --- a/sbin/ifconfig/ifconfig.8 +++ b/sbin/ifconfig/ifconfig.8 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 11, 2025 +.Dd July 14, 2025 .Dt IFCONFIG 8 .Os .Sh NAME @@ -2878,13 +2878,25 @@ interfaces previously configured with Another name for the .Fl tunnel parameter. +.It Cm noclamp +This flag prevents the MTU from being clamped to 1280 bytes, the +minimum MTU for IPv6, when the outer protocol is IPv6. When the +flag is set, the MTU value configured on the interface will be +used instead of the fixed length of 1280 bytes. For more details, +please refer to the +.Ar MTU Configuration and Path MTU Discovery +section in +.Xr gif 4 . +.It Cm -noclamp +Clear the flag +.Cm noclamp . .It Cm ignore_source Set a flag to accept encapsulated packets destined to this host independently from source address. This may be useful for hosts, that receive encapsulated packets from the load balancers. .It Cm -ignore_source -Clear a flag +Clear the flag .Cm ignore_source . .El .Ss GRE Tunnel Parameters diff --git a/sbin/ifconfig/ifgif.c b/sbin/ifconfig/ifgif.c index 991cf110678f..9b8be210a59e 100644 --- a/sbin/ifconfig/ifgif.c +++ b/sbin/ifconfig/ifgif.c @@ -49,6 +49,7 @@ #include "ifconfig.h" static const char *GIFBITS[] = { + [0] = "NOCLAMP", [1] = "IGNORE_SOURCE", }; @@ -90,6 +91,8 @@ setgifopts(if_ctx *ctx, const char *val __unused, int d) } static struct cmd gif_cmds[] = { + DEF_CMD("noclamp", GIF_NOCLAMP, setgifopts), + DEF_CMD("-noclamp", -GIF_NOCLAMP, setgifopts), DEF_CMD("ignore_source", GIF_IGNORE_SOURCE, setgifopts), DEF_CMD("-ignore_source", -GIF_IGNORE_SOURCE, setgifopts), }; diff --git a/share/man/man4/gif.4 b/share/man/man4/gif.4 index 959510451011..ad33d5d21e81 100644 --- a/share/man/man4/gif.4 +++ b/share/man/man4/gif.4 @@ -1,6 +1,7 @@ .\" $KAME: gif.4,v 1.28 2001/05/18 13:15:56 itojun Exp $ .\" .\" Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. +.\" Copyright (C) 2024 Hiroki Sato .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -27,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 21, 2018 +.Dd July 14, 2025 .Dt GIF 4 .Os .Sh NAME @@ -67,8 +68,8 @@ variable in .Pp To use .Nm , -the administrator needs to configure the protocol and addresses used for the outer -header. +the administrator needs to configure the protocol and addresses used for +the outer header. This can be done by using .Xr ifconfig 8 .Cm tunnel , @@ -79,8 +80,7 @@ The administrator also needs to configure the protocol and addresses for the inner header, with .Xr ifconfig 8 . Note that IPv6 link-local addresses -(those that start with -.Li fe80:: ) +.Pq those that start with Li fe80\&:\&: will be automatically configured whenever possible. You may need to remove IPv6 link-local addresses manually using .Xr ifconfig 8 , @@ -89,12 +89,139 @@ if you want to disable the use of IPv6 as the inner header Finally, you must modify the routing table to route the packets through the .Nm interface. +.Ss MTU Configuration and Path MTU Discovery +The +.Nm +interface uses the fixed length, +.Li 1280 , +to determine whether the outgoing IPv6 packets are split. +This means the MTU value configured on the interface will be ignored +when the outer protocol is IPv6. +When the +.Dv NOCLAMP +interface flag is set, +.Nm +uses the same configured value as IPv4 communications. +This behavior prevents potential issues when the path MTU is +smaller than the interface MTU. +This section describes the reason why the default behavior is different. +The +.Dv NOCLAMP +interface flag can be set using the following command: +.Pp +.Dl ifconfig Ar gif0 Cm noclamp +.Pp +and clear the flag using the following: +.Pp +.Dl ifconfig Ar gif0 Cm -noclamp +.Pp +where +.Ar gif0 +is the actual interface name. +.Pp +A tunnel interface always has an implicit smaller MTU for the inner protocol +than the outer protocol because of the additional header. +Note that the interface MTU on a +.Nm +interface, +the default value is +.Li 1280 , +is used as MTU for the outer protocol. +This means that the MTU for the inner protocol varies depending on the +outer protocol header length. +If an outgoing packet bigger than the inner protocol MTU arrives at a +.Nm +interface for encapsulation, +it will be split into fragments. +Specifically, +if IPv4 is used as the outer protocol, +the inner is 20 octets smaller than the interface MTU. +In the case of the default interface MTU, +.Li 1280 , +inner packets bigger than +.Li 1260 +will be fragmented. +In the case of IPv6, +the inner is 40 octets smaller than the outer. +.Pp +This fragmentation is not harmful though it can degrade the +performance. +Note that while an increased MTU on +.Nm +interface helps to mitigate this reduced performance issue, +it can also cause packet losses on the intermediate narrowest path +between the two communication endpoints in IPv6. +IPv6 allows fragmentation only on the sender, +not on the routers in the communication path. +A big outgoing packet will be dropped on a router with a smaller MTU. .Pp +In normal IPv6 communication, +an ICMPv6 Packet Too Big error will be sent back to the sender, +who can adjust the packet length and re-send it. +This process is performed in the upper protocols than L3, +such as TCP, +and makes the packet length shorter so that packets go through +the path without fragmentation. +This behavior is known as path MTU discovery. +.Pp +When using a +.Nm +interface, +the Packet Too Big message is generated for the outer protocol. +Since the +.Nm +interface does not translate this error to the inner protocol, +the inner protocol sees it just as a packet loss with no useful +information to adjust the length of the next packets. +In this situation, +path MTU discovery does not work, +and communications of the inner protocol +become stalled. +.Pp +In order to avoid this, +a +.Nm +interface silently splits a packet of over 1240 octets into fragments to make +the outer protocol packets equal or shorter than 1280 octets, +even when the interface MTU is configured as larger than 1280. +Note that this occurs only when the outer protocol is IPv6. +.Li 1280 +is the smallest MTU in IPv6 and guarantees no packet loss occurs +on intermediate routers. +.Pp +As mentioned earlier, +the performance is sub-optimal if the actual path MTU is larger than +.Li 1280 . +A typical confusing scenario is as follows. The .Nm -device can be configured to be ECN friendly. -This can be configured by -.Dv IFF_LINK1 . +interface can have Ethernet, +whose MTU is usually 1500, +as the inner protocol. +It is called an EtherIP tunnel, +and can be configured by adding the +.Nm +interface as a member of +.Xr if_bridge 4 +interface. +The +.Xr if_bridge 4 +interface forcibly changes the MTU of the +.Nm +interface with those for the other member interfaces, +which are likely 1500. +In this case, +a situation in which the MTU of the +.Nm +interface is 1500 but fragmentation in 1280 octets always occurs. +.Pp +The default behavior is most conservative to prevent confusing packet loss. +Depending on the network configuration, +enabling the +.Dv NOCLAMP +interface flag might be helpful for better performance. +It is crucial to ensure that the path MTU is equal to or larger than +the interface MTU when enabling this flag. .Ss ECN friendly behavior The .Nm @@ -169,6 +296,7 @@ variable to the desired level of nesting. .Sh SEE ALSO .Xr gre 4 , +.Xr if_bridge 4 , .Xr inet 4 , .Xr inet6 4 , .Xr ifconfig 8 @@ -199,7 +327,8 @@ There are many tunnelling protocol specifications, all defined differently from each other. The .Nm -device may not interoperate with peers which are based on different specifications, +device may not interoperate with peers which are based on different +specifications, and are picky about outer header fields. For example, you cannot usually use .Nm @@ -219,11 +348,14 @@ to 1240 or smaller, when the outer header is IPv6 and the inner header is IPv4. .Pp The .Nm -device does not translate ICMP messages for the outer header into the inner header. +device does not translate ICMP messages for the outer header into the inner +header. .Pp In the past, .Nm had a multi-destination behavior, configurable via -.Dv IFF_LINK0 +.Dv NOCLAMP flag. The behavior is obsolete and is no longer supported. +This flag is now used to determine whether performing fragmentation when +the outer protocol is IPv6. diff --git a/sys/net/if_gif.h b/sys/net/if_gif.h index 3c1846b8f82a..c6692d3dd6bc 100644 --- a/sys/net/if_gif.h +++ b/sys/net/if_gif.h @@ -120,7 +120,8 @@ int in6_gif_setopts(struct gif_softc *, u_int); #define GIFGOPTS _IOWR('i', 150, struct ifreq) #define GIFSOPTS _IOW('i', 151, struct ifreq) +#define GIF_NOCLAMP 0x0001 #define GIF_IGNORE_SOURCE 0x0002 -#define GIF_OPTMASK (GIF_IGNORE_SOURCE) +#define GIF_OPTMASK (GIF_NOCLAMP|GIF_IGNORE_SOURCE) #endif /* _NET_IF_GIF_H_ */ diff --git a/sys/netinet6/in6_gif.c b/sys/netinet6/in6_gif.c index d476829e8e3b..2bab1c57ce2a 100644 --- a/sys/netinet6/in6_gif.c +++ b/sys/netinet6/in6_gif.c @@ -194,6 +194,11 @@ in6_gif_setopts(struct gif_softc *sc, u_int options) sc->gif_options = options; in6_gif_attach(sc); } + + if ((options & GIF_NOCLAMP) != + (sc->gif_options & GIF_NOCLAMP)) { + sc->gif_options = options; + } return (0); } @@ -289,6 +294,7 @@ in6_gif_output(struct ifnet *ifp, struct mbuf *m, int proto, uint8_t ecn) { struct gif_softc *sc = ifp->if_softc; struct ip6_hdr *ip6; + u_long mtu; /* prepend new IP header */ NET_EPOCH_ASSERT(); @@ -304,11 +310,15 @@ in6_gif_output(struct ifnet *ifp, struct mbuf *m, int proto, uint8_t ecn) ip6->ip6_nxt = proto; ip6->ip6_hlim = V_ip6_gif_hlim; /* - * force fragmentation to minimum MTU, to avoid path MTU discovery. - * it is too painful to ask for resend of inner packet, to achieve - * path MTU discovery for encapsulated packets. + * Enforce fragmentation to minimum MTU, even if the interface MTU + * is larger, to avoid path MTU discovery when NOCLAMP is not + * set (default). IPv6 does not allow fragmentation on intermediate + * router nodes, so it is too painful to ask for resend of inner + * packet, to achieve path MTU discovery for encapsulated packets. */ - return (ip6_output(m, 0, NULL, IPV6_MINMTU, 0, NULL, NULL)); + mtu = ((sc->gif_options & GIF_NOCLAMP) == 0) ? IPV6_MINMTU : 0; + + return (ip6_output(m, 0, NULL, mtu, 0, NULL, NULL)); } static int From nobody Mon Jul 21 14:10:13 2025 X-Original-To: dev-commits-src-all@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 4bm2NQ4Jhhz62hqp; Mon, 21 Jul 2025 14:10:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm2NQ3Bkbz3thq; Mon, 21 Jul 2025 14:10:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753107014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mo30c+I4ReOavcR2LyBP3BioghRG3cjgSUtYOC1m4Rc=; b=sS7AueQy3aRwugr/f4qp/g7edZxZ8rTa57XCCMQYSAyYxgMNxuQxiRcUbBaMtyvYEIcS3Y Lo1FcNxNNlQ4hBSkJhDDf4+Wj4SCTFtdb654YGjnwHc3cw7QsE33um5ZoOxuJX1HjuYYeo jwEOZBs7i5JRe7jHUENlsE36AOWdi5H6erGFt3VxuJgUalYD4zAScMFH4obKdTYiaZf2cK Nhi0/okKBamovUFl27koPlrIHvTjJIo9xBJ6lSOcs0a6cmbtMFR6c2b8XISGLXiInaWujC ATiDqBz5EYlJB856G8ZAE9oIWV8avnALlYbYC+Z4nzdVm/WGqI3NDL4q/V+1WQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753107014; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mo30c+I4ReOavcR2LyBP3BioghRG3cjgSUtYOC1m4Rc=; b=Cy5CtCZtLThy1IDhLXB4Ts6MyNekf9IkjPAbHc3xHudkVgz8a3UFYdCBv0esJLTw97PdN1 R7BwaPkw7P6Mg52IYp0+9fTug1B67+D4OIx5xNdnI6HnWKWfxOQIqmEeaHihJLn0Fe0Usc AGcc6p2Fmw9bX31A82RF0oz1ugq4rIY82e8htWRPEQp91DEWPjQKf4UtdPQscwSzUCcXi6 SDbA+v9jcb7FMVSyUl4e7hOyXAR7rNC1SmzYHNwjj6ARC5S13hli7qKm+qIrdTZ/LeMSzv h3eQE/4Wse4t3MDpAQgN5DASW3bXZ1sLlxG46iBmBjfpPIES29jGRPi3F61h0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753107014; a=rsa-sha256; cv=none; b=bMWKJFW2rkRftE8WPLPmgdF6L38XzX2jN9idhkC09vgkITIAFYXD7iuFKrSb6wMQ+PTgOF JgZCblZpyWADGkPLCoa3BrTxsJszDTqFM5cE4hluBBBHuOi4wVbFBsIkVTN2gl82DZObm5 weezY0Hh5cOSsTucahNDTJyl+hc9XMxQ/bTjTdO4kFz2B5Wk4MqtvPS8Pmp4GPJw7HTbAC 53xyZ4xMHXaWAmgR4RYpjp2vNx5BggiZSS6nE//r7B9Bh16/LVJAynU90yxTAVhb62SQsH zzqhvDyHAbNEV5ykNDJuJ8vp0fB6A+NQOjqwwzK9hw4tseBpg0fSx8jaCm5quw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bm2NQ2FB9z11JH; Mon, 21 Jul 2025 14:10:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56LEADg4066646; Mon, 21 Jul 2025 14:10:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56LEAD6J066633; Mon, 21 Jul 2025 14:10:13 GMT (envelope-from git) Date: Mon, 21 Jul 2025 14:10:13 GMT Message-Id: <202507211410.56LEAD6J066633@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: c7da9fb90b0b - main - KRB5: Enable MIT KRB5 by default List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7da9fb90b0b6385e99bb7747476359b712993fa Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=c7da9fb90b0b6385e99bb7747476359b712993fa commit c7da9fb90b0b6385e99bb7747476359b712993fa Author: Cy Schubert AuthorDate: 2025-07-19 14:11:18 +0000 Commit: Cy Schubert CommitDate: 2025-07-21 14:07:22 +0000 KRB5: Enable MIT KRB5 by default Set WITH_MITKRB5=yes as the default. Rebuild all USES=gssapi ports is recommended. A clean buildworld is required. Relnotes: yes --- UPDATING | 5 +++++ share/mk/src.opts.mk | 2 +- sys/sys/param.h | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/UPDATING b/UPDATING index 196443581158..3fd8a0fd0c0b 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20250721: + WITH_MITKRB5 is now enabled by default. MIT KRB5 has replaced + Heimdal in base. Ports that use USES=gssapi must be rebuilt. + A clean buildworld is required. + 20250719: Commits 392a82b225 and c00baac0ab both changed the internal API between the NFS modules. As such, all diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index 387e570f8518..ef43d3c939b2 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -143,6 +143,7 @@ __DEFAULT_YES_OPTIONS = \ MAIL \ MAILWRAPPER \ MAKE \ + MITKRB5 \ MLX5TOOL \ NETCAT \ NETGRAPH \ @@ -211,7 +212,6 @@ __DEFAULT_NO_OPTIONS = \ LOADER_VERIEXEC_PASS_MANIFEST \ LLVM_FULL_DEBUGINFO \ MALLOC_PRODUCTION \ - MITKRB5 \ OFED_EXTRA \ OPENLDAP \ REPRODUCIBLE_BUILD \ diff --git a/sys/sys/param.h b/sys/sys/param.h index bd739eacae6f..f941f021a423 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -74,7 +74,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500053 +#define __FreeBSD_version 1500054 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, From nobody Mon Jul 21 14:20:46 2025 X-Original-To: dev-commits-src-all@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 4bm2cr1kMGz62jKv for ; Mon, 21 Jul 2025 14:21:00 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wm1-f47.google.com (mail-wm1-f47.google.com [209.85.128.47]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm2cq1lNwz41Zb for ; Mon, 21 Jul 2025 14:20:59 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wm1-f47.google.com with SMTP id 5b1f17b1804b1-454f428038eso37400365e9.2 for ; Mon, 21 Jul 2025 07:20:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753107658; x=1753712458; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=nCPXyrZlafxIuBD0lOZzPH4LzpyPtyrtooXJtHhm4tI=; b=pAvKqn7tylOi6XQ8PAXTMWOX/azJAKmbA5TkZmPWAyg4JuWt0l8Ixx/2NvC+I8mtYw y6uFTVNafeNJaieVjbUVHV6f6Wzq5JlxwTdC+C8VZkCgx3WWCxDAMOLXopcShzwQqXMv 1uid2uvX90NP9bHlH6ZV7WtRxyCsbnBnVcoxDXEEtg5sk972GMz1/rRp4uSv8Xs8trup 8eDd8uxTJpqaL3fjw4sP3T69ONrkEzUT2i809PztO2+d9mkbmsHYHrVvO+mACtTax+Af UR2z7ZVTVH/Fi3eiIoSMi7JMwxcsS1aOBU4QaT3JzXcg0YjiI7izZYK39xwlqfJG3wDS ksnQ== X-Forwarded-Encrypted: i=1; AJvYcCWzY3L8NlgEIpf5HTJ6wRAbp4AzMxZ677HSOOrBnq3bcKHj7FgqOVKrTR8S5h2xZyjgocogXv02W0qgp5/K+v62pSlE@freebsd.org X-Gm-Message-State: AOJu0Yz3pN6idwPNctDEmIPQ2x6MmGWUp2bbTT3YeJFdYe0PaW+4Z2DP +wsAcB2RGpvqtDqTUSZozAsuIFUmFJfPvUdC/WiOT1bi8l+Gn+KbUi38vGhLLUpQmnY= X-Gm-Gg: ASbGncvzcUqhlFfuIQ2jxfG07QG6IZMRLwbwBthi00lahfL/NnJAmdYG2icsN5ocyJA MXDpEt/Numpmo1U7zFGTE5gMbPPiubcA5rC32qriq9gaXspuuwXhs0KwkwfgEemHxPuRNxkWDVS EWtz1/CXMN+YYBFuDBwXz/L360fyeu79FJIn28/MKP/v06hj9QehZIjUMm6h2+cQ6wqM2Ol/yVP AikdgWwfrzU2WMFDH5UMVxT1N/NXodMZj+MaabRmiOFtx1s83EaSKMJdfZDc8WOx0sIJoa5cCei 1ibszF8yOzsqlNV+sohf7Hdywso0AS2f4BorWp+/h5E2Cnmhv8TcJuxtnkElha0GC7P9NEOZp4B cMRROzk1KX9V1mwD3fFwah4SyGJwOIWkFg6pp9TbavC41OXqb9iCdw0Zn1QN+gMc983ZoQIEtct a3e5Y= X-Google-Smtp-Source: AGHT+IEJwl0ltityPkFbUH+FvELGTcdELKfMbs9VqPbZAllm8LbMi9U8+w6Ptehc72gn64OdFxFEwg== X-Received: by 2002:a05:6000:2084:b0:3a5:1c3c:8d8d with SMTP id ffacd0b85a97d-3b60e53b9ebmr15756669f8f.55.1753107657442; Mon, 21 Jul 2025 07:20:57 -0700 (PDT) Received: from smtpclient.apple (global-184-7.n-1.net.cam.ac.uk. [131.111.184.7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b61ca4d73esm10382924f8f.66.2025.07.21.07.20.56 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jul 2025 07:20:56 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.600.51.1.1\)) Subject: Re: git: c7da9fb90b0b - main - KRB5: Enable MIT KRB5 by default From: Jessica Clarke In-Reply-To: <202507211410.56LEAD6J066633@gitrepo.freebsd.org> Date: Mon, 21 Jul 2025 15:20:46 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <47C3CC37-6F32-4376-900A-B5387B9817D5@freebsd.org> References: <202507211410.56LEAD6J066633@gitrepo.freebsd.org> To: Cy Schubert X-Mailer: Apple Mail (2.3826.600.51.1.1) X-Rspamd-Queue-Id: 4bm2cq1lNwz41Zb 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:15169, ipnet:209.85.128.0/17, country:US] On 21 Jul 2025, at 15:10, Cy Schubert wrote: >=20 > The branch main has been updated by cy: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc7da9fb90b0b6385e99bb7747476359b= 712993fa >=20 > commit c7da9fb90b0b6385e99bb7747476359b712993fa > Author: Cy Schubert > AuthorDate: 2025-07-19 14:11:18 +0000 > Commit: Cy Schubert > CommitDate: 2025-07-21 14:07:22 +0000 >=20 > KRB5: Enable MIT KRB5 by default >=20 > Set WITH_MITKRB5=3Dyes as the default. >=20 > Rebuild all USES=3Dgssapi ports is recommended. >=20 > A clean buildworld is required. That=E2=80=99s going to be quite annoying and cause a lot of issues = given WITH_CLEAN is now the default. Can we do something in depend-cleanup.sh to delete everything from the obj tree that needs to be rebuilt if we detect the wrong kerberos implementation was previously built? Jess > Relnotes: yes > --- > UPDATING | 5 +++++ > share/mk/src.opts.mk | 2 +- > sys/sys/param.h | 2 +- > 3 files changed, 7 insertions(+), 2 deletions(-) >=20 > diff --git a/UPDATING b/UPDATING > index 196443581158..3fd8a0fd0c0b 100644 > --- a/UPDATING > +++ b/UPDATING > @@ -27,6 +27,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: > world, or to merely disable the most expensive debugging functionality > at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) >=20 > +20250721: > + WITH_MITKRB5 is now enabled by default. MIT KRB5 has replaced > + Heimdal in base. Ports that use USES=3Dgssapi must be rebuilt. > + A clean buildworld is required. > + > 20250719: > Commits 392a82b225 and c00baac0ab both changed the > internal API between the NFS modules. As such, all > diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk > index 387e570f8518..ef43d3c939b2 100644 > --- a/share/mk/src.opts.mk > +++ b/share/mk/src.opts.mk > @@ -143,6 +143,7 @@ __DEFAULT_YES_OPTIONS =3D \ > MAIL \ > MAILWRAPPER \ > MAKE \ > + MITKRB5 \ > MLX5TOOL \ > NETCAT \ > NETGRAPH \ > @@ -211,7 +212,6 @@ __DEFAULT_NO_OPTIONS =3D \ > LOADER_VERIEXEC_PASS_MANIFEST \ > LLVM_FULL_DEBUGINFO \ > MALLOC_PRODUCTION \ > - MITKRB5 \ > OFED_EXTRA \ > OPENLDAP \ > REPRODUCIBLE_BUILD \ > diff --git a/sys/sys/param.h b/sys/sys/param.h > index bd739eacae6f..f941f021a423 100644 > --- a/sys/sys/param.h > +++ b/sys/sys/param.h > @@ -74,7 +74,7 @@ > * cannot include sys/param.h and should only be updated here. > */ > #undef __FreeBSD_version > -#define __FreeBSD_version 1500053 > +#define __FreeBSD_version 1500054 >=20 > /* > * __FreeBSD_kernel__ indicates that this system uses the kernel of = FreeBSD, From nobody Mon Jul 21 14:21:10 2025 X-Original-To: dev-commits-src-all@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 4bm2dH6Tv8z62jVx for ; Mon, 21 Jul 2025 14:21:23 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f51.google.com (mail-wr1-f51.google.com [209.85.221.51]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm2dG6t4Vz41kJ for ; Mon, 21 Jul 2025 14:21:22 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f51.google.com with SMTP id ffacd0b85a97d-3a57c8e247cso4100245f8f.1 for ; Mon, 21 Jul 2025 07:21:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753107681; x=1753712481; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=thFNUDVJWTEwBcTPSVugS/NEXvuOCmPcmn6a0i/KCWM=; b=DkiwO3eV/YKNY7jcA9q/62csSizVBXfULGGVz8BBIYhxdt7FOuGWQIqEeYaeG7tlWa bw7Hzfh7axN/diNNcey9ARlb3Tn4efndqjOVRCCXmUpP3spdGG1/wnCrQcgN9yFamuQE SoxGXvNo5GccEJBt53STQ2yd5W6HrNuinltqSz9jVIZdK54P3vb9prSSdnRUSzdGeo00 YsNlrY6AmktLoaPgR933MawqtJ4DOIkAc1XmD449RmWh8Ka/dwvh5n1M8uDj/yjmkIRR KNljqKCJ+K+Te7Ma86FpgQy4MIn1sI10DfmaLrlM6AbI1C5KWxPzrsZBo4lbYAsY0h5F sgkA== X-Forwarded-Encrypted: i=1; AJvYcCUVGrFZPJIOb2cFcj1pOSHEbt9tzyfMNqO4uK5kxelU1aMXndZwuoVdHGkdxdg4bii72UjqC5qXMlLF/kFgRm17CanU@freebsd.org X-Gm-Message-State: AOJu0YxbCG3iU8oPnfdL3vO3EniUSGvbvz8ZjL/n/8sMij9tZ83Xoabp qzSFDk6OQwa4Y2l6NpCAKTh1oktLOREADv8Xmrj6rUqOFtlPHUNlVpvpaaVcByaSo4E= X-Gm-Gg: ASbGncs42DGg3BrPDnnwe9ExX0T9xcN2H9vdlo4/gd55Bq6ST7N2pmi0zEf2tnhB/Mu lvxoHYOo/zJB2r8AfbJ5ySjHL2NhQWWemlJot71XAfbSEhZ7oVjf9fBlpymDlJjYHWpATvQ4RM/ f5eAZjMVrqYdEV54tqJKJHvBqHRJlAwIefgse4YtliMlLBp+YedIBRL/ICLXsp+jYvVguco6Tp/ iMewTzV5gxpLjofTACDJ6DKpZ8Q+TzZ3zSpcORI8NpYG+y1DX5u2wD55NFv4R3rLcjJ+tVAwBcq PMkJmIPak6Dx6AbpEDxQAoOgyt/2VQhJ/3+bviHh21VCuApFQP50+hX5qFQep8pSqVfA0h9XXsl kEan+41jrQ/4huTXeBrkICiTksphjM53jo+prrphHywsZgwXHpkxknJxD3KjnKpZuphck X-Google-Smtp-Source: AGHT+IF47cuj3wbms6PAWuBeVHvlv1ZTGXg26BoYO8JQYQdU5EeUx/iUz/zbAO5Bs25TXnTa3mH6oA== X-Received: by 2002:a05:6000:4804:b0:3a4:e5fa:73f0 with SMTP id ffacd0b85a97d-3b60e4d5533mr14776378f8f.20.1753107681249; Mon, 21 Jul 2025 07:21:21 -0700 (PDT) Received: from smtpclient.apple (global-184-7.n-1.net.cam.ac.uk. [131.111.184.7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-3b61ca4d73esm10382924f8f.66.2025.07.21.07.21.20 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 21 Jul 2025 07:21:20 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.600.51.1.1\)) Subject: Re: git: c7da9fb90b0b - main - KRB5: Enable MIT KRB5 by default From: Jessica Clarke In-Reply-To: <47C3CC37-6F32-4376-900A-B5387B9817D5@freebsd.org> Date: Mon, 21 Jul 2025 15:21:10 +0100 Cc: Cy Schubert , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <6CFB01A7-3507-49EE-90B5-D222D124ED0E@freebsd.org> References: <202507211410.56LEAD6J066633@gitrepo.freebsd.org> <47C3CC37-6F32-4376-900A-B5387B9817D5@freebsd.org> To: Jessica Clarke X-Mailer: Apple Mail (2.3826.600.51.1.1) X-Rspamd-Queue-Id: 4bm2dG6t4Vz41kJ 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:15169, ipnet:209.85.128.0/17, country:US] On 21 Jul 2025, at 15:20, Jessica Clarke wrote: >=20 > On 21 Jul 2025, at 15:10, Cy Schubert wrote: >>=20 >> The branch main has been updated by cy: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3Dc7da9fb90b0b6385e99bb7747476359b= 712993fa >>=20 >> commit c7da9fb90b0b6385e99bb7747476359b712993fa >> Author: Cy Schubert >> AuthorDate: 2025-07-19 14:11:18 +0000 >> Commit: Cy Schubert >> CommitDate: 2025-07-21 14:07:22 +0000 >>=20 >> KRB5: Enable MIT KRB5 by default >>=20 >> Set WITH_MITKRB5=3Dyes as the default. >>=20 >> Rebuild all USES=3Dgssapi ports is recommended. >>=20 >> A clean buildworld is required. >=20 > That=E2=80=99s going to be quite annoying and cause a lot of issues = given > WITH_CLEAN is now the default. Can we do something in = depend-cleanup.sh WITHOUT_CLEAN, of course... > to delete everything from the obj tree that needs to be rebuilt if we > detect the wrong kerberos implementation was previously built? >=20 > Jess >=20 >> Relnotes: yes >> --- >> UPDATING | 5 +++++ >> share/mk/src.opts.mk | 2 +- >> sys/sys/param.h | 2 +- >> 3 files changed, 7 insertions(+), 2 deletions(-) >>=20 >> diff --git a/UPDATING b/UPDATING >> index 196443581158..3fd8a0fd0c0b 100644 >> --- a/UPDATING >> +++ b/UPDATING >> @@ -27,6 +27,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS = SLOW: >> world, or to merely disable the most expensive debugging = functionality >> at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) >>=20 >> +20250721: >> + WITH_MITKRB5 is now enabled by default. MIT KRB5 has replaced >> + Heimdal in base. Ports that use USES=3Dgssapi must be rebuilt. >> + A clean buildworld is required. >> + >> 20250719: >> Commits 392a82b225 and c00baac0ab both changed the >> internal API between the NFS modules. As such, all >> diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk >> index 387e570f8518..ef43d3c939b2 100644 >> --- a/share/mk/src.opts.mk >> +++ b/share/mk/src.opts.mk >> @@ -143,6 +143,7 @@ __DEFAULT_YES_OPTIONS =3D \ >> MAIL \ >> MAILWRAPPER \ >> MAKE \ >> + MITKRB5 \ >> MLX5TOOL \ >> NETCAT \ >> NETGRAPH \ >> @@ -211,7 +212,6 @@ __DEFAULT_NO_OPTIONS =3D \ >> LOADER_VERIEXEC_PASS_MANIFEST \ >> LLVM_FULL_DEBUGINFO \ >> MALLOC_PRODUCTION \ >> - MITKRB5 \ >> OFED_EXTRA \ >> OPENLDAP \ >> REPRODUCIBLE_BUILD \ >> diff --git a/sys/sys/param.h b/sys/sys/param.h >> index bd739eacae6f..f941f021a423 100644 >> --- a/sys/sys/param.h >> +++ b/sys/sys/param.h >> @@ -74,7 +74,7 @@ >> * cannot include sys/param.h and should only be updated here. >> */ >> #undef __FreeBSD_version >> -#define __FreeBSD_version 1500053 >> +#define __FreeBSD_version 1500054 >>=20 >> /* >> * __FreeBSD_kernel__ indicates that this system uses the kernel of = FreeBSD, From nobody Mon Jul 21 14:33:59 2025 X-Original-To: dev-commits-src-all@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 4bm2vr1pWkz62k32; Mon, 21 Jul 2025 14:34: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm2vr0x7nz47WR; Mon, 21 Jul 2025 14:34:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753108440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oplvsvn0DoKxH/P/mYtZsdSVbMtJjpEqR4QJnH2fJhg=; b=e85G8K38C7TNaUN7IKCSENupYuadhlHxxrjm3nZZC2Zw8/hJhVhzqxGXG9xg/KhDAx4i/b vP8iLmmRpijlLSewtHfp6N9Kn7Z1QyI8lQzQ8v0VzPoFhwz1S2hMTMF4nYmVqT2pKhsy3n P74A0Wmne0sy5gF0E/RPfgsjeixvq9zYHxcfTeCBNJp9ANcgG8tUYQFTWtXPmt8O/Fja0p hAP8FthAOkqizE4XQ5RPDwJBjsRsP1m0S6ndlHreVSievhMOuWoKu6jSC4awiY6fp7RlEl WDwDAVgLH1BbszEHS0T5v/4LdcMtY+28Y0CErm7/FKeKVofsAL+cap/0cjBSDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753108440; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oplvsvn0DoKxH/P/mYtZsdSVbMtJjpEqR4QJnH2fJhg=; b=Qy+IliIJQx/d+j3y0vUx5bgkzEObb6XGbCGHMW1CiI+TLKKC51E8rX8vsE5q8kBrgX8743 AmUuRrZ9wIfIm0pc7tBLLzp3wZfUJ0J2dnQnNIgfdFwIA0OaBJ37mSbORRBw1UKQ1JMiV6 wmuC5m6EPqJuDcdV9GAa6Oyzm7fi1ecUT2FLqzmPzR6FP4GnILY5BUiFTzEE2gnYSX9+RG rVk7+dDmpa+PRETPY4Yl2T5QzY3fPlApLGzvyp6Cwqh3SajTYPdEBglijjjgnRt7J20Hxl 1AuPKUA1jD3RJ6iWct8Z3tH5eH4IFq7Wvtu3VlGf8Lf7uwivlCwNP89YmHjGiw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753108440; a=rsa-sha256; cv=none; b=wGaOU0ryXsytavdp5ViGYDX5j7YDAvLLfQRAgvxq5OYCwRxqO4Qr//TxZzJ37IesHPxw5g RV49q7i71WHf+FDTZQIFkbGWoTnzJR/yP4uvsR5rtttDqxsMoD2p8pfC8rtwEVvl7rgbdX T/+m6BhVZALBtGOcf/RoXyL6iDynj+CJRKdjh8sGIaj8DLnZTQlB29sQ3dahCcnSUSv/Wf 0gZqxbuHrykvxCjx7CfwTe/fJtie4Klqagbe3nrOTW5FbvWSJJIwB2aoJgU3vGeaMm+6vJ IWUvfaVjZnQprUNSKT9ecGDsqKu6RIqI5NyvDQxzNWyXt4poBcdjZN2lzJBsew== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bm2vr0WcDz11xF; Mon, 21 Jul 2025 14:34:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56LEXxss014608; Mon, 21 Jul 2025 14:33:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56LEXxbN014605; Mon, 21 Jul 2025 14:33:59 GMT (envelope-from git) Date: Mon, 21 Jul 2025 14:33:59 GMT Message-Id: <202507211433.56LEXxbN014605@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 860f20cc133c - main - stand: Add print_delay environment variable in loader List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 860f20cc133cb4072224e4e98c01c9f4716c8952 Auto-Submitted: auto-generated The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=860f20cc133cb4072224e4e98c01c9f4716c8952 commit 860f20cc133cb4072224e4e98c01c9f4716c8952 Author: Aymeric Wibo AuthorDate: 2025-07-19 22:01:37 +0000 Commit: Aymeric Wibo CommitDate: 2025-07-21 14:33:20 +0000 stand: Add print_delay environment variable in loader This adds support for a new `print_delay` environment variable, which inserts a delay in microseconds when `putchar` encounters a newline character. This can be useful when debugging. Reviewed by: markj, imp, ziaee, mckusick (mentor) Approved by: markj, imp, ziaee, mckusick (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50832 --- stand/common/bootstrap.h | 2 ++ stand/common/console.c | 23 +++++++++++++++++++++++ stand/defaults/loader.conf | 2 ++ stand/defaults/loader.conf.5 | 6 +++++- stand/efi/loader/main.c | 3 +++ 5 files changed, 35 insertions(+), 1 deletion(-) diff --git a/stand/common/bootstrap.h b/stand/common/bootstrap.h index dca0cf6bb2d5..17887919089c 100644 --- a/stand/common/bootstrap.h +++ b/stand/common/bootstrap.h @@ -372,6 +372,8 @@ extern struct arch_switch archsw; /* This must be provided by the MD code, but should it be in the archsw? */ void delay(int delay); +int setprint_delay(struct env_var *ev, int flags, const void *value); + /* common code to set currdev variable. */ int gen_setcurrdev(struct env_var *ev, int flags, const void *value); int mount_currdev(struct env_var *, int, const void *); diff --git a/stand/common/console.c b/stand/common/console.c index 82cb552b4ef2..65ab7ffad622 100644 --- a/stand/common/console.c +++ b/stand/common/console.c @@ -44,6 +44,8 @@ static int twiddle_set(struct env_var *ev, int flags, const void *value); #endif int module_verbose = MODULE_VERBOSE; +static uint32_t print_delay_usec = 0; + static int module_verbose_set(struct env_var *ev, int flags, const void *value) { @@ -65,6 +67,23 @@ module_verbose_set(struct env_var *ev, int flags, const void *value) return (CMD_OK); } +/* + * Hook to set the print delay + */ +int +setprint_delay(struct env_var *ev, int flags, const void *value) +{ + char *end; + int usec = strtol(value, &end, 10); + + if (*(char *)value == '\0' || *end != '\0') + return (EINVAL); + if (usec < 0) + return (EINVAL); + print_delay_usec = usec; + return (0); +} + /* * Detect possible console(s) to use. If preferred console(s) have been * specified, mark them as active. Else, mark the first probed console @@ -178,6 +197,10 @@ putchar(int c) (C_PRESENTOUT | C_ACTIVEOUT)) consoles[cons]->c_out(c); } + + /* Pause after printing newline character if a print delay is set */ + if (print_delay_usec != 0 && c == '\n') + delay(print_delay_usec); } /* diff --git a/stand/defaults/loader.conf b/stand/defaults/loader.conf index 1834e3ba3b34..f0843f3e930b 100644 --- a/stand/defaults/loader.conf +++ b/stand/defaults/loader.conf @@ -95,6 +95,8 @@ audit_event_type="etc_security_audit_event" # Default is unset and disabled (no delay). #autoboot_delay="10" # Delay in seconds before autobooting, # -1 for no user interrupts, NO to disable +#print_delay="1000000" # Slow printing of loader messages, useful for + # debugging. Given in microseconds. #password="" # Prevent changes to boot options #bootlock_password="" # Prevent booting (see check-password.4th(8)) #geom_eli_passphrase_prompt="NO" # Prompt for geli(8) passphrase to mount root diff --git a/stand/defaults/loader.conf.5 b/stand/defaults/loader.conf.5 index 021f68f2309e..dc1c8f7f44e0 100644 --- a/stand/defaults/loader.conf.5 +++ b/stand/defaults/loader.conf.5 @@ -21,7 +21,7 @@ .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. -.Dd June 5, 2025 +.Dd June 12, 2025 .Dt LOADER.CONF 5 .Os .Sh NAME @@ -116,6 +116,10 @@ option in this manner, .Va beastie_disable must be set to .Dq Li YES . +.It Ar print_delay +Add a delay in microseconds after printing each line. +Default +.Dq Li 0 . .It Ar boot_* See list in .Xr loader.efi 8 diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index 3ef418d20df3..436676368447 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -1241,6 +1241,9 @@ main(int argc, CHAR16 *argv[]) #endif cons_probe(); + /* Set print_delay variable to have hooks in place. */ + env_setenv("print_delay", EV_VOLATILE, "", setprint_delay, env_nounset); + /* Set up currdev variable to have hooks in place. */ env_setenv("currdev", EV_VOLATILE, "", gen_setcurrdev, env_nounset); From nobody Mon Jul 21 14:46:45 2025 X-Original-To: dev-commits-src-all@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 4bm3Bc57Cbz62kWM; Mon, 21 Jul 2025 14:46:48 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm3Bc2FgWz3HDy; Mon, 21 Jul 2025 14:46:48 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTPS id doYcusyRl5MqydrmxudbkO; Mon, 21 Jul 2025 14:46:47 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id drmvugr4dWX70drmxuugXh; Mon, 21 Jul 2025 14:46:47 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=d71WygjE c=1 sm=1 tr=0 ts=687e52d7 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=Wb1JkmetP80A:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=ZxIcVSbSieJHI-Udoq8A:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 6E6EF592; Mon, 21 Jul 2025 07:46:45 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 3BA391BE; Mon, 21 Jul 2025 07:46:45 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Jessica Clarke cc: Cy Schubert , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: c7da9fb90b0b - main - KRB5: Enable MIT KRB5 by default In-reply-to: <47C3CC37-6F32-4376-900A-B5387B9817D5@freebsd.org> References: <202507211410.56LEAD6J066633@gitrepo.freebsd.org> <47C3CC37-6F32-4376-900A-B5387B9817D5@freebsd.org> Comments: In-reply-to Jessica Clarke message dated "Mon, 21 Jul 2025 15:20:46 +0100." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Mon, 21 Jul 2025 07:46:45 -0700 Message-Id: <20250721144645.3BA391BE@slippy.cwsent.com> X-CMAE-Envelope: MS4xfHub7T6UlLAdW1fLfHMA3lbqaxi3bBErBG10Tq1Qmp1U3SoF9rPRO4p4Jjqn+NnDuJv1EDKKOKcFrW60JxS/q3KvgROEIjRyQnn5n1Asa+7SVlMfl1Dz yEvY1vp7HdxYlnO8uYcXUZaXaMYBGKLIrTx3Nn9tikaBmG6wtqLNBC17uAiSIG6nNZ3KN9TCpb4GJOprPz2KVB7dVWXrMjJBPneTpI5Dmgd6hQAnwhO9awjc KMFv8we8oZiqWrSqLT+0tRHme06kFQMcThBe2fH0NfahL0rmfJ6mI9pzIpseGTwYLSFLQ9h/CgfbWPQY2E1GZk5suVD5hfUdS0Pnbt5jQuVEtoSOwMmx+CAn yTlBD9/1 X-Rspamd-Queue-Id: 4bm3Bc2FgWz3HDy 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:16509, ipnet:3.96.0.0/15, country:US] In message <47C3CC37-6F32-4376-900A-B5387B9817D5@freebsd.org>, Jessica Clarke w rites: > On 21 Jul 2025, at 15:10, Cy Schubert wrote: > >=20 > > The branch main has been updated by cy: > >=20 > > URL: = > https://cgit.FreeBSD.org/src/commit/?id=3Dc7da9fb90b0b6385e99bb7747476359b= > 712993fa > >=20 > > commit c7da9fb90b0b6385e99bb7747476359b712993fa > > Author: Cy Schubert > > AuthorDate: 2025-07-19 14:11:18 +0000 > > Commit: Cy Schubert > > CommitDate: 2025-07-21 14:07:22 +0000 > >=20 > > KRB5: Enable MIT KRB5 by default > >=20 > > Set WITH_MITKRB5=3Dyes as the default. > >=20 > > Rebuild all USES=3Dgssapi ports is recommended. > >=20 > > A clean buildworld is required. > > That=E2=80=99s going to be quite annoying and cause a lot of issues = > given > WITH_CLEAN is now the default. Can we do something in depend-cleanup.sh > to delete everything from the obj tree that needs to be rebuilt if we > detect the wrong kerberos implementation was previously built? All binaries that depend on any kerberos libraries must be rebuilt. WITHOUT_CLEAN will fail at various spots. Meta mode should take care of this for us. [...] -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Mon Jul 21 14:58:12 2025 X-Original-To: dev-commits-src-all@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 4bm3Rn32mtz62lDG; Mon, 21 Jul 2025 14:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm3Rn0vZMz3Nr6; Mon, 21 Jul 2025 14:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753109893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8DgGElNBp/CON4tJFFbhG9RYxxfeu67iDXC5S7fSQAM=; b=jYrzYt86Hbo/gFGS2lO0VQZf7l/hf4IVUZIIHnUTr4eoGgTlSXKMTS+Je4HkarGlkfNklU vWKeF6QFS9CzUnfbJfeDsSylpZ2xJtLdNi5flQVPPF6r3JkltRyh3o14iQO1O/twzDuC0Z WgT+a92MFXMYoE73jcnO7jcnHbzMXX2HL2YCGKhB/jY5hoYdeWkP58iBOCmpfZhrgpzyZg hn6D/VpqaPiTE+tIkCBglJw3HQXqbEhRICPT3wYDjTQ3whfG/Z+6o3zd0IVtoBidx/haA5 OVqrAxQCbhUJ1oq1yUQCASBEpXO6klRe+uaBnLdywp4Lv46kXnN+IPEL118D8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753109893; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8DgGElNBp/CON4tJFFbhG9RYxxfeu67iDXC5S7fSQAM=; b=aGzyHNNdNeAFN5AX43CMGAneS09hy2ybb2mEWNuyfMX/KGFspyhukOOEa0qD4/OXSD3z6k wygon+rmxOFYPf/DUwbIyvDt77H3UqBAFjgB7TDEHBAT8HlB5QRzdeV6VwQc7Q8E+uxT3t 7aiHw/aHlwRVYu/eh/UjUEEj8ekMuqzM9AkxZi4sjkLvmuPM6iPEOvPD0H0cUQ6RaXYd4e uHFA1qF3NRNcNnbkTTDZDUMFKKCMNPxD6tZXdU+7wpnLAE+ZJ8Maxa5h1MH8H0K90VpAlv 3cEi0CJIv7t0xIw7vExIX5GCGq7vMOl5fOIlRvg18cordd292Vm+jebBamaoCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753109893; a=rsa-sha256; cv=none; b=NNycjC/2Xuhhz6U7PwU0a8iX5Od3VHgOBSBdxlGiIrDNbG4dzSIUjd+ym0WWA63q8dPcs6 52PPekott+tYxhHZlgjWTmizdy/2CL59vtZ/clkhzxCFzTwCRCqVI+Uy9E4bCt99WZ4xXn bkpx5EywpJ6jZnjLo/fLvDkqxNqghXj0A41CfmDTYqbv8rtjEWk1z7kximRiy7dyKSoErp Mrstqbd6R/ajSzXuqENASb1RHh+GMlZYZ4Hq3GPGGtqtSxzdaC9BG2Ldv7vhep0ntMwfBG XwyRvhuyofUlywu1gGMpleN8pxD6009S6+qCAacR1Mm09GW38wpg2w20roOJlg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bm3Rm702wz12Jk; Mon, 21 Jul 2025 14:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56LEwC39053754; Mon, 21 Jul 2025 14:58:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56LEwCXo053751; Mon, 21 Jul 2025 14:58:12 GMT (envelope-from git) Date: Mon, 21 Jul 2025 14:58:12 GMT Message-Id: <202507211458.56LEwCXo053751@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: fa02551dc8a0 - main - amd64: Remove support for "nooptions SMP" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: fa02551dc8a029a74eb374c418dbb5401d53c2db Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=fa02551dc8a029a74eb374c418dbb5401d53c2db commit fa02551dc8a029a74eb374c418dbb5401d53c2db Author: Mark Johnston AuthorDate: 2025-07-21 13:33:00 +0000 Commit: Mark Johnston CommitDate: 2025-07-21 14:57:52 +0000 amd64: Remove support for "nooptions SMP" It does not appear to get much, if any, testing, and doesn't seem to be worth the maintenance overhead. Virtually all amd64 hardware has multiple cores. The CPU and memory usage overhead of the SMP option in single-vCPU VMs is quite marginal and not worth maintaining. Reviewed by: alc (pmap.c), kib Differential Revision: https://reviews.freebsd.org/D51403 Differential Revision: https://reviews.freebsd.org/D51345 --- sys/amd64/acpica/acpi_wakeup.c | 18 ----- sys/amd64/amd64/apic_vector.S | 3 - sys/amd64/amd64/cpu_switch.S | 4 +- sys/amd64/amd64/exec_machdep.c | 2 - sys/amd64/amd64/machdep.c | 9 +-- sys/amd64/amd64/pmap.c | 177 ----------------------------------------- sys/amd64/amd64/support.S | 20 +---- sys/amd64/amd64/trap.c | 6 -- sys/amd64/conf/MINIMALUP | 4 - sys/amd64/include/param.h | 2 - sys/amd64/include/smp.h | 3 - sys/conf/files.amd64 | 4 +- 12 files changed, 12 insertions(+), 240 deletions(-) diff --git a/sys/amd64/acpica/acpi_wakeup.c b/sys/amd64/acpica/acpi_wakeup.c index 51d6d5e36840..99565fbb69ca 100644 --- a/sys/amd64/acpica/acpi_wakeup.c +++ b/sys/amd64/acpica/acpi_wakeup.c @@ -54,10 +54,8 @@ #include #include -#ifdef SMP #include #include -#endif #include @@ -73,19 +71,13 @@ extern int acpi_resume_beep; extern int acpi_reset_video; extern int acpi_susp_bounce; -#ifdef SMP extern struct susppcb **susppcbs; static cpuset_t suspcpus; -#else -static struct susppcb **susppcbs; -#endif static void acpi_stop_beep(void *); -#ifdef SMP static int acpi_wakeup_ap(struct acpi_softc *, int); static void acpi_wakeup_cpus(struct acpi_softc *); -#endif #define ACPI_WAKEPT_PAGES 7 @@ -103,7 +95,6 @@ acpi_stop_beep(void *arg) timer_spkr_release(); } -#ifdef SMP static int acpi_wakeup_ap(struct acpi_softc *sc, int cpu) { @@ -177,7 +168,6 @@ acpi_wakeup_cpus(struct acpi_softc *sc) outb(CMOS_DATA, mpbiosreason); } } -#endif int acpi_sleep_machdep(struct acpi_softc *sc, int state) @@ -190,10 +180,8 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) if (sc->acpi_wakeaddr == 0ul) return (-1); /* couldn't alloc wake memory */ -#ifdef SMP suspcpus = all_cpus; CPU_CLR(PCPU_GET(cpuid), &suspcpus); -#endif if (acpi_resume_beep != 0) timer_spkr_acquire(); @@ -208,12 +196,10 @@ acpi_sleep_machdep(struct acpi_softc *sc, int state) pcb = &susppcbs[0]->sp_pcb; if (savectx(pcb)) { fpususpend(susppcbs[0]->sp_fpususpend); -#ifdef SMP if (!CPU_EMPTY(&suspcpus) && suspend_cpus(suspcpus) == 0) { device_printf(sc->acpi_dev, "Failed to suspend APs\n"); return (0); /* couldn't sleep */ } -#endif hw_ibrs_ibpb_active = 0; hw_ssb_active = 0; cpu_stdext_feature3 = 0; @@ -278,16 +264,12 @@ acpi_wakeup_machdep(struct acpi_softc *sc, int state, int sleep_result, PCPU_SET(switchtime, 0); PCPU_SET(switchticks, ticks); lapic_xapic_mode(); -#ifdef SMP if (!CPU_EMPTY(&suspcpus)) acpi_wakeup_cpus(sc); -#endif } -#ifdef SMP if (!CPU_EMPTY(&suspcpus)) resume_cpus(suspcpus); -#endif /* * Re-read cpu_stdext_feature3, which was zeroed-out diff --git a/sys/amd64/amd64/apic_vector.S b/sys/amd64/amd64/apic_vector.S index 5bb877a174f7..e98bae9eb6c5 100644 --- a/sys/amd64/amd64/apic_vector.S +++ b/sys/amd64/amd64/apic_vector.S @@ -157,7 +157,6 @@ IDTVEC(spuriousint) jmp doreti #endif -#ifdef SMP /* * Global address space TLB shootdown. */ @@ -264,5 +263,3 @@ IDTVEC(justreturn) INTR_HANDLER justreturn1 call as_lapic_eoi jmp doreti - -#endif /* SMP */ diff --git a/sys/amd64/amd64/cpu_switch.S b/sys/amd64/amd64/cpu_switch.S index a053f6c70af1..d7e954f573b0 100644 --- a/sys/amd64/amd64/cpu_switch.S +++ b/sys/amd64/amd64/cpu_switch.S @@ -136,7 +136,7 @@ ctx_switch_fpusave_done: movq %r15,TD_LOCK(%r13) /* Release the old thread */ sw1: leaq TD_MD_PCB(%r12),%r8 -#if defined(SCHED_ULE) && defined(SMP) +#if defined(SCHED_ULE) movq $blocked_lock, %rdx movq TD_LOCK(%r12),%rcx cmpq %rcx, %rdx @@ -492,7 +492,7 @@ ENTRY(resumectx) END(resumectx) /* Wait for the new thread to become unblocked */ -#if defined(SCHED_ULE) && defined(SMP) +#if defined(SCHED_ULE) sw1wait: 1: pause diff --git a/sys/amd64/amd64/exec_machdep.c b/sys/amd64/amd64/exec_machdep.c index da68289e2c83..6752b716deb5 100644 --- a/sys/amd64/amd64/exec_machdep.c +++ b/sys/amd64/amd64/exec_machdep.c @@ -59,9 +59,7 @@ #include #include #include -#ifdef SMP #include -#endif #include #include #include diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c index f46462b39fa3..37c7056f649c 100644 --- a/sys/amd64/amd64/machdep.c +++ b/sys/amd64/amd64/machdep.c @@ -38,7 +38,6 @@ * SUCH DAMAGE. */ -#include #include "opt_atpic.h" #include "opt_cpu.h" #include "opt_ddb.h" @@ -82,9 +81,7 @@ #include #include #include -#ifdef SMP #include -#endif #include #include #include @@ -132,9 +129,7 @@ #include #include #include -#ifdef SMP #include -#endif #ifdef FDT #include #endif @@ -149,6 +144,10 @@ #include #include +#ifndef SMP +#error amd64 requires options SMP +#endif + /* Sanity check for __curthread() */ CTASSERT(offsetof(struct pcpu, pc_curthread) == 0); diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index b2bfe633adcc..cd8ab58a07ab 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -162,9 +162,7 @@ #include #include #include -#ifdef SMP #include -#endif #include #include @@ -3045,7 +3043,6 @@ pmap_update_pde_invalidate(pmap_t pmap, vm_offset_t va, pd_entry_t newpde) * XXX TODO */ -#ifdef SMP /* * Interrupt the cpus that are executing in the guest context. * This will force the vcpu to exit and the cached EPT mappings @@ -3503,168 +3500,6 @@ pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde) } sched_unpin(); } -#else /* !SMP */ -/* - * Normal, non-SMP, invalidation functions. - */ -void -pmap_invalidate_page(pmap_t pmap, vm_offset_t va) -{ - struct invpcid_descr d; - struct pmap_pcid *pcidp; - uint64_t kcr3, ucr3; - uint32_t pcid; - - if (pmap->pm_type == PT_RVI || pmap->pm_type == PT_EPT) { - pmap->pm_eptgen++; - return; - } - KASSERT(pmap->pm_type == PT_X86, - ("pmap_invalidate_range: unknown type %d", pmap->pm_type)); - - if (pmap == kernel_pmap || pmap == PCPU_GET(curpmap)) { - invlpg(va); - if (pmap == PCPU_GET(curpmap) && pmap_pcid_enabled && - pmap->pm_ucr3 != PMAP_NO_CR3) { - critical_enter(); - pcid = pmap_get_pcid(pmap); - if (invpcid_works) { - d.pcid = pcid | PMAP_PCID_USER_PT; - d.pad = 0; - d.addr = va; - invpcid(&d, INVPCID_ADDR); - } else { - kcr3 = pmap->pm_cr3 | pcid | CR3_PCID_SAVE; - ucr3 = pmap->pm_ucr3 | pcid | - PMAP_PCID_USER_PT | CR3_PCID_SAVE; - pmap_pti_pcid_invlpg(ucr3, kcr3, va); - } - critical_exit(); - } - } else if (pmap_pcid_enabled) { - pcidp = zpcpu_get(pmap->pm_pcidp); - pcidp->pm_gen = 0; - } -} - -void -pmap_invalidate_range(pmap_t pmap, vm_offset_t sva, vm_offset_t eva) -{ - struct invpcid_descr d; - struct pmap_pcid *pcidp; - vm_offset_t addr; - uint64_t kcr3, ucr3; - uint32_t pcid; - - if (pmap->pm_type == PT_RVI || pmap->pm_type == PT_EPT) { - pmap->pm_eptgen++; - return; - } - KASSERT(pmap->pm_type == PT_X86, - ("pmap_invalidate_range: unknown type %d", pmap->pm_type)); - - if (pmap == kernel_pmap || pmap == PCPU_GET(curpmap)) { - for (addr = sva; addr < eva; addr += PAGE_SIZE) - invlpg(addr); - if (pmap == PCPU_GET(curpmap) && pmap_pcid_enabled && - pmap->pm_ucr3 != PMAP_NO_CR3) { - critical_enter(); - pcid = pmap_get_pcid(pmap); - if (invpcid_works) { - d.pcid = pcid | PMAP_PCID_USER_PT; - d.pad = 0; - d.addr = sva; - for (; d.addr < eva; d.addr += PAGE_SIZE) - invpcid(&d, INVPCID_ADDR); - } else { - kcr3 = pmap->pm_cr3 | pcid | CR3_PCID_SAVE; - ucr3 = pmap->pm_ucr3 | pcid | - PMAP_PCID_USER_PT | CR3_PCID_SAVE; - pmap_pti_pcid_invlrng(ucr3, kcr3, sva, eva); - } - critical_exit(); - } - } else if (pmap_pcid_enabled) { - pcidp = zpcpu_get(pmap->pm_pcidp); - pcidp->pm_gen = 0; - } -} - -void -pmap_invalidate_all(pmap_t pmap) -{ - struct invpcid_descr d; - struct pmap_pcid *pcidp; - uint64_t kcr3, ucr3; - uint32_t pcid; - - if (pmap->pm_type == PT_RVI || pmap->pm_type == PT_EPT) { - pmap->pm_eptgen++; - return; - } - KASSERT(pmap->pm_type == PT_X86, - ("pmap_invalidate_all: unknown type %d", pmap->pm_type)); - - if (pmap == kernel_pmap) { - if (pmap_pcid_enabled && invpcid_works) { - bzero(&d, sizeof(d)); - invpcid(&d, INVPCID_CTXGLOB); - } else { - invltlb_glob(); - } - } else if (pmap == PCPU_GET(curpmap)) { - if (pmap_pcid_enabled) { - critical_enter(); - pcid = pmap_get_pcid(pmap); - if (invpcid_works) { - d.pcid = pcid; - d.pad = 0; - d.addr = 0; - invpcid(&d, INVPCID_CTX); - if (pmap->pm_ucr3 != PMAP_NO_CR3) { - d.pcid |= PMAP_PCID_USER_PT; - invpcid(&d, INVPCID_CTX); - } - } else { - kcr3 = pmap->pm_cr3 | pcid; - if (pmap->pm_ucr3 != PMAP_NO_CR3) { - ucr3 = pmap->pm_ucr3 | pcid | - PMAP_PCID_USER_PT; - pmap_pti_pcid_invalidate(ucr3, kcr3); - } else - load_cr3(kcr3); - } - critical_exit(); - } else { - invltlb(); - } - } else if (pmap_pcid_enabled) { - pcidp = zpcpu_get(pmap->pm_pcidp); - pcidp->pm_gen = 0; - } -} - -void -pmap_invalidate_cache(void) -{ - - wbinvd(); -} - -static void -pmap_update_pde(pmap_t pmap, vm_offset_t va, pd_entry_t *pde, pd_entry_t newpde) -{ - struct pmap_pcid *pcidp; - - pmap_update_pde_store(pmap, pde, newpde); - if (pmap == kernel_pmap || pmap == PCPU_GET(curpmap)) - pmap_update_pde_invalidate(pmap, va, newpde); - else { - pcidp = zpcpu_get(pmap->pm_pcidp); - pcidp->pm_gen = 0; - } -} -#endif /* !SMP */ static void pmap_invalidate_pde_page(pmap_t pmap, vm_offset_t va, pd_entry_t pde) @@ -10358,17 +10193,9 @@ pmap_activate_sw(struct thread *td) return; } cpuid = PCPU_GET(cpuid); -#ifdef SMP CPU_SET_ATOMIC(cpuid, &pmap->pm_active); -#else - CPU_SET(cpuid, &pmap->pm_active); -#endif pmap_activate_sw_mode(td, pmap, cpuid); -#ifdef SMP CPU_CLR_ATOMIC(cpuid, &oldpmap->pm_active); -#else - CPU_CLR(cpuid, &oldpmap->pm_active); -#endif } void @@ -10409,11 +10236,7 @@ pmap_activate_boot(pmap_t pmap) MPASS(pmap != kernel_pmap); cpuid = PCPU_GET(cpuid); -#ifdef SMP CPU_SET_ATOMIC(cpuid, &pmap->pm_active); -#else - CPU_SET(cpuid, &pmap->pm_active); -#endif PCPU_SET(curpmap, pmap); if (pti) { kcr3 = pmap->pm_cr3; diff --git a/sys/amd64/amd64/support.S b/sys/amd64/amd64/support.S index c95696bbe7ef..870cd255abb7 100644 --- a/sys/amd64/amd64/support.S +++ b/sys/amd64/amd64/support.S @@ -934,10 +934,7 @@ ENTRY(casueword32_nosmap) ja fusufault movl %esi,%eax /* old */ -#ifdef SMP - lock -#endif - cmpxchgl %ecx,(%rdi) /* new = %ecx */ + lock cmpxchgl %ecx,(%rdi) /* new = %ecx */ setne %cl /* @@ -971,10 +968,7 @@ ENTRY(casueword32_smap) movl %esi,%eax /* old */ stac -#ifdef SMP - lock -#endif - cmpxchgl %ecx,(%rdi) /* new = %ecx */ + lock cmpxchgl %ecx,(%rdi) /* new = %ecx */ clac setne %cl @@ -1014,10 +1008,7 @@ ENTRY(casueword_nosmap) ja fusufault movq %rsi,%rax /* old */ -#ifdef SMP - lock -#endif - cmpxchgq %rcx,(%rdi) /* new = %rcx */ + lock cmpxchgq %rcx,(%rdi) /* new = %rcx */ setne %cl /* @@ -1045,10 +1036,7 @@ ENTRY(casueword_smap) movq %rsi,%rax /* old */ stac -#ifdef SMP - lock -#endif - cmpxchgq %rcx,(%rdi) /* new = %rcx */ + lock cmpxchgq %rcx,(%rdi) /* new = %rcx */ clac setne %cl diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index eefddad2f142..d9a5f7096a6e 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -87,9 +87,7 @@ PMC_SOFT_DEFINE( , , page_fault, write); #include #include #include -#ifdef SMP #include -#endif #include #include #include @@ -900,11 +898,9 @@ trap_diag(struct trapframe *frame, vm_offset_t eva) printf("\n\nFatal trap %d: %s while in %s mode\n", type, type < nitems(trap_msg) ? trap_msg[type] : UNKNOWN, TRAPF_USERMODE(frame) ? "user" : "kernel"); -#ifdef SMP /* two separate prints in case of a trap on an unmapped page */ printf("cpuid = %d; ", PCPU_GET(cpuid)); printf("apic id = %02x\n", PCPU_GET(apic_id)); -#endif if (type == T_PAGEFLT) { printf("fault virtual address = 0x%lx\n", eva); printf("fault code = %s %s %s%s%s, %s\n", @@ -1025,11 +1021,9 @@ dblfault_handler(struct trapframe *frame) frame->tf_cs, frame->tf_ss, frame->tf_ds, frame->tf_es, frame->tf_fs, frame->tf_gs, rdmsr(MSR_FSBASE), rdmsr(MSR_GSBASE), rdmsr(MSR_KGSBASE)); -#ifdef SMP /* two separate prints in case of a trap on an unmapped page */ printf("cpuid = %d; ", PCPU_GET(cpuid)); printf("apic id = %02x\n", PCPU_GET(apic_id)); -#endif panic("double fault"); } diff --git a/sys/amd64/conf/MINIMALUP b/sys/amd64/conf/MINIMALUP deleted file mode 100644 index 0dbddbe5b341..000000000000 --- a/sys/amd64/conf/MINIMALUP +++ /dev/null @@ -1,4 +0,0 @@ -include MINIMAL -ident MINIMALUP -nooptions SMP -nooptions NUMA diff --git a/sys/amd64/include/param.h b/sys/amd64/include/param.h index 1bbb302259d6..5a9c3162e14c 100644 --- a/sys/amd64/include/param.h +++ b/sys/amd64/include/param.h @@ -150,8 +150,6 @@ (((va) >= kva_layout.dmap_low && (va) < kva_layout.dmap_high) || \ ((va) >= kva_layout.km_low && (va) < kva_layout.km_high)) -#ifdef SMP #define SC_TABLESIZE 1024 /* Must be power of 2. */ -#endif #endif /* !_AMD64_INCLUDE_PARAM_H_ */ diff --git a/sys/amd64/include/smp.h b/sys/amd64/include/smp.h index 26eb227211da..bff92570ff82 100644 --- a/sys/amd64/include/smp.h +++ b/sys/amd64/include/smp.h @@ -13,8 +13,6 @@ #ifdef _KERNEL -#ifdef SMP - #ifndef LOCORE #include @@ -39,7 +37,6 @@ void invlop_handler(void); int start_all_aps(void); #endif /* !LOCORE */ -#endif /* SMP */ #endif /* _KERNEL */ #endif /* _MACHINE_SMP_H_ */ diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 678d288c2d86..80548320c3fc 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -84,8 +84,8 @@ amd64/amd64/xen-locore.S optional xenhvm \ amd64/amd64/machdep.c standard amd64/amd64/mem.c optional mem amd64/amd64/minidump_machdep.c standard -amd64/amd64/mp_machdep.c optional smp -amd64/amd64/mpboot.S optional smp +amd64/amd64/mp_machdep.c standard +amd64/amd64/mpboot.S standard amd64/amd64/pmap.c standard amd64/amd64/ptrace_machdep.c standard amd64/amd64/support.S standard From nobody Mon Jul 21 14:58:13 2025 X-Original-To: dev-commits-src-all@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 4bm3Rp2xxKz62lGj; Mon, 21 Jul 2025 14:58: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm3Rp0FKLz3P56; Mon, 21 Jul 2025 14:58:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753109894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J+6GMn2ScyUVcUyQTzRwWWgqyFMvoot7VFbWs5xzi8M=; b=ZYTYUf5C4Ti2bIM5/pQor0kPj+dpdmwvVctI61HIGk4yIR7z7EWT/2BBzqvAQ65yDWlsp/ A5HO4a6WjOe2IcyoV8yhLZrz8T+R15/SR8bWArhbPE2lraRgYUDbhGS5dnM5gpMy1CK552 Z2G6Kjal53LH7DdFI1kPoQJQ9WTNt/zLZHw9kXxY7TXoVcAmXuNQChJIiqG0fAZUssVvSv CsnQ3VSIouwVckqXf37IUFN5LE/RmZpY54ZGXo0pGqjldp63wL+dYDrLqP9u9M0cRRhiBz JbcYqMRHcytK8mi8NoOAXe5ZXXJIPie4omxJg4olgqstBDuJDaM0jfJIvuDEvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753109894; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J+6GMn2ScyUVcUyQTzRwWWgqyFMvoot7VFbWs5xzi8M=; b=uNaOc/0n07CXV1LWZKtEnB5miz9xpsbnYipwgj0Fx45rHc09JiIeGie1mukd2P1pA0qlHw ExMlRlYGiVfAPHLYgW5sY843nYV1OcqFYkMYiG8PLuOt8sO+mS2he0O3is4NJY7ECfTAPu 3sg+HTMcO82+KMBCM6924528U8xzgLMq1plLBYXkmVCs3i4Sp4kkFLckcC7f6KQQ0avW37 dZxZIFDgug1NRZb0PE+JPrvpTBSDYDsfgwRkrXNBRX7Isnxd9QUw/ncW3ubqbsaLq5tcNx dFyWCcUBP6156Lf+iU0KxU5P5G5fTjXZ/L5yhRMggpcTMbg6kkGQHrSLDE3zAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753109894; a=rsa-sha256; cv=none; b=NzKpr+cHTh0m1BTAg4uAXxZXtT3mM2sfWHpSavY/F57QeGWJO/bOnlqc3DLfnkrra84V1j cdvftHvJbW1XJY8+93hJ08dtFqrEa0KzcTx+Mzj4fuJP8wks5bLU5x80k+0avzEq0/rq8x eK4W0eFhUnRHYoKVVI999WEz048CboH6sI+HsfKTGbjFdndy7n84lfefgnOWesbHtXSJHZ mBJZpxUNmQ0Tpoj9QfehGbWZ+HdzynY/cnCVwDUxspSVZjLV5fGRmwPSGjDQzIPSJMDrnQ rNGQe5OzSgrmu1S0V/lAX0Kofh2oHP/je70LV2BcJSUr8HxTLSOhH2USNv/41A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bm3Rn6ybQz12Yx; Mon, 21 Jul 2025 14:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56LEwDM3053786; Mon, 21 Jul 2025 14:58:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56LEwD36053783; Mon, 21 Jul 2025 14:58:13 GMT (envelope-from git) Date: Mon, 21 Jul 2025 14:58:13 GMT Message-Id: <202507211458.56LEwD36053783@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: cc21f6e53f43 - main - amd64: Make a comment less confusing List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: cc21f6e53f43f0e4c082222460d90ea581f3e2d6 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cc21f6e53f43f0e4c082222460d90ea581f3e2d6 commit cc21f6e53f43f0e4c082222460d90ea581f3e2d6 Author: Mark Johnston AuthorDate: 2025-07-21 13:33:31 +0000 Commit: Mark Johnston CommitDate: 2025-07-21 14:57:58 +0000 amd64: Make a comment less confusing Also merge two printf()s. No functional change intended. Reviewed by: kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D51452 --- sys/amd64/amd64/trap.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c index d9a5f7096a6e..f3469ed5e2bc 100644 --- a/sys/amd64/amd64/trap.c +++ b/sys/amd64/amd64/trap.c @@ -37,7 +37,6 @@ * SUCH DAMAGE. */ -#include /* * AMD64 Trap and System call handling */ @@ -898,9 +897,9 @@ trap_diag(struct trapframe *frame, vm_offset_t eva) printf("\n\nFatal trap %d: %s while in %s mode\n", type, type < nitems(trap_msg) ? trap_msg[type] : UNKNOWN, TRAPF_USERMODE(frame) ? "user" : "kernel"); - /* two separate prints in case of a trap on an unmapped page */ - printf("cpuid = %d; ", PCPU_GET(cpuid)); - printf("apic id = %02x\n", PCPU_GET(apic_id)); + /* Print these separately in case pcpu accesses trap. */ + printf("cpuid = %d; apic id = %02x\n", PCPU_GET(cpuid), + PCPU_GET(apic_id)); if (type == T_PAGEFLT) { printf("fault virtual address = 0x%lx\n", eva); printf("fault code = %s %s %s%s%s, %s\n", @@ -1021,9 +1020,9 @@ dblfault_handler(struct trapframe *frame) frame->tf_cs, frame->tf_ss, frame->tf_ds, frame->tf_es, frame->tf_fs, frame->tf_gs, rdmsr(MSR_FSBASE), rdmsr(MSR_GSBASE), rdmsr(MSR_KGSBASE)); - /* two separate prints in case of a trap on an unmapped page */ - printf("cpuid = %d; ", PCPU_GET(cpuid)); - printf("apic id = %02x\n", PCPU_GET(apic_id)); + /* Print these separately in case pcpu accesses trap. */ + printf("cpuid = %d; apic id = %02x\n", PCPU_GET(cpuid), + PCPU_GET(apic_id)); panic("double fault"); } From nobody Mon Jul 21 14:58:14 2025 X-Original-To: dev-commits-src-all@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 4bm3Rq41l6z62lGp; Mon, 21 Jul 2025 14:58: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm3Rq1Zx7z3Nwd; Mon, 21 Jul 2025 14:58:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753109895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r3h8IWPlIZLI9fkMnflWSh7V7MskxkSL+dOq8TiyE7U=; b=jcRNmoirlDHvsiAhZjZ/ZcJIonIn2MfZ7x7QALbQNt4pt/7JKaTiSQutaX4yeGdCEhYY63 FdQAL8sOsdIbw3RXfPCKw2CPCVsnLJr0EAVFW/gy8EKl4peqtysh6A7gZbtV0AAlOICZl0 gTf1UskImFZDNQCZhWJ/AesM0T5URSC6v+/r3iGP6uJpz3TeK9hAgbOfwgnpP+fSFaZEap JYK8Pv35vZUObOi0+PyEOHc0EcwKDwBcKyNkw/Kw1kSJPFlm/Fdy1rCYqxu1AkEZZpI16u amO4I35xJEe8Uz7XvADRTNrg3Ag0RFqWybzsWaimt/JAzJNAQ7Onk1ds2spfzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753109895; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=r3h8IWPlIZLI9fkMnflWSh7V7MskxkSL+dOq8TiyE7U=; b=IPVS9DaavzSwIFkpY9u11vpOIChXD3ggmH2ENwXzcvI1W4hMEwR4j6bFBpEfFe1HOJy2PI Fx0Mm5Ml0tr4lHMnv/+zb1kLnJO19bl1pfj6VrxK6wFa7aHeImp41GvxeThm1eqJiRdI2+ 6z4cDkkq2TGfces4hV3b/bmmeHPLz+7uATWE2uSm+3PBexv635U6WjjYvsSLp7kRU8Tomi bWhp22yeeNQt6SojzN0kNhoe/kzw9R0sWmLIm1QA8f72ygOFLrrwgLWDqbmnbcMb9eFO56 ssqgpAgNxW8j0mHadRr7zWwUU1MpU24BZqBUEbwUV37rBlDrKBEoBIeZeUvB2A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753109895; a=rsa-sha256; cv=none; b=Z9VUFeDA00e8jqDPo5AlMGSb/3yYtEnsO4SGunpYQ3BdixWpUDvEHPZkn4JJXhVkhd70o5 q5WHhllFv3jJYfwfN3ISK2kSQ9UIFOKcjpufFLX8o+ufGvRkfNCwfKpM1F0MZ+cY4MPhzj 9FG7/T2X7irUbgmmib6IZxhTbz4D/9O1x5MSn8vrgV0vgqbgnFEmvMa0+UqCM/WoIZ6SK4 H3H3FC9ER2PZ2YM8eKsIN4jdTRKS83aX4GOl0fzpnse5voAPxDnJGbfIdS+Devdfx8YVOD 15QN/FKxS0d1gJbxxtIhY8etaXlVQXBMLNe7f1QoIyr/P++FN0oEnku1eh9A9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bm3Rq0fWCz12Yy; Mon, 21 Jul 2025 14:58:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56LEwEdo053820; Mon, 21 Jul 2025 14:58:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56LEwEU5053816; Mon, 21 Jul 2025 14:58:14 GMT (envelope-from git) Date: Mon, 21 Jul 2025 14:58:14 GMT Message-Id: <202507211458.56LEwEU5053816@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 654dea596703 - main - libdtrace: Use a designated array initializer for dt_cook_funcs[] List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 654dea596703eb422055a7d637356fbde36f8540 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=654dea596703eb422055a7d637356fbde36f8540 commit 654dea596703eb422055a7d637356fbde36f8540 Author: Mark Johnston AuthorDate: 2025-07-21 13:34:21 +0000 Commit: Mark Johnston CommitDate: 2025-07-21 14:57:58 +0000 libdtrace: Use a designated array initializer for dt_cook_funcs[] Also make the array const. No functional change intended. MFC after: 1 week --- .../opensolaris/lib/libdtrace/common/dt_parser.c | 48 +++++++++++----------- 1 file changed, 24 insertions(+), 24 deletions(-) diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c index d1ebaa8791da..dd68f9278308 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c @@ -4506,30 +4506,30 @@ dt_cook_none(dt_node_t *dnp, uint_t idflags) return (dnp); } -static dt_node_t *(*dt_cook_funcs[])(dt_node_t *, uint_t) = { - dt_cook_none, /* DT_NODE_FREE */ - dt_cook_none, /* DT_NODE_INT */ - dt_cook_none, /* DT_NODE_STRING */ - dt_cook_ident, /* DT_NODE_IDENT */ - dt_cook_var, /* DT_NODE_VAR */ - dt_cook_none, /* DT_NODE_SYM */ - dt_cook_none, /* DT_NODE_TYPE */ - dt_cook_func, /* DT_NODE_FUNC */ - dt_cook_op1, /* DT_NODE_OP1 */ - dt_cook_op2, /* DT_NODE_OP2 */ - dt_cook_op3, /* DT_NODE_OP3 */ - dt_cook_statement, /* DT_NODE_DEXPR */ - dt_cook_statement, /* DT_NODE_DFUNC */ - dt_cook_aggregation, /* DT_NODE_AGG */ - dt_cook_none, /* DT_NODE_PDESC */ - dt_cook_clause, /* DT_NODE_CLAUSE */ - dt_cook_inline, /* DT_NODE_INLINE */ - dt_cook_member, /* DT_NODE_MEMBER */ - dt_cook_xlator, /* DT_NODE_XLATOR */ - dt_cook_none, /* DT_NODE_PROBE */ - dt_cook_provider, /* DT_NODE_PROVIDER */ - dt_cook_none, /* DT_NODE_PROG */ - dt_cook_none, /* DT_NODE_IF */ +static dt_node_t *(* const dt_cook_funcs[])(dt_node_t *, uint_t) = { + [DT_NODE_FREE] = dt_cook_none, + [DT_NODE_INT] = dt_cook_none, + [DT_NODE_STRING] = dt_cook_none, + [DT_NODE_IDENT] = dt_cook_ident, + [DT_NODE_VAR] = dt_cook_var, + [DT_NODE_SYM] = dt_cook_none, + [DT_NODE_TYPE] = dt_cook_none, + [DT_NODE_FUNC] = dt_cook_func, + [DT_NODE_OP1] = dt_cook_op1, + [DT_NODE_OP2] = dt_cook_op2, + [DT_NODE_OP3] = dt_cook_op3, + [DT_NODE_DEXPR] = dt_cook_statement, + [DT_NODE_DFUNC] = dt_cook_statement, + [DT_NODE_AGG] = dt_cook_aggregation, + [DT_NODE_PDESC] = dt_cook_none, + [DT_NODE_CLAUSE] = dt_cook_clause, + [DT_NODE_INLINE] = dt_cook_inline, + [DT_NODE_MEMBER] = dt_cook_member, + [DT_NODE_XLATOR] = dt_cook_xlator, + [DT_NODE_PROBE] = dt_cook_none, + [DT_NODE_PROVIDER] = dt_cook_provider, + [DT_NODE_PROG] = dt_cook_none, + [DT_NODE_IF] = dt_cook_none, }; /* From nobody Mon Jul 21 14:58:17 2025 X-Original-To: dev-commits-src-all@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 4bm3Rs4wJJz62lGt; Mon, 21 Jul 2025 14:58: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm3Rs3B3Wz3P7g; Mon, 21 Jul 2025 14:58:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753109897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vx1uODUfsGgwhjf2Qjhi5Rbl+AGBsjFH4L0BnJICKwM=; b=gaUpCyZCOEEaSavK9in5X+cNVYbE0c3cvgttm48HkK2ripsIZm8jtqYBuu0dYUNS6RVdJY 8mewm+7CYB9DUtaEFi9w0SH0U2bzxLLJtSthWrOGiZ08+NBNDnEPPTlHsuAtZCRL9vSVrw 0oTH5LWtp0+a9zhwZL4uZU24X6Wwmw+KiiCmcaoIF85i0VOvVXLSbrx1OSb2qb1oWzZ7sm zHno0OcJ4rqqlqFjYewNnATE8H84qoP+sEltUsBZ3FJ0Xj8C6F67hjMHTxanXzfe0LARYz Nc6NA1v+rOAUkQJsEl8dGTAN1cVasPNT1PUeKALZQ5yCDrb5513AD9taNHdJOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753109897; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vx1uODUfsGgwhjf2Qjhi5Rbl+AGBsjFH4L0BnJICKwM=; b=xiJN8D+BAgK9EV/bm/COewCndtLjxGdFsUiFy0XhwWPx4BGGosXvrK4wuPpf9BExBENVpW vfi+lyMsVa6oN5+YjVn6awFx/tvCQV/32po9tvdGZUS/sQr6hjz5DyP2al/bHeIkzq5Paj Y7LHnc3brKPf+yRBjkRRfq07VJO3k8mY0msOfzPTOlY9pwgIN/BsdFwQ43vLRb5GewH1yT Xx1GnId2KSM92d0sYzQw7ArzonV13sE9I5TwHwBSd61hTA+TSdLurKVuf5HmIJBPUi4M5E PSCYlIRn3h24bY1WRPrlWgwM/vEUeq4CJj5D+prpzod7ITi6UpwfiegUmvkCHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753109897; a=rsa-sha256; cv=none; b=XO0TbUU7ik6VHSFD4PHxJLBXfgjudAkGbULurEtO9zF8YJexNPRRhkVLXUf+ZpytMnVtc0 3/XZYrXWD6HIoGQ4b++V9+wqK/S2bz1iKSKS1WKhFHIDZNPS0mr+nwsikjGW1JUb0XfoYo UrzaXycP5wrX3g4Wr3YSDOnuNZKu6G9B75VEqVNTqzye1ogM4uV4i0uGlI5QQkMzelxo82 y5rgYu/qWIgxhV+VthaGUHUTbBaNoyY3akd5i/GNRpq5gg95HGXepMWnNRqfP6w9K186QM aZ0L5Vwj9NKtiWIs1wo7efntyfzqZQx/nyTWmR4dCPVi5iB4uCkg/FJZ4YZygQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bm3Rs2HR9z11pt; Mon, 21 Jul 2025 14:58:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56LEwHA7053893; Mon, 21 Jul 2025 14:58:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56LEwHTU053890; Mon, 21 Jul 2025 14:58:17 GMT (envelope-from git) Date: Mon, 21 Jul 2025 14:58:17 GMT Message-Id: <202507211458.56LEwHTU053890@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d8f3e8781b2c - main - makefs/zfs: Make it possible to set a compression property List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: d8f3e8781b2ce316120e9a5a42bb1174e9a53187 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d8f3e8781b2ce316120e9a5a42bb1174e9a53187 commit d8f3e8781b2ce316120e9a5a42bb1174e9a53187 Author: Mark Johnston AuthorDate: 2025-07-21 13:35:12 +0000 Commit: Mark Johnston CommitDate: 2025-07-21 14:57:58 +0000 makefs/zfs: Make it possible to set a compression property makefs currently does not implement compression for ZFS datasets, as doing so seems somewhat fraught with compatibility issues. As a result, the root dataset has compression disabled, and all others inherit from that. However, it may be useful to enable compression for new files once the generated pool is actually imported. Thus, implement a per-data compression option. By default, compression is inherited from the parent dataset and disabled on the root dataset. Add a regression test. PR: 288241 MFC after: 1 month --- usr.sbin/makefs/makefs.8 | 10 +++- usr.sbin/makefs/tests/makefs_zfs_tests.sh | 90 +++++++++++++++++++++++++++++++ usr.sbin/makefs/zfs/dsl.c | 44 +++++++++++++-- 3 files changed, 137 insertions(+), 7 deletions(-) diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8 index a11eaf8206e9..c46f283f90a8 100644 --- a/usr.sbin/makefs/makefs.8 +++ b/usr.sbin/makefs/makefs.8 @@ -33,8 +33,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd January 19, 2024 - +.Dd July 19, 2025 .Dt MAKEFS 8 .Os .Sh NAME @@ -596,10 +595,17 @@ The following properties may be set for a dataset: .Bl -tag -compact -offset indent .It atime .It canmount +.It compression .It exec .It mountpoint .It setuid .El +Note that +.Nm +does not implement compression of files included in the image, +regardless of the value of the +.Dv compression +property. .El .Sh SEE ALSO .Xr mtree 5 , diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh index 520d1f211ac3..d73da083a8c2 100644 --- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh @@ -124,6 +124,95 @@ basic_cleanup() common_cleanup } +# +# Try configuring various compression algorithms. +# +atf_test_case compression cleanup +compression_body() +{ + create_test_inputs + + cd $TEST_INPUTS_DIR + mkdir dir + mkdir dir2 + cd - + + for alg in off on lzjb gzip gzip-1 gzip-2 gzip-3 gzip-4 \ + gzip-5 gzip-6 gzip-7 gzip-8 gzip-9 zle lz4 zstd; do + atf_check $MAKEFS -s 1g -o rootpath=/ \ + -o poolname=$ZFS_POOL_NAME \ + -o fs=${ZFS_POOL_NAME}\;compression=$alg \ + -o fs=${ZFS_POOL_NAME}/dir \ + -o fs=${ZFS_POOL_NAME}/dir2\;compression=off \ + $TEST_IMAGE $TEST_INPUTS_DIR + + import_image + + check_image_contents + + if [ $alg = gzip-6 ]; then + # ZFS reports gzip-6 as just gzip since it uses + # a default compression level of 6. + alg=gzip + fi + # The "dir" dataset's compression algorithm should be + # inherited from the root dataset. + atf_check -o inline:$alg\\n -e empty -s exit:0 \ + zfs get -H -o value compression ${ZFS_POOL_NAME} + atf_check -o inline:$alg\\n -e empty -s exit:0 \ + zfs get -H -o value compression ${ZFS_POOL_NAME}/dir + atf_check -o inline:off\\n -e empty -s exit:0 \ + zfs get -H -o value compression ${ZFS_POOL_NAME}/dir2 + + atf_check -e ignore dd if=/dev/random \ + of=${TEST_MOUNT_DIR}/dir/random bs=1M count=10 + atf_check -e ignore dd if=/dev/zero \ + of=${TEST_MOUNT_DIR}/dir/zero bs=1M count=10 + atf_check -e ignore dd if=/dev/zero \ + of=${TEST_MOUNT_DIR}/dir2/zero bs=1M count=10 + + # Export and reimport to ensure that everything is + # flushed to disk. + atf_check zpool export ${ZFS_POOL_NAME} + atf_check -o ignore -e empty -s exit:0 \ + zdb -e -p /dev/$(cat $TEST_MD_DEVICE_FILE) -mmm -ddddd \ + $ZFS_POOL_NAME + atf_check zpool import -R $TEST_MOUNT_DIR $ZFS_POOL_NAME + + if [ $alg = off ]; then + # If compression is off, the files should be the + # same size as the input. + atf_check -o match:"^11[[:space:]]+${TEST_MOUNT_DIR}/dir/random" \ + du -m ${TEST_MOUNT_DIR}/dir/random + atf_check -o match:"^11[[:space:]]+${TEST_MOUNT_DIR}/dir/zero" \ + du -m ${TEST_MOUNT_DIR}/dir/zero + atf_check -o match:"^11[[:space:]]+${TEST_MOUNT_DIR}/dir2/zero" \ + du -m ${TEST_MOUNT_DIR}/dir2/zero + else + # If compression is on, the dir/zero file ought + # to be smaller. + atf_check -o match:"^1[[:space:]]+${TEST_MOUNT_DIR}/dir/zero" \ + du -m ${TEST_MOUNT_DIR}/dir/zero + atf_check -o match:"^11[[:space:]]+${TEST_MOUNT_DIR}/dir/random" \ + du -m ${TEST_MOUNT_DIR}/dir/random + atf_check -o match:"^11[[:space:]]+${TEST_MOUNT_DIR}/dir2/zero" \ + du -m ${TEST_MOUNT_DIR}/dir2/zero + fi + + atf_check zpool destroy ${ZFS_POOL_NAME} + atf_check rm -f ${TEST_ZFS_POOL_NAME} + atf_check mdconfig -d -u $(cat ${TEST_MD_DEVICE_FILE}) + atf_check rm -f ${TEST_MD_DEVICE_FILE} + done +} +compression_cleanup() +{ + common_cleanup +} + +# +# Try destroying a dataset that was created by makefs. +# atf_test_case dataset_removal cleanup dataset_removal_body() { @@ -939,6 +1028,7 @@ atf_init_test_cases() { atf_add_test_case autoexpand atf_add_test_case basic + atf_add_test_case compression atf_add_test_case dataset_removal atf_add_test_case devfs atf_add_test_case empty_dir diff --git a/usr.sbin/makefs/zfs/dsl.c b/usr.sbin/makefs/zfs/dsl.c index f7264b9d2ca7..8a8cee7c82b2 100644 --- a/usr.sbin/makefs/zfs/dsl.c +++ b/usr.sbin/makefs/zfs/dsl.c @@ -193,6 +193,39 @@ dsl_dir_set_prop(zfs_opt_t *zfs, zfs_dsl_dir_t *dir, const char *key, nvlist_add_uint64(nvl, key, 0); else errx(1, "invalid value `%s' for %s", val, key); + } else if (strcmp(key, "compression") == 0) { + size_t i; + + const struct zfs_compression_algorithm { + const char *name; + enum zio_compress alg; + } compression_algorithms[] = { + { "off", ZIO_COMPRESS_OFF }, + { "on", ZIO_COMPRESS_ON }, + { "lzjb", ZIO_COMPRESS_LZJB }, + { "gzip", ZIO_COMPRESS_GZIP_6 }, + { "gzip-1", ZIO_COMPRESS_GZIP_1 }, + { "gzip-2", ZIO_COMPRESS_GZIP_2 }, + { "gzip-3", ZIO_COMPRESS_GZIP_3 }, + { "gzip-4", ZIO_COMPRESS_GZIP_4 }, + { "gzip-5", ZIO_COMPRESS_GZIP_5 }, + { "gzip-6", ZIO_COMPRESS_GZIP_6 }, + { "gzip-7", ZIO_COMPRESS_GZIP_7 }, + { "gzip-8", ZIO_COMPRESS_GZIP_8 }, + { "gzip-9", ZIO_COMPRESS_GZIP_9 }, + { "zle", ZIO_COMPRESS_ZLE }, + { "lz4", ZIO_COMPRESS_LZ4 }, + { "zstd", ZIO_COMPRESS_ZSTD }, + }; + for (i = 0; i < nitems(compression_algorithms); i++) { + if (strcmp(val, compression_algorithms[i].name) == 0) { + nvlist_add_uint64(nvl, key, + compression_algorithms[i].alg); + break; + } + } + if (i == nitems(compression_algorithms)) + errx(1, "invalid compression algorithm `%s'", val); } else { errx(1, "unknown property `%s'", key); } @@ -236,9 +269,6 @@ dsl_init(zfs_opt_t *zfs) zfs->rootdsldir = dsl_dir_alloc(zfs, NULL); - nvlist_add_uint64(zfs->rootdsldir->propsnv, "compression", - ZIO_COMPRESS_OFF); - zfs->rootds = dsl_dataset_alloc(zfs, zfs->rootdsldir); zfs->rootdsldir->headds = zfs->rootds; @@ -288,9 +318,13 @@ dsl_init(zfs_opt_t *zfs) } /* - * Set the root dataset's mount point if the user didn't override the - * default. + * Set the root dataset's mount point and compression strategy if the + * user didn't override the defaults. */ + if (nvpair_find(zfs->rootdsldir->propsnv, "compression") == NULL) { + nvlist_add_uint64(zfs->rootdsldir->propsnv, "compression", + ZIO_COMPRESS_OFF); + } if (nvpair_find(zfs->rootdsldir->propsnv, "mountpoint") == NULL) { nvlist_add_string(zfs->rootdsldir->propsnv, "mountpoint", zfs->rootpath); From nobody Mon Jul 21 14:58:16 2025 X-Original-To: dev-commits-src-all@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 4bm3Rr64Djz62lLj; Mon, 21 Jul 2025 14:58: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm3Rr2YLRz3P7W; Mon, 21 Jul 2025 14:58:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753109896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zgrJJVXvxomY2s9RpPknvUUx3NQuPZBtmsMDQxN9+2E=; b=H8kL5h8I22UnSQhkIkq7SimvzQCGq7gGgaNfC8ofHbwLtfTxTQ7HgdB6YOTb9IoH5wS/Zs +mOAYpKZzDq/b4ISsryUcmjVS5iTYLJW6wnA2/pYfEYcsAc+NEqoC73NcnHlxkhQiHUdiq PJq8WcrIcPKZ+pbF+bN/2+GDSJw7UC1Qj1sf13VPBYaTDtS8mRkMI1uh5IHxBd0WUHd66c bhfBTyaPmPAbXuyn96DIO4V43I4rZfuHOoCgoxvne0ro8XfuiGD/BIi8ya3BVOjq9mVILw jG0YjOttLQJvJgy6GgOu4mgoRTEs7xszZFjklShWL/aNspX8LD3fsFg6ZzSaWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753109896; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zgrJJVXvxomY2s9RpPknvUUx3NQuPZBtmsMDQxN9+2E=; b=rxcn7k4pnBhv/bwgSTAaBEUaArjU7rgek8CSFRDi+oE9fsC38yHCyLCma7Bm7CdsJtEdSj /gNJHr0N5L3BtXTBUBL/zpyI+yqmCiPu/ehHDA/envElpORmcO/sY+0rEXYB7jAf8Xgmwl 2TQe/iSYrJEcq4aiMMfZkUMrlcL/Xoxf33ivcJXxuLOebgZ9DJG04fCmMQf9B1leT98Inr uuMyj4jgQ0Aga+83XA2qH9LTCD7RukmblDfrhFaeFBUZ6suZlpdTh8VWtYYL+t9sqsX38I nMPW1umIW0n3RSjW1mEuuQAOG1iTvo2Ys/Oc09f00r2VIubbjXOCwdH0vFPdkw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753109896; a=rsa-sha256; cv=none; b=g9FZBYj2KvyrH6nyyA90GotwN2EArsdFG+kuNDgAxlWsfh4vQLAvsMqjSD3V7gSr5dGivp 9Gh1pVdkU825vdU4p+6SJCgz6molOlI91gCxmD9yxy2L5VrFezbP5i/eT9RkFWbKbw0VDs 5sAynFA+mSHJf6wGngn1KY+GF7iVEIx9gq95u7aiuEVXmOpqHA0OTmm/sYYFZQrfaDrPuQ an2yGA54wLvkgtAAsoEVSfNJffdm3D97j1l4LPgSnm5JkaJ5oAG+RtjBUDU72eP+n910WA 3BPl2xGuwKTznLZoo6JjmDnTLSKQ/YTeSPKawtQbbyC1o1jZJ+99nv1441Gr5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bm3Rr1dqQz12P6; Mon, 21 Jul 2025 14:58:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56LEwG56053854; Mon, 21 Jul 2025 14:58:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56LEwGL7053851; Mon, 21 Jul 2025 14:58:16 GMT (envelope-from git) Date: Mon, 21 Jul 2025 14:58:16 GMT Message-Id: <202507211458.56LEwGL7053851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: dabde7d97680 - main - libdtrace: Permit taking the address of an identifier without type info List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: dabde7d97680cac7e0ead56693d424f4e5631019 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=dabde7d97680cac7e0ead56693d424f4e5631019 commit dabde7d97680cac7e0ead56693d424f4e5631019 Author: Mark Johnston AuthorDate: 2025-07-21 13:34:30 +0000 Commit: Mark Johnston CommitDate: 2025-07-21 14:57:58 +0000 libdtrace: Permit taking the address of an identifier without type info Symbols defined using assembler directives lack type info, but in this case one ought to be able to cast a pointer to the symbol and dereference the pointer to get a value. Without this change, D disallows this trick since it requires all identifiers to have a type. Relax the rules slightly and allow an identifier to have type "void" if we know we're just taking its address. As a result, the following dtrace invocation works: dtrace -n 'tick-1s {printf("%d", *(int *)&`ticks);}' In particular, since commit b2b974f7ef4c ("clock: Simplify subr_ticks and rename"), "ticks" does not have any type info associated with it, so its value couldn't be printed. This trick provides a workaround and is probably generally useful. Add a regression test which exercises this functionality. PR: 287752 Reviewed by: avg MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D51417 --- .../dtrace/test/tst/common/profile-n/tst.ticks.d | 54 ++++++++++++++++++++++ .../opensolaris/lib/libdtrace/common/dt_parser.c | 25 ++++++++-- .../opensolaris/lib/libdtrace/common/dt_parser.h | 1 + .../dtrace/tests/common/profile-n/Makefile | 1 + 4 files changed, 78 insertions(+), 3 deletions(-) diff --git a/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ticks.d b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ticks.d new file mode 100644 index 000000000000..4061db9858c1 --- /dev/null +++ b/cddl/contrib/opensolaris/cmd/dtrace/test/tst/common/profile-n/tst.ticks.d @@ -0,0 +1,54 @@ +/* + * CDDL HEADER START + * + * The contents of this file are subject to the terms of the + * Common Development and Distribution License (the "License"). + * You may not use this file except in compliance with the License. + * + * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE + * or http://www.opensolaris.org/os/licensing. + * See the License for the specific language governing permissions + * and limitations under the License. + * + * When distributing Covered Code, include this CDDL HEADER in each + * file and include the License file at usr/src/OPENSOLARIS.LICENSE. + * If applicable, add the following below this CDDL HEADER, with the + * fields enclosed by brackets "[]" replaced with your own identifying + * information: Portions Copyright [yyyy] [name of copyright owner] + * + * CDDL HEADER END + */ + +/* + * Copyright 2025 Mark Johnston + */ + +/* + * For 10s, verify that the value of `ticks goes up by `hz each second. + */ + +#pragma D option quiet + +BEGIN +{ + i = 0; +} + +tick-1s +{ + if (i == 0) { + t = *(int *)&`ticks; + i++; + } else { + u = *(int *)&`ticks; + if (u - t != `hz) { + printf("ticks: %d, expected %d\n", u - t, `hz); + exit(1); + } + t = u; + i++; + if (i == 10) { + exit(0); + } + } +} diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c index dd68f9278308..8cc504856567 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.c @@ -1918,6 +1918,14 @@ dt_node_op1(int op, dt_node_t *cp) return (cp); } + /* + * When applying the addressof operator to an identifier, it's okay if + * we can't find type information for the identifier, so flag the node + * to ensure that we don't raise an error. + */ + if (op == DT_TOK_ADDROF && cp->dn_kind == DT_NODE_IDENT) + cp->dn_flags |= DT_NF_IDENTADDR; + dnp = dt_node_alloc(DT_NODE_OP1); assert(op <= USHRT_MAX); dnp->dn_op = (ushort_t)op; @@ -2786,10 +2794,21 @@ dt_xcook_ident(dt_node_t *dnp, dt_idhash_t *dhp, uint_t idkind, int create) dt_module_modelname(dtp->dt_ddefs)); } - xyerror(D_SYM_NOTYPES, + /* + * If we're taking the address of an identifier that + * doesn't have type info, try to make it a void *. + * This lets us use identifiers that are defined in + * assembly and don't have type information. + */ + if ((dnp->dn_flags & DT_NF_IDENTADDR) == 0 || + dtrace_lookup_by_type(dtp, DTRACE_OBJ_CDEFS, + "void", &dtt) != 0) { + xyerror(D_SYM_NOTYPES, "no symbolic type information is available for " - "%s%s%s: %s\n", dts.dts_object, mark, dts.dts_name, - dtrace_errmsg(dtp, dtrace_errno(dtp))); + "%s%s%s: %s\n", dts.dts_object, mark, + dts.dts_name, + dtrace_errmsg(dtp, dtrace_errno(dtp))); + } } idp = dt_ident_create(name, DT_IDENT_SYMBOL, 0, 0, diff --git a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.h b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.h index 3a146c5d2592..1d2f33beee0f 100644 --- a/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.h +++ b/cddl/contrib/opensolaris/lib/libdtrace/common/dt_parser.h @@ -182,6 +182,7 @@ typedef struct dt_node { #define DT_NF_WRITABLE 0x10 /* node is writable (can be modified) */ #define DT_NF_BITFIELD 0x20 /* node is an integer bitfield */ #define DT_NF_USERLAND 0x40 /* data is a userland address */ +#define DT_NF_IDENTADDR 0x80 /* node is an identifier address */ #define DT_TYPE_NAMELEN 128 /* reasonable size for ctf_type_name() */ diff --git a/cddl/usr.sbin/dtrace/tests/common/profile-n/Makefile b/cddl/usr.sbin/dtrace/tests/common/profile-n/Makefile index 84f4706b61ee..ceb52fcf5bd0 100644 --- a/cddl/usr.sbin/dtrace/tests/common/profile-n/Makefile +++ b/cddl/usr.sbin/dtrace/tests/common/profile-n/Makefile @@ -37,6 +37,7 @@ ${PACKAGE}FILES= \ tst.profileusec.d \ tst.profileusec.d.out \ tst.sym.ksh \ + tst.ticks.d \ tst.ufunc.ksh \ tst.ufuncsort.ksh \ tst.ufuncsort.ksh.out \ From nobody Mon Jul 21 14:58:18 2025 X-Original-To: dev-commits-src-all@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 4bm3Rw2Tz1z62lLw; Mon, 21 Jul 2025 14:58: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm3Rt56Hfz3P7y; Mon, 21 Jul 2025 14:58:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753109898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tsbVISnpn6fkj+zpeT45s2eVWxOJJDPjTzOCpgamTj4=; b=oXuR+kALtvFYz/NQjVHX6aYwBXR8tA+bb47z/mQ/dePjGYR5HB7t104031T7KktHQjSNQa bc463pcrLFLP+VmZ65/CtOXEbCCOjuBKWGRZKMlr4zRfkRRnpn0xrP/RgRuYXjyfkGWcpS YG3aIqQcLkkXxOQsBE4k1Pl94EEDqvPQ76WPbkOShD+LJXYwTD6kcNAYdRMVeCOn2MkLh5 JhI0tdKkNaUgbhse64xURNr0p51aU8o672HPsicNqIn5Qp3Mtaj95Si1jkvvTYJ/7eRVqA Qng0oZH0/LnLMahe82wQ/Vm6NGMLmu+dfQcp1gS5uFSzqsGVMZG0swVNbrM4wg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753109898; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tsbVISnpn6fkj+zpeT45s2eVWxOJJDPjTzOCpgamTj4=; b=TQRXgZUFjs9XyyJbClFmDZjusbiU5tFhV8CldE3NcO1zTt0tsBPG017XyN1wgkIkZ4tbZZ iefF25eObabTQCHZDPFacliJla/Yb8pKZJRVtp4aReeaSnOhjdCq8cpe7idBRLOY144fUF knjueTuLWcdbd+QdGjAU817/toXfEFgnvK1ZqnexFwXrTXOaAV672gNh12Z10/Th/PPeR9 LlZzb/uvG4AYV0XWUdix8QDA6c4B19EDtRj/77M9mRSc49R0OIgH1+Lc/3pRkSP2vQZwFI 4ngcUIRPX+EgoLEXH8SCv+mKOo7+wWldV2Y9bzHA+LnmIlnbVL90z8ItVz4ZUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753109898; a=rsa-sha256; cv=none; b=PPVxWdciZ9SgqL2UajeV1nkjrHns86aiSLw3zXo48FJzsglZiQjp2mv4XyhVALpkb2xu2H z3jjmE7E7N8qvXtM+TbdKVE0z9c4f9+g2nmePcg4Fu8fmuSdS9e4aST86+HMJZjLsHMDFd aSLDSwltQcCQk5zDXRcZHuWxtqlqdqJW1hcjvFLSAFvLULp2EjNO+kZBQtogD9zTFYuUaP dyDYd4mjqzIcLVQl9tKv7Bbn1QAam3G0Oc7Jr+hqVfkxl9Yxbn3k/hVUydWlWQrPBpc9AR fRF5MGwSRoD+RNH3w9keOyUAIBdvHUJ3gJ/BQi8hOuwOSQIbF54HlXp8oKNHqg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bm3Rt3Ckbz11yF; Mon, 21 Jul 2025 14:58:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56LEwIwi053925; Mon, 21 Jul 2025 14:58:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56LEwIhF053922; Mon, 21 Jul 2025 14:58:18 GMT (envelope-from git) Date: Mon, 21 Jul 2025 14:58:18 GMT Message-Id: <202507211458.56LEwIhF053922@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: cd4b9dac1a0d - main - makefs/zfs: Allow the user to specify the pool GUID List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: cd4b9dac1a0dc6b868aa4376ac355aaf25430a77 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=cd4b9dac1a0dc6b868aa4376ac355aaf25430a77 commit cd4b9dac1a0dc6b868aa4376ac355aaf25430a77 Author: Mark Johnston AuthorDate: 2025-07-21 13:41:40 +0000 Commit: Mark Johnston CommitDate: 2025-07-21 14:57:58 +0000 makefs/zfs: Allow the user to specify the pool GUID This will be used by the test suite to enable running makefs/zfs tests in parallel. MFC after: 1 month --- usr.sbin/makefs/makefs.8 | 6 ++++++ usr.sbin/makefs/zfs.c | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/usr.sbin/makefs/makefs.8 b/usr.sbin/makefs/makefs.8 index c46f283f90a8..d20f69d87559 100644 --- a/usr.sbin/makefs/makefs.8 +++ b/usr.sbin/makefs/makefs.8 @@ -550,6 +550,12 @@ This option allows the default heuristic to be overridden. .It verify-txgs Prompt OpenZFS to verify pool metadata during import. This is disabled by default as it may significantly increase import times. +.It poolguid +Use the specified 64-bit integer as the pool GUID. +If this option is not specified, the pool GUID will be random but fixed +across multiple identical invocations of +.Nm . +This option is useful for testing but not required for reproducibility. .It poolname The name of the ZFS pool. This option must be specified. diff --git a/usr.sbin/makefs/zfs.c b/usr.sbin/makefs/zfs.c index 66e7f8dafc9c..8d50c450541b 100644 --- a/usr.sbin/makefs/zfs.c +++ b/usr.sbin/makefs/zfs.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -85,6 +86,8 @@ zfs_prep_opts(fsinfo_t *fsopts) 0, 0, "Bootable dataset" }, { '\0', "mssize", &zfs->mssize, OPT_INT64, MINMSSIZE, MAXMSSIZE, "Metaslab size" }, + { '\0', "poolguid", &zfs->poolguid, OPT_INT64, + 0, INT64_MAX, "ZFS pool GUID" }, { '\0', "poolname", &zfs->poolname, OPT_STRPTR, 0, 0, "ZFS pool name" }, { '\0', "rootpath", &zfs->rootpath, OPT_STRPTR, @@ -547,7 +550,8 @@ pool_init(zfs_opt_t *zfs) { uint64_t dnid; - zfs->poolguid = randomguid(); + if (zfs->poolguid == 0) + zfs->poolguid = randomguid(); zfs->vdevguid = randomguid(); zfs->mos = objset_alloc(zfs, DMU_OST_META); From nobody Mon Jul 21 14:58:19 2025 X-Original-To: dev-commits-src-all@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 4bm3Rw5R0zz62lDK; Mon, 21 Jul 2025 14:58: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm3Rv4vZCz3P5X; Mon, 21 Jul 2025 14:58:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753109899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nqiqOBe6Qxj4gf3sBvSq2FPZTOhTPs0kweXInbP7b/c=; b=My2L1i8OQBmBpXKqy+1w0He1+P3jSWg3RvXbbTD9RgEKPL13D4KV+LrqHwCfQu2OIEZSuE P6ponAFj7N4myMUR2wCFc3aWd2ry37HSNYBg+jiM8/PsoIeDEVfXxj5uNOpnWvLJfkkndI oa+fQS8RVcHybUT2t8v5hB3VThX7FlqWh+pPaFNqjxin58BLvPYN3FzFzvkGjkL7rWy5QB 9dEJr2l3DJeaDkEzt/mTbJbzWBZKILWHWmHiHjY+PhN3lJzywzoezL2Ckuu8L0kyIhbvWG ES+wrbSe87ExJ8TnI8yETS3LehB38QhUe+3i8hv6j+W09VJdYzt4MyyOpGAxPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753109899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nqiqOBe6Qxj4gf3sBvSq2FPZTOhTPs0kweXInbP7b/c=; b=Ssp+RZCoM1DF5rQgRgGiizTHsYxhWex7UZ5GRVBKjWbCkO1N7Lw1IBAm+yy/Vsek8qs8h2 sPl2fiLlxQ/e7f7CanPLEWzNyhhATv7VtxwRTrRfzJxXaLgWYvVVfnvfOS/z5/Qu5zBnf5 cC54XkO1cT47W2Hf0p3yovUTPBw5c6IZWU1HbsqjXB1+HnEfXC33hDTUtRrdWiszUfpo4N EmmdyYi3nhqzqdKQe+KjPFY5Y72Ky774Z40eNTyabwXX7mZBfitPQPAvl3mdzT6vK5xueW VFrHLZvSm38kWFRf58pIJrfiGlZp26ayQ3wqnCfQ8DINeK5jptR1xGibdbIjZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753109899; a=rsa-sha256; cv=none; b=IERgDTMJAOSrrO/0xysXTrvmEXQh6HFsRwxXEgnspO/ys9aAaxwatVrcR3xYfcgA0Jo2wA qYpPo6cug92ev68/ud5IJJ05cGxlGTPgFzUbxssGO0NWlQ61NnGRBuFZ6EnRmRrqjy74sz C3npOmQBf4FOaYmbP1N9ygj1OvLIsffIS/pFlfmfQTqNb8EiaFkUntRnMCMLx4T6JVc9D9 Q1SVXEoYZCzfWy8bA3JBEnGXipgWpQgZgc1Tf6yKOTF7MfCULwQRPNtohaJbYNKpsFcGvg FWg/VjUYvtD/XPil2vY+iUtygdCvqlIvQGdmlJjsehnZRIA0qS0S7/xpsOHNkg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bm3Rv3xMKz12Jl; Mon, 21 Jul 2025 14:58:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56LEwJPY053958; Mon, 21 Jul 2025 14:58:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56LEwJ2b053955; Mon, 21 Jul 2025 14:58:19 GMT (envelope-from git) Date: Mon, 21 Jul 2025 14:58:19 GMT Message-Id: <202507211458.56LEwJ2b053955@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 68dc9c6b8ef8 - main - makefs/zfs tests: Run in parallel List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 68dc9c6b8ef86caef3962cc9177bb21d8f38b0ed Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=68dc9c6b8ef86caef3962cc9177bb21d8f38b0ed commit 68dc9c6b8ef86caef3962cc9177bb21d8f38b0ed Author: Mark Johnston AuthorDate: 2025-07-21 13:41:56 +0000 Commit: Mark Johnston CommitDate: 2025-07-21 14:57:58 +0000 makefs/zfs tests: Run in parallel Use the script PID as a pool GUID. This way, tests running in parallel will have pool GUIDs that won't collide, and the tests no longer need to be serialized. MFC after: 1 month --- usr.sbin/makefs/tests/Makefile | 4 ---- usr.sbin/makefs/tests/makefs_zfs_tests.sh | 2 +- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/usr.sbin/makefs/tests/Makefile b/usr.sbin/makefs/tests/Makefile index 345b728651d6..748bafa06211 100644 --- a/usr.sbin/makefs/tests/Makefile +++ b/usr.sbin/makefs/tests/Makefile @@ -7,10 +7,6 @@ ATF_TESTS_SH+= makefs_msdos_tests TEST_METADATA.makefs_msdos_tests+= required_files="/sbin/mount_msdosfs" .if ${MK_ZFS} != "no" ATF_TESTS_SH+= makefs_zfs_tests -# ZFS pools created by makefs always have the same GUID, so OpenZFS -# refuses to import more than one at a time. Thus the ZFS tests cannot -# be run in parallel for now. -TEST_METADATA.makefs_zfs_tests+= is_exclusive="true" .endif BINDIR= ${TESTSDIR} diff --git a/usr.sbin/makefs/tests/makefs_zfs_tests.sh b/usr.sbin/makefs/tests/makefs_zfs_tests.sh index d73da083a8c2..2fafce85b347 100644 --- a/usr.sbin/makefs/tests/makefs_zfs_tests.sh +++ b/usr.sbin/makefs/tests/makefs_zfs_tests.sh @@ -28,7 +28,7 @@ # SUCH DAMAGE. # -MAKEFS="makefs -t zfs -o verify-txgs=true" +MAKEFS="makefs -t zfs -o verify-txgs=true -o poolguid=$$" ZFS_POOL_NAME="makefstest$$" TEST_ZFS_POOL_NAME="$TMPDIR/poolname" From nobody Mon Jul 21 15:35:04 2025 X-Original-To: dev-commits-src-all@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 4bm4GJ5GLNz62nJt; Mon, 21 Jul 2025 15:35: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm4GJ3fpJz3m8R; Mon, 21 Jul 2025 15:35:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753112104; h=from:from:reply-to:subject:subject: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/0g6OFtE2ZogROjbNjKTOIE7ur0JDpvjFPo4qX9itk=; b=ce4ZK9ZlL6qwo0GPuWJ4CjZ7Md8IszDSkDQkQniR+NEttjiKxQuHNog6grAoBPX40deT9l vjp0fN7MktFvmXrMk1U9WQ92j7F8QqZBuRv7cg4/mZKAVh8AV9WouhUu+9kOZj59WXz1w4 m8BeuERt9iL/3EjP2OlfXXUG8+z/Dtp/hBEY512TGu/UG1sjlbsfs/oIiH0Jba2xqrtpRV b8epee1ZNiYgQ9FFD6hSRjU6n7XZHqTPwj09FY5LR6AwHwmWfK5qF9fdEQVADmEgCvtQSM OhzQXFs7TZVPy8QoLytfnZmRsXGm9bQ2/S7kKE4MuwzbOMSNKrcduKxX6xgWLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753112104; h=from:from:reply-to:subject:subject: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/0g6OFtE2ZogROjbNjKTOIE7ur0JDpvjFPo4qX9itk=; b=AHFONCds40Fp8mVUYwnVzZBrJFkFIs3BKWJIrHBfNmQ9pAMY9LOdS/PVuAqgsQRno9PmvU Cr0w46p69awQbPzDFQEb3Zjgcsoy2Giqihx1XW7/1gMdE8G3pJERFlTXwd0DGqHODbtWD/ r0ieUv+yVdqJHwB2DpKtgWQxHu0aSrZXmSOixtQ7JaWyzl29xwNwmEaH5qf4T8sn1hzuuS hIp7/mAPwujdGeVNVruPqJC+15E/5IN5Ml0NcPBcuHONIqY9ES8yzhpJfbXHueXQ2s46I5 8aYqLTpi57N1mgGKZ4j2OziDtCMqOa3JHo2vA9NVpiZOG8JL3qb6wQ7jBClApg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753112104; a=rsa-sha256; cv=none; b=drJITSjLVvNQowoEOMpEc5UDESvYOLiM3roDKH89Ke+IAaJdIGg71syJhh1lhsC3o2h1y6 YJkjveFAPBt/J9PmMok/0zaSOlil+F6aCVY3dwP+TEYaFZ8NOJbCxr2MGM/25m8mGqGmBf reWQLPGG08bcrfriYRDEvcv2dMc02ZYVb5xrhILGqGpLjIjIiIMIyWr6151gMEUlP3BsrV AH+NhDCzo2DGVZp7w0/m1r1Nbr2UHyEIMLIv4uuZm+Pb/0dYF11Xu5CU8OQpJ2Do0+bVV1 7lqwkXCv3k2/YUXjfKXPNEJARAoq9xvsfzrlrhwgCIDssSplv8UmvHIMxig2cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bm4GJ30wgz12hk; Mon, 21 Jul 2025 15:35:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56LFZ4T9028465; Mon, 21 Jul 2025 15:35:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56LFZ4xI028462; Mon, 21 Jul 2025 15:35:04 GMT (envelope-from git) Date: Mon, 21 Jul 2025 15:35:04 GMT Message-Id: <202507211535.56LFZ4xI028462@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: de2936aa3675 - main - tcp rack: fix clearing of app limited periods List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: de2936aa36754d1b63475f41a1d1429ae6fdfad8 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=de2936aa36754d1b63475f41a1d1429ae6fdfad8 commit de2936aa36754d1b63475f41a1d1429ae6fdfad8 Author: Peter Lei AuthorDate: 2025-07-21 14:01:43 +0000 Commit: Michael Tuexen CommitDate: 2025-07-21 14:01:43 +0000 tcp rack: fix clearing of app limited periods Use the correct variable in the correct way. The app limited period is cleared when gp_seq is greater than or equal to cleared_app_ack_seq. Reviewed by: rrs, tuexen, Nick Banks MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D51441 --- sys/netinet/tcp_stacks/rack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 5280f18dc983..834e1347a152 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -17987,7 +17987,7 @@ start_set: tp->gput_ack = tp->gput_seq + rack_get_measure_window(tp, rack); rack->r_ctl.rc_gp_cumack_ts = 0; if ((rack->r_ctl.cleared_app_ack == 1) && - (SEQ_GEQ(rack->r_ctl.cleared_app_ack, tp->gput_seq))) { + (SEQ_GEQ(tp->gput_seq, rack->r_ctl.cleared_app_ack_seq))) { /* * We just cleared an application limited period * so the next seq out needs to skip the first From nobody Mon Jul 21 16:12:34 2025 X-Original-To: dev-commits-src-all@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 4bm55Z45YVz62psJ; Mon, 21 Jul 2025 16:12: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm55Z1qffz44X8; Mon, 21 Jul 2025 16:12:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753114354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G+6g/b13/o1yZYwYOoUfCa7qhWy9EAni8XRQMUIQMRc=; b=SxteKShfb5nv1WPj7+YmQnaXj8oPdv076FT2AYgcKI8RaUMyqGXSciAXMPw506Hp1SkC6I tFC5eNlq/ljToXnGUBkEZhg0PTpKT+a/K4u1kHckI7QL1l0EnM0ptc3QXicDorL+e7UIoI H+DemNXIl008jaOZil7KxQRVBig+zA5GM5nwxbMzvYveniEUeRLfaUdTn9Orcisxd0XXAA bNm4bKtiFBdEOa7CnnRlMUan5kDf7dglD7Akb5ZsP2Ixl89W5jJrfI35ul2BdhG8AIPFJ3 y4aWECyybKp1Ctehj3mRofqQ0y4YUjLKKwhKXB6t9aOBRxl+uE2IKdQ1jgVj6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753114354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G+6g/b13/o1yZYwYOoUfCa7qhWy9EAni8XRQMUIQMRc=; b=F20OA+y6KSeNCgjZjBg/1ECWEafUrPR1V4A+6hABdIIHoW1TLDls/bBCBZUmceuZzWV0tO E51W6IV1gKBpMtX1GMhKLB0YX2x04aIOvuw/SLrVLWH/uRb9YeENbAUZUUaLN4ss6IWN2c c08XyhOkb14jrrGuBmrlUqI6Bn/Wb0G0UiBpsbhVlBIwlcWCfjxjLOlQ5ch6RQ3W5RAZ6G zfWbWM6UVB0jFyxOuyIyDTD4p2m18WCdIMqFWiwfYc4MAK+aWMWViqULzgxvQL1aKYEkeP HqjN6sxhh/H1Hn/FzK3wXyFqetK2Qlq6cFDYegCUhazhJUZUQoJI7CMBcPVopQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753114354; a=rsa-sha256; cv=none; b=MshbkU4A0KujWFk8VgCw+8bsgmuHzB5KYAZGGCHJz5RHZrCc927Lhqq8WhdfSjq3YQcz9V nsqRRrN1tzRBLGYTt9K8S03gM4Hw7aY3c1bYckI+rUmlw1GHqSfIxy5m1uM2G9IWsIbfl+ 908PkbWDXXZKSpMwiOSCE4Cwc3nn2vRgQGWKq84849BDezL7DjJ99sN9Rffo5hMcis1iJg kzwC3WrcfabBoBRqxkSIsb/Z/g6tHaWy3UHCCCKPQrF7lxhbh3Txjjb3e5vPM6VrVNGJOB 3+tQorTtKViIRv/H+YGD/EZOLeucG2qlF86VzjDS0Axiya53RjvE5I3DpUSUrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bm55Z1QSMz14BY; Mon, 21 Jul 2025 16:12:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56LGCYus003427; Mon, 21 Jul 2025 16:12:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56LGCYUO003419; Mon, 21 Jul 2025 16:12:34 GMT (envelope-from git) Date: Mon, 21 Jul 2025 16:12:34 GMT Message-Id: <202507211612.56LGCYUO003419@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: 3717484168ee - main - bsd.subdir.mk skip _SUBDIR for DIRDEPS_BUILD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3717484168eea22f318658d46b1d59257c0cce4d Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=3717484168eea22f318658d46b1d59257c0cce4d commit 3717484168eea22f318658d46b1d59257c0cce4d Author: Simon J. Gerraty AuthorDate: 2025-07-21 16:11:44 +0000 Commit: Simon J. Gerraty CommitDate: 2025-07-21 16:11:44 +0000 bsd.subdir.mk skip _SUBDIR for DIRDEPS_BUILD For DIRDEPS_BUILD we want to ignore _SUBDIR regardless of .MAKE.LEVEL Reviewed by: stevek Differential Revision: https://reviews.freebsd.org/D51454 --- share/mk/bsd.subdir.mk | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/share/mk/bsd.subdir.mk b/share/mk/bsd.subdir.mk index cf19c9d66201..289e3d591c8c 100644 --- a/share/mk/bsd.subdir.mk +++ b/share/mk/bsd.subdir.mk @@ -76,13 +76,14 @@ obj: .PHONY .endif .if !defined(NEED_SUBDIR) +.if ${MK_DIRDEPS_BUILD} == "yes" +# ignore this +_SUBDIR: # .MAKE.DEPENDFILE==/dev/null is set by bsd.dep.mk to avoid reading # Makefile.depend -.if ${.MAKE.LEVEL} == 0 && ${MK_DIRDEPS_BUILD} == "yes" && !empty(SUBDIR) && \ - ${.MAKE.DEPENDFILE} != "/dev/null" +.if ${.MAKE.LEVEL} == 0 && !empty(SUBDIR) && ${.MAKE.DEPENDFILE} != "/dev/null" .include -# ignore this -_SUBDIR: +.endif .endif .endif From nobody Mon Jul 21 16:37:23 2025 X-Original-To: dev-commits-src-all@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 4bm5fD4Dsrz62rST; Mon, 21 Jul 2025 16:37:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm5fD3Qcbz4M90; Mon, 21 Jul 2025 16:37:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753115844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=19elqX94NN8Y9YAGKpj81NDbTZ6edhjdlRw0cJ87sMI=; b=Lm7FB1XA9jvzGFEJ/9vvtew9eb6Iq0BbATdYVC8hecUyIYFScM1EOPwHCyRGgVuk3pTD9a 0jhoB7Cbc7CzQ9exahcsWTKSzORoSqFVa3kGUQKb4M1qlbXrxz6LHiqmAmyXx5WTYreWtZ i7X6Em3nVwrA4FDtBGW63GrQr+KnjrtEgmrTsqCbrC3HKINGRUqJw3tQy/G/5kBtbs8gnw WkWUACX4Dy/GzIbCr8KKVIQpLCn0iXWL1Jxxp6HYiyKnimqKpZHKYTuabp8JGhD/OONrz3 CApp8Lx2+q8mYPIWwmgoqvi2Y4nKyxc33BGKriIdo1sj8qsGlIN8zFbc+bFYWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753115844; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=19elqX94NN8Y9YAGKpj81NDbTZ6edhjdlRw0cJ87sMI=; b=l4QQtafme0/d65PTLQS9KDhPgxd4ugQuyZp8+QOIgQGZGFsVS7CH2BLOwvCMHATnupXUaL XYISi+WvOB5MbCVBh/4JFmcvjCLTewHYJ/0LVNTMdco4uyplNKyGwgSfIC4GJtEqIMR7hd AcuUD24AhdXT4npKn9+KlWFQwvYTQr89jVypGMhuqbMQFzBdXuCHRIQ8Wejmew170rPABK C0lxTutWugeBkeGv/ACEvMbdE2wWPmMQoMJtjt1aCpPV5w+wnxqcKK145feXNGx9n0ycDm 9LhkGgMOGYVshV4oWyrccz/nF+sXOS9aMZKYXSj4osDs+K13C6oKh/qheZdvCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753115844; a=rsa-sha256; cv=none; b=q3MfmKCWjGD9pEhqekm5wup15L4pYyh9T5vJ145j/if41/a+0+Lx5UPIAwgeMYwLvC+mod VP0SMDsjgTs/vA5O6wGlact4s0XCS+8UrhXSXu5zYxxQkRI70/ywiyEtFbXNXwt1UA0FN/ +xdkUdnfy/rSjbzbF+h4U7N4zHwBUy7o0nfVyzYMLvGwfETgXN7kfwdhzeLZPGbs4zYeRK JkMzvyndnC6jMsAOVd+QHNusygh8ynEH72HMNHvJyiQ+p2bGFssmxHsZnZJx2prUQoJ/io E7tz+Ew0Sslpk8rmLvrIoyWbWnjFeBipGi95muGDsndmiF9BLlqfnJxlbxTAzg== Received: from [IPV6:2601:5c0:4200:b830:5995:2e3f:98fd:7c0c] (unknown [IPv6:2601:5c0:4200:b830:5995:2e3f:98fd:7c0c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4bm5fD1LZ3zG0d; Mon, 21 Jul 2025 16:37:24 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <35003f37-9e55-4a92-ae6e-58b35409700b@FreeBSD.org> Date: Mon, 21 Jul 2025 12:37:23 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: cc21f6e53f43 - main - amd64: Make a comment less confusing Content-Language: en-US To: Mark Johnston , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202507211458.56LEwD36053783@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202507211458.56LEwD36053783@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/21/25 10:58, Mark Johnston wrote: > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=cc21f6e53f43f0e4c082222460d90ea581f3e2d6 > > commit cc21f6e53f43f0e4c082222460d90ea581f3e2d6 > Author: Mark Johnston > AuthorDate: 2025-07-21 13:33:31 +0000 > Commit: Mark Johnston > CommitDate: 2025-07-21 14:57:58 +0000 > > amd64: Make a comment less confusing > > Also merge two printf()s. No functional change intended. > > Reviewed by: kib > MFC after: 1 week > Differential Revision: https://reviews.freebsd.org/D51452 > --- > sys/amd64/amd64/trap.c | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c > index d9a5f7096a6e..f3469ed5e2bc 100644 > --- a/sys/amd64/amd64/trap.c > +++ b/sys/amd64/amd64/trap.c > @@ -37,7 +37,6 @@ > * SUCH DAMAGE. > */ > > -#include > /* > * AMD64 Trap and System call handling > */ > @@ -898,9 +897,9 @@ trap_diag(struct trapframe *frame, vm_offset_t eva) > printf("\n\nFatal trap %d: %s while in %s mode\n", type, > type < nitems(trap_msg) ? trap_msg[type] : UNKNOWN, > TRAPF_USERMODE(frame) ? "user" : "kernel"); > - /* two separate prints in case of a trap on an unmapped page */ > - printf("cpuid = %d; ", PCPU_GET(cpuid)); > - printf("apic id = %02x\n", PCPU_GET(apic_id)); > + /* Print these separately in case pcpu accesses trap. */ > + printf("cpuid = %d; apic id = %02x\n", PCPU_GET(cpuid), > + PCPU_GET(apic_id)); > if (type == T_PAGEFLT) { > printf("fault virtual address = 0x%lx\n", eva); > printf("fault code = %s %s %s%s%s, %s\n", > @@ -1021,9 +1020,9 @@ dblfault_handler(struct trapframe *frame) > frame->tf_cs, frame->tf_ss, frame->tf_ds, frame->tf_es, > frame->tf_fs, frame->tf_gs, > rdmsr(MSR_FSBASE), rdmsr(MSR_GSBASE), rdmsr(MSR_KGSBASE)); > - /* two separate prints in case of a trap on an unmapped page */ > - printf("cpuid = %d; ", PCPU_GET(cpuid)); > - printf("apic id = %02x\n", PCPU_GET(apic_id)); > + /* Print these separately in case pcpu accesses trap. */ > + printf("cpuid = %d; apic id = %02x\n", PCPU_GET(cpuid), > + PCPU_GET(apic_id)); > panic("double fault"); Eh, if any of the accesses fault you don't get any of the printf, so once you've merged these, the comment is wrong and should just be removed. FWIW, pre-5.0 (maybe pre-4.0?) per-CPU data on i386 used a fixed virtual address that was mapped to different backing pages on each CPU instead of %gs which is why the comment was probably worded that way originally. (This meant, btw, that each CPU had its own set of top-level kernel page table and that cpu_switch had to munge the kernel-half of the top-level page table of a process, which precluded multiple threads in a process.) -- John Baldwin From nobody Mon Jul 21 16:43:06 2025 X-Original-To: dev-commits-src-all@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 4bm5n03RXQz62rng; Mon, 21 Jul 2025 16:43:16 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qk1-x735.google.com (mail-qk1-x735.google.com [IPv6:2607:f8b0:4864:20::735]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm5mz4tXCz3CQs; Mon, 21 Jul 2025 16:43:15 +0000 (UTC) (envelope-from markjdb@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-qk1-x735.google.com with SMTP id af79cd13be357-7e34607e575so798360485a.2; Mon, 21 Jul 2025 09:43:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1753116189; x=1753720989; darn=freebsd.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:from:to:cc:subject:date:message-id :reply-to; bh=emNv9LFRtY0W7hlS9Aa4r2n88HqWOpn+2HiOtMZN2NQ=; b=CWYbtbjDJHL0c1CJl94wQv3E49RueBnoEb5SPJeSwFiloKQJ5Riv4z1Ip8V4FtvIhr ph9X0oxiLaydA7vyOu7wTnm6pNEEKK1ajWv4sOybi9uyr6LQfV3PHG+XzJeOTTKv73fT cJDYpAN3utNN9TGXUkTXy1FgslHYqWcI8ZBK+DoCkBDetsOfEgRNolqULYNriXni0GNS 5vRM4TnEZpxG2HvPYtQUL6BLkSV1FVsFxJC+/6KgIvBbdWXWMFV9gBX+HdiQv5C0uonC +xySierY6mOQO1oQdEUrsMLdsqwB3c6O4HAJvUXCgfaumH5BMtqekuhSFMWjrnkLsZ+s lzBQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753116189; x=1753720989; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=emNv9LFRtY0W7hlS9Aa4r2n88HqWOpn+2HiOtMZN2NQ=; b=PpPr9IF8FfnR6MqyNx2W6rbJ99goCDOMua6iY8sBdDig3mc0eem8v61+q02sD1hBvL In4Hko6bhhDPY22VQ17bdcXLV7tOpw9MXG350dqPRF03G5Rn4O5k5wGB4/5lNbIRNsGF iV8jTL5vhEt7B7j17HNbi/y56ce+U9crq9XXDTO7vkvJDT6ZovD6JgtK5m3TOexeAA4B Vd15SqwFo9BPo3UWkwTg5PB0bzgJO4Whizbdt5P8PWL7qvKtDWsvYr8SHK8MnECLzxpM NMnbJRSWcNdVTGiuX8wLuui06gtv3B90cMgJzzXxp5vB5VZvCkOeskfK7UVXJy7dK5us O0oA== X-Forwarded-Encrypted: i=1; AJvYcCVPGWYqa++EXiB+OhOiOhlGqbjdzzCw032CtLdr1lV21NoyB/I46A2/P3NnXNIXuAtVFLJuQcZKDPRbNLNvsQ3jCWB2@freebsd.org, AJvYcCWlxuXwSE+eiKuSsL8AYstdgf9slBWuUP7Hyng68c3ZZGxb+x8RQPgvoBJrxriENiHxMG4H3AyVwXOC/p6klpC0iVNGdqE=@freebsd.org X-Gm-Message-State: AOJu0YytDU1jyrCRZI8i1bKPqmlT0mYPqNbqrQSpW4T0GPNjgYtPLUIG s5EHVTBKT3eD7PZUMPKoekZwuyZ3cV18WDeOu2nHZ/7ICQUFFTe0zAlu6Fipowz1 X-Gm-Gg: ASbGnctstmIkJRffRmTn+okDzyWee+/4xkeO6gDPq8+gBw8P4Vx0rdlW/iti58fMPVh M2mO9t5wVebZ0xtw/h3FaNi0XEKzz/civG70Bde/OPKIo+JGIp/5ZDN17Q3U+QZJrKxA1vz3uau +FNz7tufFO6h633iPyrmGkWHR3HZ6AhjEF1WYS9GVRQE4xhM6IG7+KgxofagOFQA78pWMaG9Hl0 T270K4Q4AdB7JVKQa7r7XvFFLEbg55eSasgLewSa/hwcY1kb7eEcGQJKsgXEXtHXbD7YCk8HpYe b0aZXR55GAZV8L+b3l/kG3ptgYrrQSShFzhmK/Jft+MH0xMrmL3pPDXBpDoio5n4Irrz9TshL2t IQTCqbbuBfeHDYHchfA4Jb704iAkMak24Yn8M X-Google-Smtp-Source: AGHT+IHGC5rriCD7DpMnCUCzI5Safgch4xj08id3Snk9BPAYEc+KZLZxDUB2ES2/mpywSsPTLaygqg== X-Received: by 2002:a05:620a:4623:b0:7d3:9260:6dc7 with SMTP id af79cd13be357-7e356a24654mr1878485385a.6.1753116189081; Mon, 21 Jul 2025 09:43:09 -0700 (PDT) Received: from nuc (192-0-220-237.cpe.teksavvy.com. [192.0.220.237]) by smtp.gmail.com with ESMTPSA id af79cd13be357-7e356b2a9a6sm444087085a.8.2025.07.21.09.43.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Jul 2025 09:43:08 -0700 (PDT) Date: Mon, 21 Jul 2025 12:43:06 -0400 From: Mark Johnston To: John Baldwin Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: cc21f6e53f43 - main - amd64: Make a comment less confusing Message-ID: References: <202507211458.56LEwD36053783@gitrepo.freebsd.org> <35003f37-9e55-4a92-ae6e-58b35409700b@FreeBSD.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <35003f37-9e55-4a92-ae6e-58b35409700b@FreeBSD.org> X-Rspamd-Queue-Id: 4bm5mz4tXCz3CQs 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:15169, ipnet:2607:f8b0::/32, country:US] On Mon, Jul 21, 2025 at 12:37:23PM -0400, John Baldwin wrote: > On 7/21/25 10:58, Mark Johnston wrote: > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=cc21f6e53f43f0e4c082222460d90ea581f3e2d6 > > > > commit cc21f6e53f43f0e4c082222460d90ea581f3e2d6 > > Author: Mark Johnston > > AuthorDate: 2025-07-21 13:33:31 +0000 > > Commit: Mark Johnston > > CommitDate: 2025-07-21 14:57:58 +0000 > > > > amd64: Make a comment less confusing > > Also merge two printf()s. No functional change intended. > > Reviewed by: kib > > MFC after: 1 week > > Differential Revision: https://reviews.freebsd.org/D51452 > > --- > > sys/amd64/amd64/trap.c | 13 ++++++------- > > 1 file changed, 6 insertions(+), 7 deletions(-) > > > > diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c > > index d9a5f7096a6e..f3469ed5e2bc 100644 > > --- a/sys/amd64/amd64/trap.c > > +++ b/sys/amd64/amd64/trap.c > > @@ -37,7 +37,6 @@ > > * SUCH DAMAGE. > > */ > > -#include > > /* > > * AMD64 Trap and System call handling > > */ > > @@ -898,9 +897,9 @@ trap_diag(struct trapframe *frame, vm_offset_t eva) > > printf("\n\nFatal trap %d: %s while in %s mode\n", type, > > type < nitems(trap_msg) ? trap_msg[type] : UNKNOWN, > > TRAPF_USERMODE(frame) ? "user" : "kernel"); > > - /* two separate prints in case of a trap on an unmapped page */ > > - printf("cpuid = %d; ", PCPU_GET(cpuid)); > > - printf("apic id = %02x\n", PCPU_GET(apic_id)); > > + /* Print these separately in case pcpu accesses trap. */ > > + printf("cpuid = %d; apic id = %02x\n", PCPU_GET(cpuid), > > + PCPU_GET(apic_id)); > > if (type == T_PAGEFLT) { > > printf("fault virtual address = 0x%lx\n", eva); > > printf("fault code = %s %s %s%s%s, %s\n", > > @@ -1021,9 +1020,9 @@ dblfault_handler(struct trapframe *frame) > > frame->tf_cs, frame->tf_ss, frame->tf_ds, frame->tf_es, > > frame->tf_fs, frame->tf_gs, > > rdmsr(MSR_FSBASE), rdmsr(MSR_GSBASE), rdmsr(MSR_KGSBASE)); > > - /* two separate prints in case of a trap on an unmapped page */ > > - printf("cpuid = %d; ", PCPU_GET(cpuid)); > > - printf("apic id = %02x\n", PCPU_GET(apic_id)); > > + /* Print these separately in case pcpu accesses trap. */ > > + printf("cpuid = %d; apic id = %02x\n", PCPU_GET(cpuid), > > + PCPU_GET(apic_id)); > > panic("double fault"); > > Eh, if any of the accesses fault you don't get any of the printf, Right, but I believe the comment is referring to the preceding printf, which doesn't print any PCPU fields. In what situation would PCPU_GET(apic_id) fault while PCPU_GET(cpuid) succeeds? (Yes, my commit message here should have been better.) > so once > you've merged these, the comment is wrong and should just be removed. > FWIW, pre-5.0 (maybe pre-4.0?) per-CPU data on i386 used a fixed virtual > address that was mapped to different backing pages on each CPU instead of > %gs which is why the comment was probably worded that way originally. > > (This meant, btw, that each CPU had its own set of top-level kernel page > table and that cpu_switch had to munge the kernel-half of the top-level > page table of a process, which precluded multiple threads in a process.) > > -- > John Baldwin > From nobody Mon Jul 21 16:55:36 2025 X-Original-To: dev-commits-src-all@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 4bm63D6Dwhz62sTx; Mon, 21 Jul 2025 16:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm63D5hslz3LvL; Mon, 21 Jul 2025 16:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753116936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kIBj/hnaFzRRxZorI6fX73hVEjp1675UkA4724wAnX4=; b=IdkyvHmP/R41a35oTfJ0SyFM+0HQUH6915k22D0TQmaMR1GRUUEWsF7x1GLb6j1HDQjsri BaQxOIxby3BJduHHV6IetebqkRAzv8gFvKMJ0Her9rWxFfEKQtWkhf50BJE1vv0rWr/UU9 RBpTnbzet4iDrEt299rRPyiP8VVovLSBGuMJ9tkR74KWZphh4Jjh+gsHd6UuMkJPDQM1ek 7OhAcMCPtDnLyA6kN4nRphefR4lMI3vc+TRxx0EoNX8XXDFti/UyPzUzKtpGJG+exjUMHI HGH1EH4DoFCtElCy9HVn8sHqBYTq1txY3C87Metxfi2C3FjRidkpWsOi+Rw14w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753116936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kIBj/hnaFzRRxZorI6fX73hVEjp1675UkA4724wAnX4=; b=AmbgOj8dZefYCOuPu1JbjnBc5uHVdbyOL0oFs2WyyP3YzR1DBqiBui6PGi9b63Mcy0q+Ki N6sIKPFpZ/pbz+jG9zgiXnNj8RK8dPtkOpXMZJK5PL5uayL23UjjbaB48L3dXJLAsc2mA6 fqJyMixWXO67xuLELxL5GizTj10oo0HEkk3oHRPw8/8NgncBZVK1ZlxBzuIb63sjXRtrRL 4hVUX6TsI6OYal8NFeuFnvSVsAs6YcGed0phWvMoS+7HLryO+bY60vFUwPI5qbVSueX8Xc 8xrqLQpuxxCxa2jVRfXXZ3x4DsSlQyA6MM7t0sls1HIckIj72dN7+CtzWEDq6g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753116936; a=rsa-sha256; cv=none; b=sYyScouXzV+n6LLagM7K1gjVYUFPA9wuJKc/1LZtvtzFNm5YFdZZc9lOtwDpGAXs4TRw4O 0FBvAujYkbLVx9FsCkvzGXyTE97w7GAF07OYdzczgs3YUMkvwUNrOabBzy73XyEWodtgcs 2wegZcDtvXCT7C0C+HPGiRIsnk2H3921fv+pqv1ZLutP1A/dq+ITukDgpXNmTewMDB4Yc1 pAv03S97EgL3ottJ//+2GLLyL+2EtkzL0S8bG0HQkqCtI7tMKY774l4Qh91+m875dgcNLM SqFlQcB042YxTZrbrZRlPzokKUwFYje+sQjX+OLSsaOEcgQJri9EpJyp//QXFA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bm63D55n3z15Nk; Mon, 21 Jul 2025 16:55:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56LGtadN079038; Mon, 21 Jul 2025 16:55:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56LGta1Z079035; Mon, 21 Jul 2025 16:55:36 GMT (envelope-from git) Date: Mon, 21 Jul 2025 16:55:36 GMT Message-Id: <202507211655.56LGta1Z079035@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: ffc5ee0f57d5 - main - Merge commit 8ac140f39084 from llvm git (by Younan Zhang): List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ffc5ee0f57d56459df93f4107b9835ae78a546b5 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ffc5ee0f57d56459df93f4107b9835ae78a546b5 commit ffc5ee0f57d56459df93f4107b9835ae78a546b5 Author: Dimitry Andric AuthorDate: 2025-07-21 16:55:23 +0000 Commit: Dimitry Andric CommitDate: 2025-07-21 16:55:23 +0000 Merge commit 8ac140f39084 from llvm git (by Younan Zhang): [Clang][NFCI] Cleanup the fix for default function argument substitution (#104911) (This is one step towards tweaking `getTemplateInstantiationArgs()` as discussed in https://github.com/llvm/llvm-project/pull/102922) We don't always substitute into default arguments while transforming a function parameter. In that case, we would preserve the uninstantiated expression until after, e.g. building up a CXXDefaultArgExpr and instantiate the expression there. For member function instantiation, this algorithm used to cause a problem in that the default argument of an out-of-line member function specialization couldn't get properly instantiated. This is because, in `getTemplateInstantiationArgs()`, we would give up visiting a function's declaration context if the function is a specialization of a member template. For example, ```cpp template struct S { template void f(T = sizeof(T)); }; template <> template void S::f(int) {} ``` The default argument `sizeof(U)` that lexically appears inside the declaration would be copied to the function declaration in the class template specialization `S`, as well as to the function's out-of-line definition. We use template arguments collected from the out-of-line function definition when substituting into the default arguments. We would therefore give up the traversal after the function, resulting in a single-level template argument of the `f` itself. However the default argument here could still reference the template parameters of the primary template, hence the error. In fact, this is similar to constraint checking in some respects: we actually want the "whole" template arguments relative to the primary template, not those relative to the function definition. So this patch adds another flag to indicate `getTemplateInstantiationArgs()` for that. This patch also consolidates the tests for default arguments and removes some unnecessary tests. This fixes a crash or assertion failure while building tests for the devel/hpx port. PR: 288352 MFC after: 3 days --- .../llvm-project/clang/include/clang/Sema/Sema.h | 9 ++++++++- .../clang/lib/Sema/SemaTemplateInstantiate.cpp | 23 ++++++++-------------- .../clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 10 ++++++---- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Sema/Sema.h b/contrib/llvm-project/clang/include/clang/Sema/Sema.h index 7bfdaaae45a9..a59a9342341d 100644 --- a/contrib/llvm-project/clang/include/clang/Sema/Sema.h +++ b/contrib/llvm-project/clang/include/clang/Sema/Sema.h @@ -13052,12 +13052,19 @@ public: /// ForConstraintInstantiation indicates we should continue looking when /// encountering a lambda generic call operator, and continue looking for /// arguments on an enclosing class template. + /// + /// \param SkipForSpecialization when specified, any template specializations + /// in a traversal would be ignored. + /// \param ForDefaultArgumentSubstitution indicates we should continue looking + /// when encountering a specialized member function template, rather than + /// returning immediately. MultiLevelTemplateArgumentList getTemplateInstantiationArgs( const NamedDecl *D, const DeclContext *DC = nullptr, bool Final = false, std::optional> Innermost = std::nullopt, bool RelativeToPrimary = false, const FunctionDecl *Pattern = nullptr, bool ForConstraintInstantiation = false, - bool SkipForSpecialization = false); + bool SkipForSpecialization = false, + bool ForDefaultArgumentSubstitution = false); /// RAII object to handle the state changes required to synthesize /// a function body. diff --git a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp index a09e3be83c45..c2e8ed0c602e 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp @@ -269,7 +269,8 @@ HandleClassTemplateSpec(const ClassTemplateSpecializationDecl *ClassTemplSpec, Response HandleFunction(Sema &SemaRef, const FunctionDecl *Function, MultiLevelTemplateArgumentList &Result, const FunctionDecl *Pattern, bool RelativeToPrimary, - bool ForConstraintInstantiation) { + bool ForConstraintInstantiation, + bool ForDefaultArgumentSubstitution) { // Add template arguments from a function template specialization. if (!RelativeToPrimary && Function->getTemplateSpecializationKindForInstantiation() == @@ -299,7 +300,8 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl *Function, // If this function was instantiated from a specialized member that is // a function template, we're done. assert(Function->getPrimaryTemplate() && "No function template?"); - if (Function->getPrimaryTemplate()->isMemberSpecialization()) + if (!ForDefaultArgumentSubstitution && + Function->getPrimaryTemplate()->isMemberSpecialization()) return Response::Done(); // If this function is a generic lambda specialization, we are done. @@ -465,7 +467,7 @@ MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs( const NamedDecl *ND, const DeclContext *DC, bool Final, std::optional> Innermost, bool RelativeToPrimary, const FunctionDecl *Pattern, bool ForConstraintInstantiation, - bool SkipForSpecialization) { + bool SkipForSpecialization, bool ForDefaultArgumentSubstitution) { assert((ND || DC) && "Can't find arguments for a decl if one isn't provided"); // Accumulate the set of template argument lists in this structure. MultiLevelTemplateArgumentList Result; @@ -507,7 +509,8 @@ MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs( SkipForSpecialization); } else if (const auto *Function = dyn_cast(CurDecl)) { R = HandleFunction(*this, Function, Result, Pattern, RelativeToPrimary, - ForConstraintInstantiation); + ForConstraintInstantiation, + ForDefaultArgumentSubstitution); } else if (const auto *Rec = dyn_cast(CurDecl)) { R = HandleRecordDecl(*this, Rec, Result, Context, ForConstraintInstantiation); @@ -3231,7 +3234,6 @@ bool Sema::SubstDefaultArgument( // default argument expression appears. ContextRAII SavedContext(*this, FD); std::unique_ptr LIS; - MultiLevelTemplateArgumentList NewTemplateArgs = TemplateArgs; if (ForCallExpr) { // When instantiating a default argument due to use in a call expression, @@ -3244,19 +3246,10 @@ bool Sema::SubstDefaultArgument( /*ForDefinition*/ false); if (addInstantiatedParametersToScope(FD, PatternFD, *LIS, TemplateArgs)) return true; - const FunctionTemplateDecl *PrimaryTemplate = FD->getPrimaryTemplate(); - if (PrimaryTemplate && PrimaryTemplate->isOutOfLine()) { - TemplateArgumentList *CurrentTemplateArgumentList = - TemplateArgumentList::CreateCopy(getASTContext(), - TemplateArgs.getInnermost()); - NewTemplateArgs = getTemplateInstantiationArgs( - FD, FD->getDeclContext(), /*Final=*/false, - CurrentTemplateArgumentList->asArray(), /*RelativeToPrimary=*/true); - } } runWithSufficientStackSpace(Loc, [&] { - Result = SubstInitializer(PatternExpr, NewTemplateArgs, + Result = SubstInitializer(PatternExpr, TemplateArgs, /*DirectInit*/ false); }); } diff --git a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index a12d2eff1d2c..614e6ea12541 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -4659,10 +4659,12 @@ bool Sema::InstantiateDefaultArgument(SourceLocation CallLoc, FunctionDecl *FD, // // template // A Foo(int a = A::FooImpl()); - MultiLevelTemplateArgumentList TemplateArgs = - getTemplateInstantiationArgs(FD, FD->getLexicalDeclContext(), - /*Final=*/false, /*Innermost=*/std::nullopt, - /*RelativeToPrimary=*/true); + MultiLevelTemplateArgumentList TemplateArgs = getTemplateInstantiationArgs( + FD, FD->getLexicalDeclContext(), + /*Final=*/false, /*Innermost=*/std::nullopt, + /*RelativeToPrimary=*/true, /*Pattern=*/nullptr, + /*ForConstraintInstantiation=*/false, /*SkipForSpecialization=*/false, + /*ForDefaultArgumentSubstitution=*/true); if (SubstDefaultArgument(CallLoc, Param, TemplateArgs, /*ForCallExpr*/ true)) return true; From nobody Mon Jul 21 17:05:19 2025 X-Original-To: dev-commits-src-all@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 4bm6GT0drlz62snP; Mon, 21 Jul 2025 17:05:21 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm6GS4S7vz3SgQ; Mon, 21 Jul 2025 17:05:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753117520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G5j32OQqivY2D3Bfgag5Si0RVszcYGi+IJ0S8wfFV+k=; b=EEPLbCXPnSYMc44pV9naCDYxC5XayNMe50HiV8mVMeOkZAqVKwV0qf+t6rXAt5TRtWAVe7 mZ5c3ttrZO5LdXV9iDyqkQAIak725YJLIXSPoqJH1DcmncT1jV0L9TATVwWWh32+pgIH+j I7fgnq0bR6Z2HxeMpCfW1pcQ7v+LO1KNVMVmc4tuI1R3krvPZlUK4KrIeVOzjNX4Quj7N5 nyPjT+4hVTg07CTqEN0Je7szfD+7rg758rrbKjIdxHXX8BBOas2hEkSRbwQx2mnuiE5qCh lbUj00gLqw2rJwBT3UxMO5qLIdAlWY/DDSK/mSDXQSJNRP+VIx3l96igeOVDJw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753117520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=G5j32OQqivY2D3Bfgag5Si0RVszcYGi+IJ0S8wfFV+k=; b=G0/N1SqGjD74IztKPsKBk4XibXBLGiC/ptCQ7BdCo/w31CF+/VoXTdtDO6vg1JHv58UE4V dynYeWiL+nX7NBKbici58PyDbMmJRPzMBCqtIWZqjCw4TbQwo1jFNRqdm6YS8BOBLml6fi USPysi1lmRM55pXdAnZDQfmhH090WVeF5/GJPXSYVmTAnKXjFLSBKCZpuRtcEGwJo/Ft3X Uq1qthBpvzQdetHP1QUCAnqEm9p645xysaXpbRe1Bxt4oqfjCb7r7Hf2GrO0I9jyO7RM/x 8sgZe+Pdhcl7ORzfoqnHSWAy+hNq9NkMtvVgRpPRtY1AhnpFgSAnMrfkSvDJYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753117520; a=rsa-sha256; cv=none; b=b2diOntCEnstCNHR3Z0pDBMGaPTmlvZGRaoPYttVLifIH6mMz07hJoXCYXRhO4R0zzBcrS hjUTcPWKSJP4AUhxsv9/HV7mPy8d/zvvQg0STmm/akBtgnpavJiAnT30UhbleydwyGvHXt NqCcc3EV4R6yNAbe/KydsUWHXwQ3jt1YwAn3UOOAVHFQyv3NJ/lfFnUXbv2U2eoWrEi5mG MStHqCCkFq+7UtfPzGryRk7VoP8x0+ylebzs4wHoNgk/CdluBYMfBBWN2iwcB7WSbLxUSc doRd9yKV1/8z6PrjUdcu7Zfr5k6vhhVIZ0LL+wCRXRlSS7hYeknjQETstlKFbA== Received: from [IPV6:2601:5c0:4200:b830:5995:2e3f:98fd:7c0c] (unknown [IPv6:2601:5c0:4200:b830:5995:2e3f:98fd:7c0c]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4bm6GS2P0HzGby; Mon, 21 Jul 2025 17:05:20 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <027a49e1-dbcb-4b2b-ae8a-938616f43cf2@FreeBSD.org> Date: Mon, 21 Jul 2025 13:05:19 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: cc21f6e53f43 - main - amd64: Make a comment less confusing Content-Language: en-US To: Mark Johnston Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202507211458.56LEwD36053783@gitrepo.freebsd.org> <35003f37-9e55-4a92-ae6e-58b35409700b@FreeBSD.org> From: John Baldwin In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/21/25 12:43, Mark Johnston wrote: > On Mon, Jul 21, 2025 at 12:37:23PM -0400, John Baldwin wrote: >> On 7/21/25 10:58, Mark Johnston wrote: >>> The branch main has been updated by markj: >>> >>> URL: https://cgit.FreeBSD.org/src/commit/?id=cc21f6e53f43f0e4c082222460d90ea581f3e2d6 >>> >>> commit cc21f6e53f43f0e4c082222460d90ea581f3e2d6 >>> Author: Mark Johnston >>> AuthorDate: 2025-07-21 13:33:31 +0000 >>> Commit: Mark Johnston >>> CommitDate: 2025-07-21 14:57:58 +0000 >>> >>> amd64: Make a comment less confusing >>> Also merge two printf()s. No functional change intended. >>> Reviewed by: kib >>> MFC after: 1 week >>> Differential Revision: https://reviews.freebsd.org/D51452 >>> --- >>> sys/amd64/amd64/trap.c | 13 ++++++------- >>> 1 file changed, 6 insertions(+), 7 deletions(-) >>> >>> diff --git a/sys/amd64/amd64/trap.c b/sys/amd64/amd64/trap.c >>> index d9a5f7096a6e..f3469ed5e2bc 100644 >>> --- a/sys/amd64/amd64/trap.c >>> +++ b/sys/amd64/amd64/trap.c >>> @@ -37,7 +37,6 @@ >>> * SUCH DAMAGE. >>> */ >>> -#include >>> /* >>> * AMD64 Trap and System call handling >>> */ >>> @@ -898,9 +897,9 @@ trap_diag(struct trapframe *frame, vm_offset_t eva) >>> printf("\n\nFatal trap %d: %s while in %s mode\n", type, >>> type < nitems(trap_msg) ? trap_msg[type] : UNKNOWN, >>> TRAPF_USERMODE(frame) ? "user" : "kernel"); >>> - /* two separate prints in case of a trap on an unmapped page */ >>> - printf("cpuid = %d; ", PCPU_GET(cpuid)); >>> - printf("apic id = %02x\n", PCPU_GET(apic_id)); >>> + /* Print these separately in case pcpu accesses trap. */ >>> + printf("cpuid = %d; apic id = %02x\n", PCPU_GET(cpuid), >>> + PCPU_GET(apic_id)); >>> if (type == T_PAGEFLT) { >>> printf("fault virtual address = 0x%lx\n", eva); >>> printf("fault code = %s %s %s%s%s, %s\n", >>> @@ -1021,9 +1020,9 @@ dblfault_handler(struct trapframe *frame) >>> frame->tf_cs, frame->tf_ss, frame->tf_ds, frame->tf_es, >>> frame->tf_fs, frame->tf_gs, >>> rdmsr(MSR_FSBASE), rdmsr(MSR_GSBASE), rdmsr(MSR_KGSBASE)); >>> - /* two separate prints in case of a trap on an unmapped page */ >>> - printf("cpuid = %d; ", PCPU_GET(cpuid)); >>> - printf("apic id = %02x\n", PCPU_GET(apic_id)); >>> + /* Print these separately in case pcpu accesses trap. */ >>> + printf("cpuid = %d; apic id = %02x\n", PCPU_GET(cpuid), >>> + PCPU_GET(apic_id)); >>> panic("double fault"); >> >> Eh, if any of the accesses fault you don't get any of the printf, > > Right, but I believe the comment is referring to the preceding printf, > which doesn't print any PCPU fields. In what situation would > PCPU_GET(apic_id) fault while PCPU_GET(cpuid) succeeds? > > (Yes, my commit message here should have been better.) Oh, woof. The second printf used to read from the lapic directly instead of per-CPU data. I changed it here: https://svnweb.freebsd.org/base?view=revision&revision=121986 So prior to that each printf was indeed reading from separate pages: #ifdef SMP /* two separate prints in case of a trap on an unmapped page */ printf("cpuid = %d; ", PCPU_GET(cpuid)); printf("lapic.id = %08x\n", lapic.id); #endif The comment used to reference _three_ printfs prior to the SMPng commit: https://svnweb.freebsd.org/base/head/sys/i386/i386/trap.c?r1=65556&r2=65557& The original comment (referencing 3) was added by peter@ here: https://svnweb.freebsd.org/base?view=revision&revision=29128 It certainly seems to only apply to the printfs under #ifdef SMP. Removing the comment has the additional property of fixing the style bug of not having a blank line before the comment that was previously provided by the #ifdef SMP. :) -- John Baldwin From nobody Mon Jul 21 17:15:10 2025 X-Original-To: dev-commits-src-all@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 4bm6Tp6xRcz62tPK; Mon, 21 Jul 2025 17:15: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm6Tp4wyMz3ZR1; Mon, 21 Jul 2025 17:15:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753118110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ozu9Q5i2TwE+JMY+KAZbjK7O2fQZVxL0wy/kt3o1YKE=; b=UEL+d6WAkuPzBjJQUiD0WMojQBVJtX8/1w7LU/mfBzPPHwLkWW3p58MRD4zLn3fck1jxrW +doVQPKXSSoXlGJxZx279qFiYyBlwsmgVNrYQ2SVvBWzPN/+epxVPSZOxT7rrYpCZ9pPd/ aytrRSWQ6ECLlfHbea6awKV5yBJL/gZKhD9nveTZpBgcmgVGXvLEXnbXImN5CqJVJ0Et58 Hm+toOVbY7qrDmkQ0WFwVDRhve6gqsOoY4HicTbyVofquoLrRKLGyaOg4GYwEnUbV9c73H SZSV6AF+v8eyZxhQqCkYKqMFmoR5bZQIDZTOhADH9jb7V0woH5iu37Hpl9WN9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753118110; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ozu9Q5i2TwE+JMY+KAZbjK7O2fQZVxL0wy/kt3o1YKE=; b=J3RUFShtN/NCI4RnK4UiRZkO1UEjHcA2p1nkVSq9fQyZ7sbClNIbPfvTvwLj2bX7Sc2dS5 Lny6xlKlANtZtN3ElK3CdKebubOTssDbGGcm6PBagcsUOo6OoiU/fkQbmmSWt140dtIy9c qXNV4YYC6Q/UqAvtGht5di5rJOamk7c3g/actvsuebEJTyrY/zaQZgeyY7R7g2tnlAtxXC zBLwk4/KyWtWkneSLbB9tXKVWLOH8zLjRrZfw6P3FcTlDC9aVmfMTWmcr6AnkUj1y4cBGA r7DuEboxOQ5pBn45Q4BsqaAm6y4oC22cNxEYW8hWpPhT9ljtaNnbLhbtTIx0ng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753118110; a=rsa-sha256; cv=none; b=cxnX+EPiax3w+bbfupokSGfJ0O3M2OGdDwYprXHBmBZAU6RFhJIxDQDui3x22bxwoxbmWt 1KD1zevhzGn4MRHbtZpx24ILRNr3slqwWB1FJCicidH9hURuc+kCMTnmGOjr45YRkDREUA KOZnmEAiA2YDxW11EmxUtbAvo4TkZ1Qhmrnxm8KusPVVIuAJC+DdsC0NWdvKFad5jLyWXN smeJcY2xOUQvRetNPdKZWR35+9Hzd7lsqhgKOeYm4Gwf67DDNLkx/5RHSpUUBVuGyV1Tm8 YG5+JGTcdil1cT+k25rnXQR0Ia+cZLFQ5qSSo9vHxxonVWvkIdPZM++H4yv/Cg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bm6Tp4Xf2z15fX; Mon, 21 Jul 2025 17:15:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56LHFAne017675; Mon, 21 Jul 2025 17:15:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56LHFAVo017673; Mon, 21 Jul 2025 17:15:10 GMT (envelope-from git) Date: Mon, 21 Jul 2025 17:15:10 GMT Message-Id: <202507211715.56LHFAVo017673@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: "Simon J. Gerraty" Subject: git: cae98cf683dd - main - install: allow ENV in metatags List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: sjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cae98cf683ddd1421f4b66bb6aa7099ca6da94ef Auto-Submitted: auto-generated The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=cae98cf683ddd1421f4b66bb6aa7099ca6da94ef commit cae98cf683ddd1421f4b66bb6aa7099ca6da94ef Author: Simon J. Gerraty AuthorDate: 2025-07-21 17:14:00 +0000 Commit: Simon J. Gerraty CommitDate: 2025-07-21 17:14:00 +0000 install: allow ENV in metatags The metatags file informs install of kernel and modules to load, allow it to also case variables to be set in env. Reviewed by: imp Sponsored by: Juniper Networks, Inc Differential Revision: https://reviews.freebsd.org/D51446 --- stand/common/install.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/stand/common/install.c b/stand/common/install.c index 249eca1648f3..d07c4c6fc620 100644 --- a/stand/common/install.c +++ b/stand/common/install.c @@ -137,7 +137,9 @@ read_metatags(int fd) } *p++ = '\0'; - if (strcmp(tag, "KERNEL") == 0) + if (strncmp(tag, "ENV_", 4) == 0) + setenv(&tag[4], val, 1); + else if (strcmp(tag, "KERNEL") == 0) error = setpath(&inst_kernel, val); else if (strcmp(tag, "MODULES") == 0) error = setmultipath(&inst_modules, val); From nobody Mon Jul 21 19:29:37 2025 X-Original-To: dev-commits-src-all@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 4bm9Sy3Cszz61XXZ; Mon, 21 Jul 2025 19:29:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bm9Sx74GCz49h8; Mon, 21 Jul 2025 19:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753126178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fASn6/aaSq25k2C0+sO8jd9PivHRHWFEjP52Cw2cfMc=; b=MW4LDjHxw739d/XaawabFdaCDUonY2pa7DEw3X8hiksuXOdLd2YFehangWV/7sjkhv7UuD Lhd8oDPPe03hTq5WOyFKY7a0KBZuh6IgiugINLQGbkx6xU/FktQKysl0gIiTZ45lGgzqkf iobzg2Q4Q7Jt5kuSeLcOZ+1IJ/806VG8h3LIP5LrAvjCtfvYRrqzjlYnIxuvwVV00C3TSs 43LmLU3YGQI85b7kul6ExtGhEMz0KChPtOnlKfbGtzP/pdCPm/FmAz4EJZ7B4jRuFqcfIF BarqTLdYud4lPITRAkjtqtAOqCATzuijpMhuReqTMUZB0Pt1SA5t1gantvkPJg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753126178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fASn6/aaSq25k2C0+sO8jd9PivHRHWFEjP52Cw2cfMc=; b=KE1LhExerLMmCMsKUWxSuVDGwDYduuApq1BYUP2hFSm45kOS120ip9BIVau6oGiqi1j9Fq W3VAboy33W05R58m/a/+QS6BIdTaZ/m9nM5qFnYgmP55PT9YaoYeX2B8r+DM+28oRqllX4 NUTHcbsuso8iPRrUNw/dD+BUwCu8zvqaBR+aUdeYzqUtu89qBBIfguATe099AUSOwPJr4A vTmRUtmWf17Df35WJkmfe4kOE1GKnCnpeYpVDCvyIFiUXW/kcXE9jKiu0tJwnqW48TGqnX DbliWeJMCzY8obm4FlcsTIeD5uhyKROgSB/CopPOJiaHO2Wc6ZHKgxL4aFOzHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753126178; a=rsa-sha256; cv=none; b=MpkoKHkBnLmPRZlwYrtcBbQNA3yEeS8XuNM+Q36KZYm5WQ99KdLhvp2Uxauj6UjBWqOAAP mD/uRYBHU8WqFUhXfpRliO5CqMZ/CW+3IS5LivuFKgBfyvw5aNBhUvSN+r3xGg3/E2RFe2 6jS2b7ZJWxlxv4VY3OEBtEmbZXcPXxvBwz/rnZmtZRe6edWAEPC6Qae9F7DVGiHH+sH78X 2nxGXPg+u8ud3jeOdiXBJsFxkCPLuKzqReg0W0Y8Oz5PkAvhhDlp6nw59BY8vGMu/IsPGx 2kolAXI6u20tThI474sffXpy+JGcz2VZ4+HbleQYyxIWC1W9ErrXe869ShYOTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bm9Sx6ZWmz19Q9; Mon, 21 Jul 2025 19:29:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56LJTbmq062529; Mon, 21 Jul 2025 19:29:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56LJTbUQ062526; Mon, 21 Jul 2025 19:29:37 GMT (envelope-from git) Date: Mon, 21 Jul 2025 19:29:37 GMT Message-Id: <202507211929.56LJTbUQ062526@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: cc413e2c04f0 - main - bsdinstall: Always install FreeBSD-base.conf if using pkgbase List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: cc413e2c04f0b1456fd4636d33dedd2e01088f80 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cc413e2c04f0b1456fd4636d33dedd2e01088f80 commit cc413e2c04f0b1456fd4636d33dedd2e01088f80 Author: Isaac Freund AuthorDate: 2025-07-01 10:09:21 +0000 Commit: Ed Maste CommitDate: 2025-07-21 19:29:04 +0000 bsdinstall: Always install FreeBSD-base.conf if using pkgbase Currently bsdinstall does not install FreeBSD-base.conf when performing an offline pkgbase installation. This commit fixes that. PR: 287821 Reviewed by: emaste Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51101 --- usr.sbin/bsdinstall/scripts/pkgbase.in | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/pkgbase.in b/usr.sbin/bsdinstall/scripts/pkgbase.in index 1ff93afe817b..cf8e84de6923 100755 --- a/usr.sbin/bsdinstall/scripts/pkgbase.in +++ b/usr.sbin/bsdinstall/scripts/pkgbase.in @@ -234,12 +234,17 @@ local function pkgbase() local chroot = assert(os.getenv("BSDINSTALL_CHROOT")) assert(os.execute("mkdir -p " .. chroot)) + -- Always install the default FreeBSD-base.conf file to the chroot, even + -- if we don't actually fetch the packages from the repository specified + -- there (e.g. because we are performing an offline installation). + local chroot_repos_dir = chroot .. "/usr/local/etc/pkg/repos/" + assert(os.execute("mkdir -p " .. chroot_repos_dir)) + assert(os.execute("cp /usr/share/bsdinstall/FreeBSD-base.conf " .. + chroot_repos_dir)) + local repos_dir = os.getenv("BSDINSTALL_PKG_REPOS_DIR") if not repos_dir then - repos_dir = chroot .. "/usr/local/etc/pkg/repos/" - assert(os.execute("mkdir -p " .. repos_dir)) - assert(os.execute("cp /usr/share/bsdinstall/FreeBSD-base.conf " .. repos_dir)) - + repos_dir = chroot_repos_dir -- Since pkg always interprets fingerprints paths as relative to -- the --rootdir we must copy the key from the host. assert(os.execute("mkdir -p " .. chroot .. "/usr/share/keys")) From nobody Tue Jul 22 04:00:50 2025 X-Original-To: dev-commits-src-all@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 4bmNpq2HxVz62NVd; Tue, 22 Jul 2025 04:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmNpq1lKQz3cCh; Tue, 22 Jul 2025 04:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753156851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WFMVTLPDkXmpi1YHNEL18rudzZ++MslieAh5KOtu/wk=; b=NkqaLyNz6UZuXLDgCB+ASmklPe+kaJzQbTWt3JdNSHlZs6oibLfIchd7OXcef78PNb47af ig4T1HhotDsWmV9UbdwYOLukoGJnpo/fMyuclaH13idIlEHdxe47FTHpY/3HPMAP4Bip0w WEvz2AW/BWgDKrsN9KMTdZo7NsjR6smcbmWgCfHTFuM2h96Q8lBJSl2YGJHBsPafCGh0nK 9Vf4VUOIaBE0hxSg2tMi5KghIWlrmi32d0l9qxISb7wlE/fl/jch//YML/vbbenrUV8YDL qtEuo+Hw4eGNJ1t3m6f4w9Gtn5na9NgioHrC2oMzgBhSsDpshsis1BzHoWK/fA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753156851; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WFMVTLPDkXmpi1YHNEL18rudzZ++MslieAh5KOtu/wk=; b=ucMoLB+wJFOQmFfBed21On2o5hyL7nY0wGq11yJI0KZzbyXUflcBtip+IB4NGa6+TIaPsc RqIbT2kpwLkkFQiYfqkf2kA4pOAx2J7fvSivAIURP2WZwHBzHYqmOhK3wFFnb0t7z39c2v JV7N2wDB+uZBzB8hDis1P/K/r58PaWJE8in8Z8NhrKaOJg3O5rkbc9d80V+Sj3Cf14QN/B FZFGvBlKTFvud98iNIcplAnnNlrpcanx1wjuDOnWuSDsSaMpA2isBPZ/pX38d6hnBF9Po+ 3yC2aTiWUvV0FX3BMq7+8firAmcZGlETVFuZqRCp/Drfci5w5nZpUyzhMxq8fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753156851; a=rsa-sha256; cv=none; b=vs1MbdFc+rsPADVf++SH6Q+ZKzul8DeQFisAjI2O8LN31RbDUyRGH5q0tDOTSC5yiAxWXm 6XEH7/RulLBqemxGjb4lLwhVy0xQy3sx/kuvV9Y8ht2+jw3OhkhnnPSAXUKuLVOaXXKarV QitmjRSANDXIWsE5kIaB8ztD6A+Kq70A2w6P0f2rufMdkpK7JoTcMCAW6M+F7u2xCvw1To n0AbMS1h7f9+8ME/yb6kD5KNez8Hq1STJAcv1oVaAx+hO1sTtdgEo00diqEuVDPad5zyKE 2BRL5bYqAXLRn2APunJ3ykXLAc+cD3xT7eiL/yfph9AOuLxAmu+/FTfNUUinRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmNpq0qflz1Q7Z; Tue, 22 Jul 2025 04:00:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56M40oVV032409; Tue, 22 Jul 2025 04:00:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56M40o5W032406; Tue, 22 Jul 2025 04:00:50 GMT (envelope-from git) Date: Tue, 22 Jul 2025 04:00:50 GMT Message-Id: <202507220400.56M40o5W032406@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 35b2e888ef0f - main - nvme: Finish removing failed request queue List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 35b2e888ef0f69ebfdca37f3741846f1ed82f657 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=35b2e888ef0f69ebfdca37f3741846f1ed82f657 commit 35b2e888ef0f69ebfdca37f3741846f1ed82f657 Author: Warner Losh AuthorDate: 2025-07-18 20:52:36 +0000 Commit: Warner Losh CommitDate: 2025-07-22 04:00:33 +0000 nvme: Finish removing failed request queue Remove the failed request queue, it's been unused since bc85cd303c44 when we removed the last function that referenced it. Also adjust the comment for the reset taskqueue. We still start 2 threads. Sponsored by: Netflix --- sys/dev/nvme/nvme_ctrlr.c | 10 ++-------- sys/dev/nvme/nvme_private.h | 2 -- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index 73a7cee4aad0..c86316337e93 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -1574,13 +1574,8 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev) /* * Create 2 threads for the taskqueue. The reset thread will block when * it detects that the controller has failed until all I/O has been - * failed up the stack. The fail_req task needs to be able to run in - * this case to finish the request failure for some cases. - * - * We could partially solve this race by draining the failed requeust - * queue before proceding to free the sim, though nothing would stop - * new I/O from coming in after we do that drain, but before we reach - * cam_sim_free, so this big hammer is used instead. + * failed up the stack. The second thread used to be for failing + * requests. */ ctrlr->taskqueue = taskqueue_create("nvme_taskq", M_WAITOK, taskqueue_thread_enqueue, &ctrlr->taskqueue); @@ -1590,7 +1585,6 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev) ctrlr->is_initialized = false; ctrlr->notification_sent = 0; TASK_INIT(&ctrlr->reset_task, 0, nvme_ctrlr_reset_task, ctrlr); - STAILQ_INIT(&ctrlr->fail_req); ctrlr->is_failed = false; make_dev_args_init(&md_args); diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index 949e69ec9290..0340b13b7de5 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -307,8 +307,6 @@ struct nvme_controller { bool isr_warned; bool is_initialized; - STAILQ_HEAD(, nvme_request) fail_req; - /* Host Memory Buffer */ int hmb_nchunks; size_t hmb_chunk; From nobody Tue Jul 22 04:00:52 2025 X-Original-To: dev-commits-src-all@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 4bmNpr3ky2z62NXL; Tue, 22 Jul 2025 04:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmNpr1Jnwz3cCn; Tue, 22 Jul 2025 04:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753156852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sSSRVs7WQD1tvoqHvxiKZZOrLLzEKFYBQbGozbkWrYg=; b=x39mG+DdfrnQpINrOVBi/krvtwKQ1d+vpSkOjbK3WjWj3cr7jC31TfYyCcLFytgWSE4voN oukqaOHTe4ee1JxOGc2T+m8fkFdTkTQo1hAjLZcSUGy0pmzrUa7eicMXwXzr+fez6epVpG Fm1J+Ae1mDxMrvLmIy120dl/pejbcSZj0wq8RVV5Vr/q3h4p1P4F5OCmnxV+eF7/2coizC +Z7SAv+cODtuhPvGDp9HLzEzhv1H74a5glXawEHUo58MUU1FYuvhH/CjOVpTi+MqjS28X8 pfTl26JrBngoZb1ZRmK59lI9TC8nxszRGCT0L8AoNVPooXvaWnrXQK0Eeat8ng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753156852; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sSSRVs7WQD1tvoqHvxiKZZOrLLzEKFYBQbGozbkWrYg=; b=NTaFVdrqZ3ddLmGUijrKFfb9IxIBkK1DhT/ACwAhM01VU9O63JEgFKPtLkGYVZSxLSwOqH xJaO60IkBsuOmpQsJaYM7zNYRJv7SYeCDKS9jD9MSIma4OVjcGy80OAxT1r8OL6x4lxcXa 4sh9JNVjHbHo5fht1EJF6YVJNW/D/RN/O1slbq12BiE2gtVC5ydjauaAXaWT6SZZOA9JhN VBj8JkyEtN6Pb4eFgCut/YPaICWNew/3yY2XmpZ+AldplgKwRyRNsQ4ZIi8Amemljniixr luXy3MSEO11DRV1A4akD+85mdvQpqqAj51vIUNfktCw4jyvyEBrv3shI68PJFQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753156852; a=rsa-sha256; cv=none; b=nDU8dT6y9ox4WPsuju42VGfFivJU+X5ixsQJholvdJIbK+JWkWIxMFZeJTucp4V2o7V9ot Q6GKPuoOPCAwumsQ29Tqvhwya6/bFJXFw0B7dVpk0rzoHpHACBZPr6w0+j6ivmxpwLPxb+ z3QUy+Ni/Uef/gsoXRyFEjB6ICO0XuSk5BTklKBQtTHSVdZOd5ig/YDGnG9e0pGt/sqzY+ EBvFJv/Bh/RXIJQUSLWjjZC22/u9FQZoVN3zP6r5hxC0AXpbe5s4olQ2nxHgLFjOoerIvN xuUk8b1/aABPNrX+WSH1RN45ZmlGFBIF6fmeyze2XQYPhUyHV39Vc0ebeX0FOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmNpr0vBsz1QMD; Tue, 22 Jul 2025 04:00:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56M40q43032444; Tue, 22 Jul 2025 04:00:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56M40qpk032441; Tue, 22 Jul 2025 04:00:52 GMT (envelope-from git) Date: Tue, 22 Jul 2025 04:00:52 GMT Message-Id: <202507220400.56M40qpk032441@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b21e67875bf0 - main - nvme: Move AER processing into a task thread List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: b21e67875bf0c4b1e7933090b80307abb24b7d03 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b21e67875bf0c4b1e7933090b80307abb24b7d03 commit b21e67875bf0c4b1e7933090b80307abb24b7d03 Author: Warner Losh AuthorDate: 2025-07-18 22:17:35 +0000 Commit: Warner Losh CommitDate: 2025-07-22 04:00:33 +0000 nvme: Move AER processing into a task thread Move the AER processing into the taskqueue thread. We do memory allocations and such burried deep in things we call, so this just makes all that simpler and doesn't stall the completion thread. It fixes a few panics if you get a reliability failure from the drive at the wrong time. Sponsored by: Netflix MFC After: 2 weeks --- sys/dev/nvme/nvme_ctrlr.c | 289 +++++++++++++++++++++++++------------------- sys/dev/nvme/nvme_private.h | 2 + 2 files changed, 170 insertions(+), 121 deletions(-) diff --git a/sys/dev/nvme/nvme_ctrlr.c b/sys/dev/nvme/nvme_ctrlr.c index c86316337e93..fd7f00ced14b 100644 --- a/sys/dev/nvme/nvme_ctrlr.c +++ b/sys/dev/nvme/nvme_ctrlr.c @@ -48,7 +48,7 @@ #define B4_CHK_RDY_DELAY_MS 2300 /* work around controller bug */ static void nvme_ctrlr_construct_and_submit_aer(struct nvme_controller *ctrlr, - struct nvme_async_event_request *aer); + struct nvme_async_event_request *aer); static void nvme_ctrlr_barrier(struct nvme_controller *ctrlr, int flags) @@ -679,96 +679,6 @@ nvme_ctrlr_log_critical_warnings(struct nvme_controller *ctrlr, nvme_ctrlr_devctl(ctrlr, "critical", "SMART_ERROR", "state=0x%02x", state); } -static void -nvme_ctrlr_async_event_log_page_cb(void *arg, const struct nvme_completion *cpl) -{ - struct nvme_async_event_request *aer = arg; - struct nvme_health_information_page *health_info; - struct nvme_ns_list *nsl; - struct nvme_error_information_entry *err; - int i; - - /* - * If the log page fetch for some reason completed with an error, - * don't pass log page data to the consumers. In practice, this case - * should never happen. - */ - if (nvme_completion_is_error(cpl)) - nvme_notify_async_consumers(aer->ctrlr, &aer->cpl, - aer->log_page_id, NULL, 0); - else { - /* Convert data to host endian */ - switch (aer->log_page_id) { - case NVME_LOG_ERROR: - err = (struct nvme_error_information_entry *)aer->log_page_buffer; - for (i = 0; i < (aer->ctrlr->cdata.elpe + 1); i++) - nvme_error_information_entry_swapbytes(err++); - break; - case NVME_LOG_HEALTH_INFORMATION: - nvme_health_information_page_swapbytes( - (struct nvme_health_information_page *)aer->log_page_buffer); - break; - case NVME_LOG_CHANGED_NAMESPACE: - nvme_ns_list_swapbytes( - (struct nvme_ns_list *)aer->log_page_buffer); - break; - case NVME_LOG_COMMAND_EFFECT: - nvme_command_effects_page_swapbytes( - (struct nvme_command_effects_page *)aer->log_page_buffer); - break; - case NVME_LOG_RES_NOTIFICATION: - nvme_res_notification_page_swapbytes( - (struct nvme_res_notification_page *)aer->log_page_buffer); - break; - case NVME_LOG_SANITIZE_STATUS: - nvme_sanitize_status_page_swapbytes( - (struct nvme_sanitize_status_page *)aer->log_page_buffer); - break; - default: - break; - } - - if (aer->log_page_id == NVME_LOG_HEALTH_INFORMATION) { - health_info = (struct nvme_health_information_page *) - aer->log_page_buffer; - nvme_ctrlr_log_critical_warnings(aer->ctrlr, - health_info->critical_warning); - /* - * Critical warnings reported through the - * SMART/health log page are persistent, so - * clear the associated bits in the async event - * config so that we do not receive repeated - * notifications for the same event. - */ - aer->ctrlr->async_event_config &= - ~health_info->critical_warning; - nvme_ctrlr_cmd_set_async_event_config(aer->ctrlr, - aer->ctrlr->async_event_config, NULL, NULL); - } else if (aer->log_page_id == NVME_LOG_CHANGED_NAMESPACE && - !nvme_use_nvd) { - nsl = (struct nvme_ns_list *)aer->log_page_buffer; - for (i = 0; i < nitems(nsl->ns) && nsl->ns[i] != 0; i++) { - if (nsl->ns[i] > NVME_MAX_NAMESPACES) - break; - nvme_notify_ns(aer->ctrlr, nsl->ns[i]); - } - } - - /* - * Pass the cpl data from the original async event completion, - * not the log page fetch. - */ - nvme_notify_async_consumers(aer->ctrlr, &aer->cpl, - aer->log_page_id, aer->log_page_buffer, aer->log_page_size); - } - - /* - * Repost another asynchronous event request to replace the one - * that just completed. - */ - nvme_ctrlr_construct_and_submit_aer(aer->ctrlr, aer); -} - static void nvme_ctrlr_async_event_cb(void *arg, const struct nvme_completion *cpl) { @@ -784,33 +694,18 @@ nvme_ctrlr_async_event_cb(void *arg, const struct nvme_completion *cpl) return; } - /* Associated log page is in bits 23:16 of completion entry dw0. */ + /* + * Save the completion status and associated log page is in bits 23:16 + * of completion entry dw0. Print a message and queue it for further + * processing. + */ + memcpy(&aer->cpl, cpl, sizeof(*cpl)); aer->log_page_id = NVMEV(NVME_ASYNC_EVENT_LOG_PAGE_ID, cpl->cdw0); - nvme_printf(aer->ctrlr, "async event occurred (type 0x%x, info 0x%02x," " page 0x%02x)\n", NVMEV(NVME_ASYNC_EVENT_TYPE, cpl->cdw0), NVMEV(NVME_ASYNC_EVENT_INFO, cpl->cdw0), aer->log_page_id); - - if (is_log_page_id_valid(aer->log_page_id)) { - aer->log_page_size = nvme_ctrlr_get_log_page_size(aer->ctrlr, - aer->log_page_id); - memcpy(&aer->cpl, cpl, sizeof(*cpl)); - nvme_ctrlr_cmd_get_log_page(aer->ctrlr, aer->log_page_id, - NVME_GLOBAL_NAMESPACE_TAG, aer->log_page_buffer, - aer->log_page_size, nvme_ctrlr_async_event_log_page_cb, - aer); - /* Wait to notify consumers until after log page is fetched. */ - } else { - nvme_notify_async_consumers(aer->ctrlr, cpl, aer->log_page_id, - NULL, 0); - - /* - * Repost another asynchronous event request to replace the one - * that just completed. - */ - nvme_ctrlr_construct_and_submit_aer(aer->ctrlr, aer); - } + taskqueue_enqueue(aer->ctrlr->taskqueue, &aer->task); } static void @@ -819,15 +714,21 @@ nvme_ctrlr_construct_and_submit_aer(struct nvme_controller *ctrlr, { struct nvme_request *req; - aer->ctrlr = ctrlr; /* - * XXX-MJ this should be M_WAITOK but we might be in a non-sleepable - * callback context. AER completions should be handled on a dedicated - * thread. + * We're racing the reset thread, so let that process submit this again. + * XXX does this really solve that race? And is that race even possible + * since we only reset when we've no theard from the card in a long + * time. Why would we get an AER in the middle of that just before we + * kick off the reset? */ - req = nvme_allocate_request_null(M_NOWAIT, nvme_ctrlr_async_event_cb, + if (ctrlr->is_resetting) + return; + + aer->ctrlr = ctrlr; + req = nvme_allocate_request_null(M_WAITOK, nvme_ctrlr_async_event_cb, aer); aer->req = req; + aer->log_page_id = 0; /* Not a valid page */ /* * Disable timeout here, since asynchronous event requests should by @@ -1203,6 +1104,140 @@ nvme_ctrlr_reset_task(void *arg, int pending) atomic_cmpset_32(&ctrlr->is_resetting, 1, 0); } +static void +nvme_ctrlr_aer_done(void *arg, const struct nvme_completion *cpl) +{ + struct nvme_async_event_request *aer = arg; + + mtx_lock(&aer->mtx); + if (nvme_completion_is_error(cpl)) + aer->log_page_size = (uint32_t)-1; + else + aer->log_page_size = nvme_ctrlr_get_log_page_size( + aer->ctrlr, aer->log_page_id); + wakeup(aer); + mtx_unlock(&aer->mtx); +} + +static void +nvme_ctrlr_aer_task(void *arg, int pending) +{ + struct nvme_async_event_request *aer = arg; + struct nvme_controller *ctrlr = aer->ctrlr; + uint32_t len; + + /* + * We're resetting, so just punt. + */ + if (ctrlr->is_resetting) + return; + + if (!is_log_page_id_valid(aer->log_page_id)) { + /* + * Repost another asynchronous event request to replace the one + * that just completed. + */ + nvme_notify_async_consumers(ctrlr, &aer->cpl, aer->log_page_id, + NULL, 0); + nvme_ctrlr_construct_and_submit_aer(ctrlr, aer); + goto out; + } + + aer->log_page_size = 0; + len = nvme_ctrlr_get_log_page_size(aer->ctrlr, aer->log_page_id); + nvme_ctrlr_cmd_get_log_page(aer->ctrlr, aer->log_page_id, + NVME_GLOBAL_NAMESPACE_TAG, aer->log_page_buffer, len, + nvme_ctrlr_aer_done, aer); + mtx_lock(&aer->mtx); + while (aer->log_page_size == 0) + mtx_sleep(aer, &aer->mtx, PRIBIO, "nvme_pt", 0); + mtx_unlock(&aer->mtx); + + if (aer->log_page_size != (uint32_t)-1) { + /* + * If the log page fetch for some reason completed with an + * error, don't pass log page data to the consumers. In + * practice, this case should never happen. + */ + nvme_notify_async_consumers(aer->ctrlr, &aer->cpl, + aer->log_page_id, NULL, 0); + goto out; + } + + /* Convert data to host endian */ + switch (aer->log_page_id) { + case NVME_LOG_ERROR: { + struct nvme_error_information_entry *err = + (struct nvme_error_information_entry *)aer->log_page_buffer; + for (int i = 0; i < (aer->ctrlr->cdata.elpe + 1); i++) + nvme_error_information_entry_swapbytes(err++); + break; + } + case NVME_LOG_HEALTH_INFORMATION: + nvme_health_information_page_swapbytes( + (struct nvme_health_information_page *)aer->log_page_buffer); + break; + case NVME_LOG_CHANGED_NAMESPACE: + nvme_ns_list_swapbytes( + (struct nvme_ns_list *)aer->log_page_buffer); + break; + case NVME_LOG_COMMAND_EFFECT: + nvme_command_effects_page_swapbytes( + (struct nvme_command_effects_page *)aer->log_page_buffer); + break; + case NVME_LOG_RES_NOTIFICATION: + nvme_res_notification_page_swapbytes( + (struct nvme_res_notification_page *)aer->log_page_buffer); + break; + case NVME_LOG_SANITIZE_STATUS: + nvme_sanitize_status_page_swapbytes( + (struct nvme_sanitize_status_page *)aer->log_page_buffer); + break; + default: + break; + } + + if (aer->log_page_id == NVME_LOG_HEALTH_INFORMATION) { + struct nvme_health_information_page *health_info = + (struct nvme_health_information_page *)aer->log_page_buffer; + + /* + * Critical warnings reported through the SMART/health log page + * are persistent, so clear the associated bits in the async + * event config so that we do not receive repeated notifications + * for the same event. + */ + nvme_ctrlr_log_critical_warnings(aer->ctrlr, + health_info->critical_warning); + aer->ctrlr->async_event_config &= + ~health_info->critical_warning; + nvme_ctrlr_cmd_set_async_event_config(aer->ctrlr, + aer->ctrlr->async_event_config, NULL, NULL); + } else if (aer->log_page_id == NVME_LOG_CHANGED_NAMESPACE) { + struct nvme_ns_list *nsl = + (struct nvme_ns_list *)aer->log_page_buffer; + for (int i = 0; i < nitems(nsl->ns) && nsl->ns[i] != 0; i++) { + if (nsl->ns[i] > NVME_MAX_NAMESPACES) + break; + nvme_notify_ns(aer->ctrlr, nsl->ns[i]); + } + } + + /* + * Pass the cpl data from the original async event completion, not the + * log page fetch. + */ + nvme_notify_async_consumers(aer->ctrlr, &aer->cpl, + aer->log_page_id, aer->log_page_buffer, aer->log_page_size); + + /* + * Repost another asynchronous event request to replace the one + * that just completed. + */ +out: + nvme_ctrlr_construct_and_submit_aer(ctrlr, aer); +} + /* * Poll all the queues enabled on the device for completion. */ @@ -1574,8 +1609,8 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev) /* * Create 2 threads for the taskqueue. The reset thread will block when * it detects that the controller has failed until all I/O has been - * failed up the stack. The second thread used to be for failing - * requests. + * failed up the stack. The second thread is used for AER events, which + * can block, but only briefly for memory and log page fetching. */ ctrlr->taskqueue = taskqueue_create("nvme_taskq", M_WAITOK, taskqueue_thread_enqueue, &ctrlr->taskqueue); @@ -1585,6 +1620,12 @@ nvme_ctrlr_construct(struct nvme_controller *ctrlr, device_t dev) ctrlr->is_initialized = false; ctrlr->notification_sent = 0; TASK_INIT(&ctrlr->reset_task, 0, nvme_ctrlr_reset_task, ctrlr); + for (int i = 0; i < NVME_MAX_ASYNC_EVENTS; i++) { + struct nvme_async_event_request *aer = &ctrlr->aer[i]; + + TASK_INIT(&aer->task, 0, nvme_ctrlr_aer_task, aer); + mtx_init(&aer->mtx, "AER mutex", NULL, MTX_DEF); + } ctrlr->is_failed = false; make_dev_args_init(&md_args); @@ -1672,8 +1713,14 @@ nvme_ctrlr_destruct(struct nvme_controller *ctrlr, device_t dev) } noadminq: - if (ctrlr->taskqueue) + if (ctrlr->taskqueue) { taskqueue_free(ctrlr->taskqueue); + for (int i = 0; i < NVME_MAX_ASYNC_EVENTS; i++) { + struct nvme_async_event_request *aer = &ctrlr->aer[i]; + + mtx_destroy(&aer->mtx); + } + } if (ctrlr->tag) bus_teardown_intr(ctrlr->dev, ctrlr->res, ctrlr->tag); diff --git a/sys/dev/nvme/nvme_private.h b/sys/dev/nvme/nvme_private.h index 0340b13b7de5..36f00fedc48e 100644 --- a/sys/dev/nvme/nvme_private.h +++ b/sys/dev/nvme/nvme_private.h @@ -123,6 +123,8 @@ struct nvme_request { struct nvme_async_event_request { struct nvme_controller *ctrlr; struct nvme_request *req; + struct task task; + struct mtx mtx; struct nvme_completion cpl; uint32_t log_page_id; uint32_t log_page_size; From nobody Tue Jul 22 04:00:53 2025 X-Original-To: dev-commits-src-all@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 4bmNps5bxCz62NN1; Tue, 22 Jul 2025 04:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmNps2Fxmz3cWJ; Tue, 22 Jul 2025 04:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753156853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xDy6es3aLvM5Q3tgyHWZ4Y8ki/fSOd8/FzzBbxKTReA=; b=r1iaAb7dVdreQvFhejrCilJKq8Bgs39pXgWcBe98jb2jph96sZbYNHl4AZ35/hCmP7Ps5J mZD4B3RLaXBkV4mw+5y7rnOcS4H4ouuWRQ+L2AxB3Zs9XzToai2Ykq+3WBnlnaSreuqQ5z 4L53MuRezqC4ORHhHnQF7uR6uhYD/v3OOV83i9SIPB2ppTwoRzRNXNVDs2vs5GQCgRLQCR jW8jwCLQwi7fdulJGzuHeZcFCJKoclRTXY6vIYuMC5PLDtXgCDNX1cWitCraiCXHjty8hc 9QZwRmebEIthEeYMSUQwPRLcw3AZkE5/yZZNRWa+oLfQuihhvetQgX66s+YAdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753156853; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xDy6es3aLvM5Q3tgyHWZ4Y8ki/fSOd8/FzzBbxKTReA=; b=nEyad80W5ZDLzqDQ0IvPg8Y4Nms3RSJP4L7qq++LrxfRFCd50pnwqXtrbr7JDjXXx+cRON LkykcnqfmFLK6z0LJjUXTbjWgZWJwZYnPlBnaJgBxAs2k3d2OflOcpQySAiHxaFWyfJQTE 9TlAD62iIDaW6K8iZPxTJ7PS4orCfMpnTR1D30U5Pwk1E9Mk7qQ/aSPayE4L1aKTqs5iSd h9L/Wlb918GCV33uef/y65XGUSR/gOwiB74hhWI2YMFu+6S0FsWYCoQfJsWrLk6aYqNpDG pbo4ktongW6wiiDaSEgXepahb6vdS9MwRa9aQycKZ3YfWd+GUpF/Q9KHPFS8/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753156853; a=rsa-sha256; cv=none; b=HKaSpl0IHa2UxhRmDKPtgBwkI9kMcwkMHzRgWlnV2uc2cukL5bjj3rCXWk15CvjG8UjCgj gYycSHH8n99i4LdOk6UyNDFVvamPnicHgAGJoFhOZtfooU4HtUWweV/LF84AEU+6eMAuHu xEP6rnf41X1SUveAUBmfOa364aBs+huxZN5iBhVEaqFLQNFsQyKluYRVJ9Q5jwac37anHc 7BbBOyKXv0Ug+WqcXp5OYeNgEvQXHqMZ7GxPy25K4FBsKUqpZTGh4iwOP+YpiUPzaxvSZ/ RjH0s0hKfQ1bsOrOIG+xugL/Mw2y2JGvFAYloTwi20dx7gbuTnJiFMnfaATVSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmNps1X5zz1Q7b; Tue, 22 Jul 2025 04:00:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56M40r70032479; Tue, 22 Jul 2025 04:00:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56M40rlf032476; Tue, 22 Jul 2025 04:00:53 GMT (envelope-from git) Date: Tue, 22 Jul 2025 04:00:53 GMT Message-Id: <202507220400.56M40rlf032476@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: bd4a4e46ceac - main - devd: Add vm_guest variable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: bd4a4e46ceacd8dfc5a5469ec6edd8c92c53605a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=bd4a4e46ceacd8dfc5a5469ec6edd8c92c53605a commit bd4a4e46ceacd8dfc5a5469ec6edd8c92c53605a Author: Warner Losh AuthorDate: 2025-07-19 05:31:50 +0000 Commit: Warner Losh CommitDate: 2025-07-22 04:00:33 +0000 devd: Add vm_guest variable Fetch vm_guest on startup in case we're running under a hypervisor. Co-authored-by: eugen@ PR: 287873 Sponsored by: Netflix --- sbin/devd/devd.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc index d7a3fee57870..375ccd817146 100644 --- a/sbin/devd/devd.cc +++ b/sbin/devd/devd.cc @@ -153,6 +153,8 @@ static volatile sig_atomic_t romeo_must_die = 0; static const char *configfile = CF; +static char vm_guest[80]; + static void devdlog(int priority, const char* message, ...) __printflike(2, 3); static void event_loop(void); @@ -867,6 +869,8 @@ process_event(char *buffer) cfg.set_variable("timestamp", timestr); free(timestr); + cfg.set_variable("vm_guest", vm_guest); + // Match doesn't have a device, and the format is a little // different, so handle it separately. switch (type) { @@ -1322,6 +1326,7 @@ int main(int argc, char **argv) { int ch; + size_t len; check_devd_enabled(); while ((ch = getopt(argc, argv, "df:l:nq")) != -1) { @@ -1346,6 +1351,13 @@ main(int argc, char **argv) } } + len = sizeof(vm_guest); + if (sysctlbyname("kern.vm_guest", vm_guest, &len, NULL, 0) < 0) { + devdlog(LOG_ERR, + "sysctlnametomib(kern.vm_guest) failed: %d\n", + errno); + } + cfg.parse(); if (!no_daemon && daemonize_quick) { cfg.open_pidfile(); From nobody Tue Jul 22 04:00:54 2025 X-Original-To: dev-commits-src-all@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 4bmNpv1K8tz62NN2; Tue, 22 Jul 2025 04:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmNpt3RCnz3cYj; Tue, 22 Jul 2025 04:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753156854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mXxrwpgOC9wsx6p0nbpyXgLniEAUzXXzxUVoZbOknlc=; b=LbdbwKPX1qObosO4uXNjfRw+hWvwB/Qgyaj47mgaSivI7z7TGe0f5h1CGE9VkNoHcQhiI8 Vh4GCo/mIQm/PZ6tWYiW/eRDLYyqaVdm1ybNKsYhl1st3gPpqMKt2bgWClvJOoG/mZhqb6 cXjpMzghqhBofD8NtpjyB4Uw4OBduYx8OEVtOpOYM/cpg/F+SRGsA8KjCuDOFjSfRDjSXp EvpT2BY2c943x0slCAPCsMmrIIb5sQb/bsTs9c0jl7tPdHvssPhJeLm0885mtHZNnKEK75 EXV/cDTBLJmQvyAz9HErXjU2iDAYxc0w83hKtWbCSrSwQFrd8BY4jXWi8eRUBg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753156854; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=mXxrwpgOC9wsx6p0nbpyXgLniEAUzXXzxUVoZbOknlc=; b=Rb/bVo4Wu+SesmLyM0TiBtyfJRFcjB3AwAzmimEW9enVMkAGYLK7lHFVQ/6p8yZKbAZrTn ckPtz9QMy5rb1qr90BiWxN5wHgye5/YfkCm7MIkdU1nz1CMzNUNpQtCbRYLaLXsd/HD+ov AHWtQCsHMmObArxeeTeEU5GVxCobPgW+eAGq6ykF+naRvOOPAEx6HK5eXW++XXyJufK+8a ZJU+m5coQMa0WdP++zhgquTxPK4WzkpkZv718aanvED6pTeI9RcnQr7VwUdBjG2ld5Perw DBWqlZhvMYX4qXJkb4HS+Im+6Taq3of8QV+9v0xy/EhA95/kJUwGSzx6P6+fTg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753156854; a=rsa-sha256; cv=none; b=veKpDc+AFzr/HcWxDXT9QkJgt6y7YJvGnHz7eFhcsNS7SRj6hniQksePiIjrt5IvQAB/qm 1yARXaH9Eh7PmDbBzxXyrxJiJ7Cbrx+SPzUIJs7WqCiKOkDTbrKMJ4nvrsnTPG0ups+gy/ IVCbNQMOxQl0aIOP09TCU3slTzin0pIU9grai1JXqLJGW9U5sv2R4LTCi6g0SPqB2ii9d8 lD3KJn3iNtlaovuiG8T5PThcBNm9v6c8ISy06tqzR794Q+Ye850nBsNVKM7i7I54ZLQ9BB XcaNab/yIOwVUfL8r5kTe6oTzAhjTAoNRHy19ztOmJlzzt/JfCVet+RJRd1V6Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmNpt2lw7z1QBR; Tue, 22 Jul 2025 04:00:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56M40sMR032520; Tue, 22 Jul 2025 04:00:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56M40spS032517; Tue, 22 Jul 2025 04:00:54 GMT (envelope-from git) Date: Tue, 22 Jul 2025 04:00:54 GMT Message-Id: <202507220400.56M40spS032517@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 73e1bd714277 - main - cam/mmc: Remove stray xpt_path_inq List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 73e1bd71427794ee5496fdeb2bdaa04b05b0c35b Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=73e1bd71427794ee5496fdeb2bdaa04b05b0c35b commit 73e1bd71427794ee5496fdeb2bdaa04b05b0c35b Author: Warner Losh AuthorDate: 2025-07-22 02:50:50 +0000 Commit: Warner Losh CommitDate: 2025-07-22 04:00:53 +0000 cam/mmc: Remove stray xpt_path_inq Turns out, we don't use the results of xpt_path_inq here at all. And it also causes problems. Since it calls xpt_cam_inq to do this useless XPT_PATH_INQ, it loses the original priority we had for the CCB. This priority should be CAM_PRIORITY_XPT, but was oringially set to CAM_PRIORITY_NORMAL. This worked to enumerate the device because no normal priority CCBs were queued by anything doing the enumeration. However, when I changed xpt_path_inq to use the more proper PRIORITY_NONE, it exposed this bug because queued CCBs with PRIORITY_NONE sometimes won't run. This caused the probe device to stop after its first operation. Removing the xpt_path_inq means we no longer step on the important fields we get from xpt_schedule, allowing probing to work correctly. Noticed by: bz@ Sponsored by: Netflix --- sys/cam/mmc/mmc_xpt.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/cam/mmc/mmc_xpt.c b/sys/cam/mmc/mmc_xpt.c index 4fce03004994..f5f66f5214a8 100644 --- a/sys/cam/mmc/mmc_xpt.c +++ b/sys/cam/mmc/mmc_xpt.c @@ -610,7 +610,6 @@ mmcprobe_start(struct cam_periph *periph, union ccb *start_ccb) CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_PROBE, ("Start with PROBE_RESET\n")); /* FALLTHROUGH */ case PROBE_IDENTIFY: - xpt_path_inq(&start_ccb->cpi, periph->path); CAM_DEBUG(start_ccb->ccb_h.path, CAM_DEBUG_PROBE, ("Start with PROBE_IDENTIFY\n")); init_standard_ccb(start_ccb, XPT_MMC_GET_TRAN_SETTINGS); break; From nobody Tue Jul 22 04:00:55 2025 X-Original-To: dev-commits-src-all@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 4bmNpw2Z3zz62N5H; Tue, 22 Jul 2025 04:00:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmNpv4987z3cc7; Tue, 22 Jul 2025 04:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753156855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QTsJU1fhHmswzOnpvZ49WGUpSd8DVv2sbGTCMbwWy6A=; b=SRtjEVSYcyzFikdfi/pmp/nEmNgh5elLuUmsgyd7NshDuOwYmEkVFdKC/3QAoyi2ZpjDDf jqtSWzmR1pO0Uhlr8Jt7YthKf+4KQh5WkPbsAwjEsaF+FOKpD7KiY/Ch5eq4JIGe5h5QIN Pslimlh3HSbJJJ6FQtCR0z+pDobeCZZqWuIczZS/FbU0g5CZ1pDwMFiE5DMj8+L9ZxlXv9 vrA/5cPlkWSiMBC7SktFAy7LTNUUDY4/dNxEDIobPLwtICqzlyFkc1ovzj12di+9H6a+3T bFLbFmgbP5+I8tiTzjpfhCRksPSzbfko5kv7smAtmdPt1li4N7SNEaXC8q0nKA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753156855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QTsJU1fhHmswzOnpvZ49WGUpSd8DVv2sbGTCMbwWy6A=; b=gUg1DzW3U323Do9FrugveDP2brPyac4vxc9Pqbpsjphb5dL5ralkBC1Q5rVOkuS7Ow0ETk eL2ElxE0OhnDF6WME/8M4PmTQf9dqOT8HBinEoosvM8rj0QqiLVE/EQhCOlBpt57J+RF71 tHG9aCI6kzI3VLhzNDoeCzSiDYjpputS1Z/g/M5HGday+LcZXrlYktQkj+xTjdMX+vs/ux V83v726xNzgQXYUOcijZtrDMtAixDrJtlFjpt8/IahmX0oeZ0+xO7fpcBdAfe4Pkxi6NzB l/PunfjaZ9qjZKylzhGuvSusJmU84WukBWA2jxRdk/TX+02fD8BCAL+zhgRg/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753156855; a=rsa-sha256; cv=none; b=Gel3YcuwnsUqDYSrzFM9tHojLc+IMOV6RrRDEpmROMQC41BjgK6C+61A6rggWLkuPLihDg 7cBIr7HsiM92Wp9toizlLK+vnDRx19aK242DRQ4PyRIr0IlxMdmmbEf95aN43y+IXCp9T7 O9Vb8d4ug7M9JIKuNBqNPbjL6AennMKpvwiVDNyTLtKNTpW83hPlH3mA4L82Nkiq457Tn7 0dZ2CRl0Vtmjf5TE9jAhoW0GtRzFU+n0JfpL7GNEDUHvTOeN5Fsf9AaRKlC+EZBzRX1Qwe HRfd3o64kDEONTFSuOHT6cDRZ/mkwNsHI4i1rQI7vUPFykj4yBsuSW2D7b2i8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmNpv3hGkz1QBS; Tue, 22 Jul 2025 04:00:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56M40tOe032555; Tue, 22 Jul 2025 04:00:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56M40t8R032552; Tue, 22 Jul 2025 04:00:55 GMT (envelope-from git) Date: Tue, 22 Jul 2025 04:00:55 GMT Message-Id: <202507220400.56M40t8R032552@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 7cbf41ef6022 - main - mmc_da: Queued CCBs need a priority other than CAM_PRIORITY_NONE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 7cbf41ef60227f2a4eaf01f600fc894ef0d50323 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7cbf41ef60227f2a4eaf01f600fc894ef0d50323 commit 7cbf41ef60227f2a4eaf01f600fc894ef0d50323 Author: Warner Losh AuthorDate: 2025-07-22 03:38:55 +0000 Commit: Warner Losh CommitDate: 2025-07-22 04:00:53 +0000 mmc_da: Queued CCBs need a priority other than CAM_PRIORITY_NONE Queued CCBs usually are queued at CAM_PRIORITY_NORMAL, unless they are doing error recovery, or device enumeration of some kind. They should never be queued at CAM_PRIORITY_NONE, which should only be used for CCBs that are immediate. For sdda_start_init_task(), we allocate a ccb, initialize it then use it to talk to the SD/MMC card to query it, negotiate the speed and lane sizes, etc. Most of these commands are queued, so use the normal priority. Sponsored by: Netflix --- sys/cam/mmc/mmc_da.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/cam/mmc/mmc_da.c b/sys/cam/mmc/mmc_da.c index 7f8bf3516804..322141a72707 100644 --- a/sys/cam/mmc/mmc_da.c +++ b/sys/cam/mmc/mmc_da.c @@ -1081,7 +1081,7 @@ sdda_start_init_task(void *context, int pending) CAM_DEBUG(periph->path, CAM_DEBUG_TRACE, ("sdda_start_init_task\n")); new_ccb = xpt_alloc_ccb(); xpt_setup_ccb(&new_ccb->ccb_h, periph->path, - CAM_PRIORITY_NONE); + CAM_PRIORITY_NORMAL); cam_periph_lock(periph); cam_periph_hold(periph, PRIBIO|PCATCH); From nobody Tue Jul 22 04:00:56 2025 X-Original-To: dev-commits-src-all@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 4bmNpx1hTlz62NXQ; Tue, 22 Jul 2025 04:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmNpw67Ncz3cTW; Tue, 22 Jul 2025 04:00:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753156856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GfkSaWv4e68TbWi7JaVZiGxxnQDQBRhpIvaMPLFzKFc=; b=gpf4Bi9VcC7hGnVGykELPLC9VGoScS3UNTTuXyqNYmCFTf5L49OD3HgAHqyBrYBoSF+XBq ChviTEDDHRsOJtxoWao8R89YMkQTeHZ5t9wpO8AByy1OhauGLex01u3gQwzk2r5VX0yUN7 ooTGmUk9j1BNbeWucqWOdD6dk15+XBOA26YEWLWSfund9tcpw05T5ZEYEgwEx4mfbLRI57 Xg2gitEryT34nwomH3UD9o5XCnFYHXERUV4+bwP/PwQKNlepWt1gAaUnKhpB6ac2d+rBQN ALPHXuIZyB9RkvBHIVxjCs/J+8s6aJhyKufYpr6rhzvz4vtaPbXFHYAxuG28cw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753156856; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GfkSaWv4e68TbWi7JaVZiGxxnQDQBRhpIvaMPLFzKFc=; b=GkYDTJDyxpmRh7qaKDCq3ymdAkLg26kf0r4geyK65uTwQvcj/sHn2poueLJSFTE3R0c6W1 dcLp/TAZLF8IUc2HQZ+MlgBiYTfC6M/iE03s7VYwQ9qTX+1jsH+Nrjk+oSvNbQtzl1Lhqs J+ZGwvGuTzUAgKXDlfXfR56fDTN6gn7CGpJ4BkoLfXvn3QcYUW3x6gU8L1FnejEqDtgnQF 3DmjvScjGKnaiUt7YOLCxcGpU0CTN0jpo5/HFjYL7A8E/orWpcK+Mp2suWRN8DVX+/y65S atOe0QjhENzGgCpsCSp5qhLvtHhm3PbFmfFKwCpjYYkbNYQKDgMOIgvXODPDmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753156856; a=rsa-sha256; cv=none; b=hklOSXA0vII50nrBNQPKlvQcWHaVyFHbmKokgSZ3vWA8GdZKxse9/4EXYQEfi3L+Ij+f1k KAyK7RAyoQW0pArHklgebtvOzDuRmVyU4WJrxpkOFTms1IJ8PYoMw+MKzC1V2eSY7RbuPy SBv1x793N37MWGf+yHIq8GKIXy2TYP6pxLi2VFCy+/aNrQjPYo8pXuN6+uKT9a3Hz5Gnks DncGcPOOE6MlcSzyqJz01JhA3pueNfwqWCInEbZZ5OlFUpjLNEa2ukllqtqU5eSboY+cus /nuZt0vEGaGaz75nPPd0Hy/0wT3jqL5TDzEBfG7o5Rz4f+dzoVnA1F3ZzYF1JA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmNpw4dvmz1Psy; Tue, 22 Jul 2025 04:00:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56M40uU4032590; Tue, 22 Jul 2025 04:00:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56M40udG032587; Tue, 22 Jul 2025 04:00:56 GMT (envelope-from git) Date: Tue, 22 Jul 2025 04:00:56 GMT Message-Id: <202507220400.56M40udG032587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b4b166b8c46b - main - cam: Enforce real priorities in xpt_action for queued ccbs. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: b4b166b8c46b86df855f1621d2aa4b6ab26b3a5e Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b4b166b8c46b86df855f1621d2aa4b6ab26b3a5e commit b4b166b8c46b86df855f1621d2aa4b6ab26b3a5e Author: Warner Losh AuthorDate: 2025-07-22 03:52:22 +0000 Commit: Warner Losh CommitDate: 2025-07-22 04:00:53 +0000 cam: Enforce real priorities in xpt_action for queued ccbs. All queued CCBs should be created with a real priority (one that's not CAM_PRIORITY_NONE). Recently, I introduced a bug that revealed a latent MMC bug where it would stop enumerating due to a bad priority. Add an assert to catch that (the other bug in mmc_da that it found has been fixed). Sponsored by: Netflix --- sys/cam/cam_xpt.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/sys/cam/cam_xpt.c b/sys/cam/cam_xpt.c index 2ec736e7f4ac..cae29226d13c 100644 --- a/sys/cam/cam_xpt.c +++ b/sys/cam/cam_xpt.c @@ -2515,6 +2515,15 @@ xpt_action(union ccb *start_ccb) ("xpt_action: func %#x %s\n", start_ccb->ccb_h.func_code, xpt_action_name(start_ccb->ccb_h.func_code))); + /* + * Either it isn't queued, or it has a real priority. There still too + * many places that reuse CCBs with a real priority to do immediate + * queries to do the other side of this assert. + */ + KASSERT((start_ccb->ccb_h.func_code & XPT_FC_QUEUED) == 0 || + start_ccb->ccb_h.pinfo.priority != CAM_PRIORITY_NONE, + ("%s: queued ccb and CAM_PRIORITY_NONE illegal.", __func__)); + start_ccb->ccb_h.status = CAM_REQ_INPROG; (*(start_ccb->ccb_h.path->bus->xport->ops->action))(start_ccb); } From nobody Tue Jul 22 04:05:51 2025 X-Original-To: dev-commits-src-all@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 4bmNwb62vbz62Nc9; Tue, 22 Jul 2025 04:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmNwb2SnSz3jhL; Tue, 22 Jul 2025 04:05:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753157151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OfSxD4Jyfy9utTnlWGD17IsZ4gJnq5E/UzXzzVs3+iU=; b=bjSgPNLK3znVrHMn3ufuaMrBEwQosYqUTe79Gk75VkBkTIaRSfkKnMtX+79uPmGfUifj8L YaW08sx7rvM/+iD5rf+9QeowTGWpBGUazRHFBlwIPjFPgB6N10ifUqHTIm6hKxUD8TwqMo /fMTdl03y+ojvBeQdNUhfSpF0oMqh4o7Er40VWNLTVxjXyTO7DK43hjJ5h6I6hbGmorPtZ 4Hdg0cYySHl+b9BQnyuAGYT7Q0F2hEvwF6F3Y2KVKvq1gEuiMdAo3zDE2PeJr+ftPgxTGB UptQoEWqcNAbnkaDQriLtNJyeoTfZMggIjGaoLgE0RKQXeurvMg1Mg1GfHkjbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753157151; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OfSxD4Jyfy9utTnlWGD17IsZ4gJnq5E/UzXzzVs3+iU=; b=LusYJ7pIMB1aBTZlY7T+EiC8VmBuWKw8T0mIUxKtSlXoImrOYaEHrTzonCS4hKLuZ1Kqq4 RN9uB0kS3znWQOVdZf4UyWSQcK/U3AlzcgYHi9YUlinuT9UabmBvqc3ae3LMDHgk5XQ+Dw 2kzdWS/yVr3wjc+6XUsIsbDtqj9vwevlUQZw6d3Ml5nUsly5PGnDDBBLNVgm/XYJqHZQrQ MqAELfYfmYixh+abquQNiv5f0iEZrNYgEhzcCiK5RthuWcHCrTvb7MmM0s6SEJKxbkWali mIEhuYYNShL9zV5MZypmSxDKlgHdX4x+m01F9o3YdioRs52/tM3lrFDZW8X+kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753157151; a=rsa-sha256; cv=none; b=EI5IMsp7bMaJ//04PcewdjzCspdbV3uL+B97u5vDjYwiO4sil7To5RO95W+tEMMj4vBeYP opP1YSn/htnmjKbCiFx6YEr/ms36M29e/IN9hGgex7YDmn8zWsD8sVSAHkdErR8E5boOD4 R0ZlbTnEefoHxbORWd37196PipCwgZZH6WF4BZHLcVpMfh0v1b9EXSynPDopLTrDKFMBhp 2eDaw7Ox2Mxbp/CyVfmFipBEOD+94GCOyp0aRwTAFBVkoSKTi73xEalw6w9682r48ECS7e /Lm7L+LWN/0zD2l1vidmEkhLMtSAcGTFRtKbQLtI0RO2PkPmYDr0nzpz/161hA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmNwb1szSz1Pxt; Tue, 22 Jul 2025 04:05:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56M45pta041340; Tue, 22 Jul 2025 04:05:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56M45pv1041337; Tue, 22 Jul 2025 04:05:51 GMT (envelope-from git) Date: Tue, 22 Jul 2025 04:05:51 GMT Message-Id: <202507220405.56M45pv1041337@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: 337c3e9859e7 - stable/14 - if_genet: Plug memory leaks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 337c3e9859e7b5d971e84bf546a51c2cf9a9e44f Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=337c3e9859e7b5d971e84bf546a51c2cf9a9e44f commit 337c3e9859e7b5d971e84bf546a51c2cf9a9e44f Author: Zhenlei Huang AuthorDate: 2025-07-19 17:07:54 +0000 Commit: Zhenlei Huang CommitDate: 2025-07-22 04:04:51 +0000 if_genet: Plug memory leaks The rx_buf_tag should be checked when destroying rx dma mappings. PR: 288309 Reviewed by: zlei Submitted by: Mike Belanger MFC after: 3 days (cherry picked from commit f46e95ae3addc9f7b975c187f71125825a38ffb1) --- sys/arm64/broadcom/genet/if_genet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/broadcom/genet/if_genet.c b/sys/arm64/broadcom/genet/if_genet.c index 23fd45857d65..7dab488501c3 100644 --- a/sys/arm64/broadcom/genet/if_genet.c +++ b/sys/arm64/broadcom/genet/if_genet.c @@ -657,7 +657,7 @@ gen_bus_dma_teardown(struct gen_softc *sc) error); } - if (sc->tx_buf_tag != NULL) { + if (sc->rx_buf_tag != NULL) { for (i = 0; i < RX_DESC_COUNT; i++) { error = bus_dmamap_destroy(sc->rx_buf_tag, sc->rx_ring_ent[i].map); From nobody Tue Jul 22 04:05:50 2025 X-Original-To: dev-commits-src-all@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 4bmNwb3496z62P2p; Tue, 22 Jul 2025 04:05: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmNwZ4kJrz3jWg; Tue, 22 Jul 2025 04:05:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753157150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0oPyIoEEzFGseD9QlRGDw46Eus+iAKD//Q0Fl8H2/sY=; b=ZWE8VET9maiZEw9qdHal5qVFzEd+GGPdg/dCRuYTdVEfYEPF9HI0C2xTVeq1G6RuCyO4gG sOaWB3ki0J9mtZPw0O13RIqVwgRW6HQLSkaQNRiCK7r9rkiVtq6x/TGZNx45yRkGHDGOFx Dy9NycuA2jIePmwki13MOVcGAbccWlZK4iI+EPoCAbhWvvSx5xczv4hiyYok8AefjtV2Ok ddeZEWMt8tZmFrd0Xc1up4JrjZgjdGjPq/WxGtxKUROuj0G+dK2vU73aUYDFzsEAFfUZSP 7ZwUcCkcAdK2Hh+bKRo7JWDw7OBxFVvxvVDdVLg9zaBOjF/sC0OvRG2bNpXLbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753157150; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0oPyIoEEzFGseD9QlRGDw46Eus+iAKD//Q0Fl8H2/sY=; b=VqH34ZxWEB7jo6aRvtwc5GZy9YqeFa5bxj9/yZASvRI6wP0Ll8UT/ImtwlC7UV6rwEjwGg 6tNvAIbxplez6XqWtK53779F06JpnbTf+Ygn3YfabSzWTbl9IiFr7FQFOpq0R8/mS5Lf/0 dUD4YCFcO/8/WZkwfGRh3oq+gQKdWpVzNvXalnnT5GjMAu0kodUcTsyn7d7WED/Lcp4CZY 5L4SnPs9y0bQn03gAMalFJZifHLsnWHACjkYI04GIJxOtOwNVlmnFueXZpV3GTCBV908sA +Fojjj/mvjawHdDFif53bUZn5C29DLO03iogo8K8kZBOLxvoyRKQaztIaI5PuQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753157150; a=rsa-sha256; cv=none; b=oyoxpye3jHf2/CxTj3JuhBVRUK4DfDbgieTg17+7rFH/Zztq7BsDobtD+jMXYB4gtuq/BH wDaIkVuzpr4u3+WcDQsU9Pjvj35kL0khSSIOTfcT3HBPnqkgZSBTMDuYJYpGYFJE/RzuNW 5wUW5o93gCezToYp3dIyETsSs8EmXLgL8H56pn40p9sFHjmCm7Rlf9pBv7on9DGjf7JSLN K5sH/hSyjQyhMfOOHpwuWzPtSwtO+9DpxLY8F3P3lK3pCN+0DduN3A3P6Focxb0T+if42o tIKS4x/VZdRkMMJeZF2BrTLLGevbfKLubLpsdxPBYiIPu/BHIyX6x5ri54ednQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmNwZ1hFPz1Q8B; Tue, 22 Jul 2025 04:05:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56M45oYn041306; Tue, 22 Jul 2025 04:05:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56M45oL2041303; Tue, 22 Jul 2025 04:05:50 GMT (envelope-from git) Date: Tue, 22 Jul 2025 04:05:50 GMT Message-Id: <202507220405.56M45oL2041303@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: 97d5f16c6966 - stable/14 - if_genet: Consistently use the boolean form List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 97d5f16c6966e2ae261ddabe1f16a9675dedf43a Auto-Submitted: auto-generated The branch stable/14 has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=97d5f16c6966e2ae261ddabe1f16a9675dedf43a commit 97d5f16c6966e2ae261ddabe1f16a9675dedf43a Author: Zhenlei Huang AuthorDate: 2025-07-19 17:07:54 +0000 Commit: Zhenlei Huang CommitDate: 2025-07-22 04:04:51 +0000 if_genet: Consistently use the boolean form The variable eaddr_found is declared as bool. This change improves readability a little. No functional change intended. MFC after: 3 days (cherry picked from commit 2fc051d090933203e1af6a8452cdd87a4c76ad5b) --- sys/arm64/broadcom/genet/if_genet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/broadcom/genet/if_genet.c b/sys/arm64/broadcom/genet/if_genet.c index 8fb46a7552f1..23fd45857d65 100644 --- a/sys/arm64/broadcom/genet/if_genet.c +++ b/sys/arm64/broadcom/genet/if_genet.c @@ -350,7 +350,7 @@ gen_attach(device_t dev) } /* If address was not found, create one based on the hostid and name. */ - if (eaddr_found == 0) + if (!eaddr_found) ether_gen_addr(sc->ifp, &eaddr); /* Attach ethernet interface */ ether_ifattach(sc->ifp, eaddr.octet); From nobody Tue Jul 22 04:11:48 2025 X-Original-To: dev-commits-src-all@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 4bmP3T3618z62P5r; Tue, 22 Jul 2025 04:11: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmP3T15zZz3pvW; Tue, 22 Jul 2025 04:11:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753157509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0KvH45sHHDKY9vRE4qifQchefyzG6RA81h8Wz+m51ig=; b=JHzo7YCEnd3+J+tc+tcA/dI1Z19nVD8bIyBGU04mwvBsCb/jeB04pvAIUEGyVHBt8E8P61 LOCKLpURNzUsDMXxHRrLgfw/rugL3+tZEc8q4nNiYoyyD84HFlS1kq+6w3Tfd9XkB+dfEk pxsEk/c/gnMFURNSZ0YkPQZ6Ij/DaVLWTqooSdL9vO//KIHav+PmLXx2ODI75nHKLErOSJ F1FGl74TaZy6+pnOuQPGHw5CgCSMBURtQoN0ZVpTMGbndfcmRkw+cSQkpRgfhwYpTFjC6C pn4I3Q9BeENumdETnneAtrxNAubgAfCUA4Ecv+d8o6wbaupWrn6fgAe2N5HkSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753157509; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0KvH45sHHDKY9vRE4qifQchefyzG6RA81h8Wz+m51ig=; b=avYGu5mVPPLmFeSqL8cQO5ShHFbDja/CpWJ6wsYROrXNBfKWJlfM6s587j7WJQoEThtmly qZeA4N/kCddxkGwvSNOTE0f2im+SjbVuBJJVHPy3VtzUGAKn2i1PLEDoLbvlmwLr/LFnvk +fFC1P/WWsfg9XjHtBEMCiB2XhIN1VB4Svt8KWdzHbHP0QJ4zi1u097DOXCsbEwbVo3zxk F3QUShCDrxNjrt8WV/yce6R+DbPlPXBNVuO9Fhjb5gaZ+VwUbIJgARM9vxk5/eVehXh7NF kn127udQ2/Vi4XYFdPZtmVTjf+At2xfuttvU3LQFwhX41M3vdsuOp70UphqxKQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753157509; a=rsa-sha256; cv=none; b=QJDL++mw6v0qG47EI6ucpmiDRCGZQ5UH1R+bzX85PH+V/R8Y72ZUqb1h64pMVC8gBNQyKd Uwyk7dOuhA39ttvwlhaT6Wn6mPxHHOCVPbVNsUDp+5LiMirFcSG9FJbCwQ1wsizy6tbjNl P4ryh08O73yzPywY6ChhyChWoqG07wkBOrK8n5zJ/QDUwse0aFy/Og9Oq2efDwLXgNivNv itZ+flridbdrheYqk3fsFoCtNIIq1dTS+DrBMhYG1Su/Qf1LY6tpeSUqDcDBgUMghXxYQf CeGVQeyArAnBR0/bmFirHXRW/GdhG3WS8/wc9RvmXHWNfsD38d+i78Rkd/DDBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmP3T0gg3z1QrR; Tue, 22 Jul 2025 04:11:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56M4BmNa056397; Tue, 22 Jul 2025 04:11:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56M4Bmie056394; Tue, 22 Jul 2025 04:11:48 GMT (envelope-from git) Date: Tue, 22 Jul 2025 04:11:48 GMT Message-Id: <202507220411.56M4Bmie056394@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: c18860339d50 - main - qlnxe: Fix advertising the IFCAP_LINKSTATE capability List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: c18860339d5051dea99cb5cee7e322ffa5dd2a81 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=c18860339d5051dea99cb5cee7e322ffa5dd2a81 commit c18860339d5051dea99cb5cee7e322ffa5dd2a81 Author: Zhenlei Huang AuthorDate: 2025-07-22 04:11:02 +0000 Commit: Zhenlei Huang CommitDate: 2025-07-22 04:11:02 +0000 qlnxe: Fix advertising the IFCAP_LINKSTATE capability The following up advertising of IFCAP_HWCSUM capability unconditionally overwrite IFCAP_LINKSTATE. Reviewed by: kbowling MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D51450 --- sys/dev/qlnx/qlnxe/qlnx_os.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 9d23d5df1d2b..60e807d55e01 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -2308,8 +2308,6 @@ qlnx_init_ifnet(device_t dev, qlnx_host_t *ha) else if (device_id == QLOGIC_PCI_DEVICE_ID_1644) if_setbaudrate(ifp, IF_Gbps(100)); - if_setcapabilities(ifp, IFCAP_LINKSTATE); - if_setinitfn(ifp, qlnx_init); if_setsoftc(ifp, ha); if_setflags(ifp, IFF_BROADCAST | IFF_SIMPLEX | IFF_MULTICAST); @@ -2343,7 +2341,6 @@ qlnx_init_ifnet(device_t dev, qlnx_host_t *ha) if_setcapabilities(ifp, IFCAP_HWCSUM); if_setcapabilitiesbit(ifp, IFCAP_JUMBO_MTU, 0); - if_setcapabilitiesbit(ifp, IFCAP_VLAN_MTU, 0); if_setcapabilitiesbit(ifp, IFCAP_VLAN_HWTAGGING, 0); if_setcapabilitiesbit(ifp, IFCAP_VLAN_HWFILTER, 0); @@ -2352,6 +2349,7 @@ qlnx_init_ifnet(device_t dev, qlnx_host_t *ha) if_setcapabilitiesbit(ifp, IFCAP_TSO4, 0); if_setcapabilitiesbit(ifp, IFCAP_TSO6, 0); if_setcapabilitiesbit(ifp, IFCAP_LRO, 0); + if_setcapabilitiesbit(ifp, IFCAP_LINKSTATE, 0); if_sethwtsomax(ifp, QLNX_MAX_TSO_FRAME_SIZE - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN)); From nobody Tue Jul 22 04:11:50 2025 X-Original-To: dev-commits-src-all@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 4bmP3W0vzmz62PQH; Tue, 22 Jul 2025 04:11: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmP3V24vSz3q21; Tue, 22 Jul 2025 04:11:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753157510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C7bSME5xKTI+M1snzIlnzsymSkKfG8FaW/FgZpe8mbQ=; b=MYshnZHlUCNz1F1dO+hhlv5/4RxpR5FTfjLo+JrCoJgfXsO90Q0VLJFQ2kdp3XVttVJ6RC 79ZExyZcJ8Fbx/JC3e6Qz7J2jplIKC6haM9HjjfHfkIF09/0SpUUd6gPsyfj/ZpyamQsWH UHTZFitRdc6vKsA0ipj+MZJNvCXq7c3RwOVOCQxJ5B9eumt0iyI73CltJEvZyMbwGnz2Pm /DKmjOepeBDeqB8cg9lodqFp+YsbX9BcrEtO2VW0EkaTZxzeH2ofsbSalC/4OBedc4UKNT avICGCYGa/SLmdhhGdYeFFfT0b+C9P85vFaBC8sEN8S+xan0yVHxGzhykGzfcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753157510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C7bSME5xKTI+M1snzIlnzsymSkKfG8FaW/FgZpe8mbQ=; b=Ygr1AK7Iq5K3jkWgYjYPwkwkvs7SvPtsRD08oWUmCaaDS3jhQNFiMyiq8KIdts2yaxRm1Z PqPylmg8idfngk0Oqlm0KiBmc/9wWBZl87429AjQFGjIM23pBfcrCctOqg4TLNbR1Eue0j EaXqjNj0hhK5LeVI7APh3a+u95qww1TD806P0Vm+BvDOWDcghWpjT33vuZv62peTOx3/MF phFdQHJFx8lBt7/6PVaBT3hlFGHggBeerUEbiqS2rGaJLEUMyYQbCCWijmMz8gVK5q+Qhr iUGJPUKyIY6DcWWrX3+QIfwAkG7IDkPd70lU49aLUXWcxFemPC8ix2WjPS7S5g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753157510; a=rsa-sha256; cv=none; b=P6uIdVELSrANxr5pf25mFT9caIxS3uVUs/Yv/7U+a2KIwNxnlcj403IncPjyb/DayENUi6 Ux2Dmrmip2ayJEEeCvhZVlHsWqnXCntqtIZrx6zFUchRWiuz2mcNaxI+cw87wKOrVxyhGD JLdW/LFk3dQDP5JwwWQnTZAyGAA5eVSitfSJotOJG1+loAhA8p3SV2012KaL0iipYoJacj uaJ+jAdB57zeVY1EOal0RfqAc0aL8qhVc1VHnN0LXPDDZKpSHS1CrOQjAcZ4sRZo/+YTj+ XpA0HFeBq9pWi+wZACUnXVAQvkMAk7Pf5oxektoK6ZuWyYyLNnVN11iVnk+X/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmP3V1WqNz1QQV; Tue, 22 Jul 2025 04:11:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56M4BoSW056440; Tue, 22 Jul 2025 04:11:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56M4Bo0n056437; Tue, 22 Jul 2025 04:11:50 GMT (envelope-from git) Date: Tue, 22 Jul 2025 04:11:50 GMT Message-Id: <202507220411.56M4Bo0n056437@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 386960a8805e - main - qlnxe: Advertise the IFCAP_HWSTATS capability List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 386960a8805edc6d5ac6bb6215ad102a83314549 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=386960a8805edc6d5ac6bb6215ad102a83314549 commit 386960a8805edc6d5ac6bb6215ad102a83314549 Author: Zhenlei Huang AuthorDate: 2025-07-22 04:11:02 +0000 Commit: Zhenlei Huang CommitDate: 2025-07-22 04:11:02 +0000 qlnxe: Advertise the IFCAP_HWSTATS capability The hardware can count statistics and the driver has already retrieved them via qlnx_get_counter(). Advertise the IFCAP_HWSTATS capability to avoid the net stack from double counting IFCOUNTER_IBYTES. Reviewed by: kbowling MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D51451 --- sys/dev/qlnx/qlnxe/qlnx_os.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/qlnx/qlnxe/qlnx_os.c b/sys/dev/qlnx/qlnxe/qlnx_os.c index 60e807d55e01..4ad190374f87 100644 --- a/sys/dev/qlnx/qlnxe/qlnx_os.c +++ b/sys/dev/qlnx/qlnxe/qlnx_os.c @@ -2350,6 +2350,7 @@ qlnx_init_ifnet(device_t dev, qlnx_host_t *ha) if_setcapabilitiesbit(ifp, IFCAP_TSO6, 0); if_setcapabilitiesbit(ifp, IFCAP_LRO, 0); if_setcapabilitiesbit(ifp, IFCAP_LINKSTATE, 0); + if_setcapabilitiesbit(ifp, IFCAP_HWSTATS, 0); if_sethwtsomax(ifp, QLNX_MAX_TSO_FRAME_SIZE - (ETHER_HDR_LEN + ETHER_VLAN_ENCAP_LEN)); From nobody Tue Jul 22 04:45:52 2025 X-Original-To: dev-commits-src-all@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 4bmPpn5Jktz62RDS; Tue, 22 Jul 2025 04:45: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmPpn0wcKz3KJJ; Tue, 22 Jul 2025 04:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753159553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uo8xW1nyxkZ+kLCOiJnO3zvwoUUCz8W156FE2lKaCqk=; b=fIufJiB2yng7BZkW2ZS3psHoz6EfBE7taqjNvMq0e9BiQVb5K8hcpUg5SwL/zfWsp4WSrL DNDtZGlci/uHRdq5ZjbM6E61nLkTCwKU89b5WY7nWhZtywbzerYskQcGUP6rzzjklPOBK9 e2qZYdlkLqSHtVL4cpEz9ElGN2DW3NL4GYZVHPxKq8RogtBmwYKr4r2r/9qDbLYZQWK4A7 oWK3+gdxAJ43uloo3Y+3vX5I8fW62hDtnRWB3UxHkZruHu9L9kWJjMYP5J/QKpH2aA6IFD RCVAGICZZEK7NdMOn6SCije8Z7Zz7hs/G6TQexb++RNAHFnv1KCnMlNNUkDLFg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753159553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Uo8xW1nyxkZ+kLCOiJnO3zvwoUUCz8W156FE2lKaCqk=; b=O6C8dzfLBboy0lG6UxqDZ9F7hr0Zq8GSZs9Pc0uICCwk8//rPlDZ/O6ijKOXmHQWfH37FB tzD5HtxwongnikZJzvIvGCel2sm7OH67CWSPCmB3rvmBmI9MAXKurElD2zKkwPTbO2t6DG 8dodV39DXd/lsLCYbwAxZX6rTeQW77pa5/E4GP78mckdzwCyowx5Px5uu/UILKKtWm1+CF 49gq9kV3+ijoQEcdesGpbghnRo3FuQElgE6t8Xx5etQYUlbPiXw2btiy9nKanawRTO6HI6 JgOzpG6DKhnuf2JO0w7unr03X5iHtMf/7Bz+pK0VV5TgLSwFqUFtGpwvoHtUeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753159553; a=rsa-sha256; cv=none; b=qrWC/iRUZudJIaWhcbb9OkpHZluwPltuzV2v8SgfF25kzWjhk9LzgxVBrnu/28tqi+QxlN DomQkqqAUB2DXWs73FHt1P2F4chxC8Z1Y0dgl7pPDB6sHXNS+1n7+IqWPa1XrI9PQwHzsS 5cjdJqjhUEFfmLXyvHzyk6iDz+JrKShpwgOmG8XgcKii2EYpEb73/P6a50pcnl3FJp7VkF pP7yN1RNthD7etOd1cujGpvb3LytzTlG+KOeL37fwVxksvSCpkDaHd18PhiEAUkyKmx6Ml xAm4ui8QJKZTEOmv7Kt5uRJ6XclvkZS2eWuxVhIWeCT2oJcN8OAD0GjIhXpejA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmPpn0CD3z1RcX; Tue, 22 Jul 2025 04:45:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56M4jqwF015835; Tue, 22 Jul 2025 04:45:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56M4jqSa015832; Tue, 22 Jul 2025 04:45:52 GMT (envelope-from git) Date: Tue, 22 Jul 2025 04:45:52 GMT Message-Id: <202507220445.56M4jqSa015832@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: ShengYi Hung Subject: git: f840492b5b0d - main - efidev: add support for memory attribute List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f840492b5b0d5c9e7d6d7d7dc25c260bc4d63ba2 Auto-Submitted: auto-generated The branch main has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=f840492b5b0d5c9e7d6d7d7dc25c260bc4d63ba2 commit f840492b5b0d5c9e7d6d7d7dc25c260bc4d63ba2 Author: ShengYi Hung AuthorDate: 2025-07-19 17:07:27 +0000 Commit: ShengYi Hung CommitDate: 2025-07-22 04:45:29 +0000 efidev: add support for memory attribute The EFI_PROPERTIES_TABLE has been deprecated in the UEFI specification. It is now replaced by the EFI_MEMORY_ATTRIBUTES_TABLE, which provides a new header and data format for describing memory region attributes. Reviewed by: imp Approved by: markj (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D49998 --- sys/dev/efidev/efirt.c | 42 +++++++++++++++++++++++++++++++++++-- sys/modules/efirt/Makefile | 2 +- sys/sys/efi.h | 18 ++++++++++++++++ usr.sbin/efitable/efitable.8 | 2 ++ usr.sbin/efitable/efitable.c | 50 +++++++++++++++++++++++++++++++++++++++++++- 5 files changed, 110 insertions(+), 4 deletions(-) diff --git a/sys/dev/efidev/efirt.c b/sys/dev/efidev/efirt.c index b0fa33daeca7..b55c1c191077 100644 --- a/sys/dev/efidev/efirt.c +++ b/sys/dev/efidev/efirt.c @@ -107,7 +107,8 @@ static int efi_status2err[25] = { enum efi_table_type { TYPE_ESRT = 0, - TYPE_PROP + TYPE_PROP, + TYPE_MEMORY_ATTR }; static int efi_enter(void); @@ -445,6 +446,42 @@ get_table_length(enum efi_table_type type, size_t *table_len, void **taddr) free(buf, M_TEMP); return (0); } + case TYPE_MEMORY_ATTR: + { + efi_guid_t guid = EFI_MEMORY_ATTRIBUTES_TABLE; + struct efi_memory_attribute_table *tbl_addr, *mem_addr; + int error; + void *buf; + size_t len = sizeof(struct efi_memory_attribute_table); + + error = efi_get_table(&guid, (void **)&tbl_addr); + if (error) + return (error); + + buf = malloc(len, M_TEMP, M_WAITOK); + error = physcopyout((vm_paddr_t)tbl_addr, buf, len); + if (error) { + free(buf, M_TEMP); + return (error); + } + + mem_addr = (struct efi_memory_attribute_table *)buf; + if (mem_addr->version != 2) { + free(buf, M_TEMP); + return (EINVAL); + } + len += mem_addr->descriptor_size * mem_addr->num_ents; + if (len > EFI_TABLE_ALLOC_MAX) { + free(buf, M_TEMP); + return (ENOMEM); + } + + *table_len = len; + if (taddr != NULL) + *taddr = tbl_addr; + free(buf, M_TEMP); + return (0); + } } return (ENOENT); } @@ -457,7 +494,8 @@ copy_table(efi_guid_t *guid, void **buf, size_t buf_len, size_t *table_len) enum efi_table_type type; } tables[] = { { EFI_TABLE_ESRT, TYPE_ESRT }, - { EFI_PROPERTIES_TABLE, TYPE_PROP } + { EFI_PROPERTIES_TABLE, TYPE_PROP }, + { EFI_MEMORY_ATTRIBUTES_TABLE, TYPE_MEMORY_ATTR } }; size_t table_idx; void *taddr; diff --git a/sys/modules/efirt/Makefile b/sys/modules/efirt/Makefile index 4738996fd4e6..c46484465b68 100644 --- a/sys/modules/efirt/Makefile +++ b/sys/modules/efirt/Makefile @@ -9,7 +9,7 @@ SRCS+= device_if.h bus_if.h clock_if.h DPSRCS+= assym.inc .if ${MACHINE_CPUARCH} == "amd64" -SRCS+= opt_hwpmc_hooks.h opt_kstack_pages.h +SRCS+= opt_acpi.h opt_hwpmc_hooks.h opt_kstack_pages.h .endif efirt_support.o: efirt_support.S assym.inc diff --git a/sys/sys/efi.h b/sys/sys/efi.h index 95a433a950db..89c8b15519de 100644 --- a/sys/sys/efi.h +++ b/sys/sys/efi.h @@ -42,6 +42,8 @@ {0xb122a263,0x3661,0x4f68,{0x99,0x29,0x78,0xf8,0xb0,0xd6,0x21,0x80}} #define EFI_PROPERTIES_TABLE \ {0x880aaca3,0x4adc,0x4a04,{0x90,0x79,0xb7,0x47,0x34,0x08,0x25,0xe5}} +#define EFI_MEMORY_ATTRIBUTES_TABLE \ + {0xdcfa911d,0x26eb,0x469f,{0xa2,0x20,0x38,0xb7,0xdc,0x46,0x12,0x20}} #define LINUX_EFI_MEMRESERVE_TABLE \ {0x888eb0c6,0x8ede,0x4ff5,{0xa8,0xf0,0x9a,0xee,0x5c,0xb9,0x77,0xc2}} @@ -166,6 +168,22 @@ struct efi_prop_table { uint64_t memory_protection_attribute; }; +struct efi_memory_descriptor { + uint32_t type; + caddr_t phy_addr; + caddr_t virt_addr; + uint64_t pages; + uint64_t attrs; +}; + +struct efi_memory_attribute_table { + uint32_t version; + uint32_t num_ents; + uint32_t descriptor_size; + uint32_t flags; + struct efi_memory_descriptor tables[]; +}; + #ifdef _KERNEL #ifdef EFIABI_ATTR diff --git a/usr.sbin/efitable/efitable.8 b/usr.sbin/efitable/efitable.8 index bb8a9cc3d0e1..4d174b7d9514 100644 --- a/usr.sbin/efitable/efitable.8 +++ b/usr.sbin/efitable/efitable.8 @@ -54,6 +54,8 @@ Currently supported tables: .Bl -tag -width indent -compact .It Cm esrt EFI System Resource Table +.It Cm memory +EFI Memory Attributes Table .It Cm prop EFI Properties Table .El diff --git a/usr.sbin/efitable/efitable.c b/usr.sbin/efitable/efitable.c index 0eee72801592..a506b4dea311 100644 --- a/usr.sbin/efitable/efitable.c +++ b/usr.sbin/efitable/efitable.c @@ -44,6 +44,7 @@ static void efi_table_print_esrt(const void *data); static void efi_table_print_prop(const void *data); +static void efi_table_print_memory(const void *data); static void usage(void) __dead2; struct efi_table_op { @@ -56,7 +57,9 @@ static const struct efi_table_op efi_table_ops[] = { { .name = "esrt", .parse = efi_table_print_esrt, .guid = EFI_TABLE_ESRT }, { .name = "prop", .parse = efi_table_print_prop, - .guid = EFI_PROPERTIES_TABLE } + .guid = EFI_PROPERTIES_TABLE }, + { .name = "memory", .parse = efi_table_print_memory, + .guid = EFI_MEMORY_ATTRIBUTES_TABLE } }; int @@ -239,6 +242,51 @@ efi_table_print_prop(const void *data) xo_err(EX_IOERR, "stdout"); } +static void +efi_table_print_memory(const void *data) +{ + const struct efi_memory_attribute_table *attr = + (const struct efi_memory_attribute_table *)data; + const struct efi_memory_descriptor *desc; + int i, nentries; + + nentries = attr->num_ents; + desc = attr->tables; + + xo_set_version(EFITABLE_XO_VERSION); + + xo_open_container("memory"); + xo_emit("{Lwc:Version}{:version/%#x}\n", attr->version); + xo_emit("{Lwc:Length}{:length/%u}\n", attr->descriptor_size); + xo_emit("{Lwc:Entries}{:entries/%u}\n", attr->num_ents); + + xo_open_container("attributes"); + + /* + * According to https://forum.osdev.org/viewtopic.php?t=32953, the size + * of records into the attribute table never equals to + * sizeof(efi_memory_descriptor). The correct one for indexing the array + * resides in the attributet table. + */ + for (i = 0; i < nentries; i++) { + xo_emit("{Lwc:ID}{:id/%#x}\n", i); + xo_emit("{Lwc:Attributes}{:attributes/%#x}\n", desc->attrs); + xo_emit("{Lwc:Type}{:type/%#x}\n", desc->type); + xo_emit("{Lwc:Pages}{:pages/%#x}\n", desc->pages); + xo_emit("{Lwc:Phyaddr}{:phyaddr/%#p}\n", desc->phy_addr); + xo_emit("{Lwc:Virtaddr}{:virtaddr/%#p}\n", desc->virt_addr); + desc = (const struct efi_memory_descriptor *)(const void *) + ((const char *)desc + attr->descriptor_size); + } + + xo_close_container("attributes"); + + xo_close_container("memory"); + + if (xo_finish() < 0) + xo_err(EX_IOERR, "stdout"); +} + static void usage(void) { xo_error("usage: efitable [-g guid | -t name] [--libxo]\n"); From nobody Tue Jul 22 05:25:33 2025 X-Original-To: dev-commits-src-all@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 4bmQhY5mxtz62TVM; Tue, 22 Jul 2025 05:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmQhY1hMJz3sdN; Tue, 22 Jul 2025 05:25:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753161933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RoStG+fLZQ4635GSwdvwxUKOYdiS0w26DpDFyOrZLdw=; b=UtyVe9pfd6jFjlEFafAwkCErmmVMHgFqhmiWnZKUTcKFWOU3kwTM24k3J1rFdp2RlbWRCx 7osvX/BdEdSjuNeEVAe5VQsHveBjFb08r3V3nk0F2izDRbLk4DoEOMhZlX3ye8cpRaZsqc IXpvIUvqswOInC/RgiAWA2BzwWfQaW0Za9gKlR7yw4DZwIT5+9zG50TPHBSaamFWDWlxvd cwd38EK5kvk1Y7iqTD0dNonxEBwSBwUGQ+MXbRXII1tkfzXjyZ3duks3m4OLNuzPK6MRxa AFfDylwCSmEiZDuksZGpGjCSYvNOERJm7oxaym1BtRmhzzkYF/dBMwrRyYTF1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753161933; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RoStG+fLZQ4635GSwdvwxUKOYdiS0w26DpDFyOrZLdw=; b=ljNLgqJKIM7CUflWLHBH5E0gORV19pN/k4Bxtpe14FDOHvwWBmULNJLa9dWEGZ9Am0DWLt heZEu2Ce4nqRWPDCcsEnmQ/IRug8YQgdT4CfPAJI9ABXY1b1YPfKa4lZ+SOrGDOMDfrKZl jSlj+0eUO5YjDDw9InIQXbQ4ClW8gkhQs3DP44XscQOb3+8jYpN1G8s9eTgZ8JQHeoBhO/ FcYFWu1DeGzZ/j3O+jbpyw57k/BEWlAZ661EsAHhGWWcYkYH+Dm6dw9G90Z33zFVsxuycv PYOfWzNm3K5Zada/MJp8UHiY+0o4/+YDHgA+45RE2kWiHYdYt8+TeqDKXSfOPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753161933; a=rsa-sha256; cv=none; b=pR3BB/Ms3cRdY3Sx6AU6WTq5Zbnhb1yeo/5dsHP5o9QXeBLCAbOp6Y+u7YvxPPJ+i2iXFr O0y+pkLjkaS81uJ8EH7n+q1HpL742i7PgmL03+m0eClocuK6Ls9PovXt0UrQ93I1rZYKx7 moeeqXvSJkt6GBTLKqYp5trHKN0vCoVaLl/oGcL7THet3rc/GrjmeG7rTT0cVOcyE8VYUN UDRRq+/cVBHcyRviWUeypDO28OWsRFaavm4O6g68kvT59zvulT5LN6urK/8g9QuYD4FzAW 9/WrUSzT/XKWNYOGkvNWxvDIfRV1+KvuhE+r22m18UKDEtsVrGiT4LkObcGiRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmQhY1Btyz1SLk; Tue, 22 Jul 2025 05:25:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56M5PXtF091433; Tue, 22 Jul 2025 05:25:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56M5PXa5091430; Tue, 22 Jul 2025 05:25:33 GMT (envelope-from git) Date: Tue, 22 Jul 2025 05:25:33 GMT Message-Id: <202507220525.56M5PXa5091430@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Wolfram Schneider Subject: git: 479b9db52635 - main - release: make symlink creation for src.tgz more robust List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: wosch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 479b9db52635f0ec6de896aafdedfa94c76c2af9 Auto-Submitted: auto-generated The branch main has been updated by wosch: URL: https://cgit.FreeBSD.org/src/commit/?id=479b9db52635f0ec6de896aafdedfa94c76c2af9 commit 479b9db52635f0ec6de896aafdedfa94c76c2af9 Author: Wolfram Schneider AuthorDate: 2025-07-22 05:22:39 +0000 Commit: Wolfram Schneider CommitDate: 2025-07-22 05:22:39 +0000 release: make symlink creation for src.tgz more robust PR: 288256 Approved by: emaste Differential Revision: https://reviews.freebsd.org/D51335 --- release/Makefile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/release/Makefile b/release/Makefile index 5d7d1402d6f8..b6a9aa42c2e2 100644 --- a/release/Makefile +++ b/release/Makefile @@ -162,7 +162,8 @@ kernel.txz: # Also (if enabled) kernel-dbg.txz. src.txz: mkdir -p ${DISTDIR}/usr - ln -fs ${WORLDDIR} ${DISTDIR}/usr/src + rm -f ${DISTDIR}/usr/src + ln -s ${WORLDDIR} ${DISTDIR}/usr/src ( cd ${DISTDIR} && ${TAR_XZ_CMD} -cLvf ${.OBJDIR}/src.txz \ --exclude .svn --exclude .zfs \ --exclude .git --exclude @ --exclude usr/src/release/dist \ @@ -170,7 +171,8 @@ src.txz: ports.txz: mkdir -p ${DISTDIR}/usr - ln -fs ${PORTSDIR} ${DISTDIR}/usr/ports + rm -f ${DISTDIR}/usr/ports + ln -s ${PORTSDIR} ${DISTDIR}/usr/ports ( cd ${DISTDIR} && ${TAR_XZ_CMD} -cLvf ${.OBJDIR}/ports.txz \ --exclude .git --exclude .svn \ --exclude usr/ports/distfiles --exclude usr/ports/packages \ From nobody Tue Jul 22 09:24:59 2025 X-Original-To: dev-commits-src-all@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 4bmX0r3hzlz62nRt; Tue, 22 Jul 2025 09:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmX0q6F73z3xVs; Tue, 22 Jul 2025 09:24:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753176299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LWUPy8cRtTx3MKPdOAQnrbYCdHKCLVq1fTa3tcOsHAo=; b=Lad430rRA7ZZyreO5qS0fg3saF2ox7zcyCXsWE5taXrraByqKzCUg+yANALW7PX+s2+2KC VycdxVxIzllz9sF7IxI3czCTzBNUM8y1JEBOvQJ290Bpkpj+meiuzTCRvLJMqLFDrTdpRx ok1RZcDQ4C+TMpKpMkDqSNUgRTTUBoPNjtZFXcOOpfKcUlDmKbuP4Of78K/mL0R1UneJGa TIf4rl+ny5N55OzZc0AI6ueEcO3dxnrje938hkXKVdhDHjwQ+x2vm3KCIMStbdk03/4mB5 5sjOymzKE0zH1QA6+1GKxQ9nlghtIUediVmafcxFotp+7WGJeUS8buGxZGSHgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753176299; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LWUPy8cRtTx3MKPdOAQnrbYCdHKCLVq1fTa3tcOsHAo=; b=r/jk7L6gM+feI4fF/5yJy2zlduCwMhg6HV/GiD4KgpkFyKatrtWyZY2LEqm+m4v+RZFpqc rDbOxHSb/FwQ87mnetP96zgo8GbXIFfD6R/N+Yw8pQ+MaVKk72lDzPdPfesIW/pAjLSia+ GT44jm0UR4m9joilPohucay30yRwArUuGmhhQsN8S0Y/yTWyCQvwi/XBxom+F1D6isrFs3 AKGl2s9PwZCn7JRGfnkGFYEKjXe9CGzYlQZxv3r2PCYvtBxy/g+qxfC+Cw1U55JF0l/KJt 6glONeSGurStzz4ibru8AKyQ6GWsTELlf/TcF/4rSNYAfCzPEC91FNjt3+UTwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753176299; a=rsa-sha256; cv=none; b=fOxAO1FmHcVD5FCwkJ6vVQCdzax2U0g/lPk4q3fpIMQB6aDsI7RT5Z7F3GdgOnBVuE/dn0 fXSWk7qKspi5+n6HWLPJsBq+hCpYQuI6xHDmG52+70IiyRqVccHdfxU3Fixd1jjse7cut/ MbuTon52Ipjl3W5GTAzHIvJE8MfiXm9Rp1E59jFXbMZK5FHRkWJpke6VZ49DpLpxd+KF/L f/fVvwqr12UyCfHizJOyXYIY8m2Jlr83VxCe/8zBsm+m+Me3ESPUHEU4DPhO/1kDaxyN38 YyH+vJv2E7RabtfBPj0UT3XyKpSdhBbm+urHeI22azG1LFgmBIFdFHUlpH0iog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmX0q5ryrz6BT; Tue, 22 Jul 2025 09:24:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56M9OxYE043366; Tue, 22 Jul 2025 09:24:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56M9OxdF043363; Tue, 22 Jul 2025 09:24:59 GMT (envelope-from git) Date: Tue, 22 Jul 2025 09:24:59 GMT Message-Id: <202507220924.56M9OxdF043363@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 94c1c907f8c7 - main - reboot(8): add support for noshutdown List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 94c1c907f8c78d8c8ad34b6a7d374384f8fb71b6 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=94c1c907f8c78d8c8ad34b6a7d374384f8fb71b6 commit 94c1c907f8c78d8c8ad34b6a7d374384f8fb71b6 Author: Konstantin Belousov AuthorDate: 2025-07-10 23:58:46 +0000 Commit: Konstantin Belousov CommitDate: 2025-07-22 09:22:06 +0000 reboot(8): add support for noshutdown Similar to shutdown(8), refuse to reboot if /var/run/noshutdown is present. The -f option can be used to force operation. Reviewed by: imp Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D51241 --- sbin/reboot/reboot.8 | 9 +++++++++ sbin/reboot/reboot.c | 7 +++++++ 2 files changed, 16 insertions(+) diff --git a/sbin/reboot/reboot.8 b/sbin/reboot/reboot.8 index 0ddcee643244..1bbc39d52be4 100644 --- a/sbin/reboot/reboot.8 +++ b/sbin/reboot/reboot.8 @@ -110,6 +110,15 @@ Care should be taken if .Va value contains any characters that are special to the shell or loader's configuration parsing code. +.It Fl f +Force reboot. +Normally, +.Nm +checks for the presence of the next kernel, +and absence of the +.Pa /var/run/noshutdown +file. +Without this flag, reboot is denied if one of the conditions failed. .It Fl k Ar kname Boot the specified kernel .Ar kname diff --git a/sbin/reboot/reboot.c b/sbin/reboot/reboot.c index 9825d4f96319..f6065e80fb66 100644 --- a/sbin/reboot/reboot.c +++ b/sbin/reboot/reboot.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include #include @@ -222,6 +223,7 @@ main(int argc, char *argv[]) { struct utmpx utx; const struct passwd *pw; + struct stat st; int ch, howto = 0, i, sverrno; bool Dflag, fflag, lflag, Nflag, nflag, qflag; uint64_t pageins; @@ -294,6 +296,11 @@ main(int argc, char *argv[]) if (argc != 0) usage(); + if (!donextboot && !fflag && stat(_PATH_NOSHUTDOWN, &st) == 0) { + errx(1, "Reboot cannot be done, " _PATH_NOSHUTDOWN + " is present"); + } + if (Dflag && ((howto & ~RB_HALT) != 0 || kernel != NULL)) errx(1, "cannot delete existing nextboot config and do anything else"); if ((howto & (RB_DUMP | RB_HALT)) == (RB_DUMP | RB_HALT)) From nobody Tue Jul 22 09:59:49 2025 X-Original-To: dev-commits-src-all@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 4bmXn161bKz62pfJ; Tue, 22 Jul 2025 09:59:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmXn15RQyz3M9s; Tue, 22 Jul 2025 09:59:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753178389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2ej8Ve1D/PNvMAdRuW3C4PAXvugNgfh8tlwtfns1RbA=; b=m0HlTjzfYs82/khRTUNEh+wFsjqXC6agOlxo3DFVOxfW7nY48ns+sPJEQrKVP4Zy8ETbvp 35DvqQWzRMzirg5WsEZI8XBmSfQAERoJY6W6/bB+6LW1SX3e/7RhwcwmurLn7LZmibOkBW ee+UMeLUf3gqnmEeecAvnh/OppurTNMqZk60D6ROsqNl4WL+8nh048gcGMOkat3A1yu1av 8NwPrnYuuOOe2uLjgmp3NWzTDiclsz3ZGq5N41IjrKtpoGy/FxrdWu/3S436xIro8xRsyK uIjMb5m+als4OCOi82i6m1g1/t9Dk93+2FI+xAlrZyKyvlPotJxZUGCJWP6VeQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753178389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2ej8Ve1D/PNvMAdRuW3C4PAXvugNgfh8tlwtfns1RbA=; b=fVHXX5JEo/5dmmzO8WTFboXIBm8Ho+C+86SumBTQBnd/0BTd9UmSEbSO3XxR5G+FzCloG1 PHlXs1KLlxb0rplZbr2SS4EsLZosWODg1iTcdR/uO32K3SNUDnUQXN5jh54QqBl3YYP0XM E3I4lc4nTPibCPLRBLvJZZEcmjqbejsy5fOSuUhkvn0VxfhqWaOHtUwEH7NIOxFZq81fev 4aj5MbjTNRmCOVJJB1afTst2nLlTLH+hTZeEn1fzb793OVxxAEv48Jjy+EW+CoYQYOJsBw AQ0sZuCp+G894YqRZZisyGRnjKmNnHEyNyzZxZ7zQ8y4kXyZS2ln4sbPVcpu1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753178389; a=rsa-sha256; cv=none; b=Hc4p0LL9xRCfDvJev8BUSS/3Zkkpty6DjVkmvkBucLh+AEoE6eAW2GvKRTOYCDub5Se/Ed pfaj2C6SVePbjdzn6/cVRj+w1tg3mj1X6zO6Q6Qs7FXQQQ6+hXBBhf9RFtg23PR3283Ahs u8YWwaQlVJB05Kmq0thaBdbOxGRlNW3fOCr7xuQ6eOfTVIPbv5fv/3soIQzXYjwjCbTnKI K/U9aMUAN/wkWx0WCm5LClqOf5eg2henCGFDOZkLSBRhnmGzFTMLZOAOXZdpVOUPS0E35F LDHwPOo3JVGLd4ph5DULtsskzPv7+7BmUghwTH2VGYGnLuCV2y6tt/j7GF2ekw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmXn14hqHz70G; Tue, 22 Jul 2025 09:59:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56M9xnV6000607; Tue, 22 Jul 2025 09:59:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56M9xnR9000604; Tue, 22 Jul 2025 09:59:49 GMT (envelope-from git) Date: Tue, 22 Jul 2025 09:59:49 GMT Message-Id: <202507220959.56M9xnR9000604@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eugene Grosbein Subject: git: 044febb24a26 - main - devd(8): correct error logging List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 044febb24a26d92066b2849eb583f57e37acdbfd Auto-Submitted: auto-generated The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=044febb24a26d92066b2849eb583f57e37acdbfd commit 044febb24a26d92066b2849eb583f57e37acdbfd Author: Eugene Grosbein AuthorDate: 2025-07-22 09:55:08 +0000 Commit: Eugene Grosbein CommitDate: 2025-07-22 09:55:08 +0000 devd(8): correct error logging Fix a mistake in a log message that leaked from my preliminary patch. PR: 287873 MFC after: 3 days X-MFC-with: bd4a4e46ceacd8dfc5a5469ec6edd8c92c53605a --- sbin/devd/devd.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc index 375ccd817146..6705dcc0158e 100644 --- a/sbin/devd/devd.cc +++ b/sbin/devd/devd.cc @@ -1354,8 +1354,7 @@ main(int argc, char **argv) len = sizeof(vm_guest); if (sysctlbyname("kern.vm_guest", vm_guest, &len, NULL, 0) < 0) { devdlog(LOG_ERR, - "sysctlnametomib(kern.vm_guest) failed: %d\n", - errno); + "sysctlbyname(kern.vm_guest) failed: %d\n", errno); } cfg.parse(); From nobody Tue Jul 22 10:10:01 2025 X-Original-To: dev-commits-src-all@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 4bmY0p1RwJz62qHM; Tue, 22 Jul 2025 10:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmY0p0lyFz3Pq6; Tue, 22 Jul 2025 10:10:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753179002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ekL9UYyhiOnyz+xzcqyLQOmfpJHikG+laX+bONDFrEE=; b=IliW78tNVivL4baHxDLuE+OrK3cptEKormVIdMvAQQKKyiHGNEN4TwdOxUxlvfpXnumSpX ktiUJGTjwALsqu62Jec5VmOn9QujFk9SUzF+TJQLHv1Pp90V7/PqFEpCBIHV7NPUvRDkxD r48JZCw4nqA5hJAwvYYqj8tf/DQKZuQQJufcAdM6/0uss+H03Y5HJNhxKOX3XPrR3WUzH3 VyO0znf49nGQB8RVYj3gwtLKsWRrTH/4LzqX3zMPhs+wjSsPucZirVvOByFqjdmLb7nXb0 +FxSPsFPPRi/dMECXPH3HVCt7q915QpAHVH31HhrfJbYn6qCq8Z+stZRoaI+HQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753179002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ekL9UYyhiOnyz+xzcqyLQOmfpJHikG+laX+bONDFrEE=; b=C/5Yw1/9CkFToLGh2RbLyKC9D0AOVYlSw1Bjl2ywYa9lMBzU4wy45ya1KsqHMBCcYr6U/S cbHflzjCSGbF3KwPgn1bFbTETb4kMv949GHjlXmdtpocpXNHeMB6MzH+knkDWtGjqOGhVl 5eP36m8YMSeJVOtNYGz2IpbeYdapkLC29HcynepVhHzWrczQtvg2W9rgw6xyE0Qdyoa9ez pn2a18zEu400fsk+h6B1HDaeAlxep3mEJ3F01RJQGiqQJyj6a4ZL6fX5NTVciERw9rgz2a u4PSysKkJMX+tiKto9AdnuQIwZdNNdOFla2z+rOJzsp34Gfr1cgSxyGMU3xVfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753179002; a=rsa-sha256; cv=none; b=P7zeamvVXQDD/j6Gqjpj1YGIkxnhSVMCGlnYIWMu5MwDvi2FRJo8wbqub/PIhkP+VKQu5R X1sTqToMk2X4r1/SI+9L646+xhfAHzuy/vaxFxvTIAwFnBQZSsyQ6hvXTvYdTcKCflpvwl OP8YZRW3ZFL6oRB8ZB7/yef8cuP6TCuNQmhC835/5icXq+yKVmJkDF6ZmbMt2Yz6QgcZRb 1Iv8N5AJsSPxFsNPlTIq4JwFXqtTbMev17DmQwGz+B5sQC9GfdEcwXQj5KWA+vZ28FvbeP qkjZ0eLYMPuynQ8/V+9QYM4emMzbLLeWn4Z8mbCLPMHh2hy4m3TUbwtLtdWtrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmY0p0Bfsz7FK; Tue, 22 Jul 2025 10:10:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MAA1xT022449; Tue, 22 Jul 2025 10:10:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MAA1hD022445; Tue, 22 Jul 2025 10:10:01 GMT (envelope-from git) Date: Tue, 22 Jul 2025 10:10:01 GMT Message-Id: <202507221010.56MAA1hD022445@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eugene Grosbein Subject: git: d4a0e749cc66 - main - devd.conf(5): call hyperv_vfattach in a Hyper-V guest only List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d4a0e749cc66cd5d019d8fb8f43427109aef4c9f Auto-Submitted: auto-generated The branch main has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=d4a0e749cc66cd5d019d8fb8f43427109aef4c9f commit d4a0e749cc66cd5d019d8fb8f43427109aef4c9f Author: Eugene Grosbein AuthorDate: 2025-07-22 10:06:24 +0000 Commit: Eugene Grosbein CommitDate: 2025-07-22 10:06:24 +0000 devd.conf(5): call hyperv_vfattach in a Hyper-V guest only Limit calls to /usr/libexec/hyperv/hyperv_vfattach to Hyper-V guests. PR: 287873 MFC after: 3 days --- sbin/devd/hyperv.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/devd/hyperv.conf b/sbin/devd/hyperv.conf index 13695a0c75b6..70108ac36e54 100644 --- a/sbin/devd/hyperv.conf +++ b/sbin/devd/hyperv.conf @@ -103,5 +103,6 @@ notify 10 { notify 10 { match "system" "ETHERNET"; match "type" "IFATTACH"; + match "vm_guest" "hv"; action "/usr/libexec/hyperv/hyperv_vfattach $subsystem 0"; }; From nobody Tue Jul 22 10:40:42 2025 X-Original-To: dev-commits-src-all@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 4bmYhB4Y4bz62rnt; Tue, 22 Jul 2025 10:40: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmYhB27vSz3hgR; Tue, 22 Jul 2025 10:40:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753180842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pjh9uvvgCDWWdjAnm2BlxO8mA7DDsBd8WqB9xE+ntfo=; b=MQaqQhknN47UsKbDP3+lpjCpB+0+hvqOqWc8aFddpriMw9Yz07lOi3sfiKw0GsQsNehNZ/ rLilF4lNOinVAPlsA8PFBkjxoSrBfHVlPAsi+5EZ0nFfUis+sCD4tNQHYURNcOKmDcftQc 0aNnCzQHvQ1wq171ozl1wVzXmYbM0WfyFYUZnVS/pbFG+b0Fy4lU2jUusE5gFO9IOy+quf nkSwbX6FE0Hy/TR85ZQXLEDG08i/2Q7fdnqN/k69J6IOU1S7RReOek+wr2GF7mTlBlYvNE ueT6dDFBZxbXOHhEaR5+g+M6mQxBDdUz3PhIQ7xLEmrTYDBicR6OgXn55dCZIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753180842; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pjh9uvvgCDWWdjAnm2BlxO8mA7DDsBd8WqB9xE+ntfo=; b=Kdcthg8npH2knbammDGryZbz7y4QX12YVRHbN+dygDJu3bb2yblFeoJiIpg+T2D1TaVGzZ 9+n+OzhcFjXT8ZJ08j88Hu/oaz5yCz0x1VOzA2nQo3A42Ly0yGsDJLPjC6GijF8A5vv8uG dE7ww1rjPDI/wvo7xIEuonfZrJE0kizXM+x1/v5a0ZJXY9H4PGko4SSPQZxnrjq54pD/W2 wfWUzMXKF6AIXQ0blAUeL17OayN4p6dOQczkNB7xCDpHoYwO39X2MBO6PLq39+We4WpKpC gPRBYTeD59sPa7uUFn8QY0ZI58rRfwQkTlWyA81CZzc7G0w6FqgZs9SG6iFgYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753180842; a=rsa-sha256; cv=none; b=tFrhaUK+j7QeXr9rr969wL5eRnr1xE1mngrhKnB3JbKq1ypjCfrmT8HDLW6mPU5/IgNFIV Bq0UCnfY+aHW8b3Ml8VzA16qxTcYkqF21SoCwFWyKWxEwmY8LNS8nAIPZS65fF+XUfIC58 BfDb3Dho0qzTpXxhOzdH76DrTuhp4ne31QVh3gLowN7sM2DPWHTtnDygNzUG/DW2fAkKj3 w0dj7qVgrkJE6LY7CL+ePtXOLmljI54GXck46xqg6yZ8DCbr1CrnFEkxrWQce+wFqRUDbO UFph2xhanZmYXykqwLE4fgOZiLAv1QKB2LF0FXZa+PkbZkOBBiqu9OLqMm4vIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmYhB1XGqz7fV; Tue, 22 Jul 2025 10:40:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MAegiW086352; Tue, 22 Jul 2025 10:40:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MAegHi086347; Tue, 22 Jul 2025 10:40:42 GMT (envelope-from git) Date: Tue, 22 Jul 2025 10:40:42 GMT Message-Id: <202507221040.56MAegHi086347@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: 9f3e4b28f9de - main - tests/ci: Fix missing qemu devices List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bofh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9f3e4b28f9dec27b73eeebd161d119d1e9864081 Auto-Submitted: auto-generated The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/src/commit/?id=9f3e4b28f9dec27b73eeebd161d119d1e9864081 commit 9f3e4b28f9dec27b73eeebd161d119d1e9864081 Author: Muhammad Moinur Rahman AuthorDate: 2025-07-22 10:37:38 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2025-07-22 10:40:32 +0000 tests/ci: Fix missing qemu devices Fix missing QEMU_DEVICES which in turn is the META_TAR device Approved by: imp, lwhsu Sponsored by: The FreeBSD Foundation Pull Request: https://reviews.freebsd.org/D51445 --- tests/ci/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/ci/Makefile b/tests/ci/Makefile index 44b19663fc49..06c6554564a9 100644 --- a/tests/ci/Makefile +++ b/tests/ci/Makefile @@ -110,7 +110,7 @@ QEMUTGT=portinstall-qemu .endif .endif QEMUTGT?= -QEMU_DEVICES?=-device virtio-blk,drive=hd0 +QEMU_DEVICES?=-device virtio-blk,drive=hd0 -device virtio-blk,drive=hd1 QEMU_EXTRA_PARAM?= QEMU_MACHINE?=virt QEMUBIN=/usr/local/bin/qemu-system-${QEMU_ARCH} From nobody Tue Jul 22 10:40:43 2025 X-Original-To: dev-commits-src-all@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 4bmYhC6SCKz62rv7; Tue, 22 Jul 2025 10:40: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmYhC33Ldz3hLH; Tue, 22 Jul 2025 10:40:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753180843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8oZ+7HTM6+fEH2JRku4pRWrCc3Rw13jGgo7RmElRcH4=; b=IE5Eoytf9T1x6DE38CUhxSFEz4zE9la0YepVD9cBP8weg+dwHIFBJ2XYFimfl7FBmKHDpI gHHtLU8L9duGAQhOe+vCV3RdwdHnhG03mVcE7PUr+iD7yfic6FJhqGr6NrXTvLSkgkp/kR w93t79/LoobK83lCVOimVvBM/chzxJ2DwlRzYlyzZ9LbrF7Kj9oNOj5jdV1LiC50RLHfCI nYnCBUiVhlNlBghjNh3AQUF35kIduy2RFlkA/ZYvwsh0mYYui674ETN6GqPHasX6eZ7QbX CHpCLPzQrFToEAXAwosidhlcEB+zOXRLiBrCKq9TP9yIIdnMKrtfZ+QKsnVEiQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753180843; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8oZ+7HTM6+fEH2JRku4pRWrCc3Rw13jGgo7RmElRcH4=; b=j5CM8PFaZWZ1tFIKqiYIBqvfRs+C+gSpjGV8xDg6x9Ua8ViLMwSRaHQRryGKLvI6ipjbq9 Xa3V4UuNfmJgzhv8CWid/8pjYHG5b4h2a9586LzUrBf+5BvpFx6nftVijeJWCIkIEFvNhL 61iKyu7YdGYfG8Sb6DCb4aaIFeMff7eJZfScUrEoLcQpyI/ULsaZeLr2Bb55jQ8TrtBbAy 7r5ba3ic3bsS9EqtCnKIN7GjkoOwEwX9pnP/Y73k1WX2TsyeF6mzIE24WOyn3fYLSfzPe+ CKQt7HTY+n/ld19ey9IyE1lMn4v31bLsZkBK0AFd4WQ6vJX+9oT3awCL20W4Gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753180843; a=rsa-sha256; cv=none; b=M1QoxuKGWOWtQALrvfo1FcLt5geNzhns06YMtK5wqz0yHcECOjm9GPYD8DClKbr2eot3PI j325VBjja1MjEmAJ8B5w9pzevqekZ3vT1PFeHY8cwpgsEh9oDXdlE2icdsb6lcNyqZPnHd NoWu1ci5koI6qqva6eN2oXDZiN2hscBWsP5l/FnkRzYzorYoG9kjGewnzXTVWhkzZEdjJK 7CyUuxfImgFDdTfY7YAFztDksxrWFcfv0letU/Yai2upfw3f/JensXnkRLwsSHuYi76TSA ibAiXaqxJE7lihPgRQM/INfMLWEJuZMCNdwqrqN+uVIh0J93+HPrZxPonfIu3Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmYhC2F7lz800; Tue, 22 Jul 2025 10:40:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MAeh6Z086389; Tue, 22 Jul 2025 10:40:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MAehoG086386; Tue, 22 Jul 2025 10:40:43 GMT (envelope-from git) Date: Tue, 22 Jul 2025 10:40:43 GMT Message-Id: <202507221040.56MAehoG086386@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Muhammad Moinur Rahman Subject: git: 7f849b7f4e19 - main - tests/ci: Indent Makefile properly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bofh X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7f849b7f4e192d32d617c492d50197c09bd20a56 Auto-Submitted: auto-generated The branch main has been updated by bofh: URL: https://cgit.FreeBSD.org/src/commit/?id=7f849b7f4e192d32d617c492d50197c09bd20a56 commit 7f849b7f4e192d32d617c492d50197c09bd20a56 Author: Muhammad Moinur Rahman AuthorDate: 2025-07-22 10:39:51 +0000 Commit: Muhammad Moinur Rahman CommitDate: 2025-07-22 10:40:33 +0000 tests/ci: Indent Makefile properly Approved by: imp, lwhsu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51445 --- tests/ci/Makefile | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/ci/Makefile b/tests/ci/Makefile index 06c6554564a9..b8797e06ac75 100644 --- a/tests/ci/Makefile +++ b/tests/ci/Makefile @@ -33,11 +33,11 @@ EXTRA_MAKE_FLAGS?= TARGET= ${MACHINE} .endif .if !defined(TARGET_ARCH) || empty(TARGET_ARCH) -.if ${TARGET} == ${MACHINE} +. if ${TARGET} == ${MACHINE} TARGET_ARCH= ${MACHINE_ARCH} -.else +. else TARGET_ARCH= ${TARGET} -.endif +. endif .endif IMAKE= ${MAKE} TARGET=${TARGET} TARGET_ARCH=${TARGET_ARCH} @@ -47,20 +47,20 @@ CROSS_TOOLCHAIN_PARAM= "CROSS_TOOLCHAIN=${CROSS_TOOLCHAIN}" # Define OSRELEASE by using newvers.sh .if !defined(OSRELEASE) || empty(OSRELEASE) -.for _V in TYPE BRANCH REVISION -. if !defined(${_V}) || empty(${_V}) +. for _V in TYPE BRANCH REVISION +. if !defined(${_V}) || empty(${_V}) ${_V}!= eval $$(awk '/^${_V}=/{print}' ${.CURDIR}/../../sys/conf/newvers.sh); echo $$${_V} -. endif -.endfor -.for _V in ${TARGET_ARCH} -.if !empty(TARGET:M${_V}) +. endif +. endfor +. for _V in ${TARGET_ARCH} +. if !empty(TARGET:M${_V}) OSRELEASE= ${TYPE}-${REVISION}-${BRANCH}-${TARGET} VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET} -.else +. else OSRELEASE= ${TYPE}-${REVISION}-${BRANCH}-${TARGET}-${TARGET_ARCH} VOLUME_LABEL= ${REVISION:C/[.-]/_/g}_${BRANCH:C/[.-]/_/g}_${TARGET_ARCH} -.endif -.endfor +. endif +. endfor .endif .if exists(${.CURDIR}/tools/ci.conf) && !defined(CICONF) @@ -104,10 +104,10 @@ TIMEOUT_VM=$$((${TIMEOUT_EXPECT} - 120)) . include "${.CURDIR}/Makefile.${TARGET_ARCH}" .endif .if ${TARGET_ARCH} != ${MACHINE_ARCH} -.if ( ${TARGET_ARCH} != "i386" ) || ( ${MACHINE_ARCH} != "amd64" ) +. if ( ${TARGET_ARCH} != "i386" ) || ( ${MACHINE_ARCH} != "amd64" ) QEMUSTATIC=/usr/local/bin/qemu-${QEMU_ARCH}-static QEMUTGT=portinstall-qemu -.endif +. endif .endif QEMUTGT?= QEMU_DEVICES?=-device virtio-blk,drive=hd0 -device virtio-blk,drive=hd1 From nobody Tue Jul 22 10:47:49 2025 X-Original-To: dev-commits-src-all@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 4bmYrQ0nKgz62s4V; Tue, 22 Jul 2025 10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmYrP54Z1z3p1Y; Tue, 22 Jul 2025 10: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=1753181269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Pk538kZMxqYXRYk6dXYBxGSwPjEhaMyTSzbo5WEocg=; b=QlJDo+DaZXYAFnopT7Ua4tz8mtY7JHiNKMtQiG9S74E53hQfndN+lMnKFTK6rgy3sUgKV1 ssIX/MHV9RqfLRBrKFydo8N6ScWkgCfXRFaCUSmvYxpo6VCN9RUQ5+ySVPf6+xVfHbZYrc Imf+QYMxgGV7qND8Z4DKZ5wojbBuWAeefNlsCIu6dimuchLBhUC61kF1AYWDe2fdTrnYbU X9/FzTeb2qVqPKD9Tt8LDFFQijGBJXzOxVB8vUdD4PhRNan+ur0NtxB9yu+O/KzaMCICFv GP1bvbNZEv9BLQHitJvMcds4guazxfJjCDAIRpwNLjiEbpbSW1EFe8Gt8amUvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753181269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Pk538kZMxqYXRYk6dXYBxGSwPjEhaMyTSzbo5WEocg=; b=YPacVVPG+C2VXWr9ajdr+8/vyGy+DP6OuW6pbJNh5CVcUaAK0isgOk6EIScZiu4jZNKc4P XHRSIyiuSfV7fzJURR2qLEQNbZkNB8U4+LzTeW/yuu4wMBPovbVjkizfBmbv32nxE7Ea4H b9fDH+vdvpMK5U1ePF0Ps1conbJyR8N2YHvVgz5eQpStNYFI+EE6h7M4EbWYkkw1S/zoYj aVzZy6lgyzklSIK1EbltE9cQC2m+P7I3apo/GjhM+jEG5m0ctCDuDXrB8qY1VHQd/5PADH 0UCwW08r79xPd4OLN35MjkneeWw4pEzTeqZJJ8ZY76maBVv28OMdtgdXg0b4sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753181269; a=rsa-sha256; cv=none; b=QJX1WnDy3qhs30qodrQDihRC1B3p2Q9edAouu0Kfs1yL0GyVuTXh86RFb30qGmq2abDXhb NHtaYPdXTu1EUobK9Zo77CsdT+SlFbt809QjQo6k66FoARbo04fRrQPw96saxvIOAGDgtq n9PszUM2MpN85tOvZbPCMTrtqvwQ69HzThC+oSOTzsDJb+tBtQH6tV0+4e06cJu4qnoy41 VaqSoSBbNQOGAv76d58Vft3p1cCLncv3UMRLw9vKP6lQkqVk9ekZNKrvnid5PRScQFcXQX LGpzxs6uwGpNsHWuW/TMpKGoz4eK/t/fNwBBmPGBOlepreppWb3F+ZgS2np7Vg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmYrP3sD0z8R8; Tue, 22 Jul 2025 10:47:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MAlnst095372; Tue, 22 Jul 2025 10:47:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MAlnKI095369; Tue, 22 Jul 2025 10:47:49 GMT (envelope-from git) Date: Tue, 22 Jul 2025 10:47:49 GMT Message-Id: <202507221047.56MAlnKI095369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Doug Rabson Subject: git: 0fbe9f8ef94d - main - share/examples/oci: Run 'pkg update' with IGNORE_OSVERSION set List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dfr X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0fbe9f8ef94d15439e89a3ab951d1dda254d54e3 Auto-Submitted: auto-generated The branch main has been updated by dfr: URL: https://cgit.FreeBSD.org/src/commit/?id=0fbe9f8ef94d15439e89a3ab951d1dda254d54e3 commit 0fbe9f8ef94d15439e89a3ab951d1dda254d54e3 Author: Doug Rabson AuthorDate: 2025-05-28 15:00:00 +0000 Commit: Doug Rabson CommitDate: 2025-07-22 10:46:01 +0000 share/examples/oci: Run 'pkg update' with IGNORE_OSVERSION set This allows the image build to work even if the host's OSVERSION doesn't match the pkgbase OSVERSION which happens if the host's patch level or release version isn't the same as pkgbase. Also fix the image name so that Podman/Buildah will fetch it automatically, removing the need for users to pull an image and retag it before using this example. Reviewed by: dch MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D50596 --- share/examples/oci/Containerfile.pkg | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/share/examples/oci/Containerfile.pkg b/share/examples/oci/Containerfile.pkg index 074c470affc9..f6699c79af71 100644 --- a/share/examples/oci/Containerfile.pkg +++ b/share/examples/oci/Containerfile.pkg @@ -6,7 +6,7 @@ ARG version=14.snap # Select freebsd-runtime as our starting point. -FROM localhost/freebsd-runtime:${version} +FROM ghcr.io/freebsd/freebsd-runtime:${version} # A list of package(s) to install ARG packages @@ -15,7 +15,10 @@ ARG packages # use for downloading pkg since the freebsd-runtime image has both FreeBSD and # FreeBSD-base pkg repo configs installed and FreeBSD-base does not contain the # pkg package. -RUN env ASSUME_ALWAYS_YES=yes pkg bootstrap -r FreeBSD && pkg update +# +# Set IGNORE_OSVERSION to allow building e.g. FreeBSD-14 images on +# FreeBSD-15 hosts. +RUN pkg bootstrap -y -r FreeBSD && pkg -o IGNORE_OSVERSION=yes update -f # Install some package(s). RUN pkg install -y ${packages} From nobody Tue Jul 22 11:56:56 2025 X-Original-To: dev-commits-src-all@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 4bmbNW3x2yz62wX7; Tue, 22 Jul 2025 11:57:15 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmbNV6Nbbz3TGB; Tue, 22 Jul 2025 11:57:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 56MBuuvx035114; Tue, 22 Jul 2025 14:56:59 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 56MBuuvx035114 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 56MBuuBa035113; Tue, 22 Jul 2025 14:56:56 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Tue, 22 Jul 2025 14:56:56 +0300 From: Konstantin Belousov To: Cy Schubert Cc: Jessica Clarke , Cy Schubert , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: c7da9fb90b0b - main - KRB5: Enable MIT KRB5 by default Message-ID: References: <202507211410.56LEAD6J066633@gitrepo.freebsd.org> <47C3CC37-6F32-4376-900A-B5387B9817D5@freebsd.org> <20250721144645.3BA391BE@slippy.cwsent.com> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250721144645.3BA391BE@slippy.cwsent.com> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Rspamd-Queue-Id: 4bmbNV6Nbbz3TGB 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:6939, ipnet:2001:470::/32, country:US] On Mon, Jul 21, 2025 at 07:46:45AM -0700, Cy Schubert wrote: > In message <47C3CC37-6F32-4376-900A-B5387B9817D5@freebsd.org>, Jessica > Clarke w > rites: > > On 21 Jul 2025, at 15:10, Cy Schubert wrote: > > >=20 > > > The branch main has been updated by cy: > > >=20 > > > URL: = > > https://cgit.FreeBSD.org/src/commit/?id=3Dc7da9fb90b0b6385e99bb7747476359b= > > 712993fa > > >=20 > > > commit c7da9fb90b0b6385e99bb7747476359b712993fa > > > Author: Cy Schubert > > > AuthorDate: 2025-07-19 14:11:18 +0000 > > > Commit: Cy Schubert > > > CommitDate: 2025-07-21 14:07:22 +0000 > > >=20 > > > KRB5: Enable MIT KRB5 by default > > >=20 > > > Set WITH_MITKRB5=3Dyes as the default. > > >=20 > > > Rebuild all USES=3Dgssapi ports is recommended. > > >=20 > > > A clean buildworld is required. > > > > That=E2=80=99s going to be quite annoying and cause a lot of issues = > > given > > WITH_CLEAN is now the default. Can we do something in depend-cleanup.sh > > to delete everything from the obj tree that needs to be rebuilt if we > > detect the wrong kerberos implementation was previously built? > > All binaries that depend on any kerberos libraries must be rebuilt. > WITHOUT_CLEAN will fail at various spots. Meta mode should take care of > this for us. Does the statement mean that ABI for the base libraries was broken? If yes, and the new libs have the same name as the old, we must bump dso versions. From nobody Tue Jul 22 12:38:00 2025 X-Original-To: dev-commits-src-all@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 4bmcHX6ZDMz62yM1; Tue, 22 Jul 2025 12:38: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmcHX4TC4z3wll; Tue, 22 Jul 2025 12:38:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753187880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sUAkVNVbnzYozW/A4OYx8C7zMmYFxLztzTrDO8jD9gs=; b=taKrI0cpWLASd2OsQ5Mzi0jc4f09UnftJDq73EIzJYenBpE+fABxojaU+ccXSq/HKh1ukG dND1dcWZTymAlUKBKrBUtAr2IwxJuI1BQ8YK6zHC+OXh8uvWjf4pcTmDGGPcjE08e6CxzE L63Ry3QSuFywtmxiz5Oj8o9BdiIyAxVbTjJmAaikVMNzipYp3XCLTRoi8IYn75MSXhF64i 8XY0YmQZlS0FzqNz5w/VI4RsECq1yPYH8GfFb94VYRhuCgaUmEaLuD7v4akPaeuEfscu2L CQGPsO6tKMnVrK7cwoX4592j7U860SzDTETPp3jQNI4xKj1cLUgJaPyc23neUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753187880; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sUAkVNVbnzYozW/A4OYx8C7zMmYFxLztzTrDO8jD9gs=; b=n03yv0O/s14K+XtNqFU0gvFBn8UxVMpdTdFd4qQy9/tORllYDK4GoBHq1eFKOdZU8SGSpg xjTJykEjAt+MO0ut8LHH5GiUPil3Q8icM3sHm+ZO87uChyUW4RxVcxaxZzzn1cY3R4tiVa d1HaeMEiorwopJTUSBiuDW+2vOS7PjaS4dPhkjGd1RNAwbEJgvxxEfVHZiZI/Bfq1QSynm E8QeSyn2PcYLDOqTOd2HWo2Za8NsTlg+5A0AlD3wTz5so/wTlnEYTBGvzmj1cNzgK5WSeE R7Qbzg2tzhYF5BzjvzN4i9hkV34LNr9QQBDv/Y6hjnAMgdVqLnOK3WP14elqdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753187880; a=rsa-sha256; cv=none; b=uqBfnn6+SQloW4uNPrPTzdo3AYcNjtE7x1rTnNf5sOTcULpRjjUjbLoQ0oFeRri6VcQIqQ AqSTFwBnjo55FJF/iY+S/ZKjUconXeDOHKspCxXh+GPAm4w49Jcw6/AaB5UIGlO8D0ohR7 rfClW2XfE+U0fc0gNrzuxONwVVG0baDzjYS3JAIrUcwRmujSIV/lofL8d5NAiqrxvLkPD6 HOll2AFf5zscpNiWLLQzo7aPJ2+eq6E8qlHhb9XOeTUrmr+uT9CaSK4qMonHU2lB6/kNcx xSweRFMLXCEZUZ41ybahmVXonqZzdbYLVWy18kQlKEe4FuySdxdsYQDTHlwePw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmcHX3jPjzBy6; Tue, 22 Jul 2025 12:38:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MCc0Pa002977; Tue, 22 Jul 2025 12:38:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MCc0Fa002974; Tue, 22 Jul 2025 12:38:00 GMT (envelope-from git) Date: Tue, 22 Jul 2025 12:38:00 GMT Message-Id: <202507221238.56MCc0Fa002974@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dmitry Morozovsky Subject: git: 392150e6ca66 - main - extend description of net.inet.ip.fw.one_pass List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: marck X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 392150e6ca6662f1d74c1c1fcff94945c875f966 Auto-Submitted: auto-generated The branch main has been updated by marck: URL: https://cgit.FreeBSD.org/src/commit/?id=392150e6ca6662f1d74c1c1fcff94945c875f966 commit 392150e6ca6662f1d74c1c1fcff94945c875f966 Author: Dmitry Morozovsky AuthorDate: 2025-07-22 12:32:34 +0000 Commit: Dmitry Morozovsky CommitDate: 2025-07-22 12:37:18 +0000 extend description of net.inet.ip.fw.one_pass Description of net.inet.ip.fw.one_pass tunable refers only to dummynet(4), while in reality is applicable on any divert-like packet action like in-kernel nat, netgraph, reass, or similar. Reviewed by: ae MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D51436 --- sys/netpfil/ipfw/ip_fw2.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netpfil/ipfw/ip_fw2.c b/sys/netpfil/ipfw/ip_fw2.c index 923633d76df7..c129c8c49921 100644 --- a/sys/netpfil/ipfw/ip_fw2.c +++ b/sys/netpfil/ipfw/ip_fw2.c @@ -196,7 +196,7 @@ SYSCTL_NODE(_net_inet_ip, OID_AUTO, fw, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "Firewall"); SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, one_pass, CTLFLAG_VNET | CTLFLAG_RW | CTLFLAG_SECURE3, &VNET_NAME(fw_one_pass), 0, - "Only do a single pass through ipfw when using dummynet(4)"); + "Only do a single pass through ipfw when using dummynet(4), ipfw_nat or other divert(4)-like interfaces"); SYSCTL_INT(_net_inet_ip_fw, OID_AUTO, autoinc_step, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(autoinc_step), 0, "Rule number auto-increment step"); From nobody Tue Jul 22 13:36:21 2025 X-Original-To: dev-commits-src-all@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 4bmdZt0xBGz5pQ5d; Tue, 22 Jul 2025 13:36: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmdZt0P0hz3hKd; Tue, 22 Jul 2025 13:36:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753191382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KppG/J/YJXaAmt49Xs/f/pkguUlatA3vI/DIl/JR3CI=; b=vtFL4LI3+3Zey7oJlyHxaSN2Ecn6wzVmnQ3EVPufzdx/vdkXwCGCAi2sp5fwz0CxESRhGz Yaix+Vd7eCNChGQzKMQLBHMRyDK8ZIyR3UL9tGuS6F/Y5uGXqgKl83W0F5DKgEf5FgMaa2 VQWV8tCRJQLlNw0vtby9MECOuQCAd9jmJVmADW/rLx6DmpSGRY2W2A0UagnpVCc62qzO+w MaTTjt59EXTbIgu/RVu6iHJXKNIBLl/P3vsaYYLAtrfrtc+j74O4IPW5V6Y/8eUvAfrHZT fZQFmvlSGDNe5xrbZN0a3Vm9YzD4ndKvhv7T46XyPWwNKqjeCt9kZlvDc6NSjQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753191382; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KppG/J/YJXaAmt49Xs/f/pkguUlatA3vI/DIl/JR3CI=; b=bnuhiVmrtsycc789TQgOPWhafVO3YS5HmuS2kBVIcqpf6KLF7ah4zH7Eo73oGdk+uYOvPF tCXuQSSs00hPEBTTKEZsyf6yXB4IVVLbu8MIWWPYBxpwiVKgpaSnMw/6Nd0yH0+r1+Q92o W8jGK6fm+Jl/0t27X5ntsUmr6PDDbCdWWqIbDQjax2v6CQ28ltBDZgP2xssrsEovi985Zj 3k/OO/lHwyOS4KODb0WQTplsiFuCnssWVPhuSNNBP6BN8YmfVDIQWVSUa1XKYOUk6RSeLl E2vV9SkWYWKmGWYXD5rF+xLV+RZpGse3FGyXOOV+dnIJ+wJZt60AhFyssIiVBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753191382; a=rsa-sha256; cv=none; b=rcmAHXnY9cYwaGJEer8f3YxfQLf1YDH0dnvfIdSeUAT44km+ZF8/sui08Aqkj2sXSykJAY Rknz4VIQeLFTPFuVRI82aUQMjfm+wXX8zvTG2AmDQ6xB065sirKu6Q5hJywDWA0EtqaZfz q1DAISLaxXFsRtBYG3gtpXVxtSfT/FuKfvIFX2J2Eqgk1qZbAyJaYL10Yj08ABl0K9w+wA 3m37Im2Y4Le+0FsqLn7TL+J/GMJM8/KqZUPufrJGM+NgDYeM2UubIlAQYdevheYhb7C5yK ZqwBMFpz1V4aoEUTV3/79pUor9x1fY2Xfbng3OO2KBybyiqH0JB0l1PY3yoimg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmdZs72xFzTWs; Tue, 22 Jul 2025 13:36:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MDaLna015196; Tue, 22 Jul 2025 13:36:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MDaLpL015193; Tue, 22 Jul 2025 13:36:21 GMT (envelope-from git) Date: Tue, 22 Jul 2025 13:36:21 GMT Message-Id: <202507221336.56MDaLpL015193@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: a94dd3955a9f - stable/14 - bsdinstall: wlanconfig: properly format regdomain dialog input List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a94dd3955a9f7ae51da152c31a4565c1a040c83c Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=a94dd3955a9f7ae51da152c31a4565c1a040c83c commit a94dd3955a9f7ae51da152c31a4565c1a040c83c Author: Bjoern A. Zeeb AuthorDate: 2025-07-14 18:32:53 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-07-22 08:21:46 +0000 bsdinstall: wlanconfig: properly format regdomain dialog input Without the extra '\n' the dual-column ('REGD' '') are not properly separated for dialog which leads to an [misleading] error hidden on the command line: Error: --menu bad arguments items number. [Writing this I wonder why the dual-column input is needed]. It is still unclear as to where the error message quoted in PR287538 suddenly came from for 14.3-RELEASE given the code was broken since 2016 (or noone ever noticed or reported). Looking at manual ifconfig output: ifconfig wlan0 country GB regdomain Expected -> ifconfig: unknown regdomain Expected and "ifconfig: " gets stripped by the script, which means the regdomain variable would have to be set to "Expected" or more likely to "Expected eval: Use: not found" which looks like a concatination of errors. Sponsored by: The FreeBSD Foundation Fixes: 95ee591e83a91 PR: 287538 Reviewed by: emaste, thj Differential Revision: https://reviews.freebsd.org/D51313 (cherry picked from commit 5a1e2927d63ed6394b767088eb2d66676f275467) --- usr.sbin/bsdinstall/scripts/wlanconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/wlanconfig b/usr.sbin/bsdinstall/scripts/wlanconfig index 728833f8d4a0..6f44ce1b8410 100755 --- a/usr.sbin/bsdinstall/scripts/wlanconfig +++ b/usr.sbin/bsdinstall/scripts/wlanconfig @@ -92,7 +92,7 @@ dialog_country_select() sub(/.*domains:/, ""), /[^[:alnum:][[:space:]]/ { n = split($0, domains) for (i = 1; i <= n; i++) - printf "'\''%s'\'' '\'\''", domains[i] + printf "'\''%s'\'' '\'\''\n", domains[i] } ' | sort ) countries=$( echo "$input" | awk ' From nobody Tue Jul 22 13:36:22 2025 X-Original-To: dev-commits-src-all@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 4bmdZv2zgFz5pPm9; Tue, 22 Jul 2025 13:36: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmdZv102lz3hVT; Tue, 22 Jul 2025 13:36:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753191383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BWPdUiZKZZizQJ0aji6Ila7vdKKztRkAcR5XHp/nDWg=; b=auU0Jq7zs1k39XjzhwJkPKlYnap4E1x2rNbfMxl9nvE135z07B1m4GkQvDjJOQEY1W24if +LiELtavq7FLpe2ANq5sUVuyIXoENJUemhLPl+vflrdvtl6FAWXdAfqRsVf9kaebDq0E3l si5nV/pE28tWhEqQNI6GGntPs32fLP8vizu+6+3M+tAuRpkKY0vcw3VBCTVqKTArBkPqV5 T2ZwgxbmXM/8h97ZI88BLEwGPVB/38xsg8QHf9wrA2jpIp0ICYZWppdudvhZI2mtQiXEZA wbuwL0cWL3n7qXDz85gHg9QlpcVpJEdSoNE2pOkOmROoSzIaSaGFhBq9vHmy+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753191383; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BWPdUiZKZZizQJ0aji6Ila7vdKKztRkAcR5XHp/nDWg=; b=rcIZMiFOl4CF28DqI0vAaWmwUqfQo3OVHJdaOA6PXEMUP+utaNqye4Fthp2yr+RY5hT9xf xy7qPoRm0dgujtMWmqHKTau3cRbWMKSNR5WE6aJfRjkFMdVa/+8GC0XVzXexbAlwbCWBLT 72OgmXeOgd8c2Bo36jDx5czymtlF9rdkeYLP1Z9nWO7naAjnk80WJ5J8EAldlr1rbaCg4k WPcM3+oxN9ueJXp5dbJz4ZXlY4UPwb+/0JCPszP0OBTimbJn7F62PJJZmC1dH6XX/w11yb sn/v7Igsp/EZmnhqkkWIM0yHCihLenuOYG/5bGhGnMgI6HrlGIytytxtsvwFoA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753191383; a=rsa-sha256; cv=none; b=rU6PbwVniiQxVkobu5onTIZXD6+lWQakfFv4TiQvtPhXJibHLLiQEaRXwg05OkPr6SN5bh Ui1n58MC7GPNlNPeRFnr23gvpyddto6V4U42LBM3pel7Su7vnQxH8CG6x54R10KttXixKK B6ziODuMM7RKXG8NbUiC9Hx9a7SJgexJCohiVOw8Pa8z1F+lD4s94CXpLxMLINtzgO7CKS auhOWxq8qAtoI6HzhuUkutl2x6WkDyxR0VwkBXKXRfZqgVlipJgwxaRoGB45nuA8YSpbMz 6CUKU/8y0CaqZDG+URWCSlYZ7w1js7DTiohK06NgPbwV0nS3KO9Eo3O1JF5dnQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmdZv0bDMzDVL; Tue, 22 Jul 2025 13:36:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MDaMrJ015232; Tue, 22 Jul 2025 13:36:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MDaMDP015229; Tue, 22 Jul 2025 13:36:22 GMT (envelope-from git) Date: Tue, 22 Jul 2025 13:36:22 GMT Message-Id: <202507221336.56MDaMDP015229@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: "Bjoern A. Zeeb" Subject: git: 9fa537692fa1 - stable/14 - bsdinstall: wlanconfig: ensure the interface is always up for scanning List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 9fa537692fa1b3bcb5ce436b8b755e2b6cff5dcb Auto-Submitted: auto-generated The branch stable/14 has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9fa537692fa1b3bcb5ce436b8b755e2b6cff5dcb commit 9fa537692fa1b3bcb5ce436b8b755e2b6cff5dcb Author: Bjoern A. Zeeb AuthorDate: 2025-07-14 18:32:06 +0000 Commit: Bjoern A. Zeeb CommitDate: 2025-07-22 08:21:53 +0000 bsdinstall: wlanconfig: ensure the interface is always up for scanning Sponsored by: The FreeBSD Foundation Reviewed by: thj (earlier), emaste Differential Revision: https://reviews.freebsd.org/D51312 (cherry picked from commit 153e73d782f3f1b06c502a708a3b30236ab332bd) --- usr.sbin/bsdinstall/scripts/wlanconfig | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/usr.sbin/bsdinstall/scripts/wlanconfig b/usr.sbin/bsdinstall/scripts/wlanconfig index 6f44ce1b8410..b5c488b22b2f 100755 --- a/usr.sbin/bsdinstall/scripts/wlanconfig +++ b/usr.sbin/bsdinstall/scripts/wlanconfig @@ -200,6 +200,12 @@ fi while :; do SCANSSID=0 + # While wpa_supplicant may IFF_UP the interface, we do not want to rely + # in this. In case the script is run manually (outside the installer, + # e.g., for testing) wpa_supplicant may be running and the wlanN + # interface may be down (especially if dialog_country_select is not + # run successfully either) and scanning will not work. + f_eval_catch -d wlanconfig ifconfig "ifconfig $WLAN_IFACE up" f_eval_catch -d wlanconfig wpa_cli "wpa_cli scan" f_dialog_title "Scanning" f_dialog_pause "Waiting 5 seconds to scan for wireless networks..." 5 || From nobody Tue Jul 22 14:03:04 2025 X-Original-To: dev-commits-src-all@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 4bmf9h4G7vz5pRSX; Tue, 22 Jul 2025 14:03:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmf9h3SSnz414C; Tue, 22 Jul 2025 14:03:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753192984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ddQ3BxZgTQ2v07ZrY2C/+pVHO447uVbDt692Eh7S3I8=; b=uauyWrjk6Npf5Z8xK2W/JC6G2TyoXE4ChZqixtrkSodKW3u8lou666DUBNSb5sYE+K1nsg U7yTxByriXKgLU9XnrpbWvTfQkOYk98mxRm/4gIKwNvVXhcL/22m6KYC/FUFL2Du2pe2gm mqzHBYtHbau4oIq/0HV7ts459nXdpFq3lk8HGJkirySCRiICIxkHRJlEQANN1SafZHxZZG sBw3HScuyFWv23RLLcPgv2eiIxcgkhkd4NK6wtfnUyqn66vZTGjbrgLwb/9k+ypQ54eLBM 0POOj7WmHHdM6HWL8HIr4czQfbl7HqXibH6thk/KQOj17byEHg4HtLgau1M8NQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753192984; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ddQ3BxZgTQ2v07ZrY2C/+pVHO447uVbDt692Eh7S3I8=; b=DFmRm8ld0A5CpSurRcS2nyzb9N9ANPWmMd9gh9kGDlwt1yTt6lPJDSv2C4Alh1JH8g4391 +4l858puP1ypfv/K1uSMz5bOJTN4H4+wCoiAcSzCiNfo66i3mNuekZcl/QftpXMGlCXBEC EL60eLigmz60xoR+TPNrgN49wa/FJI0AJ3YR25VzR+5hcEjzsdXsoB/1LGoBdEk4CVVM0x 5/+ekIdmlvxF2Q3nn/2HkmHdh5wc1BNkfmwEA/hFq1PPL7bJpCr3pDHdBiL2mNMwGTXXQG Bq1/ktyZrZgHcBYYm593MW0vKYjR40i/uhxZEFc41Y+kugKbmonybPqA9Z1lUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753192984; a=rsa-sha256; cv=none; b=rylMIzreifnrqyOvB3hgZqpucZ4M7xCPxF6957+123JuvMMIIjqKf3V1VzhRhAEWhSkMG7 bpxHoV+PiZmTPJpHGVwhoLIEzOXF+f/nozS1AaiQIgkNygpOYw83Tu8JtYkFuzu1qBx7n6 ZBZzfHjnuMT4o9FKMpngsK6BW1kTHZPJlQicsRmQ5KVwCTHP0LU7Ohwmbr6hLWBSGrThy4 u/O2qS/rNyKEufiIhRjDUMfVLKL5/70T0SfqiV7ieagg23nC1LRXUXhdkwmBuc5QJcSLRo k+gxLgWHKGCu4d9gDHtsQfHTpzOUXoFfo3pLKSnr4wuqp9M4GSXdDikb824JaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmf9h2sR3zVN4; Tue, 22 Jul 2025 14:03:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56ME34Kw070966; Tue, 22 Jul 2025 14:03:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56ME34Dg070963; Tue, 22 Jul 2025 14:03:04 GMT (envelope-from git) Date: Tue, 22 Jul 2025 14:03:04 GMT Message-Id: <202507221403.56ME34Dg070963@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 4a473db9f97b - main - amd64 pmap: only link as many DMAP pml4 page tables as was allocated List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 4a473db9f97bc12c51a86379f1ccc97f491ef4cd Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=4a473db9f97bc12c51a86379f1ccc97f491ef4cd commit 4a473db9f97bc12c51a86379f1ccc97f491ef4cd Author: Konstantin Belousov AuthorDate: 2025-07-21 14:18:47 +0000 Commit: Konstantin Belousov CommitDate: 2025-07-22 13:58:42 +0000 amd64 pmap: only link as many DMAP pml4 page tables as was allocated Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D51453 --- sys/amd64/amd64/pmap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index cd8ab58a07ab..adcdd8608355 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -2003,7 +2003,7 @@ create_pagetables(vm_paddr_t *firstaddr) */ p5_p[i] = KPML5phys | X86_PG_RW | X86_PG_A | X86_PG_M | X86_PG_V | pg_nx; - } else if (i >= DMPML5I && i < DMPML5I + NDMPML5E) { + } else if (i >= DMPML5I && i < DMPML5I + ndmpml4phys) { /* Connect DMAP pml4 pages to PML5. */ p5_p[i] = (DMPML4phys + ptoa(i - DMPML5I)) | X86_PG_RW | X86_PG_V | pg_nx; From nobody Tue Jul 22 14:03:05 2025 X-Original-To: dev-commits-src-all@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 4bmf9j59CJz5pRVd; Tue, 22 Jul 2025 14:03: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmf9j4FXHz414G; Tue, 22 Jul 2025 14:03:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753192985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4suZefUhUNFjJsUoPErxd44pAwrIyWko8Sp8lODWQEU=; b=IYFa8Bnq2Ttx65LmuKvaBva/23JQhrtl3qMAuGIXr1xHDZVK/z1nDKVR+kl71mVmXFbkTM hlHceW+XjkKRos1IZ4huocmK03pvmTls6ChIRr8G+3rhSZaavVLGb6tQPNAjyQlZrqQuz5 pLAGviQDbiosKI0FA+b6ikOvzji5kdHiwjtPDnDay5jhkgKh+IezOuoq+bMC0GCGSaDACZ 4XmNxLdhRH+RNO2TsPKfVX7IW2OjzdJ1kFagN0tJUCwvep3pKfXM8Fr62ISlh+xLdb9mXl JY75dRhK+UGGsGqgnJJ4eBidGoy4ohCWtDlGMepB94FkmyT/qBw4hg0Gl19Uqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753192985; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4suZefUhUNFjJsUoPErxd44pAwrIyWko8Sp8lODWQEU=; b=eK7Q0D9RruJNYdd9/m0LrmWAloPAxu0vTIh/tVVdEaOvB2dUJAw7uetyvaVZx4zppwTcjT D3KLqDJgQp/kqbajQzMMflsMLoBhsnGxeLz96pE6Rc5O9dK0WmrbYm1P/W3VvvPbmq35sv Al87JLQzluWsa+pzbOB0sbLuuDIgqxrEHdK6yePY7vSrqyZ0l0Bs1U1WRCc4if5Nc6Bx+j WV6L3zSbEtq22/oiTTgKhW1h1l+PkK9X99CwaqOd3f0XVjWicCSkoaa4CPKoIoyzgm6U9t 80ya3q3DeWmxjUyrvpQeth7d/Eda2AKty4bfDqX6/mwTSJvenZpYZ42xm+cvjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753192985; a=rsa-sha256; cv=none; b=uISY8Xj7UhXgbMSRe3szKCWSAY2FfYYsBnX13V6g9hzRGtZSCjJ9h6R6Xfa1EELcilwmVZ 8/BBh9OQ7z5A6CuUvgpTGVU8EZWGC/SkFhkWjOaf6uy/bfeSGL7IOsHhaqVGYNLihhCbMk WRc6aElqz6eoAsr8cvPdqXi0fOI/+LKGnvtO4i+PldXMZfC7IiXBxKfF5UrsmADlndvFiV yMnqau5a7gL1xTEmcKVZuMbopbO6JZcD8829wsjt6YjFXe4bMifYIbXg/J45oyq0f/n3DO 51aRK2oBSJ6iJ21Q6MlGvF3QQioBnRWKPuYfq4pqxhQ+dALSx6SWbNcg2D3WGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmf9j3s2MzVbK; Tue, 22 Jul 2025 14:03:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56ME351J070999; Tue, 22 Jul 2025 14:03:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56ME35aQ070996; Tue, 22 Jul 2025 14:03:05 GMT (envelope-from git) Date: Tue, 22 Jul 2025 14:03:05 GMT Message-Id: <202507221403.56ME35aQ070996@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 28d43983f64d - main - amd64 K*SAN: add kva_layout members for K*SAN maps List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 28d43983f64db4be241abb51d969a0f5fce997b0 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=28d43983f64db4be241abb51d969a0f5fce997b0 commit 28d43983f64db4be241abb51d969a0f5fce997b0 Author: Konstantin Belousov AuthorDate: 2025-07-20 13:39:14 +0000 Commit: Konstantin Belousov CommitDate: 2025-07-22 13:58:47 +0000 amd64 K*SAN: add kva_layout members for K*SAN maps The members are added regardless of the kernel config. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D51453 --- sys/amd64/amd64/pmap.c | 16 ++++++++++++++++ sys/amd64/include/pmap.h | 6 ++++++ sys/amd64/include/vmparam.h | 14 ++++++-------- 3 files changed, 28 insertions(+), 8 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index adcdd8608355..d8be68cb4f52 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -489,6 +489,14 @@ struct kva_layout_s kva_layout = { .km_high = KV4ADDR(KPML4BASE + NKPML4E - 1, NPDPEPG - 1, NPDEPG - 1, NPTEPG - 1), .rec_pt = KV4ADDR(PML4PML4I, 0, 0, 0), + .kasan_shadow_low = KV4ADDR(KASANPML4I, 0, 0, 0), + .kasan_shadow_high = KV4ADDR(KASANPML4I + NKASANPML4E, 0, 0, 0), + .kmsan_shadow_low = KV4ADDR(KMSANSHADPML4I, 0, 0, 0), + .kmsan_shadow_high = KV4ADDR(KMSANSHADPML4I + NKMSANSHADPML4E, + 0, 0, 0), + .kmsan_origin_low = KV4ADDR(KMSANORIGPML4I, 0, 0, 0), + .kmsan_origin_high = KV4ADDR(KMSANORIGPML4I + NKMSANORIGPML4E, + 0, 0, 0), }; struct kva_layout_s kva_layout_la57 = { @@ -501,6 +509,14 @@ struct kva_layout_s kva_layout_la57 = { .km_high = KV4ADDR(KPML4BASE + NKPML4E - 1, NPDPEPG - 1, NPDEPG - 1, NPTEPG - 1), .rec_pt = KV5ADDR(PML5PML5I, 0, 0, 0, 0), + .kasan_shadow_low = KV4ADDR(KASANPML4I, 0, 0, 0), + .kasan_shadow_high = KV4ADDR(KASANPML4I + NKASANPML4E, 0, 0, 0), + .kmsan_shadow_low = KV4ADDR(KMSANSHADPML4I, 0, 0, 0), + .kmsan_shadow_high = KV4ADDR(KMSANSHADPML4I + NKMSANSHADPML4E, + 0, 0, 0), + .kmsan_origin_low = KV4ADDR(KMSANORIGPML4I, 0, 0, 0), + .kmsan_origin_high = KV4ADDR(KMSANORIGPML4I + NKMSANORIGPML4E, + 0, 0, 0), }; /* diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index a0ca97f2d5a0..6a4da294c9dc 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -564,6 +564,12 @@ struct kva_layout_s { vm_offset_t km_low; /* VM_MIN_KERNEL_ADDRESS */ vm_offset_t km_high; /* VM_MAX_KERNEL_ADDRESS */ vm_offset_t rec_pt; + vm_offset_t kasan_shadow_low; /* KASAN_MIN_ADDRESS */ + vm_offset_t kasan_shadow_high; /* KASAN_MAX_ADDRESS */ + vm_offset_t kmsan_shadow_low; /* KMSAN_SHAD_MIN_ADDRESS */ + vm_offset_t kmsan_shadow_high; /* KMSAN_SHAD_MAX_ADDRESS */ + vm_offset_t kmsan_origin_low; /* KMSAN_ORIG_MIN_ADDRESS */ + vm_offset_t kmsan_origin_high; /* KMSAN_ORIG_MAX_ADDRESS */ }; extern struct kva_layout_s kva_layout; diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index ef352e776af6..d2ac3c6648b2 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -200,16 +200,14 @@ #define VM_MIN_KERNEL_ADDRESS kva_layout.km_low #define VM_MAX_KERNEL_ADDRESS kva_layout.km_high -#define KASAN_MIN_ADDRESS KV4ADDR(KASANPML4I, 0, 0, 0) -#define KASAN_MAX_ADDRESS KV4ADDR(KASANPML4I + NKASANPML4E, 0, 0, 0) +#define KASAN_MIN_ADDRESS (kva_layout.kasan_shadow_low) +#define KASAN_MAX_ADDRESS (kva_layout.kasan_shadow_high) -#define KMSAN_SHAD_MIN_ADDRESS KV4ADDR(KMSANSHADPML4I, 0, 0, 0) -#define KMSAN_SHAD_MAX_ADDRESS KV4ADDR(KMSANSHADPML4I + NKMSANSHADPML4E, \ - 0, 0, 0) +#define KMSAN_SHAD_MIN_ADDRESS (kva_layout.kmsan_shadow_low) +#define KMSAN_SHAD_MAX_ADDRESS (kva_layout.kmsan_shadow_high) -#define KMSAN_ORIG_MIN_ADDRESS KV4ADDR(KMSANORIGPML4I, 0, 0, 0) -#define KMSAN_ORIG_MAX_ADDRESS KV4ADDR(KMSANORIGPML4I + NKMSANORIGPML4E, \ - 0, 0, 0) +#define KMSAN_ORIG_MIN_ADDRESS (kva_layout.kmsan_origin_low) +#define KMSAN_ORIG_MAX_ADDRESS (kva_layout.kmsan_origin_high) /* * Formally kernel mapping starts at KERNBASE, but kernel linker From nobody Tue Jul 22 14:03:06 2025 X-Original-To: dev-commits-src-all@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 4bmf9k6xKVz5pS1H; Tue, 22 Jul 2025 14:03: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmf9k5dVGz40yg; Tue, 22 Jul 2025 14:03:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753192986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PvFcoHimNgSgRrZPzWQWoyYHHw4fgOwJmcoaZhu6UDM=; b=AxmsP+dHr32TuYX0IKC27MlKIuYLuFNJYP7gbkOK9EYZOCRrr/bkmSI+o8w75u6tgLffD+ pAEXwH8YTbj0Xw/kTtALG0bKpOPAnooo0DocBLkqQZGHNQO2nNHpAb4S8da0wiEmz+aN5y r3NMbWJU8ZnjCyaGZdtB0u+nikKR0A+h6z0fn65uhBF9XO8Ri0rvc0wU0ZsCRSUoGCdROw JLA82ryV1bI4+kmV008m2Icu0uuhKuBflEGUxkyz+rbS8/6vrB6dFcWZ/z0PmKrCD1yI/6 DtLJ5hOSmjLsP79QQxaund7+upilYpsr5xtu0TZQ2/8kXlZctu6/kufhkGT+IQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753192986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PvFcoHimNgSgRrZPzWQWoyYHHw4fgOwJmcoaZhu6UDM=; b=mYkUDDwyZgQmeAwh0n/JO2MDFbXgO30pHPBVEbi99RPGz6dbrv8wC+yIwRbKmFtcguf/0a DuYbIBDGvDA2fnnR/8f5pc4njVUgfQfJ21BULm3MXiEDrwRESluZHlef4E/rtM/K/BQepi aZnKAgmGt6Q/fjtbwD00wPGkMrJM3Nl2g+zEiSalwvHt51lq0Xm3ypxfe5UI9F/k81pkmH PlcsQKY66MLDtFvxwqZ6wX0XWv2DKIKkTx0xzpe7q7a36RCu9NGIUxW0AJY9l4nizxIhOg EFpX3SDbH4Lc3pSVKfc6HBh+5j5NmBbshtjwCyClLT5SmB7dmTLt1Ox0ZBM1Ag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753192986; a=rsa-sha256; cv=none; b=ciy3f85rUa27d83G2iLYCUYHxqGJWNPewvwrX14N5NFa15p5C0FanDtwAZ41eTzoBWFyAV Wzf14at2lg87wGylsfmQR33H5Z6ih69mfw96/4G79L2ktJuHTwPom3mgzwcjfTrAZx1AiF J6qghcq0MO81UwOWORcSOUBHr+mDJ1G9CiHcHIjKJFF+8oIDl4xMpistbZ2AYk/4m20rbx fd33VJzaaaYa8yX00vRBT8HQ9oLe5h43RIpAOAsIs54M2qpb5Qs1hv8p6+fZ0d5FG5J+Ke Kze2H7j7pKMQ2w1hztVUg+cuSibU9qGdPboEbasCiTr3z02sKxrb1GDMGcejRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmf9k4qGhzVMx; Tue, 22 Jul 2025 14:03:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56ME3657071038; Tue, 22 Jul 2025 14:03:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56ME36K6071035; Tue, 22 Jul 2025 14:03:06 GMT (envelope-from git) Date: Tue, 22 Jul 2025 14:03:06 GMT Message-Id: <202507221403.56ME36K6071035@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 76a8b948fee3 - main - amd64 pmap: add kva_layout.kva_max List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 76a8b948fee30b90be00faaee441f64703f17711 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=76a8b948fee30b90be00faaee441f64703f17711 commit 76a8b948fee30b90be00faaee441f64703f17711 Author: Konstantin Belousov AuthorDate: 2025-07-21 11:48:31 +0000 Commit: Konstantin Belousov CommitDate: 2025-07-22 13:58:53 +0000 amd64 pmap: add kva_layout.kva_max And use it instead of manually providing the same value as sentinel in code for sysctl vm.pmap.kernel_maps. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D51453 --- sys/amd64/amd64/pmap.c | 12 ++++++------ sys/amd64/include/pmap.h | 1 + 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index d8be68cb4f52..13c6df01ccfe 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -481,6 +481,8 @@ vm_paddr_t KERNend; /* and the end */ struct kva_layout_s kva_layout = { .kva_min = KV4ADDR(PML4PML4I, 0, 0, 0), + .kva_max = KV4ADDR(NPML4EPG - 1, NPDPEPG - 1, + NPDEPG - 1, NPTEPG - 1), .dmap_low = KV4ADDR(DMPML4I, 0, 0, 0), .dmap_high = KV4ADDR(DMPML4I + NDMPML4E, 0, 0, 0), .lm_low = KV4ADDR(LMSPML4I, 0, 0, 0), @@ -501,6 +503,8 @@ struct kva_layout_s kva_layout = { struct kva_layout_s kva_layout_la57 = { .kva_min = KV5ADDR(NPML5EPG / 2, 0, 0, 0, 0), /* == rec_pt */ + .kva_max = KV5ADDR(NPML5EPG - 1, NPML4EPG - 1, NPDPEPG - 1, + NPDEPG - 1, NPTEPG - 1), .dmap_low = KV5ADDR(DMPML5I, 0, 0, 0, 0), .dmap_high = KV5ADDR(DMPML5I + NDMPML5E, 0, 0, 0, 0), .lm_low = KV5ADDR(LMSPML5I, 0, 0, 0, 0), @@ -11896,9 +11900,7 @@ sysctl_kmaps_dump(struct sbuf *sb, struct pmap_kernel_map_range *range, mode, range->pdpes, range->pdes, range->ptes); /* Reset to sentinel value. */ - range->sva = la57 ? KV5ADDR(NPML5EPG - 1, NPML4EPG - 1, NPDPEPG - 1, - NPDEPG - 1, NPTEPG - 1) : KV4ADDR(NPML4EPG - 1, NPDPEPG - 1, - NPDEPG - 1, NPTEPG - 1); + range->sva = kva_layout.kva_max; } /* @@ -11992,9 +11994,7 @@ sysctl_kmaps(SYSCTL_HANDLER_ARGS) sbuf_new_for_sysctl(sb, NULL, PAGE_SIZE, req); /* Sentinel value. */ - range.sva = la57 ? KV5ADDR(NPML5EPG - 1, NPML4EPG - 1, NPDPEPG - 1, - NPDEPG - 1, NPTEPG - 1) : KV4ADDR(NPML4EPG - 1, NPDPEPG - 1, - NPDEPG - 1, NPTEPG - 1); + range.sva = kva_layout.kva_max; /* * Iterate over the kernel page tables without holding the kernel pmap diff --git a/sys/amd64/include/pmap.h b/sys/amd64/include/pmap.h index 6a4da294c9dc..e2f97442c10f 100644 --- a/sys/amd64/include/pmap.h +++ b/sys/amd64/include/pmap.h @@ -557,6 +557,7 @@ pmap_pml5e_index(vm_offset_t va) struct kva_layout_s { vm_offset_t kva_min; + vm_offset_t kva_max; vm_offset_t dmap_low; /* DMAP_MIN_ADDRESS */ vm_offset_t dmap_high; /* DMAP_MAX_ADDRESS */ vm_offset_t lm_low; /* LARGEMAP_MIN_ADDRESS */ From nobody Tue Jul 22 14:03:07 2025 X-Original-To: dev-commits-src-all@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 4bmf9m5JSFz5pRlF; Tue, 22 Jul 2025 14:03: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmf9l67Frz416n; Tue, 22 Jul 2025 14: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=1753192987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SY5EmQu1TYyueyq393ibfd7mu36WB158E2S0T2uVTgI=; b=EVB+pm+tib+OzoAMWKBMEoCf4uQlTls2xDUJZ9VI3zeLPIJK8fzETdd0NXLUbLW7q0ZrXX BvwX2kmEstpqkE5SAe3XnHlqPZZ+7On7rdhDs/pFHv3d1eUBKsLTakGZQPVmFTtAwJvozn KzbQ8olCM4Sp0G3veHfaLPDJPLZBY1PqbNdNG0xtwMziKfTKvRlJtLzG+15oCoeCDRpvp5 IjHn5GndAjyPzQ/EVDQ79Q9Ktk9l8erenc/Qz25qZbedF2ZiPWUDdEaNHHL3Tzd3M/DI8L imJMP3PIoRO+mnY5p8+KdDQKh2oOokS0TDIMqtQx4Q3iDSdYMjpLEnk0vjzj6g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753192987; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SY5EmQu1TYyueyq393ibfd7mu36WB158E2S0T2uVTgI=; b=S3YQWU5BAnttjjBq4XUYV1UiZDPDwCVIuRseo/sWPLjnUIRKn+v3in0af5WGwPT11EFiSS te885CnOUVGFP6iaacANidxTXTXgvbIi3DDqeHb/3YG+wheNn6XjNbwTweHGh1m3jwTjnW IRYtyWNDbv4w37aQNoxNwEoJv28KIACyLCPqGd80TeNa2S4y/FAUycCkn29I41zZa7anC1 bsXwVpEv2eaj4Q516lEVDa45sDC2bOEOk2PxivR28xiGCP/25H4jlUwweVHiNF0X8WAst9 GScuZjvIBsMCMg2QXvFKw/KRlOVmUCce5OuCdiQppS2dJf7wEWQJxKLkLml41Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753192987; a=rsa-sha256; cv=none; b=dUQM0uvLWfJkWnGvT5pBsXCH+K/IPR6CgRHlGft1RfLPo6p3ZxanLGS/6uRAKfu6hTD4bN vW95bQxpibqBqamp5x/wPYI3LMwWTWb8tiwZZ4aPG2ZGdn8kTUaD7d6QIw7neJ+Eze1++G 56iqxvFXsByUR5AdMnCOcX1ft320TFOW9O7qAWt7pyOCmy4RcuFKPceBFVNzJQgGQo5mDI l0uIYTF9lj412eDLWCrdOOG6O3JEwvXQ1RXnHjWhhG6itHkpVj5J01Icd2QyX/l4ax6d9a LHSLo9u677R5TQHMtJVL5An9IzoZ1Xineaa1s11vgKnt7gms6Q6wH0I4P9qSwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmf9l5WXbzVbL; Tue, 22 Jul 2025 14:03:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56ME37WL071074; Tue, 22 Jul 2025 14:03:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56ME37dO071071; Tue, 22 Jul 2025 14:03:07 GMT (envelope-from git) Date: Tue, 22 Jul 2025 14:03:07 GMT Message-Id: <202507221403.56ME37dO071071@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 58832abd24f0 - main - amd64 sysctl_kmaps_check(): add pml5e arg List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 58832abd24f03eab62e06cbe3a74304b7bfd950a Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=58832abd24f03eab62e06cbe3a74304b7bfd950a commit 58832abd24f03eab62e06cbe3a74304b7bfd950a Author: Konstantin Belousov AuthorDate: 2025-07-20 13:23:10 +0000 Commit: Konstantin Belousov CommitDate: 2025-07-22 13:59:00 +0000 amd64 sysctl_kmaps_check(): add pml5e arg For now all callers pass zero. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D51453 --- sys/amd64/amd64/pmap.c | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 13c6df01ccfe..9805184bd07e 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -11941,12 +11941,18 @@ sysctl_kmaps_reinit(struct pmap_kernel_map_range *range, vm_offset_t va, */ static void sysctl_kmaps_check(struct sbuf *sb, struct pmap_kernel_map_range *range, - vm_offset_t va, pml4_entry_t pml4e, pdp_entry_t pdpe, pd_entry_t pde, - pt_entry_t pte) + vm_offset_t va, pml5_entry_t pml5e, pml4_entry_t pml4e, pdp_entry_t pdpe, + pd_entry_t pde, pt_entry_t pte) { pt_entry_t attrs; - attrs = pml4e & (X86_PG_RW | X86_PG_U | pg_nx); + if (la57) { + attrs = pml5e & (X86_PG_RW | X86_PG_U | pg_nx); + attrs |= pml4e & pg_nx; + attrs &= pg_nx | (pml4e & (X86_PG_RW | X86_PG_U)); + } else { + attrs = pml4e & (X86_PG_RW | X86_PG_U | pg_nx); + } attrs |= pdpe & pg_nx; attrs &= pg_nx | (pdpe & (X86_PG_RW | X86_PG_U)); @@ -12061,8 +12067,8 @@ restart: pa = pdpe & PG_FRAME; if ((pdpe & PG_PS) != 0) { sva = rounddown2(sva, NBPDP); - sysctl_kmaps_check(sb, &range, sva, pml4e, pdpe, - 0, 0); + sysctl_kmaps_check(sb, &range, sva, 0, + pml4e, pdpe, 0, 0); range.pdpes++; sva += NBPDP; continue; @@ -12090,7 +12096,7 @@ restart: if ((pde & PG_PS) != 0) { sva = rounddown2(sva, NBPDR); sysctl_kmaps_check(sb, &range, sva, - pml4e, pdpe, pde, 0); + 0, pml4e, pdpe, pde, 0); range.pdes++; sva += NBPDR; continue; @@ -12115,7 +12121,7 @@ restart: continue; } sysctl_kmaps_check(sb, &range, sva, - pml4e, pdpe, pde, pte); + 0, pml4e, pdpe, pde, pte); range.ptes++; } } From nobody Tue Jul 22 14:03:08 2025 X-Original-To: dev-commits-src-all@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 4bmf9p03YFz5pS3s; Tue, 22 Jul 2025 14:03: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmf9n186vz418y; Tue, 22 Jul 2025 14:03:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753192989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kYV9bcR2UfldIjG0w+Lkx4bzv9XGqdtnID2Y7Zt5eOM=; b=OwPh5/vOF1x6j6b2pCZPY8pw9j9YD0ARRTskwmgXG2Uz+bfYPW4u7qtqYrVBgHe5QXJp3A h9++KBAASu7La8zDV60RapnZcn4yP6Vmn2m8FYgn/X6qxhjX/eZFXdiSUzbJFdfoT09fKM fgOxvyq7D+ycwFTtABR3Qajl9TOEvjuOC/iKt12lbbVI1RODJ0T/wS0b8gL109iMfTPCcP RHPYbjOt8R/difFZHp8mltYwhRS2pu2ywTG+xiDFNVPqS7ZecqQ0q6RQF31tybaR9zvQfC Kgo5LO6X0P8MewS5FEwg0j+3r4ZbwEqc3B9NDUFoNP6oumHRujH+FEq9vN7/4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753192989; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kYV9bcR2UfldIjG0w+Lkx4bzv9XGqdtnID2Y7Zt5eOM=; b=mAvhAZPAau/mc1Scahi3dh0NW3fH8PFswoBTMKeJ731IYdneQyVhAeT6KX5SVv0BkfHtra zmZMRMLb2p03cqjy9YwagN7q1k9GujmKG0zxA5LWvNRP8ReIjSiHw3DioHgaNxQ9wcFPvD IhdgCP8livO3gqahXxWPQ1sgUncfM2encO93vVL/DDHxdBB9WZxlW1qK7gR2awrO+CsZTc B6Vp5LVMDX2IER1t7S1aL4nbkjZn86QdwcDJIenFn+LmTBxhmcaZkwJNU2G/tgN5N+vuXC iPll4+ayjeVmbwiCQQ8R+SsHOEQSXyH6bczGWYxrt9oZ65kV4yA9vARW0VEKog== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753192989; a=rsa-sha256; cv=none; b=uAGC94j5gMIKUt4B5U3pSVntJTo/cQxU1XyiPYw6g0hZPXAcjXTUhr4p4nHtlppSK88YoT klJ+jOs0qQG/kapEvU3amzrLlq7T+t00KjPAf8YHwz+hu3QQRl3fr/DyPHjNMYO+hXzq55 ThtUSEuzQlnhm6vGQxp4HFrVQgV6JvlprhmJFofSyuQYUJo9ci1807y5bVvL+s3FfD6qYT 04SpoT4fnv819gnRR/ABxW3/ywX/pSQIfGngqTEFB2+jvZ26z7PF6zEHXnZIKbu70ykLk/ E6y2TvBqJ8b5m18gVRtwuIuPJUeG7sCyznJFVVgHFVkyZ5UgmnldnQjm0srT5w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmf9m6bh7zTtY; Tue, 22 Jul 2025 14:03:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56ME38X6071107; Tue, 22 Jul 2025 14:03:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56ME38BT071104; Tue, 22 Jul 2025 14:03:08 GMT (envelope-from git) Date: Tue, 22 Jul 2025 14:03:08 GMT Message-Id: <202507221403.56ME38BT071104@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: f6ec18e200ab - main - amd64 vm.pmap.kernel_maps: provide canonical address switch for la57 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: f6ec18e200ab323d50ec8d051bda8f22f4beaf69 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f6ec18e200ab323d50ec8d051bda8f22f4beaf69 commit f6ec18e200ab323d50ec8d051bda8f22f4beaf69 Author: Konstantin Belousov AuthorDate: 2025-07-20 13:24:11 +0000 Commit: Konstantin Belousov CommitDate: 2025-07-22 13:59:10 +0000 amd64 vm.pmap.kernel_maps: provide canonical address switch for la57 Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D51453 --- sys/amd64/amd64/pmap.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 9805184bd07e..6fac8318df05 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -12042,8 +12042,13 @@ sysctl_kmaps(SYSCTL_HANDLER_ARGS) } /* Convert to canonical form. */ - if (sva == 1ul << 47) - sva |= -1ul << 48; + if (la57) { + if (sva == 1ul << 56) + sva |= -1ul << 57; + } else { + if (sva == 1ul << 47) + sva |= -1ul << 48; + } restart: pml4e = kernel_pml4[i]; From nobody Tue Jul 22 14:03:09 2025 X-Original-To: dev-commits-src-all@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 4bmf9q23frz5pRlM; Tue, 22 Jul 2025 14:03: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmf9p0yQNz41Bs; Tue, 22 Jul 2025 14:03:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753192990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uYddQeRStcCtNBGAr85q7HfkZUXjxWtIipUXod6BN+U=; b=WLm+PrCIHKCg/a7gUPYnIKuPa0NoxItc5BJJHAgg1ePdleiIRJRxatYeYxPIlwbFrwC6mi kicaAbVJWpFr+OKsaBUOdvur151WxP6lTlSIrPPvaHc+asFvZ9MC0aOq9iGae8n9rZKt8c 34mG+F8iFW4Q9OrqahO575BRlZZPdCrVifXv0R/yzesRfI7w+85hF+Z1J7I7tBGuA0EnNv PLsH54fgSMw2mNAlbCmpbja/r9kC6ifwZWNdldRc8BrFYAap4uzQBveEoFmGosUk+sqK+m uhtUeW+Mu2lx7rphrpjRiW6xzJh4Xsnrpl5tucD9+PdhZ/G62xgXokn+5vDlJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753192990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uYddQeRStcCtNBGAr85q7HfkZUXjxWtIipUXod6BN+U=; b=hRptxdGpI2xdAkwJqjM3Ofs/zQIFiLAp8TldzoB03b/svQdcKZebDVEIZZdghdxh7DWrX6 OyF8YF6wZr33y8wYd9UR6PqcQWG6iuyOJzmH7IOfHDtgWaogc8PT15DbMgjrLMgVSO3TgW CceNYsgoRszSRmBPAY58033rHIX2fYxObohQ765mvWYXVTQeO5myXrWUfJvK5FGfhtJJfo IXWQBoin/T0J4GB7SeS3cw2m4Rmm/mc9vJ9OloCzqfpD8eVL05kI1erepeW7SWrSA9f/Of ks6ZSjyqcNzUi6DADxRY5Tgxk3FyW40ZPz3nlX8KO+YYyCOZIzYrrZi+SaZG0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753192990; a=rsa-sha256; cv=none; b=W1JUQYezDUbv0xj/qkqY4PhKB+VxCHo6xMi74wSfaYWw73xSQWflxznDOjZZIo8Mm5y2be UGmtyuf/EM8qO9zLveJRnXppmN6t9wkHJPJ3S8cC0vgE0FRyaqjOqsK+fogwWLgyht4hAS zaTYmusj/L+y0Do/w4SyKsZjLzPynZkr/Doezczp1GI0PWOzCayTRkfDiyL/cI3t6iS46K gtGhHwNixOK6BOXAOtJ4Vve4Z3SRm/PBSDP7GlB/KoLZ3y392mcaPkXGzdWX4eyh7dkpUl vBseWsHQzWszraGIJdsU4Vl2/S8hoFGzjGQbv0YOasMFn9TIqHeaEfpZaj8R8Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmf9p0THyzVZy; Tue, 22 Jul 2025 14:03:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56ME39p6071141; Tue, 22 Jul 2025 14:03:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56ME395u071138; Tue, 22 Jul 2025 14:03:09 GMT (envelope-from git) Date: Tue, 22 Jul 2025 14:03:09 GMT Message-Id: <202507221403.56ME395u071138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: aa78ed925839 - main - amd64 sysctl vm.pmap.kernel_maps: rework List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: aa78ed9258395dac056de77023cc52ebbb9b153d Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=aa78ed9258395dac056de77023cc52ebbb9b153d commit aa78ed9258395dac056de77023cc52ebbb9b153d Author: Konstantin Belousov AuthorDate: 2025-07-20 00:57:51 +0000 Commit: Konstantin Belousov CommitDate: 2025-07-22 13:59:17 +0000 amd64 sysctl vm.pmap.kernel_maps: rework Iterate over the KVA instead of the pml4 indexes. Otherwise, we would need to iterate of pml5 indexes for LA57 and then either use secondary loop for pml4 entries, or use flat indexes for pml4. It is simpler to have unified loop for both paging modes. Instead of checking pml4 indexes for start of interesting kernel maps, use kva_layout. Again, this makes the printing of heralds independent of the paging mode. Restart the loop iteration when changing address due to canonicalization. This is needed to not miss printing the map herald line. Reviewed by: markj Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D51453 --- sys/amd64/amd64/pmap.c | 66 +++++++++++++++++++++++++++----------------------- 1 file changed, 36 insertions(+), 30 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index 6fac8318df05..d1d80afccdc7 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -11985,13 +11985,15 @@ sysctl_kmaps(SYSCTL_HANDLER_ARGS) { struct pmap_kernel_map_range range; struct sbuf sbuf, *sb; + pml5_entry_t pml5e; pml4_entry_t pml4e; pdp_entry_t *pdp, pdpe; pd_entry_t *pd, pde; pt_entry_t *pt, pte; vm_offset_t sva; vm_paddr_t pa; - int error, i, j, k, l; + int error, j, k, l; + bool first; error = sysctl_wire_old_buffer(req, 0); if (error != 0) @@ -12001,6 +12003,7 @@ sysctl_kmaps(SYSCTL_HANDLER_ARGS) /* Sentinel value. */ range.sva = kva_layout.kva_max; + pml5e = 0; /* no UB for la48 */ /* * Iterate over the kernel page tables without holding the kernel pmap @@ -12009,49 +12012,50 @@ sysctl_kmaps(SYSCTL_HANDLER_ARGS) * Within the large map, ensure that PDP and PD page addresses are * valid before descending. */ - for (sva = 0, i = pmap_pml4e_index(sva); i < NPML4EPG; i++) { - switch (i) { - case PML4PML4I: - if (!la57) - sbuf_printf(sb, "\nRecursive map:\n"); - break; - case DMPML4I: - if (!la57) - sbuf_printf(sb, "\nDirect map:\n"); - break; + for (first = true, sva = 0; sva != 0 || first; first = false) { + if (sva == kva_layout.rec_pt) + sbuf_printf(sb, "\nRecursive map:\n"); + else if (sva == kva_layout.dmap_low) + sbuf_printf(sb, "\nDirect map:\n"); #ifdef KASAN - case KASANPML4I: + else if (sva == kva_layout.kasan_shadow_low) sbuf_printf(sb, "\nKASAN shadow map:\n"); - break; #endif #ifdef KMSAN - case KMSANSHADPML4I: + else if (sva == kva_layout.kmsan_shadow_low) sbuf_printf(sb, "\nKMSAN shadow map:\n"); - break; - case KMSANORIGPML4I: + else if (sva == kva_layout.kmsan_origin_low) sbuf_printf(sb, "\nKMSAN origin map:\n"); - break; #endif - case KPML4BASE: + else if (sva == kva_layout.km_low) sbuf_printf(sb, "\nKernel map:\n"); - break; - case LMSPML4I: - if (!la57) - sbuf_printf(sb, "\nLarge map:\n"); - break; - } + else if (sva == kva_layout.lm_low) + sbuf_printf(sb, "\nLarge map:\n"); /* Convert to canonical form. */ if (la57) { - if (sva == 1ul << 56) + if (sva == 1ul << 56) { sva |= -1ul << 57; + continue; + } } else { - if (sva == 1ul << 47) + if (sva == 1ul << 47) { sva |= -1ul << 48; + continue; + } } restart: - pml4e = kernel_pml4[i]; + if (la57) { + pml5e = *pmap_pml5e(kernel_pmap, sva); + if ((pml5e & X86_PG_V) == 0) { + sva = rounddown2(sva, NBPML5); + sysctl_kmaps_dump(sb, &range, sva); + sva += NBPML5; + continue; + } + } + pml4e = *pmap_pml4e(kernel_pmap, sva); if ((pml4e & X86_PG_V) == 0) { sva = rounddown2(sva, NBPML4); sysctl_kmaps_dump(sb, &range, sva); @@ -12072,7 +12076,7 @@ restart: pa = pdpe & PG_FRAME; if ((pdpe & PG_PS) != 0) { sva = rounddown2(sva, NBPDP); - sysctl_kmaps_check(sb, &range, sva, 0, + sysctl_kmaps_check(sb, &range, sva, pml5e, pml4e, pdpe, 0, 0); range.pdpes++; sva += NBPDP; @@ -12085,6 +12089,7 @@ restart: * freed. Validate the next-level address * before descending. */ + sva += NBPDP; goto restart; } pd = (pd_entry_t *)PHYS_TO_DMAP(pa); @@ -12101,7 +12106,7 @@ restart: if ((pde & PG_PS) != 0) { sva = rounddown2(sva, NBPDR); sysctl_kmaps_check(sb, &range, sva, - 0, pml4e, pdpe, pde, 0); + pml5e, pml4e, pdpe, pde, 0); range.pdes++; sva += NBPDR; continue; @@ -12113,6 +12118,7 @@ restart: * may be freed. Validate the * next-level address before descending. */ + sva += NBPDR; goto restart; } pt = (pt_entry_t *)PHYS_TO_DMAP(pa); @@ -12126,7 +12132,7 @@ restart: continue; } sysctl_kmaps_check(sb, &range, sva, - 0, pml4e, pdpe, pde, pte); + pml5e, pml4e, pdpe, pde, pte); range.ptes++; } } From nobody Tue Jul 22 14:03:28 2025 X-Original-To: dev-commits-src-all@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 4bmfB94d2rz5pRYt; Tue, 22 Jul 2025 14:03: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmfB916YTz41pB; Tue, 22 Jul 2025 14:03:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753193009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8RL3guuFSlsLxncLsmONyl4xu9dZjngNVNTmRL3OzMw=; b=A4urhM7pO6e2uit7IFbAaGTt6sDRFo9S/vy8Qjf/LnzhgtQzJu9hcajk1QW9R772E+D4Ra Bm1IZ9GoFD5PWiN593AwdswL8dh3HoB3JpmjqnASDW0lKx5GLj619gapPsthZRDczHmJig 6cLB1O4tqC76og406qUwOl8wD/ObRnERNgbvlqew75vW2a+vRDf0bvWmrE1L9jplVwm15b 6XIjzkjZo4m08KKVJ8butkGZ6HB/xzARItkQA6JKP6vav96JtPuDcHqL8EU/cWuMk6RDUH UvG1ARHeKIjBtzLGlZKlG5D87DR5A8YnQGbw+b/IHVnG7J70BR+Ca1vNfBQZQQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753193009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8RL3guuFSlsLxncLsmONyl4xu9dZjngNVNTmRL3OzMw=; b=Ur3I7gXhoIZU67L1nhJ/o2RvNX+56dozo7f+L7ABCURQOq3MIAQN4YwmxlYR0QzKD8MFJq KsKbznkdfz25JaF5NudsONgQAYi7pnzK/uDtgxUUYaDm0vFWxtmj7ZhB7NmGPXVd3utYLE dty+FG1EXA4BPucn9+RhQSi7nsRWKHA9+YMKlSZeya2w1P2fIfSkSjzTmE0jAq4QfhAny3 XVIx6iopNP+UEK11zp5jSLkpYmUpp8caN+0eDFcHrhtDv46Wd0f//ISvrCABhZTfum4sYO UhjNmfU5D+A1/TzJcWMTBdk+JrB0/GXAPgeB3XhkHYcQEP0eRJc9Hq00oBxLCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753193009; a=rsa-sha256; cv=none; b=L/WGxcUzvO7hJYwR3WPrvyEGZo0/YgiC8FPiE9vyT/Kkdby78EUAUHiXxuTLynYjknr08b GJ+oCuCArcKieZ+LRRY3T7v1oU8zVbU077J5frRmVE/Z+bbJrzMZLhKLw4moavA7P4NdBg Rz9q5xkw1EG0qwVSL2g6nm3T/DCBv/LxGS7DPvbVSgBGpiQwgdHGVQGYzlubMW1MAYIKz0 ndu7tmjjwRZTlLxLLPXO3s+H4dA4h2G6Y9BSSoxIwsuktKmDWbXvxY6a98EIPtom6M8WxP mtTRmSbketNL5AzEbfxPB/5n8rTsGgHhFLCaIViagUBM5sq9UmmPwpt6U0IUVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmfB90TZlzVbM; Tue, 22 Jul 2025 14:03:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56ME3SN9071384; Tue, 22 Jul 2025 14:03:28 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56ME3SkU071380; Tue, 22 Jul 2025 14:03:28 GMT (envelope-from git) Date: Tue, 22 Jul 2025 14:03:28 GMT Message-Id: <202507221403.56ME3SkU071380@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: c477deccbfc2 - stable/14 - mgb: Fix mac tx disable bug in teardown List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: c477deccbfc2dfb91e1bca12950bb8d7567d9a8a Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c477deccbfc2dfb91e1bca12950bb8d7567d9a8a commit c477deccbfc2dfb91e1bca12950bb8d7567d9a8a Author: jefby AuthorDate: 2025-07-05 02:52:08 +0000 Commit: Ed Maste CommitDate: 2025-07-22 14:03:09 +0000 mgb: Fix mac tx disable bug in teardown Signed-off-by: jefby Reviewed-by: emaste Pull-request: https://github.com/freebsd/freebsd-src/pull/1755 (cherry picked from commit 5f9a73c22fea8973e047477853529feaedea6fe6) --- sys/dev/mgb/if_mgb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/dev/mgb/if_mgb.c b/sys/dev/mgb/if_mgb.c index 05c4c242f739..78abc5376b04 100644 --- a/sys/dev/mgb/if_mgb.c +++ b/sys/dev/mgb/if_mgb.c @@ -1436,7 +1436,7 @@ mgb_hw_teardown(struct mgb_softc *sc) /* Stop MAC */ CSR_CLEAR_REG(sc, MGB_MAC_RX, MGB_MAC_ENBL); - CSR_WRITE_REG(sc, MGB_MAC_TX, MGB_MAC_ENBL); + CSR_CLEAR_REG(sc, MGB_MAC_TX, MGB_MAC_ENBL); if ((err = mgb_wait_for_bits(sc, MGB_MAC_RX, MGB_MAC_DSBL, 0))) return (err); if ((err = mgb_wait_for_bits(sc, MGB_MAC_TX, MGB_MAC_DSBL, 0))) From nobody Tue Jul 22 15:08:37 2025 X-Original-To: dev-commits-src-all@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 4bmgdK5V9lz5pWBn; Tue, 22 Jul 2025 15:08: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmgdK4psmz3n10; Tue, 22 Jul 2025 15:08:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753196917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OTzDJTFNm0Gda5Ga/Ud33X5+fjyiD/2fauVHQ3uqnKI=; b=HEL+f02PVREuTz8R/6T/ox5935CyGHY0hKyuJ3f3xCLngTKcOM64wBvEVVgnXIaEEjMJJq CKVpSwgxFaRK3J1Fyr6iGC7dbRMxudZiAIpfLmOquxxmGtO6M1voNsMwAVfeVsXKCARwrv Y0VmHVToPHiTtJaASM7h/brrXOp+5Pc+/xusCrujbbdWL41gwnL7cq9qkMqJpYomqCIryL 3OaLIFEO4ZzLqRsIrGBe6DvGmd0rPFqAc1dHKkt/1Z0spyue1Ilyz+7dzVxPtUZ4shfus4 MQF4GQFczh+x+lmOvi+X01a6p6Q8iEdiBvQ7SoexVbO+WLzfYJP6n58yk7+Ouw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753196917; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OTzDJTFNm0Gda5Ga/Ud33X5+fjyiD/2fauVHQ3uqnKI=; b=CZPb+v8VLWsKWK1leguWW9hGN1YaJA/yUMiXlGlT7eRqkNGgJnJygZcTriA7IYFSg3gYag Rjb8BPEPV0+DrGQAvvtw/1yOtlCt7uq1xKzUimpcTIqbxQggCtd055Gdn2yHvan6A984jt gAJlqXRnvnL2dY/28ScRYcnotg5UTR/DQs+zf1wVDye68a2bqd/Y1IF2asIJjj64vPmTpL qbOSMh8WhId3VJu8U5z0GjORqp19Fw+VP3sbVgBmRN1budXeADNSJP3PQCDwDdbEAcDbhq 4ENSH3Vg8GvA6VPSIom8r8JcQIzQeNzOkht5MTFNNHQVoydNzmSJei8gCAlzXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753196917; a=rsa-sha256; cv=none; b=plM5wbsrk37/2SXTItkbqRPp4VWguSVuYYXVNdNPoNcXNH29rxN03uZRdaHohA0CpJHkV1 rkQ/N7hfd1/kVRjXj5ukQyp3/QvNuD43xyhx5Wq36xrQY9pkZevoF8IOl8j6ceLHXmBJDU VaAsYDlOrvI0HlXjqLZpovkO24pn1T/ZShHC/2hjruMJBpvcsze0D55Yww6086uJtgB9Z+ kUZJmMGnVO8Wfb8LEfOONIlSnMA+MfHYuRzc8gQChfB8CMkcqo/WnlY6/7sUCRAUwK11N0 cpwNzGMUHonvruZ3Bb7dDMBH5QXh121avD21GmwBEJ/D/07JJm1uvpsSz2b7xQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmgdK4HHGzY7Q; Tue, 22 Jul 2025 15:08:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MF8bem085494; Tue, 22 Jul 2025 15:08:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MF8bAs085491; Tue, 22 Jul 2025 15:08:37 GMT (envelope-from git) Date: Tue, 22 Jul 2025 15:08:37 GMT Message-Id: <202507221508.56MF8bAs085491@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 4113280f7547 - main - aw_mmc: changes for Allwinner D1 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4113280f75471abc6509e6ea9ca0b2428529a20d Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=4113280f75471abc6509e6ea9ca0b2428529a20d commit 4113280f75471abc6509e6ea9ca0b2428529a20d Author: Julien Cassette AuthorDate: 2025-07-22 14:50:38 +0000 Commit: Mitchell Horne CommitDate: 2025-07-22 15:03:48 +0000 aw_mmc: changes for Allwinner D1 Necessary driver changes to run on the platform: - DMA descriptors need shifting - Add quirk for max-sized transfers - Add compatible string Co-authored-by: br Co-authored-by: mhorne MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D51197 --- sys/arm/allwinner/aw_mmc.c | 33 ++++++++++++++++++++++++++------- 1 file changed, 26 insertions(+), 7 deletions(-) diff --git a/sys/arm/allwinner/aw_mmc.c b/sys/arm/allwinner/aw_mmc.c index 6bebf5e5fb5e..a8add957dc74 100644 --- a/sys/arm/allwinner/aw_mmc.c +++ b/sys/arm/allwinner/aw_mmc.c @@ -84,21 +84,26 @@ struct aw_mmc_conf { uint32_t dma_xferlen; + uint32_t dma_desc_shift; bool mask_data0; bool can_calibrate; bool new_timing; + bool zero_is_skip; }; static const struct aw_mmc_conf a10_mmc_conf = { .dma_xferlen = 0x2000, + .dma_desc_shift = 0, }; static const struct aw_mmc_conf a13_mmc_conf = { .dma_xferlen = 0x10000, + .dma_desc_shift = 0, }; static const struct aw_mmc_conf a64_mmc_conf = { .dma_xferlen = 0x10000, + .dma_desc_shift = 0, .mask_data0 = true, .can_calibrate = true, .new_timing = true, @@ -106,13 +111,24 @@ static const struct aw_mmc_conf a64_mmc_conf = { static const struct aw_mmc_conf a64_emmc_conf = { .dma_xferlen = 0x2000, + .dma_desc_shift = 0, .can_calibrate = true, }; +static const struct aw_mmc_conf d1_mmc_conf = { + .dma_xferlen = 0x1000, + .dma_desc_shift = 2, + .mask_data0 = true, + .can_calibrate = true, + .new_timing = true, + .zero_is_skip = true, +}; + static struct ofw_compat_data compat_data[] = { {"allwinner,sun4i-a10-mmc", (uintptr_t)&a10_mmc_conf}, {"allwinner,sun5i-a13-mmc", (uintptr_t)&a13_mmc_conf}, {"allwinner,sun7i-a20-mmc", (uintptr_t)&a13_mmc_conf}, + {"allwinner,sun20i-d1-mmc", (uintptr_t)&d1_mmc_conf}, {"allwinner,sun50i-a64-mmc", (uintptr_t)&a64_mmc_conf}, {"allwinner,sun50i-a64-emmc", (uintptr_t)&a64_emmc_conf}, {NULL, 0} @@ -607,16 +623,18 @@ aw_dma_cb(void *arg, bus_dma_segment_t *segs, int nsegs, int err) dma_desc = sc->aw_dma_desc; for (i = 0; i < nsegs; i++) { - if (segs[i].ds_len == sc->aw_mmc_conf->dma_xferlen) + if ((segs[i].ds_len == sc->aw_mmc_conf->dma_xferlen) && + !sc->aw_mmc_conf->zero_is_skip) dma_desc[i].buf_size = 0; /* Size of 0 indicate max len */ else dma_desc[i].buf_size = segs[i].ds_len; - dma_desc[i].buf_addr = segs[i].ds_addr; + dma_desc[i].buf_addr = segs[i].ds_addr >> + sc->aw_mmc_conf->dma_desc_shift; dma_desc[i].config = AW_MMC_DMA_CONFIG_CH | - AW_MMC_DMA_CONFIG_OWN | AW_MMC_DMA_CONFIG_DIC; - - dma_desc[i].next = sc->aw_dma_desc_phys + - ((i + 1) * sizeof(struct aw_mmc_dma_desc)); + AW_MMC_DMA_CONFIG_OWN | AW_MMC_DMA_CONFIG_DIC; + dma_desc[i].next = (sc->aw_dma_desc_phys + + (i + 1) * sizeof(struct aw_mmc_dma_desc)) >> + sc->aw_mmc_conf->dma_desc_shift; } dma_desc[0].config |= AW_MMC_DMA_CONFIG_FD; @@ -678,7 +696,8 @@ aw_mmc_prepare_dma(struct aw_mmc_softc *sc) AW_MMC_WRITE_4(sc, AW_MMC_IDIE, val); /* Set DMA descritptor list address */ - AW_MMC_WRITE_4(sc, AW_MMC_DLBA, sc->aw_dma_desc_phys); + AW_MMC_WRITE_4(sc, AW_MMC_DLBA, sc->aw_dma_desc_phys >> + sc->aw_mmc_conf->dma_desc_shift); /* FIFO trigger level */ AW_MMC_WRITE_4(sc, AW_MMC_FWLR, AW_MMC_DMA_FTRGLEVEL); From nobody Tue Jul 22 15:08:38 2025 X-Original-To: dev-commits-src-all@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 4bmgdL6njxz5pWZ9; Tue, 22 Jul 2025 15:08: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmgdL5qklz3n12; Tue, 22 Jul 2025 15:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753196918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9+IC6m3DpU+7GwAYyldo/qibPHkOEchS/LgAwJpXVaU=; b=nLPIsfq8qH6gFEc63m9hRBdMqJgSemuhfbwdD3u0GDknv7sbYpdgseIRwGGkyo2c92ZSQB o1qAuS1KHlTE6wENpPf19EmkkPSmw3MSrTArXYn9C5LIJuuBDgFPL89BO9g9M6/VffofVg 9tN4sfr15qrwL8JQ+Vd+kfik7sSta6JOViX00AM3p5jbyTazVd9P38cZZezViE+4HB4TF6 sLM+IIzzwmBW6vwRLD5BL0gPWPxhY4U9wMUXu5qnexzxpqkMU/v8I6mYzc5SxrWIGOsGKm okGrOQO/lhxNi7cKp79AFe2YLh5WZgYXjKql/pzRZx7g7D1gns41RyFBxfONKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753196918; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9+IC6m3DpU+7GwAYyldo/qibPHkOEchS/LgAwJpXVaU=; b=wt4Fl6dB06L+LMxffrNFZv7ECk/SpvOcQUtPFWzcwn0cC0BssRTkpFwqb80paZbyAzC/uk u/W1p1czUJ08JH4FvJKdZQviSOtbRNYzSYkVeyajkuO524ziHeaBtTyPtW0UUp2T0Zn2Tp asV/UPOcT4ZBTJYOpSvIVQDNmfDvU7jbvsCPXL+gaEx00VuPgl8+pKMMFdMn9W8IrKrSlr SrFfTXLaeXGvdwmyKnaeSQq2gI8uOBC72VT32W26Yn9fFoKvbqFPPqYAR+6GDGLfgfr0KE +fC73uFuk4X2yIvX2OG+txYzWV/gPC5wMltO+s0rV2Nhq0DgC1d8pdoTSwihEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753196918; a=rsa-sha256; cv=none; b=x1JaSKsLQyU+Snp3VfYZ8BP1cceYNtmuBBRgtLBErokDSKzfMOQXyAnhbWSQyYZoNse1Fu JY0DsY9uzCF+KBedv6HnP1m7FK7XpEuiVwNGZEHNRyiYqKvrm/VufFZA7limdvqs1K7f4Q YDdW7bf4sAEoz9uLSnCw2hF4at8glvppLaowyynyfcQy4EuiZVePpN5n5BRaMBkXJ/rJfU iHeW4UTXCtCoXq0DLlOdTjqRt7OXx4893HlpEKlDBIz8jZLsrF6jT4b2U5ZBcVI49G6m0v zkMiAtbduQWZUgx37jvLN3zWhXMXR58k0ZyM/i+C/8niqtwBV7bbD7slQyx5EQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmgdL5ChKzYm8; Tue, 22 Jul 2025 15:08:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MF8cJK085534; Tue, 22 Jul 2025 15:08:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MF8c3n085531; Tue, 22 Jul 2025 15:08:38 GMT (envelope-from git) Date: Tue, 22 Jul 2025 15:08:38 GMT Message-Id: <202507221508.56MF8c3n085531@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mitchell Horne Subject: git: 09fb6eb4a4af - main - riscv: enable aw_mmc driver List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mhorne X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 09fb6eb4a4af46b37d468f370dbbdcb4ee220cef Auto-Submitted: auto-generated The branch main has been updated by mhorne: URL: https://cgit.FreeBSD.org/src/commit/?id=09fb6eb4a4af46b37d468f370dbbdcb4ee220cef commit 09fb6eb4a4af46b37d468f370dbbdcb4ee220cef Author: Mitchell Horne AuthorDate: 2025-07-22 14:52:58 +0000 Commit: Mitchell Horne CommitDate: 2025-07-22 15:04:57 +0000 riscv: enable aw_mmc driver For the Allwinner D1. MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D51198 --- sys/riscv/allwinner/files.allwinner | 1 + sys/riscv/conf/std.allwinner | 1 + 2 files changed, 2 insertions(+) diff --git a/sys/riscv/allwinner/files.allwinner b/sys/riscv/allwinner/files.allwinner index 73fa9660e2d2..7a4ff6b9c62e 100644 --- a/sys/riscv/allwinner/files.allwinner +++ b/sys/riscv/allwinner/files.allwinner @@ -1,5 +1,6 @@ arm/allwinner/aw_gpio.c optional gpio aw_gpio fdt +arm/allwinner/aw_mmc.c optional mmc aw_mmc fdt | mmccam aw_mmc fdt arm/allwinner/aw_rtc.c optional aw_rtc fdt arm/allwinner/aw_syscon.c optional syscon arm/allwinner/aw_sid.c optional aw_sid nvmem diff --git a/sys/riscv/conf/std.allwinner b/sys/riscv/conf/std.allwinner index 2b1e0d4e09dc..34fe195b01ba 100644 --- a/sys/riscv/conf/std.allwinner +++ b/sys/riscv/conf/std.allwinner @@ -7,6 +7,7 @@ options SOC_ALLWINNER_D1 device aw_ccu # Allwinner clock controller device aw_gpio # Allwinner GPIO controller +device aw_mmc # Allwinner SD/MMC controller device aw_rtc # Allwinner Real-time Clock device aw_sid # Allwinner Secure ID EFUSE device aw_timer # Allwinner Timer From nobody Tue Jul 22 15:11:47 2025 X-Original-To: dev-commits-src-all@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 4bmgj026khz5pWlm; Tue, 22 Jul 2025 15:11: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmghz5kgzz3ptv; Tue, 22 Jul 2025 15:11:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753197107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+obgaF1ByzpVqY3HxoLE4NJ2H3g1cdSxc0XRkINVc3I=; b=pGZ4KCiqukvQDyPXFNmyQSc1JbWB/4sjTKr7AfeqSQvl5bjL6OoiWZtp3oq+hs/MPp6uzK 7hVaY5EtiVkROvccQH0DUhqT1/5oo9258nzsUhGLViYYL5LyD9yZR6hDjz0bXMG10pNAzW pEWXxqAfvotXSA0SmJBGSAwrIIofdb2EovIIj+YLOG+5i+8rYZ5eJ6gjnZ7yITYKvkY2sO FGnGIDsk05DVVJNDV03296bN1bQW1G/ifX19vx0/rSwsC46x6Wp8TlLtwMSz/j74TODK1s NX5JNfHnJ/ObMulIJ1G3RuZNsdcjTXiw86VF8QiUYY2KGqjigvFIIS2zSlRL2g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753197107; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+obgaF1ByzpVqY3HxoLE4NJ2H3g1cdSxc0XRkINVc3I=; b=dNUa7kqWrWcsfCFz2QJlBhEDXeGx89KcHAtcziZ5ek+y4v5jD/b577JexCEBIF/aieBKvy nsD7+YZ7icujXAlshWxHSXO7gSri8uZUPkwZtV6QGeSpaG0h2Uf3Om4/+vWvEpny8riOmL YyUyeuVjjV/XUDVlrOz6xQWbETrszcwJ333gWFqmQKqk55rOwL+F3nQJ9g/QY8a9CXwLtc g0VwFoLPnZkH0fqKpvIUZCoPSxkPK5WayRvKGTgreVFKbstaquy523KVAhGb57XJhZ85Lp LmtKOl3Wn7hb7kk7PKZIEZBx9NW5zmJR9aOLcJyDt37wq1mqE5/aEEYKRwp9VA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753197107; a=rsa-sha256; cv=none; b=p1Rhkj5U3A4MqVqYqSEYNZ59qXLSp6fCUfVpj8mylTdMr92W8+27+oYtKlsrfcK8IOFJLz kCqIH9RahVQRmDcno0hPTEdWGCMzjMLG/ktXWFakgbWSA4dHZPLcAr5ywVYdJ0/sFL0D6S ZX3ft2USaUvTYJVvfOIeDbdeQfa4E5kccSVRqsrqe+nnc9nPxBO/KhZD71ABbuBflFux3J 6YQwhQOsXwCLc86yslcxzr5pDBCYb7U+9O24LTR4Q7AubpC6ozk5KMw0mBSZMdH0k03CNh W0tlXFfdY2rckUkT6UavcBrdkSCt/0ZJdvnhMXoQbyOxRDADr6rJu75HjAQJFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmghz5JyCzYpk; Tue, 22 Jul 2025 15:11:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MFBlTT096307; Tue, 22 Jul 2025 15:11:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MFBlfh096304; Tue, 22 Jul 2025 15:11:47 GMT (envelope-from git) Date: Tue, 22 Jul 2025 15:11:47 GMT Message-Id: <202507221511.56MFBlfh096304@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 441995e161a2 - main - memchr.3: mention the len argument in the functions description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 441995e161a2564d37947d054a2f1219754deb5f Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=441995e161a2564d37947d054a2f1219754deb5f commit 441995e161a2564d37947d054a2f1219754deb5f Author: Konstantin Belousov AuthorDate: 2025-07-19 12:15:44 +0000 Commit: Konstantin Belousov CommitDate: 2025-07-22 15:11:40 +0000 memchr.3: mention the len argument in the functions description Otherwise, its use is only specified in the error case, which is somewhat obscure. Also properly typeset NULL. Reviewed by: pauamma_gundo.com Discussed with: emaste Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D51424 --- lib/libc/string/memchr.3 | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/libc/string/memchr.3 b/lib/libc/string/memchr.3 index f5d1fe5d5c7f..65617a117371 100644 --- a/lib/libc/string/memchr.3 +++ b/lib/libc/string/memchr.3 @@ -52,7 +52,10 @@ locates the first occurrence of (converted to an .Vt "unsigned char" ) in string -.Fa b . +.Fa b , +limited to at most +.Fa len +characters. .Pp The .Fn memrchr @@ -61,15 +64,18 @@ function behaves like except that it locates the last occurrence of .Fa c in string -.Fa b . +.Fa b , +limited to the first +.Fa len +characters. .Sh RETURN VALUES The .Fn memchr and .Fn memrchr -functions -return a pointer to the byte located, -or NULL if no such byte exists within +functions return a pointer to the byte located, or +.Dv NULL +if no such byte exists within .Fa len bytes. .Sh SEE ALSO From nobody Tue Jul 22 15:26:34 2025 X-Original-To: dev-commits-src-all@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 4bmh232HkTz5pXgr; Tue, 22 Jul 2025 15:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmh230BLwz40SK; Tue, 22 Jul 2025 15:26:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753197995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HUhFB3ypF77bURfF6EzWvs1JmSASAQ8rYmi3vbq4O90=; b=wGsBt7p0IZStP7LpEKaZ9I5h+WF+WnogBPFmGQslPA0adbYUSPuKsP/0ewvaMvBiCGOKw1 BZ2l4ef4fqHieAh8hjxS2b5yM/aOItpr17/j11lyW656ExBcK6wMsy9Bgb/VoMd+VYuG/v VpHPe1AxwNaw03Gh9rWanPEo/kwY9GJ4zo4xS/0tT9Pskv+QUktIkz8Xq/tDMbLtRwOmji WPRBpjfySvXuot1b3VEW/fjLXcAVKdzRBWu/GxE5TTt4tzxpc6CX4V1HDHLmF4m8WI8Z65 0rM8Nzg9dB9RSF3ncxD+L2SChFLczjYAkn9/bTpaqWbL+/RNXrHPqxf01pnCGQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753197995; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HUhFB3ypF77bURfF6EzWvs1JmSASAQ8rYmi3vbq4O90=; b=qXRuX0tw8Pp25YuT8MHNhgmCOeYirPS6XVqj9rUzMjxNiQ/FeoDG2VvyrdbdEwmYuj9FPh nTvShhV/3Pf8gDI9QcuksO4Fxt4lJfY9AyNLO9b2qAfGMkcxeTkDlqoDf18qQi39tiEl3l PcFo+Tpjkz2E8yb7vIqpNlH5P+OnLyOu1L39yqh0xt8Ahm1dS21dMNye7+2aBSwMEGDPFu CYnBCAZ9jzzEi4POwvB4cVjBxGOo3KQB3pWUvQpKimfB8QwZ9clV6O3BHsl3tkSH+4snrP SisbMr2xb03aUay68mE5zUJyCXhH/7SBUJOd7ZsK+rOUaeBHcB6gRRqGwrEXqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753197995; a=rsa-sha256; cv=none; b=B2D1f64j+rtk1lIGdG/+LjBg7V/8WC37T16niKGVMluQHvxlKQxGcNHcTFT/WAzEge7on4 LOuz7vTnxiOqixq85yOvHJXtx5QaL+MP+RXIE8jZN11CLnt7xAayzUN4LweqEukZMBQSl/ G4IRbsG0gCpq+orumWx9S32FJ/M9XVghziniwCTjwcPjQRgS/TSxmj2nh9j3nQ/qTfpSXZ 4PZyF5XhRDU9qI2APdMyzifhaD3n7IAqyrqrtshfCN+5F1Tm9XFjsqXtVXhonlgwUxSJUa y3Ii4ouyvcKiSy5WojtXkkL/fRV72I+lLA07QR3my3pQMWgWgmnGXWP8unP7Yg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmh226qLszYnd; Tue, 22 Jul 2025 15:26:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MFQYVf022635; Tue, 22 Jul 2025 15:26:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MFQYkT022632; Tue, 22 Jul 2025 15:26:34 GMT (envelope-from git) Date: Tue, 22 Jul 2025 15:26:34 GMT Message-Id: <202507221526.56MFQYkT022632@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 7cd7b849b062 - main - vt: refer to correct man section. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 7cd7b849b0629a259f4034514cf0e47e82efc44a Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7cd7b849b0629a259f4034514cf0e47e82efc44a commit 7cd7b849b0629a259f4034514cf0e47e82efc44a Author: Matteo Riondato AuthorDate: 2025-07-22 14:11:25 +0000 Commit: Warner Losh CommitDate: 2025-07-22 15:26:21 +0000 vt: refer to correct man section. Signed-off-by: Matteo Riondato Reviewed by: imp,emaste Pull Request: https://github.com/freebsd/freebsd-src/pull/1781 --- sys/dev/drm2/drm_fb_helper.c | 2 +- sys/dev/vt/hw/vga/vt_vga.c | 2 +- sys/dev/vt/vt_core.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/dev/drm2/drm_fb_helper.c b/sys/dev/drm2/drm_fb_helper.c index f67cc9f60d02..1f4abd255690 100644 --- a/sys/dev/drm2/drm_fb_helper.c +++ b/sys/dev/drm2/drm_fb_helper.c @@ -51,7 +51,7 @@ struct vt_kms_softc { struct task fb_mode_task; }; -/* Call restore out of vt(9) locks. */ +/* Call restore out of vt(4) locks. */ static void vt_restore_fbdev_mode(void *arg, int pending) { diff --git a/sys/dev/vt/hw/vga/vt_vga.c b/sys/dev/vt/hw/vga/vt_vga.c index 64039575c0ad..675c0573bd7e 100644 --- a/sys/dev/vt/hw/vga/vt_vga.c +++ b/sys/dev/vt/hw/vga/vt_vga.c @@ -1347,7 +1347,7 @@ vga_postswitch(struct vt_device *vd) /* Reinit VGA mode, to restore view after app which change mode. */ vga_initialize(vd, (vd->vd_flags & VDF_TEXTMODE)); - /* Ask vt(9) to update chars on visible area. */ + /* Ask vt(4) to update chars on visible area. */ vd->vd_flags |= VDF_INVALID; } diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c index b0f58b38a6f1..b51ef6766de4 100644 --- a/sys/dev/vt/vt_core.c +++ b/sys/dev/vt/vt_core.c @@ -125,10 +125,10 @@ static const struct terminal_class vt_termclass = { (vw)->vw_number) static SYSCTL_NODE(_kern, OID_AUTO, vt, CTLFLAG_RD | CTLFLAG_MPSAFE, 0, - "vt(9) parameters"); + "vt(4) parameters"); static VT_SYSCTL_INT(enable_altgr, 1, "Enable AltGr key (Do not assume R.Alt as Alt)"); static VT_SYSCTL_INT(enable_bell, 0, "Enable bell"); -static VT_SYSCTL_INT(debug, 0, "vt(9) debug level"); +static VT_SYSCTL_INT(debug, 0, "vt(4) debug level"); static VT_SYSCTL_INT(deadtimer, 15, "Time to wait busy process in VT_PROCESS mode"); static VT_SYSCTL_INT(suspendswitch, 1, "Switch to VT0 before suspend"); From nobody Tue Jul 22 15:48:50 2025 X-Original-To: dev-commits-src-all@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 4bmhWl0QcBz5pYmS; Tue, 22 Jul 2025 15:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmhWl03Y4z3Hq5; Tue, 22 Jul 2025 15:48:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753199331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kr1FSALHZUVes7CO8xEkO0EPpUbkzkJurcZNdbshHEA=; b=wWompciqoUxj5AY1ntzbf0aCKMNjpg8t489LJJtOZ5ZiK8+gaMBY1cV4pdsW4RRgL1tzLb loiN2YGum47bgt+3CRPAhm9yTnjUHIrlTNqpmnj9cJmksVZKOCj/M1dIUMQXYqYzFUnRm0 XCtcsgtLvViNXHjcqPqrrtTiBkz5zQlyXq4x3cc1whkJQdJDJcAKOZbpmBM7jno707CLRt xhR1jQcjotpfciS2gqOd4s4oNFBX44Wi6yIrLTvW/1qnFoSYxN+ht01wPUqhbiCxWcg2or r/2vYqjgqrsU3JZN+6CP3r+1VUmpDk+if9RGModPdPiDYSyMeqiVsk4fJdfNgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753199331; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Kr1FSALHZUVes7CO8xEkO0EPpUbkzkJurcZNdbshHEA=; b=vYesg+J8KwGuYs70zy85iM5kug37u/GxiiNwoy5FtHusfXqAjgFlKTBlRGLhhQmmb2NZ8c y3KfQTOVnHHihAik4U7Xwli8pKmxr38eDe2P7LufJt9j/LTxDYs3GumSwwfFDlm3a+GP72 ISLn2NFsX7FycV0vTv2XlHEkBfv0Nm6y4UAlUwbNMF+9fm8voJo4bKCCeOxP/5njexwGbH u/vK0BrrLXL5Z0Eu3mtZ9gPmcSUg+1m5Hr5cNHRWqvf+Tx8gZZ5vgDV0Btib4Sm0AwJJ1c 5/eag3Fd9Q52UnrApZtlHtQMhhIpBlMRoy69QSj7zg69eQsFSeb8/SBlDgwDRw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753199331; a=rsa-sha256; cv=none; b=UAHrF1NFke1vx5hG9c8X+UFLyENlxTQXy//09hsv3lqF84K2fPTKcnNBvW2U2tf8KVbJSU PugNzAphpF+p1ZoKpgXOqN/P8lBAr2QcC3ZcRm42/ZHySDliCYhteaEBieym6Aeq+X4F6g muyymrefHRwqdFiWJ2d1zIv5OG3OI4aDX7529qAFyQRnKLJQbU473xy3yDzVimXHLT1kwt iXeJh79zutDGx7Fqu6KsWOmFSl+kT2lAJfYqlN96ruY+Nxk++WoiWjARZqrVZh2FuqzFsr W0VUyYLfPP2YduhFrb/t+mjTRken9sqLa3xNcIb31FohlOzBZkDEzBf4HA7ISQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmhWk6lD0zZjp; Tue, 22 Jul 2025 15:48:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MFmoCF060275; Tue, 22 Jul 2025 15:48:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MFmoo2060272; Tue, 22 Jul 2025 15:48:50 GMT (envelope-from git) Date: Tue, 22 Jul 2025 15:48:50 GMT Message-Id: <202507221548.56MFmoo2060272@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: ae07a5805b19 - main - krb5: Add version maps List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ae07a5805b1906f29e786f415d67bef334557bd3 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=ae07a5805b1906f29e786f415d67bef334557bd3 commit ae07a5805b1906f29e786f415d67bef334557bd3 Author: Cy Schubert AuthorDate: 2025-07-22 15:38:19 +0000 Commit: Cy Schubert CommitDate: 2025-07-22 15:48:40 +0000 krb5: Add version maps Shared objects must have version maps. These were copied from upstream's *.exports files. Reminded by: kib Fixes: ee3960cba106 --- krb5/lib/crypto/Makefile | 1 + krb5/lib/crypto/version.map | 108 ++++++ krb5/lib/gssapi/Makefile | 1 + krb5/lib/gssapi/version.map | 173 +++++++++ krb5/lib/kadm5clnt/Makefile | 1 + krb5/lib/kadm5clnt/version.map | 118 ++++++ krb5/lib/kadm5srv/Makefile | 1 + krb5/lib/kadm5srv/version.map | 137 +++++++ krb5/lib/kdb/Makefile | 1 + krb5/lib/kdb/version.map | 111 ++++++ krb5/lib/krad/Makefile | 1 + krb5/lib/krad/version.map | 26 ++ krb5/lib/krb5/Makefile | 1 + krb5/lib/krb5/version.map | 658 ++++++++++++++++++++++++++++++++ krb5/lib/rpc/Makefile | 1 + krb5/lib/rpc/version.map | 147 +++++++ krb5/plugins/audit/Makefile | 1 + krb5/plugins/audit/version.map | 10 + krb5/plugins/k5tls/Makefile | 1 + krb5/plugins/k5tls/version.map | 4 + krb5/plugins/kdb/db2/Makefile | 1 + krb5/plugins/kdb/db2/version.map | 109 ++++++ krb5/plugins/preauth/otp/Makefile | 1 + krb5/plugins/preauth/otp/version.map | 4 + krb5/plugins/preauth/pkinit/Makefile | 1 + krb5/plugins/preauth/pkinit/version.map | 5 + krb5/plugins/preauth/spake/Makefile | 1 + krb5/plugins/preauth/spake/version.map | 5 + krb5/plugins/preauth/test/Makefile | 1 + krb5/plugins/preauth/test/version.map | 5 + 30 files changed, 1635 insertions(+) diff --git a/krb5/lib/crypto/Makefile b/krb5/lib/crypto/Makefile index 5087a2fb559b..5efe53d12aa8 100644 --- a/krb5/lib/crypto/Makefile +++ b/krb5/lib/crypto/Makefile @@ -17,6 +17,7 @@ LIB= k5crypto # SHLIB_MAJOR= 3 LDFLAGS=-Wl,--no-undefined LIBADD= com_err krb5support crypto +VERSION_MAP= ${.CURDIR}/version.map # XXX The following doesn't work. Even though the pathnames are the same # XXX we need to use the alternative .include statements. diff --git a/krb5/lib/crypto/version.map b/krb5/lib/crypto/version.map new file mode 100644 index 000000000000..bd4c2c1cd23f --- /dev/null +++ b/krb5/lib/crypto/version.map @@ -0,0 +1,108 @@ +KRB5_CRYPTO_1.0 { + global: + krb5_c_make_random_key; + krb5_c_encrypt_length; + krb5_process_key; + krb5_string_to_cksumtype; + krb5_c_valid_enctype; + krb5_c_valid_cksumtype; + krb5_string_to_key; + krb5_c_encrypt_iov; + krb5_c_checksum_length; + is_keyed_cksum; + krb5_c_padding_length; + is_coll_proof_cksum; + krb5_init_random_key; + krb5_c_string_to_key_with_params; + krb5_c_random_make_octets; + krb5_c_random_os_entropy; + krb5_c_decrypt; + krb5_c_crypto_length; + krb5_c_block_size; + krb5_cksumtype_to_string; + krb5_c_keyed_checksum_types; + krb5_c_is_keyed_cksum; + krb5_c_crypto_length_iov; + valid_cksumtype; + krb5_c_random_seed; + krb5_c_random_to_key; + krb5_verify_checksum; + krb5_c_free_state; + krb5_c_verify_checksum; + krb5_c_random_add_entropy; + krb5_c_decrypt_iov; + krb5_c_make_checksum; + krb5_checksum_size; + krb5_free_cksumtypes; + krb5_finish_key; + krb5_encrypt_size; + krb5_c_keylengths; + krb5_c_prf; + krb5_encrypt; + krb5_string_to_enctype; + krb5_c_is_coll_proof_cksum; + krb5_c_init_state; + krb5_eblock_enctype; + krb5_decrypt; + krb5_c_encrypt; + krb5_c_enctype_compare; + krb5_c_verify_checksum_iov; + valid_enctype; + krb5_enctype_to_string; + krb5_enctype_to_name; + krb5_c_make_checksum_iov; + krb5_calculate_checksum; + krb5_c_string_to_key; + krb5_use_enctype; + krb5_random_key; + krb5_finish_random_key; + krb5_c_prf_length; + krb5int_c_mandatory_cksumtype; + krb5_c_fx_cf2_simple; + krb5int_c_weak_enctype; + krb5_encrypt_data; + krb5int_c_copy_keyblock; + krb5int_c_copy_keyblock_contents; + krb5int_c_free_keyblock_contents; + krb5int_c_free_keyblock; + krb5int_c_init_keyblock; + krb5int_hash_md4; + krb5int_hash_md5; + krb5int_hash_sha256; + krb5int_hash_sha384; + krb5int_enc_arcfour; + krb5int_hmac; + krb5_k_create_key; + krb5_k_decrypt; + krb5_k_decrypt_iov; + krb5_k_encrypt; + krb5_k_encrypt_iov; + krb5_k_free_key; + krb5_k_key_enctype; + krb5_k_key_keyblock; + krb5_k_make_checksum; + krb5_k_make_checksum_iov; + krb5_k_prf; + krb5_k_reference_key; + krb5_k_verify_checksum; + krb5_k_verify_checksum_iov; + krb5int_aes_encrypt; + krb5int_aes_decrypt; + krb5int_enc_des3; + krb5int_arcfour_gsscrypt; + krb5int_camellia_encrypt; + krb5int_cmac_checksum; + krb5int_enc_aes128; + krb5int_enc_aes256; + krb5int_enc_camellia128; + krb5int_enc_camellia256; + krb5int_derive_key; + krb5int_derive_random; + k5_sha256; + krb5int_nfold; + k5_allow_weak_pbkdf2iter; + krb5_c_prfplus; + krb5_c_derive_prfplus; + k5_enctype_to_ssf; + krb5int_c_deprecated_enctype; +}; diff --git a/krb5/lib/gssapi/Makefile b/krb5/lib/gssapi/Makefile index 51ed6f162d65..569452cfb538 100644 --- a/krb5/lib/gssapi/Makefile +++ b/krb5/lib/gssapi/Makefile @@ -17,6 +17,7 @@ LIB= gssapi_krb5 # SHLIB_MAJOR= 2 LDFLAGS=-Wl,--no-undefined LIBADD= krb5 k5crypto com_err krb5profile krb5support +VERSION_MAP= ${.CURDIR}/version.map # This is a contcatonation of: # crypto/krb5/src/lib/gssapi/libgssapi_krb5.exports diff --git a/krb5/lib/gssapi/version.map b/krb5/lib/gssapi/version.map new file mode 100644 index 000000000000..95f7ed5151db --- /dev/null +++ b/krb5/lib/gssapi/version.map @@ -0,0 +1,173 @@ +KRB5_GSSAPI_1.0 { + global: + GSS_C_ATTR_LOCAL_LOGIN_USER; + GSS_C_INQ_NEGOEX_KEY; + GSS_C_INQ_NEGOEX_VERIFY_KEY; + GSS_C_INQ_SSPI_SESSION_KEY; + GSS_C_MA_AUTH_INIT; + GSS_C_MA_AUTH_INIT_ANON; + GSS_C_MA_AUTH_INIT_INIT; + GSS_C_MA_AUTH_TARG; + GSS_C_MA_AUTH_TARG_ANON; + GSS_C_MA_AUTH_TARG_INIT; + GSS_C_MA_CBINDINGS; + GSS_C_MA_COMPRESS; + GSS_C_MA_CONF_PROT; + GSS_C_MA_CTX_TRANS; + GSS_C_MA_DELEG_CRED; + GSS_C_MA_DEPRECATED; + GSS_C_MA_INTEG_PROT; + GSS_C_MA_ITOK_FRAMED; + GSS_C_MA_MECH_COMPOSITE; + GSS_C_MA_MECH_CONCRETE; + GSS_C_MA_MECH_GLUE; + GSS_C_MA_MECH_NEGO; + GSS_C_MA_MECH_PSEUDO; + GSS_C_MA_MIC; + GSS_C_MA_NEGOEX_AND_SPNEGO; + GSS_C_MA_NOT_DFLT_MECH; + GSS_C_MA_NOT_MECH; + GSS_C_MA_OOS_DET; + GSS_C_MA_PFS; + GSS_C_MA_PROT_READY; + GSS_C_MA_REPLAY_DET; + GSS_C_MA_WRAP; + GSS_C_NT_ANONYMOUS; + GSS_C_NT_COMPOSITE_EXPORT; + GSS_C_NT_EXPORT_NAME; + GSS_C_NT_HOSTBASED_SERVICE; + GSS_C_NT_HOSTBASED_SERVICE_X; + GSS_C_NT_MACHINE_UID_NAME; + GSS_C_NT_STRING_UID_NAME; + GSS_C_NT_USER_NAME; + GSS_C_SEC_CONTEXT_SASL_SSF; + GSS_KRB5_CRED_NO_CI_FLAGS_X; + GSS_KRB5_GET_CRED_IMPERSONATOR; + GSS_KRB5_NT_ENTERPRISE_NAME; + GSS_KRB5_NT_PRINCIPAL_NAME; + GSS_KRB5_NT_X509_CERT; + gss_accept_sec_context; + gss_acquire_cred; + gss_acquire_cred_from; + gss_acquire_cred_impersonate_name; + gss_acquire_cred_with_password; + gss_add_buffer_set_member; + gss_add_cred; + gss_add_cred_from; + gss_add_cred_impersonate_name; + gss_add_cred_with_password; + gss_add_oid_set_member; + gss_authorize_localname; + gss_canonicalize_name; + gss_compare_name; + gss_complete_auth_token; + gss_context_time; + gss_create_empty_buffer_set; + gss_create_empty_oid_set; + gss_decapsulate_token; + gss_delete_name_attribute; + gss_delete_sec_context; + gss_display_mech_attr; + gss_display_name; + gss_display_name_ext; + gss_display_status; + gss_duplicate_name; + gss_encapsulate_token; + gss_export_cred; + gss_export_name; + gss_export_name_composite; + gss_export_sec_context; + gss_get_mic; + gss_get_mic_iov; + gss_get_mic_iov_length; + gss_get_name_attribute; + gss_import_cred; + gss_import_name; + gss_import_sec_context; + gss_indicate_mechs; + gss_indicate_mechs_by_attrs; + gss_init_sec_context; + gss_inquire_attrs_for_mech; + gss_inquire_context; + gss_inquire_cred; + gss_inquire_cred_by_mech; + gss_inquire_cred_by_oid; + gss_inquire_mech_for_saslname; + gss_inquire_mechs_for_name; + gss_inquire_name; + gss_inquire_names_for_mech; + gss_inquire_saslname_for_mech; + gss_inquire_sec_context_by_oid; + gss_krb5_ccache_name; + gss_krb5_copy_ccache; + gss_krb5_export_lucid_sec_context; + gss_krb5_free_lucid_sec_context; + gss_krb5_get_tkt_flags; + gss_krb5_import_cred; + gss_krb5_set_allowable_enctypes; + gss_krb5_set_cred_rcache; + gss_krb5int_make_seal_token_v3; + gss_krb5int_unseal_token_v3; + gss_localname; + gss_map_name_to_any; + gss_mech_iakerb; + gss_mech_initialize; + gss_mech_krb5; + gss_mech_krb5_old; + gss_mech_krb5_wrong; + gss_mech_set_krb5; + gss_mech_set_krb5_both; + gss_mech_set_krb5_old; + gss_nt_exported_name; + gss_nt_krb5_name; + gss_nt_krb5_principal; + gss_nt_machine_uid_name; + gss_nt_service_name; + gss_nt_service_name_v2; + gss_nt_string_uid_name; + gss_nt_user_name; + gss_oid_equal; + gss_oid_to_str; + gss_pname_to_uid; + gss_process_context_token; + gss_pseudo_random; + gss_release_any_name_mapping; + gss_release_buffer; + gss_release_buffer_set; + gss_release_cred; + gss_release_iov_buffer; + gss_release_name; + gss_release_oid; + gss_release_oid_set; + gss_seal; + gss_set_cred_option; + gss_set_name_attribute; + gss_set_neg_mechs; + gss_set_sec_context_option; + gss_sign; + gss_store_cred; + gss_store_cred_into; + gss_str_to_oid; + gss_test_oid_set_member; + gss_unseal; + gss_unwrap; + gss_unwrap_aead; + gss_unwrap_iov; + gss_userok; + gss_verify; + gss_verify_mic; + gss_verify_mic_iov; + gss_wrap; + gss_wrap_aead; + gss_wrap_iov; + gss_wrap_iov_length; + gss_wrap_size_limit; + gssint_g_seqstate_init; + gsskrb5_extract_authtime_from_sec_context; + gsskrb5_extract_authz_data_from_sec_context; + gssspi_mech_invoke; + gssspi_set_cred_option; + krb5_gss_dbg_client_expcreds; + krb5_gss_register_acceptor_identity; + krb5_gss_use_kdc_context; +}; diff --git a/krb5/lib/kadm5clnt/Makefile b/krb5/lib/kadm5clnt/Makefile index ddb9b0e9fec5..c9f199bdaea3 100644 --- a/krb5/lib/kadm5clnt/Makefile +++ b/krb5/lib/kadm5clnt/Makefile @@ -17,6 +17,7 @@ LIB= kadm5clnt_mit # SHLIB_MAJOR= 12 LDFLAGS=-Wl,--no-undefined LIBADD= krb5profile gssrpc gssapi_krb5 krb5 k5crypto krb5support com_err +VERSION_MAP= ${.CURDIR}/version.map SRCS= alt_prof.c \ chpass_util.c \ diff --git a/krb5/lib/kadm5clnt/version.map b/krb5/lib/kadm5clnt/version.map new file mode 100644 index 000000000000..9743c7cf6140 --- /dev/null +++ b/krb5/lib/kadm5clnt/version.map @@ -0,0 +1,118 @@ +KRB5_KADM5_CLNT_1.0 { + global: + _kadm5_check_handle; + _kadm5_chpass_principal_util; + kadm5_chpass_principal; + kadm5_chpass_principal_3; + kadm5_chpass_principal_util; + kadm5_create_policy; + kadm5_create_principal; + kadm5_create_principal_3; + kadm5_decrypt_key; + kadm5_delete_policy; + kadm5_delete_principal; + kadm5_destroy; + kadm5_flush; + kadm5_free_config_params; + kadm5_free_kadm5_key_data; + kadm5_free_key_data; + kadm5_free_name_list; + kadm5_free_policy_ent; + kadm5_free_principal_ent; + kadm5_free_strings; + kadm5_get_admin_service_name; + kadm5_get_config_params; + kadm5_get_policies; + kadm5_get_policy; + kadm5_get_principal; + kadm5_get_principal_keys; + kadm5_get_principals; + kadm5_get_privs; + kadm5_get_strings; + kadm5_init; + kadm5_init_anonymous; + kadm5_init_krb5_context; + kadm5_init_with_creds; + kadm5_init_with_password; + kadm5_init_with_skey; + kadm5_lock; + kadm5_modify_policy; + kadm5_modify_principal; + kadm5_purgekeys; + kadm5_randkey_principal; + kadm5_randkey_principal_3; + kadm5_rename_principal; + kadm5_set_string; + kadm5_setkey_principal; + kadm5_setkey_principal_3; + kadm5_setkey_principal_4; + kadm5_unlock; + krb5_aprof_get_boolean; + krb5_aprof_get_deltat; + krb5_aprof_get_int32; + krb5_aprof_get_string; + krb5_aprof_getvals; + krb5_flagnum_to_string; + krb5_flagspec_to_mask; + krb5_flags_to_strings; + krb5_free_key_data_contents; + krb5_keysalt_is_present; + krb5_keysalt_iterate; + krb5_klog_close; + krb5_klog_init; + krb5_klog_reopen; + krb5_klog_set_context; + krb5_klog_syslog; + krb5_string_to_keysalts; + xdr_chpass3_arg; + xdr_chpass_arg; + xdr_chrand3_arg; + xdr_chrand_arg; + xdr_chrand_ret; + xdr_cpol_arg; + xdr_cprinc3_arg; + xdr_cprinc_arg; + xdr_dpol_arg; + xdr_dprinc_arg; + xdr_generic_ret; + xdr_getpkeys_arg; + xdr_getpkeys_ret; + xdr_getprivs_ret; + xdr_gpol_arg; + xdr_gpol_ret; + xdr_gpols_arg; + xdr_gpols_ret; + xdr_gprinc_arg; + xdr_gprinc_ret; + xdr_gprincs_arg; + xdr_gprincs_ret; + xdr_kadm5_key_data; + xdr_kadm5_policy_ent_rec; + xdr_kadm5_principal_ent_rec; + xdr_kadm5_ret_t; + xdr_krb5_deltat; + xdr_krb5_enctype; + xdr_krb5_flags; + xdr_krb5_int16; + xdr_krb5_key_data_nocontents; + xdr_krb5_key_salt_tuple; + xdr_krb5_keyblock; + xdr_krb5_kvno; + xdr_krb5_octet; + xdr_krb5_principal; + xdr_krb5_salttype; + xdr_krb5_timestamp; + xdr_krb5_tl_data; + xdr_krb5_ui_2; + xdr_krb5_ui_4; + xdr_mpol_arg; + xdr_mprinc_arg; + xdr_nullstring; + xdr_nulltype; + xdr_rprinc_arg; + xdr_setkey3_arg; + xdr_setkey4_arg; + xdr_setkey_arg; + xdr_ui_4; + kadm5_init_iprop; +}; diff --git a/krb5/lib/kadm5srv/Makefile b/krb5/lib/kadm5srv/Makefile index f716dfcdaedc..90a2180d496a 100644 --- a/krb5/lib/kadm5srv/Makefile +++ b/krb5/lib/kadm5srv/Makefile @@ -17,6 +17,7 @@ LIB= kadm5srv_mit # SHLIB_MAJOR= 12 LDFLAGS=-Wl,--no-undefined LIBADD= krb5profile gssrpc gssapi_krb5 kdb5 krb5 k5crypto krb5support com_err +VERSION_MAP= ${.CURDIR}/version.map INCSDIR= ${INCLUDEDIR}/kadm5 diff --git a/krb5/lib/kadm5srv/version.map b/krb5/lib/kadm5srv/version.map new file mode 100644 index 000000000000..a0e9da6daef2 --- /dev/null +++ b/krb5/lib/kadm5srv/version.map @@ -0,0 +1,137 @@ +KRB5_KADM5_SRV_1.0 { + global: + _kadm5_check_handle; + _kadm5_chpass_principal_util; + hist_princ; + kadm5_chpass_principal; + kadm5_chpass_principal_3; + kadm5_chpass_principal_util; + kadm5_create_policy; + kadm5_create_principal; + kadm5_create_principal_3; + kadm5_decrypt_key; + kadm5_delete_policy; + kadm5_delete_principal; + kadm5_destroy; + kadm5_flush; + kadm5_free_config_params; + kadm5_free_kadm5_key_data; + kadm5_free_key_data; + kadm5_free_name_list; + kadm5_free_policy_ent; + kadm5_free_principal_ent; + kadm5_free_strings; + kadm5_get_config_params; + kadm5_get_policies; + kadm5_get_policy; + kadm5_get_principal; + kadm5_get_principal_keys; + kadm5_get_principals; + kadm5_get_privs; + kadm5_get_strings; + kadm5_init; + kadm5_init_anonymous; + kadm5_init_krb5_context; + kadm5_init_with_creds; + kadm5_init_with_password; + kadm5_init_with_skey; + kadm5_lock; + kadm5_modify_policy; + kadm5_modify_principal; + kadm5_purgekeys; + kadm5_randkey_principal; + kadm5_randkey_principal_3; + kadm5_rename_principal; + kadm5_set_string; + kadm5_setkey_principal; + kadm5_setkey_principal_3; + kadm5_setkey_principal_4; + kadm5_unlock; + kdb_delete_entry; + kdb_free_entry; + kdb_init_hist; + kdb_init_master; + kdb_iter_entry; + kdb_put_entry; + krb5_aprof_get_boolean; + krb5_aprof_get_deltat; + krb5_aprof_get_int32; + krb5_aprof_get_string; + krb5_aprof_get_string_all; + krb5_aprof_getvals; + krb5_copy_key_data_contents; + krb5_flagnum_to_string; + krb5_flagspec_to_mask; + krb5_flags_to_strings; + krb5_free_key_data_contents; + krb5_keysalt_is_present; + krb5_keysalt_iterate; + krb5_klog_close; + krb5_klog_init; + krb5_klog_reopen; + krb5_klog_set_context; + krb5_klog_syslog; + krb5_string_to_keysalts; + master_db; + master_princ; + osa_free_princ_ent; + passwd_check; + xdr_chpass3_arg; + xdr_chpass_arg; + xdr_chrand3_arg; + xdr_chrand_arg; + xdr_chrand_ret; + xdr_cpol_arg; + xdr_cprinc3_arg; + xdr_cprinc_arg; + xdr_dpol_arg; + xdr_dprinc_arg; + xdr_generic_ret; + xdr_getpkeys_arg; + xdr_getpkeys_ret; + xdr_getprivs_ret; + xdr_gpol_arg; + xdr_gpol_ret; + xdr_gpols_arg; + xdr_gpols_ret; + xdr_gprinc_arg; + xdr_gprinc_ret; + xdr_gprincs_arg; + xdr_gprincs_ret; + xdr_gstrings_arg; + xdr_gstrings_ret; + xdr_kadm5_policy_ent_rec; + xdr_kadm5_principal_ent_rec; + xdr_kadm5_ret_t; + xdr_krb5_deltat; + xdr_krb5_enctype; + xdr_krb5_flags; + xdr_krb5_int16; + xdr_krb5_key_data; + xdr_krb5_key_data_nocontents; + xdr_krb5_key_salt_tuple; + xdr_krb5_keyblock; + xdr_krb5_kvno; + xdr_krb5_octet; + xdr_krb5_principal; + xdr_krb5_salttype; + xdr_krb5_string_attr; + xdr_krb5_timestamp; + xdr_krb5_tl_data; + xdr_krb5_ui_2; + xdr_krb5_ui_4; + xdr_mpol_arg; + xdr_mprinc_arg; + xdr_nullstring; + xdr_nulltype; + xdr_osa_princ_ent_rec; + xdr_osa_pw_hist_ent; + xdr_purgekeys_arg; + xdr_rprinc_arg; + xdr_setkey3_arg; + xdr_setkey4_arg; + xdr_setkey_arg; + xdr_sstring_arg; + xdr_ui_4; + kadm5_init_iprop; +}; diff --git a/krb5/lib/kdb/Makefile b/krb5/lib/kdb/Makefile index ac7f058a7f11..57fe32e39347 100644 --- a/krb5/lib/kdb/Makefile +++ b/krb5/lib/kdb/Makefile @@ -17,6 +17,7 @@ LIB= kdb5 # SHLIB_MAJOR= 10 LDFLAGS=-Wl,--no-undefined LIBADD= krb5profile gssrpc krb5 k5crypto com_err krb5support gssapi_krb5 +VERSION_MAP= ${.CURDIR}/version.map SRCS= decrypt_key.c \ encrypt_key.c \ diff --git a/krb5/lib/kdb/version.map b/krb5/lib/kdb/version.map new file mode 100644 index 000000000000..9522af1e9edd --- /dev/null +++ b/krb5/lib/kdb/version.map @@ -0,0 +1,111 @@ +KRB5_KDB5_1.0 { + global: + krb5_db_setup_lib_handle; + krb5_db_open; + krb5_db_inited; + krb5_db_alloc; + krb5_db_free; + krb5_db_allowed_to_delegate_from; + krb5_db_audit_as_req; + krb5_db_check_allowed_to_delegate; + krb5_db_get_s4u_x509_principal; + krb5_db_check_policy_as; + krb5_db_check_policy_tgs; + krb5_db_check_transited_realms; + krb5_db_create; + krb5_db_delete_principal; + krb5_db_destroy; + krb5_db_fetch_mkey; + krb5_db_fetch_mkey_list; + krb5_db_fini; + krb5_db_free_principal; + krb5_db_get_age; + krb5_db_get_key_data_kvno; + krb5_db_get_context; + krb5_db_get_principal; + krb5_db_issue_pac; + krb5_db_iterate; + krb5_db_lock; + krb5_db_mkey_list_alias; + krb5_db_put_principal; + krb5_db_refresh_config; + krb5_db_rename_principal; + krb5_db_set_context; + krb5_db_setup_mkey_name; + krb5_db_unlock; + krb5_db_store_master_key; + krb5_db_store_master_key_list; + krb5_dbe_apw; + krb5_dbe_ark; + krb5_dbe_cpw; + krb5_dbe_create_key_data; + krb5_dbe_crk; + krb5_dbe_find_act_mkey; + krb5_dbe_fetch_act_key_list; + krb5_dbe_find_enctype; + krb5_dbe_find_mkey; + krb5_dbe_free_actkvno_list; + krb5_dbe_free_key_data_contents; + krb5_dbe_free_mkey_aux_list; + krb5_dbe_free_key_list; + krb5_dbe_free_string; + krb5_dbe_free_strings; + krb5_dbe_get_mkvno; + krb5_dbe_get_string; + krb5_dbe_get_strings; + krb5_dbe_compute_salt; + krb5_dbe_lookup_last_admin_unlock; + krb5_dbe_lookup_last_pwd_change; + krb5_dbe_lookup_actkvno; + krb5_dbe_lookup_mkey_aux; + krb5_dbe_lookup_mkvno; + krb5_dbe_lookup_mod_princ_data; + krb5_dbe_lookup_tl_data; + krb5_dbe_search_enctype; + krb5_dbe_set_string; + krb5_dbe_specialize_salt; + krb5_dbe_update_actkvno; + krb5_dbe_update_last_admin_unlock; + krb5_dbe_update_last_pwd_change; + krb5_dbe_update_mkey_aux; + krb5_dbe_update_mkvno; + krb5_dbe_update_mod_princ_data; + krb5_dbe_update_tl_data; + krb5_db_update_tl_data; + krb5_dbe_def_encrypt_key_data; + krb5_dbe_def_decrypt_key_data; + krb5_dbe_decrypt_key_data; + krb5_dbe_encrypt_key_data; + krb5_kt_kdb_ops; + krb5_ktkdb_close; + krb5_ktkdb_get_entry; + krb5_ktkdb_resolve; + krb5_ktkdb_set_context; + krb5_mkey_pwd_prompt1; + krb5_mkey_pwd_prompt2; + krb5_db_create_policy; + krb5_db_get_policy; + krb5_db_put_policy; + krb5_db_iter_policy; + krb5_db_delete_policy; + krb5_db_free_policy; + krb5_def_store_mkey_list; + krb5_db_promote; + krb5_db_register_keytab; + ulog_add_update; + ulog_init_header; + ulog_map; + ulog_set_role; + ulog_free_entries; + xdr_kdb_last_t; + xdr_kdb_incr_result_t; + xdr_kdb_fullresync_result_t; + ulog_fini; + ulog_get_entries; + ulog_get_last; + ulog_get_sno_status; + ulog_replay; + ulog_set_last; + xdr_kdb_incr_update_t; + krb5_dbe_sort_key_data; +}; diff --git a/krb5/lib/krad/Makefile b/krb5/lib/krad/Makefile index 4b18af482207..28751d9bf9b6 100644 --- a/krb5/lib/krad/Makefile +++ b/krb5/lib/krad/Makefile @@ -17,6 +17,7 @@ LIB= krad # SHLIB_MAJOR= 0 LDFLAGS=-Wl,--no-undefined LIBADD= krb5 k5crypto com_err krb5profile krb5support verto +VERSION_MAP= ${.CURDIR}/version.map SRCS= attr.c \ attrset.c \ diff --git a/krb5/lib/krad/version.map b/krb5/lib/krad/version.map new file mode 100644 index 000000000000..7e058d9bd494 --- /dev/null +++ b/krb5/lib/krad/version.map @@ -0,0 +1,26 @@ +KRB5_KRAD_1.0 { + global: + krad_code_name2num; + krad_code_num2name; + krad_attr_name2num; + krad_attr_num2name; + krad_attrset_new; + krad_attrset_copy; + krad_attrset_free; + krad_attrset_add; + krad_attrset_add_number; + krad_attrset_del; + krad_attrset_get; + krad_packet_bytes_needed; + krad_packet_free; + krad_packet_new_request; + krad_packet_new_response; + krad_packet_decode_request; + krad_packet_decode_response; + krad_packet_encode; + krad_packet_get_code; + krad_packet_get_attr; + krad_client_new; + krad_client_free; + krad_client_send; +}; diff --git a/krb5/lib/krb5/Makefile b/krb5/lib/krb5/Makefile index bf90c7fc80f7..76f40a3174cc 100644 --- a/krb5/lib/krb5/Makefile +++ b/krb5/lib/krb5/Makefile @@ -17,6 +17,7 @@ LIB= krb5 LDFLAGS=-Wl,--no-undefined LIBADD= krb5profile k5crypto com_err krb5support # SHLIB_MAJOR= 3 +VERSION_MAP= ${.CURDIR}/version.map SRCS= krb5_libinit.c diff --git a/krb5/lib/krb5/version.map b/krb5/lib/krb5/version.map new file mode 100644 index 000000000000..bd852023ff6c --- /dev/null +++ b/krb5/lib/krb5/version.map @@ -0,0 +1,658 @@ +KRB5_KRB5_1.0 { + global: + _krb5_conf_boolean; + decode_krb5_ad_kdcissued; + decode_krb5_ap_rep; + decode_krb5_ap_rep_enc_part; + decode_krb5_ap_req; + decode_krb5_as_rep; + decode_krb5_as_req; + decode_krb5_authdata; + decode_krb5_authenticator; + decode_krb5_cammac; + decode_krb5_cred; + decode_krb5_enc_cred_part; + decode_krb5_enc_data; + decode_krb5_enc_kdc_rep_part; + decode_krb5_enc_priv_part; + decode_krb5_enc_sam_response_enc_2; + decode_krb5_enc_tkt_part; + decode_krb5_encryption_key; + decode_krb5_error; + decode_krb5_etype_info; + decode_krb5_etype_info2; + decode_krb5_fast_req; + decode_krb5_fast_response; + decode_krb5_iakerb_finished; + decode_krb5_iakerb_header; + decode_krb5_kdc_req_body; + decode_krb5_otp_tokeninfo; + decode_krb5_kkdcp_message; + decode_krb5_pa_enc_ts; + decode_krb5_pa_for_user; + decode_krb5_pa_fx_fast_reply; + decode_krb5_pa_fx_fast_request; + decode_krb5_pa_otp_challenge; + decode_krb5_pa_otp_req; + decode_krb5_pa_otp_enc_req; + decode_krb5_pa_pac_options; + decode_krb5_pa_pac_req; + decode_krb5_pa_s4u_x509_user; + decode_krb5_pa_spake; + decode_krb5_padata_sequence; + decode_krb5_priv; + decode_krb5_safe; + decode_krb5_sam_challenge_2; + decode_krb5_sam_challenge_2_body; + decode_krb5_sam_response_2; + decode_krb5_secure_cookie; + decode_krb5_setpw_req; + decode_krb5_spake_factor; + decode_krb5_tgs_rep; + decode_krb5_tgs_req; + decode_krb5_ticket; + decode_krb5_typed_data; + decode_utf8_strings; + encode_krb5_ad_kdcissued; + encode_krb5_ap_rep; + encode_krb5_ap_rep_enc_part; + encode_krb5_ap_req; + encode_krb5_as_rep; + encode_krb5_as_req; + encode_krb5_authdata; + encode_krb5_authenticator; + encode_krb5_cammac; + encode_krb5_checksum; + encode_krb5_cred; + encode_krb5_enc_cred_part; + encode_krb5_enc_data; + encode_krb5_enc_kdc_rep_part; + encode_krb5_enc_priv_part; + encode_krb5_enc_sam_response_enc_2; + encode_krb5_enc_tkt_part; + encode_krb5_encryption_key; + encode_krb5_error; + encode_krb5_etype_info; + encode_krb5_etype_info2; + encode_krb5_fast_response; + encode_krb5_iakerb_finished; + encode_krb5_iakerb_header; + encode_krb5_kdc_req_body; + encode_krb5_otp_tokeninfo; + encode_krb5_kkdcp_message; + encode_krb5_pa_enc_ts; + encode_krb5_pa_for_user; + encode_krb5_pa_fx_fast_reply; + encode_krb5_pa_otp_challenge; + encode_krb5_pa_otp_req; + encode_krb5_pa_otp_enc_req; + encode_krb5_pa_pac_options; + encode_krb5_pa_s4u_x509_user; + encode_krb5_pa_spake; + encode_krb5_padata_sequence; + encode_krb5_pkinit_supp_pub_info; + encode_krb5_priv; + encode_krb5_s4u_userid; + encode_krb5_safe; + encode_krb5_sam_challenge_2; + encode_krb5_sam_challenge_2_body; + encode_krb5_sam_response_2; + encode_krb5_secure_cookie; + encode_krb5_sp80056a_other_info; + encode_krb5_spake_factor; + encode_krb5_tgs_rep; + encode_krb5_tgs_req; + encode_krb5_ticket; + encode_krb5_typed_data; + encode_utf8_strings; + et_asn1_error_table; + et_k524_error_table; + et_kdb5_error_table; + et_krb5_error_table; + et_kv5m_error_table; + et_prof_error_table; + initialize_asn1_error_table; + initialize_k524_error_table; + initialize_kdb5_error_table; + initialize_krb5_error_table; + initialize_k5e1_error_table; + initialize_kv5m_error_table; + initialize_prof_error_table; + k5_add_empty_pa_data; + k5_add_pa_data_element; + k5_add_pa_data_from_data; + k5_alloc_pa_data; + k5_authind_decode; + k5_build_conf_principals; + k5_cc_store_primary_cred; + k5_ccselect_free_context; + k5_change_error_message_code; + k5_etypes_contains; + k5_expand_path_tokens; + k5_expand_path_tokens_extra; + k5_externalize_auth_context; + k5_externalize_authdata; + k5_externalize_authdata_context; + k5_externalize_context; + k5_externalize_keyblock; + k5_externalize_principal; *** 953 LINES SKIPPED *** From nobody Tue Jul 22 15:59:41 2025 X-Original-To: dev-commits-src-all@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 4bmhmK43vRz5pZSf; Tue, 22 Jul 2025 15:59:45 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta003.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmhmK1KG9z3Mnp; Tue, 22 Jul 2025 15:59:45 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTPS id eB5UuK9Qe9JM2eFP6uKxts; Tue, 22 Jul 2025 15:59:44 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id eFP4uuTTwWbOaeFP5uOOrx; Tue, 22 Jul 2025 15:59:44 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=Q5lx4J2a c=1 sm=1 tr=0 ts=687fb570 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=Wb1JkmetP80A:10 a=6I5d2MoRAAAA:8 a=6gsJtrw7AAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=zGUpEOykLeeJQ-IiN_4A:9 a=CjuIK1q_8ugA:10 a=pJONDuH_yeJkak6KR8-4:22 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id E1EE232C; Tue, 22 Jul 2025 08:59:41 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id AC7EB121; Tue, 22 Jul 2025 08:59:41 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Konstantin Belousov cc: Cy Schubert , Jessica Clarke , Cy Schubert , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: c7da9fb90b0b - main - KRB5: Enable MIT KRB5 by default In-reply-to: References: <202507211410.56LEAD6J066633@gitrepo.freebsd.org> <47C3CC37-6F32-4376-900A-B5387B9817D5@freebsd.org> <20250721144645.3BA391BE@slippy.cwsent.com> Comments: In-reply-to Konstantin Belousov message dated "Tue, 22 Jul 2025 14:56:56 +0300." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 22 Jul 2025 08:59:41 -0700 Message-Id: <20250722155941.AC7EB121@slippy.cwsent.com> X-CMAE-Envelope: MS4xfMH9zjbv7FO9AigXnYJv4yqQc7bZAGDrRYJ9gvGmEHFmqYY35qusS9+I2iLq0qApLNq/EXJewC0JSa5hD2gExIlG5DoFxl0jeLMj2dJRb00iIG5iAtd3 cN9olE+PNMnXgonzlA4q1bEHqnONV15p4yj1h6OSJmEU+X5W++wj6/UGHF998aDwlc+HyYjz1i93KvFOfJvJvojWy3joM9q8QIag6jwDeXkDD7GS7Ect9q2e yWuLTouyQod8JwaENKXmtTEHJGq9XhkJzywz9fCIymkmo4sa5HyIPdsuDJ17bKhIDeCu85HQWMQHrEg1MEEA4TpIkjnW5JW+Dbe0L+m3QtPEMt1NXflKqGlZ wxodibCsYlLbj79QTvbY8Na5gw/SiBPl+UJHxAt0IeQY4bqDZEs= X-Rspamd-Queue-Id: 4bmhmK1KG9z3Mnp 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:16509, ipnet:3.96.0.0/15, country:US] In message , Konstantin Belousov writes: > On Mon, Jul 21, 2025 at 07:46:45AM -0700, Cy Schubert wrote: > > In message <47C3CC37-6F32-4376-900A-B5387B9817D5@freebsd.org>, Jessica > > Clarke w > > rites: > > > On 21 Jul 2025, at 15:10, Cy Schubert wrote: > > > >=20 > > > > The branch main has been updated by cy: > > > >=20 > > > > URL: = > > > https://cgit.FreeBSD.org/src/commit/?id=3Dc7da9fb90b0b6385e99bb7747476359 > b= > > > 712993fa > > > >=20 > > > > commit c7da9fb90b0b6385e99bb7747476359b712993fa > > > > Author: Cy Schubert > > > > AuthorDate: 2025-07-19 14:11:18 +0000 > > > > Commit: Cy Schubert > > > > CommitDate: 2025-07-21 14:07:22 +0000 > > > >=20 > > > > KRB5: Enable MIT KRB5 by default > > > >=20 > > > > Set WITH_MITKRB5=3Dyes as the default. > > > >=20 > > > > Rebuild all USES=3Dgssapi ports is recommended. > > > >=20 > > > > A clean buildworld is required. > > > > > > That=E2=80=99s going to be quite annoying and cause a lot of issues = > > > given > > > WITH_CLEAN is now the default. Can we do something in depend-cleanup.sh > > > to delete everything from the obj tree that needs to be rebuilt if we > > > detect the wrong kerberos implementation was previously built? > > > > All binaries that depend on any kerberos libraries must be rebuilt. > > WITHOUT_CLEAN will fail at various spots. Meta mode should take care of > > this for us. > Does the statement mean that ABI for the base libraries was broken? > If yes, and the new libs have the same name as the old, we must bump > dso versions. Three new libs have the same names. Most don't. The three with the same names are libkrb5, libgssapi_krb5 and libcom_err. libgssapi_krb5 is a merge of the Heimdal libgssapi_* files. For example, there is no libgssapi_spnego in MIT. The libcom_err contains the same but updated MIT functions. libkrb5 removes Heimdal-only functions. There is no libasn1 nor libroken in MIT. The differences are outlined at https://k5wiki.kerberos.org/wiki/Samba%27s_u se_of_Heimdal_symbols,_with_MIT_differences. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Tue Jul 22 16:02:56 2025 X-Original-To: dev-commits-src-all@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 4bmhr126dnz5pZdl; Tue, 22 Jul 2025 16:02:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmhr11605z3Pc5; Tue, 22 Jul 2025 16:02:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753200177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f6+NGpTIBFPiqptFGKtRKT9inEEiHZl6GE6gQi+grs8=; b=TY4j2rtlN13BFPNDe9XohObX2Av9SeZyqehP8f54boxLkSjuwm/X5c24apfCT1E9nzF2SA cLNGVAa5gNeEi32qYDNLmW+9xuOhJj94f3HCodzOFvNqjbtXiHLr37Z7Van9tLwTh4MuRl uYdUmiRU17+vqF5hFCX3cJ6swkO94RaMUXGD/cY2m9nbTX+ZpBxc5mVI3CmTo/zFG5aHGk GDmbdeGGOU+IEa1soPDMUyyF5u+r3/7JLmQ1JSSlGohVBuwq7PB9LX9tVuHh5D6nS8wehf ZTf2z8n1A8n5JkBlaf1BRlKUbwF83bb6SZeXuqkIqAfx7mzj8dmYKYudW0KlAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753200177; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=f6+NGpTIBFPiqptFGKtRKT9inEEiHZl6GE6gQi+grs8=; b=YcDHXcFtBIzr+PhVnr9Mpp6x7latkPdT4JLLpm0d92tNQMWHvF4NreN0DdDR2ah1BxS1r4 FWJVZva+Y6a4KGlpGoVLRtgdkulPkVlohwx2lecBN/4uQhCmVuLSvePykpszE+TVqoG2/e BLXcfTIZb3VhJTRWUyDMnDq42N6k1KNuDSgwqLe7bo1kT/4ezLLKZbqD7w6VhJLbiaVelV W53W5TGO/7drmHyHziZBBj3ZnCskFhcZ+aZ0h1tgZ5vsOIrcmG2zCzgvL0OqY8DS5yEm58 w1LFrZw9pu2tgIDzzIFFL88IAQ5/5iibEH1wBZEoB2P0TehvDSxrjFaXal0HYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753200177; a=rsa-sha256; cv=none; b=rgpt7OnWDSPqSAQgq9UV3jyUpP9lPidQG5U1Had6C9vuc97RLr/k2niG6jSqSknOZfc3q3 g46xUM1WIfjE3979LAsOMiv2YXCb7E9kHfAv95NkvyXbju9tAoCH78PbS1056/TF9jS2FX +zzRr0DQ8QDVXc+1yrT4vAP8rZ6WDbHfTYOP4vWmAz4P2B35CxkKQos4WaZu+L0KvUsMkM VxoikCdlKkGf40Xz9eZsn2JoroTXDuN6gsevFbdj3CV/2FLEnfS38HrxJhymiFdcSpjENr DOb6jC3JsYdNxPJiyN340Sm/ZrEgKlkZUgiqJ4rOv+HLFl7AnCBDCuyZO25INg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmhr10jcLzbMK; Tue, 22 Jul 2025 16:02:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MG2ust097327; Tue, 22 Jul 2025 16:02:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MG2uZl097324; Tue, 22 Jul 2025 16:02:56 GMT (envelope-from git) Date: Tue, 22 Jul 2025 16:02:56 GMT Message-Id: <202507221602.56MG2uZl097324@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: 786f7133b513 - stable/14 - sys: Correct osreldate descriptions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 786f7133b513a856fd8d468c2cf8dd8ffedde59b Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=786f7133b513a856fd8d468c2cf8dd8ffedde59b commit 786f7133b513a856fd8d468c2cf8dd8ffedde59b Author: Ed Maste AuthorDate: 2025-06-19 14:20:03 +0000 Commit: Ed Maste CommitDate: 2025-07-22 15:59:55 +0000 sys: Correct osreldate descriptions The kern.osreldate sysctl reports the kernel version, not a release date. Also correct a comment about /usr/include/osreldate.h. Reviewed by: kp, olce Event: Kitchener-Waterloo Hackathon 202506 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50938 (cherry picked from commit 5110a74afe5680882e3274d57da881511ea7c440) --- sys/kern/kern_mib.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_mib.c b/sys/kern/kern_mib.c index f69275fc3d1d..c239e5ca89b5 100644 --- a/sys/kern/kern_mib.c +++ b/sys/kern/kern_mib.c @@ -570,12 +570,11 @@ sysctl_osreldate(SYSCTL_HANDLER_ARGS) } /* - * NOTICE: The *userland* release date is available in - * /usr/include/osreldate.h + * NOTICE: The *userland* version is available in /usr/include/osreldate.h */ SYSCTL_PROC(_kern, KERN_OSRELDATE, osreldate, CTLTYPE_INT | CTLFLAG_CAPRD | CTLFLAG_RD | CTLFLAG_MPSAFE, - NULL, 0, sysctl_osreldate, "I", "Kernel release date"); + NULL, 0, sysctl_osreldate, "I", "Kernel version"); /* * The build-id is copied from the ELF section .note.gnu.build-id. The linker From nobody Tue Jul 22 16:02:58 2025 X-Original-To: dev-commits-src-all@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 4bmhr25Ffcz5pZdm; Tue, 22 Jul 2025 16:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmhr22H07z3PYq; Tue, 22 Jul 2025 16:02:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753200178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qf3HWOTd5GASHKC68fL2EAyqW/ga0LDM9DjQ2E2VYzg=; b=dt1TXAOcECCmBx2rdd+nbT6nGVeDgdd+gWVPXlwrpVzECFWtySH6ZXMRySYKNhfFWLYB6N DW+CKcjGtQa1lm01jaNCaG0vYHJgrPiVCV5f+U6qH5SmdC1L/eR2nBwq36YVSLGKRUwwjd NJEjRiwjfLFQLtYcvyksGseWsOeiqS7GHXIcNZzsFBwuQTbKbMMoc6x1JWQSqV7wXzZYgz yR3THamxUJp/nDDQBE8frZ870cSnUyo17CQvppfHQjOS7SoQYVGAvnlVwmZyT+EjfVTd+E QsMuHwJyPqBQZdDY4GBkngWzQYBdooFcFwPd9736Q1BRUNl28p1ZtjcK8uHR5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753200178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Qf3HWOTd5GASHKC68fL2EAyqW/ga0LDM9DjQ2E2VYzg=; b=yI2HRClvjT90vXN5/gf3n+jsJqHhwXUEkCcGPhIiFixVH/Pnr2GsNJz5Om4e3iJ5VSOGzk 96zpYD7r9EJDbu00kxHs2fiVeMR15Fu1Pk3lXkw2u605/wDRwjBQ2tUgBKEVfyyZtKXhbg qOHtxmf5TNlskuVyo6UITwLOveOCrsB2iNPCp9K4ZFYq0/oL4FqMXfY3qoOrKEIwNYmc/q KdSi5Q4emV8R58fOgn6oxst9kyFHCli1iLGggX/1fRtnFSheeZ9/T7dy5qbdCFmqp/Tt6+ EplkE22CFIrAoap5TPQ2K9gpX/c4vO8US6/8HS21YQMkZ6m94iOgfbPJB74+nQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753200178; a=rsa-sha256; cv=none; b=PkxT1LjZpJdPLpazTyEtNWhsMY+54re6pRA8nZdTsiVg7Q8SNFg1H4I/O3qfJ6zaGHpETQ TKaaEWxF823lyrT8P32ARqkjKHyhYFE2I/HH+AgtHJ3xZDEV5UHv0X5f1y3ni9m4pXHptd ZZ2w9KnSpsfchmKaa0eHwktmYz5CTYMDMpH8nmCDJcSosQs6SxsEcLGi4fCiPmKq5ycxTm aDisNpaPpysdH+H/X5cC5J44A2DdUm62Fi5icClxp/uy7G8hFjNcIj6eDiHpSSUmGcSoCF ocWQKsH4unmEOz89r/pyWS6whx9+31rDeAIMczPkkwWUz7KklFhaKH9QIvzRSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmhr21cDgzb3t; Tue, 22 Jul 2025 16:02:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MG2wDQ097363; Tue, 22 Jul 2025 16:02:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MG2wB5097360; Tue, 22 Jul 2025 16:02:58 GMT (envelope-from git) Date: Tue, 22 Jul 2025 16:02:58 GMT Message-Id: <202507221602.56MG2wB5097360@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: b84dd938c913 - stable/14 - linuxkpi: Remove incorrect + 1 from HWEIGHT* macros List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: b84dd938c9130a0416a5c55fc0d012ecafc5b231 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=b84dd938c9130a0416a5c55fc0d012ecafc5b231 commit b84dd938c9130a0416a5c55fc0d012ecafc5b231 Author: Ed Maste AuthorDate: 2025-06-24 13:36:54 +0000 Commit: Ed Maste CommitDate: 2025-07-22 15:59:55 +0000 linuxkpi: Remove incorrect + 1 from HWEIGHT* macros Fixes: 4cc8a9da491d ("LinuxKPI: add HWEIGHT32()") Reviewed by: bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51010 (cherry picked from commit cdbff1b2999660b31b2de076d04670722a555ed2) --- sys/compat/linuxkpi/common/include/linux/bitops.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/bitops.h b/sys/compat/linuxkpi/common/include/linux/bitops.h index 1415d5224084..2af891791130 100644 --- a/sys/compat/linuxkpi/common/include/linux/bitops.h +++ b/sys/compat/linuxkpi/common/include/linux/bitops.h @@ -62,10 +62,10 @@ #define hweight64(x) bitcount64(x) #define hweight_long(x) bitcountl(x) -#define HWEIGHT8(x) (bitcount8((uint8_t)(x)) + 1) -#define HWEIGHT16(x) (bitcount16(x) + 1) -#define HWEIGHT32(x) (bitcount32(x) + 1) -#define HWEIGHT64(x) (bitcount64(x) + 1) +#define HWEIGHT8(x) (bitcount8((uint8_t)(x))) +#define HWEIGHT16(x) (bitcount16(x)) +#define HWEIGHT32(x) (bitcount32(x)) +#define HWEIGHT64(x) (bitcount64(x)) static inline int __ffs(int mask) From nobody Tue Jul 22 16:19:23 2025 X-Original-To: dev-commits-src-all@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 4bmjCv46Vmz5pbqd; Tue, 22 Jul 2025 16:20:11 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Received: from smtp052.goneo.de (smtp5.goneo.de [IPv6:2001:1640:5::8:30]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmjCv0L6Xz3Wx5; Tue, 22 Jul 2025 16:20:10 +0000 (UTC) (envelope-from freebsd@walstatt-de.de) Authentication-Results: mx1.freebsd.org; none Received: from hub2.goneo.de (hub2.goneo.de [85.220.129.53]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp5.goneo.de (Postfix) with ESMTPS id 9B8232402D4; Tue, 22 Jul 2025 18:20:02 +0200 (CEST) Received: from hub2.goneo.de (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by hub2.goneo.de (Postfix) with ESMTPS id B0FFE24026C; Tue, 22 Jul 2025 18:20:00 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=walstatt-de.de; s=DKIM001; t=1753201200; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=xwoTjrzyivWcqtKDcLjMPdKnZN84GbAYaT8WUMLvClg=; b=X2X8pSBv1dJeMU00iPP0a7VL4LGg5nOgUNHSWGT1RAsvB+AYYgyGuNRpJKuOIwBdEmOC57 kAtdcIcaZg4G9ExLn9ggj62NgkOJX9/3uiZst4wJeiYENFJ3zt7HwUNN1a/88DTcoogmXb RenTz/tpDzfE3yrwJvWiEFhqExQSbeqhUtAeKdOQ1Glj+qmiCn4FRscGQboSiW9ckgJEHn CytI2j5L04J62IGOeXVFQoe6BEcNMlWE5ncMJ5Di1wwvOv7JugE46amd/kekQpG9/FGwWh hOrn4kn9n83wxilCrPxm3qh4GwkYWhReymU0Fhc9t1UiDmZEia14g15+gdVXXg== Received: from thor.sb211.local (dynamic-2a02-3100-2200-7502-90d2-e9a6-023b-1a0f.310.pool.telefonica.de [IPv6:2a02:3100:2200:7502:90d2:e9a6:23b:1a0f]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by hub2.goneo.de (Postfix) with ESMTPSA id 42345240268; Tue, 22 Jul 2025 18:20:00 +0200 (CEST) Date: Tue, 22 Jul 2025 18:19:23 +0200 From: A FreeBSD User To: Cy Schubert Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: ae07a5805b19 - main - krb5: Add version maps Message-ID: <20250722181950.436cf5f2@thor.sb211.local> In-Reply-To: <202507221548.56MFmoo2060272@gitrepo.freebsd.org> References: <202507221548.56MFmoo2060272@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/3b9oI2.3_7A1jvWoWXZscF="; protocol="application/pgp-signature"; micalg=pgp-sha512 X-Rspamd-UID: 79d4c8 X-Rspamd-UID: 51229f X-Rspamd-Queue-Id: 4bmjCv0L6Xz3Wx5 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:25394, ipnet:2001:1640::/32, country:DE] --Sig_/3b9oI2.3_7A1jvWoWXZscF= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Am Tage des Herren Tue, 22 Jul 2025 15:48:50 GMT Cy Schubert schrieb: > The branch main has been updated by cy: >=20 > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dae07a5805b1906f29e786f415d= 67bef334557bd3 >=20 > commit ae07a5805b1906f29e786f415d67bef334557bd3 > Author: Cy Schubert > AuthorDate: 2025-07-22 15:38:19 +0000 > Commit: Cy Schubert > CommitDate: 2025-07-22 15:48:40 +0000 >=20 > krb5: Add version maps > =20 > Shared objects must have version maps. These were copied from upstrea= m's > *.exports files. > =20 > Reminded by: kib > Fixes: ee3960cba106 > --- > krb5/lib/crypto/Makefile | 1 + > krb5/lib/crypto/version.map | 108 ++++++ > krb5/lib/gssapi/Makefile | 1 + > krb5/lib/gssapi/version.map | 173 +++++++++ > krb5/lib/kadm5clnt/Makefile | 1 + > krb5/lib/kadm5clnt/version.map | 118 ++++++ > krb5/lib/kadm5srv/Makefile | 1 + > krb5/lib/kadm5srv/version.map | 137 +++++++ > krb5/lib/kdb/Makefile | 1 + > krb5/lib/kdb/version.map | 111 ++++++ > krb5/lib/krad/Makefile | 1 + > krb5/lib/krad/version.map | 26 ++ > krb5/lib/krb5/Makefile | 1 + > krb5/lib/krb5/version.map | 658 ++++++++++++++++++++++++++= ++++++ > krb5/lib/rpc/Makefile | 1 + > krb5/lib/rpc/version.map | 147 +++++++ > krb5/plugins/audit/Makefile | 1 + > krb5/plugins/audit/version.map | 10 + > krb5/plugins/k5tls/Makefile | 1 + > krb5/plugins/k5tls/version.map | 4 + > krb5/plugins/kdb/db2/Makefile | 1 + > krb5/plugins/kdb/db2/version.map | 109 ++++++ > krb5/plugins/preauth/otp/Makefile | 1 + > krb5/plugins/preauth/otp/version.map | 4 + > krb5/plugins/preauth/pkinit/Makefile | 1 + > krb5/plugins/preauth/pkinit/version.map | 5 + > krb5/plugins/preauth/spake/Makefile | 1 + > krb5/plugins/preauth/spake/version.map | 5 + > krb5/plugins/preauth/test/Makefile | 1 + > krb5/plugins/preauth/test/version.map | 5 + > 30 files changed, 1635 insertions(+) >=20 > diff --git a/krb5/lib/crypto/Makefile b/krb5/lib/crypto/Makefile > index 5087a2fb559b..5efe53d12aa8 100644 > --- a/krb5/lib/crypto/Makefile > +++ b/krb5/lib/crypto/Makefile > @@ -17,6 +17,7 @@ LIB=3D k5crypto > # SHLIB_MAJOR=3D 3 > LDFLAGS=3D-Wl,--no-undefined > LIBADD=3D com_err krb5support crypto > +VERSION_MAP=3D ${.CURDIR}/version.map > =20 > # XXX The following doesn't work. Even though the pathnames are the same > # XXX we need to use the alternative .include statements. > diff --git a/krb5/lib/crypto/version.map b/krb5/lib/crypto/version.map > new file mode 100644 > index 000000000000..bd4c2c1cd23f > --- /dev/null > +++ b/krb5/lib/crypto/version.map > @@ -0,0 +1,108 @@ > +KRB5_CRYPTO_1.0 { > + global: > + krb5_c_make_random_key; > + krb5_c_encrypt_length; > + krb5_process_key; > + krb5_string_to_cksumtype; > + krb5_c_valid_enctype; > + krb5_c_valid_cksumtype; > + krb5_string_to_key; > + krb5_c_encrypt_iov; > + krb5_c_checksum_length; > + is_keyed_cksum; > + krb5_c_padding_length; > + is_coll_proof_cksum; > + krb5_init_random_key; > + krb5_c_string_to_key_with_params; > + krb5_c_random_make_octets; > + krb5_c_random_os_entropy; > + krb5_c_decrypt; > + krb5_c_crypto_length; > + krb5_c_block_size; > + krb5_cksumtype_to_string; > + krb5_c_keyed_checksum_types; > + krb5_c_is_keyed_cksum; > + krb5_c_crypto_length_iov; > + valid_cksumtype; > + krb5_c_random_seed; > + krb5_c_random_to_key; > + krb5_verify_checksum; > + krb5_c_free_state; > + krb5_c_verify_checksum; > + krb5_c_random_add_entropy; > + krb5_c_decrypt_iov; > + krb5_c_make_checksum; > + krb5_checksum_size; > + krb5_free_cksumtypes; > + krb5_finish_key; > + krb5_encrypt_size; > + krb5_c_keylengths; > + krb5_c_prf; > + krb5_encrypt; > + krb5_string_to_enctype; > + krb5_c_is_coll_proof_cksum; > + krb5_c_init_state; > + krb5_eblock_enctype; > + krb5_decrypt; > + krb5_c_encrypt; > + krb5_c_enctype_compare; > + krb5_c_verify_checksum_iov; > + valid_enctype; > + krb5_enctype_to_string; > + krb5_enctype_to_name; > + krb5_c_make_checksum_iov; > + krb5_calculate_checksum; > + krb5_c_string_to_key; > + krb5_use_enctype; > + krb5_random_key; > + krb5_finish_random_key; > + krb5_c_prf_length; > + krb5int_c_mandatory_cksumtype; > + krb5_c_fx_cf2_simple; > + krb5int_c_weak_enctype; > + krb5_encrypt_data; > + krb5int_c_copy_keyblock; > + krb5int_c_copy_keyblock_contents; > + krb5int_c_free_keyblock_contents; > + krb5int_c_free_keyblock; > + krb5int_c_init_keyblock; > + krb5int_hash_md4; > + krb5int_hash_md5; > + krb5int_hash_sha256; > + krb5int_hash_sha384; > + krb5int_enc_arcfour; > + krb5int_hmac; > + krb5_k_create_key; > + krb5_k_decrypt; > + krb5_k_decrypt_iov; > + krb5_k_encrypt; > + krb5_k_encrypt_iov; > + krb5_k_free_key; > + krb5_k_key_enctype; > + krb5_k_key_keyblock; > + krb5_k_make_checksum; > + krb5_k_make_checksum_iov; > + krb5_k_prf; > + krb5_k_reference_key; > + krb5_k_verify_checksum; > + krb5_k_verify_checksum_iov; > + krb5int_aes_encrypt; > + krb5int_aes_decrypt; > + krb5int_enc_des3; > + krb5int_arcfour_gsscrypt; > + krb5int_camellia_encrypt; > + krb5int_cmac_checksum; > + krb5int_enc_aes128; > + krb5int_enc_aes256; > + krb5int_enc_camellia128; > + krb5int_enc_camellia256; > + krb5int_derive_key; > + krb5int_derive_random; > + k5_sha256; > + krb5int_nfold; > + k5_allow_weak_pbkdf2iter; > + krb5_c_prfplus; > + krb5_c_derive_prfplus; > + k5_enctype_to_ssf; > + krb5int_c_deprecated_enctype; > +}; > diff --git a/krb5/lib/gssapi/Makefile b/krb5/lib/gssapi/Makefile > index 51ed6f162d65..569452cfb538 100644 > --- a/krb5/lib/gssapi/Makefile > +++ b/krb5/lib/gssapi/Makefile > @@ -17,6 +17,7 @@ LIB=3D gssapi_krb5 > # SHLIB_MAJOR=3D 2 > LDFLAGS=3D-Wl,--no-undefined > LIBADD=3D krb5 k5crypto com_err krb5profile krb5support > +VERSION_MAP=3D ${.CURDIR}/version.map > =20 > # This is a contcatonation of: > # crypto/krb5/src/lib/gssapi/libgssapi_krb5.exports > diff --git a/krb5/lib/gssapi/version.map b/krb5/lib/gssapi/version.map > new file mode 100644 > index 000000000000..95f7ed5151db > --- /dev/null > +++ b/krb5/lib/gssapi/version.map > @@ -0,0 +1,173 @@ > +KRB5_GSSAPI_1.0 { > + global: > + GSS_C_ATTR_LOCAL_LOGIN_USER; > + GSS_C_INQ_NEGOEX_KEY; > + GSS_C_INQ_NEGOEX_VERIFY_KEY; > + GSS_C_INQ_SSPI_SESSION_KEY; > + GSS_C_MA_AUTH_INIT; > + GSS_C_MA_AUTH_INIT_ANON; > + GSS_C_MA_AUTH_INIT_INIT; > + GSS_C_MA_AUTH_TARG; > + GSS_C_MA_AUTH_TARG_ANON; > + GSS_C_MA_AUTH_TARG_INIT; > + GSS_C_MA_CBINDINGS; > + GSS_C_MA_COMPRESS; > + GSS_C_MA_CONF_PROT; > + GSS_C_MA_CTX_TRANS; > + GSS_C_MA_DELEG_CRED; > + GSS_C_MA_DEPRECATED; > + GSS_C_MA_INTEG_PROT; > + GSS_C_MA_ITOK_FRAMED; > + GSS_C_MA_MECH_COMPOSITE; > + GSS_C_MA_MECH_CONCRETE; > + GSS_C_MA_MECH_GLUE; > + GSS_C_MA_MECH_NEGO; > + GSS_C_MA_MECH_PSEUDO; > + GSS_C_MA_MIC; > + GSS_C_MA_NEGOEX_AND_SPNEGO; > + GSS_C_MA_NOT_DFLT_MECH; > + GSS_C_MA_NOT_MECH; > + GSS_C_MA_OOS_DET; > + GSS_C_MA_PFS; > + GSS_C_MA_PROT_READY; > + GSS_C_MA_REPLAY_DET; > + GSS_C_MA_WRAP; > + GSS_C_NT_ANONYMOUS; > + GSS_C_NT_COMPOSITE_EXPORT; > + GSS_C_NT_EXPORT_NAME; > + GSS_C_NT_HOSTBASED_SERVICE; > + GSS_C_NT_HOSTBASED_SERVICE_X; > + GSS_C_NT_MACHINE_UID_NAME; > + GSS_C_NT_STRING_UID_NAME; > + GSS_C_NT_USER_NAME; > + GSS_C_SEC_CONTEXT_SASL_SSF; > + GSS_KRB5_CRED_NO_CI_FLAGS_X; > + GSS_KRB5_GET_CRED_IMPERSONATOR; > + GSS_KRB5_NT_ENTERPRISE_NAME; > + GSS_KRB5_NT_PRINCIPAL_NAME; > + GSS_KRB5_NT_X509_CERT; > + gss_accept_sec_context; > + gss_acquire_cred; > + gss_acquire_cred_from; > + gss_acquire_cred_impersonate_name; > + gss_acquire_cred_with_password; > + gss_add_buffer_set_member; > + gss_add_cred; > + gss_add_cred_from; > + gss_add_cred_impersonate_name; > + gss_add_cred_with_password; > + gss_add_oid_set_member; > + gss_authorize_localname; > + gss_canonicalize_name; > + gss_compare_name; > + gss_complete_auth_token; > + gss_context_time; > + gss_create_empty_buffer_set; > + gss_create_empty_oid_set; > + gss_decapsulate_token; > + gss_delete_name_attribute; > + gss_delete_sec_context; > + gss_display_mech_attr; > + gss_display_name; > + gss_display_name_ext; > + gss_display_status; > + gss_duplicate_name; > + gss_encapsulate_token; > + gss_export_cred; > + gss_export_name; > + gss_export_name_composite; > + gss_export_sec_context; > + gss_get_mic; > + gss_get_mic_iov; > + gss_get_mic_iov_length; > + gss_get_name_attribute; > + gss_import_cred; > + gss_import_name; > + gss_import_sec_context; > + gss_indicate_mechs; > + gss_indicate_mechs_by_attrs; > + gss_init_sec_context; > + gss_inquire_attrs_for_mech; > + gss_inquire_context; > + gss_inquire_cred; > + gss_inquire_cred_by_mech; > + gss_inquire_cred_by_oid; > + gss_inquire_mech_for_saslname; > + gss_inquire_mechs_for_name; > + gss_inquire_name; > + gss_inquire_names_for_mech; > + gss_inquire_saslname_for_mech; > + gss_inquire_sec_context_by_oid; > + gss_krb5_ccache_name; > + gss_krb5_copy_ccache; > + gss_krb5_export_lucid_sec_context; > + gss_krb5_free_lucid_sec_context; > + gss_krb5_get_tkt_flags; > + gss_krb5_import_cred; > + gss_krb5_set_allowable_enctypes; > + gss_krb5_set_cred_rcache; > + gss_krb5int_make_seal_token_v3; > + gss_krb5int_unseal_token_v3; > + gss_localname; > + gss_map_name_to_any; > + gss_mech_iakerb; > + gss_mech_initialize; > + gss_mech_krb5; > + gss_mech_krb5_old; > + gss_mech_krb5_wrong; > + gss_mech_set_krb5; > + gss_mech_set_krb5_both; > + gss_mech_set_krb5_old; > + gss_nt_exported_name; > + gss_nt_krb5_name; > + gss_nt_krb5_principal; > + gss_nt_machine_uid_name; > + gss_nt_service_name; > + gss_nt_service_name_v2; > + gss_nt_string_uid_name; > + gss_nt_user_name; > + gss_oid_equal; > + gss_oid_to_str; > + gss_pname_to_uid; > + gss_process_context_token; > + gss_pseudo_random; > + gss_release_any_name_mapping; > + gss_release_buffer; > + gss_release_buffer_set; > + gss_release_cred; > + gss_release_iov_buffer; > + gss_release_name; > + gss_release_oid; > + gss_release_oid_set; > + gss_seal; > + gss_set_cred_option; > + gss_set_name_attribute; > + gss_set_neg_mechs; > + gss_set_sec_context_option; > + gss_sign; > + gss_store_cred; > + gss_store_cred_into; > + gss_str_to_oid; > + gss_test_oid_set_member; > + gss_unseal; > + gss_unwrap; > + gss_unwrap_aead; > + gss_unwrap_iov; > + gss_userok; > + gss_verify; > + gss_verify_mic; > + gss_verify_mic_iov; > + gss_wrap; > + gss_wrap_aead; > + gss_wrap_iov; > + gss_wrap_iov_length; > + gss_wrap_size_limit; > + gssint_g_seqstate_init; > + gsskrb5_extract_authtime_from_sec_context; > + gsskrb5_extract_authz_data_from_sec_context; > + gssspi_mech_invoke; > + gssspi_set_cred_option; > + krb5_gss_dbg_client_expcreds; > + krb5_gss_register_acceptor_identity; > + krb5_gss_use_kdc_context; > +}; > diff --git a/krb5/lib/kadm5clnt/Makefile b/krb5/lib/kadm5clnt/Makefile > index ddb9b0e9fec5..c9f199bdaea3 100644 > --- a/krb5/lib/kadm5clnt/Makefile > +++ b/krb5/lib/kadm5clnt/Makefile > @@ -17,6 +17,7 @@ LIB=3D kadm5clnt_mit > # SHLIB_MAJOR=3D 12 > LDFLAGS=3D-Wl,--no-undefined > LIBADD=3D krb5profile gssrpc gssapi_krb5 krb5 k5crypto krb5support com_e= rr > +VERSION_MAP=3D ${.CURDIR}/version.map > =20 > SRCS=3D alt_prof.c \ > chpass_util.c \ > diff --git a/krb5/lib/kadm5clnt/version.map b/krb5/lib/kadm5clnt/version.= map > new file mode 100644 > index 000000000000..9743c7cf6140 > --- /dev/null > +++ b/krb5/lib/kadm5clnt/version.map > @@ -0,0 +1,118 @@ > +KRB5_KADM5_CLNT_1.0 { > + global: > + _kadm5_check_handle; > + _kadm5_chpass_principal_util; > + kadm5_chpass_principal; > + kadm5_chpass_principal_3; > + kadm5_chpass_principal_util; > + kadm5_create_policy; > + kadm5_create_principal; > + kadm5_create_principal_3; > + kadm5_decrypt_key; > + kadm5_delete_policy; > + kadm5_delete_principal; > + kadm5_destroy; > + kadm5_flush; > + kadm5_free_config_params; > + kadm5_free_kadm5_key_data; > + kadm5_free_key_data; > + kadm5_free_name_list; > + kadm5_free_policy_ent; > + kadm5_free_principal_ent; > + kadm5_free_strings; > + kadm5_get_admin_service_name; > + kadm5_get_config_params; > + kadm5_get_policies; > + kadm5_get_policy; > + kadm5_get_principal; > + kadm5_get_principal_keys; > + kadm5_get_principals; > + kadm5_get_privs; > + kadm5_get_strings; > + kadm5_init; > + kadm5_init_anonymous; > + kadm5_init_krb5_context; > + kadm5_init_with_creds; > + kadm5_init_with_password; > + kadm5_init_with_skey; > + kadm5_lock; > + kadm5_modify_policy; > + kadm5_modify_principal; > + kadm5_purgekeys; > + kadm5_randkey_principal; > + kadm5_randkey_principal_3; > + kadm5_rename_principal; > + kadm5_set_string; > + kadm5_setkey_principal; > + kadm5_setkey_principal_3; > + kadm5_setkey_principal_4; > + kadm5_unlock; > + krb5_aprof_get_boolean; > + krb5_aprof_get_deltat; > + krb5_aprof_get_int32; > + krb5_aprof_get_string; > + krb5_aprof_getvals; > + krb5_flagnum_to_string; > + krb5_flagspec_to_mask; > + krb5_flags_to_strings; > + krb5_free_key_data_contents; > + krb5_keysalt_is_present; > + krb5_keysalt_iterate; > + krb5_klog_close; > + krb5_klog_init; > + krb5_klog_reopen; > + krb5_klog_set_context; > + krb5_klog_syslog; > + krb5_string_to_keysalts; > + xdr_chpass3_arg; > + xdr_chpass_arg; > + xdr_chrand3_arg; > + xdr_chrand_arg; > + xdr_chrand_ret; > + xdr_cpol_arg; > + xdr_cprinc3_arg; > + xdr_cprinc_arg; > + xdr_dpol_arg; > + xdr_dprinc_arg; > + xdr_generic_ret; > + xdr_getpkeys_arg; > + xdr_getpkeys_ret; > + xdr_getprivs_ret; > + xdr_gpol_arg; > + xdr_gpol_ret; > + xdr_gpols_arg; > + xdr_gpols_ret; > + xdr_gprinc_arg; > + xdr_gprinc_ret; > + xdr_gprincs_arg; > + xdr_gprincs_ret; > + xdr_kadm5_key_data; > + xdr_kadm5_policy_ent_rec; > + xdr_kadm5_principal_ent_rec; > + xdr_kadm5_ret_t; > + xdr_krb5_deltat; > + xdr_krb5_enctype; > + xdr_krb5_flags; > + xdr_krb5_int16; > + xdr_krb5_key_data_nocontents; > + xdr_krb5_key_salt_tuple; > + xdr_krb5_keyblock; > + xdr_krb5_kvno; > + xdr_krb5_octet; > + xdr_krb5_principal; > + xdr_krb5_salttype; > + xdr_krb5_timestamp; > + xdr_krb5_tl_data; > + xdr_krb5_ui_2; > + xdr_krb5_ui_4; > + xdr_mpol_arg; > + xdr_mprinc_arg; > + xdr_nullstring; > + xdr_nulltype; > + xdr_rprinc_arg; > + xdr_setkey3_arg; > + xdr_setkey4_arg; > + xdr_setkey_arg; > + xdr_ui_4; > + kadm5_init_iprop; > +}; > diff --git a/krb5/lib/kadm5srv/Makefile b/krb5/lib/kadm5srv/Makefile > index f716dfcdaedc..90a2180d496a 100644 > --- a/krb5/lib/kadm5srv/Makefile > +++ b/krb5/lib/kadm5srv/Makefile > @@ -17,6 +17,7 @@ LIB=3D kadm5srv_mit > # SHLIB_MAJOR=3D 12 > LDFLAGS=3D-Wl,--no-undefined > LIBADD=3D krb5profile gssrpc gssapi_krb5 kdb5 krb5 k5crypto krb5support = com_err > +VERSION_MAP=3D ${.CURDIR}/version.map > =20 > INCSDIR=3D ${INCLUDEDIR}/kadm5 > =20 > diff --git a/krb5/lib/kadm5srv/version.map b/krb5/lib/kadm5srv/version.map > new file mode 100644 > index 000000000000..a0e9da6daef2 > --- /dev/null > +++ b/krb5/lib/kadm5srv/version.map > @@ -0,0 +1,137 @@ > +KRB5_KADM5_SRV_1.0 { > + global: > + _kadm5_check_handle; > + _kadm5_chpass_principal_util; > + hist_princ; > + kadm5_chpass_principal; > + kadm5_chpass_principal_3; > + kadm5_chpass_principal_util; > + kadm5_create_policy; > + kadm5_create_principal; > + kadm5_create_principal_3; > + kadm5_decrypt_key; > + kadm5_delete_policy; > + kadm5_delete_principal; > + kadm5_destroy; > + kadm5_flush; > + kadm5_free_config_params; > + kadm5_free_kadm5_key_data; > + kadm5_free_key_data; > + kadm5_free_name_list; > + kadm5_free_policy_ent; > + kadm5_free_principal_ent; > + kadm5_free_strings; > + kadm5_get_config_params; > + kadm5_get_policies; > + kadm5_get_policy; > + kadm5_get_principal; > + kadm5_get_principal_keys; > + kadm5_get_principals; > + kadm5_get_privs; > + kadm5_get_strings; > + kadm5_init; > + kadm5_init_anonymous; > + kadm5_init_krb5_context; > + kadm5_init_with_creds; > + kadm5_init_with_password; > + kadm5_init_with_skey; > + kadm5_lock; > + kadm5_modify_policy; > + kadm5_modify_principal; > + kadm5_purgekeys; > + kadm5_randkey_principal; > + kadm5_randkey_principal_3; > + kadm5_rename_principal; > + kadm5_set_string; > + kadm5_setkey_principal; > + kadm5_setkey_principal_3; > + kadm5_setkey_principal_4; > + kadm5_unlock; > + kdb_delete_entry; > + kdb_free_entry; > + kdb_init_hist; > + kdb_init_master; > + kdb_iter_entry; > + kdb_put_entry; > + krb5_aprof_get_boolean; > + krb5_aprof_get_deltat; > + krb5_aprof_get_int32; > + krb5_aprof_get_string; > + krb5_aprof_get_string_all; > + krb5_aprof_getvals; > + krb5_copy_key_data_contents; > + krb5_flagnum_to_string; > + krb5_flagspec_to_mask; > + krb5_flags_to_strings; > + krb5_free_key_data_contents; > + krb5_keysalt_is_present; > + krb5_keysalt_iterate; > + krb5_klog_close; > + krb5_klog_init; > + krb5_klog_reopen; > + krb5_klog_set_context; > + krb5_klog_syslog; > + krb5_string_to_keysalts; > + master_db; > + master_princ; > + osa_free_princ_ent; > + passwd_check; > + xdr_chpass3_arg; > + xdr_chpass_arg; > + xdr_chrand3_arg; > + xdr_chrand_arg; > + xdr_chrand_ret; > + xdr_cpol_arg; > + xdr_cprinc3_arg; > + xdr_cprinc_arg; > + xdr_dpol_arg; > + xdr_dprinc_arg; > + xdr_generic_ret; > + xdr_getpkeys_arg; > + xdr_getpkeys_ret; > + xdr_getprivs_ret; > + xdr_gpol_arg; > + xdr_gpol_ret; > + xdr_gpols_arg; > + xdr_gpols_ret; > + xdr_gprinc_arg; > + xdr_gprinc_ret; > + xdr_gprincs_arg; > + xdr_gprincs_ret; > + xdr_gstrings_arg; > + xdr_gstrings_ret; > + xdr_kadm5_policy_ent_rec; > + xdr_kadm5_principal_ent_rec; > + xdr_kadm5_ret_t; > + xdr_krb5_deltat; > + xdr_krb5_enctype; > + xdr_krb5_flags; > + xdr_krb5_int16; > + xdr_krb5_key_data; > + xdr_krb5_key_data_nocontents; > + xdr_krb5_key_salt_tuple; > + xdr_krb5_keyblock; > + xdr_krb5_kvno; > + xdr_krb5_octet; > + xdr_krb5_principal; > + xdr_krb5_salttype; > + xdr_krb5_string_attr; > + xdr_krb5_timestamp; > + xdr_krb5_tl_data; > + xdr_krb5_ui_2; > + xdr_krb5_ui_4; > + xdr_mpol_arg; > + xdr_mprinc_arg; > + xdr_nullstring; > + xdr_nulltype; > + xdr_osa_princ_ent_rec; > + xdr_osa_pw_hist_ent; > + xdr_purgekeys_arg; > + xdr_rprinc_arg; > + xdr_setkey3_arg; > + xdr_setkey4_arg; > + xdr_setkey_arg; > + xdr_sstring_arg; > + xdr_ui_4; > + kadm5_init_iprop; > +}; > diff --git a/krb5/lib/kdb/Makefile b/krb5/lib/kdb/Makefile > index ac7f058a7f11..57fe32e39347 100644 > --- a/krb5/lib/kdb/Makefile > +++ b/krb5/lib/kdb/Makefile > @@ -17,6 +17,7 @@ LIB=3D kdb5 > # SHLIB_MAJOR=3D 10 > LDFLAGS=3D-Wl,--no-undefined > LIBADD=3D krb5profile gssrpc krb5 k5crypto com_err krb5support gssapi_kr= b5 > +VERSION_MAP=3D ${.CURDIR}/version.map > =20 > SRCS=3D decrypt_key.c \ > encrypt_key.c \ > diff --git a/krb5/lib/kdb/version.map b/krb5/lib/kdb/version.map > new file mode 100644 > index 000000000000..9522af1e9edd > --- /dev/null > +++ b/krb5/lib/kdb/version.map > @@ -0,0 +1,111 @@ > +KRB5_KDB5_1.0 { > + global: > + krb5_db_setup_lib_handle; > + krb5_db_open; > + krb5_db_inited; > + krb5_db_alloc; > + krb5_db_free; > + krb5_db_allowed_to_delegate_from; > + krb5_db_audit_as_req; > + krb5_db_check_allowed_to_delegate; > + krb5_db_get_s4u_x509_principal; > + krb5_db_check_policy_as; > + krb5_db_check_policy_tgs; > + krb5_db_check_transited_realms; > + krb5_db_create; > + krb5_db_delete_principal; > + krb5_db_destroy; > + krb5_db_fetch_mkey; > + krb5_db_fetch_mkey_list; > + krb5_db_fini; > + krb5_db_free_principal; > + krb5_db_get_age; > + krb5_db_get_key_data_kvno; > + krb5_db_get_context; > + krb5_db_get_principal; > + krb5_db_issue_pac; > + krb5_db_iterate; > + krb5_db_lock; > + krb5_db_mkey_list_alias; > + krb5_db_put_principal; > + krb5_db_refresh_config; > + krb5_db_rename_principal; > + krb5_db_set_context; > + krb5_db_setup_mkey_name; > + krb5_db_unlock; > + krb5_db_store_master_key; > + krb5_db_store_master_key_list; > + krb5_dbe_apw; > + krb5_dbe_ark; > + krb5_dbe_cpw; > + krb5_dbe_create_key_data; > + krb5_dbe_crk; > + krb5_dbe_find_act_mkey; > + krb5_dbe_fetch_act_key_list; > + krb5_dbe_find_enctype; > + krb5_dbe_find_mkey; > + krb5_dbe_free_actkvno_list; > + krb5_dbe_free_key_data_contents; > + krb5_dbe_free_mkey_aux_list; > + krb5_dbe_free_key_list; > + krb5_dbe_free_string; > + krb5_dbe_free_strings; > + krb5_dbe_get_mkvno; > + krb5_dbe_get_string; > + krb5_dbe_get_strings; > + krb5_dbe_compute_salt; > + krb5_dbe_lookup_last_admin_unlock; > + krb5_dbe_lookup_last_pwd_change; > + krb5_dbe_lookup_actkvno; > + krb5_dbe_lookup_mkey_aux; > + krb5_dbe_lookup_mkvno; > + krb5_dbe_lookup_mod_princ_data; > + krb5_dbe_lookup_tl_data; > + krb5_dbe_search_enctype; > + krb5_dbe_set_string; > + krb5_dbe_specialize_salt; > + krb5_dbe_update_actkvno; > + krb5_dbe_update_last_admin_unlock; > + krb5_dbe_update_last_pwd_change; > + krb5_dbe_update_mkey_aux; > + krb5_dbe_update_mkvno; > + krb5_dbe_update_mod_princ_data; > + krb5_dbe_update_tl_data; > + krb5_db_update_tl_data; > + krb5_dbe_def_encrypt_key_data; > + krb5_dbe_def_decrypt_key_data; > + krb5_dbe_decrypt_key_data; > + krb5_dbe_encrypt_key_data; > + krb5_kt_kdb_ops; > + krb5_ktkdb_close; > + krb5_ktkdb_get_entry; > + krb5_ktkdb_resolve; > + krb5_ktkdb_set_context; > + krb5_mkey_pwd_prompt1; > + krb5_mkey_pwd_prompt2; > + krb5_db_create_policy; > + krb5_db_get_policy; > + krb5_db_put_policy; > + krb5_db_iter_policy; > + krb5_db_delete_policy; > + krb5_db_free_policy; > + krb5_def_store_mkey_list; > + krb5_db_promote; > + krb5_db_register_keytab; > + ulog_add_update; > + ulog_init_header; > + ulog_map; > + ulog_set_role; > + ulog_free_entries; > + xdr_kdb_last_t; > + xdr_kdb_incr_result_t; > + xdr_kdb_fullresync_result_t; > + ulog_fini; > + ulog_get_entries; > + ulog_get_last; > + ulog_get_sno_status; > + ulog_replay; > + ulog_set_last; > + xdr_kdb_incr_update_t; > + krb5_dbe_sort_key_data; > +}; > diff --git a/krb5/lib/krad/Makefile b/krb5/lib/krad/Makefile > index 4b18af482207..28751d9bf9b6 100644 > --- a/krb5/lib/krad/Makefile > +++ b/krb5/lib/krad/Makefile > @@ -17,6 +17,7 @@ LIB=3D krad > # SHLIB_MAJOR=3D 0 > LDFLAGS=3D-Wl,--no-undefined > LIBADD=3D krb5 k5crypto com_err krb5profile krb5support verto > +VERSION_MAP=3D ${.CURDIR}/version.map > =20 > SRCS=3D attr.c \ > attrset.c \ > diff --git a/krb5/lib/krad/version.map b/krb5/lib/krad/version.map > new file mode 100644 > index 000000000000..7e058d9bd494 > --- /dev/null > +++ b/krb5/lib/krad/version.map > @@ -0,0 +1,26 @@ > +KRB5_KRAD_1.0 { > + global: > + krad_code_name2num; > + krad_code_num2name; > + krad_attr_name2num; > + krad_attr_num2name; > + krad_attrset_new; > + krad_attrset_copy; > + krad_attrset_free; > + krad_attrset_add; > + krad_attrset_add_number; > + krad_attrset_del; > + krad_attrset_get; > + krad_packet_bytes_needed; > + krad_packet_free; > + krad_packet_new_request; > + krad_packet_new_response; > + krad_packet_decode_request; > + krad_packet_decode_response; > + krad_packet_encode; > + krad_packet_get_code; > + krad_packet_get_attr; > + krad_client_new; > + krad_client_free; > + krad_client_send; > +}; > diff --git a/krb5/lib/krb5/Makefile b/krb5/lib/krb5/Makefile > index bf90c7fc80f7..76f40a3174cc 100644 > --- a/krb5/lib/krb5/Makefile > +++ b/krb5/lib/krb5/Makefile > @@ -17,6 +17,7 @@ LIB=3D krb5 > LDFLAGS=3D-Wl,--no-undefined > LIBADD=3D krb5profile k5crypto com_err krb5support > # SHLIB_MAJOR=3D 3 > +VERSION_MAP=3D ${.CURDIR}/version.map > =20 > SRCS=3D krb5_libinit.c > =20 > diff --git a/krb5/lib/krb5/version.map b/krb5/lib/krb5/version.map > new file mode 100644 > index 000000000000..bd852023ff6c > --- /dev/null > +++ b/krb5/lib/krb5/version.map > @@ -0,0 +1,658 @@ > +KRB5_KRB5_1.0 { > + global: > + _krb5_conf_boolean; > + decode_krb5_ad_kdcissued; > + decode_krb5_ap_rep; > + decode_krb5_ap_rep_enc_part; > + decode_krb5_ap_req; > + decode_krb5_as_rep; > + decode_krb5_as_req; > + decode_krb5_authdata; > + decode_krb5_authenticator; > + decode_krb5_cammac; > + decode_krb5_cred; > + decode_krb5_enc_cred_part; > + decode_krb5_enc_data; > + decode_krb5_enc_kdc_rep_part; > + decode_krb5_enc_priv_part; > + decode_krb5_enc_sam_response_enc_2; > + decode_krb5_enc_tkt_part; > + decode_krb5_encryption_key; > + decode_krb5_error; > + decode_krb5_etype_info; > + decode_krb5_etype_info2; > + decode_krb5_fast_req; > + decode_krb5_fast_response; > + decode_krb5_iakerb_finished; > + decode_krb5_iakerb_header; > + decode_krb5_kdc_req_body; > + decode_krb5_otp_tokeninfo; > + decode_krb5_kkdcp_message; > + decode_krb5_pa_enc_ts; > + decode_krb5_pa_for_user; > + decode_krb5_pa_fx_fast_reply; > + decode_krb5_pa_fx_fast_request; > + decode_krb5_pa_otp_challenge; > + decode_krb5_pa_otp_req; > + decode_krb5_pa_otp_enc_req; > + decode_krb5_pa_pac_options; > + decode_krb5_pa_pac_req; > + decode_krb5_pa_s4u_x509_user; > + decode_krb5_pa_spake; > + decode_krb5_padata_sequence; > + decode_krb5_priv; > + decode_krb5_safe; > + decode_krb5_sam_challenge_2; > + decode_krb5_sam_challenge_2_body; > + decode_krb5_sam_response_2; > + decode_krb5_secure_cookie; > + decode_krb5_setpw_req; > + decode_krb5_spake_factor; > + decode_krb5_tgs_rep; > + decode_krb5_tgs_req; > + decode_krb5_ticket; > + decode_krb5_typed_data; > + decode_utf8_strings; > + encode_krb5_ad_kdcissued; > + encode_krb5_ap_rep; > + encode_krb5_ap_rep_enc_part; > + encode_krb5_ap_req; > + encode_krb5_as_rep; > + encode_krb5_as_req; > + encode_krb5_authdata; > + encode_krb5_authenticator; > + encode_krb5_cammac; > + encode_krb5_checksum; > + encode_krb5_cred; > + encode_krb5_enc_cred_part; > + encode_krb5_enc_data; > + encode_krb5_enc_kdc_rep_part; > + encode_krb5_enc_priv_part; > + encode_krb5_enc_sam_response_enc_2; > + encode_krb5_enc_tkt_part; > + encode_krb5_encryption_key; > + encode_krb5_error; > + encode_krb5_etype_info; > + encode_krb5_etype_info2; > + encode_krb5_fast_response; > + encode_krb5_iakerb_finished; > + encode_krb5_iakerb_header; > + encode_krb5_kdc_req_body; > + encode_krb5_otp_tokeninfo; > + encode_krb5_kkdcp_message; > + encode_krb5_pa_enc_ts; > + encode_krb5_pa_for_user; > + encode_krb5_pa_fx_fast_reply; > + encode_krb5_pa_otp_challenge; > + encode_krb5_pa_otp_req; > + encode_krb5_pa_otp_enc_req; > + encode_krb5_pa_pac_options; > + encode_krb5_pa_s4u_x509_user; > + encode_krb5_pa_spake; > + encode_krb5_padata_sequence; > + encode_krb5_pkinit_supp_pub_info; > + encode_krb5_priv; > + encode_krb5_s4u_userid; > + encode_krb5_safe; > + encode_krb5_sam_challenge_2; > + encode_krb5_sam_challenge_2_body; > + encode_krb5_sam_response_2; > + encode_krb5_secure_cookie; > + encode_krb5_sp80056a_other_info; > + encode_krb5_spake_factor; > + encode_krb5_tgs_rep; > + encode_krb5_tgs_req; > + encode_krb5_ticket; > + encode_krb5_typed_data; > + encode_utf8_strings; > + et_asn1_error_table; > + et_k524_error_table; > + et_kdb5_error_table; > + et_krb5_error_table; > + et_kv5m_error_table; > + et_prof_error_table; > + initialize_asn1_error_table; > + initialize_k524_error_table; > + initialize_kdb5_error_table; > + initialize_krb5_error_table; > + initialize_k5e1_error_table; > + initialize_kv5m_error_table; > + initialize_prof_error_table; > + k5_add_empty_pa_data; > + k5_add_pa_data_element; > + k5_add_pa_data_from_data; > + k5_alloc_pa_data; > + k5_authind_decode; > + k5_build_conf_principals; > + k5_cc_store_primary_cred; > + k5_ccselect_free_context; > + k5_change_error_message_code; > + k5_etypes_contains; > + k5_expand_path_tokens; > + k5_expand_path_tokens_extra; > + k5_externalize_auth_context; > + k5_externalize_authdata; > + k5_externalize_authdata_context; > + k5_externalize_context; > + k5_externalize_keyblock; > + k5_externalize_principal; > *** 953 LINES SKIPPED *** >=20 This commit breaks buildworld for me: [...] --- libzfs.so.4 --- Building shared library libzfs.so.4 cc -target x86_64-unknown-freebsd15.0 --sysroot=3D/usr/obj/usr/src/amd64.am= d64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -Wl,-zrelro -fstack-= protector-strong -shared -Wl,-x -Wl,--fatal-warnings -Wl,--warn-shared-text= rel -o libzfs.so.4 -Wl,-soname,libzfs.so.4 libzfs_changelist.pico libzfs_c= onfig.pico libzfs_crypto.pico libzfs_dataset.pico libzfs_diff.pico libzfs_i= mport.pico libzfs_iter.pico libzfs_mount.pico libzfs_pool.pico libzfs_sendr= ecv.pico libzfs_status.pico libzfs_util.pico libzfs_compat.pico libzfs_zmou= nt.pico libshare.pico nfs.pico os/freebsd/nfs.pico os/freebsd/smb.pico city= hash.pico zfeature_common.pico zfs_comutil.pico zfs_deleg.pico zfs_fletcher= .pico zfs_fletcher_superscalar.pico zfs_fletcher_superscalar4.pico zfs_name= check.pico zfs_prop.pico zfs_valstr.pico zpool_prop.pico zprop_common.pico = zfs_fletcher_intel.pico zfs_fletcher_sse.pico zfs_fletcher_avx512.pico -la= vl -lbsdxml -lcrypto -lgeom -lm -lmd -lnvpair -lrt -lumem -lutil = -luutil -lz -lzfs_core -lzutil -lpthread=20 --- krb5/lib/krb5__L --- ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'et_asn1_= error_table' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'et_k524_= error_table' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'et_kdb5_= error_table' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'et_krb5_= error_table' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'et_kv5m_= error_table' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'et_prof_= error_table' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'initiali= ze_asn1_error_table' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'initiali= ze_k524_error_table' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'initiali= ze_kdb5_error_table' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'initiali= ze_krb5_error_table' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'initiali= ze_k5e1_error_table' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'initiali= ze_kv5m_error_table' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'initiali= ze_prof_error_table' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'profile_= abandon' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'profile_= add_relation' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'profile_= clear_relation' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'profile_= flush' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'profile_= flush_to_buffer' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'profile_= flush_to_file' failed: symbol not defined ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'profile_= free_buffer' failed: symbol not defined ld: error: too many errors emitted, stopping now (use --error-limit=3D0 to = see all errors) cc: error: linker command failed with exit code 1 (use -v to see invocation) *** [libkrb5.so.121] Error code 1 make[4]: stopped making "all" in /usr/src/krb5/lib/krb5 make[4]: 1 error [...] Kind regards oh --=20 A FreeBSD user --Sig_/3b9oI2.3_7A1jvWoWXZscF= Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iHUEARYKAB0WIQRQheDybVktG5eW/1Kxzvs8OqokrwUCaH+6JgAKCRCxzvs8Oqok rz1VAQDDq4V6MObXYvyA5liPSVRzt6VwRI5VIOtXiDwnLQOMCgEAwohmaDUqbUm8 aSpBkv1bYWobutUpSggRP2MaeRNPmwY= =L1s/ -----END PGP SIGNATURE----- --Sig_/3b9oI2.3_7A1jvWoWXZscF=-- From nobody Tue Jul 22 16:28:55 2025 X-Original-To: dev-commits-src-all@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 4bmjQ003kDz5pcDY; Tue, 22 Jul 2025 16:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmjPz4jQKz3d5h; Tue, 22 Jul 2025 16:28:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753201735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gJBSfWngqWbSKiG74V3eaBQ3AYTISfcgNgjI6pQymOM=; b=qCS76N5BF3OGln/NWgCE3vEcoziDq5ZssPmzboGsUwZvzq9zjtpBB5U65ABe4AVSHrbx8U RLGtN1SCGRg57T7EVxyQIB/MpQFjWQw4jps1dXFIZBQ/3f5iWFeRNJDDALsCTTHKDEstkY v0w6X5MJGqwdFzeo9GLvWdmpnnJ/YCrMIVABeHaXiwpPOXsZydeLZ0f/Wbw7MGvAjNULKD A0etTasgM4vVy6aXPllkV9kjCRwhh2Sk44e91Q+OmQDXZ2EIT0DW0qqjVZgMoYOHuPbi3w /uk4Mx2PuSK6VlU5dS4YAG/Ky5/xqEIRcawSDhYVRj7T7tIAg0c+ghL7+UFgKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753201735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gJBSfWngqWbSKiG74V3eaBQ3AYTISfcgNgjI6pQymOM=; b=ArmNEDHtDsrWZTismNTZSeqDL5d4etkumu4KfEE3pbLKWRtrc2MBdcZRNh+RQa5ZWob7VN /Vr5inzRr2AgFjIO/qKtk81dxu0TKRwVZ7i8ZfZpwI0zf4sIsrvWjzcxHOBuAd156C7iNz O7JKdCfcmGSuVyydGWlcR+p2AZfqlADS6VPsxVPoG0Il4iiH+29mMo7O3l5Q5867+hVSG1 7bl+vPmShjs5gNp+HSV2wwXB7uTc9g8JpGyJuQE8/hjVDnNEeLpIGuhvRtgfHCUb1KgGGg Yt+my8dc5qQQoi0y7+TEZoK0W/27/Z359P4ay03G/s27Ko5CuxtPX1mt2i9w3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753201735; a=rsa-sha256; cv=none; b=sVR0TnNJ9jZSeuPauUwKVvlje9SxOwKUqO6gbkA++8DvJfavNqBqefmtY9zXNQznnvB9wB 0IlCWGTWyVt753zH3bKRsG2ckDk+DjhNKwQnA/HpiYJdOplK64EG8JHLDpvGeMEbk1ttSA 8KM+rc7Q+SY8GSJvyL+uXmCnnqciHRkn7emfvImGq9O7pGYRA7737o7HDrn5weMESaaDw9 sRJXcQfHqn4LIivkkxtkM/vQQQLgSRs2tUTFITnFCSAhLJfXiu6oWZk/oYHShlI7t7pucj 3jv2o13kPaGepiQb0n4zc/wJbnX4W4LqoWyEoNCrh3BW05Q0vsoImX+jBjQnvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmjPz3ntVzbpy; Tue, 22 Jul 2025 16:28:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MGStbY036400; Tue, 22 Jul 2025 16:28:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MGSt8n036397; Tue, 22 Jul 2025 16:28:55 GMT (envelope-from git) Date: Tue, 22 Jul 2025 16:28:55 GMT Message-Id: <202507221628.56MGSt8n036397@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 0e1665ae61b2 - main - RELNOTES: Add ufshci(4) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 0e1665ae61b204031f0c7534206daa9eb38b9c17 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=0e1665ae61b204031f0c7534206daa9eb38b9c17 commit 0e1665ae61b204031f0c7534206daa9eb38b9c17 Author: Alexander Ziaee AuthorDate: 2025-07-22 16:26:08 +0000 Commit: Alexander Ziaee CommitDate: 2025-07-22 16:26:10 +0000 RELNOTES: Add ufshci(4) Reviewed by: j_yoon.choi_samsung.com Differential Revision: https://reviews.freebsd.org/D51382 --- RELNOTES | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/RELNOTES b/RELNOTES index 09696a37998b..bd275e809777 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,11 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +1349a733cf28: + Add a driver supporting a new storage controller interface, + Universal Flash Storage Host Controller Interface, supporting + version 4.1 and earlier, via ufshci(4). + f1f230439fa4: FreeBSD now implements the inotify(2) family of system calls. From nobody Tue Jul 22 19:08:30 2025 X-Original-To: dev-commits-src-all@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 4bmmy71bqtz5q334; Tue, 22 Jul 2025 19:08: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmmy675mqz3CQR; Tue, 22 Jul 2025 19:08:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753211311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x7NT+OZct+a7jZoSo8W+eOPAmAKVMEc+thDnv0xHnG4=; b=yyDaxseTP3J9Tzw+eDCxWdC5+HVCaMiO3j6Uh16aXhsQWjU9XMsou87M+n7l9jQbyKf1qe /ujLJdWlxp5/kl+pXcIP0JpDY68kBD27cVsmWSUW8PI4Gsfypmd27xPJtDjAbfOQHpDzil zWbkiJB6IlWG5XcXIvYhXbIVqaV6rMQkTsY6aH6LNKYC5QOOYvBBGTcYkWiXaCBHEfKiBX LmHAw5WdwOS2pg0kn03fzvC/QsbPk3gRigaBP9F8EVENki7bwrHVVfJdiGFHYhscdaNUXq S4433vi13wQnLVdjdO2BafaT17PC2Hp3RAtGG2eQ/wIkA3OeRUENlu7dGyzxgA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753211311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x7NT+OZct+a7jZoSo8W+eOPAmAKVMEc+thDnv0xHnG4=; b=cFYGNNiYFgK6SSidRIZbaYJbcDHvVyIA5ADIBfu0bKjHWZp1xKHWIDAXBffGzxsQ9XfmtQ RbVzY6gnt6wVDR28sPWng65RCFqRsLmZ3QMHKRharcLj6cMP4r6Q+erll7kpaFWiL2x1PT m1ajjNdDoO2e2lS9EV4/e3pB6+sC/39XaMKwkbXmUqdEwX5SdfExHTeIwR+1yaZh3nBW3L 80Fykcn7Kg4swG6GP82CQeqzjbJVKBdc1FAA5OJHzya7Sok7olcI9nLRyZLuIHPe4ZsWzL RxnsMHnQDvO2pwGcMcNGivvHP3gij801tZmtb3wohs0NQUnaslwCxQCN3t8IWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753211311; a=rsa-sha256; cv=none; b=EF9r+zcZhZAg2CPt9hIjI/PFoVprClVFvstNe13GBLnv3WgAxIwus+lMVassBaxSnm4l2F LVXWV+V45oSl35Qs8h15HL10UjfBJ0vSJm5ox2BcOF9weUcTfoVi1/CLuYq4pZ6VFqGIii ybLQJjpbruAHrHVqmVJilD4n5p1fubtLyqJM/Y5qIfUsxSvY9PaCU7l20m1b056hM+3M4+ fFRPHuVmQBxY5OppAtF4VRotqKMzXfTChVzJ55fao+jCYptZV+bG8AVYBG+8F61UWGRCsL G0G/R3++P8xPV5xQrDzqm5TKO49xpCK+B4aGX5wUOmpw2aLqAkv45RfIuSXfTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmmy66f4kzgVq; Tue, 22 Jul 2025 19:08:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MJ8Ups038486; Tue, 22 Jul 2025 19:08:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MJ8UY3038482; Tue, 22 Jul 2025 19:08:30 GMT (envelope-from git) Date: Tue, 22 Jul 2025 19:08:30 GMT Message-Id: <202507221908.56MJ8UY3038482@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 5fe15d7cf39b - main - release: Don't install caroot in OCI images. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5fe15d7cf39b7c29d0bad3839bbdafe29d5aa33d Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5fe15d7cf39b7c29d0bad3839bbdafe29d5aa33d commit 5fe15d7cf39b7c29d0bad3839bbdafe29d5aa33d Author: Dag-Erling Smørgrav AuthorDate: 2025-07-22 19:06:51 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-07-22 19:07:07 +0000 release: Don't install caroot in OCI images. Instead, use certctl to install certificates directly from the source tree into the image. Reviewed by: dfr Differential Revision: https://reviews.freebsd.org/D51404 --- release/tools/oci-image-static.conf | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/release/tools/oci-image-static.conf b/release/tools/oci-image-static.conf index 753a03af653b..8e642d9defce 100644 --- a/release/tools/oci-image-static.conf +++ b/release/tools/oci-image-static.conf @@ -14,7 +14,7 @@ oci_image_build() { mtree -deU -p $m/usr -f ${srcdir}/etc/mtree/BSD.usr.dist > /dev/null mtree -deU -p $m/usr/include -f ${srcdir}/etc/mtree/BSD.include.dist > /dev/null mtree -deU -p $m/usr/lib -f ${srcdir}/etc/mtree/BSD.debug.dist > /dev/null - install_packages ${abi} ${workdir} FreeBSD-caroot FreeBSD-zoneinfo + install_packages ${abi} ${workdir} FreeBSD-zoneinfo cp ${srcdir}/etc/master.passwd $m/etc pwd_mkdb -p -d $m/etc $m/etc/master.passwd || return $? cp ${srcdir}/etc/group $m/etc || return $? @@ -22,7 +22,10 @@ oci_image_build() { # working directory to OBJDIR/release cp ../etc/termcap/termcap.small $m/etc/termcap.small || return $? cp ../etc/termcap/termcap.small $m/usr/share/misc/termcap || return $? - env DESTDIR=$m /usr/sbin/certctl rehash + env DESTDIR=$m \ + TRUSTPATH=${srcdir}/secure/caroot/trusted \ + UNTRUSTPATH=${srcdir}/secure/caroot/untrusted \ + certctl -c rehash # Generate a suitable repo config for pkgbase case ${branch} in CURRENT|STABLE|BETA*) From nobody Tue Jul 22 19:09:49 2025 X-Original-To: dev-commits-src-all@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 4bmmzd6gzFz5q345; Tue, 22 Jul 2025 19:09:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmmzd2RjSz3Drv; Tue, 22 Jul 2025 19:09:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753211389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+yaW3JuJxHStDutp9v3MJdz/nGP1/DVo+4BcBSwj+eU=; b=Z8kb9VvSEyu0bs4dfdPMtryOvBF+UyBApo9s6Lwl+fdJF1RmXDrJ6efRwAyEZqd5I6Dt4+ gVejeWj4+LXnc/yHQ7XYhTE1kccNH+9hidyK2ISAt/l5bKuZ8S+cFDGoEzpg6uxkp3RIF3 HvkIWh/JwQb696fZiPAKp9unXsqgBWSgcqmkO5e7V4dnFJAvjgJHdJA7+NUjf9SMslyKKj 4cWeobZCHfSS7L+g3EAIGiMoDqovZr8NQif79+ayMSnv53m2REm3Ca8Dep/Vo8v9MOyNPr cj42VDxtqDBMWQwB510FiRSa05qrDK68Uyv1Dv1yw0gzlzN7jzmKYxZCjnToHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753211389; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+yaW3JuJxHStDutp9v3MJdz/nGP1/DVo+4BcBSwj+eU=; b=vktKUGaCc+PIDZeFVxdi3Iyq4eVrz4vy/IzRcnrQM1lc+LrGlSE1MFbSYfodMOYNVRLw93 guD+xegzRtjpEY0go7THJr04b0oNHBWBy7ESOLIfG3/nxtM7Lad/x/yFWjQ269nV5lcRsD 5442f0xZEiBQM2Jh1vlRMnXC0afP4eHGwkZufJ5EbJGCPNSMGHKZyRVAGwMtnGz0wuVImM WcBiZUBl2ed7j9sjG5+wOirA+Wj6+wswoG8AZp9ju0Fe9TQ+bA7hg3K45h8Lt0qnpGYbC4 0QlxT3k/f6TJqxlpUAatnMu2+KM3SuagSw8m+p1Q4CeFqDtwdNH8Yvyelxb7Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753211389; a=rsa-sha256; cv=none; b=lLkKQaPlm1j4Jz9BvbUIgJ8OVQs6xYfVn2VSMmnJmye3HapWiY7yfOD2FlrK1ExJN89WD9 /0+V4SK+zSRbye5dw9sUb4x9u396dNtLa1vTiobr/mVc/P/DZddGZMjQn+cOO1mEpNuQPM 7jHryGagPPGEX2uXJ0uVsdj2Ide7Aou81vVsu/xO9AaePOlpWEs4VV06N8QVIbiV+n2JEx OObJcvC5G6DxQfSJPEyPDbbCk70ztw/6LzxQSZiTrWtBMB1CACGtv5oaItavEEp7H/CfsE ynN5aBChaEbaDui6xub81+I1yAdpX2RS2ykYAvxEQGwPZuUwizg54PgvdRI1Bg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmmzd1tX5zgg2; Tue, 22 Jul 2025 19:09:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MJ9nLk038988; Tue, 22 Jul 2025 19:09:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MJ9nbe038985; Tue, 22 Jul 2025 19:09:49 GMT (envelope-from git) Date: Tue, 22 Jul 2025 19:09:49 GMT Message-Id: <202507221909.56MJ9nbe038985@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: f58febc4cefa - main - krb5: Correct version maps List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f58febc4cefa7a34044c0c80b9300d289cead642 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=f58febc4cefa7a34044c0c80b9300d289cead642 commit f58febc4cefa7a34044c0c80b9300d289cead642 Author: Cy Schubert AuthorDate: 2025-07-22 17:43:24 +0000 Commit: Cy Schubert CommitDate: 2025-07-22 19:09:23 +0000 krb5: Correct version maps Fixes: ae07a5805b19 --- krb5/lib/gssapi/version.map | 1 - krb5/lib/krb5/version.map | 41 ------- krb5/lib/rpc/version.map | 288 ++++++++++++++++++++++---------------------- 3 files changed, 144 insertions(+), 186 deletions(-) diff --git a/krb5/lib/gssapi/version.map b/krb5/lib/gssapi/version.map index 95f7ed5151db..afdfe9a0a83a 100644 --- a/krb5/lib/gssapi/version.map +++ b/krb5/lib/gssapi/version.map @@ -111,7 +111,6 @@ KRB5_GSSAPI_1.0 { gss_localname; gss_map_name_to_any; gss_mech_iakerb; - gss_mech_initialize; gss_mech_krb5; gss_mech_krb5_old; gss_mech_krb5_wrong; diff --git a/krb5/lib/krb5/version.map b/krb5/lib/krb5/version.map index bd852023ff6c..3f37ce0dce31 100644 --- a/krb5/lib/krb5/version.map +++ b/krb5/lib/krb5/version.map @@ -105,19 +105,6 @@ KRB5_KRB5_1.0 { encode_krb5_ticket; encode_krb5_typed_data; encode_utf8_strings; - et_asn1_error_table; - et_k524_error_table; - et_kdb5_error_table; - et_krb5_error_table; - et_kv5m_error_table; - et_prof_error_table; - initialize_asn1_error_table; - initialize_k524_error_table; - initialize_kdb5_error_table; - initialize_krb5_error_table; - initialize_k5e1_error_table; - initialize_kv5m_error_table; - initialize_prof_error_table; k5_add_empty_pa_data; k5_add_pa_data_element; k5_add_pa_data_from_data; @@ -627,32 +614,4 @@ KRB5_KRB5_1.0 { krb5int_parse_enctype_list; krb5int_random_string; krb5int_trace; - profile_abandon; - profile_add_relation; - profile_clear_relation; - profile_flush; - profile_flush_to_buffer; - profile_flush_to_file; - profile_free_buffer; - profile_free_list; - profile_get_boolean; - profile_get_integer; - profile_get_relation_names; - profile_get_string; - profile_get_subsection_names; - profile_get_values; - profile_init; - profile_init_flags; - profile_init_path; - profile_init_vtable; - profile_iterator; - profile_iterator_create; - profile_iterator_free; - profile_release; - profile_release_string; - profile_rename_section; - profile_ser_externalize; - profile_ser_internalize; - profile_ser_size; - profile_update_relation; }; diff --git a/krb5/lib/rpc/version.map b/krb5/lib/rpc/version.map index 195808a93ca0..4a5052b71536 100644 --- a/krb5/lib/rpc/version.map +++ b/krb5/lib/rpc/version.map @@ -1,147 +1,147 @@ KRB5_RPC_1.0 { global: - gssrpc_auth_debug_gss - gssrpc_auth_debug_gssapi - gssrpc_auth_gssapi_create - gssrpc_auth_gssapi_create_default - gssrpc_auth_gssapi_display_status - gssrpc_auth_gssapi_seal_seq - gssrpc_auth_gssapi_unseal_seq - gssrpc_auth_gssapi_unwrap_data - gssrpc_auth_gssapi_wrap_data - gssrpc_authgss_create - gssrpc_authgss_create_default - gssrpc_authgss_get_private_data - gssrpc_authgss_service - gssrpc_authnone_create - gssrpc_authunix_create - gssrpc_authunix_create_default - gssrpc_bindresvport - gssrpc_bindresvport_sa - gssrpc_callrpc - gssrpc_clnt_broadcast - gssrpc_clnt_create - gssrpc_clnt_pcreateerror - gssrpc_clnt_perrno - gssrpc_clnt_perror - gssrpc_clnt_spcreateerror - gssrpc_clnt_sperrno - gssrpc_clnt_sperror - gssrpc_clntraw_create - gssrpc_clnttcp_create - gssrpc_clntudp_bufcreate - gssrpc_clntudp_create - gssrpc_get_myaddress - gssrpc_getrpcport - gssrpc_log_debug - gssrpc_log_hexdump - gssrpc_log_status - gssrpc_misc_debug_gss - gssrpc_misc_debug_gssapi - gssrpc_pmap_getmaps - gssrpc_pmap_getport - gssrpc_pmap_rmtcall - gssrpc_pmap_set - gssrpc_pmap_unset - gssrpc_registerrpc - gssrpc_rpc_createrr - gssrpc_svc_auth_gss_ops - gssrpc_svc_auth_gssapi_ops - gssrpc_svc_auth_none - gssrpc_svc_auth_none_ops - gssrpc_svc_debug_gss - gssrpc_svc_debug_gssapi - gssrpc_svc_fdset - gssrpc_svc_fdset_init - gssrpc_svc_getreq - gssrpc_svc_getreqset - gssrpc_svc_maxfd - gssrpc_svc_register - gssrpc_svc_run - gssrpc_svc_sendreply - gssrpc_svc_unregister - gssrpc_svcauth_gss_get_principal - gssrpc_svcauth_gss_set_log_badauth_func - gssrpc_svcauth_gss_set_log_badauth2_func - gssrpc_svcauth_gss_set_log_badverf_func - gssrpc_svcauth_gss_set_log_miscerr_func - gssrpc_svcauth_gss_set_svc_name - gssrpc_svcauth_gssapi_set_log_badauth_func - gssrpc_svcauth_gssapi_set_log_badauth2_func - gssrpc_svcauth_gssapi_set_log_badverf_func - gssrpc_svcauth_gssapi_set_log_miscerr_func - gssrpc_svcauth_gssapi_set_names - gssrpc_svcauth_gssapi_unset_names - gssrpc_svcerr_auth - gssrpc_svcerr_decode - gssrpc_svcerr_noproc - gssrpc_svcerr_noprog - gssrpc_svcerr_progvers - gssrpc_svcerr_systemerr - gssrpc_svcerr_weakauth - gssrpc_svcfd_create - gssrpc_svcraw_create - gssrpc_svctcp_create - gssrpc_svcudp_bufcreate - gssrpc_svcudp_create - gssrpc_svcudp_enablecache - gssrpc_xdr_accepted_reply - gssrpc_xdr_array - gssrpc_xdr_authgssapi_creds - gssrpc_xdr_authgssapi_init_arg - gssrpc_xdr_authgssapi_init_res - gssrpc_xdr_authunix_parms - gssrpc_xdr_bool - gssrpc_xdr_bytes - gssrpc_xdr_callhdr - gssrpc_xdr_callmsg - gssrpc_xdr_char - gssrpc_xdr_des_block - gssrpc_xdr_enum - gssrpc_xdr_free - gssrpc_xdr_gss_buf - gssrpc_xdr_int - gssrpc_xdr_int32 - gssrpc_xdr_long - gssrpc_xdr_netobj - gssrpc_xdr_opaque - gssrpc_xdr_opaque_auth - gssrpc_xdr_pmap - gssrpc_xdr_pmaplist - gssrpc_xdr_pointer - gssrpc_xdr_reference - gssrpc_xdr_rejected_reply - gssrpc_xdr_replymsg - gssrpc_xdr_rmtcall_args - gssrpc_xdr_rmtcallres - gssrpc_xdr_rpc_gss_buf - gssrpc_xdr_rpc_gss_cred - gssrpc_xdr_rpc_gss_data - gssrpc_xdr_rpc_gss_init_args - gssrpc_xdr_rpc_gss_init_res - gssrpc_xdr_rpc_gss_unwrap_data - gssrpc_xdr_rpc_gss_wrap_data - gssrpc_xdr_short - gssrpc_xdr_sizeof - gssrpc_xdr_string - gssrpc_xdr_u_char - gssrpc_xdr_u_int - gssrpc_xdr_u_int32 - gssrpc_xdr_u_long - gssrpc_xdr_u_short - gssrpc_xdr_union - gssrpc_xdr_vector - gssrpc_xdr_void - gssrpc_xdr_wrapstring - gssrpc_xdralloc_create - gssrpc_xdralloc_getdata - gssrpc_xdralloc_release - gssrpc_xdrmem_create - gssrpc_xdrrec_create - gssrpc_xdrrec_endofrecord - gssrpc_xdrrec_eof - gssrpc_xdrrec_skiprecord - gssrpc_xdrstdio_create - gssrpc_xprt_register - gssrpc_xprt_unregister + gssrpc_auth_debug_gss; + gssrpc_auth_debug_gssapi; + gssrpc_auth_gssapi_create; + gssrpc_auth_gssapi_create_default; + gssrpc_auth_gssapi_display_status; + gssrpc_auth_gssapi_seal_seq; + gssrpc_auth_gssapi_unseal_seq; + gssrpc_auth_gssapi_unwrap_data; + gssrpc_auth_gssapi_wrap_data; + gssrpc_authgss_create; + gssrpc_authgss_create_default; + gssrpc_authgss_get_private_data; + gssrpc_authgss_service; + gssrpc_authnone_create; + gssrpc_authunix_create; + gssrpc_authunix_create_default; + gssrpc_bindresvport; + gssrpc_bindresvport_sa; + gssrpc_callrpc; + gssrpc_clnt_broadcast; + gssrpc_clnt_create; + gssrpc_clnt_pcreateerror; + gssrpc_clnt_perrno; + gssrpc_clnt_perror; + gssrpc_clnt_spcreateerror; + gssrpc_clnt_sperrno; + gssrpc_clnt_sperror; + gssrpc_clntraw_create; + gssrpc_clnttcp_create; + gssrpc_clntudp_bufcreate; + gssrpc_clntudp_create; + gssrpc_get_myaddress; + gssrpc_getrpcport; + gssrpc_log_debug; + gssrpc_log_hexdump; + gssrpc_log_status; + gssrpc_misc_debug_gss; + gssrpc_misc_debug_gssapi; + gssrpc_pmap_getmaps; + gssrpc_pmap_getport; + gssrpc_pmap_rmtcall; + gssrpc_pmap_set; + gssrpc_pmap_unset; + gssrpc_registerrpc; + gssrpc_rpc_createrr; + gssrpc_svc_auth_gss_ops; + gssrpc_svc_auth_gssapi_ops; + gssrpc_svc_auth_none; + gssrpc_svc_auth_none_ops; + gssrpc_svc_debug_gss; + gssrpc_svc_debug_gssapi; + gssrpc_svc_fdset; + gssrpc_svc_fdset_init; + gssrpc_svc_getreq; + gssrpc_svc_getreqset; + gssrpc_svc_maxfd; + gssrpc_svc_register; + gssrpc_svc_run; + gssrpc_svc_sendreply; + gssrpc_svc_unregister; + gssrpc_svcauth_gss_get_principal; + gssrpc_svcauth_gss_set_log_badauth_func; + gssrpc_svcauth_gss_set_log_badauth2_func; + gssrpc_svcauth_gss_set_log_badverf_func; + gssrpc_svcauth_gss_set_log_miscerr_func; + gssrpc_svcauth_gss_set_svc_name; + gssrpc_svcauth_gssapi_set_log_badauth_func; + gssrpc_svcauth_gssapi_set_log_badauth2_func; + gssrpc_svcauth_gssapi_set_log_badverf_func; + gssrpc_svcauth_gssapi_set_log_miscerr_func; + gssrpc_svcauth_gssapi_set_names; + gssrpc_svcauth_gssapi_unset_names; + gssrpc_svcerr_auth; + gssrpc_svcerr_decode; + gssrpc_svcerr_noproc; + gssrpc_svcerr_noprog; + gssrpc_svcerr_progvers; + gssrpc_svcerr_systemerr; + gssrpc_svcerr_weakauth; + gssrpc_svcfd_create; + gssrpc_svcraw_create; + gssrpc_svctcp_create; + gssrpc_svcudp_bufcreate; + gssrpc_svcudp_create; + gssrpc_svcudp_enablecache; + gssrpc_xdr_accepted_reply; + gssrpc_xdr_array; + gssrpc_xdr_authgssapi_creds; + gssrpc_xdr_authgssapi_init_arg; + gssrpc_xdr_authgssapi_init_res; + gssrpc_xdr_authunix_parms; + gssrpc_xdr_bool; + gssrpc_xdr_bytes; + gssrpc_xdr_callhdr; + gssrpc_xdr_callmsg; + gssrpc_xdr_char; + gssrpc_xdr_des_block; + gssrpc_xdr_enum; + gssrpc_xdr_free; + gssrpc_xdr_gss_buf; + gssrpc_xdr_int; + gssrpc_xdr_int32; + gssrpc_xdr_long; + gssrpc_xdr_netobj; + gssrpc_xdr_opaque; + gssrpc_xdr_opaque_auth; + gssrpc_xdr_pmap; + gssrpc_xdr_pmaplist; + gssrpc_xdr_pointer; + gssrpc_xdr_reference; + gssrpc_xdr_rejected_reply; + gssrpc_xdr_replymsg; + gssrpc_xdr_rmtcall_args; + gssrpc_xdr_rmtcallres; + gssrpc_xdr_rpc_gss_buf; + gssrpc_xdr_rpc_gss_cred; + gssrpc_xdr_rpc_gss_data; + gssrpc_xdr_rpc_gss_init_args; + gssrpc_xdr_rpc_gss_init_res; + gssrpc_xdr_rpc_gss_unwrap_data; + gssrpc_xdr_rpc_gss_wrap_data; + gssrpc_xdr_short; + gssrpc_xdr_sizeof; + gssrpc_xdr_string; + gssrpc_xdr_u_char; + gssrpc_xdr_u_int; + gssrpc_xdr_u_int32; + gssrpc_xdr_u_long; + gssrpc_xdr_u_short; + gssrpc_xdr_union; + gssrpc_xdr_vector; + gssrpc_xdr_void; + gssrpc_xdr_wrapstring; + gssrpc_xdralloc_create; + gssrpc_xdralloc_getdata; + gssrpc_xdralloc_release; + gssrpc_xdrmem_create; + gssrpc_xdrrec_create; + gssrpc_xdrrec_endofrecord; + gssrpc_xdrrec_eof; + gssrpc_xdrrec_skiprecord; + gssrpc_xdrstdio_create; + gssrpc_xprt_register; + gssrpc_xprt_unregister; }; From nobody Tue Jul 22 19:09:50 2025 X-Original-To: dev-commits-src-all@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 4bmmzg1hsqz5q3Bx; Tue, 22 Jul 2025 19:09:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmmzf3DXhz3FD8; Tue, 22 Jul 2025 19:09:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753211390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xmybteAAX51qZL7kIBIAEUq3ngqoAXYI8UOF1l9OxPo=; b=en5ZB83DyQyEY5thN8fxY/7VVxXKLCMnpwYiuAVCLVa68isxq9hqoHLEgOhtnhzywACw37 d56qnkI29atx3Jmq5Vw2aoDUBkamYudqsnpgmB+MVLPGXsJhsLv5Bkn8qLeiRp8XAoYl// zrR0kO2aLd9nQpeDIkCaFUN0V4CRHALdp40aAPdxhcPBs/utdqKUlD9j/7vGpzjvl72gqi 1AplzzWgPH25ribEGpSRrb/ZjLbdFp6djqpj+Q5zWErw3AZDH1Re2Yqhn5fHQI2uEPLyMf yU7L3YBZpvS+r3E+hKJcUO7L6DMwVCqlZm3ASNL2QqrLc8+RwtQK8B5fGQRkBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753211390; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xmybteAAX51qZL7kIBIAEUq3ngqoAXYI8UOF1l9OxPo=; b=bHu2CJhJUu9z+YfygxDpyotZwmrNttGrEVJmg2Vdot40hw9qMCagfe52WJArSal46tTuHI mKjn6I1WoJMqWMZkMZKcGym8Dl5miHnkv2GNpWLkqUh0tPFWWIpXLWB9UqL3/z3xA7TJ76 y7kCSTYoiAOEpHWLuL4SoAYlln/B/onxTCswfDBdw2UJp8sNW7zRM/j+Y2P3ZHKf9V3auo pLFL71zrofL2LlKqPpkenkoDrLk1jAGbvDdovO4CPPcm8rxzUq86ZXO0+fQAJE5jGN0Je5 x9bW4zKKwb/mNRKbHQ5R3nZSQlEhO1SqnAuvDeE123TYevvGk++IIXbxeffmEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753211390; a=rsa-sha256; cv=none; b=mi96dK7bAFx9UKCHQXndwx0AjqbYJHHmGsYLp6Ln3NCsRzM4DmZEbd9GsaseE196OjU1aq 6H+2ANCq7IIq7X3wmEtdyIYBOQ+OBKqu0D99KLvFI6bGijIJoinE+vYJ7euwE+GLHQqS25 EPSieWeIimQ09lHCnnlwMjGPp8qQM3fjr2rLRfnN2ZEdehBBZuuQjJyVhyb2mqHrOlUsXU Vk22PF/wI8m5aehUk+MNpKuL75cU/fK3CqlgzfAIAfvgR8Uplp1LT0saxNUL1u1I4n+n7U GKQMjCMrsRDcpyRwnVKcagU6Amj7dfkkLYMUZ3zwKXtMVBSfSx04q8xdm3w2Bw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmmzf2n42zgg3; Tue, 22 Jul 2025 19:09:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MJ9ovb039028; Tue, 22 Jul 2025 19:09:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MJ9ot9039025; Tue, 22 Jul 2025 19:09:50 GMT (envelope-from git) Date: Tue, 22 Jul 2025 19:09:50 GMT Message-Id: <202507221909.56MJ9ot9039025@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 805498e49ae4 - main - KRB5: Add util version maps List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 805498e49ae4875ccebdbd8b8ec0280e88a29b08 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=805498e49ae4875ccebdbd8b8ec0280e88a29b08 commit 805498e49ae4875ccebdbd8b8ec0280e88a29b08 Author: Cy Schubert AuthorDate: 2025-07-22 17:45:19 +0000 Commit: Cy Schubert CommitDate: 2025-07-22 19:09:23 +0000 KRB5: Add util version maps --- krb5/util/et/Makefile | 1 + krb5/util/et/version.map | 12 +++++ krb5/util/profile/Makefile | 1 + krb5/util/profile/version.map | 33 +++++++++++++ krb5/util/support/Makefile | 1 + krb5/util/support/version.map | 102 +++++++++++++++++++++++++++++++++++++++ krb5/util/verto/Makefile | 1 + krb5/util/verto/libverto.exports | 33 +++++++++++++ krb5/util/verto/version.map | 36 ++++++++++++++ 9 files changed, 220 insertions(+) diff --git a/krb5/util/et/Makefile b/krb5/util/et/Makefile index 4457cd199801..16b700fb5d1f 100644 --- a/krb5/util/et/Makefile +++ b/krb5/util/et/Makefile @@ -18,6 +18,7 @@ LIB= com_err LDFLAGS=-Wl,--no-undefined INCSDIR=${INCLUDEDIR} LIBADD= krb5support +VERSION_MAP= ${.CURDIR}/version.map SRCS= com_err.c \ diff --git a/krb5/util/et/version.map b/krb5/util/et/version.map new file mode 100644 index 000000000000..be846b139ebc --- /dev/null +++ b/krb5/util/et/version.map @@ -0,0 +1,12 @@ +KRB5_ET_1.0 { + global: + add_error_table; + com_err; + com_err_va; + error_message; + error_table_name; + error_table_name_r; + remove_error_table; + reset_com_err_hook; + set_com_err_hook; +}; diff --git a/krb5/util/profile/Makefile b/krb5/util/profile/Makefile index 24e06e8c5024..72ef3176ab5d 100644 --- a/krb5/util/profile/Makefile +++ b/krb5/util/profile/Makefile @@ -15,6 +15,7 @@ PACKAGE= krb5 LIB= krb5profile LIBADD= com_err krb5support +VERSION_MAP= ${.CURDIR}/version.map SRCS= prof_file.c \ prof_get.c \ diff --git a/krb5/util/profile/version.map b/krb5/util/profile/version.map new file mode 100644 index 000000000000..d7fd0059983d --- /dev/null +++ b/krb5/util/profile/version.map @@ -0,0 +1,33 @@ +KRB5_PROFILE_1.0 { + global: + et_prof_error_table; + initialize_prof_error_table; + profile_abandon; + profile_add_relation; + profile_clear_relation; + profile_flush; + profile_free_list; + profile_get_boolean; + profile_get_integer; + profile_get_relation_names; + profile_get_string; + profile_get_subsection_names; + profile_get_values; + profile_init; + profile_init_flags; + profile_init_path; + profile_init_vtable; + profile_iterator; + profile_iterator_create; + profile_iterator_free; + profile_release; + profile_release_string; + profile_rename_section; + profile_ser_externalize; + profile_ser_internalize; + profile_ser_size; + profile_update_relation; + profile_flush_to_file; + profile_flush_to_buffer; + profile_free_buffer; +}; diff --git a/krb5/util/support/Makefile b/krb5/util/support/Makefile index 9ba1b8169d8e..25ef7faf74ee 100644 --- a/krb5/util/support/Makefile +++ b/krb5/util/support/Makefile @@ -16,6 +16,7 @@ PACKAGE= krb5-lib LIB= krb5support # SHLIB_MAJOR= 0 LDFLAGS=-Wl,--no-undefined +VERSION_MAP= ${.CURDIR}/version.map .PATH: ${KRB5_DIR}/util/support diff --git a/krb5/util/support/version.map b/krb5/util/support/version.map new file mode 100644 index 000000000000..f4de213d33d9 --- /dev/null +++ b/krb5/util/support/version.map @@ -0,0 +1,102 @@ +KRB5_SUPPORT_1.0 { + global: + k5_base64_decode; + k5_base64_encode; + k5_bcmp; + k5_buf_init_fixed; + k5_buf_init_dynamic; + k5_buf_init_dynamic_zap; + k5_buf_add; + k5_buf_add_len; + k5_buf_add_fmt; + k5_buf_add_vfmt; + k5_buf_cstring; + k5_buf_get_space; + k5_buf_truncate; + k5_buf_status; + k5_buf_free; + k5_set_error; + k5_vset_error; + k5_get_error; + k5_free_error; + k5_clear_error; + k5_set_error_info_callout_fn; + k5_hashtab_add; + k5_hashtab_create; + k5_hashtab_free; + k5_hashtab_get; + k5_hashtab_remove; + k5_hex_decode; + k5_hex_encode; + k5_json_array_add; + k5_json_array_create; + k5_json_array_fmt; + k5_json_array_get; + k5_json_array_length; + k5_json_array_set; + k5_json_bool_create; + k5_json_bool_value; + k5_json_decode; + k5_json_encode; + k5_json_get_tid; + k5_json_null_create; + k5_json_null_create_val; + k5_json_number_create; + k5_json_number_value; + k5_json_object_count; + k5_json_object_create; + k5_json_object_get; + k5_json_object_iterate; + k5_json_object_set; + k5_json_release; + k5_json_retain; + k5_json_string_create; + k5_json_string_create_base64; + k5_json_string_create_len; + k5_json_string_unbase64; + k5_json_string_utf8; + k5_os_mutex_init; + k5_os_mutex_destroy; + k5_os_mutex_lock; + k5_os_mutex_unlock; + k5_once; + k5_path_isabs; + k5_path_join; + k5_path_split; + k5_siphash24; + k5_strerror_r; + k5_utf8_to_utf16le; + k5_utf16le_to_utf8; + k5_dir_filenames; + k5_free_filenames; + krb5int_key_register; + krb5int_key_delete; + krb5int_getspecific; + krb5int_setspecific; + krb5int_getaddrinfo; + krb5int_freeaddrinfo; + krb5int_gai_strerror; + krb5int_getnameinfo; + krb5int_in6addr_any; + krb5int_pthread_loaded; + krb5int_open_plugin; + krb5int_close_plugin; + krb5int_get_plugin_data; + krb5int_get_plugin_func; + krb5int_open_plugin_dirs; + krb5int_close_plugin_dirs; + krb5int_get_plugin_dir_data; + krb5int_get_plugin_dir_func; + krb5int_free_plugin_dir_data; + krb5int_free_plugin_dir_func; + krb5int_mutex_alloc; + krb5int_mutex_free; + krb5int_mutex_lock; + krb5int_mutex_unlock; + krb5int_gmt_mktime; + krb5int_ucs4_to_utf8; + krb5int_utf8_to_ucs4; + krb5int_utf8_lentab; + krb5int_utf8_mintab; + krb5int_zap; +}; diff --git a/krb5/util/verto/Makefile b/krb5/util/verto/Makefile index 57367e5284e0..18faddb3a09e 100644 --- a/krb5/util/verto/Makefile +++ b/krb5/util/verto/Makefile @@ -15,6 +15,7 @@ PACKAGE= krb5 LIB= verto # SHLIB_MAJOR= 0 +VERSION_MAP= ${.CURDIR}/version.map .PATH: ${KRB5_DIR}/util/verto diff --git a/krb5/util/verto/libverto.exports b/krb5/util/verto/libverto.exports new file mode 100644 index 000000000000..3745d5014653 --- /dev/null +++ b/krb5/util/verto/libverto.exports @@ -0,0 +1,33 @@ +verto_add_child +verto_add_idle +verto_add_io +verto_add_signal +verto_add_timeout +verto_break +verto_cleanup +verto_convert_module +verto_default +verto_del +verto_fire +verto_free +verto_get_ctx +verto_get_fd +verto_get_fd_state +verto_get_flags +verto_get_interval +verto_get_private +verto_get_proc +verto_get_proc_status +verto_get_signal +verto_get_supported_types +verto_get_type +verto_new +verto_reinitialize +verto_run +verto_run_once +verto_set_allocator +verto_set_default +verto_set_fd_state +verto_set_flags +verto_set_private +verto_set_proc_status diff --git a/krb5/util/verto/version.map b/krb5/util/verto/version.map new file mode 100644 index 000000000000..5fc734e25d3a --- /dev/null +++ b/krb5/util/verto/version.map @@ -0,0 +1,36 @@ +KRB5_VERTO_1.0 { + global: + verto_add_child; + verto_add_idle; + verto_add_io; + verto_add_signal; + verto_add_timeout; + verto_break; + verto_cleanup; + verto_convert_module; + verto_default; + verto_del; + verto_fire; + verto_free; + verto_get_ctx; + verto_get_fd; + verto_get_fd_state; + verto_get_flags; + verto_get_interval; + verto_get_private; + verto_get_proc; + verto_get_proc_status; + verto_get_signal; + verto_get_supported_types; + verto_get_type; + verto_new; + verto_reinitialize; + verto_run; + verto_run_once; + verto_set_allocator; + verto_set_default; + verto_set_fd_state; + verto_set_flags; + verto_set_private; + verto_set_proc_status; +}; From nobody Tue Jul 22 19:12:52 2025 X-Original-To: dev-commits-src-all@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 4bmn3F2T3Bz5q3WP; Tue, 22 Jul 2025 19:12:57 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmn3D08W0z3GxX; Tue, 22 Jul 2025 19:12:56 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTPS id eCG9uttHr5MqyeIQ3uA1VG; Tue, 22 Jul 2025 19:12:55 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id eIQ1upfOXl5eGeIQ2uYk2a; Tue, 22 Jul 2025 19:12:55 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=EO6l0EZC c=1 sm=1 tr=0 ts=687fe2b7 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=Wb1JkmetP80A:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=e-Chn1yxq01_oZVlkVkA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id CA1D04CF; Tue, 22 Jul 2025 12:12:52 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id C3CDC420; Tue, 22 Jul 2025 12:12:52 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: A FreeBSD User cc: Cy Schubert , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: ae07a5805b19 - main - krb5: Add version maps In-reply-to: <20250722181950.436cf5f2@thor.sb211.local> References: <202507221548.56MFmoo2060272@gitrepo.freebsd.org> <20250722181950.436cf5f2@thor.sb211.local> Comments: In-reply-to A FreeBSD User message dated "Tue, 22 Jul 2025 18:19:23 +0200." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Tue, 22 Jul 2025 12:12:52 -0700 Message-Id: <20250722191252.C3CDC420@slippy.cwsent.com> X-CMAE-Envelope: MS4xfDw/4u23os/3dzYuR5yH1fbDOdpgg61j9VgjiETqg2kAIKMQ+THokpOdexU7C34218VZVpZl1I5lOGCtpe4q3gKyANzEzqYa8LnujjPwkCB7o03TOlqx WJNdsdCL3LjYyCI/GL+IkzQ1HVwc3f3WLWkmfIEBjYhxBYCAw2vV6e/7wHAw7tWalHbQ/yz5qJDkVNXvxjzOo3wd5DNslXSWD02L5zGZGpI+CyLo8ypqCm6x niHf/HRJdQH7aXIUr799OAQeQTOukjW+E1xoLzUjaiNUjRfKh1E9+arQvvMrwjP3xGjnx9ZkJEUG6JTTK5k74I97/z3lRg7kbCkPVnt+w3QBVZGVBKfOjXl2 IemyoPlh X-Rspamd-Queue-Id: 4bmn3D08W0z3GxX 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:16509, ipnet:3.96.0.0/15, country:US] In message <20250722181950.436cf5f2@thor.sb211.local>, A FreeBSD User writes: [...] > > *** 953 LINES SKIPPED *** > >=20 > > This commit breaks buildworld for me: > > [...] > --- libzfs.so.4 --- > Building shared library libzfs.so.4 > cc -target x86_64-unknown-freebsd15.0 --sysroot=3D/usr/obj/usr/src/amd64.am= > d64/tmp -B/usr/obj/usr/src/amd64.amd64/tmp/usr/bin -Wl,-zrelro -fstack-= > protector-strong -shared -Wl,-x -Wl,--fatal-warnings -Wl,--warn-shared-text= > rel -o libzfs.so.4 -Wl,-soname,libzfs.so.4 libzfs_changelist.pico libzfs_c= > onfig.pico libzfs_crypto.pico libzfs_dataset.pico libzfs_diff.pico libzfs_i= > mport.pico libzfs_iter.pico libzfs_mount.pico libzfs_pool.pico libzfs_sendr= > ecv.pico libzfs_status.pico libzfs_util.pico libzfs_compat.pico libzfs_zmou= > nt.pico libshare.pico nfs.pico os/freebsd/nfs.pico os/freebsd/smb.pico city= > hash.pico zfeature_common.pico zfs_comutil.pico zfs_deleg.pico zfs_fletcher= > .pico zfs_fletcher_superscalar.pico zfs_fletcher_superscalar4.pico zfs_name= > check.pico zfs_prop.pico zfs_valstr.pico zpool_prop.pico zprop_common.pico = > zfs_fletcher_intel.pico zfs_fletcher_sse.pico zfs_fletcher_avx512.pico -la= > vl -lbsdxml -lcrypto -lgeom -lm -lmd -lnvpair -lrt -lumem -lutil = > -luutil -lz -lzfs_core -lzutil -lpthread=20 > --- krb5/lib/krb5__L --- > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'et_asn1_= > error_table' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'et_k524_= > error_table' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'et_kdb5_= > error_table' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'et_krb5_= > error_table' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'et_kv5m_= > error_table' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'et_prof_= > error_table' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'initiali= > ze_asn1_error_table' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'initiali= > ze_k524_error_table' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'initiali= > ze_kdb5_error_table' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'initiali= > ze_krb5_error_table' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'initiali= > ze_k5e1_error_table' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'initiali= > ze_kv5m_error_table' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'initiali= > ze_prof_error_table' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'profile_= > abandon' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'profile_= > add_relation' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'profile_= > clear_relation' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'profile_= > flush' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'profile_= > flush_to_buffer' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'profile_= > flush_to_file' failed: symbol not defined > ld: error: version script assignment of 'KRB5_KRB5_1.0' to symbol 'profile_= > free_buffer' failed: symbol not defined > ld: error: too many errors emitted, stopping now (use --error-limit=3D0 to = > see all errors) > cc: error: linker command failed with exit code 1 (use -v to see invocation) > *** [libkrb5.so.121] Error code 1 > > make[4]: stopped making "all" in /usr/src/krb5/lib/krb5 > make[4]: 1 error > [...] > > Kind regards > oh Sorry about the breakage. It's been fixed by f58febc4cefa. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Tue Jul 22 19:57:23 2025 X-Original-To: dev-commits-src-all@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 4bmp2W1wmFz5q5j1; Tue, 22 Jul 2025 19:57: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmp2W1CSjz3p4x; Tue, 22 Jul 2025 19:57:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753214243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nKE6KzuAFEjIm4NAKSkMXJnKz8Gwv1lr8J6OOEMzhbY=; b=YtBUWZ5ZvuQ4jGHVr44rNzQoVc6mkx7qd3mVig25b+gNRlo8087PkykTGT7Lil5/Xzsfsy UdHyrqdz4A7MUTxobclO7/U91iexFKfx7GYgqDBED+aFmOaoPxBRL9b893ss04cNVjDDjw hs07nqyNU0z0CLrzV96T82IWjXVDXDNFPmklkWHZzIWLh3Z9MHeO9eFKE49++tbrvuvDYh BzhVHG6jDDipRYFxFyKoTWt2ISdRt5e5G22O1M28p/F29W/SJvnJuw+KyBXgZVm/lk6GGE Ew7Y9bXIxkMsqDW+BiB/XplHq8EhoItP8nAkTeQvWyxeja66B89ZfvBdNVtdoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753214243; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nKE6KzuAFEjIm4NAKSkMXJnKz8Gwv1lr8J6OOEMzhbY=; b=icqxUUP6yvreEEImZsV1ISMKOnvND2Qh1PpudLYP7VerGgvRZdR/xw/hyHlEQCmrdzK+rJ tBxHpWh+zrW8bK+25rAgrFEf5eZTO8B81B6TP0BGSJX72NqBF0Hk/sxQk4JuXSvZrf2Dn/ iUfCWXyfQq6T1zqNI6fvf7aPNunL4OZfawa3uBzGuvRVc0njJKJiYy8+IHugWt/et560/J mFa7sXef3RXwywkNVRXpGNHKgZCqkSYRKRufZJpf1/RndSVwuuu6b9YSTQU9kSEYio/UzP LyCmaSLDeHnlTyt1n8KWOy9SmQq8sJRFtqI3R/WQRC6t/YmU17DrOKhik8q5/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753214243; a=rsa-sha256; cv=none; b=fht2m8NFEk1XAWnCZ2seOEGDkpxJeNE8tHx0pf4RrULxGSqKdCk/Y4pOmYi2Mxu68L7WiQ rqEF5mY4lYLUdwWdrvcflEDJK4aCwV2hVG7MjztVJnF99e2zz/Pu57zPcUX/tXVdvacj+h dyaa8JZqnU2Vr0Qq3qjZufOEn7Ts097J7+wTcbUP9czzzVkwpIa8KNrlNdDt4Dej4cXOCz c/fFW6a3qkzOzUxYrCVGuPddb7CgbqlR9DNKsQ07eBEjTk7y0j7/yT7Hz7qnO1uLZCgrLj xtqobItkcbPEgO1/YARXJjZrA2BHuoOYdcEJ01T3gq5iJ+cjVMIaelLkWmowgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmp2W0STmzhRR; Tue, 22 Jul 2025 19:57:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MJvNuD031259; Tue, 22 Jul 2025 19:57:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MJvNlT031256; Tue, 22 Jul 2025 19:57:23 GMT (envelope-from git) Date: Tue, 22 Jul 2025 19:57:23 GMT Message-Id: <202507221957.56MJvNlT031256@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Poul-Henning Kamp Subject: git: 32a4a2680796 - main - Synchronize recoverdisk(1) with the datamuseum.dk version. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: phk X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32a4a2680796d2ba234e9fd9766ed695ab1a5909 Auto-Submitted: auto-generated The branch main has been updated by phk: URL: https://cgit.FreeBSD.org/src/commit/?id=32a4a2680796d2ba234e9fd9766ed695ab1a5909 commit 32a4a2680796d2ba234e9fd9766ed695ab1a5909 Author: Poul-Henning Kamp AuthorDate: 2025-07-22 19:54:13 +0000 Commit: Poul-Henning Kamp CommitDate: 2025-07-22 19:54:13 +0000 Synchronize recoverdisk(1) with the datamuseum.dk version. --- sbin/recoverdisk/recoverdisk.1 | 258 +++++++++----- sbin/recoverdisk/recoverdisk.c | 766 +++++++++++++++++++++++++++-------------- 2 files changed, 681 insertions(+), 343 deletions(-) diff --git a/sbin/recoverdisk/recoverdisk.1 b/sbin/recoverdisk/recoverdisk.1 index 2999ac6ec409..9f1deb4c0c23 100644 --- a/sbin/recoverdisk/recoverdisk.1 +++ b/sbin/recoverdisk/recoverdisk.1 @@ -27,7 +27,7 @@ .Os .Sh NAME .Nm recoverdisk -.Nd recover data from hard disk or optical media +.Nd recover data from disk-like devices. .Sh SYNOPSIS .Nm .Op Fl b Ar bigsize @@ -41,79 +41,101 @@ .Sh DESCRIPTION The .Nm -utility reads data from the +utility reads all data from the .Ar source -file until all blocks could be successfully read. +and retries read operations until they succeed. If .Ar destination -was specified all data is being written to that file. -It starts reading in multiples of the sector size. -Whenever a block fails, it is put to the end of the working queue and will be -read again, possibly with a smaller read size. +is specified all data read be written there. .Pp -By default it uses block sizes of roughly 1 MB, 32kB, and the native -sector size (usually 512 bytes). -These figures are adjusted slightly, for devices whose sectorsize is not a -power of 2, e.g., audio CDs with a sector size of 2352 bytes. +The internal work-list can be saved and loaded so that +.Nm +sessions can be resumed, for instance when a marginal +source hard-disk shuts down. +.Pp +The work-list is initialized with a single item which covers the entire +.Ar source +and +.Nm +always chips away at the first item on the work-list. + +When a read succeeds, that part of the current chunk is eliminated +from the work-list. + +When a read fails, that part of the item is appended to the worklist +as a separate item, and will be retried in due order. +If +.Ar destination +is specified, the corresponding range is filled with '_UNREAD_'. +.Pp +The first pass attempts to read everything in "big-size" chunks, +the second pass reads in "medium-size" chunks and third and subsequent +passes read in "small-size" chunks. This three stage process is +an attempt to optimize the case where only a few bad blocks exist +on +.Ar source . +If too many read-errors are encountered, +.Nm +will fall back to smaller sizes sooner. +.Pp +The three sizes default to 128kB (or less if the sector size does +not divide 128kB cleanly, for instance audio CD media), and the +reported +.Dv DIOCGSTRIPESIZE +and +.Dv DIOCGSECTORSIZE +respectively. .Pp The options are as follows: .Bl -tag -width indent .It Fl b Ar bigsize -The size of reads attempted first. -The middle pass is roughly the logarithmic average of the bigsize and -the sectorsize. -.It Fl r Ar readlist -Read the list of blocks and block sizes to read from the specified file. -.It Fl s Ar interval -How often we should update the writelist file while things go OK. -The default is 60 and the unit is "progress messages" so if things -go well, this is the same as once per minute. +The size of reads attempted in first pass. +.It Fl m Ar mediumsize +The size of reads attempted in second pass. +.It Fl s Ar smallsize +The size of reads attempted in third and subsequent passes. +.It Fl r Ar work-list-file +Read the work-list from a file. +.It Fl w Ar work-list-file +Write the work-list to a file when a read succeed, but at most once +every minute. +.It Fl l Ar log-file +Each successful read is logged with timestamp, offset and length. +.It Fl t Ar totalsize +How many bytes should be recovered. The default is what +.Dv DIOCGMEDIASIZE +reports for character and block devices or +.Dv st_size +if +.Ar source +is a regular file. +.It Fl p Ar pause +.Xr sleep 3 +this long whenever a read fails. This makes the +.Ar source +device look less sick to the operating system. .It Fl u Ar pattern -By default blocks which encounter read errors will be filled with -the pattern +By default blocks which cannot be read are filled with the pattern .Ql _UNREAD_ -in the output file. -This option can be -used to specify another pattern. -Nothing gets written if the string is empty. +in the output file. This option can be used to specify a different +pattern. If the pattern is the empty string, nothing is written. .It Fl v -Enables nicer status report using ANSI escapes and UTF-8. -.It Fl w Ar writelist -Write the list of remaining blocks to read to the specified file if -.Nm -is aborted via -.Dv SIGINT . +Produce a detailed progress report with ANSI escapes and UTF-8. .El .Pp -The -.Fl r -and -.Fl w -options can be specified together. -Especially, they can point to the same file, which will be updated on abort. -.Sh OUTPUT -The .Nm -utility -prints several columns, detailing the progress -.Bl -tag -width remaining -.It Va start -Starting offset of the current block. -.It Va size -Read size of the current block. -.It Va len -Length of the current block. -.It Va state -Is increased for every failed read. -.It Va done -Number of bytes already read. -.It Va remaining -Number of bytes remaining. -.It Va "% done" -Percent complete. -.El +can be aborted with +.Dv SIGINT , +but with a sick +.Ar source +it may take up to several minutes before the current read operation +returns from the kernel. +.Pp .Sh EXAMPLES .Bd -literal +# check if all sectors can be read on a USB stick: +recoverdisk /dev/da0 + # recover data from failing hard drive ada3 recoverdisk /dev/ada3 /data/disk.img @@ -129,10 +151,72 @@ recoverdisk -r worklist -w worklist /dev/cd0 /data/cd.iso # recover a single file from the unreadable media recoverdisk /cdrom/file.avi file.avi -# If the disk hangs the system on read-errors try: -recoverdisk -b 0 /dev/ada3 /somewhere - .Ed +.Sh PRACTICAL ADVICE +In Datamuseum.dk +.Nm +has been used to recover all sorts of data-media for two decades, +here are some things we have learned: +.Bl -bullet +.It +Interacting with failing hardware has a tendency to crash machines, +so it is always a good idea to use the +.Fl -w work-list-file +so that it is possible to continue. +.It +When attempting to recover hard to read data from failing hard disks, +it pays to pamper the drive as much as possible: +.It +It is generally best to keep the drive in it's usual physical orientation, +but it can also help to try other orientations. +.It +Insulate the drive from external vibrations. +.It +Keep the drive cool with a fan. +.It +If possible, power the drive from a laboratory power supply. +.It +Do not loose patience: Let +.Nm +run as long as possible. +.It +(S)ATA controllers do not handle failing disks well, if this +is a problem, use a USB-(S)ATA adapter instead. +.It +The +.Nm +source code is deliberately written to be easily portable to +older versions of +.Fx +and to other operating systems. +.It +If you need to read ST-506, RLL or ESDI drives +.Fx 3.5.1 +is a good compromise. +.It +Sometimes forcing the disk to step between reads helps. +Since +.Nm +process the work-list in the order it is read, this +can be accomplished by sorting the work-list with +something like: +.Dl % sort +0.5 +.It +By default the +.Xr CAM +layer will retry failing read operations, but that +will get stuck on the bad sectors for long time +and delay recovering what actually can be read from +a rapidly failing drive. +In that situation, set the appropriate +.Dl kern.cam.*.retry_count +sysctl to zero. +.It +For floppies and un-zoned hard disks (ST-506 to +early IDE) set +.Fl b Ar bigsize +to the size of a track. +.El .Sh SEE ALSO .Xr dd 1 , .Xr ada 4 , @@ -143,7 +227,8 @@ recoverdisk -b 0 /dev/ada3 /somewhere The .Nm utility first appeared in -.Fx 7.0 . +.Fx 7.0 +because Somebody™ forgot to make a backup copy. .Sh AUTHORS .An -nosplit The original implementation was done by @@ -151,34 +236,29 @@ The original implementation was done by with minor improvements from .An Ulrich Sp\(:orlein Aq Mt uqs@FreeBSD.org . .Pp -This manual page was written by +This manual page was originally written by .An Ulrich Sp\(:orlein . .Sh BUGS -Reading from media where the sectorsize is not a power of 2 will make all -1 MB reads fail. -This is due to the DMA reads being split up into blocks of at most 128kB. -These reads then fail if the sectorsize is not a divisor of 128kB. -When reading a full raw audio CD, this leads to roughly 700 error messages -flying by. -This is harmless and can be avoided by setting -.Fl b -to no more than 128kB. +If a failing device causes the machine to crash, there is +a risk that a chunk might have been successfully read +and removed from the work-list, but not yet flushed to +the +.Ar destination . .Pp .Nm -needs to know about read errors as fast as possible, i.e., retries by lower -layers will usually slow down the operation. -When using -.Xr cam 4 -attached drives, you may want to set kern.cam.XX.retry_count to zero, e.g.: -.Bd -literal -# sysctl kern.cam.ada.retry_count=0 -# sysctl kern.cam.cd.retry_count=0 -# sysctl kern.cam.da.retry_count=0 -.Ed -.\".Pp -.\"When reading from optical media, a bug in the GEOM framework will -.\"prevent it from seeing that the media has been removed. -.\"The device can still be opened, but all reads will fail. -.\"This is usually harmless, but will send -.\".Nm -.\"into an infinite loop. +calls +.Xr fdatasync 3 +on the destination before writing the work-list to a +temporary file, and calls it again on the temporary +file before renaming it to the specified +.Fl w Ar work-file-list +filename. +But even then things dont always work out. +.Pp +.Nm +should have an option for reconstructing the work-list +from the +.Ar destination +by enumerating the +.Fl u Ar pattern +filled ranges. diff --git a/sbin/recoverdisk/recoverdisk.c b/sbin/recoverdisk/recoverdisk.c index 446266c36d50..e1b283e54a93 100644 --- a/sbin/recoverdisk/recoverdisk.c +++ b/sbin/recoverdisk/recoverdisk.c @@ -8,6 +8,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- */ + #include #include #include @@ -27,18 +28,10 @@ #include #include -/* Safe printf into a fixed-size buffer */ -#define bprintf(buf, fmt, ...) \ - do { \ - int ibprintf; \ - ibprintf = snprintf(buf, sizeof buf, fmt, __VA_ARGS__); \ - assert(ibprintf >= 0 && ibprintf < (int)sizeof buf); \ - } while (0) - struct lump { - off_t start; - off_t len; - int state; + uint64_t start; + uint64_t len; + unsigned pass; TAILQ_ENTRY(lump) list; }; @@ -46,25 +39,32 @@ struct period { time_t t0; time_t t1; char str[20]; - off_t bytes_read; + uint64_t bytes_read; TAILQ_ENTRY(period) list; }; TAILQ_HEAD(period_head, period); static volatile sig_atomic_t aborting = 0; static int verbose = 0; -static size_t bigsize = 1024 * 1024; -static size_t medsize; -static size_t minsize = 512; -static off_t tot_size; -static off_t done_size; +static uint64_t big_read; +static uint64_t medium_read; +static uint64_t small_read; +static uint64_t total_size; +static uint64_t done_size; static char *input; -static char *wworklist = NULL; -static char *rworklist = NULL; +static char *write_worklist_file = NULL; +static char *read_worklist_file = NULL; static const char *unreadable_pattern = "_UNREAD_"; -static const int write_errors_are_fatal = 1; -static int fdr, fdw; - +static int write_errors_are_fatal = 1; +static int read_fd, write_fd; +static FILE *log_file = NULL; +static char *work_buf; +static char *pattern_buf; +static double error_pause; + +static unsigned nlumps; +static double n_reads, n_good_reads; +static time_t t_first; static TAILQ_HEAD(, lump) lumps = TAILQ_HEAD_INITIALIZER(lumps); static struct period_head minute = TAILQ_HEAD_INITIALIZER(minute); static struct period_head quarter = TAILQ_HEAD_INITIALIZER(quarter); @@ -74,7 +74,8 @@ static struct period_head day = TAILQ_HEAD_INITIALIZER(quarter); /**********************************************************************/ static void -report_good_read2(time_t now, size_t bytes, struct period_head *ph, time_t dt) +account_good_read_period(time_t now, uint64_t bytes, + struct period_head *ph, time_t dt) { struct period *pp; const char *fmt; @@ -82,7 +83,7 @@ report_good_read2(time_t now, size_t bytes, struct period_head *ph, time_t dt) pp = TAILQ_FIRST(ph); if (pp == NULL || pp->t1 < now) { - pp = calloc(1, sizeof(*pp)); + pp = calloc(1UL, sizeof(*pp)); assert(pp != NULL); pp->t0 = (now / dt) * dt; pp->t1 = (now / dt + 1) * dt; @@ -98,13 +99,13 @@ report_good_read2(time_t now, size_t bytes, struct period_head *ph, time_t dt) } static void -report_good_read(time_t now, size_t bytes) +account_good_read(time_t now, uint64_t bytes) { - report_good_read2(now, bytes, &minute, 60L); - report_good_read2(now, bytes, &quarter, 900L); - report_good_read2(now, bytes, &hour, 3600L); - report_good_read2(now, bytes, &day, 86400L); + account_good_read_period(now, bytes, &minute, 60L); + account_good_read_period(now, bytes, &quarter, 900L); + account_good_read_period(now, bytes, &hour, 3600L); + account_good_read_period(now, bytes, &day, 86400L); } static void @@ -114,20 +115,18 @@ report_one_period(const char *period, struct period_head *ph) int n; n = 0; - printf("%s \xe2\x94\x82", period); + printf("%s ", period); TAILQ_FOREACH(pp, ph, list) { - if (n == 3) { + if (++n == 4) { TAILQ_REMOVE(ph, pp, list); free(pp); break; } - if (n++) - printf(" \xe2\x94\x82"); - printf(" %s %14jd", pp->str, pp->bytes_read); + printf("\xe2\x94\x82 %s %14ju ", + pp->str, (uintmax_t)pp->bytes_read); } for (; n < 3; n++) { - printf(" \xe2\x94\x82"); - printf(" %5s %14s", "", ""); + printf("\xe2\x94\x82 %5s %14s ", "", ""); } printf("\x1b[K\n"); } @@ -146,27 +145,23 @@ report_periods(void) static void set_verbose(void) { - struct winsize wsz; - if (!isatty(STDIN_FILENO) || ioctl(STDIN_FILENO, TIOCGWINSZ, &wsz)) - return; verbose = 1; } static void -report_header(int eol) +report_header(const char *term) { - printf("%13s %7s %13s %5s %13s %13s %9s", + printf("%13s %7s %13s %5s %13s %13s %9s%s", "start", "size", "block-len", "pass", "done", "remaining", - "% done"); - if (eol) - printf("\x1b[K"); - putchar('\n'); + "% done", + term + ); } #define REPORTWID 79 @@ -186,20 +181,20 @@ report_hline(const char *how) printf("\x1b[K\n"); } -static off_t hist[REPORTWID]; -static off_t last_done = -1; +static uint64_t hist[REPORTWID]; +static uint64_t prev_done = ~0UL; static void -report_histogram(const struct lump *lp) +report_histogram(uint64_t start) { - off_t j, bucket, fp, fe, k, now; + uint64_t j, bucket, fp, fe, k, now; double a; struct lump *lp2; - bucket = tot_size / REPORTWID; - if (tot_size > bucket * REPORTWID) + bucket = total_size / REPORTWID; + if (total_size > bucket * REPORTWID) bucket += 1; - if (done_size != last_done) { + if (done_size != prev_done) { memset(hist, 0, sizeof hist); TAILQ_FOREACH(lp2, &lumps, list) { fp = lp2->start; @@ -213,9 +208,9 @@ report_histogram(const struct lump *lp) fp += k; } } - last_done = done_size; + prev_done = done_size; } - now = lp->start / bucket; + now = start / bucket; for (j = 0; j < REPORTWID; j++) { a = round(8 * (double)hist[j] / bucket); assert (a >= 0 && a < 9); @@ -228,7 +223,7 @@ report_histogram(const struct lump *lp) } else { putchar(0xe2); putchar(0x96); - putchar(0x80 + (int)a); + putchar(0x80 + (char)a); } if (j == now) printf("\x1b[0m"); @@ -237,34 +232,40 @@ report_histogram(const struct lump *lp) } static void -report(const struct lump *lp, size_t sz) +report(uint64_t sz) { struct winsize wsz; + const struct lump *lp = TAILQ_FIRST(&lumps); int j; - - assert(lp != NULL); + unsigned pass = 0; + uintmax_t start = 0, length = 0; + time_t t_now = time(NULL); + + if (lp != NULL) { + pass = lp->pass; + start = lp->start; + length = lp->len; + } if (verbose) { printf("\x1b[H%s\x1b[K\n", input); - report_header(1); - } else { - putchar('\r'); + report_header("\x1b[K\n"); } - printf("%13jd %7zu %13jd %5d %13jd %13jd %9.4f", - (intmax_t)lp->start, - sz, - (intmax_t)lp->len, - lp->state, - (intmax_t)done_size, - (intmax_t)(tot_size - done_size), - 100*(double)done_size/(double)tot_size + printf("%13ju %7ju %13ju %5u %13ju %13ju %9.4f", + start, + (uintmax_t)sz, + length, + pass, + (uintmax_t)done_size, + (uintmax_t)(total_size - done_size), + 100*(double)done_size/(double)total_size ); if (verbose) { printf("\x1b[K\n"); report_hline(NULL); - report_histogram(lp); + report_histogram(start); if (TAILQ_EMPTY(&minute)) { report_hline(NULL); } else { @@ -272,27 +273,36 @@ report(const struct lump *lp, size_t sz) report_periods(); report_hline("\xe2\x94\xb4"); } + printf("Missing: %u", nlumps); + printf(" Success: %.0f/%.0f =", n_good_reads, n_reads); + printf(" %.4f%%", 100 * n_good_reads / n_reads); + printf(" Duration: %.3fs", (t_now - t_first) / n_reads); + printf("\x1b[K\n"); + report_hline(NULL); j = ioctl(STDIN_FILENO, TIOCGWINSZ, &wsz); if (!j) printf("\x1b[%d;1H", wsz.ws_row); + } else { + printf("\n"); } - fflush(stdout); } /**********************************************************************/ static void -new_lump(off_t start, off_t len, int state) +new_lump(uint64_t start, uint64_t len, unsigned pass) { struct lump *lp; + assert(len > 0); lp = malloc(sizeof *lp); if (lp == NULL) err(1, "Malloc failed"); lp->start = start; lp->len = len; - lp->state = state; + lp->pass = pass; TAILQ_INSERT_TAIL(&lumps, lp, list); + nlumps += 1; } /********************************************************************** @@ -306,98 +316,100 @@ save_worklist(void) struct lump *llp; char buf[PATH_MAX]; - if (fdw >= 0 && fdatasync(fdw)) + if (write_fd >= 0 && fdatasync(write_fd)) err(1, "Write error, probably disk full"); - if (wworklist != NULL) { - bprintf(buf, "%s.tmp", wworklist); - (void)fprintf(stderr, "\nSaving worklist ..."); - (void)fflush(stderr); + if (write_worklist_file != NULL) { + snprintf(buf, sizeof(buf), "%s.tmp", write_worklist_file); + fprintf(stderr, "\nSaving worklist ..."); file = fopen(buf, "w"); if (file == NULL) err(1, "Error opening file %s", buf); - TAILQ_FOREACH(llp, &lumps, list) - fprintf(file, "%jd %jd %d\n", - (intmax_t)llp->start, (intmax_t)llp->len, - llp->state); - (void)fflush(file); + TAILQ_FOREACH(llp, &lumps, list) { + assert (llp->len > 0); + fprintf(file, "%ju %ju %u\n", + (uintmax_t)llp->start, + (uintmax_t)llp->len, + llp->pass); + } + fflush(file); if (ferror(file) || fdatasync(fileno(file)) || fclose(file)) err(1, "Error writing file %s", buf); - if (rename(buf, wworklist)) - err(1, "Error renaming %s to %s", buf, wworklist); - (void)fprintf(stderr, " done.\n"); + if (rename(buf, write_worklist_file)) + err(1, "Error renaming %s to %s", + buf, write_worklist_file); + fprintf(stderr, " done.\n"); } } /* Read the worklist if -r was given */ -static off_t -read_worklist(off_t t) +static uint64_t +read_worklist(void) { - off_t s, l, d; - int state, lines; + uintmax_t start, length; + uint64_t missing = 0; + unsigned pass, lines; FILE *file; - (void)fprintf(stderr, "Reading worklist ..."); - (void)fflush(stderr); - file = fopen(rworklist, "r"); + fprintf(stderr, "Reading worklist ..."); + file = fopen(read_worklist_file, "r"); if (file == NULL) - err(1, "Error opening file %s", rworklist); + err(1, "Error opening file %s", read_worklist_file); lines = 0; - d = t; for (;;) { ++lines; - if (3 != fscanf(file, "%jd %jd %d\n", &s, &l, &state)) { + if (3 != fscanf(file, "%ju %ju %u\n", &start, &length, &pass)) { if (!feof(file)) - err(1, "Error parsing file %s at line %d", - rworklist, lines); + err(1, "Error parsing file %s at line %u", + read_worklist_file, lines); else break; } - new_lump(s, l, state); - d -= l; + if (length > 0) { + new_lump(start, length, pass); + missing += length; + } } if (fclose(file)) - err(1, "Error closing file %s", rworklist); - (void)fprintf(stderr, " done.\n"); + err(1, "Error closing file %s", read_worklist_file); + fprintf(stderr, " done.\n"); /* - * Return the number of bytes already read - * (at least not in worklist). + * Return the number of bytes outstanding */ - return (d); + return (missing); } /**********************************************************************/ static void -write_buf(int fd, const void *buf, ssize_t len, off_t where) +write_buf(int fd, const void *buf, uint64_t length, uint64_t where) { - ssize_t i; + int64_t i; - i = pwrite(fd, buf, len, where); - if (i == len) + i = pwrite(fd, buf, length, (off_t)where); + if (i > 0 && (uint64_t)i == length) return; - printf("\nWrite error at %jd/%zu\n\t%s\n", - where, i, strerror(errno)); + printf("\nWrite error at %ju/%ju: %jd (%s)\n", + (uintmax_t)where, + (uintmax_t)length, + (intmax_t)i, strerror(errno)); save_worklist(); if (write_errors_are_fatal) exit(3); } static void -fill_buf(char *buf, ssize_t len, const char *pattern) +fill_buf(char *buf, int64_t len, const char *pattern) { - ssize_t sz = strlen(pattern); - ssize_t i, j; + int64_t sz = strlen(pattern); + int64_t i; for (i = 0; i < len; i += sz) { - j = len - i; - if (j > sz) - j = sz; - memcpy(buf + i, pattern, j); + memcpy(buf + i, pattern, MIN(len - i, sz)); } } @@ -406,45 +418,334 @@ fill_buf(char *buf, ssize_t len, const char *pattern) static void usage(void) { - (void)fprintf(stderr, "usage: recoverdisk [-b bigsize] [-r readlist] " + fprintf(stderr, "usage: recoverdisk [-b big_read] [-r readlist] " "[-s interval] [-w writelist] source [destination]\n"); /* XXX update */ exit(1); } static void -sighandler(__unused int sig) +sighandler(int sig) { + (void)sig; aborting = 1; } +/**********************************************************************/ + +static int64_t +attempt_one_lump(time_t t_now) +{ + struct lump *lp; + uint64_t sz; + int64_t retval; + int error; + + lp = TAILQ_FIRST(&lumps); + if (lp == NULL) + return(0); + + if (lp->pass == 0) { + sz = MIN(lp->len, big_read); + } else if (lp->pass == 1) { + sz = MIN(lp->len, medium_read); + } else { + sz = MIN(lp->len, small_read); + } + + assert(sz != 0); + + n_reads += 1; + retval = pread(read_fd, work_buf, sz, lp->start); + +#if 0 /* enable this when testing */ + if (!(random() & 0xf)) { + retval = -1; + errno = EIO; + usleep(20000); + } else { + usleep(2000); + } +#endif + + error = errno; + if (retval > 0) { + n_good_reads += 1; + sz = retval; + done_size += sz; + if (write_fd >= 0) { + write_buf(write_fd, work_buf, sz, lp->start); + } + if (log_file != NULL) { + fprintf(log_file, "%jd %ju %ju\n", + (intmax_t)t_now, + (uintmax_t)lp->start, + (uintmax_t)sz + ); + fflush(log_file); + } + } else { + printf("%14ju %7ju read error %d: (%s)", + (uintmax_t)lp->start, + (uintmax_t)sz, error, strerror(error)); + if (error_pause > 1) { + printf(" (Pausing %g s)", error_pause); + } + printf("\n"); + + if (write_fd >= 0 && pattern_buf != NULL) { + write_buf(write_fd, pattern_buf, sz, lp->start); + } + new_lump(lp->start, sz, lp->pass + 1); + retval = -sz; + } + lp->start += sz; + lp->len -= sz; + if (lp->len == 0) { + TAILQ_REMOVE(&lumps, lp, list); + nlumps -= 1; + free(lp); + } + errno = error; + return (retval); +} + + +/**********************************************************************/ + +static void +determine_total_size(void) +{ + struct stat sb; + int error; + + if (total_size != 0) + return; + + error = fstat(read_fd, &sb); + if (error < 0) + err(1, "fstat failed"); + + if (S_ISBLK(sb.st_mode) || S_ISCHR(sb.st_mode)) { +#ifdef DIOCGMEDIASIZE + off_t mediasize; + error = ioctl(read_fd, DIOCGMEDIASIZE, &mediasize); + if (error == 0 && mediasize > 0) { + total_size = mediasize; + printf("# Got total_size from DIOCGMEDIASIZE: %ju\n", + (uintmax_t)total_size); + return; + } +#endif + } else if (S_ISREG(sb.st_mode) && sb.st_size > 0) { + total_size = sb.st_size; + printf("# Got total_size from stat(2): %ju\n", + (uintmax_t)total_size); + return; + } else { + errx(1, "Input must be device or regular file"); + } + fprintf(stderr, "Specify total size with -t option\n"); + exit(1); +} + +static void +determine_read_sizes(void) +{ + int error; + u_int sectorsize; + off_t stripesize; + + determine_total_size(); + +#ifdef DIOCGSECTORSIZE + if (small_read == 0) { + error = ioctl(read_fd, DIOCGSECTORSIZE, §orsize); + if (error >= 0 && sectorsize > 0) { + small_read = sectorsize; + printf("# Got small_read from DIOCGSECTORSIZE: %ju\n", + (uintmax_t)small_read + ); + } + } +#endif + + if (small_read == 0) { + printf("Assuming 512 for small_read\n"); + small_read = 512; + } + + if (medium_read && (medium_read % small_read)) { + errx(1, + "medium_read (%ju) is not a multiple of small_read (%ju)\n", + (uintmax_t)medium_read, (uintmax_t)small_read + ); + } + + if (big_read != 0 && (big_read % small_read)) { + errx(1, + "big_read (%ju) is not a multiple of small_read (%ju)\n", + (uintmax_t)big_read, (uintmax_t)small_read + ); + } + +#ifdef DIOCGSTRIPESIZE + if (medium_read == 0) { + error = ioctl(read_fd, DIOCGSTRIPESIZE, &stripesize); + if (error < 0 || stripesize < 0) { + // nope + } else if ((uint64_t)stripesize < small_read) { + // nope + } else if (stripesize % small_read) { + // nope + } else if (0 < stripesize && stripesize < (128<<10)) { + medium_read = stripesize; *** 398 LINES SKIPPED *** From nobody Tue Jul 22 20:06:52 2025 X-Original-To: dev-commits-src-all@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 4bmpFS6wPkz5q6TC; Tue, 22 Jul 2025 20:06:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmpFS66W5z3tNF; Tue, 22 Jul 2025 20:06:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753214812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3l8eJvPMYvoAfZ/KsShoyd0tnFjnNsDBjjWxLkpJagw=; b=VIAEgLCLIhXAQySM9fNW8HTUFKBBJfZrQcGJztWeU4TTkT0pzyVvJG/7HE09t5G94Q/qPP JdWQeLp1o7Kg2c0Y5ucx8SPC1an7NjdzRZn0AuC2bM+uD2os1nKi65i6l1zuz0W8klBJIM s0OprhgdIneJ/pLO9lRKarfRplrE81B2EU8kYddD83G32mBeLxQHoUd5HJogrSjzRXXXMq Yi5fvestvbVSoapQA1ST76Bz5tRSv83Q9muH638vCj2MM9jY9oN4Z8KcNcrStEFjfpAL+X qSjYRd6KOZVfeIzCPlRKz8eYmm7XTyLQwLRVHOSuctoh0ZmwMA5VDxHEj5sVSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753214812; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3l8eJvPMYvoAfZ/KsShoyd0tnFjnNsDBjjWxLkpJagw=; b=NldVqZOy+DkcMBhsW1Z26QSSlHdeWf4oki5Lj8Y6hj0bW3QwWzaLZAokQltykszXwfdMKe APedLmnSqtxxYec84rua4jpFXMAXPcI8qZX6I5+krJb5WB5dq06B+xaqnmwmZzz0u+r5nm 7mlyvU+aJRDDCz4O5rj6VJKtkWu2p/Cf8ewIXkSfA4o4tBq0JOs2Wm97DyTrfTxf90fSGk PgnwONaFdbtozmGfdaEqt5wYeDSeOtrw+u+tTM8DFpSNWr8TMZ03WDFD6F3JPigoZ4XWaA inghAjF/HAdelwMHoJ0QGxzz2DoI27wigPz+QT5Kwi+h1tW2WQVxYvdN9mNl/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753214812; a=rsa-sha256; cv=none; b=pQH/11zh6p473IAXBDZLzroQlCSjrWRBCzw6qOGfS/B1keG0OdK5rsk3ByO40BAJYXv/V/ yUEwI8BRhxWiTBIlD2PcNkDNZwhvflhFkJQWcYvw7qVj1XsM7/u4/V7t1DnB76uVgzxBmP F84w1T3cE0DCEcSo6dq710uA0EBp+fVl2IEFYFBB4hKbQUYsSjF2+jTqJxXoSOoH3i/LZY OSfZUCOJqLGZwwNoHTjW4eN0EK+2A4seT3AkgMNkW9YeQtcA+K2LtKF0zjzF9De8f/t/bP MATyRNj2fDlaFO+n+4urj3/39fS1TtPfJSZaWwNpH3jG/FF2fiG4nDQrv6J4bw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmpFS5M55zjM0; Tue, 22 Jul 2025 20:06:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MK6qZ9051535; Tue, 22 Jul 2025 20:06:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MK6qt5051532; Tue, 22 Jul 2025 20:06:52 GMT (envelope-from git) Date: Tue, 22 Jul 2025 20:06:52 GMT Message-Id: <202507222006.56MK6qt5051532@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 65e895171193 - main - efitable.8: Nits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65e8951711934cbb2fa1d0d836705c59770039c0 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=65e8951711934cbb2fa1d0d836705c59770039c0 commit 65e8951711934cbb2fa1d0d836705c59770039c0 Author: Alexander Ziaee AuthorDate: 2025-07-22 20:02:14 +0000 Commit: Alexander Ziaee CommitDate: 2025-07-22 20:06:31 +0000 efitable.8: Nits + tag spdx + uncapitalize beginning of Nd, these should not be capitalized + add bars to show that long options XOR short options + remove stray paragraph marker for linter complaints --- usr.sbin/efitable/efitable.8 | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/usr.sbin/efitable/efitable.8 b/usr.sbin/efitable/efitable.8 index 4d174b7d9514..52949abcb853 100644 --- a/usr.sbin/efitable/efitable.8 +++ b/usr.sbin/efitable/efitable.8 @@ -1,4 +1,6 @@ .\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2021 3mdeb Embedded Systems Consulting .\" .\" Redistribution and use in source and binary forms, with or without @@ -27,7 +29,7 @@ .Os .Sh NAME .Nm efitable -.Nd Dump UEFI tables +.Nd dump UEFI tables .Sh SYNOPSIS .Nm .Op Fl u Ar uuid | Fl t Ar name @@ -39,7 +41,7 @@ This program prints data from tables. .Pp The following options are available: -.Bl -tag -width 20m +.Bl -tag -width "-t name | --table name" .It Fl -libxo Generate output via .Xr libxo 3 @@ -47,7 +49,7 @@ in a selection of different human and machine readable formats. See .Xr xo_options 7 for details on command line arguments. -.It Fl t Ar name Fl -table Ar name +.It Fl t Ar name | Fl -table Ar name Specify the name of the table to print. Currently supported tables: .Pp @@ -59,10 +61,9 @@ EFI Memory Attributes Table .It Cm prop EFI Properties Table .El -.It Fl u Ar uuid Fl -uuid Ar uuid +.It Fl u Ar uuid | Fl -uuid Ar uuid Specify the UUID of the table to print. .El -.Pp .Sh HISTORY The .Nm From nobody Tue Jul 22 20:30:59 2025 X-Original-To: dev-commits-src-all@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 4bmpnH72HWz5q76V; Tue, 22 Jul 2025 20:30: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmpnH4jMjz3Cbr; Tue, 22 Jul 2025 20:30:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753216259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NfI9jHVSrRyLNqQqjBrFf0HFf/B9r7RZRlCRl2u0UG0=; b=he9MeocO8lYQq7Y3CBv58jE8qUXJrnQnfdOvnqnCbp6yIOjRr+ul5esPV+JbdXyASg+VXy xasTQAkHV3LXDHeR0vegcpDRMuLKorvv+fMykxLu9UkfDH3VIizbfZSHN4f93jzRdXBNC/ g3J+30d87aC3R1wKVvr7u98bWpxkNLZoScxZgK36LzyxQoa7m3sJmpJ4z1CIRXAasDLKno e+NAQpt+sYxx4l+Rxp62A/T6pHbJviDtOvTRW55o444cidTGdL8BYFa/c0vJ18SxMBdCKq bkWthaipKXVA7e4yUbLNnr5tA7f3VW/7Ctxeaj7j5jn8hrepIR2Y+wEWbzmivw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753216259; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NfI9jHVSrRyLNqQqjBrFf0HFf/B9r7RZRlCRl2u0UG0=; b=rsguf8u19DSK6ypswddgYEEvd1Bn43FzAomGPq3vaOmDL/Uz2MVQyoKhTxIbH/K9cA4tyT HDfLMA7P4qo0VvmajEVG4Ba92I2KsFzZk0Du+rcECzztoxwwrSiKi4CojXoSOk07pxPz8q gO9/wbsck0YePYaTTDqwVa4sW9M3Zb+QqusJYqR4Wkk3a77kOm2bVADC3flrHHMl7Cr99J OxckYLb4wQZtn2CTUnp558ZR1rdBOS3/bWNuGvqkWTu61e2pKrOAZrbNbrPkSS+aDQ2rKo tCTDLIjrJ4q+WTqNT6ux7ao0FedScVah6ppwyopEaprFPN/CkZTndkb/Jw/R1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753216259; a=rsa-sha256; cv=none; b=Mwjar0hZRpAfiz71wSI51OAkWxRw/ybk9G1clYF+gJ48G131aUAH28aDxKpXxDO3oMAnQI u1yBLUsnE+aahYNr0fT7b5bqVK/fRTnMqHH7AbySD5qv4SXGz+wkkUMaoFZOtB0OxRACUY sxlvOQhsT0D4qs+kK8gbWQSSA3QDG7Y8d91sDEbi30+H0CAFB0EVxcywI6oXmgu64//Mzv 44MSWrrmafaTHetSyNoA34YHklL+BRd7bqjYeh+lUoCeA5fIt2892XdjbPgsR+Fsb/4MUC EQ8cXqHRyKl/S5eNyvFdtQ3IH3w9IhIeCTi8xKNUbez7xxYq8C/SGyW2lf8mxw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmpnH4Js0zjqH; Tue, 22 Jul 2025 20:30:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MKUx1C000264; Tue, 22 Jul 2025 20:30:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MKUxq0000261; Tue, 22 Jul 2025 20:30:59 GMT (envelope-from git) Date: Tue, 22 Jul 2025 20:30:59 GMT Message-Id: <202507222030.56MKUxq0000261@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: ce1af6eb54a4 - stable/14 - capsicum.4: Add some more detail from the Capsicum paper List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: ce1af6eb54a423af66054e3775bc71bb09c96b41 Auto-Submitted: auto-generated The branch stable/14 has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ce1af6eb54a423af66054e3775bc71bb09c96b41 commit ce1af6eb54a423af66054e3775bc71bb09c96b41 Author: Ed Maste AuthorDate: 2025-06-14 17:57:33 +0000 Commit: Ed Maste CommitDate: 2025-07-22 20:30:30 +0000 capsicum.4: Add some more detail from the Capsicum paper Adapt some language from "Capsicum: practical capabilities for UNIX" https://www.cl.cam.ac.uk/research/security/capsicum/papers/2010usenix-security-capsicum-website.pdf Reviewed by: markj Discussed with: rwatson Event: Kitchener-Waterloo Hackathon 202506 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D50855 (cherry picked from commit c54534e60263954fac4db5ebb041ed4597df1195) (cherry picked from commit ce65ff203a4f7ce59c8782f87d90a657f7ccbc46) --- share/man/man4/capsicum.4 | 47 ++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 46 insertions(+), 1 deletion(-) diff --git a/share/man/man4/capsicum.4 b/share/man/man4/capsicum.4 index 6aefae9d6df2..1de8e4531f4f 100644 --- a/share/man/man4/capsicum.4 +++ b/share/man/man4/capsicum.4 @@ -24,7 +24,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd June 5, 2025 +.Dd June 17, 2025 .Dt CAPSICUM 4 .Os .Sh NAME @@ -37,6 +37,12 @@ .Nm is a lightweight OS capability and sandbox framework implementing a hybrid capability system model. +.Nm +is designed to blend capabilities with UNIX. +This approach achieves many of the benefits of least-privilege operation, while +preserving existing UNIX APIs and performance, and presents application authors +with an adoption path for capability-oriented design. +.Pp Capabilities are unforgeable tokens of authority that can be delegated and must be presented to perform an action. .Nm @@ -59,6 +65,34 @@ namespaces) is restricted; only explicitly delegated rights, referenced by memory mappings or file descriptors, may be used. Once set, the flag is inherited by future children processes, and may not be cleared. +.Pp +Access to system calls in capability mode is restricted: some system calls +requiring global namespace access are unavailable, while others are +constrained. +For instance, +.Xr sysctl 2 +can be used to query process-local information such as address space layout, +but also to monitor a system’s network connections. +.Xr sysctl 2 +is constrained by explicitly marking \(~~60 of over 15000 parameters as permitted +in capability mode; all others are denied. +.Pp +The system calls which require constraints are +.Xr sysctl 2 , +.Xr shm_open 2 +.Pq which is permitted to create anonymous memory objects but not named ones +and the +.Xr openat 2 +family of system calls. +The +.Xr openat 2 +calls already accept a file descriptor argument as the directory to perform the +.Xr open 2 , +.Xr rename 2 , +etc. relative to; in capability mode the +.Xr openat 2 +family of system calls are constrained so that they can only operate on +objects “under” the provided file descriptor. .It capabilities Limit operations that can be called on file descriptors. For example, a file descriptor returned by @@ -152,3 +186,14 @@ and .An Kris Kennaway Aq Mt kris@FreeBSD.org at Google, Inc., and .An Pawel Jakub Dawidek Aq Mt pawel@dawidek.net . +Portions of this manual page are drawn from +.Rs +.%A Robert N. M. Watson +.%A Jonathan Anderson +.%A Ben Laurie +.%A Kris Kennaway +.%T Capsicum: practical capabilities for UNIX +.%J USENIX Security Symposium +.%D August 2010 +.%O DOI: 10.5555/1929820.1929824 +.Re From nobody Tue Jul 22 22:33:41 2025 X-Original-To: dev-commits-src-all@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 4bmsVt124rz627p1; Tue, 22 Jul 2025 22:33: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmsVt00P7z3dr2; Tue, 22 Jul 2025 22:33:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753223622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5gEU1tLtFZVeLl8zZ/g/n9MCck30sdPtMfBA1AM8PWc=; b=dZLt5q1vb3SdFNeoRrCzlZRBii5o0xZDDiGhg9WK7SrcPo1rpPwSLpjXnhpVGzRuWtNNaJ jVUEF2CnkdHYpssNy15jSisYgkxyZ/l3whYZfwz3gtN4fQPDcvBxil318VffIGb7wdEveI 3WdEev1BReGblt4P2EO7RmvvJd6VStGva0QxOiyk4zowECmERPeLVB2psA9krYaOsTVpn5 21OqdQyVaMdoB4xAehr+5PlpmcE43+8xIir6frs9YJuVI1XtM1F4wQQFokb5jrJ2q14xyx eF+bbWS1USD2w1h26YPFHA/kpwZ+ZnpebH/StSi61XFPIQZ0z3vO4oQuUz2N8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753223622; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5gEU1tLtFZVeLl8zZ/g/n9MCck30sdPtMfBA1AM8PWc=; b=yr1lkz1D+wXAewZe+DHJsLziDWzjBqJ0JNwqgUWXRboizlWA1exlYkSGxDmtrbguggln1/ gqITc848V+p479eIgAdZKVURfdfAVq77LEw4ioZMS4K7PNPIdEYDlaGa48Mc6sr7uL/6TG SJWOBK77JxRyvJ+SpY579qwrUUHKVxfXkm4XAp0GdtBJoYsuGctP2J6ht+GDF9aFxz9OdB zYCN0nrpcUQvhr0qk4XI1328W2Meuh6i6Lu9t2MINvJWviOzJbFpEOoY08yRPiIBZTgBvd 3ucgDM+kNgfKMeUepqgQWs89xjfm3lS9AgA7w69+FWXxxabncWw1amN78y40/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753223622; a=rsa-sha256; cv=none; b=b5E5kfzqkT7WnhNLLqHvc5yp13aeo8gWtNMG2vbcV6h1wvjV6U0wnP4h3Kw0D8m3CHHp3F 77AJIL/J41Aarbc9op/nXoW5w1+nEq+L1luSGWC1GhKDBf08YkYqwzSnIPZZiXLCXo+Tpt ETfhNZRT009F1BB4q9pGUqiJRtiF5AfdksoP4h4FfE1PiTx3rm1jK/iF3HpQENEc/f/USE I9PUTiEOWJKMVBjcrWI35gKlK8gmIS7E6uOEFai/rsKJUDs1lJkRgE4jquzCfZun0mOdDM ByKIrw5Ts/yirYzAXa2Hl5v+Mow/x3BZpdEclTWthRbe2kOlJ0Yf3qSdu5XayQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmsVs6jXkzmp9; Tue, 22 Jul 2025 22:33:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MMXfmi032579; Tue, 22 Jul 2025 22:33:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MMXfSf032576; Tue, 22 Jul 2025 22:33:41 GMT (envelope-from git) Date: Tue, 22 Jul 2025 22:33:41 GMT Message-Id: <202507222233.56MMXfSf032576@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 2662fd6a487b - main - fusefs: report that all tests require the fusefs kernel module List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 2662fd6a487bb505cf1667e4cc3436b36f7e9d4e Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=2662fd6a487bb505cf1667e4cc3436b36f7e9d4e commit 2662fd6a487bb505cf1667e4cc3436b36f7e9d4e Author: Alan Somers AuthorDate: 2025-07-22 16:35:03 +0000 Commit: Alan Somers CommitDate: 2025-07-22 22:32:39 +0000 fusefs: report that all tests require the fusefs kernel module Previously the googletest tests would skip themselves if /dev/fuse could not be found. But that information would not be passed to Kyua. Instead it would think that they had passed. Also, the atf-sh test would previously fail if the fusefs module weren't loaded. Now both tests will correctly report their requirements to Kyua. Note that fusefs's googletest tests still require that the mac_bsdextended(4) module _not_ be loaded, but Kyua has no way to report such a requirement. MFC after: 2 weeks Sponsored by: ConnectWise Reviewed by: Siva Mahadevan Pull Request: https://github.com/freebsd/freebsd-src/pull/1782 --- tests/sys/fs/fusefs/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile index b11f11bdfa98..a21512798597 100644 --- a/tests/sys/fs/fusefs/Makefile +++ b/tests/sys/fs/fusefs/Makefile @@ -70,7 +70,8 @@ TEST_METADATA.nfs+= required_user="root" TEST_METADATA.ctl+= is_exclusive="true" TEST_METADATA.ctl+= required_user="root" -TEST_METADATA+= timeout=10 +TEST_METADATA+= timeout=10 +TEST_METADATA+= required_kmods="fusefs" FUSEFS= ${SRCTOP}/sys/fs/fuse # Suppress warnings that GCC generates for the libc++ and gtest headers. From nobody Tue Jul 22 22:56:48 2025 X-Original-To: dev-commits-src-all@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 4bmt1Y1ggRz628wt; Tue, 22 Jul 2025 22:56: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmt1Y0kKdz43P0; Tue, 22 Jul 2025 22:56:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753225009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ekdYNDsdADiGwJTR2MlAKUbxsB2d2OQY1OPbxuUiwJ0=; b=s1It1A6siu8TWPbFsPGH9gtXlEDzug192tLWr/m7gUkQWSAtQxSqoSR/tDm0OGZdg0PlBe MTUlE7L9d8Jx3wkwM4pX9P6WhZ1T7hmPU+fpAd70RJ5xlM9Zi7Obt0sBEcQ2ikP4JX20ey V9YLjADdJ+d0No8qIrT8T8uamENma+oOvgb5UhHnZTnFUpfS9Kc43IqyjBqGVF7+SJneZA gv4qZqx9MJyQJhKNTzZjmr7v/ePhkw/QrxEXjprcJKJa4NYqolz2hk/XNGDvBZKey+zwh+ p9e/sNnSrUyT5AKxUlwpckFW35VT469K+GuNEqBMJ8rJe9rUuuV5V2CdRs6mvw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753225009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ekdYNDsdADiGwJTR2MlAKUbxsB2d2OQY1OPbxuUiwJ0=; b=LIbve63uR40kgwjMHKcGbM1ciRMTuwB0slE3X9/vw16vwuxBsMax5TDbHilggd5T51wQD7 y+lXpy5oVKbM2iuT/tuelykW5Q7xetD68FPR4g3+xc/Ezs5eXQNJWdnuPszFMRt0WI9ENT usPyPEnM2zNV39M+D9Btahhj98Ud4fkxuiBRznOhu3eD9LMwiFLXfbcfqNgLc0Q71m9PjR sg9eZPzcHGclmq5ldSulhNeOw4v7A3IqsYygGumU0XzXEnswre+tIRU3DIDYl5EDScdB1O Eaxw/yy6TKUAS2+LiaCIZuCWnefZnuTZXziFTujf8SXekqgD7+vCrIOaN4cRAw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753225009; a=rsa-sha256; cv=none; b=EjEI2q5GkANcvYuNzk827MgOreyx93H3/uJr/d/Mp6UR5YkviEjhQGq32Sfikoj5EizzVd 3S+QTi1QLaHLPkT2Gic9iek6O93qiAN8pfeSh1Ou/VTMYmdJB6WIj1/KpgqZqhqrkER0o1 t1BZWpuOlqibr/wT3vazZ4eMujBZtLkAdk4lO74gGqn1HndslH4eXdvs3iBICVpm/3zqSD VxsAUh2JEoAVKx1wBQ6HDbFprioD9LYlibQCeO9+om6orCCy5UuT5SO/GtWhaxS7yEZeTL o2TqWlZ4Yi59btmLMSP5RuZeFTYwTgl4Uj0ufN9VYrxijV8tBdcR/YFHTsQ7iw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmt1Y0H7nzn69; Tue, 22 Jul 2025 22:56:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56MMumqV071160; Tue, 22 Jul 2025 22:56:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56MMumKY071157; Tue, 22 Jul 2025 22:56:48 GMT (envelope-from git) Date: Tue, 22 Jul 2025 22:56:48 GMT Message-Id: <202507222256.56MMumKY071157@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: d3c9f62862e4 - main - ctl: delete dead code in the tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: d3c9f62862e4e76acec581a2e2c0aa05d7145e24 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=d3c9f62862e4e76acec581a2e2c0aa05d7145e24 commit d3c9f62862e4e76acec581a2e2c0aa05d7145e24 Author: Alan Somers AuthorDate: 2025-07-22 22:55:40 +0000 Commit: Alan Somers CommitDate: 2025-07-22 22:55:40 +0000 ctl: delete dead code in the tests This function has always been dead. It isn't needed, since ctladm will automatically load the module, if needed. MFC after: 2 weeks Sponsored by: ConnectWise --- tests/sys/cam/ctl/ctl.subr | 9 --------- 1 file changed, 9 deletions(-) diff --git a/tests/sys/cam/ctl/ctl.subr b/tests/sys/cam/ctl/ctl.subr index 5da441b806f0..6cc02d774bdb 100644 --- a/tests/sys/cam/ctl/ctl.subr +++ b/tests/sys/cam/ctl/ctl.subr @@ -25,15 +25,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. -load_modules() { - if ! kldstat -q -m ctl; then - kldload ctl || atf_skip "could not load ctl kernel mod" - fi - if ! ctladm port -o on -p 0; then - atf_skip "could not enable the camsim frontend" - fi -} - find_device() { LUN=$1 From nobody Wed Jul 23 00:10:55 2025 X-Original-To: dev-commits-src-all@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 4bmvg40skWz62DVW; Wed, 23 Jul 2025 00:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmvg342Ygz44wZ; Wed, 23 Jul 2025 00:10:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753229455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rLQ+iC+g803lamct6s28E4QVf9f0+yxToTobeAytftM=; b=Sw+FT0mboflH8HIfw5uRc58iTs3UTP9c5E1oMKp2AtpatRyB62U50ZWvrhhGcJUcGykVC+ wXHkcmetmoFuK6eZyHiZT+Z4gpUOYBLw6OFPgKfsi9dybRi6VySUutt6MJYCO9GXFCEdWW Pxi7qLFbwyM3nSNitYi3NEBgSYoKSqeJKQlaVBLUppheUoO0kVNrcYKFkFoskGtqWx3mW8 AQKMWGBphDAmgULZkndTJpT2cjxU4UqlICFT43Ry4rnVVsCyaZojsoTi0MVRs1raF+LWVi 13oJQbtn4Xu0PJOI25uwAuMT1K1C8P4CYHSYLmPsm1nhqtwgeh+NfMIc5ub/Uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753229455; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rLQ+iC+g803lamct6s28E4QVf9f0+yxToTobeAytftM=; b=qU2MF/AwEUI6BYbBUDC5bw0YiHdj1J8s+vGj1QtQgn1lMyxznLneSAZYqHqKDE/ihChYhK 35zcoOsyhmouvM6pdvFc/waEnzRXeRqr1kAynUPYHr6Mm+OzENdpzmRS3p4ZbUFuzZIMkB KRokE5zXKca0QUZUfJuGMMe9iZXCmVVCw4qoaMkapnHMIBL98ETOXvu/niO80WGIoHNpCZ 2kMq4AvB8H26QsG4g/PUj382Tzno57K4AfCeTw341YndC67PnEYr2Bs5SR1mvCtmGmhexD xbYNxLIXnandn1OXPPI4hxvF8oCPvz1n2lwp3HHe5QXSSyHuG08cjyeDvJxhtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753229455; a=rsa-sha256; cv=none; b=bViYTxW4ci067Bq88rDOnhiGgjlsNEEPdTikJeqfLxc1EB5Pgme0OAWOqXoM49nwAsTHnA vLn1yvW/GO0hk0TOg50PwpRKjRRNo4XQS3Dfb0snJ7aHJqOMPBx6vnjYVsYphQiVZpjptf cfbJgVVrH6e8WGHJz8YkAbN+I9faubVdTzw4fQzfrslNYpKIKt6XHLVeMTkJhS7uB33Xj8 SpijT3OGRUTajBi9+Jog2yU7nO8+l39ZyKyPUqAVRypOI9IP5CcNptuuxj9//2kYQwWj+z 2h+GlLY1vmd7zpDvQcPJLkzBgBlLdH3gW9fJMI0UTviGt9spvILNypA4V+aI0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmvg33cKMzqCW; Wed, 23 Jul 2025 00:10:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56N0Atu9016029; Wed, 23 Jul 2025 00:10:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56N0At69016026; Wed, 23 Jul 2025 00:10:55 GMT (envelope-from git) Date: Wed, 23 Jul 2025 00:10:55 GMT Message-Id: <202507230010.56N0At69016026@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 15925062e1ba - main - biosboot: Detect memory disks from PXE List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 15925062e1ba75cb4908a68655b797870187ea57 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=15925062e1ba75cb4908a68655b797870187ea57 commit 15925062e1ba75cb4908a68655b797870187ea57 Author: Richard Russo AuthorDate: 2025-07-23 00:08:31 +0000 Commit: Warner Losh CommitDate: 2025-07-23 00:10:25 +0000 biosboot: Detect memory disks from PXE Walk through the disk driver entries chained off of INT13. MEMDISK is part of the Syslinux project; it loads disk images into memory, sets an int 13h hook and then does a BIOS boot from the image; this can be used as part of a PXE boot environment to load installer disks, however the disks are not accessible from inside the FreeBSD kernel because it doesn't access disks through BIOS APIs. This patch detects the disk images in the loader, and passes their address and length as a driver hint. When the md driver sees the hint, it maps the image, and presents it to the system. (rebased and reworked from https://reviews.freebsd.org/D27349) Feedback from: kib, bapt, olce Differential Revision: https://reviews.freebsd.org/D45404 --- stand/i386/libi386/Makefile | 1 + stand/i386/libi386/biosmemdisk.c | 140 +++++++++++++++++++++++++++++++++++++++ stand/i386/libi386/libi386.h | 2 + stand/i386/loader/main.c | 3 + sys/dev/md/md.c | 23 +++++++ 5 files changed, 169 insertions(+) diff --git a/stand/i386/libi386/Makefile b/stand/i386/libi386/Makefile index 038557c6a826..7205d3a61988 100644 --- a/stand/i386/libi386/Makefile +++ b/stand/i386/libi386/Makefile @@ -7,6 +7,7 @@ SRCS+= bio.c SRCS+= biosacpi.c SRCS+= biosdisk.c SRCS+= biosmem.c +SRCS+= biosmemdisk.c SRCS+= biospci.c SRCS+= biospnp.c SRCS+= biossmap.c diff --git a/stand/i386/libi386/biosmemdisk.c b/stand/i386/libi386/biosmemdisk.c new file mode 100644 index 000000000000..208ae289950a --- /dev/null +++ b/stand/i386/libi386/biosmemdisk.c @@ -0,0 +1,140 @@ +/*- + * Copyright (c) 2020 Richard Russo + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * Source of information: https://repo.or.cz/syslinux.git + * + * Implements the MEMDISK protocol from syslinux, found in doc/memdisk.txt + * (search MEMDISK info structure). Since we validate the pointer to the mBFT, a + * minimum version of 3.85 is needed. Note: All this could be done in the + * kernel, since we don't have hooks to use this inside the boot loader. The + * details of these structures can be found in memdisk/memdisk.inc (search + * for mBFT). + * + * The kernel could just grab the mBFT table, but instead relies on us finding + * it and setting the right env variables. + */ +#include +#include +#include +#include +#include "libi386.h" + +#include "platform/acfreebsd.h" +#include "acconfig.h" +#define ACPI_SYSTEM_XFACE +#include "actypes.h" +#include "actbl.h" + +struct memdisk_info { + uint32_t mdi_13h_hook_ptr; /* not included in mdi_length! */ + uint16_t mdi_length; + uint8_t mdi_minor; + uint8_t mdi_major; + uint32_t mdi_disk_ptr; + uint32_t mdi_disk_sectors; + uint32_t mdi_far_ptr_cmdline; + uint32_t mdi_old_int13h; + uint32_t mdi_old_int15h; + uint16_t mdi_dos_mem_before; + uint8_t mdi_boot_loader_id; + uint8_t mdi_sector_size; /* Code below assumes this is last */ +} __attribute__((packed)); + +struct safe_13h_hook { + char sh_jmp[3]; + char sh_id[8]; + char sh_vendor[8]; + uint16_t sh_next_offset; + uint16_t sh_next_segment; + uint32_t sh_flags; + uint32_t sh_mbft; +} __attribute__((packed)); + +/* + * Maximum length of INT 13 entries we'll chase. Real disks are on this list, + * potentially, so we may have to look through them to find the memdisk. + */ +#define MEMDISK_MAX 32 + +/* + * Scan for MEMDISK virtual block devices + */ +void +biosmemdisk_detect(void) +{ + char line[80], scratch[80]; + int hook = 0, count = 0, sector_size; + uint16_t segment, offset; + struct safe_13h_hook *probe; + ACPI_TABLE_HEADER *mbft; + uint8_t *cp, sum; + struct memdisk_info *mdi; + + /* + * Walk through the int13 handler linked list, looking for possible + * MEMDISKs. + * + * The max is arbitrary to ensure termination. + */ + offset = *(uint16_t *)PTOV(0x13 * 4); + segment = *(uint16_t *)PTOV(0x13 * 4 + 2); + while (hook < MEMDISK_MAX && !(segment == 0 && offset == 0)) { + /* + * Walk the linked list, making sure each node has the right + * signature and only looking at MEMDISK nodes. + */ + probe = (struct safe_13h_hook *)PTOV(segment * 16 + offset); + if (memcmp(probe->sh_id, "$INT13SF", sizeof(probe->sh_id)) != 0) { + printf("Found int 13h unsafe hook at %p (%x:%x)\n", + probe, segment, offset); + break; + } + if (memcmp(probe->sh_vendor, "MEMDISK ", sizeof(probe->sh_vendor)) != 0) + goto end_of_loop; + + /* + * If it is a memdisk, make sure the mBFT signature is correct + * and its checksum is right. + */ + mbft = (ACPI_TABLE_HEADER *)PTOV(probe->sh_mbft); + if (memcmp(mbft->Signature, "mBFT", sizeof(mbft->Signature)) != 0) + goto end_of_loop; + sum = 0; + cp = (uint8_t *)mbft; + for (int idx = 0; idx < mbft->Length; ++idx) + sum += *(cp + idx); + if (sum != 0) + goto end_of_loop; + + /* + * The memdisk info follows the ACPI_TABLE_HEADER in the mBFT + * section. If the sector size is present and non-zero use it + * otherwise assume 512. + */ + mdi = (struct memdisk_info *)PTOV(probe->sh_mbft + sizeof(*mbft)); + sector_size = 512; + if (mdi->mdi_length + sizeof(mdi->mdi_13h_hook_ptr) >= sizeof(*mdi) && + mdi->mdi_sector_size != 0) + sector_size = 1 << mdi->mdi_sector_size; + + printf("memdisk %d.%d disk at %#x (%d sectors = %d bytes)\n", + mdi->mdi_major, mdi->mdi_minor, mdi->mdi_disk_ptr, + mdi->mdi_disk_sectors, mdi->mdi_disk_sectors * sector_size); + + snprintf(line, sizeof(line), "hint.md.%d.physaddr", count); + snprintf(scratch, sizeof(scratch), "0x%08x", mdi->mdi_disk_ptr); + setenv(line, scratch, 1); + snprintf(line, sizeof(line), "hint.md.%d.len", count); + snprintf(scratch, sizeof(scratch), "%d", mdi->mdi_disk_sectors * sector_size); + setenv(line, scratch, 1); + count++; +end_of_loop: + hook++; + offset = probe->sh_next_offset; + segment = probe->sh_next_segment; + } +} diff --git a/stand/i386/libi386/libi386.h b/stand/i386/libi386/libi386.h index d456ef58d7c2..caf565dd0656 100644 --- a/stand/i386/libi386/libi386.h +++ b/stand/i386/libi386/libi386.h @@ -149,3 +149,5 @@ int bi_load64(char *args, vm_offset_t *modulep, vm_offset_t *kernend, int add_smap); void pxe_enable(void *pxeinfo); + +void biosmemdisk_detect(void); diff --git a/stand/i386/loader/main.c b/stand/i386/loader/main.c index a7dfb2dde762..fd95cf5243cf 100644 --- a/stand/i386/loader/main.c +++ b/stand/i386/loader/main.c @@ -251,6 +251,9 @@ main(void) initial_bootinfo->bi_extmem = bios_extmem / 1024; } + /* detect MEMDISK virtual disks */ + biosmemdisk_detect(); + /* detect SMBIOS for future reference */ smbios_detect(NULL); diff --git a/sys/dev/md/md.c b/sys/dev/md/md.c index 29dc0c880e3a..ec1664fac701 100644 --- a/sys/dev/md/md.c +++ b/sys/dev/md/md.c @@ -89,6 +89,8 @@ #include #include #include +#include +#include #include #include @@ -2082,8 +2084,10 @@ g_md_init(struct g_class *mp __unused) { caddr_t mod; u_char *ptr, *name, *type; + u_char scratch[40]; unsigned len; int i; + vm_offset_t paddr; /* figure out log2(NINDIR) */ for (i = NINDIR, nshift = -1; i; nshift++) @@ -2123,6 +2127,25 @@ g_md_init(struct g_class *mp __unused) sx_xunlock(&md_sx); } } + + /* + * Load up to 32 pre-loaded disks + */ + for (int i = 0; i < 32; i++) { + if (resource_long_value("md", i, "physaddr", + (long *) &paddr) != 0 || + resource_int_value("md", i, "len", &len) != 0) + break; + ptr = (char *)pmap_map(NULL, paddr, paddr + len, VM_PROT_READ); + if (ptr != NULL && len != 0) { + sprintf(scratch, "preload%d 0x%016jx", i, + (uintmax_t)paddr); + sx_xlock(&md_sx); + md_preloaded(ptr, len, scratch); + sx_xunlock(&md_sx); + } + } + status_dev = make_dev(&mdctl_cdevsw, INT_MAX, UID_ROOT, GID_WHEEL, 0600, MDCTL_NAME); g_topology_lock(); From nobody Wed Jul 23 03:04:29 2025 X-Original-To: dev-commits-src-all@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 4bmzWK4QgHz62PRD; Wed, 23 Jul 2025 03:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmzWK1zkZz49Z8; Wed, 23 Jul 2025 03:04:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753239869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xyVULRUUjk7+8DCFZ1cRMDxr00uhmJJTj+90TB3ceuA=; b=v4mGBlw+my1arA1mJuuLyQOVeYKDZbpH+XzukUGL+L8O08BZmGb87DsoDtAi54Vb1oboM7 WLpBXJ7j1mwbDZjZM7zXn0+lhYVcuwsN/UjKyKHpbfzUHlHRCKmn25Qog4LM8+0ZLBBIv+ ZnXxvdSOJ5wJtsSiScWmuzak/B+0JdW1cKdKR4/RQqeFaK7rwpbkUSYKOQnzOOqouAPNaw SidpLAUEcDKAZf+MdKF8eEE83uSOcq/mU6UCCx3FgRlfzd02vtmTISta0wDW/EpzYCqVKA C6x57+DBY5OcAwXyM6XdgZ0Aswb4V8wkwFPGqC4Xb/CvGDMJEYTy1h6atfiNpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753239869; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xyVULRUUjk7+8DCFZ1cRMDxr00uhmJJTj+90TB3ceuA=; b=NRrbcOU5wuTeV8kGPUmAAAlCaeZ5bHc+gw0tWnfMyhDaQT6acT3MNmj4VRMg9HNgo1HIrA X/Y0xK8IiHdu9HmVFCoD69m6Qn0nUF1w+BY7iPuyL99H5gRlFet/GV9wc6rpmdKysbAiS8 QTJavwTedTvGwXSBdW/ax7Gw5igtACKMhRhNihQ3W1fpTEMIRbpiAf3XnwOJ9vrJ0itYXm RJFRIbNLG4nGagwd3Xvba6sprqEiYJljzXfP8S4+vQe+Ar2KtTXADcbHeXIZNznK4fIKRZ ZRJ2lBq04fg0cQu5DMB9mKoOPiAun4kc3c3snoueqfor4FOlLDNiQtv4qBvEHQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753239869; a=rsa-sha256; cv=none; b=sbc4N6MKUt9tztZrk0swS2SMybaKUDf+MBPSSLdPFc+qdAwBJ9xS9QsJJk4MVEj0F+v37b y/ZzSlTXkCdLvHWFIJI7IEIEyf1380mf3ymo7m8NsxXXyqhC8Cx6DWy5fg+PEDajn14dug /B0WqZWw61x72xs7iP5ppl1LoGPDIcWETDgo97mv6hjRQANVnNibgygTdpE6nHpdFLWxLd S6z88WzosHp9agLIIv279p/P4vJ2Wcc1TukB6YnM+oATu6no1Way0wcIVVDQDki4m3Wu9H U3LngPcdidldzcl4r7CGip9FZh7Az+4I14j5/XhIyjWj3cLt79Cxu+NEpJCwRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bmzWK1KkVzvXh; Wed, 23 Jul 2025 03:04:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56N34TKL044090; Wed, 23 Jul 2025 03:04:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56N34TrT044087; Wed, 23 Jul 2025 03:04:29 GMT (envelope-from git) Date: Wed, 23 Jul 2025 03:04:29 GMT Message-Id: <202507230304.56N34TrT044087@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: a1df3755a5fa - stable/14 - mlx5en: fix TLS Rx hardware offload initialization List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: a1df3755a5fa544d05410bbac0e7b06fcb284df8 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=a1df3755a5fa544d05410bbac0e7b06fcb284df8 commit a1df3755a5fa544d05410bbac0e7b06fcb284df8 Author: Ariel Ehrenberg AuthorDate: 2025-07-03 08:57:40 +0000 Commit: Konstantin Belousov CommitDate: 2025-07-23 03:00:21 +0000 mlx5en: fix TLS Rx hardware offload initialization (cherry picked from commit d6d66936c45e99ec284554292181d26b6a5558d3) --- sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls_rx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls_rx.c b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls_rx.c index f584e5228657..9598884a611c 100644 --- a/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls_rx.c +++ b/sys/dev/mlx5/mlx5_en/mlx5_en_hw_tls_rx.c @@ -638,7 +638,8 @@ mlx5e_tls_rx_set_params(void *ctx, struct inpcb *inp, const struct tls_session_p return (EINVAL); MLX5_SET64(sw_tls_rx_cntx, ctx, param.initial_record_number, tls_sn_he); - MLX5_SET(sw_tls_rx_cntx, ctx, param.resync_tcp_sn, tcp_sn_he); + MLX5_SET(sw_tls_rx_cntx, ctx, param.resync_tcp_sn, 0); + MLX5_SET(sw_tls_rx_cntx, ctx, progress.next_record_tcp_sn, tcp_sn_he); return (0); } From nobody Wed Jul 23 03:24:08 2025 X-Original-To: dev-commits-src-all@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 4bmzyM3ZSVz62QKF; Wed, 23 Jul 2025 03:24:27 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4bmzyL6Dzfz4LqJ; Wed, 23 Jul 2025 03:24:26 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 56N3O8fl063916; Wed, 23 Jul 2025 06:24:11 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 56N3O8fl063916 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 56N3O8M3063915; Wed, 23 Jul 2025 06:24:08 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Wed, 23 Jul 2025 06:24:08 +0300 From: Konstantin Belousov To: Cy Schubert Cc: Jessica Clarke , Cy Schubert , "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Subject: Re: git: c7da9fb90b0b - main - KRB5: Enable MIT KRB5 by default Message-ID: References: <202507211410.56LEAD6J066633@gitrepo.freebsd.org> <47C3CC37-6F32-4376-900A-B5387B9817D5@freebsd.org> <20250721144645.3BA391BE@slippy.cwsent.com> <20250722155941.AC7EB121@slippy.cwsent.com> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250722155941.AC7EB121@slippy.cwsent.com> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Rspamd-Queue-Id: 4bmzyL6Dzfz4LqJ 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:6939, ipnet:2001:470::/32, country:US] On Tue, Jul 22, 2025 at 08:59:41AM -0700, Cy Schubert wrote: > In message , Konstantin Belousov writes: > > On Mon, Jul 21, 2025 at 07:46:45AM -0700, Cy Schubert wrote: > > > In message <47C3CC37-6F32-4376-900A-B5387B9817D5@freebsd.org>, Jessica > > > Clarke w > > > rites: > > > > On 21 Jul 2025, at 15:10, Cy Schubert wrote: > > > > >=20 > > > > > The branch main has been updated by cy: > > > > >=20 > > > > > URL: = > > > > https://cgit.FreeBSD.org/src/commit/?id=3Dc7da9fb90b0b6385e99bb7747476359 > > b= > > > > 712993fa > > > > >=20 > > > > > commit c7da9fb90b0b6385e99bb7747476359b712993fa > > > > > Author: Cy Schubert > > > > > AuthorDate: 2025-07-19 14:11:18 +0000 > > > > > Commit: Cy Schubert > > > > > CommitDate: 2025-07-21 14:07:22 +0000 > > > > >=20 > > > > > KRB5: Enable MIT KRB5 by default > > > > >=20 > > > > > Set WITH_MITKRB5=3Dyes as the default. > > > > >=20 > > > > > Rebuild all USES=3Dgssapi ports is recommended. > > > > >=20 > > > > > A clean buildworld is required. > > > > > > > > That=E2=80=99s going to be quite annoying and cause a lot of issues = > > > > given > > > > WITH_CLEAN is now the default. Can we do something in depend-cleanup.sh > > > > to delete everything from the obj tree that needs to be rebuilt if we > > > > detect the wrong kerberos implementation was previously built? > > > > > > All binaries that depend on any kerberos libraries must be rebuilt. > > > WITHOUT_CLEAN will fail at various spots. Meta mode should take care of > > > this for us. > > Does the statement mean that ABI for the base libraries was broken? > > If yes, and the new libs have the same name as the old, we must bump > > dso versions. > > Three new libs have the same names. Most don't. The three with the same > names are libkrb5, libgssapi_krb5 and libcom_err. I see that you added versioning to the krb libs. This is great, but the libs with the same name as heimdal still need dso bump. > > libgssapi_krb5 is a merge of the Heimdal libgssapi_* files. For example, > there is no libgssapi_spnego in MIT. > > The libcom_err contains the same but updated MIT functions. > > libkrb5 removes Heimdal-only functions. > > There is no libasn1 nor libroken in MIT. > > The differences are outlined at https://k5wiki.kerberos.org/wiki/Samba%27s_u > se_of_Heimdal_symbols,_with_MIT_differences. > > > -- > Cheers, > Cy Schubert > FreeBSD UNIX: Web: https://FreeBSD.org > NTP: Web: https://nwtime.org > > e**(i*pi)+1=0 > From nobody Wed Jul 23 06:22:12 2025 X-Original-To: dev-commits-src-all@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 4bn3vS4v4fz5q0W4; Wed, 23 Jul 2025 06:22: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bn3vS3Tf3z3tmV; Wed, 23 Jul 2025 06:22:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753251732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OID1lg1nC37qzUGlhmlTcJMSFlkgRNH3DcuEVh0jXu0=; b=l8n4b7vpzSukftXUriYBvHRvnTnqq+l7Tuvdd5YzoE8h8uOY47Ev9czY2p5w5kdn05Rsjq F5UykSlBn0Fdtp1MfHmakV3q/Dz0ZWUfr5JWrQ+z9bO7uY6DXyWe+GtZozH2xBUH9c/K2Q e8MbWWxe5aYrt92ZTkhHSnRpLiMU+TgtVLkCs7rNwe9ONQkWDFW0r/gGvs5I51q2bJ1oyv dPKKFA5XOo1vrFt3PN0Hec0Bpjz88keMxKZrz43wuSl8qGIGdaIaoEZqs2vLXLk9JybS5A CUen6je1M+7j20ms59EZcPlEMxPo0pSGlFiwYWUp57Xkh0QWpBHD4ewhDgLUaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753251732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OID1lg1nC37qzUGlhmlTcJMSFlkgRNH3DcuEVh0jXu0=; b=WvMyz375qQK7qrlD2Kn45S7/oXT5/w/dtQY6QG7mhO6XdLHAEc+CtOPe7FH+25oGrf1Uzh i+wrLrYkwS4hR4VACv49H5FCxxt+1Gr7pb1U0oBAde7Dp2RjdFkQqPECbDLcHAhIe4Apae 63hK3SUO4x0EtQSEqZr78HQwcVjuOscml+E/DtzxTI7hyIZNK15/zkqC7y1a06U84ji3vR Eg4dSPTBnXwr7N0JO72berbtly/R4c06ln5HZg7UIeTFDnWTG4CXumDx20JW+f5PyffqcJ O1Ub1oke8NEJ10TzxnzALa3Dpk4Ri1rmrEFo3PMniQO7ITcK/HENSZZmBU1sGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753251732; a=rsa-sha256; cv=none; b=wH+NFrT9fDD9CnuzUuvPAXycfBsTtnrjUDFaGtNw4SDkgBJWoEZdClBfAwCFsodNgOGnI3 pk6bt8bfC+wzTwj++0cIsrip1LjrHY7QZjaL+LvnOyUD7ND2uX/yoRsmcKXLdpxcsSZgIF O7uaWkhqLTCsvDal5SBE9xkDhBBa3JtIar7yUPWziLHx/PsAAKWEDEojjLnkr3Wrnfiy9D GTxeH6dKMIOaqGKjZqxJZnbfJJ/NBvLwVHOySMgDCPs1prlS8ARdxIXsEBjWGMvzctGTry sn/R0u0RVfRbKb2mqsHW7vLzcb0tdyGi8AKtmxLwdM1KJl6BuJ9J/VXrW3h13A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bn3vS2rvbz11N8; Wed, 23 Jul 2025 06:22:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56N6MCgN020448; Wed, 23 Jul 2025 06:22:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56N6MCIO020445; Wed, 23 Jul 2025 06:22:12 GMT (envelope-from git) Date: Wed, 23 Jul 2025 06:22:12 GMT Message-Id: <202507230622.56N6MCIO020445@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: f4e7cb535b9c - main - gvirstor: in virstor_ctl_remove() the copy length of the second bcopy might be wrong. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: f4e7cb535b9cb1ddd608b382f29d8123931d5212 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=f4e7cb535b9cb1ddd608b382f29d8123931d5212 commit f4e7cb535b9cb1ddd608b382f29d8123931d5212 Author: Wuyang Chung AuthorDate: 2025-07-12 16:09:36 +0000 Commit: Warner Losh CommitDate: 2025-07-23 06:03:48 +0000 gvirstor: in virstor_ctl_remove() the copy length of the second bcopy might be wrong. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1763 --- sys/geom/virstor/g_virstor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/geom/virstor/g_virstor.c b/sys/geom/virstor/g_virstor.c index b8cf32875660..73bd9f73055a 100644 --- a/sys/geom/virstor/g_virstor.c +++ b/sys/geom/virstor/g_virstor.c @@ -589,7 +589,7 @@ virstor_ctl_remove(struct gctl_req *req, struct g_class *cp) M_GVIRSTOR, M_WAITOK | M_ZERO); bcopy(sc->components, newcomp, found * sizeof(*sc->components)); bcopy(&sc->components[found + 1], newcomp + found, - found * sizeof(*sc->components)); + (sc->n_components - (found + 1)) * sizeof(*sc->components)); if ((sc->components[j].flags & VIRSTOR_PROVIDER_ALLOCATED) != 0) { LOG_MSG(LVL_ERROR, "Allocated provider %s cannot be " "removed from %s", From nobody Wed Jul 23 06:22:07 2025 X-Original-To: dev-commits-src-all@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 4bn3vN1Zhdz5q11b; Wed, 23 Jul 2025 06:22: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bn3vM74jHz3tbP; Wed, 23 Jul 2025 06:22:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753251728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DDKrphTNDNiLqUO8eozrMTmlPXGr2guyY7yiMM/bLk0=; b=C1ldJ1/BJhy/2Zz4iIIBZdyFFLCUzAJDls8XyjK494kqAXCsEIFd9MXtt6I+K1wTBoKyL7 c6mcbH+PxcR5kCPVk93kgMIy2lC6aRfCOuBrpLqrNQzs8ni6DD5YpWXBgzOSaJb/CJro2m g/RCzml4+6Eb4bNaiSqwqJVH5Yqmx5vduv9W4p+QDQCK7caO5ORBG4fblZwj/ThV51YMYz rjP2B6RvQ/7OlANCj4f3pUKzODWttIc0EMUvr7AGK/CS109exputJomWpBRGuxNzt1x2T8 8SdqZwAwj5ok4RxQqtCEoO1kWlhRJrLGJ4tvYsDG87EtW5JvABimksCLPb82dw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753251728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DDKrphTNDNiLqUO8eozrMTmlPXGr2guyY7yiMM/bLk0=; b=qTA5MmO1lV8VYCfAkxpW+bc5V4gVEeIM81LFu27sCudqvDxFrTp6WJTfcjrBhn9rB5byEd VKevArQ2HD0HtbB0sQDh0IeK5JztKLgE7wK6d4OYj6CQsipTifVQVq5pgNGz/niyaawsD8 eIeB5JlWYn1lwJOAd8SBzr+QVz+UwqLVMMQCFk4/bYc5AxkA4sMomoG53X3c0gErjWLfKr SR9FBC+MP4CHHuhWdQ1iOk9EL0fEhnpCBnQwbqpxdFuX8PnJMZ/GVlT+uwSCLHDTX7yM++ 50+vWKqYAycQkAi5U5YfFyKRjXw0UqpZGGJQLirWqENFPZrgkLTe4q/8/MPzfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753251728; a=rsa-sha256; cv=none; b=T7zU/hwVeMzJc5TfJVXeUTRm6NV2hEVtUVnguWQLH20dcQBTxxF8cJ/cmiGsxz5t6fZtM4 N6yKLrZHUzYrUKUv0J3I7fS0CTTvC1KChNHJB36b9Y/NvJMKZiGqo4TvUgSi+krhDFY4wH P53+/a4kOreQYN7Ts8/crjALG0XmwGwyWcqR3w2rza2VtR3IwQN5PZoxMkoFeOs+vBpd2c erpZKNOpOY4SioOtwFjzhJRGQriO2lOs5LXdPwlsBu645Ur7TCKdtlFBDtvlHmOfbvd8lu +DbJrOgsRIhjqVmQgK+cOg4PcPP69KNi2hYapa+OUd1sYliybp12mxtagOiYCA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bn3vM6dKTz11f6; Wed, 23 Jul 2025 06:22:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56N6M7B5020311; Wed, 23 Jul 2025 06:22:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56N6M7lE020308; Wed, 23 Jul 2025 06:22:07 GMT (envelope-from git) Date: Wed, 23 Jul 2025 06:22:07 GMT Message-Id: <202507230622.56N6M7lE020308@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: c599948cca4b - main - devd: accept new clients before notifying them List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: c599948cca4b860cedc7b2a2b60c0ce81f9b1bd0 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=c599948cca4b860cedc7b2a2b60c0ce81f9b1bd0 commit c599948cca4b860cedc7b2a2b60c0ce81f9b1bd0 Author: Sludge AuthorDate: 2025-07-17 05:36:20 +0000 Commit: Warner Losh CommitDate: 2025-07-23 05:57:31 +0000 devd: accept new clients before notifying them Signed-off-by: Sludge! Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1771 --- sbin/devd/devd.cc | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc index 6705dcc0158e..1ff405244cde 100644 --- a/sbin/devd/devd.cc +++ b/sbin/devd/devd.cc @@ -1111,6 +1111,14 @@ event_loop(void) err(1, "select"); } else if (rv == 0) check_clients(); + /* + * Aside from the socket type, both sockets use the same + * protocol, so we can process clients the same way. + */ + if (FD_ISSET(stream_fd, &fds)) + new_client(stream_fd, SOCK_STREAM); + if (FD_ISSET(seqpacket_fd, &fds)) + new_client(seqpacket_fd, SOCK_SEQPACKET); if (FD_ISSET(fd, &fds)) { rv = read(fd, buffer, sizeof(buffer) - 1); if (rv > 0) { @@ -1139,14 +1147,6 @@ event_loop(void) break; } } - if (FD_ISSET(stream_fd, &fds)) - new_client(stream_fd, SOCK_STREAM); - /* - * Aside from the socket type, both sockets use the same - * protocol, so we can process clients the same way. - */ - if (FD_ISSET(seqpacket_fd, &fds)) - new_client(seqpacket_fd, SOCK_SEQPACKET); } cfg.remove_pidfile(); close(seqpacket_fd); From nobody Wed Jul 23 06:22:10 2025 X-Original-To: dev-commits-src-all@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 4bn3vQ4195z5q0x2; Wed, 23 Jul 2025 06:22: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bn3vQ1qm8z3trp; Wed, 23 Jul 2025 06:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753251730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9i0HpN+VCLT9Q9s46u+ealtjpz38lrNpyGg5N/J2VDQ=; b=a6cK76EAOH3EfJ3FO02yTAghdMf95L6sh7+HLKewpYnQdTDBL8qrg7SRhcOwJYe+VpHa0V acplu9Ifxk3xAE+reG0grVy+k2+iogYqxcjKS16IULBs1UapAQu2zMrphXSV1iZoNfODCx jCnCjqJMCZPik5rCKiiH3l/kTwUG4arfd2+1QMGhMO0mKUIZ+zJXTcV7wdTuhw1sFk6W35 czc3cifBxpzs0f+qC+52RWZj1LXKp2/AQSHlKCdIkKx5Kx0Ss+lMWzA6EE8a5VGSM1FGGz b2/WMf0Y9eT2UF+0XHQi2ZQ05WzHXhSGxYev29C34BrNIUffnOZyTzxazbu21Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753251730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9i0HpN+VCLT9Q9s46u+ealtjpz38lrNpyGg5N/J2VDQ=; b=qx9ERZpLI/hqCEN4ow4PMPma4Qs9WW8moMpHCh+ujiY8pv71QkZbmKq9GMXbHKIXkUYsKH E25HYmEVZFVE+XqQ0bFJ/M0n3xL4Fazkp5uK81CCa5A4ptI7IT8pPfq2xiDKXgO1Y9j9fX jNRnm97KBaObUfDVGn6te6dimv2qrjZ6ZAWgOpuCjpAzR2hGITtV0kPVFVs8ZQcA6GEGUN O0p34bQDgF9JhgLjuX/MvmHkooU+fEPXR/vZPI66oV1e21Ldv1GFg16mSPuH4DgNQLAwX0 f6jZ9P8NjI2I29Iv9AI7HDspikeMHmMHV+g0vMwn6WyIHT0VFDP8Lk4Umlvd8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753251730; a=rsa-sha256; cv=none; b=jPypUwbFkJ8oz1x46HC6Og/ySYlEoJlVUrlmdnx9ZiYo1mFHcVzKq+3QCai01td0I4Wvnn 34ZnM6aoYUF9iF9rEJx8ml6JrG53BEqfh4QUB+bPWVh+p3hMvnL9uDId1HzLWTVXvWK8aG fAC/Igx1IULWTiZAwIz1c2qkKR/56n3Qg5yB6hIaYmNbREKYpvU0nAMeI2YRJylYyxpP/r N3iwwphZ84ywOV27UeeihFqwCOE+i4TeefcgBTi47YeA6Mn6K7IFYFwUB9dwH3MiIRGp3F oi6wVAdcU/SjwQMfBOqF1IBgDIIwVzHwBYfM75+5MIwjwtl0TX1yLZG4yOR1iQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bn3vQ1QMXz11N6; Wed, 23 Jul 2025 06:22:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56N6MAgB020379; Wed, 23 Jul 2025 06:22:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56N6MAWu020376; Wed, 23 Jul 2025 06:22:10 GMT (envelope-from git) Date: Wed, 23 Jul 2025 06:22:10 GMT Message-Id: <202507230622.56N6MAWu020376@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 3e0cf576487e - main - getfmac.8: add missing cross-references List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 3e0cf576487ee9514d237bd67006181af6ef551f Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=3e0cf576487ee9514d237bd67006181af6ef551f commit 3e0cf576487ee9514d237bd67006181af6ef551f Author: Quentin Thébault AuthorDate: 2025-07-16 11:09:51 +0000 Commit: Warner Losh CommitDate: 2025-07-23 06:02:11 +0000 getfmac.8: add missing cross-references Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1769 --- usr.sbin/getfmac/getfmac.8 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/getfmac/getfmac.8 b/usr.sbin/getfmac/getfmac.8 index eb930e0044f9..6176bfa09271 100644 --- a/usr.sbin/getfmac/getfmac.8 +++ b/usr.sbin/getfmac/getfmac.8 @@ -51,5 +51,8 @@ specified files. .Xr mac 3 , .Xr mac_get_file 3 , .Xr mac 4 , +.Xr maclabel 7 , +.Xr getpmac 8 , .Xr setfmac 8 , +.Xr setpmac 8 , .Xr mac 9 From nobody Wed Jul 23 06:22:08 2025 X-Original-To: dev-commits-src-all@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 4bn3vP3m8bz5q0dC; Wed, 23 Jul 2025 06:22: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bn3vP0rh2z3tQY; Wed, 23 Jul 2025 06:22:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753251729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lFJhlm4LjbHd2w52IiZdNkAXMiGp6jq+gtOsLHnSxD4=; b=oRjE0ePiZT6VS1rgp4fEp4q3Y5QbNRyQbZHMkALwB3baYepMo9IaXBI6I+2CCp434GMq2g AFos5aa5pPNklIzclkpgRr1IlMS8YSNdHXGDNinFSRYt/ca7UPqT5gXayVkpovs+MsKlvQ UD5ryq0CAy/kIxjgsRFFpSq9/OY67Fa1WRCgu1bqcN/3fRp6qKp3ykn4UVpQNjGXZ4xebr yeKSVOMiEYxack3i4euLNy+JG2+zYUZTD0f3A6dvifb/8lT5t0BgDPhgTcGtpGZj9RIQ/l V1fIdQe8hd+hV9DybtdRwR9CILSmJTNDc+9uclM3e2FE5Dz6iAaPNfIsZkZCzg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753251729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lFJhlm4LjbHd2w52IiZdNkAXMiGp6jq+gtOsLHnSxD4=; b=KjdiJvF+QDin0NHgpOb9mYcpRHX5UkFlcL7QSHlgPs3wKoqBAFKAw8MS+sLe0vUc27B+Gc VTDZ70v8U/CaD/dDzMtAa+NMgQ81JdpWwXgeosRZnh7qTlT5WoD/jOIJZpXcSIUrRmgMYN cOv5DRYjjrB5ujgx78cUw9xRwLqeWzKrzjrZyHuOG23qCmJpzwkHIdlEcJeTralvZYec7M B0CS6Zki9MPlLz4afhF5zcaHg9EUCUhZDibkA58wa5QKQyaqAPHQhE/HxZWFvMMYGS4qLA iKsy8q22Td4rfiKaj93g3q5qJc9i3+BUbFdlTYgYb+J7sgOz/52OD+kzjHF6UA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753251729; a=rsa-sha256; cv=none; b=ar8CwcXblgc9ZkWaV5ax5S5BxjWRWqk5y6bHKe2ZQ38fVS6KgVYdxgTsgncFyUcFpm7pdp RzjDZCx2aqUHi/0+psdw6N9JrouxeaingTERLEijToMHGKwcfuQSvmoAWcEgNlCNWAZkGi IhxU3ZybpgWng6LLO8gAlK2UvdtmNTYRcOrIcGzPtm61nAXpxTxGOcp7wnq2OEejSu+F/3 xQ+XseiFAezCEdUuYPoIrDXhWqR/4FHWN6zJFtr0Nnd00S3a1HnBh9v3ThNaTESZmpRRQ+ Vui7HIDNQ5quFTu9Br/b6Kb1UnLfBM85JArX4H93JNB4O14wSPRcTfcTJjyW7Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bn3vP0Rtxz11N5; Wed, 23 Jul 2025 06:22:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56N6M8VT020346; Wed, 23 Jul 2025 06:22:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56N6M8JV020343; Wed, 23 Jul 2025 06:22:08 GMT (envelope-from git) Date: Wed, 23 Jul 2025 06:22:08 GMT Message-Id: <202507230622.56N6M8JV020343@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: b9210d1241ea - main - gconcat: Return EINVAL when the metadata is invalid for an added disk. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: b9210d1241ead536d27785ef2a034b8567b26b10 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=b9210d1241ead536d27785ef2a034b8567b26b10 commit b9210d1241ead536d27785ef2a034b8567b26b10 Author: Wuyang Chung AuthorDate: 2025-07-18 09:04:22 +0000 Commit: Warner Losh CommitDate: 2025-07-23 05:58:44 +0000 gconcat: Return EINVAL when the metadata is invalid for an added disk. We don't use the disk and stop using it right afterwards. The user should get an error indication, just like they would if there had been a disk read error. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1775 --- sys/geom/concat/g_concat.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/geom/concat/g_concat.c b/sys/geom/concat/g_concat.c index 2b1cb575cac8..2173a84c7acf 100644 --- a/sys/geom/concat/g_concat.c +++ b/sys/geom/concat/g_concat.c @@ -590,6 +590,7 @@ g_concat_add_disk(struct g_concat_softc *sc, struct g_provider *pp, u_int no) strcmp(md.md_name, sc->sc_name) != 0 || md.md_id != sc->sc_id) { G_CONCAT_DEBUG(0, "Metadata on %s changed.", pp->name); + error = EINVAL; goto fail; } From nobody Wed Jul 23 06:33:14 2025 X-Original-To: dev-commits-src-all@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 4bn48B3WXvz5q1Fm; Wed, 23 Jul 2025 06:33: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bn48B1ZQ5z44L2; Wed, 23 Jul 2025 06:33:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753252394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z/H10q1yxKyRz0BXsKRbBJjhmI13LcpE2LA1VSgyQoQ=; b=PZKmk8rrGIoITaWUg/K9p3FSvKXHY8jY1bZ1YXpZ7B4/pwfIyrmS3tGxnEfrYs9X6LYUct DJQgSdrMEKv5BUSDhBZ7AW68y/OTg1tSZxtIx251hY+4haQf+uUSqTyK+grkEsm6vFsKKO lPcacnWhCBmS4XT5i6bunqzBgl6b6b9z/hCx8Rq7HQgLvB90BYXHhhqYeCunJgL2FJX4D0 uIHBqlUKkzIH+8rc5lv7vkLrtiG0TOycifyDIldM0oIHt4f6jogk9/FR2c8C8ZR2bLiS8k N2BF0MOC+dFxQ/U6B/AJ0RX/WkuuqCOSNJmz3VKiFHoyZJucLUTBX7ueqSGFqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753252394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z/H10q1yxKyRz0BXsKRbBJjhmI13LcpE2LA1VSgyQoQ=; b=NnRVNDY3yI/AFTxTxRei7sVBdV9M5Adtanz4tywFoBW3ZmASVa/y9+bpsb993J+DSrFzk8 CmQ4xvtPg3t1y+gJveVuuEddpEsRJjIeCPJM20x09Zxib/+GM37v2KlYzi/s19yVZgT0Gz 5uhXapMg1y4n1NtH80n2Mm4V+uMC5EO9YjmziK1J5lJl5n6cZsMHJ092JkJHsFHaWWs4gA mexOllM2A8gMoY+cNr42+C6Uh3++5Bgq4DnVidyzre7jAe2TD2F3G/CmuOYyg8lpH/V2Z1 W/an+DMQu1sGYqyAkMH8NteC1E4UXU+ggLal6hU11L4lYd3mhUFDIzAAsXTr0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753252394; a=rsa-sha256; cv=none; b=JYUwiy5EmL09UHoAi8STP1Fke3hMAwCu1ohsAwoigNaNzdVcgGU0vDLjyHwSUiRewsJx/M 2q2YpLa5jHMm+lUdcXJ0hEyG2c2ytPk/IDYYHUIrSVxdmfYzVuN4UlZT1TIri5GsRhw3Zb 0/dCukgEYz4rz38tyLcaN1/zRf96MWUN5QrQhmgIlUYsok5Dxy1yfPxT/t0DQKR8YxMTa5 ix29fbR9oWdBg4YrTUXUywukxpB2Pje+57sVlW3LyMghkW/IPiGOOEN6XOP/ame70T7MLt YhCJQYVzW54vOynXYh0hjrKNG6iFlfTYVG5AwukQbfUtZzQEBZ7DTir1y6739g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bn48B179wz11dF; Wed, 23 Jul 2025 06:33:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56N6XEKW039488; Wed, 23 Jul 2025 06:33:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56N6XENg039485; Wed, 23 Jul 2025 06:33:14 GMT (envelope-from git) Date: Wed, 23 Jul 2025 06:33:14 GMT Message-Id: <202507230633.56N6XENg039485@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 87c326e41e1b - main - libsa: isprint() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 87c326e41e1b3163ffd5542e3dfc9f4a05db1e44 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=87c326e41e1b3163ffd5542e3dfc9f4a05db1e44 commit 87c326e41e1b3163ffd5542e3dfc9f4a05db1e44 Author: kpowkitty AuthorDate: 2025-06-26 23:19:06 +0000 Commit: Warner Losh CommitDate: 2025-07-23 06:32:40 +0000 libsa: isprint() libsa is missing isprint(). Adding it with the other isfoo() functions. Remove a stray copy from fdt too. Signed-off-by: Kayla Powell (AKA Kat) Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1740 --- stand/fdt/fdt_loader_cmd.c | 7 ------- stand/libsa/stand.h | 5 +++++ 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/stand/fdt/fdt_loader_cmd.c b/stand/fdt/fdt_loader_cmd.c index 226812a5d2a6..161c2435c410 100644 --- a/stand/fdt/fdt_loader_cmd.c +++ b/stand/fdt/fdt_loader_cmd.c @@ -1240,13 +1240,6 @@ fdt_cmd_ls(int argc, char *argv[]) return (CMD_OK); } -static __inline int -isprint(int c) -{ - - return (c >= ' ' && c <= 0x7e); -} - static int fdt_isprint(const void *data, int len, int *count) { diff --git a/stand/libsa/stand.h b/stand/libsa/stand.h index 8b7d93074ef2..0e99d8778fa6 100644 --- a/stand/libsa/stand.h +++ b/stand/libsa/stand.h @@ -275,6 +275,11 @@ static __inline int ispunct(int c) (c >= '[' && c <= '`') || (c >= '{' && c <= '~'); } +static __inline int isprint(int c) +{ + return (c >= ' ') && (c <= '~'); +} + static __inline int toupper(int c) { return islower(c) ? c - 'a' + 'A' : c; From nobody Wed Jul 23 13:16:55 2025 X-Original-To: dev-commits-src-all@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 4bnF600Tlqz62KXF; Wed, 23 Jul 2025 13:16: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnF5z6Svhz3M1T; Wed, 23 Jul 2025 13:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753276615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PzqATk3lRsPNhIvIDXzk4MoA7YPJQ0he8cBfwSHv5zE=; b=V0GsRP8X/DtkAh3r4HmIzzCXhUby8IvW8oAGwWwwMm/714b3HgUGiDq7Z6FV9z+aXm7Arf rlB+1+QIQ+Y7YVpBVOqCDGyLR4n4zUB2yL0f1Bb6SeJamz1t8yupXQ6/4Kn8koNrHq0Ofi sK8UIOm/Lau8GPWrZgzdWeuH76a0sHi9uYBUgxjZQHf5JWZBDOcGKAZjwySJBMQ5J7eryF CExNxQEtdf4V8T/DVciQ4+hW6xdMt0mgKPHfQFr94TzlaNX5TGevGBzie/mhiamX5MG3JH OwYjMCgluUHwUDnvWeqhQtnq7MdS9qgUs2Ld/nhSco6LFbTt5ey6l0PE55AaHw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753276615; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PzqATk3lRsPNhIvIDXzk4MoA7YPJQ0he8cBfwSHv5zE=; b=UUsdtf74qkW7cauoDUk1WoOVTwyRGqGoLB1WWOJxALFs/9E+Gxy50NgGryDzLNaZEDJWW2 WRyPE6znL5zey2hG+D6cBhQ+RgBoiHXFFDeycetifLFmOQmMqjIWAPDKpQnylI0Pl0f/d0 pEZIgVQKCSO1DwUK3Wo4zkOqcWG7tFyhJhL0JR7H+uZZ3Wuh9ZxKaOQZWNA6X/PgxPqUle R1IWw+NJJAGBSYLEqbteyM3MfOVlBRLOBNFLRVM9OExcGZh3UC+lV9EofqE9ImzEW8VNd+ SuY+fYAtxkB25XjKfK1isICYj56PZ528+UOD+ByGolK2f+0W8BqPt/Wwl/IFZg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753276615; a=rsa-sha256; cv=none; b=DX7U+vdrQWVarjNWYfl6rZTreb6TkTs89ZGIVkv7q9jQjmWmOWA+/rvEpvqxNC5zGQDoAb /OInuxbtB758jGcg9PlyWf11o5IKcl3cc84OX8t2dffGq3WkxjgdA00UvvswQSPqlrA++z tJM5yj7hDLMibhW8qhZrXknLG2sxiRYt6jjDUdYszKAsaxalLN6vGSzmkzPM/RG/WjJklR SUEJNAifCA7BB1w10evEMmKuetPVnHakRVGXrTS2lXLVwmQRrtV92cVbOFpL7OXseDWx/b oV/p5DI45tK8qzuZnC7ssv151eA5bl6G2RAOJ2lY7GcBHuG3PE3WuC3rDKnxeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnF5z5FzSzBf; Wed, 23 Jul 2025 13:16:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NDGte6000457; Wed, 23 Jul 2025 13:16:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NDGt7R000454; Wed, 23 Jul 2025 13:16:55 GMT (envelope-from git) Date: Wed, 23 Jul 2025 13:16:55 GMT Message-Id: <202507231316.56NDGt7R000454@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 799e21d544c1 - main - libpfctl: fix reporting of flush address count List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 799e21d544c18a29f6f2e3f854f6455dd477d997 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=799e21d544c18a29f6f2e3f854f6455dd477d997 commit 799e21d544c18a29f6f2e3f854f6455dd477d997 Author: Kristof Provost AuthorDate: 2025-07-23 09:42:57 +0000 Commit: Kristof Provost CommitDate: 2025-07-23 11:56:11 +0000 libpfctl: fix reporting of flush address count The PFNL_CMD_CLR_ADDRS command returns a PF_T_NBR_DELETED, not a PF_TS_NZEO. Handle this correctly. While here add a test case to verify we return the expected counts when adding or flushing addresses to/from a table. PR: 288353 Sponsored by: Rubicon Communications, LLC ("Netgate") --- lib/libpfctl/libpfctl.c | 7 ++++++- tests/sys/netpfil/pf/table.sh | 29 +++++++++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) diff --git a/lib/libpfctl/libpfctl.c b/lib/libpfctl/libpfctl.c index e4123fe02211..d8e60075e103 100644 --- a/lib/libpfctl/libpfctl.c +++ b/lib/libpfctl/libpfctl.c @@ -3348,6 +3348,11 @@ pfctl_clear_tstats(struct pfctl_handle *h, const struct pfr_table *filter, return (e.error); } +static struct snl_attr_parser ap_clr_addrs[] = { + { .type = PF_T_NBR_DELETED, .off = 0, .cb = snl_attr_get_uint64 }, +}; +SNL_DECLARE_PARSER(clr_addrs_parser, struct genlmsghdr, snl_f_p_empty, ap_clr_addrs); + int pfctl_clear_addrs(struct pfctl_handle *h, const struct pfr_table *filter, int *ndel, int flags) @@ -3380,7 +3385,7 @@ pfctl_clear_addrs(struct pfctl_handle *h, const struct pfr_table *filter, return (ENXIO); while ((hdr = snl_read_reply_multi(&h->ss, seq_id, &e)) != NULL) { - if (!snl_parse_nlmsg(&h->ss, hdr, &tstats_clr_parser, &del)) + if (!snl_parse_nlmsg(&h->ss, hdr, &clr_addrs_parser, &del)) continue; if (ndel) *ndel = (uint32_t)del; diff --git a/tests/sys/netpfil/pf/table.sh b/tests/sys/netpfil/pf/table.sh index 78320375db7c..5e5fccdaca20 100644 --- a/tests/sys/netpfil/pf/table.sh +++ b/tests/sys/netpfil/pf/table.sh @@ -582,6 +582,34 @@ anchor_cleanup() pft_cleanup } +atf_test_case "flush" "cleanup" +flush_head() +{ + atf_set descr 'Test flushing addresses from tables' + atf_set require.user root +} + +flush_body() +{ + pft_init + + vnet_mkjail alcatraz + + atf_check -s exit:0 -e match:"1/1 addresses added." \ + jexec alcatraz pfctl -t foo -T add 1.2.3.4 + atf_check -s exit:0 -o match:" 1.2.3.4" \ + jexec alcatraz pfctl -t foo -T show + atf_check -s exit:0 -e match:"1 addresses deleted." \ + jexec alcatraz pfctl -t foo -T flush + atf_check -s exit:0 -o not-match:"1.2.3.4" \ + jexec alcatraz pfctl -t foo -T show +} + +flush_cleanup() +{ + pft_cleanup +} + atf_init_test_cases() { atf_add_test_case "v4_counters" @@ -596,4 +624,5 @@ atf_init_test_cases() atf_add_test_case "pr259689" atf_add_test_case "precreate" atf_add_test_case "anchor" + atf_add_test_case "flush" } From nobody Wed Jul 23 14:00:39 2025 X-Original-To: dev-commits-src-all@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 4bnG4d0vmtz62MYD; Wed, 23 Jul 2025 14:00:49 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnG4c2s8rz3cfC; Wed, 23 Jul 2025 14:00:48 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753279248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bYOoi4BQ2SMc5FWLaw+yT4GMTk7nByujgeEBh79y5SE=; b=cH1FJfgquAIEoHtshEY32lL/K4+9drTjgzN2Kn+iinl5SGtRQI7uBDsVLXUrQZRPFOTdaf i9hfIcOV0hRbJnir+uET3TDskNlXiWp05OqmAh03/sghaN/hc6OlpU8poeGaBdN/9Cgp25 fNum5mf6VLfsBWPFlbcVtnsMVCMhjhWFJ21YIqHfwh0d7lWejpQft/M6sYmDaOLgnmqHSd ZPsSEwbu+mRy0cAKYP9TzXhzAxSHFu7gz0/7pVxVrv/W2p2INXK0emV8eRhcWrlsZfjQYJ rFN2Ox63g9eygS2jw5ejvhaVUPgImV6EHo6pKja/Hq7s3xSRRlTm4TTJgPCiCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753279248; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=bYOoi4BQ2SMc5FWLaw+yT4GMTk7nByujgeEBh79y5SE=; b=k17RFVgnXeD5PQ385gfFOf4OZ/Ekl6GmdU3OVaBWDG7bMP86/e276zIL51irx2vZ8kaV25 4c4Bl3cQXQTFEQ5C7Mb/okRU8s7US/h16qry3yEGGcSu8KB9HXvH3Y08Ar5pNYTGeAy6Vs VUSWTmgbbU2vl9r+UcJb1EPrELrnyaqQ1fMnxKaHc8TGF/gvkpMiWr83PlVwzgsJdYaVGG 5U4T35vWHNEa7dG6rS7MawIHHkxeBA5H9xmEc9cVK5p6nzo+dp7z1S4ZviHmzn6EC6RXG8 N0D2RtmYG/eRwn8UZnsBJaO28N/X560LUD3ZRaDRIyg33SLEhvmhZFabsT5e0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753279248; a=rsa-sha256; cv=none; b=APefi1+uD1Nj2QqEc5tWRPNnaxEGa9cgUTvtFcgtZHYmP2B3Z7kY+Pe9WMN2OdWaosADNr pFe7A+UzkJYF92q3w+WlW1QG5h6/CL1bboN+vUY/4wX9vZUkEGW4FsLjyIIwlXSuq4e3fu nWA7FeBerZYhnEx4XeXWBrIclreCH06qWdR22Y4NfvHM4sV34Xh7yp8DVlF37smyzitJ48 krMefp2tIjimDxaJDyvmGQ7chFPDsLGzHXWice6YTQ5MasnhOgld4MYsRQw02CV9pTfnMM 5l0ixsECKcvrQiJCLVtAOh8uqop+0JjS9WVXAmgxIdsW0K3/ULnHS9iC6Rho3g== Received: from [IPV6:2a05:b400:110:12fe::7e] (user-12fe-7e.svr-vpn-1.vpn.cl.cam.ac.uk [IPv6:2a05:b400:110:12fe::7e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4bnG4b3FLMzGF6; Wed, 23 Jul 2025 14:00:47 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <7d7427f3-16c2-4948-ab28-56eec1677e13@FreeBSD.org> Date: Wed, 23 Jul 2025 10:00:39 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: ae07a5805b19 - main - krb5: Add version maps Content-Language: en-US To: Cy Schubert , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202507221548.56MFmoo2060272@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <202507221548.56MFmoo2060272@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/22/25 11:48, Cy Schubert wrote: > The branch main has been updated by cy: > > URL: https://cgit.FreeBSD.org/src/commit/?id=ae07a5805b1906f29e786f415d67bef334557bd3 > > commit ae07a5805b1906f29e786f415d67bef334557bd3 > Author: Cy Schubert > AuthorDate: 2025-07-22 15:38:19 +0000 > Commit: Cy Schubert > CommitDate: 2025-07-22 15:48:40 +0000 > > krb5: Add version maps > > Shared objects must have version maps. These were copied from upstream's > *.exports files. > > Reminded by: kib > Fixes: ee3960cba106 Hmmm, does this match the version files built by upstream's build? They seem to use a different pattern for the version numbers in their build glue and include a trailing HIDDEN annotation. binutils.versions: $(SHLIB_EXPORT_FILE) Makefile base=`echo "$(LIBBASE)" | sed -e 's/-/_/'`; \ echo > binutils.versions "$${base}_$(LIBMAJOR)_MIT {" sed >> binutils.versions < $(SHLIB_EXPORT_FILE) "s/$$/;/" echo >> binutils.versions "};" echo >> binutils.versions "HIDDEN { local: __*; _rest*; _save*; *; };" (SHLIB_EXPORT_FILE is the foo.exports file) Upstream only uses those for Linux but the binutils versions file is the right format to use with both ld.bfd and lld. I also wonder if it would be better to use similar logic to generate these files at build time? We have some other version maps we generate as build artifacts rather than checking into the tree IIRC. -- John Baldwin From nobody Wed Jul 23 14:23:44 2025 X-Original-To: dev-commits-src-all@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 4bnGb55sKCz62P52; Wed, 23 Jul 2025 14:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnGb51C7sz3pYJ; Wed, 23 Jul 2025 14:23:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tGqnqt0L0Mo+kpd6jca8kUAdL4BTOKtuJRu5qYv2sIQ=; b=aWDMnCelNJL4W7JA0vdlWTLeWN1F0r1lXW2VxmQ08iyVRLKYqSobda/jg68dyRY77Su+Cv /jK0EytZcYBPwe57p4jGmI9f8XV+RxP28gBz4zAn9GXYIt6nVMqdP0D1WSS8FdUs2u++9K yZrsLHWBm1/PSoaFiteW3fgYvRfNa9JqaJOe5zOpKdIEiUrM8jwuswXkoxEpOhMdJxoEQu HNLWBVzEhm9KRuB0bB/K4OL+1Sv/wAnUXoBHlKLmNROlXzEKAkxPAZBLEdEA+tCpX5Fx05 xISBGyp3CW+gbT6PW7XF6BHh2wWj+Vf0w4zbE3DTGhyxfMXZm50GWYnaylUooQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280625; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tGqnqt0L0Mo+kpd6jca8kUAdL4BTOKtuJRu5qYv2sIQ=; b=FGwDh/r+vsTKG5tqAdV8M6SwWU6Nf+JNWcxm2AZmc5Bd69APTOlFqFYKi7110TvJScEm2K UGrlf6H7WHPMZ9S12wLETmfKdSepQmJCN5bT6Xyq0pMu5K8zK6nGxUTaW4Pg51dwOvZNxT b2xFNVdIRLAnUjcfw+F1c1shhZIHpO/1OaDT81UQ9E/qI9EmtYEzFrsfRUe1HUVnBcISOR gmylA/HOE6kTr/qiLhjkvwxcX5FQwNXPYJzWR2V0zyxSq5Oo8l+a5nGxxpTDVkBwGKimbb nyMVrUngfVgI240NHnEDXcYpqP1AeeJrWr83GEdw/dN+0rYCw6lYjqdTej5IAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753280625; a=rsa-sha256; cv=none; b=hje/T/9E66l97wcSYVfnUcqYp0nLTbAA4p+6J7x5tNaiTSZ8eyHg3x081CkQ+dT+NF6mOm dmF/x+LdLERIkbHcclAFVRO14ld5AXp1O6UKJIqs/cxVUTBWyT/tE1t7/gA4jRbmSQkCS6 lpqTUBWtSMweyW20am7AKhKQ/NCfUlDrw+VD2Dn9HoCOyQZmR5UcTB3s05+EG/0PlV0ezN Fd1m6XPKQ+IYUN/DiaTiFjdXkhORbUPAnroNDVuOBkTOYUsq8el0XLEPN3cIj8yWDqUgY+ Osi9jer5014PJa0Fn8qoVgJz+Yj9TDsFBW1BcNDwQxycN3u85FFSkgnO9UHwVg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnGb50BBYz2FT; Wed, 23 Jul 2025 14:23:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NENiJb031077; Wed, 23 Jul 2025 14:23:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NENiIm031073; Wed, 23 Jul 2025 14:23:44 GMT (envelope-from git) Date: Wed, 23 Jul 2025 14:23:44 GMT Message-Id: <202507231423.56NENiIm031073@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 15fa3e7ec77e - main - pf: move IPv4 packet length check up List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 15fa3e7ec77e113de793ad23caa35dcbf6770c9d Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=15fa3e7ec77e113de793ad23caa35dcbf6770c9d commit 15fa3e7ec77e113de793ad23caa35dcbf6770c9d Author: Kristof Provost AuthorDate: 2025-07-15 14:40:21 +0000 Commit: Kristof Provost CommitDate: 2025-07-23 13:35:43 +0000 pf: move IPv4 packet length check up Perform this check ("Do we have enough data for the IP length?") so it happens before normalisation. Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 009f7e4d78b1..9517e9b8c9bc 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -10090,6 +10090,13 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, return (-1); } + h = mtod(pd->m, struct ip *); + if (pd->m->m_pkthdr.len < ntohs(h->ip_len)) { + *action = PF_DROP; + REASON_SET(reason, PFRES_SHORT); + return (-1); + } + if (pf_normalize_ip(reason, pd) != PF_PASS) { /* We do IP header normalization and packet reassembly here */ *m0 = pd->m; @@ -10097,13 +10104,7 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, return (-1); } *m0 = pd->m; - h = mtod(pd->m, struct ip *); - if (pd->m->m_pkthdr.len < ntohs(h->ip_len)) { - *action = PF_DROP; - REASON_SET(reason, PFRES_SHORT); - return (-1); - } if (pf_walk_header(pd, h, reason) != PF_PASS) { *action = PF_DROP; From nobody Wed Jul 23 14:23:46 2025 X-Original-To: dev-commits-src-all@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 4bnGb64v28z62P77; Wed, 23 Jul 2025 14:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnGb61Fvjz3pW4; Wed, 23 Jul 2025 14:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nwKFVNTVrRFBzbjP3EFB5gCf6lW2fudzDSWc5XfXO2c=; b=C7Xoqp3HM485QXjTw8T03iIDF6v+xY106aWVEgnYI0wmC6+AnLLDNb4N6dk+vZA3kMeVd2 CMdFCLM7gFHFIFUvm6UB1dYy4n7jh8ASunWwXiBp+zE/ozOnXWVW0SSFcl7p7D/LSFme6C T/P6+bkAdl1ULGRKJ0XPO5Op+4eWUX80eQg7rS9nyqVkeMnsrwVl/QHQQr6fuKn7IJ62z/ MRBhuzQAAyr0xwYx5eSSNYcY8bo45SRgL6N8nj4gIvuhxnOu6HpMWLpwniY1yJnWhIeL7B RyyM0jjAomEvRpN7meI+s1T3ciBMl7l/Lu20XN2cRNoJv7EW08AjbKCaRmXAfA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280626; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nwKFVNTVrRFBzbjP3EFB5gCf6lW2fudzDSWc5XfXO2c=; b=JACBMNHFBQC8KtaTi5cLvY9TgrlGLfEN/SgxC2AsdLkfOTBWDYvjDSbxyQtUyg9u8cgsh/ ora/tpsv9FtnN3fuayUgi2WbjhIxKI7Q2ro42WrFAAzSL2Rr8CwX5FcFja1F4S/D8tVite d54Gatu8PkiXdGfXziGFXJT/Z5HpVTZfJHPSMuTDX0cIo757SImc1geA3xijbDAhFK7AD6 qzDu+x8Flwdl6rNHlbR2liO9lJmSETnEalw6i3o56labsOoVnuXMtssWwoaSEgp8SE5ePA y8ZYEZjQ5Bg3SbGWWVCj25SbFyi8rWFGT9qTFOeCfrAEf6pmt4PUvrsDY0aYUQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753280626; a=rsa-sha256; cv=none; b=AMU/OxV5jrng0IhYCucjr4hZTM/yZsrqtkHnqZfrpxD//Z3hEVnmLZ/z1DZzzIZUNDzroN xUR9XlKaZnkdUv1P+J0VUkAStccPD//nHKZl2yIOPvDLkYolC9fjWaBoAf1oLXlxubY+dZ 6uIwUxvk9meq4H5KGUocG93YqQEYuRNFk9CAje6rvEehKzHhT2aguXEHrbTLzBFKyCNgKC EKB156t+Jhoj0oLAE73MvrJHRayC6v/qgcB0U4zHjXa9ItHH0zZCK8tT+5+6A0eNSoITMx Euvceq5gF9GSNHGTFi8VSCkR+JcAw/MSV2DZoqDd1bb1qZ7nlyGDtMzYBOC4Tg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnGb60sGSz1Lw; Wed, 23 Jul 2025 14:23:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NENkdd031114; Wed, 23 Jul 2025 14:23:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NENknb031111; Wed, 23 Jul 2025 14:23:46 GMT (envelope-from git) Date: Wed, 23 Jul 2025 14:23:46 GMT Message-Id: <202507231423.56NENknb031111@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 986abfeb9358 - main - pf: run Jumbogram check before we walk the headers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 986abfeb9358011af892f177c102dd3249196e02 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=986abfeb9358011af892f177c102dd3249196e02 commit 986abfeb9358011af892f177c102dd3249196e02 Author: Kristof Provost AuthorDate: 2025-07-16 11:58:42 +0000 Commit: Kristof Provost CommitDate: 2025-07-23 13:35:43 +0000 pf: run Jumbogram check before we walk the headers While it is safe to run pf_walk_header6() on a packet with a 0 ip6_plen we're better off doing this check first. It's more obviously correct, and it's a very simple check to reject a packet. Suggested by: emaste Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 9517e9b8c9bc..1310445c4063 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -10149,6 +10149,15 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, return (-1); } + /* + * we do not support jumbogram. if we keep going, zero ip6_plen + * will do something bad, so drop the packet for now. + */ + if (htons(h->ip6_plen) == 0) { + *action = PF_DROP; + return (-1); + } + if (pf_walk_header6(pd, h, reason) != PF_PASS) { *action = PF_DROP; return (-1); @@ -10168,15 +10177,6 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, pd->virtual_proto = (pd->fragoff != 0) ? PF_VPROTO_FRAGMENT : pd->proto; - /* - * we do not support jumbogram. if we keep going, zero ip6_plen - * will do something bad, so drop the packet for now. - */ - if (htons(h->ip6_plen) == 0) { - *action = PF_DROP; - return (-1); - } - /* We do IP header normalization and packet reassembly here */ if (pf_normalize_ip6(pd->fragoff, reason, pd) != PF_PASS) { From nobody Wed Jul 23 14:23:47 2025 X-Original-To: dev-commits-src-all@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 4bnGb74xR0z62NmD; Wed, 23 Jul 2025 14:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnGb72Nrlz3pYb; Wed, 23 Jul 2025 14:23:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1qCmWkxqF3rslbe/yakoSQ9QClMHP1BMlndR0FQX0Ec=; b=TNdFtSTCnHTrYOeWxR+64bbbUcbqzowCmc1aFYW1O2ancCFI+HUJu6YAAnoWHELfLqMsha h0XUeL0x8/l8o2L9jahS9Pei2Ytpy7/kXkNo4Ouj52eGtCh3OpHLZFAupGm6mDv9mHccT/ KA+/nD3GkD1hCgbz+oNx0UDkTLbCgO3mze2MhT5jGKFGWJyDndFy8NKeCUFpaQd5t1FZQm 3TmljMqM2UVck6TXUZkkcVZ3Xj8cBy/F7jCyRtvfPijLtiO2G+xPP5i56w7m/H1pVd2Wa/ d/z75qDdkgnTdw28vKBvgwKQ/ShaaXcKpLAVvckSCcZaZJFf82rVPPDEmHaZIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280627; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1qCmWkxqF3rslbe/yakoSQ9QClMHP1BMlndR0FQX0Ec=; b=jzH/GZ40GMh/WGf01Z16zXwrV7aYZh91P6obs0e6cvdLuFkiIKVGN4bphKeZRWOKVl9SBZ vPx6Lt7Jqy30W87a+wZEO9CsMv28fWKg088ZzpFxof15DfuO2Lj3y53EdT2AL5u0K3wTe6 wQg/n4HSl0hof6BMrN1gjWOhrTeSZZLqygx/IopQfJzcH+JtP7UO7RuWi4Ye2i84swET2w IYf5+Yu+fjCb3ZGYmjcNXBIz1XJbRVdHyLKSk/5UDE3mksxfrN3JT3ZOsQZE6k1nrmJizw canfvbCYyh0nfgM116FhIl8JN2cRJAgVHTIZ4Na7X/MZSuf3A6PHvlsxkRGjrg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753280627; a=rsa-sha256; cv=none; b=RkoGQ6CHnc+ILF7Q2iuO24pHv2O6MSZadvBbpxnKi1jywKAV7d5NFufbFVGJF7lC8Xm8Cx rxi6dK2s5NxX9WfTo2oERvfCNDACWCLHaETUC8tI+v5qAKcyV3c4SIhnsB4tRRC+3ysgnJ 6ohdOhPrlr0eeeH7SwqmlwbGbRvL31pNzcz6z8A4Rwj3KS0fbvNl+ZhZqnxbf5HL8mydtR mTrhh2WfNO/HvMf5pEnehgff2GpKzRDKJ30lSvLoYjuIl7baqU6ZyJLlpRV23UdQsfMwya 2wMXbRNwsfmS1GYWzJdFO8G9UtqJsnqDR4uYYYN+855TvAnqmEFXLbv7PY2VnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnGb71qrxz1nX; Wed, 23 Jul 2025 14:23:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NENlgB031147; Wed, 23 Jul 2025 14:23:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NENlUa031144; Wed, 23 Jul 2025 14:23:47 GMT (envelope-from git) Date: Wed, 23 Jul 2025 14:23:47 GMT Message-Id: <202507231423.56NENlUa031144@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 92155f8bbef0 - main - pf tests: don't set interface on scapy's sr1() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 92155f8bbef0528a519aaf91e3721c591d12d266 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=92155f8bbef0528a519aaf91e3721c591d12d266 commit 92155f8bbef0528a519aaf91e3721c591d12d266 Author: Kristof Provost AuthorDate: 2025-07-16 16:01:19 +0000 Commit: Kristof Provost CommitDate: 2025-07-23 13:35:44 +0000 pf tests: don't set interface on scapy's sr1() That's not supported: > /usr/local/lib/python3.11/site-packages/scapy/sendrecv.py:726: SyntaxWarning: 'iface' has no effect on L3 I/O sr1(). Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/icmp.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/sys/netpfil/pf/icmp.py b/tests/sys/netpfil/pf/icmp.py index 59f2e8190b30..2f40259f5665 100644 --- a/tests/sys/netpfil/pf/icmp.py +++ b/tests/sys/netpfil/pf/icmp.py @@ -136,8 +136,7 @@ class TestICMP(VnetTestTemplate): / sp.ICMP(type='echo-request') \ / sp.raw(bytes.fromhex('f0') * payload_size) - p = sp.sr1(packet, iface=self.vnet.iface_alias_map["if1"].name, - timeout=3) + p = sp.sr1(packet, timeout=3) p.show() ip = p.getlayer(sp.IP) From nobody Wed Jul 23 14:23:49 2025 X-Original-To: dev-commits-src-all@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 4bnGbB0X2Fz62NqJ; Wed, 23 Jul 2025 14:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnGb94WTfz3pTk; Wed, 23 Jul 2025 14:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UTcsggEzehT1oLPSpDV8N96adJW7qfNggSWaCfQJ+D0=; b=J/Gs2ahcI9VrLH9nlKT/Ce8q7m+3jr81oXIK2nJSTWqIjOYtWw6IZILLHOMFwdRLrzrkrU qRceNNFmI6j7eWgDBlvEq3S2KkdjF+AwWqwQkFt+DVn+HIFhjn5jtNvgRnbmPAQm4jO4Ss Jk9ehAvIDG2OyRJ+Ter0/abfL+iX3F8InoIVZpg9keB8W1CRmd6EzKxW7HU7kmi7DoJXF+ XCdQJyoO4lLZrEMicu2nL9HMYH/5S2x6TJdjrU+rF5I3af8IFay2T0n/E4AjJGnNml8/PK 6NuMrjIygH9nQ0uQBl6p6NNCR9UKKJKpEr7/Jb/r6dITperwufTy2s8bxjMW1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280629; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UTcsggEzehT1oLPSpDV8N96adJW7qfNggSWaCfQJ+D0=; b=lYocAkWyPO8wpzQsuLfYpj92q/NoHwcJMjYHXhN74wqzhkHTUqZj8yR4LUHQGUBYrVnnTb XDw4ppZrmNrseUAZo8fBTZGhfc+hmZ1KNZesDs9IqpP7Ix67WK0zp5+pOsHQjeMyLy0axT BymexcU7pySbxrCgJhbeb257JP0pmjHd3aJyI5GVqk+KpszfeE8wJSSmUmowpy2YA+YpJX gpvRi0Knm/MFTlU5ASvdm9rXMFfsyM6ab2lCO4NFbohAQHlCtktXjGHAY5mf4cJtJ1f2z+ YQC2XaEgRLfbsj2ksYxp6aFMvpKE6cSPSvMKA5C79epeqqaZdQogLWZwZU66AQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753280629; a=rsa-sha256; cv=none; b=hDdsLezyiUEmVre1MAlznXPpAVZuMwX8aAzOsj0ASzsbo/11iQyFTijKGGqD1E2u7NNLCb kvXwG8wkXwY2AyOfGVZ2NpLAqUjLQxpSk5gSBZGpVD7QRDb9ff9y3DCZKxC99DK4yudK0V V+OuKfm5xrpxIVsCn33P157Zhe+QlSpB/i9wG6UrsYA56iHCVLOQpF2v1F1F3DzDGaGN2d 4e+xV2nS9IgMcX2n9/NGUNWy/gIQuJ6wZjZMdarCVtpEK1hmv5XXphgHul3/uBPlSCAgRX zBIZ//XNpRJiHo7njQrGnhxgk8+Nhu4t5VUpWRmR/Fxk6sSsLDFR947hjAoj8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnGb93rQ8z229; Wed, 23 Jul 2025 14:23:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NENncl031215; Wed, 23 Jul 2025 14:23:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NENn7d031211; Wed, 23 Jul 2025 14:23:49 GMT (envelope-from git) Date: Wed, 23 Jul 2025 14:23:49 GMT Message-Id: <202507231423.56NENn7d031211@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: a46974905b0e - main - pf: Make pf(4) more paranoid about IGMP/MLP messages. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: a46974905b0effca7bb2fdfb4b19360f6e9d8897 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a46974905b0effca7bb2fdfb4b19360f6e9d8897 commit a46974905b0effca7bb2fdfb4b19360f6e9d8897 Author: Kristof Provost AuthorDate: 2025-07-16 14:37:44 +0000 Commit: Kristof Provost CommitDate: 2025-07-23 13:35:45 +0000 pf: Make pf(4) more paranoid about IGMP/MLP messages. MLD/IGMP messages with ttl other than 1 will be discarded. Also MLD messages with other than link-local source address will be discarded. IGMP messages with destination address other than multicast class will be discarded. feedback and OK bluhm@, cluadio@ Obtained from: OpenBSD, sashan , 5f7837b6d7 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 0a951815656e..20641fbcbce4 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -9872,8 +9872,16 @@ pf_walk_header(struct pf_pdesc *pd, struct ip *h, u_short *reason) pd->off += hlen; pd->proto = h->ip_p; /* IGMP packets have router alert options, allow them */ - if (pd->proto == IPPROTO_IGMP) + if (pd->proto == IPPROTO_IGMP) { + /* According to RFC 1112 ttl must be set to 1. */ + if ((h->ip_ttl != 1) || + !IN_MULTICAST(ntohl(h->ip_dst.s_addr))) { + DPFPRINTF(PF_DEBUG_MISC, ("Invalid IGMP\n")); + REASON_SET(reason, PFRES_IPOPTIONS); + return (PF_DROP); + } pd->badopts &= ~PF_OPT_ROUTER_ALERT; + } /* stop walking over non initial fragments */ if ((h->ip_off & htons(IP_OFFMASK)) != 0) return (PF_PASS); @@ -10113,6 +10121,19 @@ pf_walk_header6(struct pf_pdesc *pd, struct ip6_hdr *h, u_short *reason) case MLD_LISTENER_REPORT: case MLD_LISTENER_DONE: case MLDV2_LISTENER_REPORT: + /* + * According to RFC 2710 all MLD messages are + * sent with hop-limit (ttl) set to 1, and link + * local source address. If either one is + * missing then MLD message is invalid and + * should be discarded. + */ + if ((h->ip6_hlim != 1) || + !IN6_IS_ADDR_LINKLOCAL(&h->ip6_src)) { + DPFPRINTF(PF_DEBUG_MISC, ("Invalid MLD\n")); + REASON_SET(reason, PFRES_IPOPTIONS); + return (PF_DROP); + } pd->badopts &= ~PF_OPT_ROUTER_ALERT; break; } From nobody Wed Jul 23 14:23:48 2025 X-Original-To: dev-commits-src-all@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 4bnGb867wgz62P7B; Wed, 23 Jul 2025 14:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnGb84K9Zz3pTb; Wed, 23 Jul 2025 14:23:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yA6Zc5de70LXAx9oiMfzH5+5fB4DX2gb8mzAGpV6GYM=; b=ewXcK7kguRLz3Fc3ifrawnFWtcdwAqjz48rX35IKhz+TcfVqhq3iDvpfsOobTQ0wE6afWh LQqJsHfQlw2XYJ1xE8QS/yWnDbrDYI8eMAEBwmD+yaUfrGYpTwffYasiWs8+6G8Oz/6bGc SwkP0BzFrOCY2/KYR3+iE6490ITPqmaTaw2EXwl+2PN/yF1XfKkoT0pjZKWCeC0zuHTaTU rwlJSfah4XWCEBKeGDq6oPr6NYp0DSzWE0eKh9xxwLprnqgkjbWGjv0NR/DICphRoKpqIP aE8yNZYO7VFY4Fp/r/cFbZ6Zm243Ta29Qr2wzWXXxPrVsP11h22jDMTCZ2+7Sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yA6Zc5de70LXAx9oiMfzH5+5fB4DX2gb8mzAGpV6GYM=; b=JPe2Mm2nf09rlRqNMXLP1k+7gEfoufZYPDkzWSRlGi5dY19uaOdxAsbr1LZhnzWbVl+dLd lmkXxfvcc+bqxXH1Bt7FSkSA4mbyePS8HQX7Bf8SQFLRLWPDuXK1Tg6R0Bi3E1fTGEg6dW 90lDZYQPzt/ygkOV+YjElABDzYxIKvBMOYcbjJWQXWKixoNu+dGSjmqmLcf9HGmoGFGC78 SmLPksHAfg0R0QMMc35GMY1RoLdx2vSVBsAQvEUfvkkhZAos7PeON9ey38KYwXurx+4o09 zHTVDIjSVtfN6ZtbHv9rcg84Mqab8CG+1aZBcktst/XH9EIDrEP5FE+AwCt3lg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753280628; a=rsa-sha256; cv=none; b=TGxwbz6TfBMGI4kgxglrY66hv160HIssBtQ1CBNrW2vbvJnm0RiKwj9PeeUn5UnphVMz3u yUgUAjzL5Af+CxAloQd6f4fOXLhemOBL4Ljkr2FBjFmiAYgnJbm83iR/i9WK9mcj9fknCl PrXtMnl5sJjmw2DeIEoqlQlCxjMoQlrOMF8wLZCZ7SwSnDayGsfZEQc/jcTn+c69ZUhLMh movOXGHiPk+z5lJaNA/YZeRPJy+gUZdEOMU53s3N1Juphrq30OMPzGJh5f1Zzkcn9ei081 ELeonxyyu8rkvlWaypq9AQTw37BOikUgGTU24ErFuWe1JYIvXP4DnMD0vRnbGA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnGb83tRJz228; Wed, 23 Jul 2025 14:23:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NENmHb031180; Wed, 23 Jul 2025 14:23:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NENmn6031177; Wed, 23 Jul 2025 14:23:48 GMT (envelope-from git) Date: Wed, 23 Jul 2025 14:23:48 GMT Message-Id: <202507231423.56NENmn6031177@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 2eddb410f789 - main - pf: accept IP options for IGMP and ICMP6 MLD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 2eddb410f7892ff637bbf058b58f2644f329e8d9 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=2eddb410f7892ff637bbf058b58f2644f329e8d9 commit 2eddb410f7892ff637bbf058b58f2644f329e8d9 Author: Kristof Provost AuthorDate: 2025-07-16 12:40:05 +0000 Commit: Kristof Provost CommitDate: 2025-07-23 13:35:44 +0000 pf: accept IP options for IGMP and ICMP6 MLD IGMP and ICMP6 MLD packets always have the router alert option set. pf blocked IPv4 options and IPv6 option header by default. This forced users to set allow-opts in pf rules. Better let multicast work by default. Detect router alerts by parsing IP options and hop by hop headers. If the packet has only this option and is a multicast control packet, do not block it due to bad options. tested by otto@; OK sashan@ Relnotes: yes Obtained from: OpenBSD, bluhm , 214dd8280c Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 3 ++ sys/netpfil/pf/pf.c | 132 +++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 117 insertions(+), 18 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 452a8eb4024b..efc884398e7b 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -1676,6 +1676,9 @@ struct pf_pdesc { u_int32_t fragoff; /* fragment header offset */ u_int32_t jumbolen; /* length from v6 jumbo header */ u_int32_t badopts; /* v4 options or v6 routing headers */ +#define PF_OPT_OTHER 0x0001 +#define PF_OPT_JUMBO 0x0002 +#define PF_OPT_ROUTER_ALERT 0x0004 u_int16_t *ip_sum; u_int16_t flags; /* Let SCRUB trigger behavior in diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 1310445c4063..0a951815656e 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -375,6 +375,8 @@ static u_int16_t pf_calc_mss(struct pf_addr *, sa_family_t, int, u_int16_t); static int pf_check_proto_cksum(struct mbuf *, int, int, u_int8_t, sa_family_t); +static int pf_walk_option(struct pf_pdesc *, struct ip *, + int, int, u_short *); static int pf_walk_header(struct pf_pdesc *, struct ip *, u_short *); #ifdef INET6 static int pf_walk_option6(struct pf_pdesc *, struct ip6_hdr *, @@ -9797,6 +9799,55 @@ pf_dummynet_route(struct pf_pdesc *pd, struct pf_kstate *s, return (0); } +static int +pf_walk_option(struct pf_pdesc *pd, struct ip *h, int off, int end, + u_short *reason) +{ + uint8_t type, length, opts[15 * 4 - sizeof(struct ip)]; + + MPASS(end - off <= sizeof(opts)); + m_copydata(pd->m, off, end - off, opts); + end -= off; + off = 0; + + while (off < end) { + type = opts[off]; + if (type == IPOPT_EOL) + break; + if (type == IPOPT_NOP) { + off++; + continue; + } + if (off + 2 > end) { + DPFPRINTF(PF_DEBUG_MISC, ("IP length opt\n")); + REASON_SET(reason, PFRES_IPOPTIONS); + return (PF_DROP); + } + length = opts[off + 1]; + if (length < 2) { + DPFPRINTF(PF_DEBUG_MISC, ("IP short opt\n")); + REASON_SET(reason, PFRES_IPOPTIONS); + return (PF_DROP); + } + if (off + length > end) { + DPFPRINTF(PF_DEBUG_MISC, ("IP long opt\n")); + REASON_SET(reason, PFRES_IPOPTIONS); + return (PF_DROP); + } + switch (type) { + case IPOPT_RA: + pd->badopts |= PF_OPT_ROUTER_ALERT; + break; + default: + pd->badopts |= PF_OPT_OTHER; + break; + } + off += length; + } + + return (PF_PASS); +} + static int pf_walk_header(struct pf_pdesc *pd, struct ip *h, u_short *reason) { @@ -9809,11 +9860,20 @@ pf_walk_header(struct pf_pdesc *pd, struct ip *h, u_short *reason) REASON_SET(reason, PFRES_SHORT); return (PF_DROP); } - if (hlen != sizeof(struct ip)) - pd->badopts++; + if (hlen != sizeof(struct ip)) { + if (pf_walk_option(pd, h, pd->off + sizeof(struct ip), + pd->off + hlen, reason) != PF_PASS) + return (PF_DROP); + /* header options which contain only padding is fishy */ + if (pd->badopts == 0) + pd->badopts |= PF_OPT_OTHER; + } end = pd->off + ntohs(h->ip_len); pd->off += hlen; pd->proto = h->ip_p; + /* IGMP packets have router alert options, allow them */ + if (pd->proto == IPPROTO_IGMP) + pd->badopts &= ~PF_OPT_ROUTER_ALERT; /* stop walking over non initial fragments */ if ((h->ip_off & htons(IP_OFFMASK)) != 0) return (PF_PASS); @@ -9870,7 +9930,10 @@ pf_walk_option6(struct pf_pdesc *pd, struct ip6_hdr *h, int off, int end, return (PF_DROP); } switch (opt.ip6o_type) { + case IP6OPT_PADN: + break; case IP6OPT_JUMBO: + pd->badopts |= PF_OPT_JUMBO; if (pd->jumbolen != 0) { DPFPRINTF(PF_DEBUG_MISC, ("IPv6 multiple jumbo")); REASON_SET(reason, PFRES_IPOPTIONS); @@ -9895,7 +9958,11 @@ pf_walk_option6(struct pf_pdesc *pd, struct ip6_hdr *h, int off, int end, return (PF_DROP); } break; + case IP6OPT_ROUTER_ALERT: + pd->badopts |= PF_OPT_ROUTER_ALERT; + break; default: + pd->badopts |= PF_OPT_OTHER; break; } off += sizeof(opt) + opt.ip6o_len; @@ -9909,6 +9976,7 @@ pf_walk_header6(struct pf_pdesc *pd, struct ip6_hdr *h, u_short *reason) { struct ip6_frag frag; struct ip6_ext ext; + struct icmp6_hdr icmp6; struct ip6_rthdr rthdr; uint32_t end; int hdr_cnt, fraghdr_cnt = 0, rthdr_cnt = 0; @@ -9920,9 +9988,22 @@ pf_walk_header6(struct pf_pdesc *pd, struct ip6_hdr *h, u_short *reason) for (hdr_cnt = 0; hdr_cnt < PF_HDR_LIMIT; hdr_cnt++) { switch (pd->proto) { case IPPROTO_ROUTING: - case IPPROTO_HOPOPTS: case IPPROTO_DSTOPTS: - pd->badopts++; + pd->badopts |= PF_OPT_OTHER; + break; + case IPPROTO_HOPOPTS: + if (!pf_pull_hdr(pd->m, pd->off, &ext, sizeof(ext), + NULL, reason, AF_INET6)) { + DPFPRINTF(PF_DEBUG_MISC, ("IPv6 short exthdr\n")); + return (PF_DROP); + } + if (pf_walk_option6(pd, h, pd->off + sizeof(ext), + pd->off + (ext.ip6e_len + 1) * 8, + reason) != PF_PASS) + return (PF_DROP); + /* option header which contains only padding is fishy */ + if (pd->badopts == 0) + pd->badopts |= PF_OPT_OTHER; break; } switch (pd->proto) { @@ -10001,18 +10082,11 @@ pf_walk_header6(struct pf_pdesc *pd, struct ip6_hdr *h, u_short *reason) /* reassembly needs the ext header before the frag */ if (pd->fragoff == 0) pd->extoff = pd->off; - if (pd->proto == IPPROTO_HOPOPTS && pd->fragoff == 0) { - if (pf_walk_option6(pd, h, - pd->off + sizeof(ext), - pd->off + (ext.ip6e_len + 1) * 8, reason) - != PF_PASS) - return (PF_DROP); - if (ntohs(h->ip6_plen) == 0 && pd->jumbolen != 0) { - DPFPRINTF(PF_DEBUG_MISC, - ("IPv6 missing jumbo")); - REASON_SET(reason, PFRES_IPOPTIONS); - return (PF_DROP); - } + if (pd->proto == IPPROTO_HOPOPTS && pd->fragoff == 0 && + ntohs(h->ip6_plen) == 0 && pd->jumbolen != 0) { + DPFPRINTF(PF_DEBUG_MISC, ("IPv6 missing jumbo\n")); + REASON_SET(reason, PFRES_IPOPTIONS); + return (PF_DROP); } if (pd->proto == IPPROTO_AH) pd->off += (ext.ip6e_len + 2) * 4; @@ -10020,10 +10094,32 @@ pf_walk_header6(struct pf_pdesc *pd, struct ip6_hdr *h, u_short *reason) pd->off += (ext.ip6e_len + 1) * 8; pd->proto = ext.ip6e_nxt; break; + case IPPROTO_ICMPV6: + /* fragments may be short, ignore inner header then */ + if (pd->fragoff != 0 && end < pd->off + sizeof(icmp6)) { + pd->off = pd->fragoff; + pd->proto = IPPROTO_FRAGMENT; + return (PF_PASS); + } + if (!pf_pull_hdr(pd->m, pd->off, &icmp6, sizeof(icmp6), + NULL, reason, AF_INET6)) { + DPFPRINTF(PF_DEBUG_MISC, + ("IPv6 short icmp6hdr\n")); + return (PF_DROP); + } + /* ICMP multicast packets have router alert options */ + switch (icmp6.icmp6_type) { + case MLD_LISTENER_QUERY: + case MLD_LISTENER_REPORT: + case MLD_LISTENER_DONE: + case MLDV2_LISTENER_REPORT: + pd->badopts &= ~PF_OPT_ROUTER_ALERT; + break; + } + return (PF_PASS); case IPPROTO_TCP: case IPPROTO_UDP: case IPPROTO_SCTP: - case IPPROTO_ICMPV6: /* fragments may be short, ignore inner header then */ if (pd->fragoff != 0 && end < pd->off + (pd->proto == IPPROTO_TCP ? sizeof(struct tcphdr) : @@ -10733,7 +10829,7 @@ done: if (s) memcpy(&pd.act, &s->act, sizeof(s->act)); - if (action == PF_PASS && pd.badopts && !pd.act.allow_opts) { + if (action == PF_PASS && pd.badopts != 0 && !pd.act.allow_opts) { action = PF_DROP; REASON_SET(&reason, PFRES_IPOPTIONS); pd.act.log = PF_LOG_FORCE; From nobody Wed Jul 23 14:23:52 2025 X-Original-To: dev-commits-src-all@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 4bnGbG1DHjz62P57; Wed, 23 Jul 2025 14:23:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnGbD732Bz3pV5; Wed, 23 Jul 2025 14:23:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EVW/7jKnImLTu/taGnh9+GBFCRGZEpX4xlxt/GYM/j0=; b=UfdjDLbkQmA7n8hsEANzRJP7WwdESMUh1ptR3E0w7QYxgPFvMSTxIl8a4PAkriJwVRcmII IR3rAlXj3xG8e88D+TSGKf3bWMF486IOensqE1NqAbSI3MqomnOVZjSR0NO6j9KtxurxSA WlQXPVpMQwvLt4LqxbdCew+yG2lAjrh7cEYfmJUdUOx+IbNxBbOUSKoaPwH5xc50i7wk3W 11/vTlYHQNFodaH30YduqXB8Go/RCS3zoP3uX8ximLcOHoiaDrYZTGDSV21MiE5J4H/afC PW8z88BEBtqKV8T/a+880FdZ1gXBHiwLFDzUKR5HH+FqbdaJrIr1RmUXx7fQTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280633; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EVW/7jKnImLTu/taGnh9+GBFCRGZEpX4xlxt/GYM/j0=; b=pLSoRBQX3yKRXHJ94YRw5XkD8sStbbYT+s+ETCPvE9liuGuDJ6eWgmE7yA5EhIMG2E6SAf x6J2IJtQk5t8v8NeAUp/asM+OIEaYFYCqGepBwGzgzcv2b/8HvCkwiGeaWgE4DSdGXNsdW t5NbqrHWJtGLNGDokh162e7YgXcQVIAN17DM2FENxjjovetKyTssSxkX3hh5YJCOFynetv 1uOxGaYizkwpdf9DsK1H/cEDVeAjtVDDXaqrONr0wnTuXeYcs8mKEawAc69ET8ed+Z0I2W QmhX0z1b4+gFvLl5hc5OXgquKthcCnTdqRfFQgmk2eIFgrfAVO+ePgtZEsYHzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753280633; a=rsa-sha256; cv=none; b=xsXYPIGM8eCYqNgj/gB5OQS30AK0nt10mJpyk3i6eHjkc5hG39Z1EVkbTYnGMGl78uWUzj U/lP/jTmNTkfMFriiq4MzIdMkyQ3uOW41Zo0GMVrfP6Jz38SLe3LEk3t5TFup1KFwB3+ER d5gkaRveNcJNDrqm5x+32IjP5uKtMx+6Yxfz3UBlusMi3pM7Co3mPz+nPTMPL8/qp66kV+ fQwc3PY8RLWU8DXAcC4rf1vcufHwyqgPWefD3a7hnhYYU05hQD1jqnQN2lzvqg4ZB+kDdj ary2DKQlbUBSTzQwTmyXxj9a18QOZx6g7MDWwU541rQ3fM2mCLt3SHaDY584OA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnGbD6FMYz1pm; Wed, 23 Jul 2025 14:23:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NENqsa031329; Wed, 23 Jul 2025 14:23:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NENqiU031326; Wed, 23 Jul 2025 14:23:52 GMT (envelope-from git) Date: Wed, 23 Jul 2025 14:23:52 GMT Message-Id: <202507231423.56NENqiU031326@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: a00d0cad0aab - main - pf: handle truncated IP options in ICMP List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: a00d0cad0aab8aee22521cd753fa9a1bab6d6531 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=a00d0cad0aab8aee22521cd753fa9a1bab6d6531 commit a00d0cad0aab8aee22521cd753fa9a1bab6d6531 Author: Kristof Provost AuthorDate: 2025-07-18 13:04:18 +0000 Commit: Kristof Provost CommitDate: 2025-07-23 13:35:46 +0000 pf: handle truncated IP options in ICMP In pf the kernel paniced if IP options in packet within ICMP payload were truncated. Drop such packets instead. Reported-by: syzbot+91abd3aa2fdfe900f9ce@syzkaller.appspotmail.com OK sashan@ claudio@ Obtained from: OpenBSD, bluhm , 0271abd8e4 Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 20641fbcbce4..9ef69ee09bb8 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -9805,6 +9805,13 @@ pf_walk_option(struct pf_pdesc *pd, struct ip *h, int off, int end, { uint8_t type, length, opts[15 * 4 - sizeof(struct ip)]; + /* IP header in payload of ICMP packet may be too short */ + if (pd->m->m_pkthdr.len < end) { + DPFPRINTF(PF_DEBUG_MISC, ("IP option too short\n")); + REASON_SET(reason, PFRES_SHORT); + return (PF_DROP); + } + MPASS(end - off <= sizeof(opts)); m_copydata(pd->m, off, end - off, opts); end -= off; From nobody Wed Jul 23 14:23:53 2025 X-Original-To: dev-commits-src-all@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 4bnGbH27VSz62NqK; Wed, 23 Jul 2025 14:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnGbG194Mz3pb1; Wed, 23 Jul 2025 14:23:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5IGPkwsXViG0o0zybszZcTweHl9tABfFSjyGznSkER4=; b=ZXyBC9/UTNLIfEVKxEBP9v/0gqnBNGXmQSeaE2uFypDlus8nSxrbSTnfHoplzGlsVImEK0 9e/toCan9dan7owx8KsSaXa/DwsFzhXWcXLOgrstwn72g2hZKpUItSLA+QmZFJuXjQwEha 8keYxlrf4lMdx1HLr5cBKaH5mFv/ZcT4FD+0vZmO0zjQtI/6q5USSxE5rAhJWh5iIa5U0y VhK0V6e0nHcQvsQCyYiOyUGUZ/z0iVB43N5DjMjMFGVp+WaAvOEwgy20AdaWYXgfxayw0I Z2xjSa4E5tnKBGw/Gyv+Mr/3eYhvENudFq7quuayU54Ac2eiLgAnX1EL5NLfLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280634; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5IGPkwsXViG0o0zybszZcTweHl9tABfFSjyGznSkER4=; b=yHtFTYyJIWYQrpru9viFUQx7jIj+OyrK4FMnkA1YtKNXKKjj5FKyUaVXhGWKMjjbvk5aBT z7rW5TntMso0Wm0bzVnMrakhC+nqZfO3qUFT1KuYmTrwMV1xDiqRebaOZ03K3+r7AfNluS 9n0Vavt+s/YAob0KQnjE6HeRvfXn3pVYiQR1pgni5MAdEjFZFgIyJlnVuloGFakwFQCna0 ePmnlkYSDqyr+8vuPZxJg2WcWMSiaKj+2OH3SEn53TOk4oKAiJ0QP/Y3rH1UIkmkf9ddad ZpkfcG+ZSyk6sBpK38srVKeLrdvofD7xCCswN9glx0HBqSJZURtvBNjCEOO+kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753280634; a=rsa-sha256; cv=none; b=U8VRDZKxzCtmJ+kfBPJmTRIbBrteWxCBtPl6mfx4ycVJQt+J09xA/X6cvIM65WykOONhuO 8IA9P9EMzDFKFvSrJff/H2VRGot0HPz/dYc7ChIDXyJqu9KNBuPdaXRhXEuaOnhxxKggXE 11MZM0Aczzbi87rQGTyWaG+4/4kCDZDPqvHBUllNLfrO3AFlYvLAXlkzAOCxZyApdf9z7V JQ4/Ki5Sc+92+aZ41O6Pi42oeGNYBdCWNeHXPUSwaQDAbjcH8e6O7rjvfoylHii0JHHPeg PVaj71EZ8O+1K3VFVDfh8II564nTOxSBkNJmmqsaiP/2Hm+0W5RRMOQX8bn0mA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnGbG06GQz22B; Wed, 23 Jul 2025 14:23:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NENrie031364; Wed, 23 Jul 2025 14:23:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NENrmG031361; Wed, 23 Jul 2025 14:23:53 GMT (envelope-from git) Date: Wed, 23 Jul 2025 14:23:53 GMT Message-Id: <202507231423.56NENrmG031361@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 13cd0f9c1ae6 - main - pf tests: test truncated IP options in ICMP payload List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 13cd0f9c1ae6a50d616aeea923bc96f8e54176cc Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=13cd0f9c1ae6a50d616aeea923bc96f8e54176cc commit 13cd0f9c1ae6a50d616aeea923bc96f8e54176cc Author: Kristof Provost AuthorDate: 2025-07-18 13:05:14 +0000 Commit: Kristof Provost CommitDate: 2025-07-23 13:35:46 +0000 pf tests: test truncated IP options in ICMP payload Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/icmp.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/tests/sys/netpfil/pf/icmp.py b/tests/sys/netpfil/pf/icmp.py index 2f40259f5665..c5e945d60e99 100644 --- a/tests/sys/netpfil/pf/icmp.py +++ b/tests/sys/netpfil/pf/icmp.py @@ -175,6 +175,22 @@ class TestICMP(VnetTestTemplate): self.check_icmp_echo(sp, 1464) self.check_icmp_echo(sp, 1468) + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_truncated_opts(self): + ToolsHelper.print_output("/sbin/route add default 192.0.2.1") + + # Import in the correct vnet, so at to not confuse Scapy + import scapy.all as sp + + packet = sp.IP(dst="198.51.100.2", flags="DF") \ + / sp.ICMP(type='dest-unreach', length=108) \ + / sp.IP(src="198.51.100.2", dst="192.0.2.2", len=1000, \ + ihl=(120 >> 2), options=[ \ + sp.IPOption_Security(length=100)]) + packet.show() + sp.sr1(packet, timeout=3) + class TestICMP_NAT(VnetTestTemplate): REQUIRED_MODULES = [ "pf" ] TOPOLOGY = { From nobody Wed Jul 23 14:23:50 2025 X-Original-To: dev-commits-src-all@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 4bnGbC0YtNz62Nnv; Wed, 23 Jul 2025 14:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnGbB52CYz3pPK; Wed, 23 Jul 2025 14:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=92nA0xIET05Eeoy2ttiCL59qXhpE2Y8gVIq5CFrvaEI=; b=ejGwL1mBvgKNM+gUlj59siFFj0yxCaTj5qqiynECGYEqNKHTj4SqC4UWnWcreyOk2KsCbj qpDI7MuvQahD+YoxB/YVLXtWQXtL6qQOSGaxOR0OhODHENZEvgXqqs0VCdMYWP62t3G38C QbIJHWS+bVlWDbIgBMMzR8PbmpCbkkytHHxn4ts+vOXomApMbLfKzEpYlXvYoW4Pvb74Y2 c8zjnB9YuBGHhC5KvC+dSPCO7WyS/0CdKCsIZUGPJj16/PYcDuCn2iuDhitjgHAAX9fNUO Z0ALECm5+nDKQ/p2oayjOHpTGtz8duRPZJz1RQX2mhDZOruKalbjX0vzi81dzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280630; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=92nA0xIET05Eeoy2ttiCL59qXhpE2Y8gVIq5CFrvaEI=; b=rkZ8IC0CRNUWr02wi1wpuC56CtzSW9AKDjTFNa37Yy8lny+BwNYix6D+HgeLrhkAfje1td FaZiwpGIsNca7IbTvcB+4GBgqA6pb6QFbyBXE79AoqGPltLC+IlwXoCvTTuGcH917vtSkU vJfWme3RTD7V2L+g1/3h1pmIvt1yIw6fmhqbh1YVU6Mq+/nPl56bx/osWSF1mZZMHa5EcK MzJTRlJEVZO34HCWLuM88off0YSeVJVwuOpVtl0iAqUrQBsnLdK55cow6vuhXw0kVPABdg qTQU9u6GWwYXtxhpoHbNPuYItqJgpCg/9lUDJ+G4/yPjXDURxnLYEkHPR+uptg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753280630; a=rsa-sha256; cv=none; b=g+8DDPP66dYn4quHLkSLp0DyPSsNKv4T3pfVrSdKFYfYttJGJp/GK9kn4qHWRIuj76Wgvs ch3nxMxNKpMpg+ol6h8E7bNPRvUCa/rXqwh8jqIgYL5Z35GUWyqJEYBHAWTjTtnb4baT6a MKMjo2aLrAmqqqe2XuyWfBPcRKxxID7GHXYWUvKmSB2AAj2inZIOb4Ll+6yNtdiUqZarl3 0ul4q5fwkIY4qOZW2A9h2Z5bA6YGdeU/ODfr9JAh+4yQzE27B/IOzeDLrfnxbr4svJNN8H 81TfWqkreao/EZsWMzIVR2v6A54RgFVG+ahbmzpH2uwyrl2D+X6DmVEvf+Totw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnGbB4cTCz2FV; Wed, 23 Jul 2025 14:23:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NENo9Q031249; Wed, 23 Jul 2025 14:23:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NENoj0031246; Wed, 23 Jul 2025 14:23:50 GMT (envelope-from git) Date: Wed, 23 Jul 2025 14:23:50 GMT Message-Id: <202507231423.56NENoj0031246@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: ad8eabd4d25e - main - pf tests: verify we now allow IGMP packets with the Router Alert IP option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: ad8eabd4d25e5119dad82b787bb9770ca9ad2953 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=ad8eabd4d25e5119dad82b787bb9770ca9ad2953 commit ad8eabd4d25e5119dad82b787bb9770ca9ad2953 Author: Kristof Provost AuthorDate: 2025-07-17 10:07:28 +0000 Commit: Kristof Provost CommitDate: 2025-07-23 13:35:45 +0000 pf tests: verify we now allow IGMP packets with the Router Alert IP option Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/igmp.py | 95 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index 3adaef09ddbd..def35b18e5d8 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -58,6 +58,7 @@ ATF_TESTS_SH+= altq \ ATF_TESTS_PYTEST+= frag6.py ATF_TESTS_PYTEST+= header.py ATF_TESTS_PYTEST+= icmp.py +ATF_TESTS_PYTEST+= igmp.py ATF_TESTS_PYTEST+= nat64.py ATF_TESTS_PYTEST+= nat66.py ATF_TESTS_PYTEST+= return.py diff --git a/tests/sys/netpfil/pf/igmp.py b/tests/sys/netpfil/pf/igmp.py new file mode 100644 index 000000000000..b339a2825082 --- /dev/null +++ b/tests/sys/netpfil/pf/igmp.py @@ -0,0 +1,95 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2025 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +import pytest +from utils import DelayedSend +from atf_python.sys.net.tools import ToolsHelper +from atf_python.sys.net.vnet import VnetTestTemplate + +class TestIGMP(VnetTestTemplate): + REQUIRED_MODULES = [ "pf" ] + TOPOLOGY = { + "vnet1": {"ifaces": ["if1"]}, + "vnet2": {"ifaces": ["if1"]}, + "if1": {"prefixes4": [("192.0.2.2/24", "192.0.2.1/24")]}, + } + + def vnet2_handler(self, vnet): + ifname = vnet.iface_alias_map["if1"].name + ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "pass", + ]) + ToolsHelper.print_output("/sbin/pfctl -x loud") + ToolsHelper.print_output("echo \"j 230.0.0.1 %s\ns 3600\nq\" | /usr/sbin/mtest" % ifname) + + def find_igmp_reply(self, pkt, ifname): + pkt.show() + s = DelayedSend(pkt) + + found = False + packets = self.sp.sniff(iface=ifname, timeout=5) + for r in packets: + r.show() + igmp = r.getlayer(self.sc.igmp.IGMP) + if not igmp: + continue + igmp.show() + if not igmp.gaddr == "230.0.0.1": + continue + found = True + return found + + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_ip_opts(self): + """Verify that we allow IGMP packets with IP options""" + ifname = self.vnet.iface_alias_map["if1"].name + + # Import in the correct vnet, so at to not confuse Scapy + import scapy.all as sp + import scapy.contrib as sc + import scapy.contrib.igmp + self.sp = sp + self.sc = sc + + # We allow IGMP packets with the router alert option + pkt = sp.IP(dst="224.0.0.1%%%s" % ifname, ttl=1, + options=[sp.IPOption_Router_Alert()]) \ + / sc.igmp.IGMP(type=0x11, mrcode=1) + assert self.find_igmp_reply(pkt, ifname) + + # But not with other options + pkt = sp.IP(dst="224.0.0.1%%%s" % ifname, ttl=1, + options=[sp.IPOption_NOP()]) \ + / sc.igmp.IGMP(type=0x11, mrcode=1) + assert not self.find_igmp_reply(pkt, ifname) + + # Or with the wrong TTL + pkt = sp.IP(dst="224.0.0.1%%%s" % ifname, ttl=2, + options=[sp.IPOption_Router_Alert()]) \ + / sc.igmp.IGMP(type=0x11, mrcode=1) + assert not self.find_igmp_reply(pkt, ifname) From nobody Wed Jul 23 14:23:51 2025 X-Original-To: dev-commits-src-all@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 4bnGbD3sP2z62NmM; Wed, 23 Jul 2025 14:23:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnGbC6K4rz3pZX; Wed, 23 Jul 2025 14:23:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3BuI1Tp0p3Ajp7qqm4i3Qwz0TSiLd86q7R/rju2mnwI=; b=Bx/vM7S2SjBg/sNDDWelfhOebsl5eeiBGW/eFK7hjbb1SAEpbespQ0650vqzfj9eDaBVZF 8z/aZP+HfC9Y59Ng8ZarL5mqQnRTnmhZ73CTRXsa9vOeldvkzn4xbXea4NWUR945ZCxMYZ zrkEwF86mi18v3/6moO5geFEeNkdVP2LLGB7n9EYqqc5S5XqIxFMs7b/NU9TmEHgZdMC9d A2yu4YUPUTd44WxwW2I2jiE3pA5KL+F7LR7yYBw+2vGQ/l3ycze7+EpVw4s94aRxFjo55N d2rv/qz9FWfFOMFMr/lwDGOZPA3nweDZocCtmzXLWZw2ATbqgQHExtw12z3DVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280631; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3BuI1Tp0p3Ajp7qqm4i3Qwz0TSiLd86q7R/rju2mnwI=; b=h9CwUmVVXUmuZNpTo4irVIIttY6aoLzQwFWBG2IFl6tn0JWGcTdn9s+iLpJPVMvwvBabBU u0t4VDO+urFcuXvBjGAEiL/iWSZ9xXlDPJV20Aho/3wTSfRWWEuJjPorHGSB4s8nTDOxTa w0apHbbmYVSZLMwSs8Aj/kiovhbbzqU1hIRQurTgDXspFbdpfbNmInYbeAiYp6lkZq3s70 hZI+XYBRfKjojrSZLzNCiyevxant313Svsj1FM8B145ORl5Tc85dZsEHkw4aezSsdiYty3 aXWYkuPtpdGka/HW9SSA+/GP9yT0DDamz8yA5TEsqQmm3K9jnSGOCrnAt2ZLiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753280631; a=rsa-sha256; cv=none; b=B0RYFmG+JiQLNLKqaNT/dOyIPq+kkfN8Yy8TnKO+Iv9RUOX6fDF4vTkicH5L++MN+PsmEH ah0ae8BjTa0tl/ZTDQnmWld0I4f83pWhjV4wAch6n/g0ehVixWFIvFzdBOxwy0NSbyXjYU nzBBtmu+XEMQB/ZvOYyFw7sRunkv0NWqB0hBvBI9zDdLFdhBVX7Gl8XMdRkxSYIjqgt6pK ddoRu2hTg+CK/+ogfUGgLG4g8Qa1ZEYC9JM6LuADx/cJMrscaFwYksFH5iemL4Gorl8w30 oAasyEOHoML6PJHM+t1gspxRCIetbJwh4DywOx1zAXUmru5Dwr1om0qSvRgLKw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnGbC5HC9z1nY; Wed, 23 Jul 2025 14:23:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NENptr031294; Wed, 23 Jul 2025 14:23:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NENpMI031289; Wed, 23 Jul 2025 14:23:51 GMT (envelope-from git) Date: Wed, 23 Jul 2025 14:23:51 GMT Message-Id: <202507231423.56NENpMI031289@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: b6d0caa48507 - main - pf tests: verify we now allow MLD packets with the Router Alert extention header List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: b6d0caa485072b9b167a48959e37bd1871d80c6c Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=b6d0caa485072b9b167a48959e37bd1871d80c6c commit b6d0caa485072b9b167a48959e37bd1871d80c6c Author: Kristof Provost AuthorDate: 2025-07-17 13:06:34 +0000 Commit: Kristof Provost CommitDate: 2025-07-23 13:35:46 +0000 pf tests: verify we now allow MLD packets with the Router Alert extention header Sponsored by: Rubicon Communications, LLC ("Netgate") --- tests/sys/netpfil/pf/Makefile | 1 + tests/sys/netpfil/pf/mld.py | 95 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+) diff --git a/tests/sys/netpfil/pf/Makefile b/tests/sys/netpfil/pf/Makefile index def35b18e5d8..404d5adfb07a 100644 --- a/tests/sys/netpfil/pf/Makefile +++ b/tests/sys/netpfil/pf/Makefile @@ -59,6 +59,7 @@ ATF_TESTS_PYTEST+= frag6.py ATF_TESTS_PYTEST+= header.py ATF_TESTS_PYTEST+= icmp.py ATF_TESTS_PYTEST+= igmp.py +ATF_TESTS_PYTEST+= mld.py ATF_TESTS_PYTEST+= nat64.py ATF_TESTS_PYTEST+= nat66.py ATF_TESTS_PYTEST+= return.py diff --git a/tests/sys/netpfil/pf/mld.py b/tests/sys/netpfil/pf/mld.py new file mode 100644 index 000000000000..d118a34c8a7d --- /dev/null +++ b/tests/sys/netpfil/pf/mld.py @@ -0,0 +1,95 @@ +# +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2025 Rubicon Communications, LLC (Netgate) +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +# ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +# OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +# LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +# OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +# SUCH DAMAGE. + +import pytest +from utils import DelayedSend +from atf_python.sys.net.tools import ToolsHelper +from atf_python.sys.net.vnet import VnetTestTemplate + +class TestMLD(VnetTestTemplate): + REQUIRED_MODULES = [ "pf" ] + TOPOLOGY = { + "vnet1": {"ifaces": ["if1"]}, + "vnet2": {"ifaces": ["if1"]}, + "if1": {"prefixes6": [("2001:db8::2/64", "2001:db8::1/64")]}, + } + + def vnet2_handler(self, vnet): + ifname = vnet.iface_alias_map["if1"].name + #ToolsHelper.print_output("/sbin/pfctl -e") + ToolsHelper.pf_rules([ + "pass", + ]) + ToolsHelper.print_output("/sbin/pfctl -x loud") + #ToolsHelper.print_output("echo \"j 230.0.0.1 %s\ns 3600\nq\" | /usr/sbin/mtest" % ifname) + + def find_mld_reply(self, pkt, ifname): + pkt.show() + s = DelayedSend(pkt) + + found = False + packets = self.sp.sniff(iface=ifname, timeout=5) + for r in packets: + r.show() + mld = r.getlayer(self.sp.ICMPv6MLReport2) + if not mld: + continue + mld.show() + found = True + return found + + @pytest.mark.require_user("root") + @pytest.mark.require_progs(["scapy"]) + def test_router_alert(self): + """Verify that we allow MLD packets with router alert extension header""" + ifname = self.vnet.iface_alias_map["if1"].name + #ToolsHelper.print_output("/sbin/ifconfig %s inet6 -ifdisable" % ifname) + ToolsHelper.print_output("/sbin/ifconfig") + + # Import in the correct vnet, so at to not confuse Scapy + import scapy.all as sp + import scapy.contrib as sc + import scapy.contrib.igmp + self.sp = sp + self.sc = sc + + # A correct MLD query gets a reply + pkt = sp.IPv6(src="fe80::1%%%s" % ifname, dst="ff02::1", hlim=1) \ + / sp.RouterAlert(value=0) \ + / sp.ICMPv6MLQuery2() + assert self.find_mld_reply(pkt, ifname) + + # The wrong extension header does not + pkt = sp.IPv6(src="fe80::1%%%s" % ifname, dst="ff02::1", hlim=1) \ + / sp.IPv6ExtHdrRouting() \ + / sp.ICMPv6MLQuery2() + assert not self.find_mld_reply(pkt, ifname) + + # Neither does an incorrect hop limit + pkt = sp.IPv6(src="fe80::1%%%s" % ifname, dst="ff02::1", hlim=2) \ + / sp.RouterAlert(value=0) \ + / sp.ICMPv6MLQuery2() + assert not self.find_mld_reply(pkt, ifname) From nobody Wed Jul 23 14:23:55 2025 X-Original-To: dev-commits-src-all@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 4bnGbH2BhRz62P3Y; Wed, 23 Jul 2025 14:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnGbH1PS6z3pb9; Wed, 23 Jul 2025 14:23:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PE8B40YOYfFkTxH12JIG6l6VhRXuYKEWxfjciAtotZQ=; b=H/65N8INO/j1NuP43EPS/vqO9Q/rfa7wS3MCrRiSgsrg+g1TkqG4N1RNYui045Nax7mPn4 haO9BogFKdETJ4j6PbmOMFsMS872rqpjBB7k3py62TlxOIq1CW0jxUqidL30Pw8p/jFHOL 5dkj4PWOrueXSTVCL/BSGU4T6SGSXWt09eURS43yRNr9BQSbslQsreYSvlOI8F6jvF6Rbg e0hojyU/GfoVjOBwobnmj0TsFMLSA71U1NPGtEBr5BtIgnDnbt6l+LWq0ziLrTM2QaawDe KsX+OQzLA12Rz7Lz+O2NHvzgEZgN4yDOcCUr+J7QOOubqTvBMkVam6dZ4m8k4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280635; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PE8B40YOYfFkTxH12JIG6l6VhRXuYKEWxfjciAtotZQ=; b=UrSTMdyWpZwAh5eLOg7NPvpfRqbNPnlIf9l0HlXb+6gX7U8Jor70yUKxlMoMJwlvQfG+fC 68P4fKVSF4Dpm8qWq49siFKw3rekK43rnsKIvPrfl/cXUFhRxHc31eITWrvuEev1hjMe63 0dOaVGh0onc/C45MDR23A91R3wUUoOR6jVSmRb6p5w8xuZUR0td6Avt7J5Hm9QBI01kinG 0mFwcY+a3+OacuQT3Rwz2wHdkFVyMj8WzKIar7xcFXLcjitjbIBTz/1ToDUqcVH6bHLbVD sBB4RcKM8OOR8NiSF9cIPfdlK9HbSGNvoGQ8XQnj5F7XK26c7XtO4LrzESQh4A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753280635; a=rsa-sha256; cv=none; b=cgUCJq/+urx0F7JqbhNsanwPrqLw7u4MqFzxUUEEWCHa3DMtk5f/40gG8RSa/1tof6k9IT +Gp2abLmh7bJJ0FtkeOFwR8EkNaIpLnvVUnNQ363Py7W73Wx2tsXCe0+7+IoVU99DYb/oC cHY3tDDIfY2ds44BQag2CmEdQsnPXw9UeCTWItAV2hNfFxaPOn2IkICyyO/FzZUXeAd+ls 3sjOweBolH2hExgP2lULsnLQVDHi30GgQY51L78t3awGbvT0U3wmz+ENwGdCMc2TMDMHN7 US4HfM+PvNH3od8RuqJ49BFvyUq4qpajjgzmAFUkvLV0aXsumGH/oQhZVbP1Sw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnGbH10PYz2Cp; Wed, 23 Jul 2025 14:23:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NENtuU031399; Wed, 23 Jul 2025 14:23:55 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NENthc031396; Wed, 23 Jul 2025 14:23:55 GMT (envelope-from git) Date: Wed, 23 Jul 2025 14:23:55 GMT Message-Id: <202507231423.56NENthc031396@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 4bb3b3657764 - main - pf: unify DPFPRINTF definitions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 4bb3b365776458bd8f710e40f97e2c68994e3306 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=4bb3b365776458bd8f710e40f97e2c68994e3306 commit 4bb3b365776458bd8f710e40f97e2c68994e3306 Author: Kristof Provost AuthorDate: 2025-07-18 14:55:35 +0000 Commit: Kristof Provost CommitDate: 2025-07-23 13:35:47 +0000 pf: unify DPFPRINTF definitions We define DPFPRINTF() in a few different versions in most pf source files. Move to one definition in pfvar.h and use that one everywhere. While here change it to add an endline, as OpenBSD does, so we consistently end all logs with an endline. Also add a static probe point to ease future debugging. This way we can detect log evens even when logging is disabled, and extract more information (e.g. stack traces, frequency, ...). Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 8 +++ sys/netpfil/pf/if_pfsync.c | 16 +++-- sys/netpfil/pf/pf.c | 135 ++++++++++++++++++++--------------------- sys/netpfil/pf/pf_ioctl.c | 48 +++++++-------- sys/netpfil/pf/pf_lb.c | 22 +++---- sys/netpfil/pf/pf_norm.c | 109 +++++++++++++++++---------------- sys/netpfil/pf/pf_osfp.c | 17 +++--- sys/netpfil/pf/pf_ruleset.c | 13 ++-- sys/netpfil/pf/pf_syncookies.c | 6 +- sys/netpfil/pf/pf_table.c | 4 +- 10 files changed, 187 insertions(+), 191 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index efc884398e7b..d55afe750869 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -331,6 +331,14 @@ MALLOC_DECLARE(M_PF_RULE_ITEM); SDT_PROVIDER_DECLARE(pf); SDT_PROBE_DECLARE(pf, , test, reason_set); +SDT_PROBE_DECLARE(pf, , log, log); + +#define DPFPRINTF(n, fmt, x...) \ + do { \ + SDT_PROBE2(pf, , log, log, (n), fmt); \ + if (V_pf_status.debug >= (n)) \ + printf(fmt "\n", ##x); \ + } while (0) struct pfi_dynaddr { TAILQ_ENTRY(pfi_dynaddr) entry; diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 4e03584b8f85..ee10a997c977 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -110,8 +110,6 @@ #include -#define DPFPRINTF(n, x) if (V_pf_status.debug >= (n)) printf x - struct pfsync_bucket; struct pfsync_softc; @@ -597,9 +595,9 @@ pfsync_state_import(union pfsync_state_union *sp, int flags, int msg_version) if ((rpool_first == NULL) || (TAILQ_NEXT(rpool_first, entries) != NULL)) { DPFPRINTF(PF_DEBUG_MISC, - ("%s: can't recover routing information " - "because of empty or bad redirection pool\n", - __func__)); + "%s: can't recover routing information " + "because of empty or bad redirection pool", + __func__); return ((flags & PFSYNC_SI_IOCTL) ? EINVAL : 0); } rt = r->rt; @@ -610,8 +608,8 @@ pfsync_state_import(union pfsync_state_union *sp, int flags, int msg_version) * give up on recovering. */ DPFPRINTF(PF_DEBUG_MISC, - ("%s: can't recover routing information " - "because of different ruleset\n", __func__)); + "%s: can't recover routing information " + "because of different ruleset", __func__); return ((flags & PFSYNC_SI_IOCTL) ? EINVAL : 0); } break; @@ -624,8 +622,8 @@ pfsync_state_import(union pfsync_state_union *sp, int flags, int msg_version) rt_kif = pfi_kkif_find(sp->pfs_1400.rt_ifname); if (rt_kif == NULL) { DPFPRINTF(PF_DEBUG_MISC, - ("%s: unknown route interface: %s\n", - __func__, sp->pfs_1400.rt_ifname)); + "%s: unknown route interface: %s", + __func__, sp->pfs_1400.rt_ifname); return ((flags & PFSYNC_SI_IOCTL) ? EINVAL : 0); } rt = sp->pfs_1400.rt; diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index 9ef69ee09bb8..c669be47b063 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -119,8 +119,6 @@ #include #include -#define DPFPRINTF(n, x) if (V_pf_status.debug >= (n)) printf x - SDT_PROVIDER_DEFINE(pf); SDT_PROBE_DEFINE2(pf, , test, reason_set, "int", "int"); SDT_PROBE_DEFINE4(pf, ip, test, done, "int", "int", "struct pf_krule *", @@ -161,6 +159,7 @@ SDT_PROBE_DEFINE2(pf, eth, test_rule, match, "int", "struct pf_keth_rule *"); SDT_PROBE_DEFINE2(pf, eth, test_rule, final_match, "int", "struct pf_keth_rule *"); SDT_PROBE_DEFINE2(pf, purge, state, rowcount, "int", "size_t"); +SDT_PROBE_DEFINE2(pf, , log, log, "int", "const char *"); /* * Global variables @@ -4617,8 +4616,8 @@ pf_match_rcvif(struct mbuf *m, struct pf_krule *r) if (kif == NULL) { DPFPRINTF(PF_DEBUG_URGENT, - ("%s: kif == NULL, @%d via %s\n", __func__, r->nr, - r->rcv_ifname)); + "%s: kif == NULL, @%d via %s", __func__, r->nr, + r->rcv_ifname); return (0); } @@ -5244,8 +5243,8 @@ pf_test_eth_rule(int dir, struct pfi_kkif *kif, struct mbuf **m0) if (__predict_false(m->m_len < sizeof(struct ether_header)) && (m = *m0 = m_pullup(*m0, sizeof(struct ether_header))) == NULL) { DPFPRINTF(PF_DEBUG_URGENT, - ("%s: m_len < sizeof(struct ether_header)" - ", pullup failed\n", __func__)); + "%s: m_len < sizeof(struct ether_header)" + ", pullup failed", __func__); return (PF_DROP); } e = mtod(m, struct ether_header *); @@ -6170,8 +6169,8 @@ pf_create_state(struct pf_krule *r, struct pf_test_ctx *ctx, &s->src, &s->dst, &ctx->rewrite)) { /* This really shouldn't happen!!! */ DPFPRINTF(PF_DEBUG_URGENT, - ("%s: tcp normalize failed on first " - "pkt\n", __func__)); + "%s: tcp normalize failed on first " + "pkt", __func__); goto csfailed; } } else if (pd->proto == IPPROTO_SCTP) { @@ -7967,8 +7966,8 @@ pf_test_state_icmp(struct pf_kstate **state, struct pf_pdesc *pd, if (!pf_pull_hdr(pd->m, ipoff2, &h2, sizeof(h2), NULL, reason, pd2.af)) { DPFPRINTF(PF_DEBUG_MISC, - ("pf: ICMP error message too short " - "(ip)\n")); + "pf: ICMP error message too short " + "(ip)"); return (PF_DROP); } /* @@ -7998,8 +7997,8 @@ pf_test_state_icmp(struct pf_kstate **state, struct pf_pdesc *pd, if (!pf_pull_hdr(pd->m, ipoff2, &h2_6, sizeof(h2_6), NULL, reason, pd2.af)) { DPFPRINTF(PF_DEBUG_MISC, - ("pf: ICMP error message too short " - "(ip6)\n")); + "pf: ICMP error message too short " + "(ip6)"); return (PF_DROP); } pd2.off = ipoff2; @@ -8051,8 +8050,8 @@ pf_test_state_icmp(struct pf_kstate **state, struct pf_pdesc *pd, if (!pf_pull_hdr(pd->m, pd2.off, th, 8, NULL, reason, pd2.af)) { DPFPRINTF(PF_DEBUG_MISC, - ("pf: ICMP error message too short " - "(tcp)\n")); + "pf: ICMP error message too short " + "(tcp)"); return (PF_DROP); } pd2.pcksum = &pd2.hdr.tcp.th_sum; @@ -8246,8 +8245,8 @@ pf_test_state_icmp(struct pf_kstate **state, struct pf_pdesc *pd, if (!pf_pull_hdr(pd->m, pd2.off, uh, sizeof(*uh), NULL, reason, pd2.af)) { DPFPRINTF(PF_DEBUG_MISC, - ("pf: ICMP error message too short " - "(udp)\n")); + "pf: ICMP error message too short " + "(udp)"); return (PF_DROP); } pd2.pcksum = &pd2.hdr.udp.uh_sum; @@ -8378,8 +8377,8 @@ pf_test_state_icmp(struct pf_kstate **state, struct pf_pdesc *pd, if (! pf_pull_hdr(pd->m, pd2.off, sh, sizeof(*sh), NULL, reason, pd2.af)) { DPFPRINTF(PF_DEBUG_MISC, - ("pf: ICMP error message too short " - "(sctp)\n")); + "pf: ICMP error message too short " + "(sctp)"); return (PF_DROP); } pd2.pcksum = &pd2.sctp_dummy_sum; @@ -8409,8 +8408,8 @@ pf_test_state_icmp(struct pf_kstate **state, struct pf_pdesc *pd, if (src->scrub->pfss_v_tag != sh->v_tag) { DPFPRINTF(PF_DEBUG_MISC, - ("pf: ICMP error message has incorrect " - "SCTP v_tag\n")); + "pf: ICMP error message has incorrect " + "SCTP v_tag"); return (PF_DROP); } @@ -8533,8 +8532,8 @@ pf_test_state_icmp(struct pf_kstate **state, struct pf_pdesc *pd, if (!pf_pull_hdr(pd->m, pd2.off, iih, ICMP_MINLEN, NULL, reason, pd2.af)) { DPFPRINTF(PF_DEBUG_MISC, - ("pf: ICMP error message too short i" - "(icmp)\n")); + "pf: ICMP error message too short i" + "(icmp)"); return (PF_DROP); } pd2.pcksum = &pd2.hdr.icmp.icmp_cksum; @@ -8653,8 +8652,8 @@ pf_test_state_icmp(struct pf_kstate **state, struct pf_pdesc *pd, if (!pf_pull_hdr(pd->m, pd2.off, iih, sizeof(struct icmp6_hdr), NULL, reason, pd2.af)) { DPFPRINTF(PF_DEBUG_MISC, - ("pf: ICMP error message too short " - "(icmp6)\n")); + "pf: ICMP error message too short " + "(icmp6)"); return (PF_DROP); } pd2.pcksum = &pd2.hdr.icmp6.icmp6_cksum; @@ -9084,7 +9083,7 @@ pf_route(struct pf_krule *r, struct ifnet *oifp, } if (m0->m_len < sizeof(struct ip)) { DPFPRINTF(PF_DEBUG_URGENT, - ("%s: m0->m_len < sizeof(struct ip)\n", __func__)); + "%s: m0->m_len < sizeof(struct ip)", __func__); SDT_PROBE1(pf, ip, route_to, drop, __LINE__); goto bad; } @@ -9389,8 +9388,8 @@ pf_route6(struct pf_krule *r, struct ifnet *oifp, } if (m0->m_len < sizeof(struct ip6_hdr)) { DPFPRINTF(PF_DEBUG_URGENT, - ("%s: m0->m_len < sizeof(struct ip6_hdr)\n", - __func__)); + "%s: m0->m_len < sizeof(struct ip6_hdr)", + __func__); SDT_PROBE1(pf, ip6, route_to, drop, __LINE__); goto bad; } @@ -9685,7 +9684,7 @@ pf_test_eth(int dir, int pflags, struct ifnet *ifp, struct mbuf **m0, if (kif == NULL) { DPFPRINTF(PF_DEBUG_URGENT, - ("%s: kif == NULL, if_xname %s\n", __func__, ifp->if_xname)); + "%s: kif == NULL, if_xname %s", __func__, ifp->if_xname); return (PF_DROP); } if (kif->pfik_flags & PFI_IFLAG_SKIP) @@ -9807,7 +9806,7 @@ pf_walk_option(struct pf_pdesc *pd, struct ip *h, int off, int end, /* IP header in payload of ICMP packet may be too short */ if (pd->m->m_pkthdr.len < end) { - DPFPRINTF(PF_DEBUG_MISC, ("IP option too short\n")); + DPFPRINTF(PF_DEBUG_MISC, "IP option too short"); REASON_SET(reason, PFRES_SHORT); return (PF_DROP); } @@ -9826,18 +9825,18 @@ pf_walk_option(struct pf_pdesc *pd, struct ip *h, int off, int end, continue; } if (off + 2 > end) { - DPFPRINTF(PF_DEBUG_MISC, ("IP length opt\n")); + DPFPRINTF(PF_DEBUG_MISC, "IP length opt"); REASON_SET(reason, PFRES_IPOPTIONS); return (PF_DROP); } length = opts[off + 1]; if (length < 2) { - DPFPRINTF(PF_DEBUG_MISC, ("IP short opt\n")); + DPFPRINTF(PF_DEBUG_MISC, "IP short opt"); REASON_SET(reason, PFRES_IPOPTIONS); return (PF_DROP); } if (off + length > end) { - DPFPRINTF(PF_DEBUG_MISC, ("IP long opt\n")); + DPFPRINTF(PF_DEBUG_MISC, "IP long opt"); REASON_SET(reason, PFRES_IPOPTIONS); return (PF_DROP); } @@ -9883,7 +9882,7 @@ pf_walk_header(struct pf_pdesc *pd, struct ip *h, u_short *reason) /* According to RFC 1112 ttl must be set to 1. */ if ((h->ip_ttl != 1) || !IN_MULTICAST(ntohl(h->ip_dst.s_addr))) { - DPFPRINTF(PF_DEBUG_MISC, ("Invalid IGMP\n")); + DPFPRINTF(PF_DEBUG_MISC, "Invalid IGMP"); REASON_SET(reason, PFRES_IPOPTIONS); return (PF_DROP); } @@ -9901,7 +9900,7 @@ pf_walk_header(struct pf_pdesc *pd, struct ip *h, u_short *reason) return (PF_PASS); if (!pf_pull_hdr(pd->m, pd->off, &ext, sizeof(ext), NULL, reason, AF_INET)) { - DPFPRINTF(PF_DEBUG_MISC, ("IP short exthdr")); + DPFPRINTF(PF_DEBUG_MISC, "IP short exthdr"); return (PF_DROP); } pd->off += (ext.ah_len + 2) * 4; @@ -9911,7 +9910,7 @@ pf_walk_header(struct pf_pdesc *pd, struct ip *h, u_short *reason) return (PF_PASS); } } - DPFPRINTF(PF_DEBUG_MISC, ("IPv4 nested authentication header limit")); + DPFPRINTF(PF_DEBUG_MISC, "IPv4 nested authentication header limit"); REASON_SET(reason, PFRES_IPOPTIONS); return (PF_DROP); } @@ -9927,7 +9926,7 @@ pf_walk_option6(struct pf_pdesc *pd, struct ip6_hdr *h, int off, int end, while (off < end) { if (!pf_pull_hdr(pd->m, off, &opt.ip6o_type, sizeof(opt.ip6o_type), NULL, reason, AF_INET6)) { - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 short opt type")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 short opt type"); return (PF_DROP); } if (opt.ip6o_type == IP6OPT_PAD1) { @@ -9936,11 +9935,11 @@ pf_walk_option6(struct pf_pdesc *pd, struct ip6_hdr *h, int off, int end, } if (!pf_pull_hdr(pd->m, off, &opt, sizeof(opt), NULL, reason, AF_INET6)) { - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 short opt")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 short opt"); return (PF_DROP); } if (off + sizeof(opt) + opt.ip6o_len > end) { - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 long opt")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 long opt"); REASON_SET(reason, PFRES_IPOPTIONS); return (PF_DROP); } @@ -9950,25 +9949,25 @@ pf_walk_option6(struct pf_pdesc *pd, struct ip6_hdr *h, int off, int end, case IP6OPT_JUMBO: pd->badopts |= PF_OPT_JUMBO; if (pd->jumbolen != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 multiple jumbo")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 multiple jumbo"); REASON_SET(reason, PFRES_IPOPTIONS); return (PF_DROP); } if (ntohs(h->ip6_plen) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 bad jumbo plen")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 bad jumbo plen"); REASON_SET(reason, PFRES_IPOPTIONS); return (PF_DROP); } if (!pf_pull_hdr(pd->m, off, &jumbo, sizeof(jumbo), NULL, reason, AF_INET6)) { - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 short jumbo")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 short jumbo"); return (PF_DROP); } memcpy(&pd->jumbolen, jumbo.ip6oj_jumbo_len, sizeof(pd->jumbolen)); pd->jumbolen = ntohl(pd->jumbolen); if (pd->jumbolen < IPV6_MAXPACKET) { - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 short jumbolen")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 short jumbolen"); REASON_SET(reason, PFRES_IPOPTIONS); return (PF_DROP); } @@ -10009,7 +10008,7 @@ pf_walk_header6(struct pf_pdesc *pd, struct ip6_hdr *h, u_short *reason) case IPPROTO_HOPOPTS: if (!pf_pull_hdr(pd->m, pd->off, &ext, sizeof(ext), NULL, reason, AF_INET6)) { - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 short exthdr\n")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 short exthdr"); return (PF_DROP); } if (pf_walk_option6(pd, h, pd->off + sizeof(ext), @@ -10024,19 +10023,19 @@ pf_walk_header6(struct pf_pdesc *pd, struct ip6_hdr *h, u_short *reason) switch (pd->proto) { case IPPROTO_FRAGMENT: if (fraghdr_cnt++) { - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 multiple fragment")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 multiple fragment"); REASON_SET(reason, PFRES_FRAG); return (PF_DROP); } /* jumbo payload packets cannot be fragmented */ if (pd->jumbolen != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 fragmented jumbo")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 fragmented jumbo"); REASON_SET(reason, PFRES_FRAG); return (PF_DROP); } if (!pf_pull_hdr(pd->m, pd->off, &frag, sizeof(frag), NULL, reason, AF_INET6)) { - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 short fragment")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 short fragment"); return (PF_DROP); } /* stop walking over non initial fragments */ @@ -10052,7 +10051,7 @@ pf_walk_header6(struct pf_pdesc *pd, struct ip6_hdr *h, u_short *reason) break; case IPPROTO_ROUTING: if (rthdr_cnt++) { - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 multiple rthdr")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 multiple rthdr"); REASON_SET(reason, PFRES_IPOPTIONS); return (PF_DROP); } @@ -10064,11 +10063,11 @@ pf_walk_header6(struct pf_pdesc *pd, struct ip6_hdr *h, u_short *reason) } if (!pf_pull_hdr(pd->m, pd->off, &rthdr, sizeof(rthdr), NULL, reason, AF_INET6)) { - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 short rthdr")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 short rthdr"); return (PF_DROP); } if (rthdr.ip6r_type == IPV6_RTHDR_TYPE_0) { - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 rthdr0")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 rthdr0"); REASON_SET(reason, PFRES_IPOPTIONS); return (PF_DROP); } @@ -10076,7 +10075,7 @@ pf_walk_header6(struct pf_pdesc *pd, struct ip6_hdr *h, u_short *reason) case IPPROTO_HOPOPTS: /* RFC2460 4.1: Hop-by-Hop only after IPv6 header */ if (pd->proto == IPPROTO_HOPOPTS && hdr_cnt > 0) { - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 hopopts not first")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 hopopts not first"); REASON_SET(reason, PFRES_IPOPTIONS); return (PF_DROP); } @@ -10085,7 +10084,7 @@ pf_walk_header6(struct pf_pdesc *pd, struct ip6_hdr *h, u_short *reason) case IPPROTO_DSTOPTS: if (!pf_pull_hdr(pd->m, pd->off, &ext, sizeof(ext), NULL, reason, AF_INET6)) { - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 short exthdr")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 short exthdr"); return (PF_DROP); } /* fragments may be short */ @@ -10099,7 +10098,7 @@ pf_walk_header6(struct pf_pdesc *pd, struct ip6_hdr *h, u_short *reason) pd->extoff = pd->off; if (pd->proto == IPPROTO_HOPOPTS && pd->fragoff == 0 && ntohs(h->ip6_plen) == 0 && pd->jumbolen != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 missing jumbo\n")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 missing jumbo"); REASON_SET(reason, PFRES_IPOPTIONS); return (PF_DROP); } @@ -10119,7 +10118,7 @@ pf_walk_header6(struct pf_pdesc *pd, struct ip6_hdr *h, u_short *reason) if (!pf_pull_hdr(pd->m, pd->off, &icmp6, sizeof(icmp6), NULL, reason, AF_INET6)) { DPFPRINTF(PF_DEBUG_MISC, - ("IPv6 short icmp6hdr\n")); + "IPv6 short icmp6hdr"); return (PF_DROP); } /* ICMP multicast packets have router alert options */ @@ -10137,7 +10136,7 @@ pf_walk_header6(struct pf_pdesc *pd, struct ip6_hdr *h, u_short *reason) */ if ((h->ip6_hlim != 1) || !IN6_IS_ADDR_LINKLOCAL(&h->ip6_src)) { - DPFPRINTF(PF_DEBUG_MISC, ("Invalid MLD\n")); + DPFPRINTF(PF_DEBUG_MISC, "Invalid MLD"); REASON_SET(reason, PFRES_IPOPTIONS); return (PF_DROP); } @@ -10162,7 +10161,7 @@ pf_walk_header6(struct pf_pdesc *pd, struct ip6_hdr *h, u_short *reason) return (PF_PASS); } } - DPFPRINTF(PF_DEBUG_MISC, ("IPv6 nested extension header limit")); + DPFPRINTF(PF_DEBUG_MISC, "IPv6 nested extension header limit"); REASON_SET(reason, PFRES_IPOPTIONS); return (PF_DROP); } @@ -10207,8 +10206,8 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, if (__predict_false((*m0)->m_len < sizeof(struct ip)) && (pd->m = *m0 = m_pullup(*m0, sizeof(struct ip))) == NULL) { DPFPRINTF(PF_DEBUG_URGENT, - ("%s: m_len < sizeof(struct ip), pullup failed\n", - __func__)); + "%s: m_len < sizeof(struct ip), pullup failed", + __func__); *action = PF_DROP; REASON_SET(reason, PFRES_SHORT); return (-1); @@ -10258,8 +10257,8 @@ pf_setup_pdesc(sa_family_t af, int dir, struct pf_pdesc *pd, struct mbuf **m0, if (__predict_false((*m0)->m_len < sizeof(struct ip6_hdr)) && (pd->m = *m0 = m_pullup(*m0, sizeof(struct ip6_hdr))) == NULL) { DPFPRINTF(PF_DEBUG_URGENT, - ("%s: m_len < sizeof(struct ip6_hdr)" - ", pullup failed\n", __func__)); + "%s: m_len < sizeof(struct ip6_hdr)" + ", pullup failed", __func__); *action = PF_DROP; REASON_SET(reason, PFRES_SHORT); return (-1); @@ -10619,8 +10618,8 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 if (__predict_false(kif == NULL)) { DPFPRINTF(PF_DEBUG_URGENT, - ("%s: kif == NULL, if_xname %s\n", - __func__, ifp->if_xname)); + "%s: kif == NULL, if_xname %s", + __func__, ifp->if_xname); return (PF_DROP); } if (kif->pfik_flags & PFI_IFLAG_SKIP) { @@ -10824,14 +10823,14 @@ pf_test(sa_family_t af, int dir, int pflags, struct ifnet *ifp, struct mbuf **m0 action = PF_DROP; REASON_SET(&reason, PFRES_NORM); DPFPRINTF(PF_DEBUG_MISC, - ("dropping IPv6 packet with ICMPv4 payload")); + "dropping IPv6 packet with ICMPv4 payload"); break; } if (pd.virtual_proto == IPPROTO_ICMPV6 && af != AF_INET6) { action = PF_DROP; REASON_SET(&reason, PFRES_NORM); DPFPRINTF(PF_DEBUG_MISC, - ("pf: dropping IPv4 packet with ICMPv6 payload\n")); + "pf: dropping IPv4 packet with ICMPv6 payload"); break; } action = pf_test_state_icmp(&s, &pd, &reason); @@ -10862,7 +10861,7 @@ done: REASON_SET(&reason, PFRES_IPOPTIONS); pd.act.log = PF_LOG_FORCE; DPFPRINTF(PF_DEBUG_MISC, - ("pf: dropping packet with dangerous headers\n")); + "pf: dropping packet with dangerous headers"); } if (pd.act.max_pkt_size && pd.act.max_pkt_size && @@ -10871,7 +10870,7 @@ done: REASON_SET(&reason, PFRES_NORM); pd.act.log = PF_LOG_FORCE; DPFPRINTF(PF_DEBUG_MISC, - ("pf: dropping overly long packet\n")); + "pf: dropping overly long packet"); } if (s) { @@ -10903,7 +10902,7 @@ done: REASON_SET(&reason, PFRES_MEMORY); pd.act.log = PF_LOG_FORCE; DPFPRINTF(PF_DEBUG_MISC, - ("pf: failed to allocate 802.1q mtag\n")); + "pf: failed to allocate 802.1q mtag"); } } @@ -10960,7 +10959,7 @@ done: REASON_SET(&reason, PFRES_MEMORY); pd.act.log = PF_LOG_FORCE; DPFPRINTF(PF_DEBUG_MISC, - ("pf: failed to allocate tag\n")); + "pf: failed to allocate tag"); } else { pd.pf_mtag->flags |= PF_MTAG_FLAG_FASTFWD_OURS_PRESENT; @@ -10977,7 +10976,7 @@ done: REASON_SET(&reason, PFRES_MEMORY); pd.act.log = PF_LOG_FORCE; DPFPRINTF(PF_DEBUG_MISC, - ("pf: failed to allocate divert tag\n")); + "pf: failed to allocate divert tag"); } } /* XXX: Anybody working on it?! */ diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 5c69c395c5fc..ea9f7fe441c6 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -217,8 +217,6 @@ static u_int16_t tagname2tag(struct pf_tagset *, const char *); static u_int16_t pf_tagname2tag(const char *); static void tag_unref(struct pf_tagset *, u_int16_t); -#define DPFPRINTF(n, x) if (V_pf_status.debug >= (n)) printf x - struct cdev *pf_dev; /* @@ -2143,14 +2141,14 @@ pf_ioctl_addrule(struct pf_krule *rule, uint32_t ticket, ERROUT(EINVAL); if (ticket != ruleset->rules[rs_num].inactive.ticket) { DPFPRINTF(PF_DEBUG_MISC, - ("ticket: %d != [%d]%d\n", ticket, rs_num, - ruleset->rules[rs_num].inactive.ticket)); + "ticket: %d != [%d]%d", ticket, rs_num, + ruleset->rules[rs_num].inactive.ticket); ERROUT(EBUSY); } if (pool_ticket != V_ticket_pabuf) { DPFPRINTF(PF_DEBUG_MISC, - ("pool_ticket: %d != %d\n", pool_ticket, - V_ticket_pabuf)); + "pool_ticket: %d != %d", pool_ticket, + V_ticket_pabuf); ERROUT(EBUSY); } /* @@ -2469,7 +2467,7 @@ pf_start(void) V_pf_status.since = time_uptime; new_unrhdr64(&V_pf_stateid, time_second); - DPFPRINTF(PF_DEBUG_MISC, ("pf: started\n")); + DPFPRINTF(PF_DEBUG_MISC, "pf: started"); } sx_xunlock(&V_pf_ioctl_lock); @@ -2489,7 +2487,7 @@ pf_stop(void) dehook_pf(); dehook_pf_eth(); V_pf_status.since = time_uptime; - DPFPRINTF(PF_DEBUG_MISC, ("pf: stopped\n")); + DPFPRINTF(PF_DEBUG_MISC, "pf: stopped"); } sx_xunlock(&V_pf_ioctl_lock); @@ -3264,9 +3262,9 @@ DIOCGETETHRULE_error: if (nvlist_get_number(nvl, "ticket") != ruleset->inactive.ticket) { DPFPRINTF(PF_DEBUG_MISC, - ("ticket: %d != %d\n", + "ticket: %d != %d", (u_int32_t)nvlist_get_number(nvl, "ticket"), - ruleset->inactive.ticket)); + ruleset->inactive.ticket); ERROUT(EBUSY); } @@ -4340,7 +4338,7 @@ DIOCGETSTATESV2_full: if (error == 0) V_pf_altq_running = 1; PF_RULES_WUNLOCK(); - DPFPRINTF(PF_DEBUG_MISC, ("altq: started\n")); + DPFPRINTF(PF_DEBUG_MISC, "altq: started"); break; } @@ -4359,7 +4357,7 @@ DIOCGETSTATESV2_full: if (error == 0) V_pf_altq_running = 0; PF_RULES_WUNLOCK(); - DPFPRINTF(PF_DEBUG_MISC, ("altq: stopped\n")); + DPFPRINTF(PF_DEBUG_MISC, "altq: stopped"); break; } @@ -6457,9 +6455,9 @@ shutdown_pf(void) for (rs_num = 0; rs_num < PF_RULESET_MAX; ++rs_num) { if ((error = pf_begin_rules(&t[rs_num], rs_num, anchor->path)) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("%s: " - "anchor.path=%s rs_num=%d\n", - __func__, anchor->path, rs_num)); + DPFPRINTF(PF_DEBUG_MISC, "%s: " + "anchor.path=%s rs_num=%d", + __func__, anchor->path, rs_num); goto error; /* XXX: rollback? */ } } @@ -6481,9 +6479,9 @@ shutdown_pf(void) eth_anchor->refcnt = 1; if ((error = pf_begin_eth(&t[0], eth_anchor->path)) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("%s: eth " - "anchor.path=%s\n", __func__, - eth_anchor->path)); + DPFPRINTF(PF_DEBUG_MISC, "%s: eth " + "anchor.path=%s", __func__, + eth_anchor->path); goto error; } error = pf_commit_eth(t[0], eth_anchor->path); @@ -6492,27 +6490,27 @@ shutdown_pf(void) if ((error = pf_begin_rules(&t[0], PF_RULESET_SCRUB, &nn)) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("%s: SCRUB\n", __func__)); + DPFPRINTF(PF_DEBUG_MISC, "%s: SCRUB", __func__); break; } if ((error = pf_begin_rules(&t[1], PF_RULESET_FILTER, &nn)) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("%s: FILTER\n", __func__)); + DPFPRINTF(PF_DEBUG_MISC, "%s: FILTER", __func__); break; /* XXX: rollback? */ } if ((error = pf_begin_rules(&t[2], PF_RULESET_NAT, &nn)) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("%s: NAT\n", __func__)); + DPFPRINTF(PF_DEBUG_MISC, "%s: NAT", __func__); break; /* XXX: rollback? */ } if ((error = pf_begin_rules(&t[3], PF_RULESET_BINAT, &nn)) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("%s: BINAT\n", __func__)); + DPFPRINTF(PF_DEBUG_MISC, "%s: BINAT", __func__); break; /* XXX: rollback? */ } if ((error = pf_begin_rules(&t[4], PF_RULESET_RDR, &nn)) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("%s: RDR\n", __func__)); + DPFPRINTF(PF_DEBUG_MISC, "%s: RDR", __func__); break; /* XXX: rollback? */ } @@ -6531,7 +6529,7 @@ shutdown_pf(void) break; if ((error = pf_begin_eth(&t[0], &nn)) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("%s: eth\n", __func__)); + DPFPRINTF(PF_DEBUG_MISC, "%s: eth", __func__); break; } error = pf_commit_eth(t[0], &nn); @@ -6539,7 +6537,7 @@ shutdown_pf(void) #ifdef ALTQ if ((error = pf_begin_altq(&t[0])) != 0) { - DPFPRINTF(PF_DEBUG_MISC, ("%s: ALTQ\n", __func__)); + DPFPRINTF(PF_DEBUG_MISC, "%s: ALTQ", __func__); break; } pf_commit_altq(t[0]); diff --git a/sys/netpfil/pf/pf_lb.c b/sys/netpfil/pf/pf_lb.c index 9c7863bb301e..ea0d6facf695 100644 --- a/sys/netpfil/pf/pf_lb.c +++ b/sys/netpfil/pf/pf_lb.c @@ -71,8 +71,6 @@ #define V_pf_rdr_srcport_rewrite_tries VNET(pf_rdr_srcport_rewrite_tries) VNET_DEFINE_STATIC(int, pf_rdr_srcport_rewrite_tries) = 16; -#define DPFPRINTF(n, x) if (V_pf_status.debug >= (n)) printf x - static uint64_t pf_hash(struct pf_addr *, struct pf_addr *, struct pf_poolhashkey *, sa_family_t); struct pf_krule *pf_match_translation(int, struct pf_test_ctx *); @@ -904,19 +902,19 @@ pf_get_transaddr(struct pf_test_ctx *ctx, struct pf_krule *r, if (pf_get_mape_sport(pd, r, naddr, nportp, &ctx->udp_mapping, rpool)) { DPFPRINTF(PF_DEBUG_MISC, - ("pf: MAP-E port allocation (%u/%u/%u)" - " failed\n", + "pf: MAP-E port allocation (%u/%u/%u)" + " failed", rpool->mape.offset, rpool->mape.psidlen, - rpool->mape.psid)); + rpool->mape.psid); reason = PFRES_MAPFAILED; goto notrans; } } else if (pf_get_sport(pd, r, naddr, nportp, low, high, rpool, &ctx->udp_mapping, PF_SN_NAT)) { DPFPRINTF(PF_DEBUG_MISC, - ("pf: NAT proxy port allocation (%u-%u) failed\n", - rpool->proxy_port[0], rpool->proxy_port[1])); + "pf: NAT proxy port allocation (%u-%u) failed", + rpool->proxy_port[0], rpool->proxy_port[1]); reason = PFRES_MAPFAILED; goto notrans; } @@ -1085,13 +1083,13 @@ pf_get_transaddr(struct pf_test_ctx *ctx, struct pf_krule *r, * the state may be reused if the TCP state is terminal. */ DPFPRINTF(PF_DEBUG_MISC, - ("pf: RDR source port allocation failed\n")); + "pf: RDR source port allocation failed"); break; out: DPFPRINTF(PF_DEBUG_MISC, - ("pf: RDR source port allocation %u->%u\n", - ntohs(pd->nsport), ntohs(ctx->nk->port[0]))); + "pf: RDR source port allocation %u->%u", + ntohs(pd->nsport), ntohs(ctx->nk->port[0])); break; } default: @@ -1140,8 +1138,8 @@ pf_get_transaddr_af(struct pf_krule *r, struct pf_pdesc *pd) if (pf_get_sport(pd, r, &nsaddr, &nport, r->nat.proxy_port[0], r->nat.proxy_port[1], &r->nat, NULL, PF_SN_NAT)) { DPFPRINTF(PF_DEBUG_MISC, - ("pf: af-to NAT proxy port allocation (%u-%u) failed", - r->nat.proxy_port[0], r->nat.proxy_port[1])); + "pf: af-to NAT proxy port allocation (%u-%u) failed", + r->nat.proxy_port[0], r->nat.proxy_port[1]); return (-1); } diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index 369292ca365e..8cea9557633c 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -160,13 +160,6 @@ static int pf_reassemble6(struct mbuf **, struct ip6_frag *, uint16_t, uint16_t, u_short *); #endif /* INET6 */ -#define DPFPRINTF(x) do { \ - if (V_pf_status.debug >= PF_DEBUG_MISC) { \ - printf("%s: ", __func__); \ - printf x ; \ - } \ -} while(0) - #ifdef INET static void pf_ip2key(struct ip *ip, struct pf_frnode *key) @@ -262,7 +255,8 @@ pf_purge_fragments(uint32_t expire) if (frag->fr_timeout > expire) break; - DPFPRINTF(("expiring %d(%p)\n", frag->fr_id, frag)); + DPFPRINTF(PF_DEBUG_MISC, "expiring %d(%p)", + frag->fr_id, frag); pf_free_fragment(frag); } @@ -281,7 +275,7 @@ pf_flush_fragments(void) PF_FRAG_ASSERT(); goal = uma_zone_get_cur(V_pf_frent_z) * 9 / 10; - DPFPRINTF(("trying to free %d frag entriess\n", goal)); + DPFPRINTF(PF_DEBUG_MISC, "trying to free %d frag entriess", goal); while (goal < uma_zone_get_cur(V_pf_frent_z)) { frag = TAILQ_LAST(&V_pf_fragqueue, pf_fragqueue); if (frag) @@ -573,26 +567,30 @@ pf_fillup_fragment(struct pf_frnode *key, uint32_t id, /* No empty fragments. */ if (frent->fe_len == 0) { - DPFPRINTF(("bad fragment: len 0\n")); + DPFPRINTF(PF_DEBUG_MISC, "bad fragment: len 0"); goto bad_fragment; } /* All fragments are 8 byte aligned. */ if (frent->fe_mff && (frent->fe_len & 0x7)) { - DPFPRINTF(("bad fragment: mff and len %d\n", frent->fe_len)); + DPFPRINTF(PF_DEBUG_MISC, "bad fragment: mff and len %d", + frent->fe_len); goto bad_fragment; } /* Respect maximum length, IP_MAXPACKET == IPV6_MAXPACKET. */ if (frent->fe_off + frent->fe_len > IP_MAXPACKET) { - DPFPRINTF(("bad fragment: max packet %d\n", - frent->fe_off + frent->fe_len)); + DPFPRINTF(PF_DEBUG_MISC, "bad fragment: max packet %d", + frent->fe_off + frent->fe_len); goto bad_fragment; } - DPFPRINTF((key->fn_af == AF_INET ? - "reass frag %d @ %d-%d\n" : "reass frag %#08x @ %d-%d\n", - id, frent->fe_off, frent->fe_off + frent->fe_len)); + if (key->fn_af == AF_INET) + DPFPRINTF(PF_DEBUG_MISC, "reass frag %d @ %d-%d\n", + id, frent->fe_off, frent->fe_off + frent->fe_len); + else + DPFPRINTF(PF_DEBUG_MISC, "reass frag %#08x @ %d-%d", + id, frent->fe_off, frent->fe_off + frent->fe_len); /* Fully buffer all of the fragments in this fragment queue. */ frag = pf_find_fragment(key, id); @@ -690,10 +688,10 @@ pf_fillup_fragment(struct pf_frnode *key, uint32_t id, precut = prev->fe_off + prev->fe_len - frent->fe_off; if (precut >= frent->fe_len) { - DPFPRINTF(("new frag overlapped\n")); + DPFPRINTF(PF_DEBUG_MISC, "new frag overlapped"); goto drop_fragment; } - DPFPRINTF(("frag head overlap %d\n", precut)); + DPFPRINTF(PF_DEBUG_MISC, "frag head overlap %d", precut); m_adj(frent->fe_m, precut); frent->fe_off += precut; frent->fe_len -= precut; @@ -705,7 +703,8 @@ pf_fillup_fragment(struct pf_frnode *key, uint32_t id, aftercut = frent->fe_off + frent->fe_len - after->fe_off; if (aftercut < after->fe_len) { - DPFPRINTF(("frag tail overlap %d", aftercut)); + DPFPRINTF(PF_DEBUG_MISC, "frag tail overlap %d", + aftercut); m_adj(after->fe_m, aftercut); /* Fragment may switch queue as fe_off changes */ pf_frent_remove(frag, after); @@ -713,7 +712,8 @@ pf_fillup_fragment(struct pf_frnode *key, uint32_t id, after->fe_len -= aftercut; /* Insert into correct queue */ if (pf_frent_insert(frag, after, prev)) { - DPFPRINTF(("fragment requeue limit exceeded")); + DPFPRINTF(PF_DEBUG_MISC, + "fragment requeue limit exceeded"); m_freem(after->fe_m); uma_zfree(V_pf_frent_z, after); /* There is not way to recover */ @@ -723,7 +723,7 @@ pf_fillup_fragment(struct pf_frnode *key, uint32_t id, } /* This fragment is completely overlapped, lose it. */ - DPFPRINTF(("old frag overlapped\n")); + DPFPRINTF(PF_DEBUG_MISC, "old frag overlapped"); next = TAILQ_NEXT(after, fr_next); pf_frent_remove(frag, after); m_freem(after->fe_m); @@ -732,7 +732,7 @@ pf_fillup_fragment(struct pf_frnode *key, uint32_t id, /* If part of the queue gets too long, there is not way to recover. */ if (pf_frent_insert(frag, frent, prev)) { - DPFPRINTF(("fragment queue limit exceeded\n")); + DPFPRINTF(PF_DEBUG_MISC, "fragment queue limit exceeded"); goto bad_fragment; } @@ -748,7 +748,7 @@ free_fragment: * fragment, the entire datagram (and any constituent fragments) MUST * be silently discarded. */ - DPFPRINTF(("flush overlapping fragments\n")); + DPFPRINTF(PF_DEBUG_MISC, "flush overlapping fragments"); pf_free_fragment(frag); bad_fragment: @@ -826,7 +826,8 @@ pf_reassemble(struct mbuf **m0, u_short *reason) m = *m0 = NULL; if (frag->fr_holes) { - DPFPRINTF(("frag %d, holes %d\n", frag->fr_id, frag->fr_holes)); + DPFPRINTF(PF_DEBUG_MISC, "frag %d, holes %d", + frag->fr_id, frag->fr_holes); return (PF_PASS); /* drop because *m0 is NULL, no error */ } @@ -872,14 +873,14 @@ pf_reassemble(struct mbuf **m0, u_short *reason) ip->ip_off &= ~(IP_MF|IP_OFFMASK); if (hdrlen + total > IP_MAXPACKET) { - DPFPRINTF(("drop: too big: %d\n", total)); + DPFPRINTF(PF_DEBUG_MISC, "drop: too big: %d", total); ip->ip_len = 0; REASON_SET(reason, PFRES_SHORT); /* PF_DROP requires a valid mbuf *m0 in pf_test() */ return (PF_DROP); } - DPFPRINTF(("complete: %p(%d)\n", m, ntohs(ip->ip_len))); + DPFPRINTF(PF_DEBUG_MISC, "complete: %p(%d)", m, ntohs(ip->ip_len)); return (PF_PASS); } #endif /* INET */ @@ -931,8 +932,8 @@ pf_reassemble6(struct mbuf **m0, struct ip6_frag *fraghdr, m = *m0 = NULL; if (frag->fr_holes) { - DPFPRINTF(("frag %d, holes %d\n", frag->fr_id, - frag->fr_holes)); + DPFPRINTF(PF_DEBUG_MISC, "frag %d, holes %d", frag->fr_id, + frag->fr_holes); PF_FRAG_UNLOCK(); return (PF_PASS); /* Drop because *m0 is NULL, no error. */ } @@ -993,14 +994,15 @@ pf_reassemble6(struct mbuf **m0, struct ip6_frag *fraghdr, ip6->ip6_nxt = proto; *** 309 LINES SKIPPED *** From nobody Wed Jul 23 14:23:56 2025 X-Original-To: dev-commits-src-all@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 4bnGbJ48TFz62NjS; Wed, 23 Jul 2025 14:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnGbJ2Vz0z3pdF; Wed, 23 Jul 2025 14:23:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X8lF0ivMPgTWl63936fCL/pKZV5IYWrcGxrCI30HpcY=; b=U3sepEXPHyk/XMj5Rr4ulpZqXgmxKjmyd0TRC586o1xRWjtPonMD4OQiajoe83mcFOVE2M pUyHF4KmW08HqYRyjo7DfoBFSUwVTZAFIzFQ/RMobxrTkt4J+nMBfWIptae4pi2S7Gsl2g JwPVIvxLKmXk7frSUvr9eT/qjI3Q0cqXHvyWL/ZR4jcJS7eOM7ar4yDpr+DW84WdDELQZ5 Px6G/Va+OdwmLU7BZHKPZ7V6xrAXRSymN21mYoKkuPkCHKi0RfgSrZJPRyjNDDsB16ZpTC MNaeHK+OmYHVitiZGTypEeLr/Z+zgx6DecqDGPF9MVbP8UCbH3KbtqgugoqfbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753280636; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=X8lF0ivMPgTWl63936fCL/pKZV5IYWrcGxrCI30HpcY=; b=hpNXeekHHPjv4IsngUfBHRCZj6P7aYRDlVrAzXIKducjoFSOzwqhOwDi1KdWwl2W7T8gG2 ymjeCbDy39Xaf9Pun688UQretBJPzp4gZT/JbIAkeGYOV2/Q/1CWzZ8Rv4K67OKihOsq7g 57e6T1R6sNLWIcNiqwULFkqmsW0mUIsak3U2n2xNrvyBD6Ej9R/SkT45B/Y8rOayeHohV1 V+sA/YDm3tgyLKZ3kbekI7OtRIv+T2ry+6UxeTM2obHAfwSKRtqH4Hm9X3QHq1C7yG/pU1 9YLVUCUgxPWHQMH8+1uHekGsMJWNgvQ6IxMtVjAntpJojD9gO0dkZT1aD3oExA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753280636; a=rsa-sha256; cv=none; b=YVUz7on8W3SS4APpgpxHtEUwj5I7wuq5lK1vSsEiZlyE3Q+zzD4Kj9fO9vVVlcGTNSMLub aYi/UttbB5HJ4Ul4f9HyK69KWD9Gv83yAAAWwi6m3w5UAwp1ozRMsTXIEk0R4ppiSBq2uU pCIzSClOaB27nu7qK1xXTofHxpgnOShdcE8Ymnt29u29o8SOHJu9Ppf3ygRj/2rVE9YOEb 58rcKV0Y/A7V7JmnYSzz3f0+Rn+bl0/CWerNSqilm5XD2s2Nn81zPOEZSxYkPV5pxdPQ/M pkvVUmzHfZqgkVz7AHYW0Dd6vhbvHO2c4NNCEIez0+2P83jycDu6y9dRJfR/lg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnGbJ1yJKz1Lx; Wed, 23 Jul 2025 14:23:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NENusX031434; Wed, 23 Jul 2025 14:23:56 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NENu80031431; Wed, 23 Jul 2025 14:23:56 GMT (envelope-from git) Date: Wed, 23 Jul 2025 14:23:56 GMT Message-Id: <202507231423.56NENu80031431@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: e83df5367d30 - main - if_ovpn: fill out sin_len/sin6_len List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: e83df5367d30761803e09bd7fcf518638dfe43d2 Auto-Submitted: auto-generated The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e83df5367d30761803e09bd7fcf518638dfe43d2 commit e83df5367d30761803e09bd7fcf518638dfe43d2 Author: Kristof Provost AuthorDate: 2025-07-22 12:41:20 +0000 Commit: Kristof Provost CommitDate: 2025-07-23 13:35:48 +0000 if_ovpn: fill out sin_len/sin6_len When we parse an nvlist sockaddr we should set the sockaddr_in(6)'s length field. This isn't currently used by anything yet, but it's reasonable to expect a sockaddr to contain its length. MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/if_ovpn.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index 7bdbc565f4ca..6755997fd1f0 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -341,6 +341,7 @@ ovpn_nvlist_to_sockaddr(const nvlist_t *nvl, struct sockaddr_storage *sa) size_t len; const void *addr = nvlist_get_binary(nvl, "address", &len); in->sin_family = af; + in->sin_len = sizeof(*in); if (len != sizeof(in->sin_addr)) return (EINVAL); @@ -355,6 +356,7 @@ ovpn_nvlist_to_sockaddr(const nvlist_t *nvl, struct sockaddr_storage *sa) size_t len; const void *addr = nvlist_get_binary(nvl, "address", &len); in6->sin6_family = af; + in6->sin6_len = sizeof(*in6); if (len != sizeof(in6->sin6_addr)) return (EINVAL); From nobody Wed Jul 23 14:38:03 2025 X-Original-To: dev-commits-src-all@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 4bnGvb4Lbyz62Pxv; Wed, 23 Jul 2025 14:38: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnGvb1sPQz3yp0; Wed, 23 Jul 2025 14:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753281483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yxbkmj2iXaImYM09xoVtrOBi6yZeYNv7noWAX99l29Y=; b=ozMc9ObGMyC97cjslwZimn7HSNssKbOe1aYhr2goz/cbmr1KK4ewZ5nD1Ta+sVBV63gxZj 0Nmc0SI2AGz9dp5Emq+P2d7dIhrq64sJhFiJgw0Q91x1Q5Mb44Yxi/SUV4fAwFtDMBRov8 dmernDvB4WBHJOJ24kHdwVn6pwV9i+sxKkttksG7AnChy+jC0Uvv+qZIUuXh6eDvoYJVle oPYp4EV50+4hgRH7K6XZUswrak8opYVSwN8MPs66VkOb4XJaRaWNcfGHkjbsKftlfgTTw8 AETWXbZZSw5jZ+ky4UoiZbDA7m1qG//HVk44wZ/e/oI8WWMxBdU9lyAdElalkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753281483; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yxbkmj2iXaImYM09xoVtrOBi6yZeYNv7noWAX99l29Y=; b=mVqHWI4/fz5w9vSehmrXDlrqsRcKMhYH1Q/W7n0pMavl+evX35JO1oOdKMcDAlJZKEt96R woStuN1ehf/denhqq6Yudso9DmzDBmSSTQjnjRr31z4vfzvH0T+kDheUn3y1gpERRDj4gB QGUun9G1RBa3f/YpGM84ZlG8KO1ad5Q9O65itbXPuSbccAIXqmQW82jXbkXfLlyLIBzFsX B3K83E3PRJhLiNMJGqTkV2HKrCIrR0Fm0HUa7/SpT0XLqrXu3YQzrRdcBKNizJYWPC4ZSE F9J0UpP4mlX1acA99n1TPO+SbZupxHiD82Dwy9j5nF1RjSPeL0dqxCzpDwzLRg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753281483; a=rsa-sha256; cv=none; b=ogOLAl9B3qReXf2wOsCyDTNXotWzi6Wh3q6aj63aTIN1YGbIJO2sLGgcOpPXdbZnLAxkVt l+TVG6iuHqCCZ9ysSvMMHVtswzxtrfKwvoZORwYXPQa8Xat+BpxWSnQKMWQ6lC8gavYlTs yPQFTUp5yOHgEsAGizLV6LNE8GqsoIm8Pt+x6v7Pn9MCCrwmaXdI7uhK1nBrFNvy2IZA1j jFeYSjIlQcYiGcs01xjk92zmppuPHpvEHczxyWWV0y/JOSIuMvZaK5XPmQk3zwBTD6DtS8 IVOraipYMBmmuqKZQILqQ/w20qf02tC+/NLQQsf4cRYlJnS3YwYaXr0jJnkLRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnGvb0V3rz2KK; Wed, 23 Jul 2025 14:38:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NEc30b051045; Wed, 23 Jul 2025 14:38:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NEc3CG051042; Wed, 23 Jul 2025 14:38:03 GMT (envelope-from git) Date: Wed, 23 Jul 2025 14:38:03 GMT Message-Id: <202507231438.56NEc3CG051042@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 4b5ed4ef606b - main - share/termcap: Update entries for st terminal 0.9.2 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 4b5ed4ef606b9dbf6189f3c445f32f36d26b8ecf Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=4b5ed4ef606b9dbf6189f3c445f32f36d26b8ecf commit 4b5ed4ef606b9dbf6189f3c445f32f36d26b8ecf Author: Artem Bunichev AuthorDate: 2025-07-23 14:36:31 +0000 Commit: Warner Losh CommitDate: 2025-07-23 14:36:31 +0000 share/termcap: Update entries for st terminal 0.9.2 Although not strictly required, since termino takes priority, we had obsolete data for the st terminal emulator from 0.8. It won't hurt and may help some people. Reviewed by: imp, bapt, markj Differential Revision: https://reviews.freebsd.org/D51463 --- share/termcap/termcap | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/share/termcap/termcap b/share/termcap/termcap index 46b89d0b3ddf..44704653045d 100644 --- a/share/termcap/termcap +++ b/share/termcap/termcap @@ -4705,14 +4705,14 @@ xterm-termite|VTE-based terminal:\ :ti=\E[?1049h:ts=\E]2;:u6=\E[%i%d;%dR:u7=\E[6n:ue=\E[24m:\ :up=\E[A:us=\E[4m:ve=\E[?25h:vi=\E[?25l: -# Termcap for st terminal taken from the st-0.8 sources -st|simpleterm:\ +# Termcap for st terminal taken from the st-0.9.2 sources +st-mono|simpleterm monocolor:\ :am:hs:mi:ms:xn:\ :co#80:it#8:li#24:\ :AL=\E[%dL:DC=\E[%dP:DL=\E[%dM:DO=\E[%dB:IC=\E[%d@:\ :K1=\E[1~:K2=\EOu:K3=\E[5~:K4=\E[4~:K5=\E[6~:LE=\E[%dD:\ - :RI=\E[%dC:SF=\E[%dS:UP=\E[%dA:ae=\E(B:al=\E[L:as=\E(0:\ - :bl=^G:bt=\E[Z:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\ + :RI=\E[%dC:SF=\E[%dS:SR=\E[%dT:UP=\E[%dA:ae=\E(B:al=\E[L:\ + :as=\E(0:bl=^G:bt=\E[Z:cd=\E[J:ce=\E[K:cl=\E[H\E[2J:\ :cm=\E[%i%d;%dH:cr=\r:cs=\E[%i%d;%dr:ct=\E[3g:dc=\E[P:\ :dl=\E[M:do=\n:ec=\E[%dX:ei=\E[4l:fs=^G:ho=\E[H:im=\E[4h:\ :is=\E[4l\E>\E[?1034l:k1=\EOP:k2=\EOQ:k3=\EOR:k4=\EOS:\ @@ -4725,6 +4725,14 @@ st|simpleterm:\ :ue=\E[24m:up=\E[A:us=\E[4m:vb=\E[?5h\E[?5l:\ :ve=\E[?12l\E[?25h:vi=\E[?25l:vs=\E[?25h: +st|simpleterm:\ + :Co#8:\ + :AB=\E[4%dm:AF=\E[3%dm:\ + :..Sb=\E[4%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m:\ + :..Sf=\E[3%?%p1%{1}%=%t4%e%p1%{3}%=%t6%e%p1%{4}%=%t1%e%p1%{6}%=%t3%e%p1%d%;m:\ + :..sa=%?%p9%t\E(0%e\E(B%;\E[0%?%p6%t;1%;%?%p2%t;4%;%?%p1%p3%|%t;7%;%?%p4%t;5%;%?%p7%t;8%;m:\ + :tc=st-mono: + st-256color|simpleterm with 256 colors:\ :cc:\ :Co#256:pa#32767:\ @@ -4742,6 +4750,12 @@ st-meta-256color|simpleterm with meta key and 256 colors:\ :is=\E[4l\E>\E[?1034h:mm=\E[?1034h:mo=\E[?1034l:\ :rs=\E[4l\E>\E[?1034h:tc=st-256color: +st-bs|simpleterm with backspace as backspace:\ + :kD=\177:kb=^H:tc=st: + +st-bs-256color|simpleterm with backspace as backspace and 256colors:\ + :kD=\177:kb=^H:tc=st-256color: + # From version 0.13.3 xterm-kitty|KovId's TTY:\ From nobody Wed Jul 23 15:51:18 2025 X-Original-To: dev-commits-src-all@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 4bnJX633R2z62TVq; Wed, 23 Jul 2025 15:51:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnJX61vp2z3LJh; Wed, 23 Jul 2025 15:51:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753285878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yj5pLe5AsHah4I9Bx+1A+pDaIvMRsOvuyJosOi2YlPk=; b=X2LT5+/q1cxMJSBPqq6PxkeOExlbUPcuv4gg+3+v3yDE07hXEJmKhwuc9xmlHt9ut9jpiT pZKX3D+u3YX5CK+0MAh+rzK8X4/c7KohKlxikzKYgTg6woUNTKdROjqOOWYJ8/wwc71ybV +TadBro+AXGJ5OqwWp7c1P1QCWB+g6LlUJ7MF7Dts5NbRqlrZylt34p9HAhqPm4Wm6RK7J QUpCg8tbOitNVLFIyAtUau7AtbjYENlyw0IQ2aWRxWsFnKeQLmXwbCKIcNviewdmb3WXkD ws55V6ZzvHnpLRObNsODa4TTxMBQk3t8N+whuVURVyZSUXSQZpmPIlqaEN+DUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753285878; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yj5pLe5AsHah4I9Bx+1A+pDaIvMRsOvuyJosOi2YlPk=; b=hf+KpK6NpqoVHGBs2mQ0BntIbg3tpJwVavVs/+E5wD1CB06eeRNQQNefTtDNv4CaKsAxgv C8mfdz//plq68KI2+zyyX6gohY0TMS+XEfCgM4oTHSzbIYNgDhGV18RGiuvduZty8YI5+a Cb3rzX/IVF6eKhL5AQhJlTzybph1Jxgiaqh5BxAeKN8krQHSPCO127v6c6WJYoEkRWt3nP f0vqVY6P7a/tObZ/i5Ux0GQ2BmWB9YuTgZxhVVmTlo10ii8IoJa9VPEJJIEJ0/1x1CUHQQ dc68dyZgHqxoV0ax0Xcm/5jKsmqLo6lIflhZcUK5mbFftcUbZ8A6EJtGwrX+Cw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753285878; a=rsa-sha256; cv=none; b=m8yHKEU5XLX7DWSEtN+oMXXgDPeJwDAIugXjDnkwYUBOwDzDifRCINglzf9n/hlSN4JPj9 TxTWifJ1mUhCdqznaKzkvvDLNze6bz6zFZ2wrWbeoKwd6wdjzlFYS0R6QOaAcyXdF6wPce 50HxEcAUsqyKal42cQgcjLS0jijGPR3zhL8qKtk5SRMhuHyVIJJqZZD/OX9h0l9G6pMGsw LN7r+Jg77Kg4Ynyaqv/Df7cAFAQvZ6IscVjfQAUqAfO+Mv35dS5Z134yHm+D4zeyOIIAle 3Lj+oCHi0Is9cCYyS+FsX/7uzyx4x+rHXwR8Z/zB7Lgh+qsEO0YwMOztVnGvSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnJX61Fv4z3tN; Wed, 23 Jul 2025 15:51:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NFpIWW097518; Wed, 23 Jul 2025 15:51:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NFpIra097515; Wed, 23 Jul 2025 15:51:18 GMT (envelope-from git) Date: Wed, 23 Jul 2025 15:51:18 GMT Message-Id: <202507231551.56NFpIra097515@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: ShengYi Hung Subject: git: 48266828f5bb - main - bhyve: use speed in hci to allow backend modify it. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 48266828f5bb2cd9f0f7b69ce8eb5568e75a8b22 Auto-Submitted: auto-generated The branch main has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=48266828f5bb2cd9f0f7b69ce8eb5568e75a8b22 commit 48266828f5bb2cd9f0f7b69ce8eb5568e75a8b22 Author: ShengYi Hung AuthorDate: 2025-07-18 14:26:37 +0000 Commit: ShengYi Hung CommitDate: 2025-07-23 15:50:59 +0000 bhyve: use speed in hci to allow backend modify it. The speed of a USB device may be determined dynamically by the backend. For example, USB device passthrough depends on the internal device reporting its speed accurately. To accommodate this, we now obtain the speed from the USB HCI rather than initializing it statically from the UE structure. If the backend does not provide a speed, we fall back to the value in the UE structure. Reviewed by: emaste Approved by: markj (mentor), lwhsu (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51411 --- usr.sbin/bhyve/pci_xhci.c | 11 +++++++---- usr.sbin/bhyve/usb_emul.h | 1 + 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bhyve/pci_xhci.c b/usr.sbin/bhyve/pci_xhci.c index 5b21361f2823..29001755cbbf 100644 --- a/usr.sbin/bhyve/pci_xhci.c +++ b/usr.sbin/bhyve/pci_xhci.c @@ -2588,7 +2588,7 @@ pci_xhci_reset_port(struct pci_xhci_softc *sc, int portn, int warm) if (dev) { port->portsc &= ~(XHCI_PS_PLS_MASK | XHCI_PS_PR | XHCI_PS_PRC); port->portsc |= XHCI_PS_PED | - XHCI_PS_SPEED_SET(dev->dev_ue->ue_usbspeed); + XHCI_PS_SPEED_SET(dev->hci.hci_speed); if (warm && dev->dev_ue->ue_usbver == 3) { port->portsc |= XHCI_PS_WRC; @@ -2622,11 +2622,11 @@ pci_xhci_init_port(struct pci_xhci_softc *sc, int portn) if (dev->dev_ue->ue_usbver == 2) { port->portsc |= XHCI_PS_PLS_SET(UPS_PORT_LS_POLL) | - XHCI_PS_SPEED_SET(dev->dev_ue->ue_usbspeed); + XHCI_PS_SPEED_SET(dev->hci.hci_speed); } else { port->portsc |= XHCI_PS_PLS_SET(UPS_PORT_LS_U0) | - XHCI_PS_PED | /* enabled */ - XHCI_PS_SPEED_SET(dev->dev_ue->ue_usbspeed); + XHCI_PS_PED | /* enabled */ + XHCI_PS_SPEED_SET(dev->hci.hci_speed); } DPRINTF(("Init port %d 0x%x", portn, port->portsc)); @@ -2833,6 +2833,7 @@ pci_xhci_parse_devices(struct pci_xhci_softc *sc, nvlist_t *nvl) dev->hci.hci_sc = dev; dev->hci.hci_intr = pci_xhci_dev_intr; dev->hci.hci_event = pci_xhci_dev_event; + dev->hci.hci_speed = USB_SPEED_MAX; if (ue->ue_usbver == 2) { if (usb2_port == sc->usb2_port_start + @@ -2863,6 +2864,8 @@ pci_xhci_parse_devices(struct pci_xhci_softc *sc, nvlist_t *nvl) dev->dev_ue = ue; dev->dev_sc = devsc; + if (dev->hci.hci_speed == USB_SPEED_MAX) + dev->hci.hci_speed = ue->ue_usbspeed; XHCI_SLOTDEV_PTR(sc, slot) = dev; ndevices++; diff --git a/usr.sbin/bhyve/usb_emul.h b/usr.sbin/bhyve/usb_emul.h index 8e0afcb2878b..85dedfeacd3b 100644 --- a/usr.sbin/bhyve/usb_emul.h +++ b/usr.sbin/bhyve/usb_emul.h @@ -85,6 +85,7 @@ struct usb_hci { /* controller managed fields */ int hci_address; int hci_port; + int hci_speed; }; /* From nobody Wed Jul 23 16:23:02 2025 X-Original-To: dev-commits-src-all@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 4bnKDl2rfMz62W8w; Wed, 23 Jul 2025 16:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnKDl0w6jz3dj3; Wed, 23 Jul 2025 16:23:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753287783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yLIDnWliSgJO2A7D71qMP3wtz7aHwC2gTqMkTH0Ewfg=; b=NBXBP+dsmJDP4Q9wijdDqgv4vH2exGyecorJBPhcxrGgnYymA4DIdG1cfwFLVxG2t1QkDq /iSenA+uPAfYsObzKJdB9U0iFwYGf1jdSWDDEfN4WoKZ9r7Jtq5OZ4H18WzIpEOpZ5i0s1 RDeVG2mTeUm6h8ik3qN54IQ7yg5FFrrYR9PlrzTw48xMdJdgBSm/+PU3IRZ8J3Ob0G19Dv v63HxwYSt7qechtZk6BPlrjrKf2ghgxzEB+07SZbcl0F9pGop03OcuCwJ+yaCGjA+kjjr/ qf7btZGj6ltQpOTI9d50oLpBL9eU2Dqvj5onT+E/3KVh/eRAhwJWZf3wDPn68A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753287783; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=yLIDnWliSgJO2A7D71qMP3wtz7aHwC2gTqMkTH0Ewfg=; b=TNFE6cbTqjl+OIkPqoLweyN7XIDYAt41K2SN7pNXe5hj/gNJrMEvwmDQU4mrYnxLBE3N7K IeTvfYJYRLL54VWzxQhXXwtXSBxK4boNaWv3SxdiLWR+72T+yLwBodsqjzoYfxNNwnFk9z gOd1pk5O4uoJzXykkfOip61uChTno3XWsJevvKB/IwrqiK+SYOarGzPHhQbAnoyxMcvXo6 aqDqM7gu4LIh4PaPhP/ck5WwYx43huJ5teTiDOxGghgA7MP6J40dx80CT1CClq3FhEhSio 2GaAKYN6gmcYT3X1E61Fh1xBmp2wVChSO2N0aQbCD5501Svewu5v0J4GRPmTEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753287783; a=rsa-sha256; cv=none; b=joPjf/ViP2F7azSUIBRbXVF9dv5bLFBjG72PE7owbhkdAJF9UJsfVv5feY/jfZfp9PY0FC E4e+B05cjY9sJPyu7PPn/aULKsbauZtaLL+LkJeblQiLx2532eIKw1SftB9Ao1DjoAEH+y IcPaSl4DAEAqfTeNdkagJ4TofKzpMaW0eiMeTetqT07y3LdGGjNJVvQcsF0idsES9RJEyO 7enp2lj2tvq+Vyt6Xs9OKSGYdHCusO0dZh1OT6/J5r7bfmCg56jr4Ph77HRkWsagdUs9aJ oTei1DptHbBtW80lQP9RFFtBQNxZUOOJupsAy3oHIcUOy91PCkVfjnobJjxLQA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnKDl0VTRz4st; Wed, 23 Jul 2025 16:23:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NGN2K0057667; Wed, 23 Jul 2025 16:23:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NGN28T057664; Wed, 23 Jul 2025 16:23:02 GMT (envelope-from git) Date: Wed, 23 Jul 2025 16:23:02 GMT Message-Id: <202507231623.56NGN28T057664@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 8b4908f83b9d - main - vfs: Lower-case VOP_WRITE pre and post hooks List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 8b4908f83b9d20eb37d561e32d57eca5efa88ca7 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8b4908f83b9d20eb37d561e32d57eca5efa88ca7 commit 8b4908f83b9d20eb37d561e32d57eca5efa88ca7 Author: Mark Johnston AuthorDate: 2025-07-23 01:52:31 +0000 Commit: Mark Johnston CommitDate: 2025-07-23 16:20:31 +0000 vfs: Lower-case VOP_WRITE pre and post hooks For consistency with hooks for other VOPs. No functional change intended. Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D51314 --- sys/kern/vnode_if.src | 4 ++-- sys/sys/vnode.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index 4684eb8a7d77..2e63215b2f97 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -242,8 +242,8 @@ vop_read_pgcache { %% write vp L L L -%! write pre VOP_WRITE_PRE -%! write post VOP_WRITE_POST +%! write pre vop_write_pre +%! write post vop_write_post vop_write { IN struct vnode *vp; diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 201e260c41f5..c4944965a484 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1042,7 +1042,7 @@ void vop_rename_fail(struct vop_rename_args *ap); } \ } while (0) -#define VOP_WRITE_PRE(ap) \ +#define vop_write_pre(ap) \ struct vattr va; \ int error; \ off_t osize, ooffset, noffset; \ @@ -1056,7 +1056,7 @@ void vop_rename_fail(struct vop_rename_args *ap); osize = (off_t)va.va_size; \ } -#define VOP_WRITE_POST(ap, ret) \ +#define vop_write_post(ap, ret) \ noffset = (ap)->a_uio->uio_offset; \ if (noffset > ooffset) { \ if (!VN_KNLIST_EMPTY((ap)->a_vp)) { \ From nobody Wed Jul 23 16:23:01 2025 X-Original-To: dev-commits-src-all@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 4bnKDk3sl7z62Vwd; Wed, 23 Jul 2025 16:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnKDk0fTJz3dZG; Wed, 23 Jul 2025 16:23:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753287782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nfnS6SgAkga01TjCk3UtUemp81BTPXCjdz9u7A8qRiI=; b=CATgKleMdIyfG5VnRS6qY/T1rMFUKr3OBeTskkK12TYjNSDTyC5Lt/jC4nhUik+W8fvF9Q fJsbokzFVOpLL3Mn43zRxZetrtpDpp/hXEPrO/8miem48Mz1P9Gk5J0TkF1wLrMRiGCQML OsIFUE1FHdezi7bmZ2nX5YUcLWH/5RHbIj5H+E8ZGom3uWrTunEU3QhTZbBIAfyqj00MlA NzbcxgmPz99KvoupMlPYH+GEIY9q/kjvC8dKnQLn8fXBF9LFvdHtcCkK7e+DVJ7ZhLNKgo j4vMsyPUKS7fgpOY52b1AysW4lMtM/C+HFCUUiOwS+frNpYECjLbmhZjYCryRQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753287782; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nfnS6SgAkga01TjCk3UtUemp81BTPXCjdz9u7A8qRiI=; b=wL+wVEELmLP69wJgr7CJwW1hkDEFiJBFk4ARdiGXOSLEPpPXDyJRAOjxVsYOkVPW73YeGn Phh8eSSo0PwqrmJwcCEr6RBo1x1BHO+ZccEhF7fNr3lMcDVg42XWW7toKgZrDsVpMK/7is Rc2marTQwIuhGwMyaswMebiQws5V15mICtlm0fp0KYX5jN3024RZoRTq65ywKcZ+AnNCUF 68jrF7ARfJ47KPBS5dE+Kl+nVMyQazdi2pJrENM4pmMl8psjQoMHRRGhjQHCSZ5jwRVBSH OE9Z1/hT4LHTPut2OEUgs9gOxnjoppdxZasGzsCNpVZi/Buyz1rVT2MY+6CNyw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753287782; a=rsa-sha256; cv=none; b=VDvWDa/naGUUITTgE38fAagU6whjLohgu6THxWa8JVTDFXVo5yGdkKF5oKLf1LGGphZp9x vgmqCRYUJB18yG5e7DtUgJqFwpW2UXjYNbKzJu43D1y3bCy/NfDquC7rdwaXkovGullJjk VfFHd42WvbwgH9HnZG0YsCK7N2er+1KGAoC4WxTnoBsBix/gUQqawqE2Sy++jmWOHuLDlm PNbTXsz6PxoRqq8oCC+pjnw0xe2W5o/IFc6EdHhuBfFTsetEI0v40cRq9YXlXPhcMpYURO 4R9wlxwXgHhC96bbPETBMbgCYUuJfKM1yU5P6YeO/6Z2J7iEPRdD9XO4D67b9g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnKDj6gp2z5VX; Wed, 23 Jul 2025 16:23:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NGN1Ea057623; Wed, 23 Jul 2025 16:23:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NGN1GM057619; Wed, 23 Jul 2025 16:23:01 GMT (envelope-from git) Date: Wed, 23 Jul 2025 16:23:01 GMT Message-Id: <202507231623.56NGN1GM057619@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 77b273d8f5f4 - main - vfs: Assert that VOP_READDIR sets *eofflag properly List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 77b273d8f5f40939841952cf8daf6e934922d264 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=77b273d8f5f40939841952cf8daf6e934922d264 commit 77b273d8f5f40939841952cf8daf6e934922d264 Author: Mark Johnston AuthorDate: 2025-07-23 01:52:13 +0000 Commit: Mark Johnston CommitDate: 2025-07-23 16:20:31 +0000 vfs: Assert that VOP_READDIR sets *eofflag properly Suggested by: kib Reviewed by: olce, kib MFC after: 1 month Differential Revision: https://reviews.freebsd.org/D51300 --- sys/kern/vfs_subr.c | 11 ----------- sys/kern/vnode_if.src | 1 + sys/sys/vnode.h | 29 ++++++++++++++++++++++++++++- 3 files changed, 29 insertions(+), 12 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 918b256e6c59..29774cf87393 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -6533,17 +6533,6 @@ vop_read_pgcache_post(void *ap, int rc) VFS_KNOTE_UNLOCKED(a->a_vp, NOTE_READ); } -void -vop_readdir_post(void *ap, int rc) -{ - struct vop_readdir_args *a = ap; - - if (!rc) { - VFS_KNOTE_LOCKED(a->a_vp, NOTE_READ); - INOTIFY(a->a_vp, IN_ACCESS); - } -} - static struct knlist fs_knlist; static void diff --git a/sys/kern/vnode_if.src b/sys/kern/vnode_if.src index 38138a4af921..4684eb8a7d77 100644 --- a/sys/kern/vnode_if.src +++ b/sys/kern/vnode_if.src @@ -380,6 +380,7 @@ vop_symlink { %% readdir vp L L L +%! readdir pre vop_readdir_pre %! readdir post vop_readdir_post vop_readdir { diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 2c6947103c94..201e260c41f5 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -939,7 +939,6 @@ void vop_mknod_post(void *a, int rc); void vop_open_post(void *a, int rc); void vop_read_post(void *a, int rc); void vop_read_pgcache_post(void *ap, int rc); -void vop_readdir_post(void *a, int rc); void vop_reclaim_post(void *a, int rc); void vop_remove_pre(void *a); void vop_remove_post(void *a, int rc); @@ -1015,6 +1014,34 @@ void vop_rename_fail(struct vop_rename_args *ap); _error; \ }) +#ifdef INVARIANTS +#define vop_readdir_pre_assert(ap) \ + ssize_t nresid, oresid; \ + \ + oresid = (ap)->a_uio->uio_resid; + +#define vop_readdir_post_assert(ap, ret) \ + nresid = (ap)->a_uio->uio_resid; \ + if ((ret) == 0 && (ap)->a_eofflag != NULL) { \ + VNASSERT(nresid != oresid || *(ap)->a_eofflag == 1, \ + (ap)->a_vp, ("VOP_READDIR: eofflag not set")); \ + } +#else +#define vop_readdir_pre_assert(ap) +#define vop_readdir_post_assert(ap, ret) +#endif + +#define vop_readdir_pre(ap) do { \ + vop_readdir_pre_assert(ap) + +#define vop_readdir_post(ap, ret) \ + vop_readdir_post_assert(ap, ret); \ + if ((ret) == 0) { \ + VFS_KNOTE_LOCKED((ap)->a_vp, NOTE_READ); \ + INOTIFY((ap)->a_vp, IN_ACCESS); \ + } \ +} while (0) + #define VOP_WRITE_PRE(ap) \ struct vattr va; \ int error; \ From nobody Wed Jul 23 16:22:59 2025 X-Original-To: dev-commits-src-all@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 4bnKDh2Kghz62VgH; Wed, 23 Jul 2025 16:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnKDg5Yb9z3dkw; Wed, 23 Jul 2025 16:22:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753287779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZkkBk+TiGzBrVW2TjX6OmEIZK7tU+cEgGbQfPoYp/y4=; b=UO+bvuJ0+j6FtO+o+JXabfqg9SXBGPDIBEiMW52DaNMphR7xkwx2ljgM/VjfpmWQV4Xx0+ PVky/Zw+aDYm7JNNGo2HF1q/gQ6NrQ7C0dSPNnS5mDyUKNS2TN5wIdEd1V7y2pbgplnVaY 4X0ycsQuMciuAgsBr+fTo0ep6YHGXIHtELwVdtsuxFiY1nL6o9XhFayrLH7yJpVUCapF3A ZLJ1kGi04O+oXF9NdERJD7F/MhxQgLbcVLexxZjemFLPtraKdx4Af0/Xw30jyTRWhEOfFi a/oj/e+m7Z5gSbyeoFvh99o7qvTc6Y69j6AKsgY+jhFElMhxEQdQ/HcrOCF5Yw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753287779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZkkBk+TiGzBrVW2TjX6OmEIZK7tU+cEgGbQfPoYp/y4=; b=b3nux6H0ieYdlHZJCLp5U+xP5uVjm5u+PscPoM4j8SY+QQ81Zuf75KeNGXGBWTgaiRCWvX /AotNRVSh3f8D76JWD2FFEqyUjOo9PhJ0gj5Z3IbaFDKBWrUz1Usm62gbQda/EMhj8bTx+ 2PGejCNR9X8Ch6FbAAwNujf7ngLETFVax8EmgW3BDaKw+NCOGKOyCEV33eOQ+eAElm9zb9 EYLjhqHAHhF03oBBlAlYBY3voD09CpjoXF/73y1nHEKb7WEBH4lTjm0d4PMfUTrFu5l773 4MUfOvf61Jz4c0HEjpocSvqvSKIh4tpCRwinZJ/IpZRWwiWZX26Tlrs7sRED4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753287779; a=rsa-sha256; cv=none; b=GJ/DIdQ0LAdO2sdw3xr/oYBBkcGxJAByy4iEmLv8QcIKn1+G+p+Dawl29y8UvIcMnd3IGV 3TCiKHWReAOCMfmciTODDklHgpFh19XN9yTEUpC6WrgZLGfCwcq5d0NTKotGleSbhy3VC3 aiVCkbs5pQDgUxudZUx4lqPfjl2yqu1s1+YIumTZjVPIL+m9iRImgR5BOQS6eGLFVj8POe be/Rn4EG4CP3VsgXzzj6XJqNW4j2ufqJ/8XSBOtzp9PL2AMDGrbgJldyiqA7O/ogCwJ1dF GH3eCmM6N5dZgl9DQFe5U6hq8z/tQxNa67c+QDBJyxbYDb7PABCxdjlK9SpZUw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnKDg54vfz56g; Wed, 23 Jul 2025 16:22:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NGMxnm057545; Wed, 23 Jul 2025 16:22:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NGMxR6057542; Wed, 23 Jul 2025 16:22:59 GMT (envelope-from git) Date: Wed, 23 Jul 2025 16:22:59 GMT Message-Id: <202507231622.56NGMxR6057542@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: e9b713513a78 - main - pseudofs: Simplify pfs_readdir() and set eofflag List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: e9b713513a78ccb01dbfa1a3f087f94b33531787 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e9b713513a78ccb01dbfa1a3f087f94b33531787 commit e9b713513a78ccb01dbfa1a3f087f94b33531787 Author: Mark Johnston AuthorDate: 2025-07-23 01:52:38 +0000 Commit: Mark Johnston CommitDate: 2025-07-23 16:20:31 +0000 pseudofs: Simplify pfs_readdir() and set eofflag There were two loops, one to skip entries before the requested offset, and one to populate entries. Merge them and use the return value of pfs_iterate() to decide whether to set eofflag. As a side effect, this fixes a small bug: the first loop would decrement `offset` to zero, and the second loop would increment it again. However, `offset` was used to set `d_off`, and we should include the starting offset there. Add a comment explaining the use of the allproc lock. Reviewed by: des, kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D51462 --- sys/fs/pseudofs/pseudofs_vnops.c | 31 +++++++++++++++---------------- 1 file changed, 15 insertions(+), 16 deletions(-) diff --git a/sys/fs/pseudofs/pseudofs_vnops.c b/sys/fs/pseudofs/pseudofs_vnops.c index 0bdfedffafcb..8cd092118d0e 100644 --- a/sys/fs/pseudofs/pseudofs_vnops.c +++ b/sys/fs/pseudofs/pseudofs_vnops.c @@ -850,7 +850,7 @@ pfs_readdir(struct vop_readdir_args *va) struct uio *uio; struct pfsentry *pfsent, *pfsent2; struct pfsdirentlist lst; - off_t offset; + off_t coffset, offset; int error, i, resid; STAILQ_INIT(&lst); @@ -860,6 +860,9 @@ pfs_readdir(struct vop_readdir_args *va) PFS_TRACE(("%s pid %lu", pd->pn_name, (unsigned long)pid)); pfs_assert_not_owned(pd); + if (va->a_eofflag != NULL) + *va->a_eofflag = 0; + if (vn->v_type != VDIR) PFS_RETURN (ENOTDIR); KASSERT_PN_IS_DIR(pd); @@ -878,6 +881,10 @@ pfs_readdir(struct vop_readdir_args *va) if (pid != NO_PID && !pfs_lookup_proc(pid, &proc)) PFS_RETURN (ENOENT); + /* + * The allproc lock is required in pfs_iterate() for procdir + * directories. + */ sx_slock(&allproc_lock); pfs_lock(pd); @@ -897,23 +904,15 @@ pfs_readdir(struct vop_readdir_args *va) } } - /* skip unwanted entries */ - for (pn = NULL, p = NULL; offset > 0; offset -= PFS_DELEN) { + for (pn = NULL, p = NULL, coffset = 0; resid >= PFS_DELEN; + coffset += PFS_DELEN) { if (pfs_iterate(curthread, proc, pd, &pn, &p) == -1) { - /* nothing left... */ - if (proc != NULL) { - _PRELE(proc); - PROC_UNLOCK(proc); - } - pfs_unlock(pd); - sx_sunlock(&allproc_lock); - PFS_RETURN (0); + if (va->a_eofflag != NULL) + *va->a_eofflag = 1; + break; } - } - - /* fill in entries */ - while (pfs_iterate(curthread, proc, pd, &pn, &p) != -1 && - resid >= PFS_DELEN) { + if (coffset < offset) + continue; if ((pfsent = malloc(sizeof(struct pfsentry), M_IOV, M_NOWAIT | M_ZERO)) == NULL) { error = ENOMEM; From nobody Wed Jul 23 16:24:43 2025 X-Original-To: dev-commits-src-all@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 4bnKGg5ppsz62VsF; Wed, 23 Jul 2025 16:24: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnKGg2zwyz3gcX; Wed, 23 Jul 2025 16:24:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753287883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wKwMO0jkWtKogj6WHG5+eRE2CDwDU1iSBYSJGf6GrYg=; b=EXjjrJPhYh8zrMjy8X3KlaKI4HXrfmugyUAXTbkyU9if8l34UMVGf+n/Hj5BOPc2DJEtvo 4ZqjMoGIRx2KyCSFlUm4dwwtmhzl8hDntvTmIhzzTA3G4OcidWZvVFZ6+IcRp+us1+2rnA ZxKEJPuEH4MlZj9q5sRoIm5qdpp6Vytuaj3yWtTKdHknxpA+9tjmz6dtg9ZbCXnCkoQdKR eBG+0wwMeIbtu/2HjclG/H5/XBtY1swnJ2Gm+TO1IxbFk+yAvetYu8SjQEhVQFm+pHnQtn J2XFQfk/SyfTAJD3T5IuW4PDaVEtK4gwKA1yTDLM6SiXkhOmChpQZqGp3ITdTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753287883; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wKwMO0jkWtKogj6WHG5+eRE2CDwDU1iSBYSJGf6GrYg=; b=KICo4gOwtSBAJjIeYQaMVR0sCvZ3rgULAYt+uSF9QQoUYrFOqh1CV4EckKUd4qX65jtplr M17XKm4gjJWrj+V+DQAifEEDp+8DxrZ2pM9YonAxcQliVzIc8BtVuKZhAIB/sHkBeJm8Et EebL+e2D1eIHkEBsh1yRt4bx800xVfgwrm+JVYIvTVf9G9hiPN5J+WXHUQJMuU36ExrvLI 26fB8BAtS9O0Xd9RBNcH2QpNfQl1KFu3IV6QYVVhgB13Wsw3Ndq/0/sHISEJEfdn0AHrIG r6/07PF6mREpqla2EbR2lsx9qkEu9aM2WR3N9NXZL6U87HjRL3XqsaU1q3bCCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753287883; a=rsa-sha256; cv=none; b=ufyZ02OfbhZrsKRJCq2ogqiu7n5m+0XGdcvzWDOhbEbpJLeZ85tjg8SWZezJEEL4liqvEK Y8y24wdXQTcUqHW/IQ00PSy/w6OsTzo3nAV8vfVYgmguLpA8/ZZWbXMi+wfDnMp6HicBqa HUjXmcU4d4tqiHRizH+Wa5O55AHob8ReG2UQ2/Te5A/9FzX2XNpeegOQCn96nfb7bSOGfe 62rDZnzGov1VxH9j0ej7Pr1lfU+t+bK3sMyeXFuwYd3g7PH2qbpd13bXfxnnhXFlfWjB+9 lkwqhwwLOt0S8vSnqlfnqcE3fTTz56x5zhpbG5AXh9FRim4MG6OQduP7HIbp2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnKGg2KdPz54g; Wed, 23 Jul 2025 16:24:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NGOhpw058309; Wed, 23 Jul 2025 16:24:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NGOhb9058306; Wed, 23 Jul 2025 16:24:43 GMT (envelope-from git) Date: Wed, 23 Jul 2025 16:24:43 GMT Message-Id: <202507231624.56NGOhb9058306@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 863dc799f743 - main - ctladm: Use require.kmods for cfiscsi List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 863dc799f74306e18625e29a7522c2fe72533a89 Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=863dc799f74306e18625e29a7522c2fe72533a89 commit 863dc799f74306e18625e29a7522c2fe72533a89 Author: Alan Somers AuthorDate: 2025-07-22 23:31:06 +0000 Commit: Alan Somers CommitDate: 2025-07-23 16:24:33 +0000 ctladm: Use require.kmods for cfiscsi Use the standard require.kmods ATF variable instead of ad-hoc code to load the cfiscsi kernel module. MFC after: 2 weeks Sponsored by: ConnectWise Reviewed by: imp, Siva Mahadevan Pull Request: https://github.com/freebsd/freebsd-src/pull/1784 --- usr.sbin/ctladm/tests/port.sh | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/usr.sbin/ctladm/tests/port.sh b/usr.sbin/ctladm/tests/port.sh index 5bc5d879c983..d966529a85ae 100644 --- a/usr.sbin/ctladm/tests/port.sh +++ b/usr.sbin/ctladm/tests/port.sh @@ -38,12 +38,6 @@ # PGTAG,TARGET pair must be globally unique. PGTAG=30257 -load_cfiscsi() { - if ! kldstat -q -m cfiscsi; then - kldload cfiscsi || atf_skip "could not load cfscsi kernel mod" - fi -} - skip_if_ctld() { if service ctld onestatus > /dev/null; then # If ctld is running on this server, let's not interfere. @@ -118,11 +112,11 @@ create_iscsi_head() atf_set "descr" "ctladm can create a new iscsi port" atf_set "require.user" "root" atf_set "require.progs" ctladm + atf_set "require.kmods" "cfiscsi" } create_iscsi_body() { skip_if_ctld - load_cfiscsi TARGET=iqn.2018-10.myhost.create_iscsi atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" @@ -146,11 +140,11 @@ create_iscsi_alias_head() atf_set "descr" "ctladm can create a new iscsi port with a target alias" atf_set "require.user" "root" atf_set "require.progs" ctladm + atf_set "require.kmods" "cfiscsi" } create_iscsi_alias_body() { skip_if_ctld - load_cfiscsi TARGET=iqn.2018-10.myhost.create_iscsi_alias ALIAS="foobar" @@ -173,11 +167,11 @@ create_iscsi_without_required_args_head() atf_set "descr" "ctladm will gracefully fail to create an iSCSI target if required arguments are missing" atf_set "require.user" "root" atf_set "require.progs" ctladm + atf_set "require.kmods" "cfiscsi" } create_iscsi_without_required_args_body() { skip_if_ctld - load_cfiscsi TARGET=iqn.2018-10.myhost.create_iscsi atf_check -s exit:1 -e match:"Missing required argument: cfiscsi_target" ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG @@ -288,11 +282,11 @@ remove_iscsi_head() atf_set "descr" "ctladm can remove an iscsi port" atf_set "require.user" "root" atf_set "require.progs" ctladm + atf_set "require.kmods" "cfiscsi" } remove_iscsi_body() { skip_if_ctld - load_cfiscsi TARGET=iqn.2018-10.myhost.remove_iscsi atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" @@ -314,11 +308,11 @@ remove_iscsi_without_required_args_head() atf_set "descr" "ctladm will gracefully fail to remove an iSCSI target if required arguments are missing" atf_set "require.user" "root" atf_set "require.progs" ctladm + atf_set "require.kmods" "cfiscsi" } remove_iscsi_without_required_args_body() { skip_if_ctld - load_cfiscsi TARGET=iqn.2018-10.myhost.remove_iscsi_without_required_args atf_check -o save:port-create.txt ctladm port -c -d "iscsi" -O cfiscsi_portal_group_tag=$PGTAG -O cfiscsi_target="$TARGET" From nobody Wed Jul 23 16:27:02 2025 X-Original-To: dev-commits-src-all@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 4bnKKM4nVvz62lqS; Wed, 23 Jul 2025 16:27: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnKKM178wz3hW8; Wed, 23 Jul 2025 16:27:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753288023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ABKKJQT086bEJ5+toRo+WHpT98EoddOhjs2vbVlbrvg=; b=QN5mNNKC1PFRSfuNMa0+br8uhPGjQXX6o3mvEvID5pS/LKHPr3gmoN0OLZhW3Wko6Fcag5 MbubPCthmVJKxRrkvHSxE0EFNvM/cgAOEPKoPYvN8e9+j/HC20zqkpNSzxlNs82L7M31v8 P1IMqSKKjWDO3vj3SFT0SwNtKPMUal+lllksV47ObXMy2qvjtAJYORI+jNLFzBp5hJzp6V sbveoMZG4V1/bluHAzb1o7qxWVziPDfSyAlIJP1Y6b9Ir9Vy1AG8myqWnSIqu79N+aooC5 7dWFxI2LVKM5dD+neS9n+5jCaaf+IcYaCrB8/dJl1paWtHANMim3reGDyMXO7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753288023; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ABKKJQT086bEJ5+toRo+WHpT98EoddOhjs2vbVlbrvg=; b=wcNBlf4D9L9VqhBjm73tu803PdHutnAfdMK9tbEgHo4RpYg7kCYhuD8pVApLL2ftOz+Z16 UDdGJoMBRHxgTKYGJkJrl22tAPydH4FLLQAj7U5rpeE/etteD9fpuWvJOqX+W4sfJBok9e cHpi/ZqaLlXmN5uMUN/dHeTJPy0KUNI6SFPDC/AS6wFnO7GzpaVKcMvzcSKYrIrPnbgez6 B4vlqQoWU7MPU9g1RUHguKjSEJYzoxb8PXl933PiqkJUa2kpBNHdRgkswMpwWKmke0Eu5w FUokbLxXrwiIj6sNL96rYGM6oWkP6kCGun3n0L7VJ7tfrfLOi2rCcmi/2HVA1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753288023; a=rsa-sha256; cv=none; b=kNSyljcpc6X4+W/g4eLEKn4E/8tCwX7KqtWK/UOcyaHBXhjkDogGL4rFNBQzJ46lWP1Qzz RL53IFgpws25OvcduFe15pZPnHq8Rw78elbJzXmtTQxPt8fmu2X2tz5NGJqFqlnAgXy3pc 6uft4Yzd0vw73IpTXpbbg+v1P+wKIxDBbTTRb0Z8jvb2e23Omg6/ooRoPZ45Jy4ikmRAzN qNLSrAxVOR+Obji2uw1Wi4n+l5uH5Q7oCgqoMeF2IoOCWs7ZHFaYJIplfbEXV5g18Xci9m BRohsDKveGaGDkjqL+b9grSErErnTvcnFt9p9bC/3X9Mzq1RsL0LuUNjjG/PDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnKKL5Nlsz54j; Wed, 23 Jul 2025 16:27:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NGR2SW059221; Wed, 23 Jul 2025 16:27:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NGR2L2059218; Wed, 23 Jul 2025 16:27:02 GMT (envelope-from git) Date: Wed, 23 Jul 2025 16:27:02 GMT Message-Id: <202507231627.56NGR2L2059218@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Somers Subject: git: 2a08ae16555e - main - mac_bsdextended: report that all tests require the kernel module List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 2a08ae16555ea60c5a1d6f1c9966ea233af405be Auto-Submitted: auto-generated The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=2a08ae16555ea60c5a1d6f1c9966ea233af405be commit 2a08ae16555ea60c5a1d6f1c9966ea233af405be Author: Alan Somers AuthorDate: 2025-07-22 23:08:27 +0000 Commit: Alan Somers CommitDate: 2025-07-23 16:26:09 +0000 mac_bsdextended: report that all tests require the kernel module Use the standard required_kmods reporting mechanism to notify Kyua of which kernel modules are required. MFC after: 2 weeks Sponsored by: ConnectWise Reviewed by: Siva Mahadevan Pull Request: https://github.com/freebsd/freebsd-src/pull/1783 --- tests/sys/mac/bsdextended/Makefile | 1 + tests/sys/mac/bsdextended/matches_test.sh | 3 --- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/tests/sys/mac/bsdextended/Makefile b/tests/sys/mac/bsdextended/Makefile index 69cd27c0e321..cc3a3f8ea534 100644 --- a/tests/sys/mac/bsdextended/Makefile +++ b/tests/sys/mac/bsdextended/Makefile @@ -9,5 +9,6 @@ TEST_METADATA.ugidfw_test+= required_user="root" # Each test case of matches_test reuses the same ruleset number, so they cannot # be run simultaneously TEST_METADATA.matches_test+= is_exclusive=true +TEST_METADATA+= required_kmods="mac_bsdextended" .include diff --git a/tests/sys/mac/bsdextended/matches_test.sh b/tests/sys/mac/bsdextended/matches_test.sh index 2a28be0f231b..41fa04f221e3 100644 --- a/tests/sys/mac/bsdextended/matches_test.sh +++ b/tests/sys/mac/bsdextended/matches_test.sh @@ -12,9 +12,6 @@ gidoutrange="daemon" # We expect $uidinrange in this group check_ko() { - if ! sysctl -N security.mac.bsdextended >/dev/null 2>&1; then - atf_skip "mac_bsdextended(4) support isn't available" - fi if [ $(sysctl -n security.mac.bsdextended.enabled) = "0" ]; then # The kernel module is loaded but disabled. Enable it for the # duration of the test. From nobody Wed Jul 23 16:32:33 2025 X-Original-To: dev-commits-src-all@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 4bnKRk6KzCz62mBs; Wed, 23 Jul 2025 16:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnKRk16B3z3lf8; Wed, 23 Jul 2025 16:32:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753288354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ENJK2SeHWBj2uWtnILwGmyTgQTnHbri1YwYWLTfU8ho=; b=tdUrJ6cJ2ck8/7pAkp8VcUcgQAnwJLs56/LZAAryz2KjX3gR6310fGv/sp5LmwfaeccPFD 8iycL+v+1nunYoAxAK7BFDHavDLattY9K+7WM1xXsIK/s80qCHW3XLzU2o3tmVA3REwYXX OSc+NAJY5BYmf3bs3J+SfkFe1jRvROs6gWYCs1qSnSduXE3A84oc2h/ldy4q6Eyx/v4daN nFF1jGkmziljiWQtGXnEBJljqM296Vq1SAFusaJbBIli+KsTGR6w2PqVp69i87SiiykV7d EEmzJBqiI5S4YodsYrcj9Nl9i0vfDLyhXIYAlLTApHHWqijURbw/Gz9XqBnhLg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753288354; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ENJK2SeHWBj2uWtnILwGmyTgQTnHbri1YwYWLTfU8ho=; b=uURKCGUb4EF7efq8RqCkukePphAWxPRBQdWoCp2Bt161J7UqrO0y4J/eYyWAdpOHkKx8fm J5QjS4lbuSgFOzSH9/LOutGsosebR4SIXmorYzs2d6H0TQrvdMaG8UCfZRVbiqQ5MKiUCt 6yrwRK6nyJWYmMhO4Dn3tlSGzRS251BbxqGNwaNNbtYHGxmOTUQiugB4ofsBiegnER23Rn NojF+jz7EQEOn6KpVwVAVajex6xIOcl1yQtHqrPdb6POoifsiUgYdOw/av9+y45JX+FVqd yUNlrSDIEBrtGtDQLSZQzzjXHOsEQbYbBiXXOH9eyy9aa+WlXXvEfiUB4icYqg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753288354; a=rsa-sha256; cv=none; b=km67+ETW46d54kya3zCMH/gZSJ+1UaZI2U+6lBiPNMpnMZYlmiUqow+uQr7LQc9XKGJwn/ dzfQJkohJr8rLIAvlxTtOdaYq2ekIW3yvML7enI0ZrWDJn2ylTfksxbMHUpx+fntIhKXtG EX9g2MjfRMr38Vv1IdCepJhcY80y0e0WScXGthwx80mpjBjcK4dN9wxZcOqugppwbhP/+S WHCtRGoP9uWCQgPFi4OMetSBN9vF74+tU0ef/Gl9LFXJCs6W1dkpEVZn+4h06TXsq3Hyxq NmSTqK5bcRVWQ8zu3BBjSnYRAQuyB0EtV1a599oWU6Fk3sT1e8ZZtJbT7lDjcA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnKRk0SgVz5k9; Wed, 23 Jul 2025 16:32:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NGWX50077447; Wed, 23 Jul 2025 16:32:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NGWXF9077444; Wed, 23 Jul 2025 16:32:33 GMT (envelope-from git) Date: Wed, 23 Jul 2025 16:32:33 GMT Message-Id: <202507231632.56NGWXF9077444@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: ShengYi Hung Subject: git: 9d1405ceedc6 - main - bhyve: save speed member in struct hci when doing snapshot List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9d1405ceedc6cfcf59ce73b355e4a5bd489ff29e Auto-Submitted: auto-generated The branch main has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=9d1405ceedc6cfcf59ce73b355e4a5bd489ff29e commit 9d1405ceedc6cfcf59ce73b355e4a5bd489ff29e Author: ShengYi Hung AuthorDate: 2025-07-23 15:56:06 +0000 Commit: ShengYi Hung CommitDate: 2025-07-23 16:32:17 +0000 bhyve: save speed member in struct hci when doing snapshot Approved by: markj (mentor) Fixes: 48266828f5bb ("bhyve: use speed in hci to allow backend modify it.") Differential Revision: https://reviews.freebsd.org/D51477 --- usr.sbin/bhyve/pci_xhci.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.sbin/bhyve/pci_xhci.c b/usr.sbin/bhyve/pci_xhci.c index 29001755cbbf..0871bbb87fe5 100644 --- a/usr.sbin/bhyve/pci_xhci.c +++ b/usr.sbin/bhyve/pci_xhci.c @@ -3231,6 +3231,7 @@ pci_xhci_snapshot(struct vm_snapshot_meta *meta) /* devices[i]->hci */ SNAPSHOT_VAR_OR_LEAVE(dev->hci.hci_address, meta, ret, done); SNAPSHOT_VAR_OR_LEAVE(dev->hci.hci_port, meta, ret, done); + SNAPSHOT_VAR_OR_LEAVE(dev->hci.hci_speed, meta, ret, done); } SNAPSHOT_VAR_OR_LEAVE(sc->usb2_port_start, meta, ret, done); From nobody Wed Jul 23 16:40:05 2025 X-Original-To: dev-commits-src-all@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 4bnKcP6PCMz62mWL; Wed, 23 Jul 2025 16:40: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnKcP4f8zz3n66; Wed, 23 Jul 2025 16:40:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753288805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rZL/fN7fITkyq9VV6dvLOL87BQpbqGy3YVWAgxgZDRU=; b=r90ndEjL875kXx4uWZCvVCailqHJ+EcnyUhXD1a4Gifo9VcBXtJtkW1bD2CO9OONuYQAVJ SKIx19I5O8OvwC5GLtWU+yPHzeVT1xHeY8qtVOxX36mmhLJMrmIRXnCYFfij3J9x1xBOqP N5NwTRDxsQ72onkGzWKq9bvFpa/CfuIsyPMJjx5zOzs56giHKo87pZrZHOBvKwCTh93bCO v+r208g92pb/kHxCteLY0bav27cEG0wT/ThRwxIbYiawM0iIEg/8V8wTrGrN+yDsFIqplD EZH0vH/JY+nyGlmVP1GYlrOS1QpXLLGbuXGRkT3U5hRvZJAg8wAoj/GIoBByVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753288805; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rZL/fN7fITkyq9VV6dvLOL87BQpbqGy3YVWAgxgZDRU=; b=b9S6sXv9aybzlcP6lF/nTpdQ3H7FGE8hQ86Bc0w008tCg7WzYvHoiXTlAZ1ZzEMvMMErnI Ensz3gzH873UH7aQTn2xw0ZO4Mgw2TYXAGAGYtMj+AOtz7jhviYTtIwTUn6RUdat87BVId tI9rawKB9YORfGjlsVukI4HlXWYgsUhlULlsX59Fq3JUDcstDzRupnro5nPLiCbgO6Iv4H o3+8W3rhnBtpTbblzaHgszHvKpFtq2DZVfizychIJzA3HH+kUN5B4nL4i3NsGzLIQP0uq8 mN3r+CSUPLw4uQi26xQWw7OOwgDCBDTmyBAS12iR5tppX3R05yXBAQYkyWHXag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753288805; a=rsa-sha256; cv=none; b=Qedd+SZRT0syQbz9rF94USAuxFhP8dRyy2pur/owFNqiGkzWP1bg0bYtEHmKnpBFiYHslV ZmzUqcKgLAcikGLqX6QSVs6Hw4tORBRUBnyARFPZn1D/ciV1ofCwgh/2sCfpH5ysm8sICq zyODoARMxGKwjVBuS0eB8kv+xlOYJvilbQbgxYi5jkUoMQvvXaMv4nn+BPWUxZR9hCaLSy c5q6gqJJWiU+NVuUwEDNcPJnNjH4VkKY/yRZ/5NsteHeoMGgCb3yH5rtFe74NukWMV6AId Nwhpqoi9Db/F/NxF6AsXstF1HdhtTJEW7oYfvGzqURoEk4LzCko/i8Zza64IjA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnKcP3wkRz57T; Wed, 23 Jul 2025 16:40:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NGe54b082616; Wed, 23 Jul 2025 16:40:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NGe5AE082611; Wed, 23 Jul 2025 16:40:05 GMT (envelope-from git) Date: Wed, 23 Jul 2025 16:40:05 GMT Message-Id: <202507231640.56NGe5AE082611@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 26069bca2d64 - main - mkdir.2: Correct HISTORY List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 26069bca2d64a76cfafb92d61d58c90140c1b28f Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=26069bca2d64a76cfafb92d61d58c90140c1b28f commit 26069bca2d64a76cfafb92d61d58c90140c1b28f Author: Ken Wong AuthorDate: 2025-07-14 17:32:54 +0000 Commit: Alexander Ziaee CommitDate: 2025-07-23 16:37:44 +0000 mkdir.2: Correct HISTORY PR: 286064 MFC after: 3 days Reviewed by: mckusick --- lib/libsys/mkdir.2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libsys/mkdir.2 b/lib/libsys/mkdir.2 index e1f1624cebc4..100f44d1dcf9 100644 --- a/lib/libsys/mkdir.2 +++ b/lib/libsys/mkdir.2 @@ -176,4 +176,4 @@ system call appeared in The .Fn mkdir system call appeared in -.At v1 . +.Bx 4.2 . From nobody Wed Jul 23 17:34:31 2025 X-Original-To: dev-commits-src-all@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 4bnLqD17Vxz62pxv; Wed, 23 Jul 2025 17:34: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnLqC6Yz1z3Hcf; Wed, 23 Jul 2025 17:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753292071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z+hRwLKmdatfNta+VABkp1v1RDZi3389qO2XgnOMaOo=; b=e46RO/G1QdJN2jd9xmQ4izU+FpoUH8aqZ93G3s705DN9ERlZjMFSsSSUfCTJn28rjSnuYy Bo/sM+NyQZjRTv4W/DKRr3R1HZCjhn0BCCDVwrh0YEP/0RvqBHzkCXLLmLrY/VZ3ZoeU8G wVIMfVcIGUNXng6PurDfA3bHaTUH1yIqWglmAyoI92atmh/7Bf3N6R08Wa5IjIW5c/ymfC 55MDj2ray5cr+W3x94pBRgy5wEiIklPFXSpe2ydoE6G16R9Z0N8b8AYC+4OADdIKIhVcfJ Bqm2AmWDRU7ZXC84qHvHfsGvG7uBNPVay3neZ7W82CM2RAKOrPbsoZCQWTAnVw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753292071; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=z+hRwLKmdatfNta+VABkp1v1RDZi3389qO2XgnOMaOo=; b=TtydOAJI2VcKC5owzU38r3LHKl5IxYvB3UF99qTX7UMfP16wT5osTG8WWtmhUQDRX/7/sd H1b3f+9lw2BOETLWXIb3L6PZ9JthNceOgu1wUuFtx4KogoF06S0PddH8GrZDZeJy/HiYAU JF6aI3CZrKu/hF7fki8aGT56+l/61crow1E0Hzwaeve1CoQPgOJom3peYo7qN6oERVJnY8 a3It+Pl7xLC9g2GaWd+OHu0yTcZM5IU3RSNLxuSdoRQ22nJ+6w83jvCV8Et/IrhSr/TW/y yNtZqUYRuv6xU7jQWmzrmd7ACvPhGrnxtBebzgrXneQofnwz1Q7mzYWC7i3qbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753292071; a=rsa-sha256; cv=none; b=C2nvgGdJQyQ6C+Bg16zyEon0MSHUmGNI5tSYSyckeYX6+GQipj7WdDc5SQQaW02g4eH0o5 ifsr0gA028wmmB4WqbcTu/kM7w0gRKT85pxtlEDII2ax1nURUlCBYJmgFOQ6CdOAOYD1EC qY4/yX8EEk/lxnqkGhpDRZHpyrhM9/eqftL21J05tNFdSEbmpTBt58PF8zzACy178jUMaS 50h/Hz6+jyHkOlpdK0xjZP1cuMS+BJ5esUZ92tej76b8jLoxmhq+FfjQXBU2kYNsZuZbnf jyqSyHKardnFZDWZRcf/GgR/1JvuJ0R0ewjh5oyQW1dVGfW6rfaFK1uRZVEaYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnLqC5klZz6cY; Wed, 23 Jul 2025 17:34:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NHYVkY090497; Wed, 23 Jul 2025 17:34:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NHYVMi090494; Wed, 23 Jul 2025 17:34:31 GMT (envelope-from git) Date: Wed, 23 Jul 2025 17:34:31 GMT Message-Id: <202507231734.56NHYVMi090494@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: b4f610a6851d - main - vfs: Handle zero-length directory reads List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: b4f610a6851d9dcb54ada397c5dc93ab2e8559e1 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b4f610a6851d9dcb54ada397c5dc93ab2e8559e1 commit b4f610a6851d9dcb54ada397c5dc93ab2e8559e1 Author: Mark Johnston AuthorDate: 2025-07-23 17:33:11 +0000 Commit: Mark Johnston CommitDate: 2025-07-23 17:34:13 +0000 vfs: Handle zero-length directory reads Avoid a false-positive assertion in VOP_READDIR in that case. Reported by: syzbot+4689a0b0d5918a8e3bc4@syzkaller.appspotmail.com Fixes: 77b273d8f5f4 ("vfs: Assert that VOP_READDIR sets *eofflag properly") --- sys/sys/vnode.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index c4944965a484..a416fddcddc3 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -1023,7 +1023,8 @@ void vop_rename_fail(struct vop_rename_args *ap); #define vop_readdir_post_assert(ap, ret) \ nresid = (ap)->a_uio->uio_resid; \ if ((ret) == 0 && (ap)->a_eofflag != NULL) { \ - VNASSERT(nresid != oresid || *(ap)->a_eofflag == 1, \ + VNASSERT(oresid == 0 || nresid != oresid || \ + *(ap)->a_eofflag == 1, \ (ap)->a_vp, ("VOP_READDIR: eofflag not set")); \ } #else From nobody Wed Jul 23 18:02:59 2025 X-Original-To: dev-commits-src-all@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 4bnMS41Dfzz62rJh; Wed, 23 Jul 2025 18:03: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnMS36FQrz3WL9; Wed, 23 Jul 2025 18:02:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753293779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9AiH24NSveETmiQbCwCOLtG/flPIX4MOtl2ZeOWbei4=; b=C/Tqp1RbIigyQ8gdBRbR63AhzOohAJYV4+dQUVnKhvZ44FWUWfTgtDgH1TXjt3FPuXjWUt p//H0vjXb/NJM64PuM9AxnJ6vHXPXpaMV8ZNch4o7mxk+1ywDV/zO9wshp+VyuElMWyhog R0bIqogR1csl8yt3OuiQH4I2YKwh4zZJdwSIJ92QN3ys6V1fLCvDgA0SSQ08vUckTP8/H5 c0mcZ5DmwF74H4en/roVmaT8foO90tL06APdCR1BvfxtQ98/UMOYZRqge8VIO22U7I9Iee 0J9irS7XOpDiJ8fwKbvlpsJF4Hx6Vx13hnw1DSPJ2TfL8zkbWo9IYFOg3/yujA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753293779; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9AiH24NSveETmiQbCwCOLtG/flPIX4MOtl2ZeOWbei4=; b=vMcBd/GOfhHI9Avh4Zz5geASP7/416aitZK88Mp6B/fD5TDoNebc11numu5mnPdXpgJSN7 qh01kbSKZpFVH5CqUe5N9UXDDvYQY91TzUkEVnvalQ7PWfDYADtghe8Fq4shglzLR2SWIy EirRLKwwAtLHD2oHa0HVOKvZtHtmEFd1KFOkm4T9jUj3mG3449uVZc6RMcPf9sjObeOM/v 8DvuYrGcCaEDAL13BfRPpJIBQM4XFKrUevV75fQdahYm88DdtUFc3uBXIxEnLvD1YxMgYs 44ecZXNr5PMS2g6gMtk+SMil9bW1/kXGQjZ6bGGoqMO5GnoI7QdG8zodQFJm8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753293779; a=rsa-sha256; cv=none; b=p+NrOGZBxTWXhMeerSVYnLFTHFlccFQ7UFmMTWx4EC2ATmuakF7aSBOUppEjg9RcoNypIB FCuIJjWxfxjDaYrgvrgM01Ju7E8hGqPlhexaOsbB78JZqPXn+h/ZRAPmxLdHHRMyKtZxqm bpFQBeUfBJIbIG1hennGXcw3O+UZpHGS19sr1NmDeeDf4tDEPUd7oDD5VnZCg9qKWziNW9 6gTFKpsGHn3+PMTgJaB5D9h19KvNqDBnheyEk4rXXT0lFQZTXTGmuPQrLa3yxmwV8JOhVr VOFtHUcbWP7y9iRPrm6Y0M5IY089u8lbNxM3X0QsU87QxpdbXALv6JIyuN49xA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnMS35XkVz8CJ; Wed, 23 Jul 2025 18:02:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NI2xtk047262; Wed, 23 Jul 2025 18:02:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NI2xS5047259; Wed, 23 Jul 2025 18:02:59 GMT (envelope-from git) Date: Wed, 23 Jul 2025 18:02:59 GMT Message-Id: <202507231802.56NI2xS5047259@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alan Cox Subject: git: 7502c1f27082 - main - pmap_demote_{l2,pde}: never invalidate wired mappings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: alc X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 7502c1f270827434bb9661cbb4b9652fdb836521 Auto-Submitted: auto-generated The branch main has been updated by alc: URL: https://cgit.FreeBSD.org/src/commit/?id=7502c1f270827434bb9661cbb4b9652fdb836521 commit 7502c1f270827434bb9661cbb4b9652fdb836521 Author: Alan Cox AuthorDate: 2025-07-19 20:18:04 +0000 Commit: Alan Cox CommitDate: 2025-07-23 18:00:42 +0000 pmap_demote_{l2,pde}: never invalidate wired mappings Rather than demoting a superpage mapping that hasn't been accessed, we ordinarily invalidate it. However, if the mapping is wired, invalidation is problematic because the page fault to reinstantiate the mapping could sleep. Instead, demote the wired mapping with the accessed flag cleared in the PTEs. Reviewed by: kib, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D51431 --- sys/amd64/amd64/pmap.c | 21 +++++++++++---------- sys/arm64/arm64/pmap.c | 24 +++++++++++++----------- 2 files changed, 24 insertions(+), 21 deletions(-) diff --git a/sys/amd64/amd64/pmap.c b/sys/amd64/amd64/pmap.c index d1d80afccdc7..8df082f6c5dc 100644 --- a/sys/amd64/amd64/pmap.c +++ b/sys/amd64/amd64/pmap.c @@ -5962,17 +5962,18 @@ pmap_demote_pde_mpte(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, if (mpte == NULL) { /* * Invalidate the 2MB page mapping and return "failure" if the - * mapping was never accessed. + * mapping was never accessed and not wired. */ if ((oldpde & PG_A) == 0) { - KASSERT((oldpde & PG_W) == 0, - ("pmap_demote_pde: a wired mapping is missing PG_A")); - pmap_demote_pde_abort(pmap, va, pde, oldpde, lockp); - return (false); - } - - mpte = pmap_remove_pt_page(pmap, va); - if (mpte == NULL) { + if ((oldpde & PG_W) == 0) { + pmap_demote_pde_abort(pmap, va, pde, oldpde, + lockp); + return (false); + } + mpte = pmap_remove_pt_page(pmap, va); + /* Fill the PTP with PTEs that have PG_A cleared. */ + mpte->valid = 0; + } else if ((mpte = pmap_remove_pt_page(pmap, va)) == NULL) { KASSERT((oldpde & PG_W) == 0, ("pmap_demote_pde: page table page for a wired mapping is missing")); @@ -6024,7 +6025,7 @@ pmap_demote_pde_mpte(pmap_t pmap, pd_entry_t *pde, vm_offset_t va, /* * If the PTP is not leftover from an earlier promotion or it does not * have PG_A set in every PTE, then fill it. The new PTEs will all - * have PG_A set. + * have PG_A set, unless this is a wired mapping with PG_A clear. */ if (!vm_page_all_valid(mpte)) pmap_fill_ptp(firstpte, newpte); diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c index 459cc8ebe505..2152f7fcc1c6 100644 --- a/sys/arm64/arm64/pmap.c +++ b/sys/arm64/arm64/pmap.c @@ -8501,18 +8501,20 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_offset_t va, /* * Invalidate the 2MB page mapping and return "failure" if the - * mapping was never accessed. + * mapping was never accessed and not wired. */ if ((oldl2 & ATTR_AF) == 0) { - KASSERT((oldl2 & ATTR_SW_WIRED) == 0, - ("pmap_demote_l2: a wired mapping is missing ATTR_AF")); - pmap_demote_l2_abort(pmap, va, l2, lockp); - CTR2(KTR_PMAP, "pmap_demote_l2: failure for va %#lx in pmap %p", - va, pmap); - goto fail; - } - - if ((ml3 = pmap_remove_pt_page(pmap, va)) == NULL) { + if ((oldl2 & ATTR_SW_WIRED) == 0) { + pmap_demote_l2_abort(pmap, va, l2, lockp); + CTR2(KTR_PMAP, + "pmap_demote_l2: failure for va %#lx in pmap %p", + va, pmap); + goto fail; + } + ml3 = pmap_remove_pt_page(pmap, va); + /* Fill the PTP with L3Es that have ATTR_AF cleared. */ + ml3->valid = 0; + } else if ((ml3 = pmap_remove_pt_page(pmap, va)) == NULL) { KASSERT((oldl2 & ATTR_SW_WIRED) == 0, ("pmap_demote_l2: page table page for a wired mapping" " is missing")); @@ -8568,7 +8570,7 @@ pmap_demote_l2_locked(pmap_t pmap, pt_entry_t *l2, vm_offset_t va, /* * If the PTP is not leftover from an earlier promotion or it does not * have ATTR_AF set in every L3E, then fill it. The new L3Es will all - * have ATTR_AF set. + * have ATTR_AF set, unless this is a wired mapping with ATTR_AF clear. * * When pmap_update_entry() clears the old L2 mapping, it (indirectly) * performs a dsb(). That dsb() ensures that the stores for filling From nobody Wed Jul 23 20:54:04 2025 X-Original-To: dev-commits-src-all@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 4bnRFV2kvsz630vG; Wed, 23 Jul 2025 20:54: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnRFT1FWSz3W8C; Wed, 23 Jul 2025 20:54:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753304045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5IdM2xUA7KDpKdNETRzMfJH5epxENvY/+/DUBMbDLAs=; b=mXWqfkindcslBKc3rOeG8KsyYVon4X/rz/dEFt4lAeisOMBdBWohHUHT7ZrZZmnpdQBund GCmat2ljvOrevX6G0TL6KADMnGG7Tlg/Am8dGN66gTV9X1HCm0zEFvIAsLEbC9Av5ByQET TtNZ+u+TazghvkCFnPZfHwN82mt5e+C1AUJMVgUl0zmXJrLrKGFkOhTWS3Z6wbNApZ1NEU iWmGJEiGcoY3mJPDZOzxhXaYHwVLcxbw6obaddqMXBef8MoMS5ocyhhrpLgOVRc+TRj2OF Tioch3F8gJijtgwEUV29bW7frIagfQkhELdla6oPiRBJ9GCuj8Vnzd/V2mWmEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753304045; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5IdM2xUA7KDpKdNETRzMfJH5epxENvY/+/DUBMbDLAs=; b=ugavXPN4cglq007K8YKZeO/wwtCBOzIGa5KQ5gi/QbkvVW/ZnY3+USJuogvTU2L5OaHT+H aa8iYbAKw28rAn71sw+gWffcKvUaPQmyCZ9x+mu+Mv/KJYwZ1FPgXdHUsfnPrqdxdCp0RI B7iHSMj0RqGDuhjzhVuHBkiDHkh7F926WNMAhE2uvBNhnIfIx0DOZQ7QST8fFhcXvzlWBx FrzmETK3b4Spgbrtd2H8iiaXLDNFLBE9ffk0BB8/qBWnhm1iSOuoaWQ3hTbCuH9ADPK5Mf 0m561gaztbJKz0+lj2AHHzWO1AUT6+tYjU0LqalRZ92ul6kWaiJBXFipdT55EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753304045; a=rsa-sha256; cv=none; b=Kwbzuz3ThXAF5jW13Zdymfw7cBC6shRcLTQan0yswA08AXTVHstaD8h7cOeE9Ozmhrf/1s 6+ILfNCzvjYfN3YCQFThD25JGAugGvmpHpE0yWpNnldlKvVahUO6qzmh6eH9AojyJoXVK+ HXe40joUQKFUKqvx+AuaNXX9y4D33A5bmm6X3d4qSDpSJdn3x8+RhtvzRWzT/HcZbeGelL VKlSp88xpW8qvyxQl5BslXs7rUH4Z7qvZT7dT8Nl2M0ofoG4be2tTlUMrTQYSAU1uCH07z n24dchhtAVpyTMoX95wOMVjN1vmTEo6LZ66MYZQhDrJnpbTkn447x9Zga5MZxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnRFT098qzDQr; Wed, 23 Jul 2025 20:54:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NKs4wp067092; Wed, 23 Jul 2025 20:54:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NKs4w2067089; Wed, 23 Jul 2025 20:54:04 GMT (envelope-from git) Date: Wed, 23 Jul 2025 20:54:04 GMT Message-Id: <202507232054.56NKs4w2067089@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: c143ffbaf787 - main - rpc.h: Remove reference to unimplemented DES ioctls List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: c143ffbaf787f6c1d7fcbae8f5d9299182ff0b85 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=c143ffbaf787f6c1d7fcbae8f5d9299182ff0b85 commit c143ffbaf787f6c1d7fcbae8f5d9299182ff0b85 Author: Ed Maste AuthorDate: 2025-07-23 13:59:01 +0000 Commit: Ed Maste CommitDate: 2025-07-23 20:53:30 +0000 rpc.h: Remove reference to unimplemented DES ioctls We won't be adding support for hardware DES. Remove the #ifdef notdef block. Sponsored by: The FreeBSD Foundation --- include/rpc/des.h | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/include/rpc/des.h b/include/rpc/des.h index 5056e4b1545c..df4ab75d9bf0 100644 --- a/include/rpc/des.h +++ b/include/rpc/des.h @@ -56,26 +56,6 @@ struct desparams { # define des_buf UDES.UDES_buf /* otherwise, pointer to data */ }; -#ifdef notdef - -/* - * These ioctls are only implemented in SunOS. Maybe someday - * if somebody writes a driver for DES hardware that works - * with FreeBSD, we can being that back. - */ - -/* - * Encrypt an arbitrary sized buffer - */ -#define DESIOCBLOCK _IOWR('d', 6, struct desparams) - -/* - * Encrypt of small amount of data, quickly - */ -#define DESIOCQUICK _IOWR('d', 7, struct desparams) - -#endif - /* * Software DES. */ From nobody Wed Jul 23 21:10:40 2025 X-Original-To: dev-commits-src-all@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 4bnRcc5Vfcz631KC; Wed, 23 Jul 2025 21:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnRcc3RVYz3hxQ; Wed, 23 Jul 2025 21:10:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753305040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pTTCApEK/KBtan1FEbuPyzrnhw259xwIVZStd7AzMDI=; b=NPmI44/fHbzAbPDV+VkKCTcBXUDsj9GrdbwVkrJjemJMJHChPQUBZtNnLUwHbk9oS83prs l70MzxDqysa6tzJm+Cq5GAnnjySm4ffk7ZmRX+I/rYZU27qkxpuRXThJeYmO4oohLBWd5Y zUpOS9HZ2zt6sE0foIBa+w059up4nfDSmk7hJLBk+UbaI0Am9b2TNiC8GwvIvJLWS4gn0b lUDOZXvq3wAwDqVUxRureNYElxoSqPNOFbsQ6MuQefpNYebC3/r22KywDySLHns1ulQ87c 2JMWr66PaVZrfD8INm8nxg7HZbWE1fkgl7qobSop/TS89AOdLPX5FlON1xsquw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753305040; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pTTCApEK/KBtan1FEbuPyzrnhw259xwIVZStd7AzMDI=; b=p9STPxh5lf0ZclqrVPAjgAfeNCK2znSWhacURY1vhniXzL6DJ4LhNVb71TXVdvjRLPkjzS GAcsFEqf9DyMp2errrfoO2zN6CV2KeeT5JmcKthRAvD58zuqhFg48YVXYN6uqGb3nyzH0Z uFk0sVVcd6hPkdUOwwy9awcYG+piL9JrQC/FOSYODxek9E0YFEnACZX6XorlQZChsROLVo kffbK5fs+/NFQ5P2PgkmdMhFvUdgHKrnVRfB8b9OrCuGPPQU5N7foHOMZDVhFnzObUcTzw 9wodiyxdDLROdaLTqXt39W8WdjEOSmQlHe97Q9xYGG7GNIVDdS2wPS6Rqjaq8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753305040; a=rsa-sha256; cv=none; b=GrcB7VJj8EYd8M9sVPGlfkusFIYTi782GMWibgQgTtSYoZ87hAs/Au7UgxtyCcGvqLUXwY fe7WfobBtDskAUNINEXTHU17YLzx/8MNa66Vk0csAIwjsxePnuKf0qr0Vo5mF3eWm7KdiG 5PixGZ6nZ1GwbchJPq0NDklANulyusS4WGx3TBzlLAURcyVTmzlEdHfK+oMv/76hMBNqze U+uIkiwMHgoNInxTMv+NEF2ExIL9Kh5M8DbBXnYiFBXFOTEunpZQndAnXk6xxNiQKcVDbZ 3adD35fo5gCvoD/7h6NAYe8hZ0x9fjNw0OlwGb1oz32mezcENP6OrOnbEepPtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnRcc2d0YzDBP; Wed, 23 Jul 2025 21:10:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NLAeOR098567; Wed, 23 Jul 2025 21:10:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NLAeFQ098564; Wed, 23 Jul 2025 21:10:40 GMT (envelope-from git) Date: Wed, 23 Jul 2025 21:10:40 GMT Message-Id: <202507232110.56NLAeFQ098564@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 6ff78a63d8cd - main - tests/sys/netpfil: unskip tests that no longer need to be skipped List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6ff78a63d8cd0dd64ae79cbda5cb03572c1e17f5 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=6ff78a63d8cd0dd64ae79cbda5cb03572c1e17f5 commit 6ff78a63d8cd0dd64ae79cbda5cb03572c1e17f5 Author: Siva Mahadevan AuthorDate: 2025-07-21 13:25:26 +0000 Commit: Li-Wen Hsu CommitDate: 2025-07-23 21:08:37 +0000 tests/sys/netpfil: unskip tests that no longer need to be skipped All of these are passing consistently in the latest CI environment in 15 back-to-back test runs. Signed-off-by: Siva Mahadevan PR: 260458, 260459, 260460, 264805 Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1788 --- tests/sys/netpfil/common/dummynet.sh | 4 ---- tests/sys/netpfil/pf/forward.sh | 4 ---- tests/sys/netpfil/pf/killstate.sh | 4 ---- tests/sys/netpfil/pf/set_tos.sh | 4 ---- 4 files changed, 16 deletions(-) diff --git a/tests/sys/netpfil/common/dummynet.sh b/tests/sys/netpfil/common/dummynet.sh index b77b2df84010..66736fbecdb7 100644 --- a/tests/sys/netpfil/common/dummynet.sh +++ b/tests/sys/netpfil/common/dummynet.sh @@ -265,10 +265,6 @@ queue_body() { fw=$1 - if [ $fw = "ipfw" ] && [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/264805" - fi - firewall_init $fw dummynet_init $fw diff --git a/tests/sys/netpfil/pf/forward.sh b/tests/sys/netpfil/pf/forward.sh index 5d7d48a5dd9a..e9539bc9d278 100644 --- a/tests/sys/netpfil/pf/forward.sh +++ b/tests/sys/netpfil/pf/forward.sh @@ -101,10 +101,6 @@ v6_body() { pft_init - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/260460" - fi - epair_send=$(vnet_mkepair) epair_recv=$(vnet_mkepair) diff --git a/tests/sys/netpfil/pf/killstate.sh b/tests/sys/netpfil/pf/killstate.sh index 447a4e388f11..0d98db822535 100644 --- a/tests/sys/netpfil/pf/killstate.sh +++ b/tests/sys/netpfil/pf/killstate.sh @@ -117,10 +117,6 @@ v6_body() { pft_init - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/260458" - fi - epair=$(vnet_mkepair) ifconfig ${epair}a inet6 2001:db8::1/64 up no_dad diff --git a/tests/sys/netpfil/pf/set_tos.sh b/tests/sys/netpfil/pf/set_tos.sh index 75b96edbab6e..842377ee97c6 100644 --- a/tests/sys/netpfil/pf/set_tos.sh +++ b/tests/sys/netpfil/pf/set_tos.sh @@ -129,10 +129,6 @@ v6_body() { pft_init - if [ "$(atf_config_get ci false)" = "true" ]; then - atf_skip "https://bugs.freebsd.org/260459" - fi - epair=$(vnet_mkepair) ifconfig ${epair}a inet6 add 2001:db8:192::1 vnet_mkjail alcatraz ${epair}b From nobody Wed Jul 23 22:55:47 2025 X-Original-To: dev-commits-src-all@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 4bnTxw2cpJz636Hm; Wed, 23 Jul 2025 22:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnTxw184rz3J8B; Wed, 23 Jul 2025 22:55:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753311348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u55JjiprmQ0I3NwqSaaNy/BxyYtpS9PL7mCRpYvg6k4=; b=A8TRmm78INHtBfZGzYDvaFE3zfazXyoZCoZvNSoy6W0gZncrvNxLG+LwJrAL0UHCkqaxcj XV0TLDnQyXCQHFhMJF7KvrAjVuyvwkeYK2zxKC+KXZsCVidxHrrB9AODxeYmpPdk+7JX2s Bc31gyGWqqZ4ZTNLpokY5Us+28o3fTcN4qFc+2MrRc2V0x56MfcMskqdgOE6UqilSKjSdb 0S6vRiLFJF5cjVjm55pib2q/z8JsBM8k4HOmoytwfqkkB8TRe9HInsgSdsWtkYxNIT+hSM BSd/Qu4xKkqK5da9rRWwROWVhAhSN46/Z2EmTeHzMJupg/ALh9gZbrP1vPDrdA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753311348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=u55JjiprmQ0I3NwqSaaNy/BxyYtpS9PL7mCRpYvg6k4=; b=YL0RU9Lp1JsuSP1ObZ3c9Q2Dm7KD5vVIVQ/738pl/kw3Igl3omjY+TCICoQNMOOHIot/zX 4JusfbeMq2r7zCK0ulaojWDtgjS02EfrTqqD9R1b1PqnEe4tkh2b4Qy6ZRAqZVBScmAHRE 1u1NRmjVwxdWa/Z1kHCCKz2bit0+Fo/Dnpu2JRliF5bMG5NjhDCJhSo6Vqr/3+0cdXmWer JAEoqmxYih7CsQ6DRSujUwsD3Od8bdxM9sYnhywjxKvwBoaYENJYcz7r1ZCjT7DA3kho8y lC9ICCUtDtG/tDwU1AgnbqjxLGmUwvnDg1d11cNyZv6tUmFZc8TUad35h/E8sQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753311348; a=rsa-sha256; cv=none; b=Zb5nW63AhH5Vphvp0Mi4I8OsBdCkfcBAvD92znjn/XwRdEDs+FBm7m0QbAMGxbO4eJZOGl R0BvbQ9FnVTSV310jG6x88Wltjlpg6BveEiGNt7F9g2Rvc5aPZCqYJkHD33EFC0Jg+iT7M q2zK+/IW3VWcm0IQS+gGxERs6ZZqZkBZCKknUAixBIt6t/uxmnoQWm4A7GS/fufun2UGUk y9UhguaBF7WA9pSbqeNuRBDiGITdNibGkhl+yZh3GLKqtrJQEH3c6O1BJehj2XL0+A6FvG QvR+xIu9bP7VWFsgWTExNpVyiR9PBG0GRWe0savRD0VaTdlBTSloj7Uleo2uRg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnTxw0PDhzYqR; Wed, 23 Jul 2025 22:55:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NMtlHP093848; Wed, 23 Jul 2025 22:55:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NMtl6E093845; Wed, 23 Jul 2025 22:55:47 GMT (envelope-from git) Date: Wed, 23 Jul 2025 22:55:47 GMT Message-Id: <202507232255.56NMtl6E093845@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: 9a9e93f38642 - stable/14 - Fix the zfsd_fault_001_pos test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 9a9e93f386421270b721392183fc3c5088f0055f Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=9a9e93f386421270b721392183fc3c5088f0055f commit 9a9e93f386421270b721392183fc3c5088f0055f Author: Alan Somers AuthorDate: 2025-05-02 14:48:58 +0000 Commit: Alan Somers CommitDate: 2025-07-23 22:55:00 +0000 Fix the zfsd_fault_001_pos test Due to a regression in ZFS, a pool's status may not change to DEGRADED promptly after a vdev becomes faulted. This test is primarily concerned with vdev status, not pool status, so work around the bug by doing a "zpool reopen". Otherwise the test would time out waiting for a status change that never came. https://github.com/openzfs/zfs/issues/16245 Sponsored by: ConnectWise (cherry picked from commit 01a1dd321807ba8a3ef3a4bfad52d8aa23130d10) --- tests/sys/cddl/zfs/tests/zfsd/zfsd_fault_001_pos.ksh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/sys/cddl/zfs/tests/zfsd/zfsd_fault_001_pos.ksh b/tests/sys/cddl/zfs/tests/zfsd/zfsd_fault_001_pos.ksh index 3456a328e7f9..df704e183fb0 100644 --- a/tests/sys/cddl/zfs/tests/zfsd/zfsd_fault_001_pos.ksh +++ b/tests/sys/cddl/zfs/tests/zfsd/zfsd_fault_001_pos.ksh @@ -78,6 +78,10 @@ for type in "raidz" "mirror"; do $DD if=/dev/zero bs=128k count=1 >> \ /$TESTPOOL/$TESTFS/$TESTFILE 2> /dev/null $FSYNC /$TESTPOOL/$TESTFS/$TESTFILE + # Due to a bug outside of zfsd, it may be necessary to reopen + # the pool before it will become DEGRADED. + # https://github.com/openzfs/zfs/issues/16245 + $ZPOOL reopen $TESTPOOL # Check to see if the pool is faulted yet $ZPOOL status $TESTPOOL | grep -q 'state: DEGRADED' if [ $? == 0 ] From nobody Wed Jul 23 22:58:53 2025 X-Original-To: dev-commits-src-all@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 4bnV1V0MH0z636C7; Wed, 23 Jul 2025 22:58:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnV1T6Tlrz3LTC; Wed, 23 Jul 2025 22:58:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753311533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zg8cHotNaOJ0O6+yhjFtAajLvMse/RtJxm2nkDDPbus=; b=sodWXtdpfz8R40aLmwsfcQuO856Wg5+c/9dy4F18YfbkAxkcb0ENVRx2u6S7kh5kmtaPZh G134oKl6KxbAGS7LJJ9sdlu7TFMOU5XKe8F4iBEk9STtLS6uJ50PDaQK4CwQETErCK+hH2 pkaM0P7orDQXf/cLpxVTXoy1CsukaYFfFcs0zBg2X8D3PaleYNp2XX3U2h29knS3Xw0TFJ lL/PGxiNra/xmCgeEQbIlkWPYrpNls41iKXL3rHEXdZbQIqTUqLbmdqxbAbCr58EbdjLEr g3I8h9RXdwrf6gDCWI7R7hGjfrbgqydUtvTMw5aLhZv7fq1CAUFGbYMDoIn/rA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753311533; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Zg8cHotNaOJ0O6+yhjFtAajLvMse/RtJxm2nkDDPbus=; b=Xo7gNI10guAgGmyY5YyFGB5QK7rGbrZgaoMmNiPV5huwi6c+HqObCh3H1NXY2AtPDPbbLW lM/dKeJcGPkflCDUO4xZXrD9NLmuhdVYQVQGNGw/6EimlXDroaLAz8WnNQ46PtlggFb2Zr CQ1+VewhqFoOh/2AwY3JX9CcAC5Z9OOp0lV41WHIhYbKFfF9fL4hVeHC4TLyDub53X6pN7 n3hu23ys6LdC8y+QkiKmW+wwdpTIxOHVmmd066gSKht7bEPfOPyj869hAduS4ZbnDA1ptL qVWgCae7+q06oJj3cys0WO6kUxhh/sr5Rjwq/v8hPDHpjzFiLk+bsfhn4xnnGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753311533; a=rsa-sha256; cv=none; b=h+/GvzlHzS7Wv5ESgseifEvlEmFjLuqvEKGd1R/XfSwpTBTiFK+ZicGZ8LyOzNmMdgBriL mKBsoq53AE3m0sX3gwvIUZg/AcQeLQnQx61zZN6VkxPuQvh0KcS2MYHuIBQsZC/xE2FaAE dLeFUw2xYtczONPYn4dNlHkgi+5ON2Dg/SpZyiNFtmnIUcKM5kum6LhYhngkTZQbedhpq/ rh8092KNdiaZd5sdTUXFqP6EfgqEXz9+QXi+1MeCN5f2GEP+54ReP1B8dAT1mivGutfTix Gz1HvKRmfpWPAOy2I+kK65N7N2OK17iFBSlm7FlDl1mY+Gsj+p9pawM+lfFgww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnV1T5vQFzYww; Wed, 23 Jul 2025 22:58:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NMwrUe094896; Wed, 23 Jul 2025 22:58:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NMwr9h094893; Wed, 23 Jul 2025 22:58:53 GMT (envelope-from git) Date: Wed, 23 Jul 2025 22:58:53 GMT Message-Id: <202507232258.56NMwr9h094893@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: f1e63fcb0c4a - stable/14 - fusefs: revert a workaround for a googletest bug List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f1e63fcb0c4a52d040f3ca9513043c799259471b Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=f1e63fcb0c4a52d040f3ca9513043c799259471b commit f1e63fcb0c4a52d040f3ca9513043c799259471b Author: Alan Somers AuthorDate: 2025-06-05 14:44:43 +0000 Commit: Alan Somers CommitDate: 2025-07-23 22:56:29 +0000 fusefs: revert a workaround for a googletest bug This bug was fixed by googletest back in 2019 and released in googletest 1.10.0, I think. Using GTEST_SKIP from a test environment works now. https://github.com/google/googletest/issues/2189 MFC after: 2 weeks Sponsored by: ConnectWise (cherry picked from commit 35c4ea02cb9fe199dd88b19cf51fef56838c8cba) --- tests/sys/fs/fusefs/utils.cc | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/tests/sys/fs/fusefs/utils.cc b/tests/sys/fs/fusefs/utils.cc index d059221b2e55..d702dec50247 100644 --- a/tests/sys/fs/fusefs/utils.cc +++ b/tests/sys/fs/fusefs/utils.cc @@ -124,6 +124,7 @@ bool is_unsafe_aio_enabled(void) { class FuseEnv: public Environment { virtual void SetUp() { + check_environment(); } }; @@ -132,14 +133,6 @@ void FuseTest::SetUp() { const char *maxphys_node = "kern.maxphys"; size_t size; - /* - * XXX check_environment should be called from FuseEnv::SetUp, but - * can't due to https://github.com/google/googletest/issues/2189 - */ - check_environment(); - if (IsSkipped()) - return; - size = sizeof(m_maxbcachebuf); ASSERT_EQ(0, sysctlbyname(maxbcachebuf_node, &m_maxbcachebuf, &size, NULL, 0)) << strerror(errno); From nobody Wed Jul 23 22:58:54 2025 X-Original-To: dev-commits-src-all@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 4bnV1W5cj4z636C8; Wed, 23 Jul 2025 22:58: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnV1V6zxJz3LNK; Wed, 23 Jul 2025 22:58:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753311535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ds3hUvOZ6mGb+2sOzQlQNVxR+UCOzVj1bBwEbf4alU=; b=oTCibKPUwbwpgpqTtt0hgUvkOKZh7qPVs5p+rF66T19lak+TOyPGeaQ4Oda1AGTDiJmLjH o2rKZoRYzoBwQAYuWsbDgoXu3GrXRQJdc/+qAkKZfGN0QbDEdsaVtmAX1+zijJXhpABRQR LWcffZp11vlLHp4/Qo35m7aRLw800iaS6VM8LI63TkhCF+rEwNBaU93jkggKi4GbJaVjU8 psDwZ7PWxmK2WQhmCuHqrGI1kxMCXjdIcBAif/atKHRlztA4S1DP6YX+/mQ8WoBYyI7Ki1 Rpv81N2pC5lpr7Sb/s++ut1Hv/l4CLawHZPfKYBWEdwVgr7p3YN5m5JWAbWxZA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753311535; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3ds3hUvOZ6mGb+2sOzQlQNVxR+UCOzVj1bBwEbf4alU=; b=n7HeXxaSIXco2NuVrhQjXWhqI6kJ52SUs8N7Ax4fbQ/+RINA+ijQhgfSuszYLZ496Ms6m1 Iw0vfRun1X5FWBmLBluv6zC9+5QuNDUsyzfy8BUcri3MC2v3QXvAovvXkUYBM3SwJQ0XO1 Gbw50/CMn8OpykmV+YNPNgAPMR5XhIAuA3A8VRvgjR2ykU11BrK1paQBjaY3NFfHVJwdwS EEGKnA+GfujDT36m0Tri8Bpj2jQ6ojE7jJR4jp0owD4XBZJa9IXGB/W4n+T+5Xa46yWEhE rvBtzaBG03++x4xvJ2Zwsik+bZWFL4NcK+tLGeEhKGjSOXVmm5/CX0ou5Y/lIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753311535; a=rsa-sha256; cv=none; b=v1XsxfZgjR/YlXroHRxqAOKi4cj4W2EH1KRLiwZrN9t/I6BtMx0z7nMFN03BO9Laj77GOe QDo6CzABuWXm11qY1xJmm/lHW/go8KGwuw57KlrdlX3eyvbhw0FRKU4y9/uqFzzaUTuYgP 4URBlA2dFXZq5YEgG4Pw6wfhxFvMdMfZZPJQ5fv4ioR+4WEM8WDQU5LGaP5lK8svKC2Yul 47rBQJgcSUAAV18zAtBbSwI1uj1h+bqWTr9BhI0PnMXFuAtKE7YPGrARETJQWOX2zKKdPe +ekoTDipJ8YH6PyeaG9rpQok3PsLhy50zz/ofOUdrQaA+BR33IJafnR6LFviEg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnV1V6Y4nzYsx; Wed, 23 Jul 2025 22:58:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NMwsRi094942; Wed, 23 Jul 2025 22:58:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NMws1I094939; Wed, 23 Jul 2025 22:58:54 GMT (envelope-from git) Date: Wed, 23 Jul 2025 22:58:54 GMT Message-Id: <202507232258.56NMws1I094939@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: 0a0d323157cb - stable/14 - fusefs: delete dead code List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 0a0d323157cb54970b5c525db307c17c2e7ff864 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=0a0d323157cb54970b5c525db307c17c2e7ff864 commit 0a0d323157cb54970b5c525db307c17c2e7ff864 Author: Alan Somers AuthorDate: 2025-06-05 20:32:22 +0000 Commit: Alan Somers CommitDate: 2025-07-23 22:56:33 +0000 fusefs: delete dead code These lines have been commented out ever since the first import of fuse. The intention seems to be for the original developer to experiment with different error handling strategies, but they're very obsolete by now. Delete them. MFC after: 2 weeks Sponsored by: ConnectWise (cherry picked from commit 7ce93195ddb30b371022ae3adbd9bd24189e1444) --- sys/fs/fuse/fuse_ipc.c | 5 ----- sys/fs/fuse/fuse_vnops.c | 4 +--- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/sys/fs/fuse/fuse_ipc.c b/sys/fs/fuse/fuse_ipc.c index 21787b6b543a..379306f8ef2e 100644 --- a/sys/fs/fuse/fuse_ipc.c +++ b/sys/fs/fuse/fuse_ipc.c @@ -444,11 +444,6 @@ retry: if (err == EWOULDBLOCK) { SDT_PROBE2(fusefs, , ipc, trace, 3, "fticket_wait_answer: EWOULDBLOCK"); -#ifdef XXXIP /* die conditionally */ - if (!fdata_get_dead(data)) { - fdata_set_dead(data); - } -#endif err = ETIMEDOUT; fticket_set_answered(ftick); } else if ((err == EINTR || err == ERESTART)) { diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 423ce05a595f..88bf20382c05 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -1937,10 +1937,8 @@ fuse_vnop_readdir(struct vop_readdir_args *ap) if (fuse_isdeadfs(vp)) { return ENXIO; } - if ( /* XXXIP ((uio_iovcnt(uio) > 1)) || */ - (uio_resid(uio) < sizeof(struct dirent))) { + if (uio_resid(uio) < sizeof(struct dirent)) return EINVAL; - } tresid = uio->uio_resid; err = fuse_filehandle_get_dir(vp, &fufh, cred, pid); From nobody Wed Jul 23 22:58:52 2025 X-Original-To: dev-commits-src-all@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 4bnV1T1rflz636Ld; Wed, 23 Jul 2025 22:58:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnV1S69zQz3LYQ; Wed, 23 Jul 2025 22:58:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753311532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WklHeI1x8s3pZmlIGX1+i9DFKuuPe8KawbkV4KIBodY=; b=hSpf8ZK3W9h4iXxi2DwhI68jafY99qrZhgf6DIsdLcZ3L8NsV0spuA05QvXvNsC8gfJcru 6REWcAmFsLxpBYIUj/lB1XL6kULN4ROKWItZFQMvpv/UMWnqnLsGRmVsiH1RHuehTOPpr8 yBqhs6KpCbUdKz8BbfjGFxRtaCkyFZbTcAwmKvSqa9tjMl6ySarRz0aXSuUlGpQqANnQS/ 3E/gZ4FiSvuNfqbw2iWrIsTd7NSncwkM651Yawq835v/RfbcwgtJFbwicJ1GM9N1lmRtVn 4xvZRmaj6t5WWspoAY1x5+4BkLbYbfJCM5P6jfgEq8VwRsVSpYnw1rr+nNcxkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753311532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WklHeI1x8s3pZmlIGX1+i9DFKuuPe8KawbkV4KIBodY=; b=t7wX4ZJlws/dv0OXYZPze/1KTUbIsHI+gNqSI9J4QX2D29aKtgMqoSkPeRhBj0jooVhEug 4E3f3ebNKz9KiZZv1MmFndeAIXA1pcPXWStovByeFRsku3vUWRbB2F/A4irk0YjJ0MaUJ5 jlSXn/B8nifDpeOkWBn+E4JwpHJikYYuYUYSfhW9afA3DE/DQXMFo3pV8tJh/B+WSEpAWO IUnhTaT2oNVU7tdwlee5B986q+ndd/0zdEN4DKi7qdsl944bRUndvCP3QlJiIdD3Au1PsI cmZdzsbu4TcKO5NoPj/Eofq07Wx1TWltg5EkTfAdIT9p3weNMQ3/ScuLg9bVjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753311532; a=rsa-sha256; cv=none; b=ZTO+4mN8pbc+Y4O/T/QYCjukmH/EUeFjwjaMB0VFMDSPQNYAChTsZKDOoJP7Vkx5WwXkOz 4ybtyCY7H/m6w3bx7GgbQ3683M2VEU3WdWP1SgF1rNV6Ot9V57gz8uQrPJ4ZxmvfBgnT/P VEnI2F680QXXBp8AKOfxHEQSF/AqrUSJmMNh7SS+Dm6RuYF1q5WZitHf/1mNqkl/Vgd1mV qqsVP0KW57Bt584xGaFr7a/arwDW+UbAnshdi9876g+z8BWmcCw/WCfSnqQuFIuk0lqXEx lu49HP72HZpcEY6Pj3a45WQbguDPrQrM3mbNjvAAehXTve1HosZzQQChu/q/Hg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnV1S5TVtzZCF; Wed, 23 Jul 2025 22:58:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NMwqTk094859; Wed, 23 Jul 2025 22:58:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NMwq11094856; Wed, 23 Jul 2025 22:58:52 GMT (envelope-from git) Date: Wed, 23 Jul 2025 22:58:52 GMT Message-Id: <202507232258.56NMwq11094856@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: 0432511d3ff6 - stable/14 - fusefs: correct a comment in the tests List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 0432511d3ff6f72abc2de326c47a69a0e0be6512 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=0432511d3ff6f72abc2de326c47a69a0e0be6512 commit 0432511d3ff6f72abc2de326c47a69a0e0be6512 Author: Alan Somers AuthorDate: 2025-05-30 16:54:06 +0000 Commit: Alan Somers CommitDate: 2025-07-23 22:56:25 +0000 fusefs: correct a comment in the tests It's been wrong ever since the original commit in 2019. [skip ci] MFC after: 1 week Sponsored by: ConnectWise (cherry picked from commit 7f07575084a279c7f0cc330fe7e2c04d5a05a487) --- tests/sys/fs/fusefs/destroy.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/sys/fs/fusefs/destroy.cc b/tests/sys/fs/fusefs/destroy.cc index 16d50da19b9b..45acb1f99724 100644 --- a/tests/sys/fs/fusefs/destroy.cc +++ b/tests/sys/fs/fusefs/destroy.cc @@ -60,7 +60,7 @@ static void* open_th(void* arg) { * Check for any memory leaks like this: * 1) kldunload fusefs, if necessary * 2) kldload fusefs - * 3) ./destroy --gtest_filter=Destroy.unsent_operations + * 3) ./destroy --gtest_filter=Death.unsent_operations * 4) kldunload fusefs * 5) check /var/log/messages for anything like this: Freed UMA keg (fuse_ticket) was not empty (31 items). Lost 2 pages of memory. From nobody Wed Jul 23 23:29:31 2025 X-Original-To: dev-commits-src-all@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 4bnVhr44SNz637Ly; Wed, 23 Jul 2025 23:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnVhq2lXxz3qZv; Wed, 23 Jul 2025 23:29:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753313371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CNUQe5f8AvgInKDOKy9/CrljVAsvZHkejsGbWMmusOM=; b=mhvPsFrH8e5Gpkq/K5nBuIK/ESAYYH1UylilGmFnKb8FYvGcZ133/aNSRLjuHTapL3bYr2 hPOJHWt0XHIMuUBnNNAMU7ZgM3tseQL1IIRX/6aEIIUvVFe0QLRiRttfY2XLg1I8q1N4fC O28kBJmpxslv8HjAR4Aeh+yKr8yzH83uQJVFlfeU2m6DglUra9bMQH0SPMb9YKsSWEdTs0 Hg4FywB5E9Q5cg5v+MSRqFJ1mqFXtEUvx/jwkGT2uV9CFObgP15lyDR05H/ByHmFi4lHOe hdRI6VbPeOI8R13WbYEl4fT82lHra5ELB1hO8K4LDjzFzhxGR3/dztTGzwTytw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753313371; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CNUQe5f8AvgInKDOKy9/CrljVAsvZHkejsGbWMmusOM=; b=x1Ysel9/G09/QFWp+1eIw4i7rD//gnBXdbxLA6uqPYJ1RKgZX3dD70PVxbqByEuAhyFVlG iCcqNzndBU8+kZ+MG/RlBCtlqDbDmB7ri8QkNzOaH9FfFA2GciHIBnkGePi/sslJui1utx JQLXBZCA2r1fUznZ4FU1L10yGFZVxuKG8/4u8NrNop0Wly/HD+KRo48JUNUwldgTqIxlS2 m8cX5sa1H24bP+zduMIm6RHY+R6XVfs792ISc5Fz90npYztqVafXkeXtim1itk5TpAEfwU gBgY2UmyyGT39kkzUNwQJx7gD/OZ4PVGIUQK11QeOegj4BzyvfoAi4epTDGkbg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753313371; a=rsa-sha256; cv=none; b=ASeUNnoL0rMGXuNFH6bc+DJTucNHZaugyE4o1kIF7LEpfKnY37uo5lsXsrEGKq1DcF9oPA FnIHlgWnNVO+T9FnhsQqpnlZziDV1Jmhp/Aq5HJa1PgUdvctUOB9dZ/xldtSeJTPRZHia+ mzrFN7bcjWmFufNbzduGjbdv7pif6rMmgaMTCQ0yZkhIJPZhZCM3eW5Q6XPTcDXstlTza8 obq3EwEGK0uL0I4jbDNlVNzepQHDB8FSTLuVnItpf5nXKDI+QJGT9IkN3bh/K3Oo7O2qke CZtsv1B1VFU6WEja+aQSvFNUslm8fY1foxHuH4i2JEaNPneOy9Ei7jHDd+COtQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnVhq2LbmzZNc; Wed, 23 Jul 2025 23:29:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NNTVUC052323; Wed, 23 Jul 2025 23:29:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NNTV4s052320; Wed, 23 Jul 2025 23:29:31 GMT (envelope-from git) Date: Wed, 23 Jul 2025 23:29:31 GMT Message-Id: <202507232329.56NNTV4s052320@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: 34a893a0ab10 - stable/14 - fusefs: Fix a panic when unmounting before init List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 34a893a0ab1050db08c0c4cbd21261537b779549 Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=34a893a0ab1050db08c0c4cbd21261537b779549 commit 34a893a0ab1050db08c0c4cbd21261537b779549 Author: Alan Somers AuthorDate: 2025-06-05 20:00:48 +0000 Commit: Alan Somers CommitDate: 2025-07-23 23:28:51 +0000 fusefs: Fix a panic when unmounting before init fusefs would page fault due to the following sequence of events: * The server did not respond to FUSE_INIT in timely fashion. * Some other process tried to do unmount. * That other process got killed by a signal. * The server finally responded to FUSE_INIT. PR: 287438 Sponsored by: ConnectWise Reviewed by: arrowd Differential Revision: https://reviews.freebsd.org/D50799 (cherry picked from commit cc9c213086795fd821e6c17ee99a1db81a2141b2) --- sys/fs/fuse/fuse_internal.c | 3 + tests/sys/fs/fusefs/Makefile | 1 + tests/sys/fs/fusefs/mockfs.cc | 18 +++-- tests/sys/fs/fusefs/mockfs.hh | 6 +- tests/sys/fs/fusefs/pre-init.cc | 154 ++++++++++++++++++++++++++++++++++++++++ tests/sys/fs/fusefs/utils.cc | 3 +- tests/sys/fs/fusefs/utils.hh | 2 + 7 files changed, 179 insertions(+), 8 deletions(-) diff --git a/sys/fs/fuse/fuse_internal.c b/sys/fs/fuse/fuse_internal.c index f3206a3ddf9c..ffea3afacb4f 100644 --- a/sys/fs/fuse/fuse_internal.c +++ b/sys/fs/fuse/fuse_internal.c @@ -980,6 +980,9 @@ fuse_internal_init_callback(struct fuse_ticket *tick, struct uio *uio) struct fuse_data *data = tick->tk_data; struct fuse_init_out *fiio = NULL; + if (fdata_get_dead(data)) + goto out; + if ((err = tick->tk_aw_ohead.error)) { goto out; } diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile index cff8a0a483ad..9d9a6785c838 100644 --- a/tests/sys/fs/fusefs/Makefile +++ b/tests/sys/fs/fusefs/Makefile @@ -40,6 +40,7 @@ GTESTS+= nfs GTESTS+= notify GTESTS+= open GTESTS+= opendir +GTESTS+= pre-init GTESTS+= read GTESTS+= readdir GTESTS+= readlink diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc index 35ae6c207229..f48165f6a151 100644 --- a/tests/sys/fs/fusefs/mockfs.cc +++ b/tests/sys/fs/fusefs/mockfs.cc @@ -421,7 +421,7 @@ MockFS::MockFS(int max_read, int max_readahead, bool allow_other, bool push_symlinks_in, bool ro, enum poll_method pm, uint32_t flags, uint32_t kernel_minor_version, uint32_t max_write, bool async, bool noclusterr, unsigned time_gran, bool nointr, bool noatime, - const char *fsname, const char *subtype) + const char *fsname, const char *subtype, bool no_auto_init) : m_daemon_id(NULL), m_kernel_minor_version(kernel_minor_version), m_kq(pm == KQ ? kqueue() : -1), @@ -530,7 +530,9 @@ MockFS::MockFS(int max_read, int max_readahead, bool allow_other, ON_CALL(*this, process(_, _)) .WillByDefault(Invoke(this, &MockFS::process_default)); - init(flags); + if (!no_auto_init) + init(flags); + bzero(&sa, sizeof(sa)); sa.sa_handler = sigint_handler; sa.sa_flags = 0; /* Don't set SA_RESTART! */ @@ -544,10 +546,7 @@ MockFS::MockFS(int max_read, int max_readahead, bool allow_other, MockFS::~MockFS() { kill_daemon(); - if (m_daemon_id != NULL) { - pthread_join(m_daemon_id, NULL); - m_daemon_id = NULL; - } + join_daemon(); ::unmount("mountpoint", MNT_FORCE); rmdir("mountpoint"); if (m_kq >= 0) @@ -788,6 +787,13 @@ void MockFS::kill_daemon() { m_fuse_fd = -1; } +void MockFS::join_daemon() { + if (m_daemon_id != NULL) { + pthread_join(m_daemon_id, NULL); + m_daemon_id = NULL; + } +} + void MockFS::loop() { std::vector> out; diff --git a/tests/sys/fs/fusefs/mockfs.hh b/tests/sys/fs/fusefs/mockfs.hh index 1de77767d0c9..ba6f7fded9d0 100644 --- a/tests/sys/fs/fusefs/mockfs.hh +++ b/tests/sys/fs/fusefs/mockfs.hh @@ -366,13 +366,17 @@ class MockFS { enum poll_method pm, uint32_t flags, uint32_t kernel_minor_version, uint32_t max_write, bool async, bool no_clusterr, unsigned time_gran, bool nointr, - bool noatime, const char *fsname, const char *subtype); + bool noatime, const char *fsname, const char *subtype, + bool no_auto_init); virtual ~MockFS(); /* Kill the filesystem daemon without unmounting the filesystem */ void kill_daemon(); + /* Wait until the daemon thread terminates */ + void join_daemon(); + /* Process FUSE requests endlessly */ void loop(); diff --git a/tests/sys/fs/fusefs/pre-init.cc b/tests/sys/fs/fusefs/pre-init.cc new file mode 100644 index 000000000000..e990d3cafffa --- /dev/null +++ b/tests/sys/fs/fusefs/pre-init.cc @@ -0,0 +1,154 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 ConnectWise + * + * 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. + */ + +extern "C" { +#include +#include +#include +#include + +#include +#include +#include +#include +} + +#include "mockfs.hh" +#include "utils.hh" + +using namespace testing; + +/* Tests for behavior that happens before the server responds to FUSE_INIT */ +class PreInit: public FuseTest { +void SetUp() { + m_no_auto_init = true; + FuseTest::SetUp(); +} +}; + +static void* unmount1(void* arg __unused) { + ssize_t r; + + r = unmount("mountpoint", 0); + if (r >= 0) + return 0; + else + return (void*)(intptr_t)errno; +} + +/* + * Attempting to unmount the file system before it fully initializes should + * work fine. The unmount will complete after initialization does. + */ +TEST_F(PreInit, unmount_before_init) +{ + sem_t sem0; + pthread_t th1; + + ASSERT_EQ(0, sem_init(&sem0, 0, 0)) << strerror(errno); + + EXPECT_CALL(*m_mock, process( + ResultOf([](auto in) { + return (in.header.opcode == FUSE_INIT); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnImmediate([&](auto in, auto& out) { + SET_OUT_HEADER_LEN(out, init); + out.body.init.major = FUSE_KERNEL_VERSION; + out.body.init.minor = FUSE_KERNEL_MINOR_VERSION; + out.body.init.flags = in.body.init.flags & m_init_flags; + out.body.init.max_write = m_maxwrite; + out.body.init.max_readahead = m_maxreadahead; + out.body.init.time_gran = m_time_gran; + sem_wait(&sem0); + }))); + expect_destroy(0); + + ASSERT_EQ(0, pthread_create(&th1, NULL, unmount1, NULL)); + nap(); /* Wait for th1 to block in unmount() */ + sem_post(&sem0); + /* The daemon will quit after receiving FUSE_DESTROY */ + m_mock->join_daemon(); +} + +/* + * Don't panic in this very specific scenario: + * + * The server does not respond to FUSE_INIT in timely fashion. + * Some other process tries to do unmount. + * That other process gets killed by a signal. + * The server finally responds to FUSE_INIT. + * + * Regression test for bug 287438 + * https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=287438 + */ +TEST_F(PreInit, signal_during_unmount_before_init) +{ + sem_t sem0; + pid_t child; + + ASSERT_EQ(0, sem_init(&sem0, 0, 0)) << strerror(errno); + + EXPECT_CALL(*m_mock, process( + ResultOf([](auto in) { + return (in.header.opcode == FUSE_INIT); + }, Eq(true)), + _) + ).WillOnce(Invoke(ReturnImmediate([&](auto in, auto& out) { + SET_OUT_HEADER_LEN(out, init); + out.body.init.major = FUSE_KERNEL_VERSION; + /* + * Use protocol 7.19, like libfuse2 does. The server must use + * protocol 7.27 or older to trigger the bug. + */ + out.body.init.minor = 19; + out.body.init.flags = in.body.init.flags & m_init_flags; + out.body.init.max_write = m_maxwrite; + out.body.init.max_readahead = m_maxreadahead; + out.body.init.time_gran = m_time_gran; + sem_wait(&sem0); + }))); + + if ((child = ::fork()) == 0) { + /* + * In child. This will block waiting for FUSE_INIT to complete + * or the receipt of an asynchronous signal. + */ + (void) unmount("mountpoint", 0); + _exit(0); /* Unreachable, unless parent dies after fork */ + } else if (child > 0) { + /* In parent. Wait for child process to start, then kill it */ + nap(); + kill(child, SIGINT); + waitpid(child, NULL, WEXITED); + } else { + FAIL() << strerror(errno); + } + m_mock->m_quit = true; /* Since we are by now unmounted. */ + sem_post(&sem0); + m_mock->join_daemon(); +} diff --git a/tests/sys/fs/fusefs/utils.cc b/tests/sys/fs/fusefs/utils.cc index d702dec50247..125b7e2d6fc7 100644 --- a/tests/sys/fs/fusefs/utils.cc +++ b/tests/sys/fs/fusefs/utils.cc @@ -151,7 +151,8 @@ void FuseTest::SetUp() { m_default_permissions, m_push_symlinks_in, m_ro, m_pm, m_init_flags, m_kernel_minor_version, m_maxwrite, m_async, m_noclusterr, m_time_gran, - m_nointr, m_noatime, m_fsname, m_subtype); + m_nointr, m_noatime, m_fsname, m_subtype, + m_no_auto_init); /* * FUSE_ACCESS is called almost universally. Expecting it in * each test case would be super-annoying. Instead, set a diff --git a/tests/sys/fs/fusefs/utils.hh b/tests/sys/fs/fusefs/utils.hh index 9dd8dad6b5cc..91bbba909672 100644 --- a/tests/sys/fs/fusefs/utils.hh +++ b/tests/sys/fs/fusefs/utils.hh @@ -69,6 +69,7 @@ class FuseTest : public ::testing::Test { bool m_async; bool m_noclusterr; bool m_nointr; + bool m_no_auto_init; unsigned m_time_gran; MockFS *m_mock = NULL; const static uint64_t FH = 0xdeadbeef1a7ebabe; @@ -95,6 +96,7 @@ class FuseTest : public ::testing::Test { m_async(false), m_noclusterr(false), m_nointr(false), + m_no_auto_init(false), m_time_gran(1), m_fsname(""), m_subtype(""), From nobody Wed Jul 23 23:29:32 2025 X-Original-To: dev-commits-src-all@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 4bnVhr5rsKz637Tw; Wed, 23 Jul 2025 23:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnVhr3Lsrz3qL1; Wed, 23 Jul 2025 23:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753313372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jmSFomf9xjIvGieUUKv7p+BDwHKNL3SQ7ZZGSJBPvgc=; b=yac1RofFVmhngsk6gEFvlc+gy6ZsZ6xo2FPfqIa/gjd84MwGjdbrzYB9jqHyKwQO8/PHKw 0pWimM8Si2A1IJYeVFZG0AKTxFJNdOo6Lu9q3JSreCgt7K1x9j+edHtP869U9KSwgEQn/o 7f7ctLhJ0690mgQKJqLQYdoyXVCPYz0tQ0RLqt2Md3Q/ls4whN05ycGKgpgx2MCxBqW/Mc aptR4ILYAIL3ubsjvODwOjhmxjl9Jxo++28n0fWq0PIvFrhIusAZWgR3lc4oJBYZWuYh3R 3KE40kUh0loC40NDM3+gUPACOCMu3AC9rI64xQMU1Ut2CK97PnYUUBfMnwJSgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753313372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jmSFomf9xjIvGieUUKv7p+BDwHKNL3SQ7ZZGSJBPvgc=; b=OlsUkz0d7DFtwtTgyh+q9g5l05TGRzviYBc+SlFA618IdF3l/FytkjrJGZjnQ0MWSd3kK4 f3embdiJbVIwYRaw8wfcqHNiuj6+3pmo5QhuJNhLbrMloh0p4+dss9HPylFVo3tIO7pLR7 FG/M/krWY0izU9ihioWMhSCMaWjj+NRkQoMEi8tf/rZtx0UlqDbi4ODbESQnptQPfaUhEz u+WmMMpSX/TwUMUylsaX61D0js/TjhmUQdiEtw2/uO+aCyY1jv14NC88hdByNgRKLOs+zo sJMH1DZD3hzNjBXrEMPUpjxV3hpyrDoRd8J+nb0LCbhIF6kCZg47y1M2NomcNg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753313372; a=rsa-sha256; cv=none; b=MlsgNP1VP/IenQOUC/8hV75TaYspQHkTgzvmHmw1sqTMymJIkxx6me6sb+1q8R43CBveaM zo3YmX4OqcGUdJ2OHDKHYI3s21u/cgbxkeOskEmo7orLHw6wKxsIutzPelD4ctJF7p3Tgk rdA74zrkFYPAlkSNP9pmKgiuEcw0dpX78+Ij03VSfKHXM9FEmLxoF4KnvnRwh6n/vcIVkQ bOR5S3TGNV03NdbtxRx7DYaihHBiSRV5X/uD4WVrVHQpv7EKAGEGgUIKauTV418GA+s6qf XBn8/XJGN8GXit+yqRZ55OK/w3Q5GI611mSgCfMqhUoNiMZgQqU38oS7l0W2Iw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnVhr2w1nzZvk; Wed, 23 Jul 2025 23:29:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NNTW0C052357; Wed, 23 Jul 2025 23:29:32 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NNTWRM052354; Wed, 23 Jul 2025 23:29:32 GMT (envelope-from git) Date: Wed, 23 Jul 2025 23:29:32 GMT Message-Id: <202507232329.56NNTWRM052354@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: 5a8d8ffd7c8d - stable/14 - fusefs: add more checks for buggy FUSE servers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 5a8d8ffd7c8d3f7f09f18fc53e7c74ec6ef6698b Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=5a8d8ffd7c8d3f7f09f18fc53e7c74ec6ef6698b commit 5a8d8ffd7c8d3f7f09f18fc53e7c74ec6ef6698b Author: Alan Somers AuthorDate: 2025-01-15 19:25:34 +0000 Commit: Alan Somers CommitDate: 2025-07-23 23:28:54 +0000 fusefs: add more checks for buggy FUSE servers * If a FUSE file system is NFS-exported (either by a kernel or userspace NFS server), then it must support FUSE_LOOKUP operations for ".". But if the response reports a different nodeid than the request, that's very bad. Fail the operation and warn the operator. * In general, a FUSE file may have a distinct "nodeid" and "inode number". But it the file system is NFS-exported (either by a kernel or userspace NFS server), then those two must match, because the NFS server will do VFS_VGET operations using the inode number. If they don't match, warn the operator. Sponsored by: ConnectWise Differential Revision: https://reviews.freebsd.org/D48471 (cherry picked from commit f1ec3bc06ed276e6e24996515bdce729d51e11d8) --- sys/fs/fuse/fuse_ipc.h | 2 + sys/fs/fuse/fuse_node.c | 19 ++++++ sys/fs/fuse/fuse_vfsops.c | 13 ++++ tests/sys/fs/fusefs/last_local_modify.cc | 5 +- tests/sys/fs/fusefs/lookup.cc | 7 ++ tests/sys/fs/fusefs/nfs.cc | 106 +++++++++++++++++++++++++++++++ 6 files changed, 149 insertions(+), 3 deletions(-) diff --git a/sys/fs/fuse/fuse_ipc.h b/sys/fs/fuse/fuse_ipc.h index 5648624f4c63..3bfc859dbac9 100644 --- a/sys/fs/fuse/fuse_ipc.h +++ b/sys/fs/fuse/fuse_ipc.h @@ -238,6 +238,8 @@ struct fuse_data { #define FSESS_WARN_WB_CACHE_INCOHERENT 0x400000 /* WB cache incoherent */ #define FSESS_WARN_ILLEGAL_INODE 0x800000 /* Illegal inode for new file */ #define FSESS_WARN_READLINK_EMBEDDED_NUL 0x1000000 /* corrupt READLINK output */ +#define FSESS_WARN_DOT_LOOKUP 0x2000000 /* Inconsistent . LOOKUP response */ +#define FSESS_WARN_INODE_MISMATCH 0x4000000 /* ino != nodeid */ #define FSESS_MNTOPTS_MASK ( \ FSESS_DAEMON_CAN_SPY | FSESS_PUSH_SYMLINKS_IN | \ FSESS_DEFAULT_PERMISSIONS | FSESS_INTR) diff --git a/sys/fs/fuse/fuse_node.c b/sys/fs/fuse/fuse_node.c index 297ea4a1fad2..c0ec6b202c6e 100644 --- a/sys/fs/fuse/fuse_node.c +++ b/sys/fs/fuse/fuse_node.c @@ -298,6 +298,8 @@ fuse_vnode_get(struct mount *mp, __enum_uint8(vtype) vtyp) { struct thread *td = curthread; + bool exportable = fuse_get_mpdata(mp)->dataflags & FSESS_EXPORT_SUPPORT; + /* * feo should only be NULL for the root directory, which (when libfuse * is used) always has generation 0 @@ -310,6 +312,23 @@ fuse_vnode_get(struct mount *mp, "Assigned same inode to both parent and child."); return EIO; } + if (feo && feo->nodeid != feo->attr.ino && exportable) { + /* + * NFS servers (both kernelspace and userspace) rely on + * VFS_VGET to lookup inodes. But that's only possible if the + * file's inode number matches its nodeid, which isn't + * necessarily the case for FUSE. If they don't match, then we + * can complete the current operation, but future VFS_VGET + * operations will almost certainly return spurious results. + * Warn the operator. + * + * But only warn the operator if the file system reports + * NFS-compatibility, because that's the only time that this + * matters, and dumb fuse servers abound. + */ + fuse_warn(fuse_get_mpdata(mp), FSESS_WARN_INODE_MISMATCH, + "file has different inode number and nodeid."); + } err = fuse_vnode_alloc(mp, td, nodeid, vtyp, vpp); if (err) { diff --git a/sys/fs/fuse/fuse_vfsops.c b/sys/fs/fuse/fuse_vfsops.c index ce9c1d7fd946..7d58348349c7 100644 --- a/sys/fs/fuse/fuse_vfsops.c +++ b/sys/fs/fuse/fuse_vfsops.c @@ -569,12 +569,25 @@ fuse_vfsop_vget(struct mount *mp, ino_t ino, int flags, struct vnode **vpp) goto out; feo = (struct fuse_entry_out *)fdi.answ; + if (feo->nodeid == 0) { /* zero nodeid means ENOENT and cache it */ error = ENOENT; goto out; } + if (feo->nodeid != nodeid) { + /* + * Something is very wrong with the server if "foo/." has a + * different inode number than "foo". + */ + fuse_warn(data, FSESS_WARN_DOT_LOOKUP, + "Inconsistent LOOKUP response: \"FILE/.\" has a different " + "inode number than \"FILE\"."); + error = EIO; + goto out; + } + vtyp = IFTOVT(feo->attr.mode); error = fuse_vnode_get(mp, feo, nodeid, NULL, vpp, NULL, vtyp); if (error) diff --git a/tests/sys/fs/fusefs/last_local_modify.cc b/tests/sys/fs/fusefs/last_local_modify.cc index 495bfd8aa959..5fcd3c36c892 100644 --- a/tests/sys/fs/fusefs/last_local_modify.cc +++ b/tests/sys/fs/fusefs/last_local_modify.cc @@ -233,7 +233,6 @@ TEST_P(LastLocalModify, lookup) SET_OUT_HEADER_LEN(out, entry); out.body.entry.nodeid = ino; out.body.entry.attr.size = oldsize; - out.body.entry.nodeid = ino; out.body.entry.attr_valid_nsec = NAP_NS / 2; out.body.entry.attr.ino = ino; out.body.entry.attr.mode = S_IFREG | 0644; @@ -277,6 +276,7 @@ TEST_P(LastLocalModify, lookup) SET_OUT_HEADER_LEN(*out0, entry); out0->body.entry.attr.mode = S_IFREG | 0644; out0->body.entry.nodeid = ino; + out0->body.entry.attr.ino = ino; out0->body.entry.entry_valid = UINT64_MAX; out0->body.entry.attr_valid = UINT64_MAX; out0->body.entry.attr.size = oldsize; @@ -392,7 +392,6 @@ TEST_P(LastLocalModify, vfs_vget) SET_OUT_HEADER_LEN(out, entry); out.body.entry.nodeid = ino; out.body.entry.attr.size = oldsize; - out.body.entry.nodeid = ino; out.body.entry.attr_valid_nsec = NAP_NS / 2; out.body.entry.attr.ino = ino; out.body.entry.attr.mode = S_IFREG | 0644; @@ -414,7 +413,6 @@ TEST_P(LastLocalModify, vfs_vget) SET_OUT_HEADER_LEN(out, entry); out.body.entry.nodeid = ino; out.body.entry.attr.size = oldsize; - out.body.entry.nodeid = ino; out.body.entry.attr_valid_nsec = NAP_NS / 2; out.body.entry.attr.ino = ino; out.body.entry.attr.mode = S_IFREG | 0644; @@ -439,6 +437,7 @@ TEST_P(LastLocalModify, vfs_vget) SET_OUT_HEADER_LEN(*out0, entry); out0->body.entry.attr.mode = S_IFREG | 0644; out0->body.entry.nodeid = ino; + out0->body.entry.attr.ino = ino; out0->body.entry.entry_valid = UINT64_MAX; out0->body.entry.attr_valid = UINT64_MAX; out0->body.entry.attr.size = oldsize; diff --git a/tests/sys/fs/fusefs/lookup.cc b/tests/sys/fs/fusefs/lookup.cc index 6d506c1ab700..2cfe888b6b08 100644 --- a/tests/sys/fs/fusefs/lookup.cc +++ b/tests/sys/fs/fusefs/lookup.cc @@ -560,6 +560,7 @@ TEST_F(LookupExportable, dotdot_entry_cache_timeout) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = S_IFDIR | 0755; out.body.entry.nodeid = foo_ino; + out.body.entry.attr.ino = foo_ino; out.body.entry.attr_valid = UINT64_MAX; out.body.entry.entry_valid = 0; // immediate timeout }))); @@ -568,6 +569,7 @@ TEST_F(LookupExportable, dotdot_entry_cache_timeout) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = S_IFDIR | 0755; out.body.entry.nodeid = bar_ino; + out.body.entry.attr.ino = bar_ino; out.body.entry.attr_valid = UINT64_MAX; out.body.entry.entry_valid = UINT64_MAX; }))); @@ -577,6 +579,7 @@ TEST_F(LookupExportable, dotdot_entry_cache_timeout) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = S_IFDIR | 0755; out.body.entry.nodeid = FUSE_ROOT_ID; + out.body.entry.attr.ino = FUSE_ROOT_ID; out.body.entry.attr_valid = UINT64_MAX; out.body.entry.entry_valid = UINT64_MAX; }))); @@ -607,6 +610,7 @@ TEST_F(LookupExportable, dotdot_no_parent_nid) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = S_IFDIR | 0755; out.body.entry.nodeid = foo_ino; + out.body.entry.attr.ino = foo_ino; out.body.entry.attr_valid = UINT64_MAX; out.body.entry.entry_valid = UINT64_MAX; }))); @@ -615,6 +619,7 @@ TEST_F(LookupExportable, dotdot_no_parent_nid) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = S_IFDIR | 0755; out.body.entry.nodeid = bar_ino; + out.body.entry.attr.ino = bar_ino; out.body.entry.attr_valid = UINT64_MAX; out.body.entry.entry_valid = UINT64_MAX; }))); @@ -632,6 +637,7 @@ TEST_F(LookupExportable, dotdot_no_parent_nid) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = S_IFDIR | 0755; out.body.entry.nodeid = foo_ino; + out.body.entry.attr.ino = foo_ino; out.body.entry.attr_valid = UINT64_MAX; out.body.entry.entry_valid = UINT64_MAX; }))); @@ -640,6 +646,7 @@ TEST_F(LookupExportable, dotdot_no_parent_nid) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = S_IFDIR | 0755; out.body.entry.nodeid = FUSE_ROOT_ID; + out.body.entry.attr.ino = FUSE_ROOT_ID; out.body.entry.attr_valid = UINT64_MAX; out.body.entry.entry_valid = UINT64_MAX; }))); diff --git a/tests/sys/fs/fusefs/nfs.cc b/tests/sys/fs/fusefs/nfs.cc index 27ffc8f5cbc1..2fa2b290f383 100644 --- a/tests/sys/fs/fusefs/nfs.cc +++ b/tests/sys/fs/fusefs/nfs.cc @@ -84,6 +84,7 @@ TEST_F(Fhstat, estale) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = mode; out.body.entry.nodeid = ino; + out.body.entry.attr.ino = ino; out.body.entry.generation = 1; out.body.entry.attr_valid = UINT64_MAX; out.body.entry.entry_valid = 0; @@ -95,6 +96,7 @@ TEST_F(Fhstat, estale) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = mode; out.body.entry.nodeid = ino; + out.body.entry.attr.ino = ino; out.body.entry.generation = 2; out.body.entry.attr_valid = UINT64_MAX; out.body.entry.entry_valid = 0; @@ -121,6 +123,7 @@ TEST_F(Fhstat, lookup_dot) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = mode; out.body.entry.nodeid = ino; + out.body.entry.attr.ino = ino; out.body.entry.generation = 1; out.body.entry.attr.uid = uid; out.body.entry.attr_valid = UINT64_MAX; @@ -132,6 +135,7 @@ TEST_F(Fhstat, lookup_dot) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = mode; out.body.entry.nodeid = ino; + out.body.entry.attr.ino = ino; out.body.entry.generation = 1; out.body.entry.attr.uid = uid; out.body.entry.attr_valid = UINT64_MAX; @@ -160,6 +164,7 @@ TEST_F(Fhstat, lookup_dot_error) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = mode; out.body.entry.nodeid = ino; + out.body.entry.attr.ino = ino; out.body.entry.generation = 1; out.body.entry.attr.uid = uid; out.body.entry.attr_valid = UINT64_MAX; @@ -189,6 +194,7 @@ TEST_F(Fhstat, cached) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = mode; out.body.entry.nodeid = ino; + out.body.entry.attr.ino = ino; out.body.entry.generation = 1; out.body.entry.attr.ino = ino; out.body.entry.attr_valid = UINT64_MAX; @@ -215,6 +221,7 @@ TEST_F(Fhstat, cache_expired) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = mode; out.body.entry.nodeid = ino; + out.body.entry.attr.ino = ino; out.body.entry.generation = 1; out.body.entry.attr.ino = ino; out.body.entry.attr_valid = UINT64_MAX; @@ -226,6 +233,7 @@ TEST_F(Fhstat, cache_expired) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = mode; out.body.entry.nodeid = ino; + out.body.entry.attr.ino = ino; out.body.entry.generation = 1; out.body.entry.attr.ino = ino; out.body.entry.attr_valid = UINT64_MAX; @@ -243,6 +251,99 @@ TEST_F(Fhstat, cache_expired) EXPECT_EQ(ino, sb.st_ino); } +/* + * If the server returns a FUSE_LOOKUP response for a nodeid that we didn't + * lookup, it's a bug. But we should handle it gracefully. + */ +TEST_F(Fhstat, inconsistent_nodeid) +{ + const char FULLPATH[] = "mountpoint/some_dir/."; + const char RELDIRPATH[] = "some_dir"; + fhandle_t fhp; + struct stat sb; + const uint64_t ino_in = 42; + const uint64_t ino_out = 43; + const mode_t mode = S_IFDIR | 0755; + const uid_t uid = 12345; + + EXPECT_LOOKUP(FUSE_ROOT_ID, RELDIRPATH) + .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + SET_OUT_HEADER_LEN(out, entry); + out.body.entry.nodeid = ino_in; + out.body.entry.attr.ino = ino_in; + out.body.entry.attr.mode = mode; + out.body.entry.generation = 1; + out.body.entry.attr.uid = uid; + out.body.entry.attr_valid = UINT64_MAX; + out.body.entry.entry_valid = 0; + }))); + + EXPECT_LOOKUP(ino_in, ".") + .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + SET_OUT_HEADER_LEN(out, entry); + out.body.entry.nodeid = ino_out; + out.body.entry.attr.ino = ino_out; + out.body.entry.attr.mode = mode; + out.body.entry.generation = 1; + out.body.entry.attr.uid = uid; + out.body.entry.attr_valid = UINT64_MAX; + out.body.entry.entry_valid = 0; + }))); + + ASSERT_EQ(0, getfh(FULLPATH, &fhp)) << strerror(errno); + EXPECT_NE(0, fhstat(&fhp, &sb)) << strerror(errno); + EXPECT_EQ(EIO, errno); +} + +/* + * If the server returns a FUSE_LOOKUP response where the nodeid doesn't match + * the inode number, and the file system is exported, it's a bug. But we + * should handle it gracefully. + */ +TEST_F(Fhstat, inconsistent_ino) +{ + const char FULLPATH[] = "mountpoint/some_dir/."; + const char RELDIRPATH[] = "some_dir"; + fhandle_t fhp; + struct stat sb; + const uint64_t nodeid = 42; + const uint64_t ino = 711; // Could be anything that != nodeid + const mode_t mode = S_IFDIR | 0755; + const uid_t uid = 12345; + + EXPECT_LOOKUP(FUSE_ROOT_ID, RELDIRPATH) + .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + SET_OUT_HEADER_LEN(out, entry); + out.body.entry.nodeid = nodeid; + out.body.entry.attr.ino = nodeid; + out.body.entry.attr.mode = mode; + out.body.entry.generation = 1; + out.body.entry.attr.uid = uid; + out.body.entry.attr_valid = UINT64_MAX; + out.body.entry.entry_valid = 0; + }))); + + EXPECT_LOOKUP(nodeid, ".") + .WillOnce(Invoke(ReturnImmediate([=](auto in __unused, auto& out) { + SET_OUT_HEADER_LEN(out, entry); + out.body.entry.nodeid = nodeid; + out.body.entry.attr.ino = ino; + out.body.entry.attr.mode = mode; + out.body.entry.generation = 1; + out.body.entry.attr.uid = uid; + out.body.entry.attr_valid = UINT64_MAX; + out.body.entry.entry_valid = 0; + }))); + + ASSERT_EQ(0, getfh(FULLPATH, &fhp)) << strerror(errno); + /* + * The fhstat operation will actually succeed. But future operations + * will likely fail. + */ + ASSERT_EQ(0, fhstat(&fhp, &sb)) << strerror(errno); + EXPECT_EQ(ino, sb.st_ino); +} + /* * If the server doesn't set FUSE_EXPORT_SUPPORT, then we can't do NFS-style * lookups @@ -260,6 +361,7 @@ TEST_F(FhstatNotExportable, lookup_dot) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = mode; out.body.entry.nodeid = ino; + out.body.entry.attr.ino = ino; out.body.entry.generation = 1; out.body.entry.attr_valid = UINT64_MAX; out.body.entry.entry_valid = 0; @@ -282,6 +384,7 @@ TEST_F(Getfh, eoverflow) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = S_IFDIR | 0755; out.body.entry.nodeid = ino; + out.body.entry.attr.ino = ino; out.body.entry.generation = (uint64_t)UINT32_MAX + 1; out.body.entry.attr_valid = UINT64_MAX; out.body.entry.entry_valid = UINT64_MAX; @@ -304,6 +407,7 @@ TEST_F(Getfh, ok) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = S_IFDIR | 0755; out.body.entry.nodeid = ino; + out.body.entry.attr.ino = ino; out.body.entry.attr_valid = UINT64_MAX; out.body.entry.entry_valid = UINT64_MAX; }))); @@ -335,6 +439,7 @@ TEST_F(Readdir, getdirentries) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = mode; out.body.entry.nodeid = ino; + out.body.entry.attr.ino = ino; out.body.entry.generation = 1; out.body.entry.attr_valid = UINT64_MAX; out.body.entry.entry_valid = 0; @@ -345,6 +450,7 @@ TEST_F(Readdir, getdirentries) SET_OUT_HEADER_LEN(out, entry); out.body.entry.attr.mode = mode; out.body.entry.nodeid = ino; + out.body.entry.attr.ino = ino; out.body.entry.generation = 1; out.body.entry.attr_valid = UINT64_MAX; out.body.entry.entry_valid = 0; From nobody Wed Jul 23 23:29:33 2025 X-Original-To: dev-commits-src-all@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 4bnVht0Z9Hz637RW; Wed, 23 Jul 2025 23:29: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnVhs49m1z3qSS; Wed, 23 Jul 2025 23:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753313373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QsceILQhR/Cp5mkL3qdkjK7ST+vdsQBjSCMVuJjcAoE=; b=XsNtG4NjMQy9yk34LNzgoCuaPg1WN2kEDdS1q3dzZ5njaWtfoA9WKhoo5Y9AFa50fPT/r0 JnK3Ovl1IJCv/DajtsvNS3bZ4jDrvsJKvEiJbqGt+VN0qsmn7B1x6YpEWSrhB69ilxuxuw AzdzPi/eGciVBtClIBa9/YXxPYDSSU7mrA8x9dNWbiuqhhR/T7FUGoVlaok8R9+smkqrFw k8g8qBLUSAofCgcWsj0WE/Q5R2nGfkoxfu5Vzit94N3KKKisPLJezBvxFWx2PFUS4Rzow0 o70XX+YukegpmX4+8LU2/NaW68+xrbxToLiQH+ZhbHe/MJuParDSfZUcsfn7mQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753313373; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QsceILQhR/Cp5mkL3qdkjK7ST+vdsQBjSCMVuJjcAoE=; b=mQEvutCnASVJfungo7JhK1bqYMtesB1hBhUQdQ3ZwUtVHSKIOROT2bqxK30KsGHz87x1a7 wyHiP6Dl+SlcALf72MREui7TO+oYt/Io+pb9eBNOIdC4fa7YF5/juKaIk6yiCpkRh96LPW K2R2VJb4qb1xhi2IVlVr5cy2/XaoB0eCV9HsRHgnGMZQqFOsYFGIfFI59852b60xL1YJXX L4a0FT90InUUSforne8kY8RL4G6QvNZucP0wt41GKJGrbNpSpoGf76OoK3dbm2eoSIYkZ/ DXQ6bQy1tt9RJ1hKqBbIYXJRdsgYKdHoqx6HCp3sTqSB35lRebwsZcVgoyyKPg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753313373; a=rsa-sha256; cv=none; b=jQUVrbBz4/znLVukbALigi+CVFkpo5wz5PNImTFjxR1nAk5YFu77Ti7juiP27N0qXppmun hjE9Uj/b2g3N7xGo92IzNE9ePsfpKIEYpUtguOMkXKcEeO9vMbmaXtBOHUvUM/XycVjMXS iex0oB0RksznvpjC63YiRFgMYvyszQIPKz/jebmvoaH5dUozMdT1UuhkkTR9EnocrzEXdK 2yI9NCB6nnPAbzt+Gh52/jHX+2k15ZOuz8nxULxGC+rRZoQ/I4L5/s8T+ScDMBR56kg8If OVXenfNid97zoMBxLLHe46TURPjQQy92FbSjHWEnV+e3A/j2PWhfFkn23hr57w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnVhs3TpBzZWq; Wed, 23 Jul 2025 23:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NNTXxr052391; Wed, 23 Jul 2025 23:29:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NNTXI4052388; Wed, 23 Jul 2025 23:29:33 GMT (envelope-from git) Date: Wed, 23 Jul 2025 23:29:33 GMT Message-Id: <202507232329.56NNTXI4052388@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: 6f433f2b4f37 - stable/14 - fusefs: fix a panic in vop_close with a CTL consumer List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: 6f433f2b4f376c963a456eedf8c690e98d07188d Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=6f433f2b4f376c963a456eedf8c690e98d07188d commit 6f433f2b4f376c963a456eedf8c690e98d07188d Author: Alan Somers AuthorDate: 2024-12-18 18:02:34 +0000 Commit: Alan Somers CommitDate: 2025-07-23 23:28:57 +0000 fusefs: fix a panic in vop_close with a CTL consumer Kernel consumers like CTL may lack ucred objects. That led to a panic when CTL closed a fuse file, if atime was enabled on the mountpoint. Fix it by checking the ucred during close. PR: 283402 Sponsored by: ConnectWise Differential Revision: https://reviews.freebsd.org/D48165 (cherry picked from commit 9350e9236242f51c88b3e5c19ceeae7869b9cf83) --- sys/fs/fuse/fuse_vnops.c | 3 ++ tests/sys/cam/ctl/ctl.subr | 18 ++++++++++-- tests/sys/fs/fusefs/Makefile | 5 ++++ tests/sys/fs/fusefs/ctl.sh | 69 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 93 insertions(+), 2 deletions(-) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index 88bf20382c05..d4809b647143 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -797,6 +797,9 @@ fuse_vnop_close(struct vop_close_args *ap) if (fflag & IO_NDELAY) return 0; + if (cred == NULL) + cred = td->td_ucred; + err = fuse_flush(vp, cred, pid, fflag); if (err == 0 && (fvdat->flag & FN_ATIMECHANGE) && !vfs_isrdonly(mp)) { struct vattr vap; diff --git a/tests/sys/cam/ctl/ctl.subr b/tests/sys/cam/ctl/ctl.subr index 868b1c809571..5da441b806f0 100644 --- a/tests/sys/cam/ctl/ctl.subr +++ b/tests/sys/cam/ctl/ctl.subr @@ -80,7 +80,20 @@ find_device() { done } -# Create a CTL LUN +# Create a CTL LUN backed by a file +create_block() { + EXTRA_ARGS=$* + + atf_check -o save:lun-create.txt ctladm create -b block $EXTRA_ARGS + atf_check egrep -q "LUN created successfully" lun-create.txt + LUN=`awk '/LUN ID:/ {print $NF}' lun-create.txt` + if [ -z "$LUN" ]; then + atf_fail "Could not find LUN id" + fi + find_device $LUN +} + +# Create a CTL LUN backed by RAM create_ramdisk() { EXTRA_ARGS=$* @@ -95,7 +108,8 @@ create_ramdisk() { cleanup() { if [ -e "lun-create.txt" ]; then + backend=`awk '/backend:/ {print $NF}' lun-create.txt` lun_id=`awk '/LUN ID:/ {print $NF}' lun-create.txt` - ctladm remove -b ramdisk -l $lun_id > /dev/null + ctladm remove -b $backend -l $lun_id > /dev/null fi } diff --git a/tests/sys/fs/fusefs/Makefile b/tests/sys/fs/fusefs/Makefile index 9d9a6785c838..9e2065be434a 100644 --- a/tests/sys/fs/fusefs/Makefile +++ b/tests/sys/fs/fusefs/Makefile @@ -5,6 +5,8 @@ PACKAGE= tests TESTSDIR= ${TESTSBASE}/sys/fs/fusefs +ATF_TESTS_SH+= ctl + # We could simply link all of these files into a single executable. But since # Kyua treats googletest programs as plain tests, it's better to separate them # out, so we get more granular reporting. @@ -67,6 +69,9 @@ TEST_METADATA.default_permissions+= required_user="unprivileged" TEST_METADATA.default_permissions_privileged+= required_user="root" TEST_METADATA.mknod+= required_user="root" TEST_METADATA.nfs+= required_user="root" +# ctl must be exclusive because it disables/enables camsim +TEST_METADATA.ctl+= is_exclusive="true" +TEST_METADATA.ctl+= required_user="root" TEST_METADATA+= timeout=10 diff --git a/tests/sys/fs/fusefs/ctl.sh b/tests/sys/fs/fusefs/ctl.sh new file mode 100644 index 000000000000..7d2e7593cbdc --- /dev/null +++ b/tests/sys/fs/fusefs/ctl.sh @@ -0,0 +1,69 @@ +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2024 ConnectWise +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution. +# +# THIS DOCUMENTATION IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR +# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES +# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, +# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT +# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF +# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +. $(atf_get_srcdir)/../../cam/ctl/ctl.subr + +# Regression test for https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=283402 +# +# Almost any fuse file system would work, but this tests uses fusefs-ext2 +# because it's simple and its download is very small. +atf_test_case remove_lun_with_atime cleanup +remove_lun_with_atime_head() +{ + atf_set "descr" "Remove a fuse-backed CTL LUN when atime is enabled" + atf_set "require.user" "root" + atf_set "require.progs" "fuse-ext2 mkfs.ext2" +} +remove_lun_with_atime_body() +{ + MOUNTPOINT=$PWD/mnt + atf_check mkdir $MOUNTPOINT + atf_check truncate -s 1g ext2.img + atf_check mkfs.ext2 -q ext2.img + # Note: both default_permissions and atime must be enabled + atf_check fuse-ext2 -o default_permissions,allow_other,rw+ ext2.img \ + $MOUNTPOINT + + atf_check truncate -s 1m $MOUNTPOINT/file + create_block -o file=$MOUNTPOINT/file + + # Force fusefs to open the file, and dirty its atime + atf_check dd if=/dev/$dev of=/dev/null count=1 status=none + + # Finally, remove the LUN. Hopefully it won't panic. + atf_check -o ignore ctladm remove -b block -l $LUN + + rm lun-create.txt # So we don't try to remove the LUN twice +} +remove_lun_with_atime_cleanup() +{ + cleanup + umount $PWD/mnt +} + +atf_init_test_cases() +{ + atf_add_test_case remove_lun_with_atime +} From nobody Wed Jul 23 23:31:57 2025 X-Original-To: dev-commits-src-all@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 4bnVld6NKFz637ZJ; Wed, 23 Jul 2025 23:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnVld2R6vz3rwm; Wed, 23 Jul 2025 23:31:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753313517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=41iPPPnF30Nalqsgs1asJN5PvoE7ADuMuuM0T+tQfx4=; b=DdkM0mbvCBWsvDQKv7tWksxEQfsKND4l+3bLBO2z/zb4mvp/K8eEGj7eIGcQWoeLM3Lzce Bs6YoZd3kUKJ4ou9BwpdBpDM8ziTxaWX+aTaa81KJIQyGkyf7CxtbMVCiWNf9Ecn+xYhqJ Sq2/bWa1rofSO439nGqL/IUAKyq9ucY2OloMxlWuYKTJ51QcEZlge6utFTcQuFNSNXVXvJ 8IcMLNGexCtN+5NPFgcTzlVYaoTauBC7/HGmK6cS61pXCnB1NW/8NDyKRFU8AR6tRWPMGO C5ZKXBm6c9G2UmtvXDYE5pLM54bSRJ+bOxXF2AU6ChYpvoSFI0fvIUwlnEzjVQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753313517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=41iPPPnF30Nalqsgs1asJN5PvoE7ADuMuuM0T+tQfx4=; b=O55+I6G0fJm8sfdu7wUlkmPG7wXLqoHRERoEoSa3RjS3ST9Wscjg8yvs0LLPkXkuBV7Lgv gBDaTQlV0prc0z7CtvJwqmg4yMr3bz6ny+WeWsUwWeo5itim3z7R2VBEXYE/kiOMWwUAiG CJ+c0E3jlCQh4VFy/9UU61xeTkkcRIjhEMe54YFoAjJB/XQsVXhEgD3KkbWe0PsYIYDaAN XR6qRfPrBBQQszbJSjKTRrBmEIx/rSlHWNKIsstIMuikQOSrB1wOplkGyMDewLcdU8AVmu D8VeH7ayIcG5BkHUcuyIhZYp1iFTCEVvNTUCleaVuG5jWk8o5gV15Y14Q6aAVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753313517; a=rsa-sha256; cv=none; b=xfTcDtbP2MM2EK6EVR4Sdp6A/ze+8P2DBnC79t3MpRs7Fkrtnnone/CGWQiJ8HAZhZLMqd rU319f/5r8c9j+g8y/O6GxWB6oWrFty549BarFX927hR3tLR+23ujMMZ02qtvFNLIst23d FCrZn5ar+WiUY7JdsIWHFl64uOlqgc5rAKf1yuGZ4DrziWb/9vpVHLKTayGcM/SZyocCDL DBOXkAXE/frKDRtW8MSIVG1aEWQpSkvsrYiWMJGBRvzdvv9qdKIekFZG/GOYsy6NF4pICQ qhSchWeCKNV2DqS6KfJyVOAEJk7kLnKmk8aRO2ZG4I5IbwVHSfURwDT6+uBxaQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnVld20QZzZlf; Wed, 23 Jul 2025 23:31:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56NNVvZv068335; Wed, 23 Jul 2025 23:31:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56NNVvot068332; Wed, 23 Jul 2025 23:31:57 GMT (envelope-from git) Date: Wed, 23 Jul 2025 23:31:57 GMT Message-Id: <202507232331.56NNVvot068332@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: f0a7a1bda375 - stable/14 - fstat: identify kqueue, mqueue, and procdesc file descriptors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/stable/14 X-Git-Reftype: branch X-Git-Commit: f0a7a1bda3752c906ef732e89c00371a3ba0760f Auto-Submitted: auto-generated The branch stable/14 has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=f0a7a1bda3752c906ef732e89c00371a3ba0760f commit f0a7a1bda3752c906ef732e89c00371a3ba0760f Author: Alan Somers AuthorDate: 2025-01-28 17:59:41 +0000 Commit: Alan Somers CommitDate: 2025-07-23 23:31:20 +0000 fstat: identify kqueue, mqueue, and procdesc file descriptors When displaying kqueue, mqueue, and procdesc file descriptors, identify them as such. There aren't any details, but it's better than a scary warning like "unknown file type 15 for file 6 of pid 26393". Sponsored by: ConnectWise Differential Revision: https://reviews.freebsd.org/D48706 (cherry picked from commit b3168306a13b9d95c2b01bf7a483c1af9ec0d797) --- usr.bin/fstat/fstat.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c index c3374ecfffac..3462033c3617 100644 --- a/usr.bin/fstat/fstat.c +++ b/usr.bin/fstat/fstat.c @@ -300,14 +300,26 @@ print_file_info(struct procstat *procstat, struct filestat *fst, case PS_FST_TYPE_PTS: print_pts_info(procstat, fst); break; + case PS_FST_TYPE_KQUEUE: + printf(" [kqueue]"); + break; + case PS_FST_TYPE_MQUEUE: + printf(" [mqueue]"); + break; case PS_FST_TYPE_SHM: print_shm_info(procstat, fst); break; case PS_FST_TYPE_SEM: print_sem_info(procstat, fst); break; + case PS_FST_TYPE_PROCDESC: + printf(" [procdesc]"); + break; case PS_FST_TYPE_DEV: break; + case PS_FST_TYPE_EVENTFD: + printf(" [eventfd]"); + break; default: if (vflg) fprintf(stderr, From nobody Thu Jul 24 02:53:24 2025 X-Original-To: dev-commits-src-all@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 4bnbD54fstz5pxk3; Thu, 24 Jul 2025 02:53: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnbD46WbMz3RcG; Thu, 24 Jul 2025 02:53:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753325604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4H0eNOsQd148XQBE+lbmFqQf32TGcSbkv8YovmPrVAQ=; b=V6VB2R5ILTpSzSsqcgpEzGTeXrGFguXH7l+/OsGURwy9F2GwAlPhSA+RoUXZ39NBsRerd5 suQdb6RB/GItOIJmNYIHMxKmECC+wuYMQufGmBQykvmANfPSK+OBfxJIHg8FJNE0wm2ulV cG+6Oe5J8O5krqubdFEdI9hraDT1p6bpJ52ihsi1APe0d4saaIdLtioYi08MI5IjPc1Dep sJwfl3kZaScO2sS/AAXDK5jvijzeIgrWetAVjG/JmC3qLzZJu8B3h9LoWrEMy3YZekdzOn kDtZzRiS8bSirRTqXoVNL8hi/UZTqTs1c7UtQ8JuCA+3esp9ZOBGMkErrh214A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753325604; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4H0eNOsQd148XQBE+lbmFqQf32TGcSbkv8YovmPrVAQ=; b=Uy1LQ4BPkUiglTHvsMzuC9W+donp8xE7HPYb8IqF45GB9klMRtEhgM6Xz5qyqBElnhSzBy OpsP/yG+ZISDEy7CngZBt7Zx2IQEJeHdn+ut4qu8vfZwRdmW6gXvPUo53iQaq0KeDT/Wde ZhIIWiDkLBUn7OnK5ziQjhYZxjQryvsEey5pZWp7u0jnY7XWaqlT0HZnvuvLmtkJbCSDb5 1eghXrSUeqtpaRSiRUdpp8a32mMNa84uE/62349UegPMfBHxGJ5VgArQifKQqmWnjOVLBd OVmfsw425d9b7pG5seYF222Z6yIp8zQoBgTalosLUtrjfiywVRnAvtOyOyltjA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753325604; a=rsa-sha256; cv=none; b=BxSRIoGsq0Dyew6Y3JO3wrYv+hlpoG3r6hDGj39zJR6Q8g+Utw/rMak6VaauJo72fKEmTb kqjIWA6fKOfxvuaZe56YDhuLeNXVbUSsJf+UHF98uY7+HbsNfSstVNKi1bLKOsgD7SsVtL sUwbTV3BoXClWYCD1RvLaI6KpIIdFU/Jk1gvdCgAl4/uMPiYrDejMODdLmm8M74v/WmwCP A929FP969z1dUGN40l+Q9xPRiZRjulxeVCprCgYvLaix3qyP2XJY5+HpUGwaV3ZVMhTc7f pRb1nIV7ePqMS5DHEHDkfp+8846+XIbP3Dad16neu3ri99QYYusGZnLTkq5NIg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnbD464Mqzgq7; Thu, 24 Jul 2025 02:53:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56O2rOBT044422; Thu, 24 Jul 2025 02:53:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56O2rOjC044419; Thu, 24 Jul 2025 02:53:24 GMT (envelope-from git) Date: Thu, 24 Jul 2025 02:53:24 GMT Message-Id: <202507240253.56O2rOjC044419@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: 442f01cb8860 - stable/14 - msdosfs: replace '/' in direntries with '?' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 442f01cb8860226685e378c222a57614d941825d Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=442f01cb8860226685e378c222a57614d941825d commit 442f01cb8860226685e378c222a57614d941825d Author: Konstantin Belousov AuthorDate: 2025-07-17 01:12:05 +0000 Commit: Konstantin Belousov CommitDate: 2025-07-24 02:52:25 +0000 msdosfs: replace '/' in direntries with '?' PR: 288266 (cherry picked from commit 29af6d2e2ec9fe8df7cf1e1a0bf3597028831b18) --- sys/fs/msdosfs/msdosfs_conv.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/sys/fs/msdosfs/msdosfs_conv.c b/sys/fs/msdosfs/msdosfs_conv.c index da4848169173..208b64930e61 100644 --- a/sys/fs/msdosfs/msdosfs_conv.c +++ b/sys/fs/msdosfs/msdosfs_conv.c @@ -797,19 +797,24 @@ mbsadjpos(const char **instr, size_t inlen, size_t outlen, int weight, int flag, static u_char * dos2unixchr(u_char *outbuf, const u_char **instr, size_t *ilen, int lower, struct msdosfsmount *pmp) { - u_char c, *outp; - size_t len, olen; + u_char c, *outp, *outp1; + size_t i, len, olen; outp = outbuf; if (pmp->pm_flags & MSDOSFSMNT_KICONV && msdosfs_iconv) { olen = len = 4; + outp1 = outp; if (lower & (LCASE_BASE | LCASE_EXT)) msdosfs_iconv->convchr_case(pmp->pm_d2u, (const char **)instr, ilen, (char **)&outp, &olen, KICONV_LOWER); else msdosfs_iconv->convchr(pmp->pm_d2u, (const char **)instr, ilen, (char **)&outp, &olen); + for (i = 0; i < outp - outp1; i++) { + if (outp1[i] == '/') + outp1[i] = '?'; + } len -= olen; /* @@ -826,6 +831,8 @@ dos2unixchr(u_char *outbuf, const u_char **instr, size_t *ilen, int lower, struc c = dos2unix[c]; if (lower & (LCASE_BASE | LCASE_EXT)) c = u2l[c]; + if (c == '/') + c = '?'; *outp++ = c; outbuf[1] = '\0'; } From nobody Thu Jul 24 07:45:08 2025 X-Original-To: dev-commits-src-all@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 4bnjhh4fS1z628YV; Thu, 24 Jul 2025 07:45: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnjhh3CcHz3rTH; Thu, 24 Jul 2025 07:45:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753343108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3bpEQbNh9H7fkK3fMyvI62y+OHHXccXJLCvhikOs+Kg=; b=LHecA6OvG6sXo+HHpesRrAnC7w4QlQL+gHjwa7y9KMPWAHvJ5F1OsDGRLB8T6Y82fmHdbX bi7xeqrYnQ6CpmkDxVqz9wlJ6QH9Ry3URIKAjxuzSzxlxzE2fRPS9+DnZG/ZQ862bbuBLQ LxsHku1w2Vr8Ll4f1dfkDH7/PPFWkC+abBTefTtfzLlSLFC17x3j+pDfj7U04/SS+K1RoJ aNJiQFtKZHBULGqaq4MDEAFWLE9ODcIJ3JkwRe7JYxLNQNUAVfU5b/7qUibjFghTWXvcqk 4iqPP0ASqzFg0Wfd5SgWbYYRACk66zZ12iElNOkGEGmCfqP+ZPiHDJ70O35aRg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753343108; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3bpEQbNh9H7fkK3fMyvI62y+OHHXccXJLCvhikOs+Kg=; b=UsasUwZqtfBWMnBX3ezn19VmOLEqkqk9jw8N8mejH+AwOMsNqBwOCaaU23VqNhqvOs0Ab5 ov5brbziA/39W5mgaBQFwnJW/hW1J43XJMemBDcqVb7w5GfPPCJi61x3Uycb7ZgkeCjiaR GKCz+er8F1R9+tSw6DKXWGchBNs+1sGMC7nLmW9JUanbfyVIs8agYWQkR7ls5BKdbAlwAq GUDi18a6Yu1vMALklI5UvhX/HYe2ofoDi6ahoi0xP/I4JzgZ+/8lWcru7UkH4NpQzOQLr7 f376ZG892jWNNAZLd4A73QMoSd7YYWaXTcv3q6I2YET2yGwH/CqDHohlcStQwg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753343108; a=rsa-sha256; cv=none; b=PJMZDAxEOMSF3gWUfERsdji29JZqsa8ybnUg+InKztvI8LmGN5hE7KUUbeCPD7HxcIsk73 EPhNk5Pg9MGh10O+lOET1xrwjAkpHyYwpqt7OGA7TKUpzhfuR6xP4jT13mVcnXU2tnPh2s UArGPuc8M67N1j4lq/yb9mMjBIkWknrwlOCND/2h8smbyNjEx3+BExarmQHaTJhtOiI48c 92oZVuXIy5jquqcb1uAVZkAB6ig+niBgJZ69V5A7XQMA+6udEh+HwUQQEinadKCDAZU9SY i3dgpJbQk/alzY0UFR49SkVKwyHbticvc/k3PACtAauIK6n8yRZArN8Bku7RLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnjhh2X7rzqRr; Thu, 24 Jul 2025 07:45:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56O7j8jI091177; Thu, 24 Jul 2025 07:45:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56O7j8RZ091174; Thu, 24 Jul 2025 07:45:08 GMT (envelope-from git) Date: Thu, 24 Jul 2025 07:45:08 GMT Message-Id: <202507240745.56O7j8RZ091174@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: ae7fdd715466 - stable/14 - Merge commit 8ac140f39084 from llvm git (by Younan Zhang): List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: ae7fdd715466490d91813179475ea103c8c8e30d Auto-Submitted: auto-generated The branch stable/14 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=ae7fdd715466490d91813179475ea103c8c8e30d commit ae7fdd715466490d91813179475ea103c8c8e30d Author: Dimitry Andric AuthorDate: 2025-07-21 16:55:23 +0000 Commit: Dimitry Andric CommitDate: 2025-07-24 07:44:45 +0000 Merge commit 8ac140f39084 from llvm git (by Younan Zhang): [Clang][NFCI] Cleanup the fix for default function argument substitution (#104911) (This is one step towards tweaking `getTemplateInstantiationArgs()` as discussed in https://github.com/llvm/llvm-project/pull/102922) We don't always substitute into default arguments while transforming a function parameter. In that case, we would preserve the uninstantiated expression until after, e.g. building up a CXXDefaultArgExpr and instantiate the expression there. For member function instantiation, this algorithm used to cause a problem in that the default argument of an out-of-line member function specialization couldn't get properly instantiated. This is because, in `getTemplateInstantiationArgs()`, we would give up visiting a function's declaration context if the function is a specialization of a member template. For example, ```cpp template struct S { template void f(T = sizeof(T)); }; template <> template void S::f(int) {} ``` The default argument `sizeof(U)` that lexically appears inside the declaration would be copied to the function declaration in the class template specialization `S`, as well as to the function's out-of-line definition. We use template arguments collected from the out-of-line function definition when substituting into the default arguments. We would therefore give up the traversal after the function, resulting in a single-level template argument of the `f` itself. However the default argument here could still reference the template parameters of the primary template, hence the error. In fact, this is similar to constraint checking in some respects: we actually want the "whole" template arguments relative to the primary template, not those relative to the function definition. So this patch adds another flag to indicate `getTemplateInstantiationArgs()` for that. This patch also consolidates the tests for default arguments and removes some unnecessary tests. This fixes a crash or assertion failure while building tests for the devel/hpx port. PR: 288352 MFC after: 3 days (cherry picked from commit ffc5ee0f57d56459df93f4107b9835ae78a546b5) --- .../llvm-project/clang/include/clang/Sema/Sema.h | 9 ++++++++- .../clang/lib/Sema/SemaTemplateInstantiate.cpp | 23 ++++++++-------------- .../clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 10 ++++++---- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Sema/Sema.h b/contrib/llvm-project/clang/include/clang/Sema/Sema.h index 7bfdaaae45a9..a59a9342341d 100644 --- a/contrib/llvm-project/clang/include/clang/Sema/Sema.h +++ b/contrib/llvm-project/clang/include/clang/Sema/Sema.h @@ -13052,12 +13052,19 @@ public: /// ForConstraintInstantiation indicates we should continue looking when /// encountering a lambda generic call operator, and continue looking for /// arguments on an enclosing class template. + /// + /// \param SkipForSpecialization when specified, any template specializations + /// in a traversal would be ignored. + /// \param ForDefaultArgumentSubstitution indicates we should continue looking + /// when encountering a specialized member function template, rather than + /// returning immediately. MultiLevelTemplateArgumentList getTemplateInstantiationArgs( const NamedDecl *D, const DeclContext *DC = nullptr, bool Final = false, std::optional> Innermost = std::nullopt, bool RelativeToPrimary = false, const FunctionDecl *Pattern = nullptr, bool ForConstraintInstantiation = false, - bool SkipForSpecialization = false); + bool SkipForSpecialization = false, + bool ForDefaultArgumentSubstitution = false); /// RAII object to handle the state changes required to synthesize /// a function body. diff --git a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp index a09e3be83c45..c2e8ed0c602e 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp @@ -269,7 +269,8 @@ HandleClassTemplateSpec(const ClassTemplateSpecializationDecl *ClassTemplSpec, Response HandleFunction(Sema &SemaRef, const FunctionDecl *Function, MultiLevelTemplateArgumentList &Result, const FunctionDecl *Pattern, bool RelativeToPrimary, - bool ForConstraintInstantiation) { + bool ForConstraintInstantiation, + bool ForDefaultArgumentSubstitution) { // Add template arguments from a function template specialization. if (!RelativeToPrimary && Function->getTemplateSpecializationKindForInstantiation() == @@ -299,7 +300,8 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl *Function, // If this function was instantiated from a specialized member that is // a function template, we're done. assert(Function->getPrimaryTemplate() && "No function template?"); - if (Function->getPrimaryTemplate()->isMemberSpecialization()) + if (!ForDefaultArgumentSubstitution && + Function->getPrimaryTemplate()->isMemberSpecialization()) return Response::Done(); // If this function is a generic lambda specialization, we are done. @@ -465,7 +467,7 @@ MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs( const NamedDecl *ND, const DeclContext *DC, bool Final, std::optional> Innermost, bool RelativeToPrimary, const FunctionDecl *Pattern, bool ForConstraintInstantiation, - bool SkipForSpecialization) { + bool SkipForSpecialization, bool ForDefaultArgumentSubstitution) { assert((ND || DC) && "Can't find arguments for a decl if one isn't provided"); // Accumulate the set of template argument lists in this structure. MultiLevelTemplateArgumentList Result; @@ -507,7 +509,8 @@ MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs( SkipForSpecialization); } else if (const auto *Function = dyn_cast(CurDecl)) { R = HandleFunction(*this, Function, Result, Pattern, RelativeToPrimary, - ForConstraintInstantiation); + ForConstraintInstantiation, + ForDefaultArgumentSubstitution); } else if (const auto *Rec = dyn_cast(CurDecl)) { R = HandleRecordDecl(*this, Rec, Result, Context, ForConstraintInstantiation); @@ -3231,7 +3234,6 @@ bool Sema::SubstDefaultArgument( // default argument expression appears. ContextRAII SavedContext(*this, FD); std::unique_ptr LIS; - MultiLevelTemplateArgumentList NewTemplateArgs = TemplateArgs; if (ForCallExpr) { // When instantiating a default argument due to use in a call expression, @@ -3244,19 +3246,10 @@ bool Sema::SubstDefaultArgument( /*ForDefinition*/ false); if (addInstantiatedParametersToScope(FD, PatternFD, *LIS, TemplateArgs)) return true; - const FunctionTemplateDecl *PrimaryTemplate = FD->getPrimaryTemplate(); - if (PrimaryTemplate && PrimaryTemplate->isOutOfLine()) { - TemplateArgumentList *CurrentTemplateArgumentList = - TemplateArgumentList::CreateCopy(getASTContext(), - TemplateArgs.getInnermost()); - NewTemplateArgs = getTemplateInstantiationArgs( - FD, FD->getDeclContext(), /*Final=*/false, - CurrentTemplateArgumentList->asArray(), /*RelativeToPrimary=*/true); - } } runWithSufficientStackSpace(Loc, [&] { - Result = SubstInitializer(PatternExpr, NewTemplateArgs, + Result = SubstInitializer(PatternExpr, TemplateArgs, /*DirectInit*/ false); }); } diff --git a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index a12d2eff1d2c..614e6ea12541 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -4659,10 +4659,12 @@ bool Sema::InstantiateDefaultArgument(SourceLocation CallLoc, FunctionDecl *FD, // // template // A Foo(int a = A::FooImpl()); - MultiLevelTemplateArgumentList TemplateArgs = - getTemplateInstantiationArgs(FD, FD->getLexicalDeclContext(), - /*Final=*/false, /*Innermost=*/std::nullopt, - /*RelativeToPrimary=*/true); + MultiLevelTemplateArgumentList TemplateArgs = getTemplateInstantiationArgs( + FD, FD->getLexicalDeclContext(), + /*Final=*/false, /*Innermost=*/std::nullopt, + /*RelativeToPrimary=*/true, /*Pattern=*/nullptr, + /*ForConstraintInstantiation=*/false, /*SkipForSpecialization=*/false, + /*ForDefaultArgumentSubstitution=*/true); if (SubstDefaultArgument(CallLoc, Param, TemplateArgs, /*ForCallExpr*/ true)) return true; From nobody Thu Jul 24 07:45:25 2025 X-Original-To: dev-commits-src-all@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 4bnjj227D0z6298S; Thu, 24 Jul 2025 07:45: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnjj211Hrz3rkj; Thu, 24 Jul 2025 07:45:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753343126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4fdS76CtSt461P0nOerNsMdxC+cyXdaDviLHSeoqye4=; b=TZY1+U63jKr9K+1+uUH7EvlfxDmp7/UyOzdlMGzw8HP1ETOzjqGlcDXxlPEr2sAQD0dxZm ioM+lBVAqC0UtDViuCrDvXXwaXkDqUxgRWtLpJi+o3mb9+/hj26iQ9rV9YcRjW9m6M1IqG SDiAbDTzADPJk+pDcJCCuCJwExQr+xqNqXTt/mglDMThS/aw0wL3p5wGjcfOhVy2UALfP3 9ThEFc+WnM5+Wzlx+ZO7BO7ivHein+cTPXekBfbI1VJeDDiW06CczhEgkfzSGF7ofke3oD JHQiO+heFI/Y3PwQoOsKzzdkEqjyGNmQfqFJvGERZBcWqPanVhMhIrvhyyX1uQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753343126; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4fdS76CtSt461P0nOerNsMdxC+cyXdaDviLHSeoqye4=; b=LqqYW1grfLvfUYbt2BmaDcwRCM2hfi4sQWfwQ/pQtJAndXTr2OJ62Lc/d8X564wSYS7YZa RI3QcKjveTrlu/OPJPd9+O58UaKIHqL3jfNB16mARIXQNottgdJwtAh5MWWXi7FtkiacE6 eSYd9Hg6/LNfnOEdIPGwo42C1uoQYh/tg37JvN6atrJ2GlQ6z/gzu3qesA209HiYAQGZlS UQcfzfQYgw9gejHLqe5dexDQeffgvBhxU0s7/A81O5I340GBdQcNdo6ogz/Te/LBt2qkFR J/MXD8ABUsqtweRH75z0nXbXLyUBm+qg4JywvtMR0U4gynTaBn+mDMhlbGCwMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753343126; a=rsa-sha256; cv=none; b=u3NhuujdgNQ0P1JzguqizWO6u4v2CZiycatoGj1Mr4OEf8xKNOSAeOVpb0lXdlGtF/0gwW aZoTZcJgw/jpO5NtFUDiHy7fiDkhtK22paQ1pFqgKXJdrd9ZXm5zD0e/Yv/O/OO89a4eOU rAeterN47IYfO9UH55Qv8dDz2CNwCa7xVrVr5mrrE1J9DYhIE1ds7MlWDebIwIAmGlsIek MkHi58cirS4xnGJMXpWbtCWl77EgD3R7smF+GKiX2tt9LSWv2W9VG0EtCO/1U6GlCPeMgM xBdE0kCDu0/MI9lUxGsBuRQxT/PfEtHsW8DnbCGvv4QfC4Q3z+EmDcbvuptFbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnjj20cH7zqgs; Thu, 24 Jul 2025 07:45:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56O7jP0U091370; Thu, 24 Jul 2025 07:45:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56O7jPRc091367; Thu, 24 Jul 2025 07:45:25 GMT (envelope-from git) Date: Thu, 24 Jul 2025 07:45:25 GMT Message-Id: <202507240745.56O7jPRc091367@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: e5fcb8c32fbd - stable/13 - Merge commit 8ac140f39084 from llvm git (by Younan Zhang): List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: e5fcb8c32fbdf7208ab5e2b250bec6686141dfc7 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=e5fcb8c32fbdf7208ab5e2b250bec6686141dfc7 commit e5fcb8c32fbdf7208ab5e2b250bec6686141dfc7 Author: Dimitry Andric AuthorDate: 2025-07-21 16:55:23 +0000 Commit: Dimitry Andric CommitDate: 2025-07-24 07:44:49 +0000 Merge commit 8ac140f39084 from llvm git (by Younan Zhang): [Clang][NFCI] Cleanup the fix for default function argument substitution (#104911) (This is one step towards tweaking `getTemplateInstantiationArgs()` as discussed in https://github.com/llvm/llvm-project/pull/102922) We don't always substitute into default arguments while transforming a function parameter. In that case, we would preserve the uninstantiated expression until after, e.g. building up a CXXDefaultArgExpr and instantiate the expression there. For member function instantiation, this algorithm used to cause a problem in that the default argument of an out-of-line member function specialization couldn't get properly instantiated. This is because, in `getTemplateInstantiationArgs()`, we would give up visiting a function's declaration context if the function is a specialization of a member template. For example, ```cpp template struct S { template void f(T = sizeof(T)); }; template <> template void S::f(int) {} ``` The default argument `sizeof(U)` that lexically appears inside the declaration would be copied to the function declaration in the class template specialization `S`, as well as to the function's out-of-line definition. We use template arguments collected from the out-of-line function definition when substituting into the default arguments. We would therefore give up the traversal after the function, resulting in a single-level template argument of the `f` itself. However the default argument here could still reference the template parameters of the primary template, hence the error. In fact, this is similar to constraint checking in some respects: we actually want the "whole" template arguments relative to the primary template, not those relative to the function definition. So this patch adds another flag to indicate `getTemplateInstantiationArgs()` for that. This patch also consolidates the tests for default arguments and removes some unnecessary tests. This fixes a crash or assertion failure while building tests for the devel/hpx port. PR: 288352 MFC after: 3 days (cherry picked from commit ffc5ee0f57d56459df93f4107b9835ae78a546b5) --- .../llvm-project/clang/include/clang/Sema/Sema.h | 9 ++++++++- .../clang/lib/Sema/SemaTemplateInstantiate.cpp | 23 ++++++++-------------- .../clang/lib/Sema/SemaTemplateInstantiateDecl.cpp | 10 ++++++---- 3 files changed, 22 insertions(+), 20 deletions(-) diff --git a/contrib/llvm-project/clang/include/clang/Sema/Sema.h b/contrib/llvm-project/clang/include/clang/Sema/Sema.h index 7bfdaaae45a9..a59a9342341d 100644 --- a/contrib/llvm-project/clang/include/clang/Sema/Sema.h +++ b/contrib/llvm-project/clang/include/clang/Sema/Sema.h @@ -13052,12 +13052,19 @@ public: /// ForConstraintInstantiation indicates we should continue looking when /// encountering a lambda generic call operator, and continue looking for /// arguments on an enclosing class template. + /// + /// \param SkipForSpecialization when specified, any template specializations + /// in a traversal would be ignored. + /// \param ForDefaultArgumentSubstitution indicates we should continue looking + /// when encountering a specialized member function template, rather than + /// returning immediately. MultiLevelTemplateArgumentList getTemplateInstantiationArgs( const NamedDecl *D, const DeclContext *DC = nullptr, bool Final = false, std::optional> Innermost = std::nullopt, bool RelativeToPrimary = false, const FunctionDecl *Pattern = nullptr, bool ForConstraintInstantiation = false, - bool SkipForSpecialization = false); + bool SkipForSpecialization = false, + bool ForDefaultArgumentSubstitution = false); /// RAII object to handle the state changes required to synthesize /// a function body. diff --git a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp index a09e3be83c45..c2e8ed0c602e 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiate.cpp @@ -269,7 +269,8 @@ HandleClassTemplateSpec(const ClassTemplateSpecializationDecl *ClassTemplSpec, Response HandleFunction(Sema &SemaRef, const FunctionDecl *Function, MultiLevelTemplateArgumentList &Result, const FunctionDecl *Pattern, bool RelativeToPrimary, - bool ForConstraintInstantiation) { + bool ForConstraintInstantiation, + bool ForDefaultArgumentSubstitution) { // Add template arguments from a function template specialization. if (!RelativeToPrimary && Function->getTemplateSpecializationKindForInstantiation() == @@ -299,7 +300,8 @@ Response HandleFunction(Sema &SemaRef, const FunctionDecl *Function, // If this function was instantiated from a specialized member that is // a function template, we're done. assert(Function->getPrimaryTemplate() && "No function template?"); - if (Function->getPrimaryTemplate()->isMemberSpecialization()) + if (!ForDefaultArgumentSubstitution && + Function->getPrimaryTemplate()->isMemberSpecialization()) return Response::Done(); // If this function is a generic lambda specialization, we are done. @@ -465,7 +467,7 @@ MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs( const NamedDecl *ND, const DeclContext *DC, bool Final, std::optional> Innermost, bool RelativeToPrimary, const FunctionDecl *Pattern, bool ForConstraintInstantiation, - bool SkipForSpecialization) { + bool SkipForSpecialization, bool ForDefaultArgumentSubstitution) { assert((ND || DC) && "Can't find arguments for a decl if one isn't provided"); // Accumulate the set of template argument lists in this structure. MultiLevelTemplateArgumentList Result; @@ -507,7 +509,8 @@ MultiLevelTemplateArgumentList Sema::getTemplateInstantiationArgs( SkipForSpecialization); } else if (const auto *Function = dyn_cast(CurDecl)) { R = HandleFunction(*this, Function, Result, Pattern, RelativeToPrimary, - ForConstraintInstantiation); + ForConstraintInstantiation, + ForDefaultArgumentSubstitution); } else if (const auto *Rec = dyn_cast(CurDecl)) { R = HandleRecordDecl(*this, Rec, Result, Context, ForConstraintInstantiation); @@ -3231,7 +3234,6 @@ bool Sema::SubstDefaultArgument( // default argument expression appears. ContextRAII SavedContext(*this, FD); std::unique_ptr LIS; - MultiLevelTemplateArgumentList NewTemplateArgs = TemplateArgs; if (ForCallExpr) { // When instantiating a default argument due to use in a call expression, @@ -3244,19 +3246,10 @@ bool Sema::SubstDefaultArgument( /*ForDefinition*/ false); if (addInstantiatedParametersToScope(FD, PatternFD, *LIS, TemplateArgs)) return true; - const FunctionTemplateDecl *PrimaryTemplate = FD->getPrimaryTemplate(); - if (PrimaryTemplate && PrimaryTemplate->isOutOfLine()) { - TemplateArgumentList *CurrentTemplateArgumentList = - TemplateArgumentList::CreateCopy(getASTContext(), - TemplateArgs.getInnermost()); - NewTemplateArgs = getTemplateInstantiationArgs( - FD, FD->getDeclContext(), /*Final=*/false, - CurrentTemplateArgumentList->asArray(), /*RelativeToPrimary=*/true); - } } runWithSufficientStackSpace(Loc, [&] { - Result = SubstInitializer(PatternExpr, NewTemplateArgs, + Result = SubstInitializer(PatternExpr, TemplateArgs, /*DirectInit*/ false); }); } diff --git a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp index a12d2eff1d2c..614e6ea12541 100644 --- a/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp +++ b/contrib/llvm-project/clang/lib/Sema/SemaTemplateInstantiateDecl.cpp @@ -4659,10 +4659,12 @@ bool Sema::InstantiateDefaultArgument(SourceLocation CallLoc, FunctionDecl *FD, // // template // A Foo(int a = A::FooImpl()); - MultiLevelTemplateArgumentList TemplateArgs = - getTemplateInstantiationArgs(FD, FD->getLexicalDeclContext(), - /*Final=*/false, /*Innermost=*/std::nullopt, - /*RelativeToPrimary=*/true); + MultiLevelTemplateArgumentList TemplateArgs = getTemplateInstantiationArgs( + FD, FD->getLexicalDeclContext(), + /*Final=*/false, /*Innermost=*/std::nullopt, + /*RelativeToPrimary=*/true, /*Pattern=*/nullptr, + /*ForConstraintInstantiation=*/false, /*SkipForSpecialization=*/false, + /*ForDefaultArgumentSubstitution=*/true); if (SubstDefaultArgument(CallLoc, Param, TemplateArgs, /*ForCallExpr*/ true)) return true; From nobody Thu Jul 24 07:50:10 2025 X-Original-To: dev-commits-src-all@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 4bnjpW6rtSz629Tc; Thu, 24 Jul 2025 07:50: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnjpV5Jm9z3tJ6; Thu, 24 Jul 2025 07:50:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753343410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GHYEERoZZkacEilZAFBd1fZaVJsbR9l+4M33d6Oz+iw=; b=nQs6jHlWo1LB7qXigewSjRejuPq3CQtv4zS/QdA9EWEzx05W5eOE7L/iwGPV4WN9GhwIV6 w1Fm3t1/D1LYDEtQL965daXiLPCRU/jQhv6Gz2wzgWYzvC0eyOLR3qaxvEzAY9NE0stjl2 KpV83FrkhYIP7VL7jCP+iBt1eGo/w81SIN4c7cO79J2bQv+mF73nuetEcVDJHSVZAk2R4A iFML1vEGYW3b0UtOs+ElqYMGsKvOmPsh3tqJhR1vqdU9ro3dv/uM27NEtVM1lyAG9xjYg9 JkKdMo6a4LqIR1eWNhrJnVk71xbJp3ziYAAd5d27C50zv5tzKigElgn2i9RTog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753343410; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GHYEERoZZkacEilZAFBd1fZaVJsbR9l+4M33d6Oz+iw=; b=wiITOWZH1bmwFgx6/7PlO7EhlxPobWYh2rWCq+fiWHgGWeLqAKxtt852Zu+60SI7zcuXGM cfXrnQZLCLMXi6rHG7y3hYG+JaaI89sMDPRVl7p2jU16koTYILhNzg9B2dvgE5Gnx5Z4hx c0u9TUq/o6LItkRYRdmbtQ15bA3rU55clb4BEhmgcf0AaAf34aV4kpKxsiOJwcjirczv5h 0F+fei2dSOaQJKFTDKVuep1A7NNdHZaxeoht7UZ3A+X5CS0pWZB8aEmLu2qz7QJFcKkVgF lFTqb+OHmFa0SgEsFc8o/Zks9zq0LHbGqm98hiQRtxe9FxfPELGgEpWhBJfaaA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753343410; a=rsa-sha256; cv=none; b=jPZOredNx3nBlMsxkZmRJ8l6cbQJ1+vMi1qjArKYZyixWhzqSt70Vop56dEeK0eiXRYZUv V7xrVLcEKX2RbaDCDQe2KfOHgvVfZb5VUMyPlht7+RkZVhLkDKGwzf7Zshy3lGp3oqsmgY 7cVXhuFJdjnO5wcXBSWEKK727NIXmjmbLmFUEE/QsA0VmCL2pX6adIWQxd04ihASfZlR8X +jcPIR5KuhGMDKqXJYux51/n9PvGor7jCbDCKooUp88Dew0b9k1eXigC8wetnYcljUWNaM 6mo1aOMT/NtTlqYgodOE51xKJ+/v7+5Erqzc2qx8ELXMddcnfBd3Bgyj/lF3oA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnjpV4dJ4zqVP; Thu, 24 Jul 2025 07:50:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56O7oAZd097282; Thu, 24 Jul 2025 07:50:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56O7oAs5097277; Thu, 24 Jul 2025 07:50:10 GMT (envelope-from git) Date: Thu, 24 Jul 2025 07:50:10 GMT Message-Id: <202507240750.56O7oAs5097277@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Colin Percival Subject: git: 01c587521dd8 - main - OCI: Attempt to fix "runtime" container List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cperciva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 01c587521dd88e2ad3086e39e86d727073a65208 Auto-Submitted: auto-generated The branch main has been updated by cperciva: URL: https://cgit.FreeBSD.org/src/commit/?id=01c587521dd88e2ad3086e39e86d727073a65208 commit 01c587521dd88e2ad3086e39e86d727073a65208 Author: Colin Percival AuthorDate: 2025-07-24 06:53:59 +0000 Commit: Colin Percival CommitDate: 2025-07-24 07:49:48 +0000 OCI: Attempt to fix "runtime" container Chase the kerberos -> krb5 change in pkgbase packages. We don't currently have any way of making this conditional on the WITH_MITKRB5 variable, so we're going based on the default value. On the other hand, that's also true of other WITH_* variables too. This change might get backed out shortly; discussions are underway about whether MIT Kerberos 5 should be "krb5" or simply "kerberos". With hat: re (unbreaking weekly snapshot builds) Co-authored-by: dch Differential Revision: https://reviews.freebsd.org/D51481 --- release/tools/oci-image-runtime.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/release/tools/oci-image-runtime.conf b/release/tools/oci-image-runtime.conf index 93aad1e39250..19ba23d2c834 100644 --- a/release/tools/oci-image-runtime.conf +++ b/release/tools/oci-image-runtime.conf @@ -12,7 +12,7 @@ oci_image_build() { install_packages ${abi} ${workdir} \ FreeBSD-runtime \ FreeBSD-certctl \ - FreeBSD-kerberos-lib \ + FreeBSD-krb5-lib \ FreeBSD-libarchive \ FreeBSD-libexecinfo \ FreeBSD-libucl \ From nobody Thu Jul 24 10:10:18 2025 X-Original-To: dev-commits-src-all@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 4bnmwB5pv6z62JBj; Thu, 24 Jul 2025 10:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnmwB2sP7z3sWk; Thu, 24 Jul 2025 10:10:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753351818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7i7OePg0W5+KACc2XgMgBtg5NV7l2f1qyqrzuD6fT0U=; b=sCydmRSWAtVuVB5MDgQiPTD/2+8FEtz8k9mcmQLVP1jkMoH//IyxV77HZ+TXrfts4wdqMw ZZeni/3ta1kSb9h2gIkZT02WNGyWsHHFdjINCbFcpjFxcVied5vcoyrx+9abBNb8hrwo+O yP6aRi+AtIG3BN1A/0H+FbbWeOmy2tF0gec3oVk4i3Pq1CbrLtOgQQ5WscgJFGPl4SLu7R ym39nsuTzFA+nsusYJWqgVLhIR6V6VUtJVOUsGwso+vGQq8d3EE3e3HVirfgGcSzb8tH7y Q2LIu/Gd+Ezcm5UUjeBusGqnoEIaD6bGoDRfVBnMF64SEwDKGXtgCuM5VZ0gmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753351818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7i7OePg0W5+KACc2XgMgBtg5NV7l2f1qyqrzuD6fT0U=; b=kY3ki9edPY8Ka09i4OscddQwwBWdxti9CIlyEvrLorN9JsA6noe4XQf0/u7uKwKtVL+yq0 OaVlTaolRicAX3OMQVqT+FNDv87zucwEzOY3Aoyaqd7+bAAwrsqlKmpZrMw7+bbCxO40iV NyDFfqlIW6T3MSRnnhxAGvQsBfzcszloyxAz8X0Fdjymgbrb1t4mQJs/qYnJ6gD+OM5pxc OyOr3hoCOy3JKc8HVUjZdyPC/H7jtHO8KwjnaJzy3mNQNiiS4J1auX2T+ydHnwDGnMgD2b /8V03XUAqNISzVcu5y45cpi+6XWSrG6R+XAZcmx8Oh7woEGPnVVsTc8aYztYhQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753351818; a=rsa-sha256; cv=none; b=prfj0LuNfkZ4VR0BeIXNI2NNYmz2AM1pvlbM1vZOQDD6/Ozq1fYk5n8ALjRZB3zGfsuPnb ikapF8YxMny/Cddb3vaDwuPEVw3klzgHxCDab5xfsvur+/4F2fXTJCQ7SV2scAI1z+l//g o40azqWQIY39cemwPHxKUKNZRmKu3rkr235VaSG+yARie6pjU53NKvPYdS1uukZJ0kFVPl fXIhVUUgd9Mo+kJl2PPPlpGxbD5Vha0x1gEepDDnfCGHf/OFZNvLRwMeziGFpHJcrCJgZJ YbVGHZ2q/oGXShRSc69VJMC5txiSihj8Wpetfk92L+6mRJDmH18i2fUz2GZ7hg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnmwB1m0GztWQ; Thu, 24 Jul 2025 10:10:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OAAI2x065842; Thu, 24 Jul 2025 10:10:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OAAIjN065839; Thu, 24 Jul 2025 10:10:18 GMT (envelope-from git) Date: Thu, 24 Jul 2025 10:10:18 GMT Message-Id: <202507241010.56OAAIjN065839@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: ShengYi Hung Subject: git: c18c521c79b6 - main - vmm: Support INOUT manual decode. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: aokblast X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c18c521c79b6160ce43bb2ca4c2eb42ccf7e6e57 Auto-Submitted: auto-generated The branch main has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=c18c521c79b6160ce43bb2ca4c2eb42ccf7e6e57 commit c18c521c79b6160ce43bb2ca4c2eb42ccf7e6e57 Author: ShengYi Hung AuthorDate: 2025-07-11 08:52:01 +0000 Commit: ShengYi Hung CommitDate: 2025-07-24 10:09:50 +0000 vmm: Support INOUT manual decode. The inout instruction in AMD SVM requires DecodeAssist feature to decode the segment override prefix. However, without that feature, we are still able to decode by fetching the instruction directly. Approved by: markj (mentor) MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51256 --- sys/amd64/include/vmm.h | 2 + sys/amd64/include/vmm_instruction_emul.h | 25 +++++++++ sys/amd64/vmm/amd/svm.c | 90 +++++++++++++++++++------------- sys/amd64/vmm/intel/vmx.c | 2 + sys/amd64/vmm/vmm_instruction_emul.c | 34 ++++-------- sys/amd64/vmm/vmm_ioport.c | 40 ++++++++++++++ 6 files changed, 132 insertions(+), 61 deletions(-) diff --git a/sys/amd64/include/vmm.h b/sys/amd64/include/vmm.h index a9c73b75213b..0b3daed4f69e 100644 --- a/sys/amd64/include/vmm.h +++ b/sys/amd64/include/vmm.h @@ -649,6 +649,8 @@ struct vm_inout_str { int addrsize; enum vm_reg_name seg_name; struct seg_desc seg_desc; + int cs_d; + uint64_t cs_base; }; enum task_switch_reason { diff --git a/sys/amd64/include/vmm_instruction_emul.h b/sys/amd64/include/vmm_instruction_emul.h index d5f0363cfb41..1fb0f97682a7 100644 --- a/sys/amd64/include/vmm_instruction_emul.h +++ b/sys/amd64/include/vmm_instruction_emul.h @@ -31,6 +31,31 @@ #include +/* struct vie_op.op_type */ +enum { + VIE_OP_TYPE_NONE = 0, + VIE_OP_TYPE_MOV, + VIE_OP_TYPE_MOVSX, + VIE_OP_TYPE_MOVZX, + VIE_OP_TYPE_AND, + VIE_OP_TYPE_OR, + VIE_OP_TYPE_SUB, + VIE_OP_TYPE_TWO_BYTE, + VIE_OP_TYPE_PUSH, + VIE_OP_TYPE_CMP, + VIE_OP_TYPE_POP, + VIE_OP_TYPE_MOVS, + VIE_OP_TYPE_GROUP1, + VIE_OP_TYPE_STOS, + VIE_OP_TYPE_BITTEST, + VIE_OP_TYPE_TWOB_GRP15, + VIE_OP_TYPE_ADD, + VIE_OP_TYPE_TEST, + VIE_OP_TYPE_BEXTR, + VIE_OP_TYPE_OUTS, + VIE_OP_TYPE_LAST +}; + /* * Callback functions to read and write memory regions. */ diff --git a/sys/amd64/vmm/amd/svm.c b/sys/amd64/vmm/amd/svm.c index 6c16daaa47c2..2fe6a5bc3584 100644 --- a/sys/amd64/vmm/amd/svm.c +++ b/sys/amd64/vmm/amd/svm.c @@ -317,6 +317,33 @@ svm_set_tsc_offset(struct svm_vcpu *vcpu, uint64_t offset) #define MSR_AMD7TH_START 0xC0010000UL #define MSR_AMD7TH_END 0xC0011FFFUL +static void +svm_get_cs_info(struct vmcb *vmcb, struct vm_guest_paging *paging, int *cs_d, + uint64_t *base) +{ + struct vmcb_segment seg; + int error __diagused; + + error = vmcb_seg(vmcb, VM_REG_GUEST_CS, &seg); + KASSERT(error == 0, ("%s: vmcb_seg error %d", __func__, error)); + + switch (paging->cpu_mode) { + case CPU_MODE_REAL: + *base = seg.base; + *cs_d = 0; + break; + case CPU_MODE_PROTECTED: + case CPU_MODE_COMPATIBILITY: + *cs_d = !!(seg.attrib & VMCB_CS_ATTRIB_D); + *base = seg.base; + break; + default: + *base = 0; + *cs_d = 0; + break; + } +} + /* * Get the index and bit position for a MSR in permission bitmap. * Two bits are used for each MSR: lower bit for read and higher bit for write. @@ -735,10 +762,29 @@ svm_inout_str_seginfo(struct svm_vcpu *vcpu, int64_t info1, int in, if (in) { vis->seg_name = VM_REG_GUEST_ES; - } else { - /* The segment field has standard encoding */ + } else if (decode_assist()) { + /* + * The effective segment number in EXITINFO1[12:10] is populated + * only if the processor has the DecodeAssist capability. + * + * XXX this is not specified explicitly in APMv2 but can be + * verified empirically. + */ s = (info1 >> 10) & 0x7; + + /* The segment field has standard encoding */ vis->seg_name = vm_segment_name(s); + } else { + /* + * The segment register need to be manually decoded by fetching + * the instructions near ip. However, we are unable to fetch it + * while the interrupts are disabled. Therefore, we leave the + * value unset until the generic ins/outs handler runs. + */ + vis->seg_name = VM_REG_LAST; + svm_get_cs_info(vcpu->vmcb, &vis->paging, &vis->cs_d, + &vis->cs_base); + return; } error = svm_getdesc(vcpu, vis->seg_name, &vis->seg_desc); @@ -798,16 +844,6 @@ svm_handle_io(struct svm_vcpu *vcpu, struct vm_exit *vmexit) info1 = ctrl->exitinfo1; inout_string = info1 & BIT(2) ? 1 : 0; - /* - * The effective segment number in EXITINFO1[12:10] is populated - * only if the processor has the DecodeAssist capability. - * - * XXX this is not specified explicitly in APMv2 but can be verified - * empirically. - */ - if (inout_string && !decode_assist()) - return (UNHANDLED); - vmexit->exitcode = VM_EXITCODE_INOUT; vmexit->u.inout.in = (info1 & BIT(0)) ? 1 : 0; vmexit->u.inout.string = inout_string; @@ -825,6 +861,8 @@ svm_handle_io(struct svm_vcpu *vcpu, struct vm_exit *vmexit) vis->index = svm_inout_str_index(regs, vmexit->u.inout.in); vis->count = svm_inout_str_count(regs, vmexit->u.inout.rep); vis->addrsize = svm_inout_str_addrsize(info1); + vis->cs_d = 0; + vis->cs_base = 0; svm_inout_str_seginfo(vcpu, info1, vmexit->u.inout.in, vis); } @@ -866,10 +904,9 @@ static void svm_handle_inst_emul(struct vmcb *vmcb, uint64_t gpa, struct vm_exit *vmexit) { struct vm_guest_paging *paging; - struct vmcb_segment seg; struct vmcb_ctrl *ctrl; char *inst_bytes; - int error __diagused, inst_len; + int inst_len; ctrl = &vmcb->ctrl; paging = &vmexit->u.inst_emul.paging; @@ -879,29 +916,8 @@ svm_handle_inst_emul(struct vmcb *vmcb, uint64_t gpa, struct vm_exit *vmexit) vmexit->u.inst_emul.gla = VIE_INVALID_GLA; svm_paging_info(vmcb, paging); - error = vmcb_seg(vmcb, VM_REG_GUEST_CS, &seg); - KASSERT(error == 0, ("%s: vmcb_seg(CS) error %d", __func__, error)); - - switch(paging->cpu_mode) { - case CPU_MODE_REAL: - vmexit->u.inst_emul.cs_base = seg.base; - vmexit->u.inst_emul.cs_d = 0; - break; - case CPU_MODE_PROTECTED: - case CPU_MODE_COMPATIBILITY: - vmexit->u.inst_emul.cs_base = seg.base; - - /* - * Section 4.8.1 of APM2, Default Operand Size or D bit. - */ - vmexit->u.inst_emul.cs_d = (seg.attrib & VMCB_CS_ATTRIB_D) ? - 1 : 0; - break; - default: - vmexit->u.inst_emul.cs_base = 0; - vmexit->u.inst_emul.cs_d = 0; - break; - } + svm_get_cs_info(vmcb, paging, &vmexit->u.inst_emul.cs_d, + &vmexit->u.inst_emul.cs_base); /* * Copy the instruction bytes into 'vie' if available. diff --git a/sys/amd64/vmm/intel/vmx.c b/sys/amd64/vmm/intel/vmx.c index 957217ab2258..842281ab862e 100644 --- a/sys/amd64/vmm/intel/vmx.c +++ b/sys/amd64/vmm/intel/vmx.c @@ -2659,6 +2659,8 @@ vmx_exit_process(struct vmx *vmx, struct vmx_vcpu *vcpu, struct vm_exit *vmexit) vis->index = inout_str_index(vcpu, in); vis->count = inout_str_count(vcpu, vis->inout.rep); vis->addrsize = inout_str_addrsize(inst_info); + vis->cs_d = 0; + vis->cs_base = 0; inout_str_seginfo(vcpu, inst_info, in, vis); } SDT_PROBE3(vmm, vmx, exit, inout, vmx, vcpuid, vmexit); diff --git a/sys/amd64/vmm/vmm_instruction_emul.c b/sys/amd64/vmm/vmm_instruction_emul.c index c53e32889000..c54b6e6d0074 100644 --- a/sys/amd64/vmm/vmm_instruction_emul.c +++ b/sys/amd64/vmm/vmm_instruction_emul.c @@ -65,30 +65,6 @@ #include #include -/* struct vie_op.op_type */ -enum { - VIE_OP_TYPE_NONE = 0, - VIE_OP_TYPE_MOV, - VIE_OP_TYPE_MOVSX, - VIE_OP_TYPE_MOVZX, - VIE_OP_TYPE_AND, - VIE_OP_TYPE_OR, - VIE_OP_TYPE_SUB, - VIE_OP_TYPE_TWO_BYTE, - VIE_OP_TYPE_PUSH, - VIE_OP_TYPE_CMP, - VIE_OP_TYPE_POP, - VIE_OP_TYPE_MOVS, - VIE_OP_TYPE_GROUP1, - VIE_OP_TYPE_STOS, - VIE_OP_TYPE_BITTEST, - VIE_OP_TYPE_TWOB_GRP15, - VIE_OP_TYPE_ADD, - VIE_OP_TYPE_TEST, - VIE_OP_TYPE_BEXTR, - VIE_OP_TYPE_LAST -}; - /* struct vie_op.op_flags */ #define VIE_OP_F_IMM (1 << 0) /* 16/32-bit immediate operand */ #define VIE_OP_F_IMM8 (1 << 1) /* 8-bit immediate operand */ @@ -152,6 +128,16 @@ static const struct vie_op one_byte_opcodes[256] = { .op_byte = 0x3B, .op_type = VIE_OP_TYPE_CMP, }, + [0x6E] = { + .op_byte = 0x6E, + .op_type = VIE_OP_TYPE_OUTS, + .op_flags = VIE_OP_F_NO_MODRM | VIE_OP_F_NO_GLA_VERIFICATION, + }, + [0x6F] = { + .op_byte = 0x6F, + .op_type = VIE_OP_TYPE_OUTS, + .op_flags = VIE_OP_F_NO_MODRM | VIE_OP_F_NO_GLA_VERIFICATION, + }, [0x88] = { .op_byte = 0x88, .op_type = VIE_OP_TYPE_MOV, diff --git a/sys/amd64/vmm/vmm_ioport.c b/sys/amd64/vmm/vmm_ioport.c index fc1ecab9f209..8aab28f5e68e 100644 --- a/sys/amd64/vmm/vmm_ioport.c +++ b/sys/amd64/vmm/vmm_ioport.c @@ -144,10 +144,50 @@ emulate_inout_port(struct vcpu *vcpu, struct vm_exit *vmexit, bool *retu) return (0); } +static int +decode_segment(struct vcpu *vcpu, enum vm_reg_name *segment) +{ + struct vm_guest_paging *paging; + struct vie vie; + struct vm_exit *vme; + int err; + int fault; + + vme = vm_exitinfo(vcpu); + paging = &vme->u.inout_str.paging; + + vie_init(&vie, NULL, 0); + err = vmm_fetch_instruction(vcpu, paging, + vme->rip + vme->u.inout_str.cs_base, VIE_INST_SIZE, &vie, &fault); + if (err || fault) + return (err); + + err = vmm_decode_instruction(vcpu, VIE_INVALID_GLA, paging->cpu_mode, + vme->u.inout_str.cs_d, &vie); + + if (err || vie.op.op_type != VIE_OP_TYPE_OUTS) + return (EINVAL); + if (vie.segment_override) + *segment = vie.segment_register; + else + *segment = VM_REG_GUEST_DS; + + return (0); +} + static int emulate_inout_str(struct vcpu *vcpu, struct vm_exit *vmexit, bool *retu) { + int err; + *retu = true; + if (vmexit->u.inout_str.seg_name == VM_REG_LAST) { + err = decode_segment(vcpu, &vmexit->u.inout_str.seg_name); + if (err) + return (err); + return (vm_get_seg_desc(vcpu, vmexit->u.inout_str.seg_name, + &vmexit->u.inout_str.seg_desc)); + } return (0); /* Return to userspace to finish emulation */ } From nobody Thu Jul 24 10:33:49 2025 X-Original-To: dev-commits-src-all@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 4bnnRL08jbz62KSF; Thu, 24 Jul 2025 10:33: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnnRK5npGz45D4; Thu, 24 Jul 2025 10: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=1753353229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=syRDFqehpgdQo748vgPQzDn6+HHKpV4DQui0iDjyn70=; b=q6bHxFF716qPyGlh43mDJFPagfgzTZwwFpZuspP0iukATkNf6WhWCHr3iVv4ygjvAWMFpx /yBwQpw5DOe+v6FKqp0X+VSw6gVhA2jyqvosXomX8zos/+uryM5yCjEqv11IaOCZEcFsUX iqtJYQeGq3HKkaQJDuNRnJ8i5MtV5ejtL9kpxrIFecG+/9tL+Yam2WXkZZnO5996hbUrbp 2vV/k388RlNgAVynFdNJ3BWq2Z5/w06XT5nr+sIqt5YqbTyfCXARe0g7JBS2SPh9b0a3zo Ca2RWv5GyaOaLR3X3oOnrdXVkw4qIHppVw9H2obxJAZw4ZwD8CKM54YoNBl7Cg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753353229; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=syRDFqehpgdQo748vgPQzDn6+HHKpV4DQui0iDjyn70=; b=NX0fBO84bMyiwgaxj+k8PGb75JMK3NxROil/VTVr4kTr7wNObn3WTX+CiRVFc/0xChL4se JFkjvUlMtMQMsg+ChztlrFCa4f2viVBAeMP5VE5X8SufoFp8qyzfbt+wtK13khcFRomwDg 7uxNelMakFymtX2xn0Rl5r5ISN62BzYWqiYn7t4YzdnOHSJBRPc+aUhFJ/BMdxcCjaXWZI Q/DfQH+TT99MNOn90G+uLUL38eYqs4AVa56BOZyEFIo9MH0Tkf7Ln+pEBJeb9NhtK5bOQM HiiEi8ui3wihvr/34XcQrwy4DFMFzL4YKgklsFIMe6GLQj2SiCdAS8ksIKL9gA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753353229; a=rsa-sha256; cv=none; b=XAOHxFucRsExXS5wXoz5rgPF4S7KW/BJl9w4fD1ZHhEk98ni1NbQPBRebmLSBfnA3Uu+q9 b5NpapUImj4eegAufRpswiqgdEnY4joaSnXMb5z5kU8nCNqgVTIysMnvfgdw7Zip9ovQxb RkSwgLmgbn7YwgmiXLLzeyS65bBwKBclGxJn/vcStWNCc7OiSLrzt/gbbaod0qEEWZ4ioM DToRSxKpQTJPQv9Tns8UnuOLw7nqO38D1CrdB6Ww5DUL/rMrUn6R/Gn1BTGXhuTyueOdUq JZTvZbVapPLsYiowqGmJrbmm6u1SsRXoddUw+uCxPSf85kKSPbYZGJHOM+7E4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnnRK50GyzvvG; Thu, 24 Jul 2025 10:33:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OAXn0e011311; Thu, 24 Jul 2025 10:33:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OAXnUI011308; Thu, 24 Jul 2025 10:33:49 GMT (envelope-from git) Date: Thu, 24 Jul 2025 10:33:49 GMT Message-Id: <202507241033.56OAXnUI011308@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 4cb1baa7d85c - main - krb5: use 'kerberos' as package name List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4cb1baa7d85c1e227c4acfcc13a35a9f1b7e5a44 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=4cb1baa7d85c1e227c4acfcc13a35a9f1b7e5a44 commit 4cb1baa7d85c1e227c4acfcc13a35a9f1b7e5a44 Author: Lexi Winter AuthorDate: 2025-07-24 09:31:40 +0000 Commit: Lexi Winter CommitDate: 2025-07-24 10:35:35 +0000 krb5: use 'kerberos' as package name Rename krb5 and krb5-lib to kerberos and kerberos-lib to match the existing Heimdal package names. Since it's not possible to build or install both at the same time, and Heimdal will be removed anyway, there's no benefit to using a different package name for MIT Kerberos and doing so will create friction for pkgbase users. Move a few things (e.g., headers) from kerberos to kerberos-lib. Move the KDC to a new package, kerberos-kdc, so the client utilities can be installed without the KDC. As most systems won't have the KDC running, this saves a bit of disk space for jails/containers. Remove a few instances of 'PACKAGE=' in target-specific Makefiles where we can set that in the parent's Makefile.inc instead. Revert 01c587521dd8 ("OCI: Attempt to fix "runtime" container") which is no longer required. The KDC init script is still installed in the 'rc' package for compatibility with the security/krb5 port; we should fix this at some point, possibly after Heimdal is removed. Reviewed by: manu, kevans, des Approved by: des (mentor), kevans (mentor) Differential Revision: https://reviews.freebsd.org/D51420 --- krb5/include/Makefile | 2 +- krb5/lib/Makefile.inc | 2 ++ krb5/lib/apputils/Makefile | 2 -- krb5/lib/crypto/Makefile | 2 -- krb5/lib/gssapi/Makefile | 2 -- krb5/lib/kadm5clnt/Makefile | 2 -- krb5/lib/kadm5srv/Makefile | 2 -- krb5/lib/kdb/Makefile | 2 -- krb5/lib/krad/Makefile | 2 -- krb5/lib/krb5/Makefile | 2 -- krb5/lib/rpc/Makefile | 2 -- krb5/libexec/Makefile.inc | 1 + krb5/libexec/kadmind/Makefile | 2 -- krb5/libexec/kdc/Makefile | 2 -- krb5/libexec/kprop/Makefile | 2 -- krb5/libexec/kpropd/Makefile | 2 -- krb5/libexec/kproplog/Makefile | 2 -- krb5/plugins/Makefile.inc | 1 + krb5/plugins/audit/Makefile | 2 -- krb5/plugins/k5tls/Makefile | 2 -- krb5/plugins/kdb/db2/Makefile | 2 -- krb5/plugins/preauth/Makefile.inc | 1 + krb5/plugins/preauth/otp/Makefile | 2 -- krb5/plugins/preauth/pkinit/Makefile | 2 -- krb5/plugins/preauth/spake/Makefile | 2 -- krb5/plugins/preauth/test/Makefile | 2 -- krb5/usr.bin/Makefile.inc | 1 + krb5/usr.bin/gss-client/Makefile | 2 -- krb5/usr.bin/kadmin/Makefile | 2 -- krb5/usr.bin/kdestroy/Makefile | 2 -- krb5/usr.bin/kinit/Makefile | 2 -- krb5/usr.bin/klist/Makefile | 2 -- krb5/usr.bin/kpasswd/Makefile | 2 -- krb5/usr.bin/ksu/Makefile | 2 -- krb5/usr.bin/kswitch/Makefile | 2 -- krb5/usr.bin/ktutil/Makefile | 2 -- krb5/usr.bin/kvno/Makefile | 2 -- krb5/usr.bin/sclient/Makefile | 2 -- krb5/usr.bin/sim_client/Makefile | 2 -- krb5/usr.sbin/gss-server/Makefile | 2 +- krb5/usr.sbin/kadmin.local/Makefile | 2 +- krb5/usr.sbin/kdb5_util/Makefile | 2 +- krb5/usr.sbin/sim_server/Makefile | 2 +- krb5/usr.sbin/sserver/Makefile | 2 +- krb5/util/build-tools/Makefile | 2 +- krb5/util/compile_et/Makefile | 2 +- krb5/util/et/Makefile | 2 +- krb5/util/profile/Makefile | 2 +- krb5/util/ss/Makefile | 2 +- krb5/util/support/Makefile | 2 +- krb5/util/verto/Makefile | 2 +- lib/libpam/modules/pam_krb5/Makefile | 2 +- release/packages/ucl/kerberos-all.ucl | 4 ++-- release/packages/ucl/kerberos-kdc-all.ucl | 5 +++++ release/packages/ucl/kerberos-lib-all.ucl | 4 ++-- release/packages/ucl/krb5-all.ucl | 4 ---- release/packages/ucl/krb5-lib-all.ucl | 4 ---- release/tools/oci-image-runtime.conf | 2 +- 58 files changed, 30 insertions(+), 93 deletions(-) diff --git a/krb5/include/Makefile b/krb5/include/Makefile index 0a2ceaebb689..c7b3f0f10a99 100644 --- a/krb5/include/Makefile +++ b/krb5/include/Makefile @@ -7,7 +7,7 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 +PACKAGE= kerberos-lib .include diff --git a/krb5/lib/Makefile.inc b/krb5/lib/Makefile.inc index 8df7b76410a2..6d86e7a35146 100644 --- a/krb5/lib/Makefile.inc +++ b/krb5/lib/Makefile.inc @@ -9,6 +9,8 @@ .include "../Makefile.inc" +PACKAGE?= kerberos-lib + KRB5_KRB5LIBDIR= ${KRB5_SRCLIBDIR}/krb5 KRB5_K5CRYPTODIR= ${KRB5_SRCLIBDIR}/crypto diff --git a/krb5/lib/apputils/Makefile b/krb5/lib/apputils/Makefile index 62ef36f0615e..cf430eb3cd27 100644 --- a/krb5/lib/apputils/Makefile +++ b/krb5/lib/apputils/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5-lib - .include .include "../Makefile.inc" diff --git a/krb5/lib/crypto/Makefile b/krb5/lib/crypto/Makefile index 5efe53d12aa8..ed1cd7764012 100644 --- a/krb5/lib/crypto/Makefile +++ b/krb5/lib/crypto/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - .include .include "../Makefile.inc" diff --git a/krb5/lib/gssapi/Makefile b/krb5/lib/gssapi/Makefile index 569452cfb538..63e4d7df4bed 100644 --- a/krb5/lib/gssapi/Makefile +++ b/krb5/lib/gssapi/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - .include .include "../Makefile.inc" diff --git a/krb5/lib/kadm5clnt/Makefile b/krb5/lib/kadm5clnt/Makefile index c9f199bdaea3..22d78d7ae2f1 100644 --- a/krb5/lib/kadm5clnt/Makefile +++ b/krb5/lib/kadm5clnt/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - .include .include "../Makefile.inc" diff --git a/krb5/lib/kadm5srv/Makefile b/krb5/lib/kadm5srv/Makefile index 90a2180d496a..50f1e859f17b 100644 --- a/krb5/lib/kadm5srv/Makefile +++ b/krb5/lib/kadm5srv/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - .include .include "../Makefile.inc" diff --git a/krb5/lib/kdb/Makefile b/krb5/lib/kdb/Makefile index 57fe32e39347..ff17900fb7ec 100644 --- a/krb5/lib/kdb/Makefile +++ b/krb5/lib/kdb/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - .include .include "../Makefile.inc" diff --git a/krb5/lib/krad/Makefile b/krb5/lib/krad/Makefile index 28751d9bf9b6..0bc74e8318f8 100644 --- a/krb5/lib/krad/Makefile +++ b/krb5/lib/krad/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5-lib - .include .include "../Makefile.inc" diff --git a/krb5/lib/krb5/Makefile b/krb5/lib/krb5/Makefile index 76f40a3174cc..163005b6abf3 100644 --- a/krb5/lib/krb5/Makefile +++ b/krb5/lib/krb5/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - .include .include "../Makefile.inc" diff --git a/krb5/lib/rpc/Makefile b/krb5/lib/rpc/Makefile index f6dfd014ca3c..3bcd7ff7d9d3 100644 --- a/krb5/lib/rpc/Makefile +++ b/krb5/lib/rpc/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - .include .include "../Makefile.inc" diff --git a/krb5/libexec/Makefile.inc b/krb5/libexec/Makefile.inc index bcc6d4b1c21e..6ce709d08304 100644 --- a/krb5/libexec/Makefile.inc +++ b/krb5/libexec/Makefile.inc @@ -9,4 +9,5 @@ .include "../Makefile.inc" +PACKAGE?= kerberos-kdc BINDIR?= /usr/libexec diff --git a/krb5/libexec/kadmind/Makefile b/krb5/libexec/kadmind/Makefile index bb572a32445f..a845851f708e 100644 --- a/krb5/libexec/kadmind/Makefile +++ b/krb5/libexec/kadmind/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - .include "../Makefile.inc" PROG= kadmind diff --git a/krb5/libexec/kdc/Makefile b/krb5/libexec/kdc/Makefile index a990666d9338..ac5ada19eb37 100644 --- a/krb5/libexec/kdc/Makefile +++ b/krb5/libexec/kdc/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - .include "../Makefile.inc" PROG= krb5kdc diff --git a/krb5/libexec/kprop/Makefile b/krb5/libexec/kprop/Makefile index 74a56232f6bb..1294d9014ee4 100644 --- a/krb5/libexec/kprop/Makefile +++ b/krb5/libexec/kprop/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - .include "../Makefile.inc" PROG= kprop diff --git a/krb5/libexec/kpropd/Makefile b/krb5/libexec/kpropd/Makefile index 2fb2bfdff228..e7ffe5a26016 100644 --- a/krb5/libexec/kpropd/Makefile +++ b/krb5/libexec/kpropd/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - PROG= kpropd LIBADD= kprop_util kdb5 kadm5clnt_mit gssrpc gssapi_krb5 krb5 k5crypto \ diff --git a/krb5/libexec/kproplog/Makefile b/krb5/libexec/kproplog/Makefile index 533b6fdaa5c2..81405260a06e 100644 --- a/krb5/libexec/kproplog/Makefile +++ b/krb5/libexec/kproplog/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - PROG= kproplog LIBADD= kadm5srv_mit kdb5 gssrpc gssapi_krb5 krb5 k5crypto com_err \ krb5support sys diff --git a/krb5/plugins/Makefile.inc b/krb5/plugins/Makefile.inc index 846770a801e0..e888f79acd49 100644 --- a/krb5/plugins/Makefile.inc +++ b/krb5/plugins/Makefile.inc @@ -7,6 +7,7 @@ # under sponsorship from the FreeBSD Foundation. # +PACKAGE?= kerberos-kdc MK_INSTALLLIB= no SHLIB_NAME?= ${LIB}.so.${SHLIB_MAJOR} PLUGINSDIR= ${LIBDIR_BASE}/krb5/plugins diff --git a/krb5/plugins/audit/Makefile b/krb5/plugins/audit/Makefile index eb615a3b89f4..f85e5d1a81a5 100644 --- a/krb5/plugins/audit/Makefile +++ b/krb5/plugins/audit/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - .include .include "../Makefile.inc" diff --git a/krb5/plugins/k5tls/Makefile b/krb5/plugins/k5tls/Makefile index 790794d4744c..30738a70e71d 100644 --- a/krb5/plugins/k5tls/Makefile +++ b/krb5/plugins/k5tls/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - .include .include "../Makefile.inc" diff --git a/krb5/plugins/kdb/db2/Makefile b/krb5/plugins/kdb/db2/Makefile index a91bea73677b..e9429bc03de1 100644 --- a/krb5/plugins/kdb/db2/Makefile +++ b/krb5/plugins/kdb/db2/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - .include .include "../Makefile.inc" diff --git a/krb5/plugins/preauth/Makefile.inc b/krb5/plugins/preauth/Makefile.inc index aecd360f50e7..8a713e4d0856 100644 --- a/krb5/plugins/preauth/Makefile.inc +++ b/krb5/plugins/preauth/Makefile.inc @@ -7,6 +7,7 @@ # under sponsorship from the FreeBSD Foundation. # +PACKAGE?= kerberos-kdc LIBDIR= ${PLUGINSDIR}/preauth SHLIBDIR= ${LIBDIR} diff --git a/krb5/plugins/preauth/otp/Makefile b/krb5/plugins/preauth/otp/Makefile index 724d8df16230..48fc35db0727 100644 --- a/krb5/plugins/preauth/otp/Makefile +++ b/krb5/plugins/preauth/otp/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - .include .include "../Makefile.inc" diff --git a/krb5/plugins/preauth/pkinit/Makefile b/krb5/plugins/preauth/pkinit/Makefile index 600b02b02346..7d227aca5420 100644 --- a/krb5/plugins/preauth/pkinit/Makefile +++ b/krb5/plugins/preauth/pkinit/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - .include .include "../Makefile.inc" diff --git a/krb5/plugins/preauth/spake/Makefile b/krb5/plugins/preauth/spake/Makefile index 62d8a5aa9574..3aa375cb5100 100644 --- a/krb5/plugins/preauth/spake/Makefile +++ b/krb5/plugins/preauth/spake/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - .include .include "../Makefile.inc" diff --git a/krb5/plugins/preauth/test/Makefile b/krb5/plugins/preauth/test/Makefile index 411868e9a1d1..99f632c0cb17 100644 --- a/krb5/plugins/preauth/test/Makefile +++ b/krb5/plugins/preauth/test/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - .include .include "../Makefile.inc" diff --git a/krb5/usr.bin/Makefile.inc b/krb5/usr.bin/Makefile.inc index ea8e5ee805bb..f27bd78cd54c 100644 --- a/krb5/usr.bin/Makefile.inc +++ b/krb5/usr.bin/Makefile.inc @@ -9,4 +9,5 @@ .include "../Makefile.inc" +PACKAGE?= kerberos BINDIR?= /usr/bin diff --git a/krb5/usr.bin/gss-client/Makefile b/krb5/usr.bin/gss-client/Makefile index f2b5285ac3bb..acd67f9c17c6 100644 --- a/krb5/usr.bin/gss-client/Makefile +++ b/krb5/usr.bin/gss-client/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - PROG= gss-client LIBADD= gssapi_krb5 krb5 k5crypto com_err krb5profile krb5support sys diff --git a/krb5/usr.bin/kadmin/Makefile b/krb5/usr.bin/kadmin/Makefile index 95fcea307827..36b7378dee11 100644 --- a/krb5/usr.bin/kadmin/Makefile +++ b/krb5/usr.bin/kadmin/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - PROG= kadmin LIBADD= kadmin_common edit kadm5clnt_mit gssrpc gssapi_krb5 krb5 k5crypto \ diff --git a/krb5/usr.bin/kdestroy/Makefile b/krb5/usr.bin/kdestroy/Makefile index 4ec2ef4a1392..e3f493ffdc60 100644 --- a/krb5/usr.bin/kdestroy/Makefile +++ b/krb5/usr.bin/kdestroy/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - PROG= kdestroy LIBADD= krb5 k5crypto com_err krb5profile krb5support sys diff --git a/krb5/usr.bin/kinit/Makefile b/krb5/usr.bin/kinit/Makefile index 8aff9af3687b..3d1285137f85 100644 --- a/krb5/usr.bin/kinit/Makefile +++ b/krb5/usr.bin/kinit/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - PROG= kinit LIBADD= kadm5srv_mit kdb5 gssrpc gssapi_krb5 krb5 k5crypto com_err \ diff --git a/krb5/usr.bin/klist/Makefile b/krb5/usr.bin/klist/Makefile index a5d6cecbaddb..3094a3b69d4b 100644 --- a/krb5/usr.bin/klist/Makefile +++ b/krb5/usr.bin/klist/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - PROG= klist LIBADD= krb5 k5crypto com_err krb5profile krb5support sys diff --git a/krb5/usr.bin/kpasswd/Makefile b/krb5/usr.bin/kpasswd/Makefile index 431cf239928e..e4d7d1e8ab84 100644 --- a/krb5/usr.bin/kpasswd/Makefile +++ b/krb5/usr.bin/kpasswd/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - PROG= kpasswd LIBADD= krb5 k5crypto com_err krb5profile krb5support sys diff --git a/krb5/usr.bin/ksu/Makefile b/krb5/usr.bin/ksu/Makefile index 4ddfa8096773..37a4c166aec6 100644 --- a/krb5/usr.bin/ksu/Makefile +++ b/krb5/usr.bin/ksu/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - PROG= ksu .if defined(ENABLE_SUID_K5SU) BINMODE=4555 diff --git a/krb5/usr.bin/kswitch/Makefile b/krb5/usr.bin/kswitch/Makefile index 1e9853012ae5..10298f34a9d4 100644 --- a/krb5/usr.bin/kswitch/Makefile +++ b/krb5/usr.bin/kswitch/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - PROG= kswitch LIBADD= krb5 k5crypto com_err krb5profile krb5support sys diff --git a/krb5/usr.bin/ktutil/Makefile b/krb5/usr.bin/ktutil/Makefile index abe02965de4d..6bcb4877ed6f 100644 --- a/krb5/usr.bin/ktutil/Makefile +++ b/krb5/usr.bin/ktutil/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - PROG= ktutil LIBADD= edit krb5 k5crypto com_err krb5profile krb5support krb5ss tinfow sys diff --git a/krb5/usr.bin/kvno/Makefile b/krb5/usr.bin/kvno/Makefile index 203839624414..0a43765e53f4 100644 --- a/krb5/usr.bin/kvno/Makefile +++ b/krb5/usr.bin/kvno/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - PROG= kvno LIBADD= krb5 k5crypto com_err krb5profile krb5support sys diff --git a/krb5/usr.bin/sclient/Makefile b/krb5/usr.bin/sclient/Makefile index f27dad42fa08..8a3cc38fe3b6 100644 --- a/krb5/usr.bin/sclient/Makefile +++ b/krb5/usr.bin/sclient/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - PROG= sclient LIBADD= krb5 k5crypto com_err krb5profile krb5support sys diff --git a/krb5/usr.bin/sim_client/Makefile b/krb5/usr.bin/sim_client/Makefile index ecdf9ac8885e..3e5ea72407bc 100644 --- a/krb5/usr.bin/sim_client/Makefile +++ b/krb5/usr.bin/sim_client/Makefile @@ -7,8 +7,6 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 - PROG= sim_client LIBADD= krb5 k5crypto com_err krb5profile krb5support sys diff --git a/krb5/usr.sbin/gss-server/Makefile b/krb5/usr.sbin/gss-server/Makefile index 9e80b466d427..c42740045ac4 100644 --- a/krb5/usr.sbin/gss-server/Makefile +++ b/krb5/usr.sbin/gss-server/Makefile @@ -7,7 +7,7 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 +PACKAGE= kerberos PROG= gss-server diff --git a/krb5/usr.sbin/kadmin.local/Makefile b/krb5/usr.sbin/kadmin.local/Makefile index 7e89d0953683..4b99f490bd7b 100644 --- a/krb5/usr.sbin/kadmin.local/Makefile +++ b/krb5/usr.sbin/kadmin.local/Makefile @@ -7,7 +7,7 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 +PACKAGE= kerberos-kdc PROG= kadmin.local diff --git a/krb5/usr.sbin/kdb5_util/Makefile b/krb5/usr.sbin/kdb5_util/Makefile index 6a7b66dc205c..5b3d3ecc3410 100644 --- a/krb5/usr.sbin/kdb5_util/Makefile +++ b/krb5/usr.sbin/kdb5_util/Makefile @@ -7,7 +7,7 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 +PACKAGE= kerberos-kdc PROG= kdb5_util diff --git a/krb5/usr.sbin/sim_server/Makefile b/krb5/usr.sbin/sim_server/Makefile index 793a6ad421b1..adaf8d1f087f 100644 --- a/krb5/usr.sbin/sim_server/Makefile +++ b/krb5/usr.sbin/sim_server/Makefile @@ -7,7 +7,7 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 +PACKAGE= kerberos PROG= sim_server diff --git a/krb5/usr.sbin/sserver/Makefile b/krb5/usr.sbin/sserver/Makefile index 3b205b490a5f..e4e85b28157e 100644 --- a/krb5/usr.sbin/sserver/Makefile +++ b/krb5/usr.sbin/sserver/Makefile @@ -7,7 +7,7 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 +PACKAGE= kerberos PROG= sserver diff --git a/krb5/util/build-tools/Makefile b/krb5/util/build-tools/Makefile index c33d47f70c8f..1a6a373f0e7f 100644 --- a/krb5/util/build-tools/Makefile +++ b/krb5/util/build-tools/Makefile @@ -7,7 +7,7 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 +PACKAGE= kerberos-lib .include "../Makefile.inc" diff --git a/krb5/util/compile_et/Makefile b/krb5/util/compile_et/Makefile index 57eb2f614802..03446f2d7d1c 100644 --- a/krb5/util/compile_et/Makefile +++ b/krb5/util/compile_et/Makefile @@ -7,7 +7,7 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 +PACKAGE= kerberos .include "../Makefile.inc" diff --git a/krb5/util/et/Makefile b/krb5/util/et/Makefile index 16b700fb5d1f..5d0c2a3e3ca5 100644 --- a/krb5/util/et/Makefile +++ b/krb5/util/et/Makefile @@ -7,7 +7,7 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5-lib +PACKAGE= kerberos-lib .include diff --git a/krb5/util/profile/Makefile b/krb5/util/profile/Makefile index 72ef3176ab5d..a921e29150bb 100644 --- a/krb5/util/profile/Makefile +++ b/krb5/util/profile/Makefile @@ -7,7 +7,7 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 +PACKAGE= kerberos-lib .include diff --git a/krb5/util/ss/Makefile b/krb5/util/ss/Makefile index 600d125a7853..e7e025184284 100644 --- a/krb5/util/ss/Makefile +++ b/krb5/util/ss/Makefile @@ -7,7 +7,7 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 +PACKAGE= kerberos-lib .include diff --git a/krb5/util/support/Makefile b/krb5/util/support/Makefile index 25ef7faf74ee..bba65bcd89c1 100644 --- a/krb5/util/support/Makefile +++ b/krb5/util/support/Makefile @@ -7,7 +7,7 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5-lib +PACKAGE= kerberos-lib .include diff --git a/krb5/util/verto/Makefile b/krb5/util/verto/Makefile index 18faddb3a09e..8f02d5f897f4 100644 --- a/krb5/util/verto/Makefile +++ b/krb5/util/verto/Makefile @@ -7,7 +7,7 @@ # under sponsorship from the FreeBSD Foundation. # -PACKAGE= krb5 +PACKAGE= kerberos-lib .include diff --git a/lib/libpam/modules/pam_krb5/Makefile b/lib/libpam/modules/pam_krb5/Makefile index b537bf37b7f3..c1792b5fb61d 100644 --- a/lib/libpam/modules/pam_krb5/Makefile +++ b/lib/libpam/modules/pam_krb5/Makefile @@ -32,7 +32,7 @@ SRCDIR= ${SRCTOP}/contrib/pam-krb5 ${SRCDIR}/pam-util \ ${SRCDIR} -PACKAGE= krb5 +PACKAGE= kerberos LIB= pam_krb5 LIBADD= com_err krb5 diff --git a/release/packages/ucl/kerberos-all.ucl b/release/packages/ucl/kerberos-all.ucl index 6fb7f059296b..bf82040da3d0 100644 --- a/release/packages/ucl/kerberos-all.ucl +++ b/release/packages/ucl/kerberos-all.ucl @@ -1,4 +1,4 @@ -comment = "Kerberos Utilities" +comment = "Kerberos utilities" desc = < To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: aa183bc7f96f - main - rc.d: Fix mountd service script. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aa183bc7f96fdd51c4a6ead5586a1cb1ecec6bb2 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=aa183bc7f96fdd51c4a6ead5586a1cb1ecec6bb2 commit aa183bc7f96fdd51c4a6ead5586a1cb1ecec6bb2 Author: Dag-Erling Smørgrav AuthorDate: 2025-07-24 13:00:37 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-07-24 13:00:47 +0000 rc.d: Fix mountd service script. This script references variables beloning to the nfsd and zfs services, therefore it needs to load their configurations. MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D51473 --- libexec/rc/rc.d/mountd | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libexec/rc/rc.d/mountd b/libexec/rc/rc.d/mountd index 8c0aa87e1d13..dfd2431f9c35 100755 --- a/libexec/rc/rc.d/mountd +++ b/libexec/rc/rc.d/mountd @@ -70,6 +70,8 @@ mountd_precmd() } load_rc_config $name +load_rc_config nfsd +load_rc_config zfs # precmd is not compatible with svcj mountd_svcj="NO" From nobody Thu Jul 24 13:02:39 2025 X-Original-To: dev-commits-src-all@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 4bnrl34pqSz62TqW; Thu, 24 Jul 2025 13:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnrl337Slz3TCD; Thu, 24 Jul 2025 13:02:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753362159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qQ1xiltlmdcR42GMc5Q+G6i5BIzvvjolI4yfFrCJHNo=; b=cTM26BBgoU372QqXDt67VeFFSXZne28yd5glP0d1eXndoAJURcOJYmhG4A0utuT9g8X/ym 1qXAC3zUr8mbiRyA/VRVOzDyZHFloSqh3QLPkMDBoMKQpwNzG8NMrACSnDWu2ZfhgZ3SHk NOEv0lqLMmFrb/fA/3V0aUWh7sS/n3DNfWzT1zJ5mkvi2hUGvrmRzqCPPZqeiG7lv7aTnU Dt8S/tdw4qVHjOm4gRZt1h/Gv5a66EdMbuEKodG8XsgcSOdL+mT9DKHl67dVoxnq20wK7z 1ylZLvarPCma4Wf7bxNreEfOQrFqPoQaYAawS5kED+1knN4iA0wxBIvwz8najw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753362159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qQ1xiltlmdcR42GMc5Q+G6i5BIzvvjolI4yfFrCJHNo=; b=XAf4FZXiZGkvTRNDCpf5N8hVDVvYh3XsQ9cq80wmxxuHa02iwH3RRaJUctnfkXLuwwzEx+ r4FgTKBoZdsijg5d97uIAkL7WK3udDBSrLkbRytsRPqJC8NvuJuCIcvX3shWIeG5NwpUeP NV3CqezDBvY0SKlyhs+IM3GP4rXRCLhLcxWVyh/vVHVvj0+cj5th75uBbURfhmiOOWSOrq Rl8VeZrGYm43a34UVdIAUZuyAuvuyCMZqUJ8TKnBZAWmu2yGhaPGr/LJNi5HNGaVk1uLGL CsbZpBEhO1owdzDVCOKwFRRZJbRLQ2MtxStDe+b3lwE+oAoO3NFDpj3L3eUJ4Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753362159; a=rsa-sha256; cv=none; b=S6vzWNYH3aWKqdVAOhmzTfnZ8PH4NFmR9Q/GslXImk2kmd9H4wA4UGnlVkg9sORD4yBtn3 3kVqZcKkJ70K9fmZG034lgOWavKPbqfaPpmMk+SQJuqoM7Lr9NgiFFJsflcWiziORMgOwT 7GHr8kN5kE+NaB3Il4n3pFYfDlXegB8ciPGXH0Juc54pm/+dvSNA2tY0chbGcbnK1B2lGt tABq/DnKK784NzUPYry/bPJ9mkvn3XjjZFOaKH70HmYUuTWRU8fXdDq6FNrucsWSa6tg0/ xAG5Hoc4nLkMonoVIqbqqPablqSM+kEhYBk+VEMV6Wy7h3rGibcR8m/WRwnvCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnrl32lVmz10my; Thu, 24 Jul 2025 13:02:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OD2d6c001627; Thu, 24 Jul 2025 13:02:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OD2dSf001624; Thu, 24 Jul 2025 13:02:39 GMT (envelope-from git) Date: Thu, 24 Jul 2025 13:02:39 GMT Message-Id: <202507241302.56OD2dSf001624@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: a7b4e2e9d0ca - stable/13 - kyua: Try harder to delete directories. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: a7b4e2e9d0caddf72c1cbe9e8e36b2edcbbbbff3 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a7b4e2e9d0caddf72c1cbe9e8e36b2edcbbbbff3 commit a7b4e2e9d0caddf72c1cbe9e8e36b2edcbbbbff3 Author: Dag-Erling Smørgrav AuthorDate: 2025-07-09 20:28:47 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-07-24 13:02:12 +0000 kyua: Try harder to delete directories. When recursing into a directory to delete it, start by chmod'ing it to 0700. This fixes an issue where kyua is able to run, but not debug, a test case that creates unwriteable directories, because when debugging it tries (and fails) to delete the directory after the test completes. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: igoro Differential Revision: https://reviews.freebsd.org/D51229 (cherry picked from commit 9bf14f2a475e221c48488984dc5a02a4608bb877) --- contrib/kyua/utils/fs/operations.cpp | 2 ++ contrib/kyua/utils/fs/operations_test.cpp | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/contrib/kyua/utils/fs/operations.cpp b/contrib/kyua/utils/fs/operations.cpp index 7a96d0b2058a..185d164b88d7 100644 --- a/contrib/kyua/utils/fs/operations.cpp +++ b/contrib/kyua/utils/fs/operations.cpp @@ -692,6 +692,7 @@ fs::rm_r(const fs::path& directory) { const fs::directory dir(directory); + ::chmod(directory.c_str(), 0700); for (fs::directory::const_iterator iter = dir.begin(); iter != dir.end(); ++iter) { if (iter->name == "." || iter->name == "..") @@ -701,6 +702,7 @@ fs::rm_r(const fs::path& directory) if (fs::is_directory(entry)) { LD(F("Descending into %s") % entry); + ::chmod(entry.c_str(), 0700); fs::rm_r(entry); } else { LD(F("Removing file %s") % entry); diff --git a/contrib/kyua/utils/fs/operations_test.cpp b/contrib/kyua/utils/fs/operations_test.cpp index f1349351166e..6f0fa52811c9 100644 --- a/contrib/kyua/utils/fs/operations_test.cpp +++ b/contrib/kyua/utils/fs/operations_test.cpp @@ -664,6 +664,19 @@ ATF_TEST_CASE_BODY(rm_r__files_and_directories) } +ATF_TEST_CASE_WITHOUT_HEAD(rm_r__bad_perms); +ATF_TEST_CASE_BODY(rm_r__bad_perms) +{ + fs::mkdir(fs::path("root"), 0755); + fs::mkdir(fs::path("root/dir"), 0755); + atf::utils::create_file("root/dir/file", ""); + ::chmod(fs::path("root/dir").c_str(), 0000); + ATF_REQUIRE(lookup(".", "root", S_IFDIR)); + fs::rm_r(fs::path("root")); + ATF_REQUIRE(!lookup(".", "root", S_IFDIR)); +} + + ATF_TEST_CASE_WITHOUT_HEAD(rmdir__ok) ATF_TEST_CASE_BODY(rmdir__ok) { @@ -811,6 +824,7 @@ ATF_INIT_TEST_CASES(tcs) ATF_ADD_TEST_CASE(tcs, rm_r__empty); ATF_ADD_TEST_CASE(tcs, rm_r__files_and_directories); + ATF_ADD_TEST_CASE(tcs, rm_r__bad_perms); ATF_ADD_TEST_CASE(tcs, rmdir__ok); ATF_ADD_TEST_CASE(tcs, rmdir__fail); From nobody Thu Jul 24 13:02:40 2025 X-Original-To: dev-commits-src-all@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 4bnrl46R3Wz62Tds; Thu, 24 Jul 2025 13:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnrl44Kkjz3T9K; Thu, 24 Jul 2025 13:02:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753362160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nwTodgoQ9QdfycpG4alokaVxgV7nDfrUfd3UV4+wgtw=; b=diMJJHvVP/915H1sEda7868Oz/WkxdbbCBc0Ko4YRhbE8aheOoR5i+5Xoqbi3kPnPQ1WHC 9Hn3UzLD8IuvyiirsXw0cmBZGU3XSItMpO74YPY7gvE9h5pXtisCPjgIMa4GAnlqKacFKm aQZJBYZ1osdPykFm+NyaW+jLmM9G0Qscyh/RPokvTB68XRqkCD1GjcjTyZO5Eymn76lmLG Vx2cft18I2c3xzdTExz25rbdZgY67Anh/lBll9ADVlRXOHqa1vGJeGixjdS5OyG8sVkUSP xoL3xNaA1IdakISdBhK3S0ZdpIev4uNylZOpoSAPM+mC/Km1Y37GERwkL5QC3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753362160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nwTodgoQ9QdfycpG4alokaVxgV7nDfrUfd3UV4+wgtw=; b=a/GDdrn1zluQsHogAUlymvlSRZKyuPmkHIYpxdeQ/D85OA7bn1fhaCTt3aehCA1VFZmFXF Yrbuur2ukDuLDlU2q6KsBjrk6sJi7UAGmlLyjy7SIJKBJqvt0yfEs11g/qYXPBz3ceYPRg W8wda0bxIXAK/ge03iNSRWa0UFqJbQy6fzIwyDk6OFf3zA4tlfM9/0uezAerYFvnEw2+Lq ExiNmAQz95CnMFXyRjc6IeQp+T7t32AjmLK5yksurmsyCWzvjYuEql6ebRUv+kuGfQt2S6 JG0DxYgtiJCTDzFQpr3FungdNMQeCI12J+xRWfaB0UiBNbyk6m7WaC8Nxl2B0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753362160; a=rsa-sha256; cv=none; b=RfVqQzh1/w3SJZ1sZDs/f+3jZWaXSjnohFSA3mu6F+/jsuJ995fO30YTj+Zyd4k+Isu3pb pRozFesFGTypyR1RGuyNvMtinSeETezJIu9Blrx4sKEIa1HWgkNXhvtgKZWv2rQ2qHKoA+ 2jo9+0cxLIbxYLlsTh/Cyu7aKOobbcSqGSE7x+CTGl7BckiETs+jZJDBihc30YAs9m9eXP UJi4D/B+MuKegnpJQfpzcpFJhyDHBno/X7eeHfOnHWQmOiDtHslgagzu2hxpP/zQ9UyKFU sd3ZK7RM+BDu12p7t6Ex6bL7+YgAUVijY9MgwobDVS/zkVGq49/lrhuifO728w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnrl43lFPz10Cd; Thu, 24 Jul 2025 13:02:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OD2eYZ001665; Thu, 24 Jul 2025 13:02:40 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OD2esR001662; Thu, 24 Jul 2025 13:02:40 GMT (envelope-from git) Date: Thu, 24 Jul 2025 13:02:40 GMT Message-Id: <202507241302.56OD2esR001662@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 4cafd1021a5b - stable/13 - udf: Improve input validation. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4cafd1021a5b6002812f4446794541eab8c08534 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4cafd1021a5b6002812f4446794541eab8c08534 commit 4cafd1021a5b6002812f4446794541eab8c08534 Author: Dag-Erling Smørgrav AuthorDate: 2025-07-16 19:33:24 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-07-24 13:02:12 +0000 udf: Improve input validation. The existing code frequently assigns unsigned 64-bit values to variables that are signed and / or shorter without checking for overflow. Try to deal with these cases. While here, fix two structs that used single-element arrays in place of flexible array members. PR: 287896 MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D51339 (cherry picked from commit 55f80afa17e8926f69660f19631194bcf7fa66f4) --- sys/fs/udf/ecma167-udf.h | 4 ++-- sys/fs/udf/udf_vfsops.c | 7 ++++++- sys/fs/udf/udf_vnops.c | 48 ++++++++++++++++++++++++++++++++++++------------ 3 files changed, 44 insertions(+), 15 deletions(-) diff --git a/sys/fs/udf/ecma167-udf.h b/sys/fs/udf/ecma167-udf.h index 839bbec08254..19e114763cac 100644 --- a/sys/fs/udf/ecma167-udf.h +++ b/sys/fs/udf/ecma167-udf.h @@ -243,7 +243,7 @@ struct part_map_spare { uint8_t n_st; /* Number of Sparing Tables */ uint8_t reserved1; uint32_t st_size; - uint32_t st_loc[1]; + uint32_t st_loc[]; } __packed; union udf_pmap { @@ -266,7 +266,7 @@ struct udf_sparing_table { uint16_t rt_l; /* Relocation Table len */ uint8_t reserved[2]; uint32_t seq_num; - struct spare_map_entry entries[1]; + struct spare_map_entry entries[]; } __packed; /* Partition Descriptor [3/10.5] */ diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c index 4c9208642dea..cebc136b418a 100644 --- a/sys/fs/udf/udf_vfsops.c +++ b/sys/fs/udf/udf_vfsops.c @@ -81,6 +81,7 @@ #include #include #include +#include #include #include #include @@ -739,7 +740,7 @@ udf_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) struct ifid *ifhp; struct vnode *nvp; struct udf_node *np; - off_t fsize; + uint64_t fsize; int error; ifhp = (struct ifid *)fhp; @@ -751,6 +752,10 @@ udf_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) np = VTON(nvp); fsize = le64toh(np->fentry->inf_len); + if (fsize > OFF_MAX) { + *vpp = NULLVP; + return (EIO); + } *vpp = nvp; vnode_create_vobject(*vpp, fsize, curthread); diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c index d85bb9970913..8051b1e24d22 100644 --- a/sys/fs/udf/udf_vnops.c +++ b/sys/fs/udf/udf_vnops.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -182,11 +183,14 @@ udf_access(struct vop_access_args *a) } static int -udf_open(struct vop_open_args *ap) { +udf_open(struct vop_open_args *ap) +{ struct udf_node *np = VTON(ap->a_vp); - off_t fsize; + uint64_t fsize; fsize = le64toh(np->fentry->inf_len); + if (fsize > OFF_MAX) + return (EIO); vnode_create_vobject(ap->a_vp, fsize, ap->a_td); return 0; } @@ -317,12 +321,13 @@ udf_getattr(struct vop_getattr_args *a) * that directories consume at least one logical block, * make it appear so. */ - if (fentry->logblks_rec != 0) { - vap->va_size = - le64toh(fentry->logblks_rec) * node->udfmp->bsize; - } else { + vap->va_size = le64toh(fentry->logblks_rec); + if (vap->va_size == 0) vap->va_size = node->udfmp->bsize; - } + else if (vap->va_size > UINT64_MAX / node->udfmp->bsize) + vap->va_size = UINT64_MAX; + else + vap->va_size *= node->udfmp->bsize; } else { vap->va_size = le64toh(fentry->inf_len); } @@ -449,6 +454,7 @@ udf_read(struct vop_read_args *ap) struct buf *bp; uint8_t *data; daddr_t lbn, rablock; + uint64_t len; off_t diff, fsize; ssize_t n; int error = 0; @@ -474,7 +480,12 @@ udf_read(struct vop_read_args *ap) return (error); } - fsize = le64toh(node->fentry->inf_len); + len = le64toh(node->fentry->inf_len); + if (len > OFF_MAX) { + /* too big, just cap to the requested length */ + len = uio->uio_resid; + } + fsize = len; udfmp = node->udfmp; do { lbn = lblkno(udfmp, uio->uio_offset); @@ -786,6 +797,7 @@ udf_readdir(struct vop_readdir_args *a) struct udf_uiodir uiodir; struct udf_dirstream *ds; u_long *cookies = NULL; + uint64_t len; int ncookies; int error = 0; @@ -815,8 +827,12 @@ udf_readdir(struct vop_readdir_args *a) * Iterate through the file id descriptors. Give the parent dir * entry special attention. */ - ds = udf_opendir(node, uio->uio_offset, le64toh(node->fentry->inf_len), - node->udfmp); + len = le64toh(node->fentry->inf_len); + if (len > INT_MAX) { + /* too big, just cap to INT_MAX */ + len = INT_MAX; + } + ds = udf_opendir(node, uio->uio_offset, len, node->udfmp); while ((fid = udf_getfid(ds)) != NULL) { /* XXX Should we return an error on a bad fid? */ @@ -908,7 +924,8 @@ udf_readlink(struct vop_readlink_args *ap) struct udf_node *node; void *buf; char *cp; - int error, len, root; + uint64_t len; + int error, root; /* * A symbolic link in UDF is a list of variable-length path @@ -918,6 +935,8 @@ udf_readlink(struct vop_readlink_args *ap) vp = ap->a_vp; node = VTON(vp); len = le64toh(node->fentry->inf_len); + if (len > MAXPATHLEN) + return (EIO); buf = malloc(len, M_DEVBUF, M_WAITOK); iov[0].iov_len = len; iov[0].iov_base = buf; @@ -1120,13 +1139,14 @@ udf_lookup(struct vop_cachedlookup_args *a) struct udf_mnt *udfmp; struct fileid_desc *fid = NULL; struct udf_dirstream *ds; + uint64_t fsize; u_long nameiop; u_long flags; char *nameptr; long namelen; ino_t id = 0; int offset, error = 0; - int fsize, lkflags, ltype, numdirpasses; + int lkflags, ltype, numdirpasses; dvp = a->a_dvp; node = VTON(dvp); @@ -1137,6 +1157,10 @@ udf_lookup(struct vop_cachedlookup_args *a) nameptr = a->a_cnp->cn_nameptr; namelen = a->a_cnp->cn_namelen; fsize = le64toh(node->fentry->inf_len); + if (fsize > INT_MAX) { + /* too big, just cap to INT_MAX */ + fsize = INT_MAX; + } /* * If this is a LOOKUP and we've already partially searched through From nobody Thu Jul 24 13:02:41 2025 X-Original-To: dev-commits-src-all@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 4bnrl60znJz62VHm; Thu, 24 Jul 2025 13:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnrl55Cj8z3TNg; Thu, 24 Jul 2025 13:02:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753362161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=USaEQd1XdCMF3W5Yx5nEG2GFFaTXuH8wG1KJUmm+GnA=; b=f2x295k7A+gRqbuYFAuv9pGi70Kn5N5fSQ0fb3liXAWzgu+DThLFQ0DY7VdfNBa+2bfAH8 El62NFjd0vt0EpW/vCvWb53dLbtvZpqY/3bPhI0l8zyNT30Z1oTioRnHB8bYcp7JN3aeGd jSL6sxwYfTNIlm1UC3J6AMTDnWOrXEC2yW3QFJXl4d4qxxpAE0UQ61TzFmH+HcKwZFDRUl nC4l9NiVAhzV4Yu/q/YUTHBc8C+dYIHgnlKTrjX5U5JFQ+YHOoNqIN/lZCXPCbNrIAlujP QhRpeS9COn0Ksuz2leh3uWDveG7aXBcK+8aCkYWf8uSfly3fKTgXk2awDvkiNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753362161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=USaEQd1XdCMF3W5Yx5nEG2GFFaTXuH8wG1KJUmm+GnA=; b=SZ+No8m3FM3Kqd+ggDqdLEQOe4UNaE83xcPlbGSrz2fBuBXEo46hmiB+Eq9PrgwT45CDaE 7m00oAdLNoeHyQ7K2IxJavZZmT20uXteT1h0dqJokuQdpjSFfYBQ2ZjlHsK873Ui6v2wZw 8ymrwS3JUys1s3kw2fdTFDVyxf2HXJldMk1wFPDCJ4ir4N2u26vj65KsApvd83ERE+DLoj 8oU54WWmfwgu8N1g5OvuzJGV46p/tsAOexq05nP3ASkMG859+EMtMJTwDj0704o1a+0sqj jQLdKRE4Rvm8rJ3I+FlZyCFLIdZ9TzqFc7yeaVSEiYGlYebwix86JHZrvgZy6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753362161; a=rsa-sha256; cv=none; b=vcx5n8M494buu6n82D40IUYnjbHmUc4lFd9QcUQViYVCvMGzyPnSyNrewpg8B/d2jBbR3C 2EjUJG1McXhDTNiqQBOIj+641wZLKbYhHxb7Xk7vZhi/pa/Ta+CVCMI16rpcqoQr3e5lXI jnVZLm9g04TjvV53ZPeoNNZtSMTCz4Bae+dPY4AhMsLTTwYRaoQaewhNDHig8iMOR9cecF aPOGUCdz3UGOm3puBbGsXZLfSXvwGg5XXywEBe9/a9YRZRAfusIR6ZRc9f3q7PlTz9IZPG uprJPVtPtRyRmT2mGfQ2ZhayXq/a0bSWs5IRbEBxglGdll0Z8zGjJRYLwnqAYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnrl54fsLz10VX; Thu, 24 Jul 2025 13:02:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OD2fc3001703; Thu, 24 Jul 2025 13:02:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OD2fQB001700; Thu, 24 Jul 2025 13:02:41 GMT (envelope-from git) Date: Thu, 24 Jul 2025 13:02:41 GMT Message-Id: <202507241302.56OD2fQB001700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: b86c6997047e - stable/13 - tzcode: Fix time zone change detection. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: b86c6997047e6caee085b05dcc864f7878db3b69 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b86c6997047e6caee085b05dcc864f7878db3b69 commit b86c6997047e6caee085b05dcc864f7878db3b69 Author: Dag-Erling Smørgrav AuthorDate: 2025-07-18 17:48:59 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-07-24 13:02:13 +0000 tzcode: Fix time zone change detection. Prior to the 2022g import, tzloadbody() returned -1 on error. Now it returns an errno code. When I updated the time zone change detection logic to match, I improperly returned errno in all cases, which means that if the time zone file has not changed since we last loaded it, tzloadbody() returns a random errno value instead of 0. Fixes: bc42155199b5 MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D51405 (cherry picked from commit d63ffdd1ef6368407b35d415237b95cc739d8073) tzcode: Add an explicit "the timezone file has changed" case This is required for the WITHOUT_DETECT_TZ_CHANGES case, since there the value being tested is a numeric literal. Fixes: d63ffdd1ef63 ("tzcode: Fix time zone change detection.") (cherry picked from commit 0bf113e9041fe20e8c671fe6b2cca8612dc77b77) --- contrib/tzcode/localtime.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/contrib/tzcode/localtime.c b/contrib/tzcode/localtime.c index f5814a43da54..bdec08e4abae 100644 --- a/contrib/tzcode/localtime.c +++ b/contrib/tzcode/localtime.c @@ -408,10 +408,8 @@ change_in_tz(const char *name) static char old_name[PATH_MAX]; static struct stat old_sb; struct stat sb; - int error; - error = stat(name, &sb); - if (error != 0) + if (stat(name, &sb) != 0) return -1; if (strcmp(name, old_name) != 0) { @@ -510,13 +508,13 @@ tzloadbody(char const *name, struct state *sp, bool doextend, * 'doextend' to ignore TZDEFRULES; the change_in_tz() * function can only keep state for a single file. */ - int ret = change_in_tz(name); - if (ret <= 0) { - /* - * Returns an errno value if there was an error, - * and 0 if the timezone had not changed. - */ + switch (change_in_tz(name)) { + case -1: return errno; + case 0: + return 0; + case 1: + break; } } fid = _open(name, O_RDONLY | O_BINARY); From nobody Thu Jul 24 13:02:58 2025 X-Original-To: dev-commits-src-all@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 4bnrlQ3tbRz62VNh; Thu, 24 Jul 2025 13:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnrlQ1Gc7z3Tbq; Thu, 24 Jul 2025 13:02:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753362178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zWyT+A01SubbrhqQnlNb4v6kJGcLpQO/cTcLj2cGdt8=; b=LZpDreaBlsnVh2S7kOTkVXlsUWr+KwpE4z9AKQIWd2nFq4L/NVCttaJ6HdUUT3SvxthuG4 3r4HOBSN6jbSdeEICxlPOB4PbTLunaiNsWkNhchz9XymvWwq4m4KUiP2oQu4IbPlrAlyAU 8eMTLZVkJVUR8RbelF48dTGcj+HbfvjDRRk4+hmmSe3zG0bS00hnf/KOGsDcK1PoL3kSB4 dQkfklfQn4DgRE1wfZNrp4TWGPa9S3Ciwkiwt4TpRcbV5pXgVC7HJpp5KKAitHiutrm0DN FHkNUZHIL+2hYsRQrO/x7F440BarOD+eJSLuYGJavcpHQHCnGTwhQLrWG6d+Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753362178; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zWyT+A01SubbrhqQnlNb4v6kJGcLpQO/cTcLj2cGdt8=; b=P8fI19sjxpGHx7ssQrRFukB/o1/ULmaydY6vnZUVBb6ALwYJxFBJbMky4lmFznDV66Ew4G YHC+nKt8cygUkAtd3vQZAwO5Dg9EXHbLLolRWlLtGC22soxz0snvk8Y7g/PAaP6ylphJ9q eBbfseXCMwxtiHSvv4ceelu1z+UKqwxJnk2MoQmJLhxiw+PW5yXDCZdeDH6dvLUzkLER7p Wm3PW884M62HKUIjDGHHP2H/6MT51GY7UxrQ8ovqvK5TxJfEzcpImU92xIUEtrvb86hffb FdRLb/C6WZ/bs/QmGHcZEnACH3qHii71lnEjsGbdYf7YGfMo1PsDjrDjzcw+mw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753362178; a=rsa-sha256; cv=none; b=D4sNWEtNCuCn4bGytFmMSdYmG+lNxJgE620PSF0tR+e6EvJtJCp72VGBVhlK1swY40qrEm eIeNV+Vse3J9GkIBuhlKoEpcjr6J/yqsiYLMWE6hLFjdI+G65+PiRWkfEwNPdKnd73vSYA iFweoh7Z5UYbsM3AVsb/wjX/0KXsbgSk3/buzK+XvSrLlZWzJNHY7zrARnPnsT+7KpIAlF GX8mV8C2MUSwKTSSx8bnnZVyEVTRDosbPvvsMP1QHEgWqCB/qfA5xFHi21Dl77msaWaLiJ aJn0svZL3CWAU+0GbNsq7FfoFa8n+m/0Q9f5YS6M+fSUd8/cj3Ey0reCH4/EAA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnrlQ0WTjz10Ns; Thu, 24 Jul 2025 13:02:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OD2wiI001969; Thu, 24 Jul 2025 13:02:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OD2wMA001966; Thu, 24 Jul 2025 13:02:58 GMT (envelope-from git) Date: Thu, 24 Jul 2025 13:02:58 GMT Message-Id: <202507241302.56OD2wMA001966@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 91a6bf215cb1 - stable/14 - kyua: Try harder to delete directories. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 91a6bf215cb13e40b80e54ad5194c9aaf777cc3c Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=91a6bf215cb13e40b80e54ad5194c9aaf777cc3c commit 91a6bf215cb13e40b80e54ad5194c9aaf777cc3c Author: Dag-Erling Smørgrav AuthorDate: 2025-07-09 20:28:47 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-07-24 13:02:45 +0000 kyua: Try harder to delete directories. When recursing into a directory to delete it, start by chmod'ing it to 0700. This fixes an issue where kyua is able to run, but not debug, a test case that creates unwriteable directories, because when debugging it tries (and fails) to delete the directory after the test completes. MFC after: 1 week Sponsored by: Klara, Inc. Reviewed by: igoro Differential Revision: https://reviews.freebsd.org/D51229 (cherry picked from commit 9bf14f2a475e221c48488984dc5a02a4608bb877) --- contrib/kyua/utils/fs/operations.cpp | 2 ++ contrib/kyua/utils/fs/operations_test.cpp | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/contrib/kyua/utils/fs/operations.cpp b/contrib/kyua/utils/fs/operations.cpp index 7a96d0b2058a..185d164b88d7 100644 --- a/contrib/kyua/utils/fs/operations.cpp +++ b/contrib/kyua/utils/fs/operations.cpp @@ -692,6 +692,7 @@ fs::rm_r(const fs::path& directory) { const fs::directory dir(directory); + ::chmod(directory.c_str(), 0700); for (fs::directory::const_iterator iter = dir.begin(); iter != dir.end(); ++iter) { if (iter->name == "." || iter->name == "..") @@ -701,6 +702,7 @@ fs::rm_r(const fs::path& directory) if (fs::is_directory(entry)) { LD(F("Descending into %s") % entry); + ::chmod(entry.c_str(), 0700); fs::rm_r(entry); } else { LD(F("Removing file %s") % entry); diff --git a/contrib/kyua/utils/fs/operations_test.cpp b/contrib/kyua/utils/fs/operations_test.cpp index f1349351166e..6f0fa52811c9 100644 --- a/contrib/kyua/utils/fs/operations_test.cpp +++ b/contrib/kyua/utils/fs/operations_test.cpp @@ -664,6 +664,19 @@ ATF_TEST_CASE_BODY(rm_r__files_and_directories) } +ATF_TEST_CASE_WITHOUT_HEAD(rm_r__bad_perms); +ATF_TEST_CASE_BODY(rm_r__bad_perms) +{ + fs::mkdir(fs::path("root"), 0755); + fs::mkdir(fs::path("root/dir"), 0755); + atf::utils::create_file("root/dir/file", ""); + ::chmod(fs::path("root/dir").c_str(), 0000); + ATF_REQUIRE(lookup(".", "root", S_IFDIR)); + fs::rm_r(fs::path("root")); + ATF_REQUIRE(!lookup(".", "root", S_IFDIR)); +} + + ATF_TEST_CASE_WITHOUT_HEAD(rmdir__ok) ATF_TEST_CASE_BODY(rmdir__ok) { @@ -811,6 +824,7 @@ ATF_INIT_TEST_CASES(tcs) ATF_ADD_TEST_CASE(tcs, rm_r__empty); ATF_ADD_TEST_CASE(tcs, rm_r__files_and_directories); + ATF_ADD_TEST_CASE(tcs, rm_r__bad_perms); ATF_ADD_TEST_CASE(tcs, rmdir__ok); ATF_ADD_TEST_CASE(tcs, rmdir__fail); From nobody Thu Jul 24 13:02:59 2025 X-Original-To: dev-commits-src-all@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 4bnrlR6HXbz62VHr; Thu, 24 Jul 2025 13:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnrlR1rDrz3TnQ; Thu, 24 Jul 2025 13:02:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753362179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=thgJoZHqlN4EQ/+fAw57AUntWOhHjg2NbHZeTWNAiKA=; b=yJDQxJ3oFRjQTCS5IpCt16f1nweN1Bc6uSJH4F850gmfkMuogzuhsEB1oC9MtuaDCuUnD+ vq+hTUv+AM87Xdb/Fpw9BXVtsSUgg5Waia/OfBnhIyIyVGTx0doWicKEjxhJGuwakuos1d VbtnWVfg99KdO2gI34WLlgv5pRipdFaPCTz2AQ1K7k8E/3tUNwjwPNbaJilV7f3M5j2JJK 9zogmJXcbFDK+dnvAzyAsB2xx31fs7BG4tZ9acWvJ1aFcGuxAlOmU39+UR2yuN0vm8EuZN 0V+omMirTV1ZpXJMLIPgCwd6UXslLNabVIEZpMXLCgoOh4QRWyxx9DMJFkfMTg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753362179; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=thgJoZHqlN4EQ/+fAw57AUntWOhHjg2NbHZeTWNAiKA=; b=fbNo35Uw46ApBGsgvXW2JFgTIWxtXNyr4/jBQ3W5Y+f/zJd5cg5Uj/4tza7Ov8Y4Bm7CjV it8UBQP2UJBc7grH7GjJpVZtB0+DkbiSpDY38exALbDq0GOThi1z3dJtxxH1V9G3F6zFBO tLCRTIDTk/14ZapgS1k+WJPOR0cJDNvhGg3v4Bhxph32DM8XxLuji/dGfiiQDHpvlUUHk9 HSDsVIfSsDwW2IML6ygV4kYNTQEjG9mJZKSQxpCT9Vp6s7QSMB+D0ymoOATQfYkAIQE3jH ZdUzi6A9IISzZnHENUdDHcquHaqqdLY4vljegXE0Zo5fsZrol2Bhb/EcZrpHYw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753362179; a=rsa-sha256; cv=none; b=XrQXd/xa9DP9VIIpMjVh6XUrcL19phuLUdl43eY1Z/4D2lmgZPbLCAII/4vn/Q9FsIgCu4 DF5Z9bdn2qSnTs/zS6yH8tzOJQObzMEBnA4tkRu+FuIV+UndmKd/K3LVAQZflDOiUWRQEK +Buh1JIU1cbMbE05hzmkqhGxC4VJxzjg7dib/CuyTTI89zgDzdmoyytaliGr8bN/EbbSRf oMvDayzvoT/xsRUR+A3wY4keaCExUy2EX82/6p86K+gsbUaC60pUPA1QAFDw507MtDTlly cy2mpyamC+SkOE1bpKyERoF8Vdeqg2Waa8W8iNEIFFwRND2fLTijJtceH933zQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnrlR1PLjz10Vb; Thu, 24 Jul 2025 13:02:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OD2x1a002009; Thu, 24 Jul 2025 13:02:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OD2xTa002005; Thu, 24 Jul 2025 13:02:59 GMT (envelope-from git) Date: Thu, 24 Jul 2025 13:02:59 GMT Message-Id: <202507241302.56OD2xTa002005@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 99dfaac790a3 - stable/14 - udf: Improve input validation. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 99dfaac790a3f252d38d1fbe4b3ec2e19f23127f Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=99dfaac790a3f252d38d1fbe4b3ec2e19f23127f commit 99dfaac790a3f252d38d1fbe4b3ec2e19f23127f Author: Dag-Erling Smørgrav AuthorDate: 2025-07-16 19:33:24 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-07-24 13:02:45 +0000 udf: Improve input validation. The existing code frequently assigns unsigned 64-bit values to variables that are signed and / or shorter without checking for overflow. Try to deal with these cases. While here, fix two structs that used single-element arrays in place of flexible array members. PR: 287896 MFC after: 1 week Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D51339 (cherry picked from commit 55f80afa17e8926f69660f19631194bcf7fa66f4) --- sys/fs/udf/ecma167-udf.h | 4 ++-- sys/fs/udf/udf_vfsops.c | 7 ++++++- sys/fs/udf/udf_vnops.c | 48 ++++++++++++++++++++++++++++++++++++------------ 3 files changed, 44 insertions(+), 15 deletions(-) diff --git a/sys/fs/udf/ecma167-udf.h b/sys/fs/udf/ecma167-udf.h index 839bbec08254..19e114763cac 100644 --- a/sys/fs/udf/ecma167-udf.h +++ b/sys/fs/udf/ecma167-udf.h @@ -243,7 +243,7 @@ struct part_map_spare { uint8_t n_st; /* Number of Sparing Tables */ uint8_t reserved1; uint32_t st_size; - uint32_t st_loc[1]; + uint32_t st_loc[]; } __packed; union udf_pmap { @@ -266,7 +266,7 @@ struct udf_sparing_table { uint16_t rt_l; /* Relocation Table len */ uint8_t reserved[2]; uint32_t seq_num; - struct spare_map_entry entries[1]; + struct spare_map_entry entries[]; } __packed; /* Partition Descriptor [3/10.5] */ diff --git a/sys/fs/udf/udf_vfsops.c b/sys/fs/udf/udf_vfsops.c index c7438147c0a0..c5ef1f686093 100644 --- a/sys/fs/udf/udf_vfsops.c +++ b/sys/fs/udf/udf_vfsops.c @@ -81,6 +81,7 @@ #include #include #include +#include #include #include #include @@ -729,7 +730,7 @@ udf_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) struct ifid *ifhp; struct vnode *nvp; struct udf_node *np; - off_t fsize; + uint64_t fsize; int error; ifhp = (struct ifid *)fhp; @@ -741,6 +742,10 @@ udf_fhtovp(struct mount *mp, struct fid *fhp, int flags, struct vnode **vpp) np = VTON(nvp); fsize = le64toh(np->fentry->inf_len); + if (fsize > OFF_MAX) { + *vpp = NULLVP; + return (EIO); + } *vpp = nvp; vnode_create_vobject(*vpp, fsize, curthread); diff --git a/sys/fs/udf/udf_vnops.c b/sys/fs/udf/udf_vnops.c index 88bf4917a851..37889241e8c3 100644 --- a/sys/fs/udf/udf_vnops.c +++ b/sys/fs/udf/udf_vnops.c @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include @@ -182,11 +183,14 @@ udf_access(struct vop_access_args *a) } static int -udf_open(struct vop_open_args *ap) { +udf_open(struct vop_open_args *ap) +{ struct udf_node *np = VTON(ap->a_vp); - off_t fsize; + uint64_t fsize; fsize = le64toh(np->fentry->inf_len); + if (fsize > OFF_MAX) + return (EIO); vnode_create_vobject(ap->a_vp, fsize, ap->a_td); return 0; } @@ -314,12 +318,13 @@ udf_getattr(struct vop_getattr_args *a) * that directories consume at least one logical block, * make it appear so. */ - if (fentry->logblks_rec != 0) { - vap->va_size = - le64toh(fentry->logblks_rec) * node->udfmp->bsize; - } else { + vap->va_size = le64toh(fentry->logblks_rec); + if (vap->va_size == 0) vap->va_size = node->udfmp->bsize; - } + else if (vap->va_size > UINT64_MAX / node->udfmp->bsize) + vap->va_size = UINT64_MAX; + else + vap->va_size *= node->udfmp->bsize; } else { vap->va_size = le64toh(fentry->inf_len); } @@ -446,6 +451,7 @@ udf_read(struct vop_read_args *ap) struct buf *bp; uint8_t *data; daddr_t lbn, rablock; + uint64_t len; off_t diff, fsize; ssize_t n; int error = 0; @@ -471,7 +477,12 @@ udf_read(struct vop_read_args *ap) return (error); } - fsize = le64toh(node->fentry->inf_len); + len = le64toh(node->fentry->inf_len); + if (len > OFF_MAX) { + /* too big, just cap to the requested length */ + len = uio->uio_resid; + } + fsize = len; udfmp = node->udfmp; do { lbn = lblkno(udfmp, uio->uio_offset); @@ -783,6 +794,7 @@ udf_readdir(struct vop_readdir_args *a) struct udf_uiodir uiodir; struct udf_dirstream *ds; uint64_t *cookies = NULL; + uint64_t len; int ncookies; int error = 0; @@ -811,8 +823,12 @@ udf_readdir(struct vop_readdir_args *a) * Iterate through the file id descriptors. Give the parent dir * entry special attention. */ - ds = udf_opendir(node, uio->uio_offset, le64toh(node->fentry->inf_len), - node->udfmp); + len = le64toh(node->fentry->inf_len); + if (len > INT_MAX) { + /* too big, just cap to INT_MAX */ + len = INT_MAX; + } + ds = udf_opendir(node, uio->uio_offset, len, node->udfmp); while ((fid = udf_getfid(ds)) != NULL) { /* XXX Should we return an error on a bad fid? */ @@ -904,7 +920,8 @@ udf_readlink(struct vop_readlink_args *ap) struct udf_node *node; void *buf; char *cp; - int error, len, root; + uint64_t len; + int error, root; /* * A symbolic link in UDF is a list of variable-length path @@ -914,6 +931,8 @@ udf_readlink(struct vop_readlink_args *ap) vp = ap->a_vp; node = VTON(vp); len = le64toh(node->fentry->inf_len); + if (len > MAXPATHLEN) + return (EIO); buf = malloc(len, M_DEVBUF, M_WAITOK); iov[0].iov_len = len; iov[0].iov_base = buf; @@ -1116,13 +1135,14 @@ udf_lookup(struct vop_cachedlookup_args *a) struct udf_mnt *udfmp; struct fileid_desc *fid = NULL; struct udf_dirstream *ds; + uint64_t fsize; u_long nameiop; u_long flags; char *nameptr; long namelen; ino_t id = 0; int offset, error = 0; - int fsize, lkflags, ltype, numdirpasses; + int lkflags, ltype, numdirpasses; dvp = a->a_dvp; node = VTON(dvp); @@ -1133,6 +1153,10 @@ udf_lookup(struct vop_cachedlookup_args *a) nameptr = a->a_cnp->cn_nameptr; namelen = a->a_cnp->cn_namelen; fsize = le64toh(node->fentry->inf_len); + if (fsize > INT_MAX) { + /* too big, just cap to INT_MAX */ + fsize = INT_MAX; + } /* * If this is a LOOKUP and we've already partially searched through From nobody Thu Jul 24 13:03:01 2025 X-Original-To: dev-commits-src-all@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 4bnrlT5mwhz62VHs; Thu, 24 Jul 2025 13:03: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnrlT3t0rz3TtC; Thu, 24 Jul 2025 13:03:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753362181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cg7y99x7isL3D2HZ6LDulP22lRO9ZAtDUfdtkMiAQFM=; b=ADx0rGFaUY37l7s3nkN4F832R40AoYXthuU/bJ0o8Yn4Rwit4Idf+BlAc7pNmfSLFLoXoy qcryuN0fqDdX/GgXPo/FOPmY3cqLwnwmoip8dd/DqPejhc30pG6RJ0E0KoLWnW14eeCiDI oHntG63umO8WkqldgMEtIaY/dF6CjNT5ggC/1WXvboiRrfJkpTxwi5vUbTyoBL6gSxG7lZ 5F6af8YmDl7QIKBjg3XFoPnQKYYSo9thLRjGPBV9gvnNqP1a4D92+zqvTIul7sjoG7et3N OTu/xiinuWWzod9nmaaTdKZATYCpmxlX3XyWqDuvipvOnuMusRVHHFc4V1/8gA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753362181; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Cg7y99x7isL3D2HZ6LDulP22lRO9ZAtDUfdtkMiAQFM=; b=TKVVNY97tXgv5B0kQYUz1NZ0+MBXVaCKJt1OItSZWjqKkE2dAynK81Rvxjjr+NEfA5TOIi 3WyDpoNZRW72I+NZ8fJlYVf5uyEet4W8C+Lnkhnn2lbxe9SEO58WSKmfO1f0v30CS4gz24 WPTg1mnk0ngASbxBW76fhNRkPlBXEWj9rV97BHl7Oa7tOaAgmkp2F+IXYBb7A7/1Be8C26 GJhS+kXFttX3d+zl2pU1WzemZMNFNlOifKyqN5C1lH9f1duswkBnEEtk1U3I/lsm3Qvrb6 JGgLPQAEiumv/5gm6+/wHz1dDVDRwOYX24iWKqQihsoR44hpuOcr0P8o1lO2Gw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753362181; a=rsa-sha256; cv=none; b=sEvphE2w/6g1shSGdLEeFAZEMK7/r2FYKLprU1trU73hiZANU/fTeyYiPaQjBNr9KW3ogk NccP5g4i4JqBff6Tt4yYY+FdSoAzbJ/QKMux/XDlryEo6I6rlr02SupYUlCsjmJGqGjrlA iaetQPadQloNYafufPdZPF1Q9QtMqG/HlBXNjNRySO0ecQCYowM3QSc4+Sm3fo9s07rlXP LLJ93XuQe0cXLMPJ6F5Dm8viVTNMh0l+Ri7QRgPbrdUAAWEyEdT8vQVqMBo+EbgNwxz6Uu VudXRGd2bXI1HVO2dQsBa6Ohtodpd/gh5DZ0vIYpMLtX9ZZyNOWgc13RI03evA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnrlT3LJwz10Cf; Thu, 24 Jul 2025 13:03:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OD31C1002092; Thu, 24 Jul 2025 13:03:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OD3110002089; Thu, 24 Jul 2025 13:03:01 GMT (envelope-from git) Date: Thu, 24 Jul 2025 13:03:01 GMT Message-Id: <202507241303.56OD3110002089@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 986c43bd80e7 - stable/14 - certctl: Add an option to copy files. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 986c43bd80e750937d02966883b3182ded828c97 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=986c43bd80e750937d02966883b3182ded828c97 commit 986c43bd80e750937d02966883b3182ded828c97 Author: Dag-Erling Smørgrav AuthorDate: 2025-07-17 18:10:56 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-07-24 13:02:45 +0000 certctl: Add an option to copy files. This is slower than linking but is the only method that works for all cases, including running certctl from outside a jail that does not contain the raw certificate data. While here, fix a bug that occurs in unprivileged mode if DESTDIR is unset or the root directory. MFC after: 1 week Reviewed by: dfr Differential Revision: https://reviews.freebsd.org/D51373 (cherry picked from commit 92b9f43c788da24d2d8376a50953ef67c2303ba7) --- usr.sbin/certctl/certctl.8 | 10 ++++++---- usr.sbin/certctl/certctl.sh | 22 +++++++++++----------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/usr.sbin/certctl/certctl.8 b/usr.sbin/certctl/certctl.8 index 4ce61916d79a..569bd0f85d55 100644 --- a/usr.sbin/certctl/certctl.8 +++ b/usr.sbin/certctl/certctl.8 @@ -24,7 +24,7 @@ .\" IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd July 13, 2022 +.Dd July 17, 2025 .Dt CERTCTL 8 .Os .Sh NAME @@ -38,15 +38,15 @@ .Op Fl v .Ic untrusted .Nm -.Op Fl nUv +.Op Fl cnUv .Op Fl D Ar destdir .Op Fl M Ar metalog .Ic rehash .Nm -.Op Fl nv +.Op Fl cnv .Ic untrust Ar file .Nm -.Op Fl nv +.Op Fl cnv .Ic trust Ar file .Sh DESCRIPTION The @@ -56,6 +56,8 @@ applications that use OpenSSL. .Pp Flags: .Bl -tag -width 4n +.It Fl c +Copy certificates instead of linking to them. .It Fl D Ar destdir Specify the DESTDIR (overriding values from the environment). .It Fl d Ar distbase diff --git a/usr.sbin/certctl/certctl.sh b/usr.sbin/certctl/certctl.sh index 458f5c53682f..2bde651de126 100755 --- a/usr.sbin/certctl/certctl.sh +++ b/usr.sbin/certctl/certctl.sh @@ -36,6 +36,7 @@ set -u ############################################################ GLOBALS SCRIPTNAME="${0##*/}" +LINK=-lrs ERRORS=0 NOOP=false UNPRIV=false @@ -110,7 +111,6 @@ create_trusted() { local hash certhash otherfile otherhash local suffix - local link=${2:+-lrs} hash=$(do_hash "$1") || return certhash=$(openssl x509 -sha1 -in "$1" -noout -fingerprint) @@ -130,7 +130,7 @@ create_trusted() done suffix=$(get_decimal "$CERTDESTDIR" "$hash") verbose "Adding $hash.$suffix to trust store" - perform install ${INSTALLFLAGS} -m 0444 ${link} \ + perform install ${INSTALLFLAGS} -m 0444 ${LINK} \ "$(realpath "$1")" "$CERTDESTDIR/$hash.$suffix" } @@ -159,7 +159,6 @@ resolve_certname() create_untrusted() { local srcfile filename - local link=${2:+-lrs} set -- $(resolve_certname "$1") srcfile=$1 @@ -170,7 +169,7 @@ create_untrusted() fi verbose "Adding $filename to untrusted list" - perform install ${INSTALLFLAGS} -m 0444 ${link} \ + perform install ${INSTALLFLAGS} -m 0444 ${LINK} \ "$srcfile" "$UNTRUSTDESTDIR/$filename" } @@ -190,7 +189,7 @@ do_scan() 0) ;; 1) - "$CFUNC" "$CFILE" link + "$CFUNC" "$CFILE" ;; *) verbose "Multiple certificates found, splitting..." @@ -303,19 +302,20 @@ usage() echo " List trusted certificates" echo " $SCRIPTNAME [-v] untrusted" echo " List untrusted certificates" - echo " $SCRIPTNAME [-nUv] [-D ] [-d ] [-M ] rehash" - echo " Generate hash links for all certificates" - echo " $SCRIPTNAME [-nv] untrust " + echo " $SCRIPTNAME [-cnUv] [-D ] [-d ] [-M ] rehash" + echo " Rehash all trusted and untrusted certificates" + echo " $SCRIPTNAME [-cnv] untrust " echo " Add to the list of untrusted certificates" - echo " $SCRIPTNAME [-nv] trust " + echo " $SCRIPTNAME [-cnv] trust " echo " Remove from the list of untrusted certificates" exit 64 } ############################################################ MAIN -while getopts D:d:M:nUv flag; do +while getopts cD:d:M:nUv flag; do case "$flag" in + c) LINK=-c ;; D) DESTDIR=${OPTARG} ;; d) DISTBASE=${OPTARG} ;; M) METALOG=${OPTARG} ;; @@ -334,7 +334,7 @@ fi : ${METALOG:=${DESTDIR}/METALOG} INSTALLFLAGS= if "$UNPRIV" ; then - INSTALLFLAGS="-U -M ${METALOG} -D ${DESTDIR} -o root -g wheel" + INSTALLFLAGS="-U -M ${METALOG} -D ${DESTDIR:-/} -o root -g wheel" fi : ${LOCALBASE:=$(sysctl -n user.localbase)} : ${TRUSTPATH:=${DESTDIR}${DISTBASE}/usr/share/certs/trusted:${DESTDIR}${LOCALBASE}/share/certs:${DESTDIR}${LOCALBASE}/etc/ssl/certs} From nobody Thu Jul 24 13:03:00 2025 X-Original-To: dev-commits-src-all@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 4bnrlS57SQz62VLL; Thu, 24 Jul 2025 13:03: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnrlS2rCSz3TrN; Thu, 24 Jul 2025 13:03:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753362180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tKONXw9Y8a/KbMhAqiqo9W4Ep+CZ69Eime6NxkVilVY=; b=eFbC6+KIOKCM34XcpRQ5s7DjsCp73mgcXb6lMLUUxDogSdD7mqOURejAS5I5yxcqxYGkIs 8j9f8HRVHQzGXdTb3LuqVkf/KbyqFB4R1ww7bU3/hQzsXtHOIsShGeY/QMynczucmKb2b4 F7ipGjAAdTzn+aXx/gsQ69LzsbLR/X1pKyGPmNYQSIy69hvyTniv67cTcYhnTZ0DrclMnT 6hBxQDdKG6Q5xbUWlth8nTP5CVP0D5C68R9cLVZGtIeIL8Dz2X23hi9jQLhl7B3xlcq0qo BsLPdIE46Jw0/IKYRouJzmj2hx1iRtQX0yD31IXf2trsHp64PpewA2mKXKltHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753362180; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tKONXw9Y8a/KbMhAqiqo9W4Ep+CZ69Eime6NxkVilVY=; b=TQ2jbUGPCnyIdrGMXC1MB10m4/JWU1v5MP/3ETn7vOknhT/sH8B+oK3n8+7sO9yfPrzxZh UuBpExcr1py60uo+xu5bmP+Bfbqu9FG6sALEImAsFN4caIP2gmVd+mcD7oBtwhcHFHj3u8 Pn82jkrEOsHwnibUFDppLY80pVQS/nLXtemKAkYACr5gwuIJ0QMwhBvGdUwEq/ciZQDc6X gAhrMO1gK8B9yukwWuITvKnX9uKu6NIJF4B/zBsh3e2JGqylbcvQKOegfvVJLtt3SvPHY3 +U0Bp2fU2kCU7/ncUKVyTMSEIwYE9Fy7DKqQ6pg6Vyg9FlNK0JRm2L/N6NftpA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753362180; a=rsa-sha256; cv=none; b=BuxwXTA7ma7tqKKA5dHB/6FAO6JGdlrjh/wZYC46EpsCDm4n17jrJM9DC1kl8Jh6ObOdvv KF5ApMFewt3KcK6q1pdpcyqejFKbD6VkF8dKIXvo12OlY+l9Bsxvi5ODCWdoTvJITZBl3y dzYve4yIqXadR1bgtdAng26GygfGL4bDabqEKmVL2WFulXto/Ae1AWAeJrSBiTulT5FfXm skTE43liSct6WfU9l/N+tsVbIda5Tmb5/dAAP/wbTN25iYAgJl4MC1aY7ndpk9cCRKXO6K fRUHJ5aeKHBnHK/MaNZEuUNr7eVsNGK/6rZpAJx4rhi8FRM2dsMiZwKrT4KgzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnrlS2NQZz10cG; Thu, 24 Jul 2025 13:03:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OD30kB002052; Thu, 24 Jul 2025 13:03:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OD30sv002049; Thu, 24 Jul 2025 13:03:00 GMT (envelope-from git) Date: Thu, 24 Jul 2025 13:03:00 GMT Message-Id: <202507241303.56OD30sv002049@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 6a21ccee94ee - stable/14 - tzcode: Fix time zone change detection. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 6a21ccee94eefc22692b9aa267a27f4776f775f9 Auto-Submitted: auto-generated The branch stable/14 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=6a21ccee94eefc22692b9aa267a27f4776f775f9 commit 6a21ccee94eefc22692b9aa267a27f4776f775f9 Author: Dag-Erling Smørgrav AuthorDate: 2025-07-18 17:48:59 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-07-24 13:02:45 +0000 tzcode: Fix time zone change detection. Prior to the 2022g import, tzloadbody() returned -1 on error. Now it returns an errno code. When I updated the time zone change detection logic to match, I improperly returned errno in all cases, which means that if the time zone file has not changed since we last loaded it, tzloadbody() returns a random errno value instead of 0. Fixes: bc42155199b5 MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D51405 (cherry picked from commit d63ffdd1ef6368407b35d415237b95cc739d8073) tzcode: Add an explicit "the timezone file has changed" case This is required for the WITHOUT_DETECT_TZ_CHANGES case, since there the value being tested is a numeric literal. Fixes: d63ffdd1ef63 ("tzcode: Fix time zone change detection.") (cherry picked from commit 0bf113e9041fe20e8c671fe6b2cca8612dc77b77) --- contrib/tzcode/localtime.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/contrib/tzcode/localtime.c b/contrib/tzcode/localtime.c index f5814a43da54..bdec08e4abae 100644 --- a/contrib/tzcode/localtime.c +++ b/contrib/tzcode/localtime.c @@ -408,10 +408,8 @@ change_in_tz(const char *name) static char old_name[PATH_MAX]; static struct stat old_sb; struct stat sb; - int error; - error = stat(name, &sb); - if (error != 0) + if (stat(name, &sb) != 0) return -1; if (strcmp(name, old_name) != 0) { @@ -510,13 +508,13 @@ tzloadbody(char const *name, struct state *sp, bool doextend, * 'doextend' to ignore TZDEFRULES; the change_in_tz() * function can only keep state for a single file. */ - int ret = change_in_tz(name); - if (ret <= 0) { - /* - * Returns an errno value if there was an error, - * and 0 if the timezone had not changed. - */ + switch (change_in_tz(name)) { + case -1: return errno; + case 0: + return 0; + case 1: + break; } } fid = _open(name, O_RDONLY | O_BINARY); From nobody Thu Jul 24 14:01:36 2025 X-Original-To: dev-commits-src-all@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 4bnt352X4yz62nR7; Thu, 24 Jul 2025 14:01: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnt3517Fxz43TV; Thu, 24 Jul 2025 14:01:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753365697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y17jNHB9XXXRq2PSECpCmRyMixDf1Y+VmnTCGudQ6dA=; b=CZq6x68Ab0lo5/LQCtrSean3O1MMjTiT/Wi+zb1ZNgVLiiE0u1q6/LsPpJQVr+hE1dgo7S p8kTZcbId+uq2Ymb89hmN9L/5EBJpHKaZzIZF7rTSWUIHI/TKjq+ULK98SIk1bw2pm8vPu Ly5+qro8TOnKR+U0s2VZ/Fzli7hwM7pc5ir01U+B02nbDuWPEYrEzsBRnymDUaxSrZNeIY WYpz0579wTs6MG1xxgiDeDvnTHewny08SbRQurf2dMMGr8MD4t3M+VU8tXQ9fPEsuTcJhK 59AdFTRrvlNbUM3iFCiBA+5XxGkH911woaayA34mD2B69Q+OTCAFGfP0Y5AxmA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753365697; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=y17jNHB9XXXRq2PSECpCmRyMixDf1Y+VmnTCGudQ6dA=; b=YnoAtqNT6aIxGq6rReZQToBrN46zFU+FtC4L6h3q+Ze6Lu3EhfsgjkhcU1YYnIhPiA/dkO 1Nqr8qvznOg7D1/ALw1ZboSsXLBprSJr+3M4gbljvAG2ELNtWpkHVsbNOdHK+To5yqlV+k jZ8wVDgIABhco8rOSF6wOc75QMJj+7kSxi8iXK7yK67YejQFQY7c2fRELETLg7n5nCyOOO sYMBgD3OORcqxnRaqMuHguR5swCxsaLEuGaC0NPxdKxJj3+c9sSTFUg9ZFItbRvNXQDUE/ FwDRQ7D7xk9CSQ5Y7p+ZYBHbTTwu58vZ3VPL99sZHpyYb4i1Q8hicw/uLyaoOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753365697; a=rsa-sha256; cv=none; b=B0xFsErt9s53dmc2iKA08jKKpPPbDoD1VqZUdWYFmXEB0ZIc/RnZfuhxjLNmq+9Gms+IPg LNeJTyUa0e1H1fg9nAbeWyLUopRSbP3rM34Lz+C90h4UfXKnZVWEapsh1S4lQLYNCvA6Tg F0g6irROhV/kHQx/BnPQXkc02rDbN/1iu8AM+q6py66BWMFIB7lmf+cOrv9mV/2H0ueRPY PbjLk4+OqqcxK9tXFfvPXQXdvKQsR+tgLxF28awK4Ui9OwMMJvZ6T4nasP8egnQ5KGdUQN iLuf7OJBP2mulsrd3Sszh6uXzkRt8j4O6JHPcNYrXjVCBubatuJ4ISj9wPHnXA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnt350jktz11fl; Thu, 24 Jul 2025 14:01:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OE1but012331; Thu, 24 Jul 2025 14:01:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OE1asX012325; Thu, 24 Jul 2025 14:01:36 GMT (envelope-from git) Date: Thu, 24 Jul 2025 14:01:36 GMT Message-Id: <202507241401.56OE1asX012325@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: cd0756cef210 - main - libc: Disable debugging code in the resolver. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd0756cef21079104967969e275c18b84dc45053 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=cd0756cef21079104967969e275c18b84dc45053 commit cd0756cef21079104967969e275c18b84dc45053 Author: Dag-Erling Smørgrav AuthorDate: 2025-07-24 14:01:00 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-07-24 14:01:00 +0000 libc: Disable debugging code in the resolver. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D37319 --- lib/libc/net/gethostbydns.c | 6 ++++++ lib/libc/net/res_config.h | 4 ++-- lib/libc/resolv/res_debug.h | 2 +- lib/libc/resolv/res_init.c | 6 ------ lib/libc/resolv/res_mkquery.c | 5 ----- lib/libc/resolv/res_mkupdate.c | 4 ---- lib/libc/resolv/res_query.c | 5 ----- lib/libc/resolv/res_send.c | 18 ++++++++++-------- 8 files changed, 19 insertions(+), 31 deletions(-) diff --git a/lib/libc/net/gethostbydns.c b/lib/libc/net/gethostbydns.c index b29fa1cdd845..216fc9bcf9a4 100644 --- a/lib/libc/net/gethostbydns.c +++ b/lib/libc/net/gethostbydns.c @@ -74,8 +74,10 @@ #define SPRINTF(x) ((size_t)sprintf x) +#ifdef DEBUG static const char AskedForGot[] = "gethostby*.gethostanswer: asked for \"%s\", got \"%s\""; +#endif #ifdef RESOLVSORT static void addrsort(char **, int, res_state); @@ -299,8 +301,10 @@ gethostanswer(const querybuf *answer, int anslen, const char *qname, int qtype, switch (type) { case T_PTR: if (strcasecmp(tname, bp) != 0) { +#ifdef DEBUG syslog(LOG_NOTICE|LOG_AUTH, AskedForGot, qname, bp); +#endif cp += n; continue; /* XXX - had_error++ ? */ } @@ -347,8 +351,10 @@ gethostanswer(const querybuf *answer, int anslen, const char *qname, int qtype, case T_A: case T_AAAA: if (strcasecmp(he->h_name, bp) != 0) { +#ifdef DEBUG syslog(LOG_NOTICE|LOG_AUTH, AskedForGot, he->h_name, bp); +#endif cp += n; continue; /* XXX - had_error++ ? */ } diff --git a/lib/libc/net/res_config.h b/lib/libc/net/res_config.h index f049d6817b7a..39a1b5f1486f 100644 --- a/lib/libc/net/res_config.h +++ b/lib/libc/net/res_config.h @@ -1,5 +1,5 @@ -#define DEBUG 1 /* enable debugging code (needed for dig) */ +//#define DEBUG /* enable debugging code */ #define RESOLVSORT /* allow sorting of addresses in gethostbyname */ -#undef SUNSECURITY /* verify gethostbyaddr() calls - WE DON'T NEED IT */ +//#define SUNSECURITY /* verify gethostbyaddr() calls */ #define MULTI_PTRS_ARE_ALIASES 1 /* fold multiple PTR records into aliases */ diff --git a/lib/libc/resolv/res_debug.h b/lib/libc/resolv/res_debug.h index dd048116fb49..ccae03e625aa 100644 --- a/lib/libc/resolv/res_debug.h +++ b/lib/libc/resolv/res_debug.h @@ -23,7 +23,7 @@ #ifndef DEBUG # define Dprint(cond, args) /*empty*/ # define DprintQ(cond, args, query, size) /*empty*/ -# define Aerror(statp, file, string, error, address) /*empty*/ +# define Aerror(statp, file, string, error, address, alen) /*empty*/ # define Perror(statp, file, string, error) /*empty*/ #else # define Dprint(cond, args) if (cond) {fprintf args;} else {} diff --git a/lib/libc/resolv/res_init.c b/lib/libc/resolv/res_init.c index 70d6bc6d3bf2..71ab2dcb7038 100644 --- a/lib/libc/resolv/res_init.c +++ b/lib/libc/resolv/res_init.c @@ -108,12 +108,6 @@ #include "res_private.h" -/*% Options. Should all be left alone. */ -#define RESOLVSORT -#ifndef DEBUG -#define DEBUG -#endif - #ifdef SOLARIS2 #include #endif diff --git a/lib/libc/resolv/res_mkquery.c b/lib/libc/resolv/res_mkquery.c index 0c15def5d117..f6767a92375c 100644 --- a/lib/libc/resolv/res_mkquery.c +++ b/lib/libc/resolv/res_mkquery.c @@ -76,11 +76,6 @@ #include #include "port_after.h" -/* Options. Leave them on. */ -#ifndef DEBUG -#define DEBUG -#endif - extern const char *_res_opcodes[]; /*% diff --git a/lib/libc/resolv/res_mkupdate.c b/lib/libc/resolv/res_mkupdate.c index e5a3cb702cda..3f595dc4ec08 100644 --- a/lib/libc/resolv/res_mkupdate.c +++ b/lib/libc/resolv/res_mkupdate.c @@ -48,10 +48,6 @@ #include "port_after.h" -/* Options. Leave them on. */ -#ifndef DEBUG -#define DEBUG -#endif #define MAXPORT 1024 static int getnum_str(u_char **, u_char *); diff --git a/lib/libc/resolv/res_query.c b/lib/libc/resolv/res_query.c index e9c628ad8d47..f26d59e522b4 100644 --- a/lib/libc/resolv/res_query.c +++ b/lib/libc/resolv/res_query.c @@ -81,11 +81,6 @@ #include #include "port_after.h" -/* Options. Leave them on. */ -#ifndef DEBUG -#define DEBUG -#endif - #if PACKETSZ > 1024 #define MAXPACKET PACKETSZ #else diff --git a/lib/libc/resolv/res_send.c b/lib/libc/resolv/res_send.c index 3fb627b83d55..a68ce4f40701 100644 --- a/lib/libc/resolv/res_send.c +++ b/lib/libc/resolv/res_send.c @@ -112,10 +112,6 @@ #include "un-namespace.h" -/* Options. Leave them on. */ -#ifndef DEBUG -#define DEBUG -#endif #include "res_debug.h" #include "res_private.h" @@ -138,9 +134,11 @@ static int send_dg(res_state, const u_char *, int, u_char *, int, int *, int, int, int *, int *); +#ifdef DEBUG static void Aerror(const res_state, FILE *, const char *, int, const struct sockaddr *, int); static void Perror(const res_state, FILE *, const char *, int); +#endif static int sock_eq(struct sockaddr *, struct sockaddr *); #if defined(NEED_PSELECT) && !defined(USE_POLL) && !defined(USE_KQUEUE) static int pselect(int, void *, void *, void *, @@ -302,7 +300,9 @@ res_nsend(res_state statp, #ifdef USE_KQUEUE int kq; #endif +#ifdef DEBUG char abuf[NI_MAXHOST]; +#endif /* No name servers or res_init() failure */ if (statp->nscount == 0 || EXT(statp).ext == NULL) { @@ -418,10 +418,10 @@ res_nsend(res_state statp, */ for (tries = 0; tries < statp->retry; tries++) { for (ns = 0; ns < statp->nscount; ns++) { - struct sockaddr *nsap; - int nsaplen; - nsap = get_nsaddr(statp, ns); - nsaplen = get_salen(nsap); + struct sockaddr *nsap = get_nsaddr(statp, ns); +#ifdef DEBUG + int nsaplen = get_salen(nsap); +#endif statp->_flags &= ~RES_F_LASTMASK; statp->_flags |= (ns << RES_F_LASTSHIFT); same_ns: @@ -1088,6 +1088,7 @@ send_dg(res_state statp, return (resplen); } +#ifdef DEBUG static void Aerror(const res_state statp, FILE *file, const char *string, int error, const struct sockaddr *address, int alen) @@ -1119,6 +1120,7 @@ Perror(const res_state statp, FILE *file, const char *string, int error) { string, strerror(error)); errno = save; } +#endif static int sock_eq(struct sockaddr *a, struct sockaddr *b) { From nobody Thu Jul 24 14:01:38 2025 X-Original-To: dev-commits-src-all@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 4bnt372H2vz62nWg; Thu, 24 Jul 2025 14:01: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnt363fY4z43PJ; Thu, 24 Jul 2025 14:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753365698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x5aR1M8XDvGZr3uhV5818tJ05LpoFTOojtmNzu2kzps=; b=yWXQMT9cXVI2OclR+9bUAsFctZma9DBeaVR+1xCmAICla4Z+TCR0aSegn5ppVF1cC2qUsy xcJw5kx6RkQtBqoYBrSCaRc+drE0OQJ6ohM7nW58t15cJCdrKh+FogC6rsC31ThVeVzbFE 23az8OsimBRG+k8wn0qanREqstMEHOLWsbodsoIzHs8cUA8MR+vqv18F6xUSumAOzAD/Jo ZL/X5aP/QdClsuQxoDZGBi9IJgEuGzEo79SFFPgr8g7GWGuJFPMjRx69R0Unr8Ss1Gs2wa dGDbevRqth3iaDtnc6nBHd8ZByTtfP29MNMpS128Iy5JHLss3pjKNOXAPjLCHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753365698; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=x5aR1M8XDvGZr3uhV5818tJ05LpoFTOojtmNzu2kzps=; b=v870ihTngqCiERGDUbu4mNGIsHL/+4Y69xcdXRDKuIkK3VDmkiFARbC+L1lL8ALa9egqKe gFD5NJdloJksd0CBSXg9kXMHT2ZgWoJ3jHssropf1toPGTwOtaFP7Y2CMj0qwtCcXh0qbh 2aETZxOzlNGube+yLg1V3zD+ChLqzr9i5W2KVSH6e43PGLj19pqK9qAMW8bIYuRLxqKxCJ teAWxdZmOWApq55fe033fnPKp7K1Ps7WEBYCBOL3n0kNktyquY5zKFWix3J1+Ckuho94Zp dsq3Je8hATSVb/GYACfkDugemkS9Yt2rLaXHBeccg1JgvktiGsjXHbnfSDumdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753365698; a=rsa-sha256; cv=none; b=FCn0ZcN5EQhuFjCupd1Q8uwpNk9RS/1PI8zlwJgITZ43GHAvQXm+JMfHm+goCbWX7Mcrcq Q5klzY4W8paWhDS+YT896b8YDllndal35phvZ+dSuHNIks5qBbA0vXnjymkB2BVE+vPlP1 qyXK8d8aSDQ9wg6DP72J6AZ/QJSYAtQRpIixBgC585pcqABeF590VSKKLmHLc2rJ/NKiMd 6TBziAPA2ppBDKMUq+EkBpwZpnVoOraWpEIuUWYlXmfFzxvaOW3+YuJZO5eGtxt4SSep87 Gm74M0/WzpAgp17ogMjiCL6XvvAMFIDe5X5pn4Lsy5EGqqd3BNyVhWqWtJRqFg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnt361ZJ5z11px; Thu, 24 Jul 2025 14:01:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OE1cr5012372; Thu, 24 Jul 2025 14:01:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OE1cMo012369; Thu, 24 Jul 2025 14:01:38 GMT (envelope-from git) Date: Thu, 24 Jul 2025 14:01:38 GMT Message-Id: <202507241401.56OE1cMo012369@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 979210375351 - main - libc: Remove unused pselect() implementation. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 979210375351a667c248af09cfede81d0282fd75 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=979210375351a667c248af09cfede81d0282fd75 commit 979210375351a667c248af09cfede81d0282fd75 Author: Dag-Erling Smørgrav AuthorDate: 2025-07-24 14:01:09 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-07-24 14:01:09 +0000 libc: Remove unused pselect() implementation. This hasn't been needed since FreeBSD 5.0. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D51434 --- lib/libc/resolv/res_send.c | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/lib/libc/resolv/res_send.c b/lib/libc/resolv/res_send.c index a68ce4f40701..08c3aed7f934 100644 --- a/lib/libc/resolv/res_send.c +++ b/lib/libc/resolv/res_send.c @@ -140,11 +140,6 @@ static void Aerror(const res_state, FILE *, const char *, int, static void Perror(const res_state, FILE *, const char *, int); #endif static int sock_eq(struct sockaddr *, struct sockaddr *); -#if defined(NEED_PSELECT) && !defined(USE_POLL) && !defined(USE_KQUEUE) -static int pselect(int, void *, void *, void *, - struct timespec *, - const sigset_t *); -#endif void res_pquery(const res_state, const u_char *, int, FILE *); static const int niflags = NI_NUMERICHOST | NI_NUMERICSERV; @@ -1147,29 +1142,3 @@ sock_eq(struct sockaddr *a, struct sockaddr *b) { return 0; } } - -#if defined(NEED_PSELECT) && !defined(USE_POLL) && !defined(USE_KQUEUE) -/* XXX needs to move to the porting library. */ -static int -pselect(int nfds, void *rfds, void *wfds, void *efds, - struct timespec *tsp, const sigset_t *sigmask) -{ - struct timeval tv, *tvp; - sigset_t sigs; - int n; - - if (tsp) { - tvp = &tv; - tv = evTimeVal(*tsp); - } else - tvp = NULL; - if (sigmask) - sigprocmask(SIG_SETMASK, sigmask, &sigs); - n = select(nfds, rfds, wfds, efds, tvp); - if (sigmask) - sigprocmask(SIG_SETMASK, &sigs, NULL); - if (tsp) - *tsp = evTimeSpec(tv); - return (n); -} -#endif From nobody Thu Jul 24 14:25:53 2025 X-Original-To: dev-commits-src-all@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 4bntb55f1wz62pmj; Thu, 24 Jul 2025 14:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bntb555gTz3GDB; Thu, 24 Jul 2025 14:25:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753367153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=16YlSCPFLViVacMjNZcYVItiQAbJDMYStfgZZSKm5m4=; b=SWQjHcyZHw8YfJCy95fmtb16FQvZklGcxQ2RZpoSSy293FBVsDvgUynYObT1q1+muyKQxp wcPDB5IjaPAdePebPsCE3VswdFrqqw7myr6RZJa76RZ8m8XNBpUj2svrERnBtGKxXtqX+q WCzmnVbFWYsiEmwMdSfT7n+ZHSq5gda3JtE8RQJErin2u/NRB+cAuUtr249CheJdgwbxvX TyDtJ/LrTk9etGQFqxkRviELPJ31Gt8bVFnXc0cY9vr3oRV7yFCQ6W5rUQ8ZYhpUTHQvCP fZvhOWQQmCYj5ANMVHNSucNeTGjuVqRdFCxaYtlziAsALSyVk2C/uEwhKZh+7Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753367153; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=16YlSCPFLViVacMjNZcYVItiQAbJDMYStfgZZSKm5m4=; b=or/Y5kPW1ZLIdGmKQrBa1JLr0ZdhdsuNIgTaoGpDF6n1wpwBA5kTnZHH5Nf1Cb/+UuZZzE 5AlG5CI0b333fNn+HbpV8fqGTxZfwHssFo9qdnPUbFuOI9UhUCtQwuo2bkWog6go96qLzV xAJwvIufNTnraK1Dde2rqYp9QqqTog1CDCck3TJ1sl7OzEyRgOHdQ9itNUlfcJFSoz5K5k 8FjAqa8nujaQSkQ24JCnkmzIbkE3G1WrJwPMYu3YKPtZVdqRPOtkGIj6V8y8c7iqCsVmn5 WbfGplmBsVsQbjc10iLUVJ4Ha8F5tHaY3uO8Nj7QvGEpJlxczqLY5Oip39jOmw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753367153; a=rsa-sha256; cv=none; b=XCkK3loI9wBy/lnjayCSJb0zisyn6lsLl+qbQtblmfmtEklS/Z312/Cp3K0EOyLjq9JoQ4 36DIeFS3KgdxI3GjnNXwA2mZDxSMl7P22kcd6MyFjKSymg539FY2ukIhqYdHv5nJrK15Lg eJw7ZG7oauvH4xZZGyKtsVI7k0cF2yccGMFPSBf+udi6vfPl+3oNLU8M7TMA+oUt+xblmB 5Al8NgpOoHwriGhbJGGwTj6RZfa3HUCnZmnQJFOk6XFH8Lb5+yrVvpW7U13DhIBi4mJBNl RezI6jrVsnxOhAIqsyAuIy+EW4nSiKDXxKdYr+vect+zaohL7VJbzxTOTrgMzQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bntb54R8Nz12qG; Thu, 24 Jul 2025 14:25:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OEPrL8053679; Thu, 24 Jul 2025 14:25:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OEPr3T053676; Thu, 24 Jul 2025 14:25:53 GMT (envelope-from git) Date: Thu, 24 Jul 2025 14:25:53 GMT Message-Id: <202507241425.56OEPr3T053676@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Krzysztof Galazka Subject: git: 66b1d696db12 - stable/13 - ice_ddp: Update to 1.3.41.0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 66b1d696db1284ac9f9bb4037ffc288091f5ba84 Auto-Submitted: auto-generated The branch stable/13 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=66b1d696db1284ac9f9bb4037ffc288091f5ba84 commit 66b1d696db1284ac9f9bb4037ffc288091f5ba84 Author: Eric Joyner AuthorDate: 2024-10-28 22:48:47 +0000 Commit: Krzysztof Galazka CommitDate: 2025-07-24 14:17:45 +0000 ice_ddp: Update to 1.3.41.0 Primarily adds support for E830 devices, unlocking all of their functionality. As well, update the README and remove the non-FreeBSD sections from it. Signed-off-by: Eric Joyner Sponsored by: Intel Corporation (cherry picked from commit f68513e7a446b4b0598b7f3d1b3e13f592b85d92) --- sys/conf/files.amd64 | 6 +- sys/conf/files.arm64 | 6 +- sys/conf/files.powerpc | 6 +- sys/contrib/dev/ice/README | 330 ++++++++------------- .../dev/ice/{ice-1.3.36.0.pkg => ice-1.3.41.0.pkg} | Bin 692776 -> 1352580 bytes sys/modules/ice_ddp/Makefile | 2 +- 6 files changed, 133 insertions(+), 217 deletions(-) diff --git a/sys/conf/files.amd64 b/sys/conf/files.amd64 index 48f2d8408007..2fc4b12e6e18 100644 --- a/sys/conf/files.amd64 +++ b/sys/conf/files.amd64 @@ -207,7 +207,7 @@ dev/ice/irdma_di_if.m optional ice pci \ dev/ice/ice_ddp_common.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032400 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032900 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ @@ -216,8 +216,8 @@ ice_ddp.fwo optional ice_ddp \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp \ - dependency "$S/contrib/dev/ice/ice-1.3.36.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.36.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.41.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.41.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" dev/ioat/ioat.c optional ioat pci diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index 2aaa19a8c7b7..a3bf60ddd450 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -238,7 +238,7 @@ dev/ice/irdma_di_if.m optional ice pci \ dev/ice/ice_ddp_common.c optional ice pci \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032400 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032900 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp \ @@ -247,8 +247,8 @@ ice_ddp.fwo optional ice_ddp \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp \ - dependency "$S/contrib/dev/ice/ice-1.3.36.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.36.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.41.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.41.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" diff --git a/sys/conf/files.powerpc b/sys/conf/files.powerpc index 22016c77e049..f9719c5b0849 100644 --- a/sys/conf/files.powerpc +++ b/sys/conf/files.powerpc @@ -82,7 +82,7 @@ dev/ice/irdma_di_if.m optional ice pci powerpc64 | ice pci powerpc64le \ dev/ice/ice_ddp_common.c optional ice pci powerpc64 | ice pci powerpc64le \ compile-with "${NORMAL_C} -I$S/dev/ice" ice_ddp.c optional ice_ddp powerpc64 | ice pci powerpc64le \ - compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032400 -mice_ddp -c${.TARGET}" \ + compile-with "${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01032900 -mice_ddp -c${.TARGET}" \ no-ctfconvert no-implicit-rule before-depend local \ clean "ice_ddp.c" ice_ddp.fwo optional ice_ddp powerpc64 | ice pci powerpc64le \ @@ -91,8 +91,8 @@ ice_ddp.fwo optional ice_ddp powerpc64 | ice pci powerpc64le \ no-implicit-rule \ clean "ice_ddp.fwo" ice_ddp.fw optional ice_ddp powerpc64 | ice pci powerpc64le \ - dependency "$S/contrib/dev/ice/ice-1.3.36.0.pkg" \ - compile-with "${CP} $S/contrib/dev/ice/ice-1.3.36.0.pkg ice_ddp.fw" \ + dependency "$S/contrib/dev/ice/ice-1.3.41.0.pkg" \ + compile-with "${CP} $S/contrib/dev/ice/ice-1.3.41.0.pkg ice_ddp.fw" \ no-obj no-implicit-rule \ clean "ice_ddp.fw" dev/ixl/if_ixl.c optional ixl pci powerpc64 \ diff --git a/sys/contrib/dev/ice/README b/sys/contrib/dev/ice/README index e2ce84d72e71..c0840ecb499f 100644 --- a/sys/contrib/dev/ice/README +++ b/sys/contrib/dev/ice/README @@ -1,285 +1,201 @@ OS Default Dynamic Device Personalization (DDP) Package -====================================================================== -May 12, 2022 +******************************************************* +August 09, 2024 -Contents -======== -- Overview -- Supported Operating Systems -- Safe Mode -- Notes -- Installation -- Troubleshooting -- Legal +Contents +^^^^^^^^ -Overview -======== -Devices based on the Intel(R) Ethernet 800 Series require a Dynamic Device -Personalization (DDP) package file to enable advanced features (such as dynamic -tunneling, Intel(R) Ethernet Flow Director, RSS, and ADQ). - -DDP allows you to change the packet processing pipeline of a device by applying -a profile package to the device at runtime. Profiles can be used to, for -example, add support for new protocols, change existing protocols, or change -default settings. DDP profiles can also be rolled back without rebooting the -system. - -The DDP package loads during device initialization or driver runtime, depending -on the operating system. The driver checks to see if the DDP package is present -and compatible. If this file exists, the driver will load it into the device. -If the DDP package file is missing or incompatible with the driver, the driver -will go into Safe Mode where it will use the configuration contained in the -device's NVM. Refer to the Intel(R) Ethernet Adapters and Devices User Guide -for more information on Safe Mode. - -A general-purpose, default DDP package is automatically installed with all -supported Intel Ethernet 800 Series drivers on supported operating systems. -Additional DDP packages are available to address needs for specific market -segments or targeted solutions. - -The default DDP package supports the following: -- MAC -- EtherType -- VLAN -- IPv4 -- IPv6 -- TCP -- ARP -- UDP -- SCTP -- ICMP -- ICMPv6 -- CTRL -- LLDP -- VXLAN-GPE -- VXLAN (non-GPE) -- Geneve -- GRE -- NVGRE -- RoCEv2 -- MPLS (up to 5 consecutive MPLS labels in the outermost Layer 2 header group) +* OS Default Dynamic Device Personalization (DDP) Package + * Overview -Supported Operating Systems -=========================== -This DDP package is supported on the following operating systems: -- Microsoft* Windows Server* -- Linux* -- FreeBSD* -- VMware* ESXi* + * Supported Operating Systems -Refer to the Intel(R) Ethernet Adapters and Devices User Guide for currently -supported versions of these operating systems. + * Contents of This Package + * Related Documentation -Safe Mode -========= -Safe Mode disables advanced and performance features, and supports only basic -traffic and minimal functionality, such as updating the NVM or downloading a -new driver or DDP package. + * Notes -Refer to the Intel(R) Ethernet Adapters and Devices User Guide for more details -on DDP and Safe Mode. + * Installation + * Troubleshooting -Notes -===== -- In Linux, FreeBSD, and Windows, you cannot update the DDP package if any PF -drivers are already loaded. To overwrite a package, unload all PFs and then -reload the driver with the new package. + * Legal / Disclaimers -- In ESXi, use esxcli to load and unload DDP packages for specific market -segments during driver runtime. - -- In FreeBSD and Windows, you can only use one DDP package per driver, even if -you have more than one device installed that uses the driver. -- In Linux, FreeBSD, and Windows, only the first loaded PF per device can -download a package for that device. In ESXi, you can load different DDP -packages for different PFs associated with a device. +Overview +======== -- If you are using DPDK, see the DPDK documentation at https://www.dpdk.org/ -for installation instructions and more information. +Devices based on the Intel(R) Ethernet 800 Series require a Dynamic +Device Personalization (DDP) package file to enable advanced features +(such as dynamic tunneling, Intel(R) Ethernet Flow Director, RSS, and +ADQ). +DDP allows you to change the packet processing pipeline of a device by +applying a profile package to the device at runtime. Profiles can be +used to, for example, add support for new protocols, change existing +protocols, or change default settings. DDP profiles can also be rolled +back without rebooting the system. -Installation -============ +The DDP package loads during device initialization or driver runtime, +depending on the operating system. The driver checks to see if the DDP +package is present and compatible. If this file exists, the driver +will load it into the device. If the DDP package file is missing or +incompatible with the driver, the driver will go into Safe Mode where +it will use the configuration contained in the device's NVM. -Microsoft Windows ------------------ -TO INSTALL THE OS DEFAULT DDP PACKAGE: +Safe Mode disables advanced and performance features, and supports +only basic traffic and minimal functionality, such as updating the NVM +or downloading a new driver or DDP package. -The default DDP package is installed as part of the driver binary. You don't -need to take additional steps to install the DDP package file. +Refer to the Intel(R) Ethernet Adapters and Devices User Guide for +more details on DDP and Safe Mode. +A general-purpose, default DDP package is automatically installed with +all supported Intel Ethernet 800 Series drivers on supported operating +systems. Additional DDP packages are available to address needs for +specific market segments or targeted solutions. -FreeBSD -------- -TO INSTALL THE OS DEFAULT DDP PACKAGE: - -The FreeBSD driver automatically installs the default DDP package file during -driver installation. See the base driver README for general installation and -building instructions. - -The DDP package loads during device initialization. The driver looks for the -ice_ddp module and checks that it contains a valid DDP package file. +The default DDP package supports the following: -NOTE: It's important to do 'make install' during initial ice driver -installation so that the driver loads the DDP package automatically. +* MAC +* EtherType -Linux ------ -TO INSTALL THE OS DEFAULT DDP PACKAGE: +* VLAN -The Linux driver automatically installs the default DDP package file during -driver installation. Read the base driver README for general installation and -building instructions. +* IPv4 -The DDP package loads during device initialization. The driver looks for -intel/ice/ddp/ice.pkg in your firmware root (typically /lib/firmware/ or -/lib/firmware/updates/) and checks that it contains a valid DDP package file. -The ice.pkg file is a symbolic link to the default DDP package file installed -by the linux-firmware software package or the out-of-tree driver installation. +* IPv6 +* TCP -TO INSTALL A DDP PACKAGE FOR SPECIFIC MARKET SEGMENTS: +* ARP -You can install specific DDP package files for different physical devices in -the same system. To install a specific DDP package: +* UDP -1. Download the DDP package file (ice-x.x.x.x.zip) you want for your device. In -addition to licensing information and this README, this zip file contains the -following files: - ice-x.x.x.x.pkg - ice.pkg +* SCTP -NOTE: The ice.pkg file is a Linux symbolic link file pointing to -ice-x.x.x.x.pkg (in the same path). +* ICMP -2. Rename the ice-x.x.x.x.pkg file as ice-xxxxxxxxxxxxxxxx.pkg, where -'xxxxxxxxxxxxxxxx' is the unique 64-bit PCI Express device serial number (in -hex) of the device you want the package downloaded on. The filename must -include the complete serial number (including leading zeros) and be all -lowercase. For example, if the 64-bit serial number is b887a3ffffca0568, then -the file name would be ice-b887a3ffffca0568.pkg. +* ICMPv6 -To find the serial number from the PCI bus address, you can use the following -command: +* CTRL -# lspci -vv -s af:00.0 | grep -i Serial -Capabilities: [150 v1] Device Serial Number b8-87-a3-ff-ff-ca-05-68 +* LLDP -You can use the following command to format the serial number without the -dashes: +* VXLAN-GPE -# lspci -vv -s af:00.0 | grep -i Serial | awk '{print $7}' | sed s/-//g -b887a3ffffca0568 +* VXLAN (non-GPE) -3. Copy the renamed DDP package file to /lib/firmware/updates/intel/ice/ddp/. -If the directory does not yet exist, create it before copying the file. +* Geneve -4. Unload all of the PFs on the device. +* GRE -5. Reload the driver with the new package. +* NVGRE -NOTE: The presence of a device-specific DDP package file overrides the loading -of the default DDP package file. +* RoCEv2 +* MPLS (up to 5 consecutive MPLS labels in the outermost Layer 2 + header group) -ESX ---- -TO INSTALL THE OS DEFAULT DDP PACKAGE: -The default DDP package is installed as part of the driver binary. You don't -need to take additional steps to install the DDP package file. +Supported Operating Systems +=========================== -TO INSTALL A DDP PACKAGE FOR SPECIFIC MARKET SEGMENTS: +This DDP package is supported on the following operating systems: -You must first install the Intel(R) ESXCLI Plug-In for Managing Intel(R) -Ethernet Network Adapters to be able to install and load market-specific DDP -packages. Download it from: -https://www.intel.com/content/www/us/en/download/19380/intel-esxcli-plug-in-for- -managing-intel-ethernet-network-adapters.html +* Microsoft* Windows Server* -NOTE: ESXi support for DDP packages for specific market segments requires the -following: -- OS: ESXi 6.7 or higher -- Driver: icen 1.9.1.x or higher -- Tool: intnet 1.8.3.x or higher +* Linux* -To install and load this DDP package: +* FreeBSD* -1. Download and install the esxcli plug-in from the URL above. +* VMware* ESXi* -2. Download the DDP package. +Refer to the Intel(R) Ethernet Adapters and Devices User Guide for +currently supported versions of these operating systems. -3. Copy the DDP package file to the following location: /store/intel/icen/ddp/. - If the directory does not yet exist, create it before copying the file. -4. From the command prompt, run the following command to load the DDP package: +Related Documentation +===================== - # esxcli intnet ddp load -n -p -f +See the "Intel(R) Ethernet Adapters and Devices User Guide" for +additional information on features: - Where: - = the name of the NIC - = the name of the DDP package to load - -f = forces the package to load +* https://cdrdv2.intel.com/v1/dl/getContent/705831/ - NOTE: This operation will cause the driver to reset. +Additionally, a detailed technology guide is available for this DDP +package: -5. Wait for the load result status. +* https://cdrdv2.intel.com/v1/dl/getContent/617015 -To list all active DDP packages for all virtual NICs, run the following: +Notes +===== -# esxcli intnet ddp list +* In Linux, FreeBSD, and Windows, you cannot update the DDP package if + any PF drivers are already loaded. To overwrite a package, unload + all PFs and then reload the driver with the new package. -To unload (roll back) a DDP package, run the following: +* In FreeBSD and Windows, you can only use one DDP package per driver, + even if you have more than one device installed that uses the + driver. -# esxcli intnet ddp rollback -n -f +* In Linux, FreeBSD, and Windows, only the first loaded PF per device + can download a package for that device. In ESXi, you can load + different DDP packages for different PFs associated with a device. -NOTE: This operation will cause the driver to reset. +* If you are using DPDK, see the DPDK documentation at + https://www.dpdk.org/ for installation instructions and more + information. Troubleshooting =============== -Microsoft Windows ------------------ -If you encounter issues with the DDP package file, download the latest driver. FreeBSD ------- -If you encounter issues with the DDP package file, you may need to download an -updated driver or ice_ddp module. See the log messages for more information. -Linux ------ -If you encounter issues with the DDP package file, you may need to download an -updated driver or DDP package file. Refer to the log messages for more -information. - -ESX ---- -If you encounter issues with the DDP package file, download the latest driver. +If you encounter issues with the DDP package file, you may need to +download an updated driver or ice_ddp module. See the log messages for +more information. Legal / Disclaimers =================== -Copyright (c) 2019 - 2022, Intel Corporation. -Intel and the Intel logo are trademarks of Intel Corporation or its -subsidiaries in the U.S. and/or other countries. +Copyright (c) 2019 - 2024, Intel Corporation. + +Intel technologies may require enabled hardware, software or service +activation. + +No product or component can be absolutely secure. + +Your costs and results may vary. + +Intel, the Intel logo, and other Intel marks are trademarks of Intel +Corporation or its subsidiaries. Other names and brands may be +claimed as the property of others. + +Performance varies by use, configuration, and other factors. Learn +more at https://www.Intel.com/PerformanceIndex. + +The products described may contain design defects or errors known as +errata which may cause the product to deviate from published +specifications. Current characterized errata are available on request. -*Other names and brands may be claimed as the property of others. +This software and the related documents are Intel copyrighted +materials, and your use of them is governed by the express license +under which they were provided to you ("License"). Unless the License +provides otherwise, you may not use, modify, copy, publish, +distribute, disclose or transmit this software or the related +documents without Intel's prior written permission. -This software and the related documents are Intel copyrighted materials, and -your use of them is governed by the express license under which they were -provided to you ("License"). Unless the License provides otherwise, you may not -use, modify, copy, publish, distribute, disclose or transmit this software or -the related documents without Intel's prior written permission. -This software and the related documents are provided as is, with no express or -implied warranties, other than those that are expressly stated in the License. +This software and the related documents are provided as is, with no +express or implied warranties, other than those that are expressly +stated in the License. diff --git a/sys/contrib/dev/ice/ice-1.3.36.0.pkg b/sys/contrib/dev/ice/ice-1.3.41.0.pkg similarity index 50% rename from sys/contrib/dev/ice/ice-1.3.36.0.pkg rename to sys/contrib/dev/ice/ice-1.3.41.0.pkg index ce5dbf41f557..71e75a5d7836 100644 Binary files a/sys/contrib/dev/ice/ice-1.3.36.0.pkg and b/sys/contrib/dev/ice/ice-1.3.41.0.pkg differ diff --git a/sys/modules/ice_ddp/Makefile b/sys/modules/ice_ddp/Makefile index 7329f0897325..dd6c88712f01 100644 --- a/sys/modules/ice_ddp/Makefile +++ b/sys/modules/ice_ddp/Makefile @@ -1,5 +1,5 @@ KMOD= ice_ddp -FIRMWS= ${SRCTOP}/sys/contrib/dev/ice/ice-1.3.36.0.pkg:ice_ddp:0x01032400 +FIRMWS= ${SRCTOP}/sys/contrib/dev/ice/ice-1.3.41.0.pkg:ice_ddp:0x01032900 .include From nobody Thu Jul 24 14:25:54 2025 X-Original-To: dev-commits-src-all@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 4bntb72QG1z62pVK; Thu, 24 Jul 2025 14:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bntb706csz3GGC; Thu, 24 Jul 2025 14:25:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753367155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=893mOwIqFizQyNQ1ojl58WIYWhKmq0TJylyFDx5Hrco=; b=sBZzQ8KImzXlkdPBTfKzS5DNlTaccBkQNr0akc51pNj+LHVWZCRqieL7fGOHXnuQcKWych MgAS1a6zZvWvYaV0sZsfrZ3MuvXQ+iVWxNMqO0az1ocGULMzEHar7NUiwJVSYB6/5p+qsW x/Aw3BWNLFsAnotTi8BtpSqaxRsWg5x7VWgJQwSiCKJPjyrDzAXmcFwUvcE6EauE/AvIQU Q1GFnTAaUw7ngZGM9piB/e0UGMUQid8k2GG2D04wrFcgK/DLmEr9YLWQcwPs7wYnKll/dI T7OxlYGlTj8AIFv0PO4THRjqeNvpkKQ5a4pVc09a9Oeik44TnlCGeatJuIDD/Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753367155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=893mOwIqFizQyNQ1ojl58WIYWhKmq0TJylyFDx5Hrco=; b=Pdvc+NXvS8PFiejz+6AJO4QZa8PavFq/Z6O5La9urJQy5LNWtTFeK4Peqwrmm6r04pmZWv IEdXcMwEBHzfxcNX1+gNH2ilOlHbz2QfUVW5iUQDgjRccn1PLjRCt/+YH6ZpKyXCSzbgjC PqZgjCc3+RBNzAAquzvIfJMUKl6UYKfLnT1uyNb7vSseyoyqPRBrzsQ4tWAGdHNEQftmlN OdQ7tJfq/S1TpFPNSl6Ka+QzK1CGj+gbUuI2RiU24rZP1/sLCjYSQPTwwviTHi4rFS8u0B g0hbOdYRJ1ll+BgCAqK6ZuWF+xZK9wUIXzMKy69zTXPKlqCLHPFnSl6/TqXwqw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753367155; a=rsa-sha256; cv=none; b=EiPbiCRlC749Es5VErrXSEeIQb9hjlaoTYNtKcFuQ/K7MO6d8A8qyFRPacFRN2D9vknrVO DPdvIzbVCLTPvkbRMRMEIxIQYChon04h6EZFxLdyhLm54L4AWe/jcFLVemb5cfWykjjtBA 76W6bSzOhbcREIfR/pTlvTwoOOPMznzOufaxGrSx9fkbqN74ezX/dn4hklWL799fPvpETz yP/Rka090Y6ivuJHTKzpKCtufLmQyIABepHCH0a5wSuHn1SfcNIHC/Fp3RD0pSBDoEK1jv RMgpCKuzOtNlFpa5lToCMkAl5Y5Z1nKdd86UNARoyzYyDac+MCh+K9CQoOescQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bntb66pCJz12qH; Thu, 24 Jul 2025 14:25:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OEPsuc053718; Thu, 24 Jul 2025 14:25:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OEPs6M053715; Thu, 24 Jul 2025 14:25:54 GMT (envelope-from git) Date: Thu, 24 Jul 2025 14:25:54 GMT Message-Id: <202507241425.56OEPs6M053715@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Krzysztof Galazka Subject: git: 00daa1b56a8b - stable/13 - ice: Update to 1.42.1-k List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kgalazka X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 00daa1b56a8b069dbf335d383b29a845bc616bd3 Auto-Submitted: auto-generated The branch stable/13 has been updated by kgalazka: URL: https://cgit.FreeBSD.org/src/commit/?id=00daa1b56a8b069dbf335d383b29a845bc616bd3 commit 00daa1b56a8b069dbf335d383b29a845bc616bd3 Author: Eric Joyner AuthorDate: 2024-08-29 22:41:20 +0000 Commit: Krzysztof Galazka CommitDate: 2025-07-24 14:17:53 +0000 ice: Update to 1.42.1-k Summary: - Adds E830 device support - Adds pre-release E825C support (for the Ethernet device included in an upcoming Xeon D platform) - Add sysctl for E810 devices to print out PHY debug statistics (mostly for FEC debugging) - Adds per-TX-queue tso counter sysctl to count how many times a TSO offload was requested for a packet, matching other Intel drivers - Various bug fixes Signed-off-by: Eric Joyner Tested by: Jeffrey Pieper Relnotes: yes Sponsored by: Intel Corporation Differential Revisison: https://reviews.freebsd.org/D46949 (cherry picked from commit f2635e844dd138ac9dfba676f27d41750049af26) --- sys/dev/ice/ice_adminq_cmd.h | 191 ++- sys/dev/ice/ice_bitops.h | 4 +- sys/dev/ice/ice_common.c | 967 ++++++++++------ sys/dev/ice/ice_common.h | 189 +-- sys/dev/ice/ice_common_txrx.h | 2 +- sys/dev/ice/ice_controlq.c | 143 ++- sys/dev/ice/ice_controlq.h | 24 +- sys/dev/ice/ice_dcb.c | 90 +- sys/dev/ice/ice_dcb.h | 42 +- sys/dev/ice/ice_ddp_common.c | 123 +- sys/dev/ice/ice_ddp_common.h | 19 +- sys/dev/ice/ice_devids.h | 38 +- sys/dev/ice/ice_drv_info.h | 49 +- sys/dev/ice/ice_features.h | 3 + sys/dev/ice/ice_flex_pipe.c | 266 ++--- sys/dev/ice/ice_flex_pipe.h | 38 +- sys/dev/ice/ice_flow.c | 100 +- sys/dev/ice/ice_flow.h | 14 +- sys/dev/ice/ice_fw_logging.c | 4 +- sys/dev/ice/ice_fwlog.c | 39 +- sys/dev/ice/ice_fwlog.h | 12 +- sys/dev/ice/ice_hw_autogen.h | 2557 +++++++++++++++++++++++++++++++++++------ sys/dev/ice/ice_iflib.h | 1 - sys/dev/ice/ice_lan_tx_rx.h | 8 +- sys/dev/ice/ice_lib.c | 1113 +++++++++++++++--- sys/dev/ice/ice_lib.h | 109 +- sys/dev/ice/ice_nvm.c | 374 +++--- sys/dev/ice/ice_nvm.h | 56 +- sys/dev/ice/ice_rdma.c | 2 +- sys/dev/ice/ice_sbq_cmd.h | 120 ++ sys/dev/ice/ice_sched.c | 487 ++++---- sys/dev/ice/ice_sched.h | 102 +- sys/dev/ice/ice_strings.c | 4 +- sys/dev/ice/ice_switch.c | 304 ++--- sys/dev/ice/ice_switch.h | 93 +- sys/dev/ice/ice_type.h | 36 +- sys/dev/ice/ice_vlan_mode.c | 22 +- sys/dev/ice/ice_vlan_mode.h | 2 +- sys/dev/ice/if_ice_iflib.c | 59 +- sys/dev/ice/virtchnl.h | 28 + 40 files changed, 5678 insertions(+), 2156 deletions(-) diff --git a/sys/dev/ice/ice_adminq_cmd.h b/sys/dev/ice/ice_adminq_cmd.h index 70b56144faf2..6225abc0f38b 100644 --- a/sys/dev/ice/ice_adminq_cmd.h +++ b/sys/dev/ice/ice_adminq_cmd.h @@ -187,7 +187,7 @@ struct ice_aqc_list_caps_elem { #define ICE_AQC_CAPS_ROCEV2_LAG 0x0092 #define ICE_AQC_BIT_ROCEV2_LAG 0x01 #define ICE_AQC_BIT_SRIOV_LAG 0x02 - +#define ICE_AQC_CAPS_NEXT_CLUSTER_ID 0x0096 u8 major_ver; u8 minor_ver; /* Number of resources described by this capability */ @@ -320,7 +320,12 @@ struct ice_aqc_set_port_params { (0x3F << ICE_AQC_SET_P_PARAMS_LOGI_PORT_ID_S) #define ICE_AQC_SET_P_PARAMS_IS_LOGI_PORT BIT(14) #define ICE_AQC_SET_P_PARAMS_SWID_VALID BIT(15) - u8 reserved[10]; + u8 lb_mode; +#define ICE_AQC_SET_P_PARAMS_LOOPBACK_MODE_VALID BIT(2) +#define ICE_AQC_SET_P_PARAMS_LOOPBACK_MODE_NORMAL 0x00 +#define ICE_AQC_SET_P_PARAMS_LOOPBACK_MODE_NO 0x01 +#define ICE_AQC_SET_P_PARAMS_LOOPBACK_MODE_HIGH 0x02 + u8 reserved[9]; }; /* These resource type defines are used for all switch resource @@ -1389,7 +1394,18 @@ struct ice_aqc_get_phy_caps { #define ICE_PHY_TYPE_HIGH_100G_CAUI2 BIT_ULL(2) #define ICE_PHY_TYPE_HIGH_100G_AUI2_AOC_ACC BIT_ULL(3) #define ICE_PHY_TYPE_HIGH_100G_AUI2 BIT_ULL(4) -#define ICE_PHY_TYPE_HIGH_MAX_INDEX 4 +#define ICE_PHY_TYPE_HIGH_200G_CR4_PAM4 BIT_ULL(5) +#define ICE_PHY_TYPE_HIGH_200G_SR4 BIT_ULL(6) +#define ICE_PHY_TYPE_HIGH_200G_FR4 BIT_ULL(7) +#define ICE_PHY_TYPE_HIGH_200G_LR4 BIT_ULL(8) +#define ICE_PHY_TYPE_HIGH_200G_DR4 BIT_ULL(9) +#define ICE_PHY_TYPE_HIGH_200G_KR4_PAM4 BIT_ULL(10) +#define ICE_PHY_TYPE_HIGH_200G_AUI4_AOC_ACC BIT_ULL(11) +#define ICE_PHY_TYPE_HIGH_200G_AUI4 BIT_ULL(12) +#define ICE_PHY_TYPE_HIGH_200G_AUI8_AOC_ACC BIT_ULL(13) +#define ICE_PHY_TYPE_HIGH_200G_AUI8 BIT_ULL(14) +#define ICE_PHY_TYPE_HIGH_400GBASE_FR8 BIT_ULL(15) +#define ICE_PHY_TYPE_HIGH_MAX_INDEX 15 struct ice_aqc_get_phy_caps_data { __le64 phy_type_low; /* Use values from ICE_PHY_TYPE_LOW_* */ @@ -1541,11 +1557,14 @@ struct ice_aqc_get_link_status { enum ice_get_link_status_data_version { ICE_GET_LINK_STATUS_DATA_V1 = 1, + ICE_GET_LINK_STATUS_DATA_V2 = 2, }; #define ICE_GET_LINK_STATUS_DATALEN_V1 32 +#define ICE_GET_LINK_STATUS_DATALEN_V2 56 /* Get link status response data structure, also used for Link Status Event */ +#pragma pack(1) struct ice_aqc_get_link_status_data { u8 topo_media_conflict; #define ICE_AQ_LINK_TOPO_CONFLICT BIT(0) @@ -1618,7 +1637,7 @@ struct ice_aqc_get_link_status_data { #define ICE_AQ_LINK_PWR_QSFP_CLASS_3 2 #define ICE_AQ_LINK_PWR_QSFP_CLASS_4 3 __le16 link_speed; -#define ICE_AQ_LINK_SPEED_M 0x7FF +#define ICE_AQ_LINK_SPEED_M 0xFFF #define ICE_AQ_LINK_SPEED_10MB BIT(0) #define ICE_AQ_LINK_SPEED_100MB BIT(1) #define ICE_AQ_LINK_SPEED_1000MB BIT(2) @@ -1630,12 +1649,37 @@ struct ice_aqc_get_link_status_data { #define ICE_AQ_LINK_SPEED_40GB BIT(8) #define ICE_AQ_LINK_SPEED_50GB BIT(9) #define ICE_AQ_LINK_SPEED_100GB BIT(10) +#define ICE_AQ_LINK_SPEED_200GB BIT(11) #define ICE_AQ_LINK_SPEED_UNKNOWN BIT(15) - __le32 reserved3; /* Aligns next field to 8-byte boundary */ + __le16 reserved3; /* Aligns next field to 8-byte boundary */ + u8 ext_fec_status; +#define ICE_AQ_LINK_RS_272_FEC_EN BIT(0) /* RS 272 FEC enabled */ + u8 reserved4; __le64 phy_type_low; /* Use values from ICE_PHY_TYPE_LOW_* */ __le64 phy_type_high; /* Use values from ICE_PHY_TYPE_HIGH_* */ + /* Get link status version 2 link partner data */ + __le64 lp_phy_type_low; /* Use values from ICE_PHY_TYPE_LOW_* */ + __le64 lp_phy_type_high; /* Use values from ICE_PHY_TYPE_HIGH_* */ + u8 lp_fec_adv; +#define ICE_AQ_LINK_LP_10G_KR_FEC_CAP BIT(0) +#define ICE_AQ_LINK_LP_25G_KR_FEC_CAP BIT(1) +#define ICE_AQ_LINK_LP_RS_528_FEC_CAP BIT(2) +#define ICE_AQ_LINK_LP_50G_KR_272_FEC_CAP BIT(3) +#define ICE_AQ_LINK_LP_100G_KR_272_FEC_CAP BIT(4) +#define ICE_AQ_LINK_LP_200G_KR_272_FEC_CAP BIT(5) + u8 lp_fec_req; +#define ICE_AQ_LINK_LP_10G_KR_FEC_REQ BIT(0) +#define ICE_AQ_LINK_LP_25G_KR_FEC_REQ BIT(1) +#define ICE_AQ_LINK_LP_RS_528_FEC_REQ BIT(2) +#define ICE_AQ_LINK_LP_KR_272_FEC_REQ BIT(3) + u8 lp_flowcontrol; +#define ICE_AQ_LINK_LP_PAUSE_ADV BIT(0) +#define ICE_AQ_LINK_LP_ASM_DIR_ADV BIT(1) + u8 reserved[5]; }; +#pragma pack() + /* Set event mask command (direct 0x0613) */ struct ice_aqc_set_event_mask { u8 lport_num; @@ -1793,14 +1837,46 @@ struct ice_aqc_dnl_call_command { u8 ctx; /* Used in command, reserved in response */ u8 reserved; __le16 activity_id; +#define ICE_AQC_ACT_ID_DNL 0x1129 __le32 reserved1; __le32 addr_high; __le32 addr_low; }; +struct ice_aqc_dnl_equa_param { + __le16 data_in; +#define ICE_AQC_RX_EQU_SHIFT 8 +#define ICE_AQC_RX_EQU_PRE2 (0x10 << ICE_AQC_RX_EQU_SHIFT) +#define ICE_AQC_RX_EQU_PRE1 (0x11 << ICE_AQC_RX_EQU_SHIFT) +#define ICE_AQC_RX_EQU_POST1 (0x12 << ICE_AQC_RX_EQU_SHIFT) +#define ICE_AQC_RX_EQU_BFLF (0x13 << ICE_AQC_RX_EQU_SHIFT) +#define ICE_AQC_RX_EQU_BFHF (0x14 << ICE_AQC_RX_EQU_SHIFT) +#define ICE_AQC_RX_EQU_DRATE (0x15 << ICE_AQC_RX_EQU_SHIFT) +#define ICE_AQC_TX_EQU_PRE1 0x0 +#define ICE_AQC_TX_EQU_PRE3 0x3 +#define ICE_AQC_TX_EQU_ATTEN 0x4 +#define ICE_AQC_TX_EQU_POST1 0x8 +#define ICE_AQC_TX_EQU_PRE2 0xC + __le16 op_code_serdes_sel; +#define ICE_AQC_OP_CODE_SHIFT 4 +#define ICE_AQC_OP_CODE_RX_EQU (0x9 << ICE_AQC_OP_CODE_SHIFT) +#define ICE_AQC_OP_CODE_TX_EQU (0x10 << ICE_AQC_OP_CODE_SHIFT) + __le32 reserved[3]; +}; + +struct ice_aqc_dnl_equa_resp { + /* Equalization value can be -ve */ + int val; + __le32 reserved[3]; +}; + /* DNL call command/response buffer (indirect 0x0682) */ struct ice_aqc_dnl_call { - __le32 stores[4]; + union { + struct ice_aqc_dnl_equa_param txrx_equa_reqs; + __le32 stores[4]; + struct ice_aqc_dnl_equa_resp txrx_equa_resp; + } sto; }; /* Used for both commands: @@ -1902,8 +1978,8 @@ struct ice_aqc_link_topo_addr { #define ICE_AQC_LINK_TOPO_HANDLE_M (0x3FF << ICE_AQC_LINK_TOPO_HANDLE_S) /* Used to decode the handle field */ #define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_M BIT(9) -#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_LOM BIT(9) -#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_MEZZ 0 +#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_LOM 0 +#define ICE_AQC_LINK_TOPO_HANDLE_BRD_TYPE_MEZZ BIT(9) #define ICE_AQC_LINK_TOPO_HANDLE_NODE_S 0 /* In case of a Mezzanine type */ #define ICE_AQC_LINK_TOPO_HANDLE_MEZZ_NODE_M \ @@ -1919,7 +1995,7 @@ struct ice_aqc_link_topo_addr { struct ice_aqc_get_link_topo { struct ice_aqc_link_topo_addr addr; u8 node_part_num; -#define ICE_ACQ_GET_LINK_TOPO_NODE_NR_PCA9575 0x21 +#define ICE_AQC_GET_LINK_TOPO_NODE_NR_PCA9575 0x21 u8 rsvd[9]; }; @@ -2054,6 +2130,7 @@ struct ice_aqc_get_port_options_elem { #define ICE_AQC_PORT_OPT_MAX_LANE_25G 5 #define ICE_AQC_PORT_OPT_MAX_LANE_50G 6 #define ICE_AQC_PORT_OPT_MAX_LANE_100G 7 +#define ICE_AQC_PORT_OPT_MAX_LANE_200G 8 u8 global_scid[2]; u8 phy_scid[2]; u8 pf2port_cid[2]; @@ -2201,6 +2278,29 @@ struct ice_aqc_nvm { #define ICE_AQC_NVM_LLDP_STATUS_M_LEN 4 /* In Bits */ #define ICE_AQC_NVM_LLDP_STATUS_RD_LEN 4 /* In Bytes */ +#define ICE_AQC_NVM_SDP_CFG_PTR_OFFSET 0xD8 +#define ICE_AQC_NVM_SDP_CFG_PTR_RD_LEN 2 /* In Bytes */ +#define ICE_AQC_NVM_SDP_CFG_PTR_M MAKEMASK(0x7FFF, 0) +#define ICE_AQC_NVM_SDP_CFG_PTR_TYPE_M BIT(15) +#define ICE_AQC_NVM_SDP_CFG_HEADER_LEN 2 /* In Bytes */ +#define ICE_AQC_NVM_SDP_CFG_SEC_LEN_LEN 2 /* In Bytes */ +#define ICE_AQC_NVM_SDP_CFG_DATA_LEN 14 /* In Bytes */ +#define ICE_AQC_NVM_SDP_CFG_MAX_SECTION_SIZE 7 +#define ICE_AQC_NVM_SDP_CFG_PIN_SIZE 10 +#define ICE_AQC_NVM_SDP_CFG_PIN_OFFSET 6 +#define ICE_AQC_NVM_SDP_CFG_PIN_MASK MAKEMASK(0x3FF, \ + ICE_AQC_NVM_SDP_CFG_PIN_OFFSET) +#define ICE_AQC_NVM_SDP_CFG_CHAN_OFFSET 4 +#define ICE_AQC_NVM_SDP_CFG_CHAN_MASK MAKEMASK(0x3, \ + ICE_AQC_NVM_SDP_CFG_CHAN_OFFSET) +#define ICE_AQC_NVM_SDP_CFG_DIR_OFFSET 3 +#define ICE_AQC_NVM_SDP_CFG_DIR_MASK MAKEMASK(0x1, \ + ICE_AQC_NVM_SDP_CFG_DIR_OFFSET) +#define ICE_AQC_NVM_SDP_CFG_SDP_NUM_OFFSET 0 +#define ICE_AQC_NVM_SDP_CFG_SDP_NUM_MASK MAKEMASK(0x7, \ + ICE_AQC_NVM_SDP_CFG_SDP_NUM_OFFSET) +#define ICE_AQC_NVM_SDP_CFG_NA_PIN_MASK MAKEMASK(0x1, 15) + #define ICE_AQC_NVM_MINSREV_MOD_ID 0x130 #define ICE_AQC_NVM_TX_TOPO_MOD_ID 0x14B #define ICE_AQC_NVM_CMPO_MOD_ID 0x153 @@ -2265,6 +2365,29 @@ struct ice_aqc_nvm_checksum { u8 rsvd2[12]; }; +/* Used for NVM Sanitization command - 0x070C */ +struct ice_aqc_nvm_sanitization { + u8 cmd_flags; +#define ICE_AQ_NVM_SANITIZE_REQ_READ 0 +#define ICE_AQ_NVM_SANITIZE_REQ_OPERATE BIT(0) + +#define ICE_AQ_NVM_SANITIZE_READ_SUBJECT_NVM_BITS 0 +#define ICE_AQ_NVM_SANITIZE_READ_SUBJECT_NVM_STATE BIT(1) +#define ICE_AQ_NVM_SANITIZE_OPERATE_SUBJECT_CLEAR 0 + u8 values; +#define ICE_AQ_NVM_SANITIZE_NVM_BITS_HOST_CLEAN_SUPPORT BIT(0) +#define ICE_AQ_NVM_SANITIZE_NVM_BITS_BMC_CLEAN_SUPPORT BIT(2) +#define ICE_AQ_NVM_SANITIZE_NVM_STATE_HOST_CLEAN_DONE BIT(0) +#define ICE_AQ_NVM_SANITIZE_NVM_STATE_HOST_CLEAN_SUCCESS BIT(1) +#define ICE_AQ_NVM_SANITIZE_NVM_STATE_BMC_CLEAN_DONE BIT(2) +#define ICE_AQ_NVM_SANITIZE_NVM_STATE_BMC_CLEAN_SUCCESS BIT(3) +#define ICE_AQ_NVM_SANITIZE_OPERATE_HOST_CLEAN_DONE BIT(0) +#define ICE_AQ_NVM_SANITIZE_OPERATE_HOST_CLEAN_SUCCESS BIT(1) +#define ICE_AQ_NVM_SANITIZE_OPERATE_BMC_CLEAN_DONE BIT(2) +#define ICE_AQ_NVM_SANITIZE_OPERATE_BMC_CLEAN_SUCCESS BIT(3) + u8 reserved[14]; +}; + /* * Send to PF command (indirect 0x0801) ID is only used by PF * @@ -2560,6 +2683,15 @@ struct ice_aqc_get_set_rss_lut { __le32 addr_low; }; +/* Sideband Control Interface Commands */ +/* Neighbor Device Request (indirect 0x0C00); also used for the response. */ +struct ice_aqc_neigh_dev_req { + __le16 sb_data_len; + u8 reserved[6]; + __le32 addr_high; + __le32 addr_low; +}; + /* Add Tx LAN Queues (indirect 0x0C30) */ struct ice_aqc_add_txqs { u8 num_qgrps; @@ -2812,19 +2944,33 @@ struct ice_aqc_event_lan_overflow { /* Debug Dump Internal Data (indirect 0xFF08) */ struct ice_aqc_debug_dump_internals { __le16 cluster_id; /* Expresses next cluster ID in response */ -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_SW 0 -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_TXSCHED 2 -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_PROFILES 3 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_SW_E810 0 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_ACL_E810 1 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_TXSCHED_E810 2 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_PROFILES_E810 3 /* EMP_DRAM only dumpable in device debug mode */ -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_EMP_DRAM 4 -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_LINK 5 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_EMP_DRAM_E810 4 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_LINK_E810 5 /* AUX_REGS only dumpable in device debug mode */ -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_AUX_REGS 6 -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_DCB 7 -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_L2P 8 -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_QUEUE_MNG 9 -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_FULL_CSR_SPACE 21 -#define ICE_AQC_DBG_DUMP_CLUSTER_ID_MNG_TRANSACTIONS 22 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_AUX_REGS_E810 6 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_DCB_E810 7 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_L2P_E810 8 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_QUEUE_MNG_E810 9 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_FULL_CSR_SPACE_E810 21 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_MNG_TRANSACTIONS_E810 22 + +/* Start cluster to discover first available cluster */ +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_START_ALL 0 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_SW_E830 100 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_ACL_E830 101 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_TXSCHED_E830 102 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_PROFILES_E830 103 +/* EMP_DRAM only dumpable in device debug mode */ +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_LINK_E830 105 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_DCB_E830 107 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_L2P_E830 108 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_QUEUE_MNG_E830 109 +#define ICE_AQC_DBG_DUMP_CLUSTER_ID_FULL_CSR_SPACE_E830 121 __le16 table_id; /* Used only for non-memory clusters */ __le32 idx; /* In table entries for tables, in bytes for memory */ __le32 addr_high; @@ -3076,6 +3222,7 @@ struct ice_aq_desc { struct ice_aqc_nvm nvm; struct ice_aqc_nvm_cfg nvm_cfg; struct ice_aqc_nvm_checksum nvm_checksum; + struct ice_aqc_nvm_sanitization sanitization; struct ice_aqc_pf_vf_msg virt; struct ice_aqc_read_write_alt_direct read_write_alt_direct; struct ice_aqc_read_write_alt_indirect read_write_alt_indirect; @@ -3095,6 +3242,7 @@ struct ice_aq_desc { struct ice_aqc_lldp_filter_ctrl lldp_filter_ctrl; struct ice_aqc_get_set_rss_lut get_set_rss_lut; struct ice_aqc_get_set_rss_key get_set_rss_key; + struct ice_aqc_neigh_dev_req neigh_dev; struct ice_aqc_add_txqs add_txqs; struct ice_aqc_dis_txqs dis_txqs; struct ice_aqc_move_txqs move_txqs; @@ -3330,6 +3478,7 @@ enum ice_adminq_opc { ice_aqc_opc_nvm_update_empr = 0x0709, ice_aqc_opc_nvm_pkg_data = 0x070A, ice_aqc_opc_nvm_pass_component_tbl = 0x070B, + ice_aqc_opc_nvm_sanitization = 0x070C, /* PF/VF mailbox commands */ ice_mbx_opc_send_msg_to_pf = 0x0801, @@ -3360,6 +3509,8 @@ enum ice_adminq_opc { ice_aqc_opc_set_rss_lut = 0x0B03, ice_aqc_opc_get_rss_key = 0x0B04, ice_aqc_opc_get_rss_lut = 0x0B05, + /* Sideband Control Interface commands */ + ice_aqc_opc_neighbour_device_request = 0x0C00, /* Tx queue handling commands/events */ ice_aqc_opc_add_txqs = 0x0C30, diff --git a/sys/dev/ice/ice_bitops.h b/sys/dev/ice/ice_bitops.h index 499ee41228c3..c480900596f4 100644 --- a/sys/dev/ice/ice_bitops.h +++ b/sys/dev/ice/ice_bitops.h @@ -445,10 +445,10 @@ ice_bitmap_set(ice_bitmap_t *dst, u16 pos, u16 num_bits) * Note that this function assumes it is operating on a bitmap declared using * ice_declare_bitmap. */ -static inline int +static inline u16 ice_bitmap_hweight(ice_bitmap_t *bm, u16 size) { - int count = 0; + u16 count = 0; u16 bit = 0; while (size > (bit = ice_find_next_bit(bm, size, bit))) { diff --git a/sys/dev/ice/ice_common.c b/sys/dev/ice/ice_common.c index ef487bcfd0f4..ad4ea4c8e7a1 100644 --- a/sys/dev/ice/ice_common.c +++ b/sys/dev/ice/ice_common.c @@ -32,7 +32,6 @@ #include "ice_common.h" #include "ice_sched.h" #include "ice_adminq_cmd.h" - #include "ice_flow.h" #include "ice_switch.h" @@ -111,6 +110,17 @@ static const char * const ice_link_mode_str_high[] = { ice_arr_elem_idx(2, "100G_CAUI2"), ice_arr_elem_idx(3, "100G_AUI2_AOC_ACC"), ice_arr_elem_idx(4, "100G_AUI2"), + ice_arr_elem_idx(5, "200G_CR4_PAM4"), + ice_arr_elem_idx(6, "200G_SR4"), + ice_arr_elem_idx(7, "200G_FR4"), + ice_arr_elem_idx(8, "200G_LR4"), + ice_arr_elem_idx(9, "200G_DR4"), + ice_arr_elem_idx(10, "200G_KR4_PAM4"), + ice_arr_elem_idx(11, "200G_AUI4_AOC_ACC"), + ice_arr_elem_idx(12, "200G_AUI4"), + ice_arr_elem_idx(13, "200G_AUI8_AOC_ACC"), + ice_arr_elem_idx(14, "200G_AUI8"), + ice_arr_elem_idx(15, "400GBASE_FR8"), }; /** @@ -151,7 +161,7 @@ ice_dump_phy_type(struct ice_hw *hw, u64 low, u64 high, const char *prefix) * This function sets the MAC type of the adapter based on the * vendor ID and device ID stored in the HW structure. */ -enum ice_status ice_set_mac_type(struct ice_hw *hw) +int ice_set_mac_type(struct ice_hw *hw) { ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); @@ -188,13 +198,43 @@ enum ice_status ice_set_mac_type(struct ice_hw *hw) case ICE_DEV_ID_E823C_SGMII: hw->mac_type = ICE_MAC_GENERIC; break; + case ICE_DEV_ID_E825C_BACKPLANE: + case ICE_DEV_ID_E825C_QSFP: + case ICE_DEV_ID_E825C_SFP: + case ICE_DEV_ID_E825C_SGMII: + hw->mac_type = ICE_MAC_GENERIC_3K_E825; + break; + case ICE_DEV_ID_E830_BACKPLANE: + case ICE_DEV_ID_E830_QSFP56: + case ICE_DEV_ID_E830_SFP: + case ICE_DEV_ID_E830C_BACKPLANE: + case ICE_DEV_ID_E830_L_BACKPLANE: + case ICE_DEV_ID_E830C_QSFP: + case ICE_DEV_ID_E830_L_QSFP: + case ICE_DEV_ID_E830C_SFP: + case ICE_DEV_ID_E830_L_SFP: + hw->mac_type = ICE_MAC_E830; + break; default: hw->mac_type = ICE_MAC_UNKNOWN; break; } ice_debug(hw, ICE_DBG_INIT, "mac_type: %d\n", hw->mac_type); - return ICE_SUCCESS; + return 0; +} + +/** + * ice_is_generic_mac + * @hw: pointer to the hardware structure + * + * returns true if mac_type is ICE_MAC_GENERIC, false if not + */ +bool ice_is_generic_mac(struct ice_hw *hw) +{ + return (hw->mac_type == ICE_MAC_GENERIC || + hw->mac_type == ICE_MAC_GENERIC_3K || + hw->mac_type == ICE_MAC_GENERIC_3K_E825); } /** @@ -223,7 +263,7 @@ bool ice_is_e810t(struct ice_hw *hw) case ICE_SUBDEV_ID_E810T2: case ICE_SUBDEV_ID_E810T3: case ICE_SUBDEV_ID_E810T4: - case ICE_SUBDEV_ID_E810T5: + case ICE_SUBDEV_ID_E810T6: case ICE_SUBDEV_ID_E810T7: return true; } @@ -231,8 +271,8 @@ bool ice_is_e810t(struct ice_hw *hw) case ICE_DEV_ID_E810C_QSFP: switch (hw->subsystem_device_id) { case ICE_SUBDEV_ID_E810T2: + case ICE_SUBDEV_ID_E810T3: case ICE_SUBDEV_ID_E810T5: - case ICE_SUBDEV_ID_E810T6: return true; } break; @@ -243,6 +283,17 @@ bool ice_is_e810t(struct ice_hw *hw) return false; } +/** + * ice_is_e830 + * @hw: pointer to the hardware structure + * + * returns true if the device is E830 based, false if not. + */ +bool ice_is_e830(struct ice_hw *hw) +{ + return hw->mac_type == ICE_MAC_E830; +} + /** * ice_is_e823 * @hw: pointer to the hardware structure @@ -268,6 +319,25 @@ bool ice_is_e823(struct ice_hw *hw) } } +/** + * ice_is_e825c + * @hw: pointer to the hardware structure + * + * returns true if the device is E825-C based, false if not. + */ +bool ice_is_e825c(struct ice_hw *hw) +{ + switch (hw->device_id) { + case ICE_DEV_ID_E825C_BACKPLANE: + case ICE_DEV_ID_E825C_QSFP: + case ICE_DEV_ID_E825C_SFP: + case ICE_DEV_ID_E825C_SGMII: + return true; + default: + return false; + } +} + /** * ice_clear_pf_cfg - Clear PF configuration * @hw: pointer to the hardware structure @@ -275,7 +345,7 @@ bool ice_is_e823(struct ice_hw *hw) * Clears any existing PF configuration (VSIs, VSI lists, switch rules, port * configuration, flow director filters, etc.). */ -enum ice_status ice_clear_pf_cfg(struct ice_hw *hw) +int ice_clear_pf_cfg(struct ice_hw *hw) { struct ice_aq_desc desc; @@ -299,14 +369,14 @@ enum ice_status ice_clear_pf_cfg(struct ice_hw *hw) * ice_discover_dev_caps is expected to be called before this function is * called. */ -enum ice_status +int ice_aq_manage_mac_read(struct ice_hw *hw, void *buf, u16 buf_size, struct ice_sq_cd *cd) { struct ice_aqc_manage_mac_read_resp *resp; struct ice_aqc_manage_mac_read *cmd; struct ice_aq_desc desc; - enum ice_status status; + int status; u16 flags; u8 i; @@ -340,7 +410,7 @@ ice_aq_manage_mac_read(struct ice_hw *hw, void *buf, u16 buf_size, ETH_ALEN, ICE_NONDMA_TO_NONDMA); break; } - return ICE_SUCCESS; + return 0; } /** @@ -401,16 +471,21 @@ static void ice_set_media_type(struct ice_port_info *pi) * type is FIBER */ else if (ice_phy_maps_to_media(phy_type_low, phy_type_high, - ICE_MEDIA_OPT_PHY_TYPE_LOW_M, 0) || - (phy_type_low & ICE_MEDIA_OPT_PHY_TYPE_LOW_M && - phy_type_low & ICE_MEDIA_C2M_PHY_TYPE_LOW_M)) + ICE_MEDIA_OPT_PHY_TYPE_LOW_M, + ICE_MEDIA_OPT_PHY_TYPE_HIGH_M) || + ((phy_type_low & ICE_MEDIA_OPT_PHY_TYPE_LOW_M || + phy_type_high & ICE_MEDIA_OPT_PHY_TYPE_HIGH_M) && + (phy_type_low & ICE_MEDIA_C2M_PHY_TYPE_LOW_M || + phy_type_high & ICE_MEDIA_C2C_PHY_TYPE_HIGH_M))) *media_type = ICE_MEDIA_FIBER; /* else if PHY types are only DA, or DA and C2C, then media type DA */ else if (ice_phy_maps_to_media(phy_type_low, phy_type_high, - ICE_MEDIA_DAC_PHY_TYPE_LOW_M, 0) || - (phy_type_low & ICE_MEDIA_DAC_PHY_TYPE_LOW_M && - (phy_type_low & ICE_MEDIA_C2C_PHY_TYPE_LOW_M || - phy_type_high & ICE_MEDIA_C2C_PHY_TYPE_HIGH_M))) + ICE_MEDIA_DAC_PHY_TYPE_LOW_M, + ICE_MEDIA_DAC_PHY_TYPE_HIGH_M) || + ((phy_type_low & ICE_MEDIA_DAC_PHY_TYPE_LOW_M || + phy_type_high & ICE_MEDIA_DAC_PHY_TYPE_HIGH_M) && + (phy_type_low & ICE_MEDIA_C2C_PHY_TYPE_LOW_M || + phy_type_high & ICE_MEDIA_C2C_PHY_TYPE_HIGH_M))) *media_type = ICE_MEDIA_DA; /* else if PHY types are only C2M or only C2C, then media is AUI */ else if (ice_phy_maps_to_media(phy_type_low, phy_type_high, @@ -435,7 +510,7 @@ static void ice_set_media_type(struct ice_port_info *pi) * * Returns the various PHY capabilities supported on the Port (0x0600) */ -enum ice_status +int ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode, struct ice_aqc_get_phy_caps_data *pcaps, struct ice_sq_cd *cd) @@ -443,9 +518,9 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode, struct ice_aqc_get_phy_caps *cmd; u16 pcaps_size = sizeof(*pcaps); struct ice_aq_desc desc; - enum ice_status status; const char *prefix; struct ice_hw *hw; + int status; cmd = &desc.params.get_phy; @@ -510,7 +585,7 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode, ice_debug(hw, ICE_DBG_LINK, "%s: module_type[2] = 0x%x\n", prefix, pcaps->module_type[2]); - if (status == ICE_SUCCESS && report_mode == ICE_AQC_REPORT_TOPO_CAP_MEDIA) { + if (!status && report_mode == ICE_AQC_REPORT_TOPO_CAP_MEDIA) { pi->phy.phy_type_low = LE64_TO_CPU(pcaps->phy_type_low); pi->phy.phy_type_high = LE64_TO_CPU(pcaps->phy_type_high); ice_memcpy(pi->phy.link_info.module_type, &pcaps->module_type, @@ -525,81 +600,65 @@ ice_aq_get_phy_caps(struct ice_port_info *pi, bool qual_mods, u8 report_mode, } /** - * ice_aq_get_netlist_node - * @hw: pointer to the hw struct - * @cmd: get_link_topo AQ structure - * @node_part_number: output node part number if node found - * @node_handle: output node handle parameter if node found + * ice_aq_get_phy_equalization - function to read serdes equalizer value from + * firmware using admin queue command. + * @hw: pointer to the HW struct + * @data_in: represents the serdes equalization parameter requested + * @op_code: represents the serdes number and flag to represent tx or rx + * @serdes_num: represents the serdes number + * @output: pointer to the caller-supplied buffer to return serdes equalizer + * + * Returns 0 on success, + * non-zero status on error */ -enum ice_status -ice_aq_get_netlist_node(struct ice_hw *hw, struct ice_aqc_get_link_topo *cmd, - u8 *node_part_number, u16 *node_handle) +int ice_aq_get_phy_equalization(struct ice_hw *hw, u16 data_in, u16 op_code, + u8 serdes_num, int *output) { + struct ice_aqc_dnl_call_command *cmd; + struct ice_aqc_dnl_call buf; struct ice_aq_desc desc; + int err = 0; - ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_get_link_topo); - desc.params.get_link_topo = *cmd; + if (!hw || !output) + return (ICE_ERR_PARAM); - if (ice_aq_send_cmd(hw, &desc, NULL, 0, NULL)) - return ICE_ERR_NOT_SUPPORTED; + memset(&buf, 0, sizeof(buf)); + buf.sto.txrx_equa_reqs.data_in = CPU_TO_LE16(data_in); + buf.sto.txrx_equa_reqs.op_code_serdes_sel = + CPU_TO_LE16(op_code | (serdes_num & 0xF)); - if (node_handle) - *node_handle = - LE16_TO_CPU(desc.params.get_link_topo.addr.handle); - if (node_part_number) - *node_part_number = desc.params.get_link_topo.node_part_num; + cmd = &desc.params.dnl_call; + ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_dnl_call); + desc.flags |= CPU_TO_LE16(ICE_AQ_FLAG_BUF | ICE_AQ_FLAG_RD | + ICE_AQ_FLAG_SI); + desc.datalen = CPU_TO_LE16(sizeof(struct ice_aqc_dnl_call)); + cmd->activity_id = CPU_TO_LE16(ICE_AQC_ACT_ID_DNL); + cmd->ctx = 0; - return ICE_SUCCESS; + err = ice_aq_send_cmd(hw, &desc, &buf, + sizeof(struct ice_aqc_dnl_call), NULL); + if (!err) + *output = buf.sto.txrx_equa_resp.val; + + return err; } -#define MAX_NETLIST_SIZE 10 +#define ice_get_link_status_data_ver(hw) ((hw)->mac_type == ICE_MAC_E830 ? \ + ICE_GET_LINK_STATUS_DATA_V2 : ICE_GET_LINK_STATUS_DATA_V1) + /** - * ice_find_netlist_node - * @hw: pointer to the hw struct - * @node_type_ctx: type of netlist node to look for - * @node_part_number: node part number to look for - * @node_handle: output parameter if node found - optional + * ice_get_link_status_datalen + * @hw: pointer to the HW struct * - * Find and return the node handle for a given node type and part number in the - * netlist. When found ICE_SUCCESS is returned, ICE_ERR_DOES_NOT_EXIST - * otherwise. If node_handle provided, it would be set to found node handle. + * return Get Link Status datalen */ -enum ice_status -ice_find_netlist_node(struct ice_hw *hw, u8 node_type_ctx, u8 node_part_number, - u16 *node_handle) +static u16 ice_get_link_status_datalen(struct ice_hw *hw) { - struct ice_aqc_get_link_topo cmd; - u8 rec_node_part_number; - u16 rec_node_handle; - u8 idx; - - for (idx = 0; idx < MAX_NETLIST_SIZE; idx++) { - enum ice_status status; - - memset(&cmd, 0, sizeof(cmd)); - - cmd.addr.topo_params.node_type_ctx = - (node_type_ctx << ICE_AQC_LINK_TOPO_NODE_TYPE_S); - cmd.addr.topo_params.index = idx; - - status = ice_aq_get_netlist_node(hw, &cmd, - &rec_node_part_number, - &rec_node_handle); - if (status) - return status; - - if (rec_node_part_number == node_part_number) { - if (node_handle) - *node_handle = rec_node_handle; - return ICE_SUCCESS; - } - } - - return ICE_ERR_DOES_NOT_EXIST; + return (ice_get_link_status_data_ver(hw) == + ICE_GET_LINK_STATUS_DATA_V1) ? ICE_GET_LINK_STATUS_DATALEN_V1 : + ICE_GET_LINK_STATUS_DATALEN_V2; } -#define ice_get_link_status_datalen(hw) ICE_GET_LINK_STATUS_DATALEN_V1 - /** * ice_aq_get_link_info * @pi: port information structure @@ -609,7 +668,7 @@ ice_find_netlist_node(struct ice_hw *hw, u8 node_type_ctx, u8 node_part_number, * * Get Link Status (0x607). Returns the link status of the adapter. */ -enum ice_status +int ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, struct ice_link_status *link, struct ice_sq_cd *cd) { @@ -619,9 +678,9 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, struct ice_fc_info *hw_fc_info; bool tx_pause, rx_pause; struct ice_aq_desc desc; - enum ice_status status; struct ice_hw *hw; u16 cmd_flags; + int status; if (!pi) return ICE_ERR_PARAM; @@ -639,7 +698,7 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, status = ice_aq_send_cmd(hw, &desc, &link_data, ice_get_link_status_datalen(hw), cd); - if (status != ICE_SUCCESS) + if (status) return status; /* save off old link status information */ @@ -696,7 +755,7 @@ ice_aq_get_link_info(struct ice_port_info *pi, bool ena_lse, /* flag cleared so calling functions don't call AQ again */ pi->phy.get_link_info = false; - return ICE_SUCCESS; + return 0; } /** @@ -721,17 +780,28 @@ ice_fill_tx_timer_and_fc_thresh(struct ice_hw *hw, * Also, because we are operating on transmit timer and fc * threshold of LFC, we don't turn on any bit in tx_tmr_priority */ -#define IDX_OF_LFC PRTMAC_HSEC_CTL_TX_PAUSE_QUANTA_MAX_INDEX +#define E800_IDX_OF_LFC E800_PRTMAC_HSEC_CTL_TX_PAUSE_QUANTA_MAX_INDEX - /* Retrieve the transmit timer */ - val = rd32(hw, PRTMAC_HSEC_CTL_TX_PAUSE_QUANTA(IDX_OF_LFC)); - tx_timer_val = val & - PRTMAC_HSEC_CTL_TX_PAUSE_QUANTA_HSEC_CTL_TX_PAUSE_QUANTA_M; - cmd->tx_tmr_value = CPU_TO_LE16(tx_timer_val); + if ((hw)->mac_type == ICE_MAC_E830) { + /* Retrieve the transmit timer */ + val = rd32(hw, E830_PRTMAC_CL01_PAUSE_QUANTA); + tx_timer_val = val & E830_PRTMAC_CL01_PAUSE_QUANTA_CL0_PAUSE_QUANTA_M; + cmd->tx_tmr_value = CPU_TO_LE16(tx_timer_val); - /* Retrieve the fc threshold */ - val = rd32(hw, PRTMAC_HSEC_CTL_TX_PAUSE_REFRESH_TIMER(IDX_OF_LFC)); - fc_thres_val = val & PRTMAC_HSEC_CTL_TX_PAUSE_REFRESH_TIMER_M; + /* Retrieve the fc threshold */ + val = rd32(hw, E830_PRTMAC_CL01_QUANTA_THRESH); + fc_thres_val = val & E830_PRTMAC_CL01_QUANTA_THRESH_CL0_QUANTA_THRESH_M; + } else { + /* Retrieve the transmit timer */ + val = rd32(hw, E800_PRTMAC_HSEC_CTL_TX_PAUSE_QUANTA(E800_IDX_OF_LFC)); + tx_timer_val = val & + E800_PRTMAC_HSEC_CTL_TX_PAUSE_QUANTA_HSEC_CTL_TX_PAUSE_QUANTA_M; + cmd->tx_tmr_value = CPU_TO_LE16(tx_timer_val); + + /* Retrieve the fc threshold */ + val = rd32(hw, E800_PRTMAC_HSEC_CTL_TX_PAUSE_REFRESH_TIMER(E800_IDX_OF_LFC)); + fc_thres_val = val & E800_PRTMAC_HSEC_CTL_TX_PAUSE_REFRESH_TIMER_M; + } cmd->fc_refresh_threshold = CPU_TO_LE16(fc_thres_val); } @@ -745,7 +815,7 @@ ice_fill_tx_timer_and_fc_thresh(struct ice_hw *hw, * * Set MAC configuration (0x0603) */ -enum ice_status +int ice_aq_set_mac_cfg(struct ice_hw *hw, u16 max_frame_size, bool auto_drop, struct ice_sq_cd *cd) { @@ -772,10 +842,10 @@ ice_aq_set_mac_cfg(struct ice_hw *hw, u16 max_frame_size, bool auto_drop, * ice_init_fltr_mgmt_struct - initializes filter management list and locks * @hw: pointer to the HW struct */ -static enum ice_status ice_init_fltr_mgmt_struct(struct ice_hw *hw) +int ice_init_fltr_mgmt_struct(struct ice_hw *hw) { struct ice_switch_info *sw; - enum ice_status status; + int status; hw->switch_info = (struct ice_switch_info *) ice_malloc(hw, sizeof(*hw->switch_info)); @@ -793,7 +863,7 @@ static enum ice_status ice_init_fltr_mgmt_struct(struct ice_hw *hw) ice_free(hw, hw->switch_info); return status; } - return ICE_SUCCESS; + return 0; } /** @@ -866,7 +936,7 @@ ice_cleanup_fltr_mgmt_single(struct ice_hw *hw, struct ice_switch_info *sw) * ice_cleanup_fltr_mgmt_struct - cleanup filter management list and locks * @hw: pointer to the HW struct */ -static void ice_cleanup_fltr_mgmt_struct(struct ice_hw *hw) +void ice_cleanup_fltr_mgmt_struct(struct ice_hw *hw) { ice_cleanup_fltr_mgmt_single(hw, hw->switch_info); } @@ -911,7 +981,7 @@ void ice_print_rollback_msg(struct ice_hw *hw) orom = &hw->flash.orom; nvm = &hw->flash.nvm; - SNPRINTF(nvm_str, sizeof(nvm_str), "%x.%02x 0x%x %d.%d.%d", + (void)SNPRINTF(nvm_str, sizeof(nvm_str), "%x.%02x 0x%x %d.%d.%d", nvm->major, nvm->minor, nvm->eetrack, orom->major, orom->build, orom->patch); ice_warn(hw, @@ -934,12 +1004,12 @@ void ice_set_umac_shared(struct ice_hw *hw) * ice_init_hw - main hardware initialization routine * @hw: pointer to the hardware structure */ -enum ice_status ice_init_hw(struct ice_hw *hw) +int ice_init_hw(struct ice_hw *hw) { struct ice_aqc_get_phy_caps_data *pcaps; - enum ice_status status; u16 mac_buf_len; void *mac_buf; + int status; ice_debug(hw, ICE_DBG_TRACE, "%s\n", __func__); @@ -957,6 +1027,8 @@ enum ice_status ice_init_hw(struct ice_hw *hw) return status; ice_get_itr_intrl_gran(hw); + hw->fw_vsi_num = ICE_DFLT_VSI_INVAL; + status = ice_create_all_ctrlq(hw); if (status) goto err_unroll_cqinit; @@ -987,9 +1059,11 @@ enum ice_status ice_init_hw(struct ice_hw *hw) if (ice_get_fw_mode(hw) == ICE_FW_MODE_ROLLBACK) ice_print_rollback_msg(hw); - status = ice_clear_pf_cfg(hw); - if (status) - goto err_unroll_cqinit; + if (!hw->skip_clear_pf) { + status = ice_clear_pf_cfg(hw); + if (status) + goto err_unroll_cqinit; + } ice_clear_pxe_mode(hw); @@ -1005,6 +1079,8 @@ enum ice_status ice_init_hw(struct ice_hw *hw) goto err_unroll_cqinit; } + hw->port_info->loopback_mode = ICE_AQC_SET_P_PARAMS_LOOPBACK_MODE_NORMAL; + /* set the back pointer to HW */ hw->port_info->hw = hw; @@ -1088,7 +1164,7 @@ enum ice_status ice_init_hw(struct ice_hw *hw) goto err_unroll_fltr_mgmt_struct; ice_init_lock(&hw->tnl_lock); - return ICE_SUCCESS; + return 0; err_unroll_fltr_mgmt_struct: ice_cleanup_fltr_mgmt_struct(hw); @@ -1135,7 +1211,7 @@ void ice_deinit_hw(struct ice_hw *hw) * ice_check_reset - Check to see if a global reset is complete * @hw: pointer to the hardware structure */ -enum ice_status ice_check_reset(struct ice_hw *hw) +int ice_check_reset(struct ice_hw *hw) { u32 cnt, reg = 0, grst_timeout, uld_mask, reset_wait_cnt; *** 16783 LINES SKIPPED *** From nobody Thu Jul 24 14:28:00 2025 X-Original-To: dev-commits-src-all@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 4bntdX34xlz62pmr for ; Thu, 24 Jul 2025 14:28:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bntdX1RQZz3H2r; Thu, 24 Jul 2025 14:28:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753367280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dCB4NFglPIVldNdONT/2O7jilfcurvCZJR/CB7Mby64=; b=qvzo6Um2jSaSkg/8J2Ik/BHcOnNVXG5z8l5qhE5B6WXJPU0Ak55eHABHjuwN/KPh2ec59l 0PbRrq4CipDsAQMNWeaeYxgY/nwwkmN+pth8/hmsbsGpsCMK83STcK8JZ9GccIf4lgkQnc IJqGx49K032Au7WDJX8SAUJ+zjw2hiHxEysTYbabyBCPj3bCbufiqAOEyQwBIXb1Ol2TKG GuD63BPGvBGB3O26/royf+67KawSLLoKIf796cVyoTgofg6Pp9vNt1V61sofH4SVIrDO3Y c0aEiJnvFQf9itniuEGDAjzaJwRUapJqa1YX5wn42tMYubBiAVyuFW4BQOaL+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753367280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dCB4NFglPIVldNdONT/2O7jilfcurvCZJR/CB7Mby64=; b=JJ4VmIs6U4tTLV65W55h/IHS2ytXvwVQR0G2T2LPWNRXz+hYqHcX35HHP60++JfnNZ3TPA i+vxZFrdnUSmQ2Abp7K4mTE+raOIyv56GTjK+PUVwDtH9+gp+tQGPsxnvFRcoizKA2b701 wq8l0Y34BekCYWF0avu+JoVsDy/h9OzlPnOw1Zk2wCi545NrUx9jT8BP5pCwzXWKXQW4yY O73+JQHgWx8njdnGFkCN8i+HBJxyyy9LQC6sl9ZvMc88jG0oqGAaHcq+wCkXS6Dup0kHyU GFygu1awOmuqodikmqxKmTX2MixutkW1GPOBGVgT3hmoQlzafVRiOcVVWX2gtA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753367280; a=rsa-sha256; cv=none; b=kSVlEL8ptxhOBb4GNAtbgoFU0sPJ+8fYuicRmrWQKmZ0Sl0qvTKQpXZQpwqa1jTbhTaMAC hrkT0gAqQ2fhEoa0ILOxw+wFK2dNoHIZH9rfGx1PZ5ZIjATdIqgwDrpe/G8VdRhiHQnCP1 WKRLfQAS76uFfqRa7tJKBIogFd7zO0cTxSLKIUvOV47ocxAzN44W5RA2zrF4Q50r1j7bBE R2OYYpKmU5Fz8KrvTaVvpPO9rDxsgMROoW/lFWqp3uyVYEoGJw/9bVcUKzJoKse/7SDE70 wqVoKG++dWl8PGsIKvEh6jenXtE3XomQOUF8DLXO70EwdPR3W7zLY8DcE+CydQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bntdX12s2z129G; Thu, 24 Jul 2025 14:28:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OES0bE054458; Thu, 24 Jul 2025 14:28:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OES0C1054455; Thu, 24 Jul 2025 14:28:00 GMT (envelope-from git) Date: Thu, 24 Jul 2025 14:28:00 GMT Message-Id: <202507241428.56OES0C1054455@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org From: Kyle Evans Subject: git: d5db5c42f890 - internal/admin - Release ivy from mentorship List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/internal/admin X-Git-Reftype: branch X-Git-Commit: d5db5c42f8904181ebc1622d1ad0e55dbb1e163d Auto-Submitted: auto-generated The branch internal/admin has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=d5db5c42f8904181ebc1622d1ad0e55dbb1e163d commit d5db5c42f8904181ebc1622d1ad0e55dbb1e163d Author: Kyle Evans AuthorDate: 2025-07-24 14:06:44 +0000 Commit: Kyle Evans CommitDate: 2025-07-24 14:06:44 +0000 Release ivy from mentorship Approved by: srcmgr (implicit) --- mentors | 1 - 1 file changed, 1 deletion(-) diff --git a/mentors b/mentors index 605d849f5361..848e998c73b4 100644 --- a/mentors +++ b/mentors @@ -14,7 +14,6 @@ aokblast lwhsu Co-mentor: markj brd allanjude Co-mentor: bapt bryanv grehan def oshogbo -ivy kevans Co-mentor: des jlduran emaste kgalazka erj Co-mentor: kbowling khorben philip From nobody Thu Jul 24 14:59:21 2025 X-Original-To: dev-commits-src-all@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 4bnvKj6MLzz62qv1; Thu, 24 Jul 2025 14:59:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnvKj4Dh5z3V4S; Thu, 24 Jul 2025 14:59:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753369161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KEhMhzomXVmjrOC46yWkytzEZK6A+DiOhSUzCEIAJek=; b=ZkTxtJym/wg1EKbEaUr0MzDI+Ck0v5tlWrNwb25xGDrYifkJqL+wE7ex2hfiDkxlHc4bYf uxM0s0S+XTDt5AGXejfq5x+GEgWAaHelc4DwgpaXwfuo6l6/ilbvWI7kdtDfEt/U7RLkvM tBNCjj2WNPYzJ+ZpIOBzldFLpX3ohEIdDaVcTeEfg1oxTZA18wCfQsWZBRxNRsH9uy8JLk Kb1faar89LOArxj2+zYBSdwUiAa5arxtHZWGs1eBT1Yj7MGuUQ+q7g1gmF5TtlVm/6CcLS 2yTJQ5E7WshAphABBMkLJpUxpiQzdD+1hSlaE1BPawiFOCWV9hzZN+L/OYgecQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753369161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KEhMhzomXVmjrOC46yWkytzEZK6A+DiOhSUzCEIAJek=; b=jsbd2paIYv/0aIjO6xuhMmX0B8GkA2MIxz/V4CvHeGheX0Vvq+zDHN43ZSgAMvYLHUzwxY WdJ6E8rH31Hac267hbxIYfw2XrzKSTv12BsySE8N3MD+1L6CbjAaKD5aDtumq4nToahxOj Uj+GWYVLxQ8giXG9W7AuqjD+GcUZ5XZXSGivx61jnThqd2vdRuCPjsSAcJK0Fi8714VO/D 8R/jyiNstvxP7GZ9QSuvlys7I3vLxU7i8By1KNpx3qcqGFUxo012aQehfMXGo9gQhASgIU 17qLAHMmKLcPr23y9C7XctlFrJTNv5mz7QedqYrncO4I5dDoCLh8WoabE2ucUA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753369161; a=rsa-sha256; cv=none; b=bAd02DIzpLl70yYBkvONAwUm9rqTKJ4bbdFxjCNSksm9ZfT2wD1rZSoNiys81VJdhK5Ziw 1Gqm/P/78eAmRl9kbALxfzYeRsTr8qPdOAGqfC7A62SA9uOvxyQFgktO9SdONcxVmYbB7n LbPGymvnC+3sLcxqmjP7UyZSKACV18zO2guiqkBJY/4rfDMbPcK8A+mCi5CXBpugSdTx/z prJHTpkpXxx8G4dwvb9KuW+VpF4X0rFc1yD/YpDW3K+zrV9vI1j7Sn/KMGyVQyBVL1EPck +VOK1O1laOEvDvpByxjw9WzVpSLnyNfeagiryGD56T6ED+TlB37xewelHwBHRA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnvKj2fLBz13T4; Thu, 24 Jul 2025 14:59:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OExLTM011216; Thu, 24 Jul 2025 14:59:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OExL1x011213; Thu, 24 Jul 2025 14:59:21 GMT (envelope-from git) Date: Thu, 24 Jul 2025 14:59:21 GMT Message-Id: <202507241459.56OExL1x011213@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 5138a20765c7 - main - tftpd: explicitly set egid after dropping supplemental groups List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 5138a20765c76cdc8f245d3d7caeffe9a9011bb2 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=5138a20765c76cdc8f245d3d7caeffe9a9011bb2 commit 5138a20765c76cdc8f245d3d7caeffe9a9011bb2 Author: Kyle Evans AuthorDate: 2025-07-24 14:59:07 +0000 Commit: Kyle Evans CommitDate: 2025-07-24 14:59:07 +0000 tftpd: explicitly set egid after dropping supplemental groups tftpd seems to be the last program in base that implicitly relies on setgroups() to set the egid. This is a security landmine in portable software as most operating systems don't behave this way, so do an explicit setgid() in case the kernel doesn't set it already. While we're here, FreeBSD's setgroups() has supported nominally clearing all supplemental groups since 1997. It still leaves the egid in our cr_groups[0] because we don't have an out-of-band way to store the egid, and on other systems it'll clear the supplemental group entirely as one would want. Reviewed by: allanjude (previous version), des, olce Differential Revision: https://reviews.freebsd.org/D51149 --- libexec/tftpd/tftpd.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libexec/tftpd/tftpd.c b/libexec/tftpd/tftpd.c index f8f9bd549a2e..a3faee86e7d0 100644 --- a/libexec/tftpd/tftpd.c +++ b/libexec/tftpd/tftpd.c @@ -351,10 +351,14 @@ main(int argc, char *argv[]) tftp_log(LOG_ERR, "chdir: %s", strerror(errno)); exit(1); } - if (setgroups(1, &nobody->pw_gid) != 0) { + if (setgroups(0, NULL) != 0) { tftp_log(LOG_ERR, "setgroups failed"); exit(1); } + if (setgid(nobody->pw_gid) != 0) { + tftp_log(LOG_ERR, "setgid failed"); + exit(1); + } if (setuid(nobody->pw_uid) != 0) { tftp_log(LOG_ERR, "setuid failed"); exit(1); From nobody Thu Jul 24 14:59:22 2025 X-Original-To: dev-commits-src-all@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 4bnvKk6XMCz62rJb; Thu, 24 Jul 2025 14:59: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnvKk47jwz3V4T; Thu, 24 Jul 2025 14:59:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753369162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z4HzgT5zfPTB9iS6hE+575v4cNccH/f89tQ7/h5Vn9I=; b=uvTlP8lrkBcAlb1yO4RpgOVq89uQ+JOnwVXlZxZxvlibW9fr7/SXlLcUYHjwAI5vibzF0W wFQ9zMvEDUCKwvtHOTiV/1UM5v4vRTEC3JL8bGwySH1L+7Jy+r9kwPW+nzBXJ6rX+LnABf Mmz/L/ls9XeLzM3Yf5P/ic3WlYvyjXAxtw7lTLob7lACzy8i+476OJGlpLfxkKxOLh8ati 1MQyTWsovJeMPCfN3C0eTpEur2UTzLVTGhrI+W09yZlXKGJAGQxN7OJO634vEDWvVsxP+L +JbxYQydTQxln3vJK1GeqonOp3jOTvO0ZdkjvlYc/6MiA0Zb6OpXX8M67Utv5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753369162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z4HzgT5zfPTB9iS6hE+575v4cNccH/f89tQ7/h5Vn9I=; b=k+vjdjCbRsDQcSFAL1lQVJS5A8H7nlPYo7tNCGtWKJl2vZmsDEPPC0XaF9gExO4XpS2tG4 O38tHVS42qQqbQKqhdKcreZtOvY9fxeFu7xtCsvZrcUZNuPqGc6tIAXH+akvtIkQT+dLN/ XjB8RRyDBz/qnWDnUD2xaQRZa2O+8IS4Ull7Y5sLU1mNzM4M4dwXHqEQYjiCZScOuJL5Vt Nadlu2QLlXLijIPuHXVmnDeq2yIWSHJnbD+xDuqoIwtMec4c43WvdGD1GgO2OT4SMZYXmL xnq1zUimfjA+tH3OYDRLjRH33Flhp1MN4y7tQ9yXj90tIdfeFzVYGHpJpIeO9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753369162; a=rsa-sha256; cv=none; b=i79fdhmHrHeXQhsVK4Oj1ysD6amrDOdGX/LzV8nroKr9ULMT9NN+GkPo4QqcBNQqjOA91z YppTEQvkw8Q6rFXLleaUiU9scZLcbpmTsVWeetUmnU+IA28LF3MaAp3o669KJl/6E5sioA IlQTTnXjMkY3xEEyc9Nv5LEYin7+3QxMwibf2Ec0Ig2/WJ4nxWgKtd3MD5x/FV7I9MALk/ hdG8eFD56lwFYAXdI0DLKni+6DRqdVbfUUwMw07VjfzxSDR6e06d2fC9II609uVcWL1Y0M 3S3pKSWmlVgn+ZrvSSA1mHlbkjwz4y8M5uTPcZc3zgeJ1LkatsazHV/2hOJciA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnvKk3Zxsz13T5; Thu, 24 Jul 2025 14:59:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OExM3Q011249; Thu, 24 Jul 2025 14:59:22 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OExM69011246; Thu, 24 Jul 2025 14:59:22 GMT (envelope-from git) Date: Thu, 24 Jul 2025 14:59:22 GMT Message-Id: <202507241459.56OExM69011246@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 665e898d581c - main - rpc.lockd: avoid embedding assumptions about cr_groups[0] List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 665e898d581cd518ee47a0bc385a6df75961f2fc Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=665e898d581cd518ee47a0bc385a6df75961f2fc commit 665e898d581cd518ee47a0bc385a6df75961f2fc Author: Kyle Evans AuthorDate: 2025-07-24 14:59:07 +0000 Commit: Kyle Evans CommitDate: 2025-07-24 14:59:07 +0000 rpc.lockd: avoid embedding assumptions about cr_groups[0] sys/ucred.h provides a cr_gid macro that should be used to reference the egid element of an xucred, so let's use that. While we're here, avoid assuming that the first element is the egid and include it in the group list unless it is actually the egid. This is not a functional change today: the egid is always the first group in the list, but we may want to consider changing that some day. Reviewed by: olce Differential Revision: https://reviews.freebsd.org/D51151 --- usr.sbin/rpc.lockd/kern.c | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/usr.sbin/rpc.lockd/kern.c b/usr.sbin/rpc.lockd/kern.c index c24b81159ea5..1945bd68328a 100644 --- a/usr.sbin/rpc.lockd/kern.c +++ b/usr.sbin/rpc.lockd/kern.c @@ -39,6 +39,7 @@ #include #include +#include #include #include #include @@ -232,17 +233,29 @@ void set_auth(CLIENT *cl, struct xucred *xucred) { int ngroups; + gid_t *groups; - ngroups = xucred->cr_ngroups - 1; + /* + * Exclude the first element if it is actually the egid, but account for + * the possibility that we could eventually exclude the egid from the + * exported group list some day. + */ + ngroups = xucred->cr_ngroups; + groups = &xucred->cr_groups[0]; + if (groups == &xucred->cr_gid) { + assert(ngroups > 0); + ngroups--; + groups++; + } if (ngroups > NGRPS) ngroups = NGRPS; if (cl->cl_auth != NULL) cl->cl_auth->ah_ops->ah_destroy(cl->cl_auth); cl->cl_auth = authunix_create(hostname, xucred->cr_uid, - xucred->cr_groups[0], + xucred->cr_gid, ngroups, - &xucred->cr_groups[1]); + groups); } From nobody Thu Jul 24 14:59:23 2025 X-Original-To: dev-commits-src-all@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 4bnvKl74xbz62rM0; Thu, 24 Jul 2025 14:59: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnvKl4z67z3TrT; Thu, 24 Jul 2025 14:59:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753369163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4kyZwGt/5HeT3A1aA9SOHFOP2YIb+CmguusFAcgiiGA=; b=F0JK/d9qqoDdbB6MlZx/la/gpxXs47UpQ/JQziljv7CkDigqFLEyBAlO7uqo3A2Wij5Uk5 lMElgrGu5JXXRvWU6uxPCmlHKOoXgyFHxecrX+4b415bDqVSzt/o/iyr2+556U0kNYKgdW 5+Lnh06S5daI56qgQ/eUJVp7aPkwNrPQ/CcquPUceZgKuK2R7FJj8f+QuBjNaWAh0nXNZ6 cbscFsCXE8OC9QFgWO9u8p7/RpMfpIdUzNzY1/qpHkbhePzD1i/xG1B7oeZjFWf0yH8xsF F1bau+ICSz9ayQBguWFvLOg1OEHZGMsdT1xufXz1RRDqqZz+pAUEF29rSDia1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753369163; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4kyZwGt/5HeT3A1aA9SOHFOP2YIb+CmguusFAcgiiGA=; b=Ytv1XHSLdoL7rmkCLF81RzsRIjg2GuIZHEiUxJI2L35aYRwRocbOjFX3wP+l9vsRLeUO+h N5/Rd+77USHRNh483QBXd5KuoyqeUsRnmqISyiGKuCsj/Kv5UcYch6vCAi8Vf9nQHshhq0 009mwcf+NFZncMBEo5T1kVgJEbPgBjVNZGS5MUTNMM12Igfjvoq344+RA/Di02ml1qhQJ3 aDzbQ8Hw1k8k2IWvRoGIaPWRc6yUGC8zMV66U13z2IM1aJBMRT52Joh//0XnhhrAjU9T2r /Gd5t5HcVkEdECZPDMRC99lExmUYiKNqmWV1v5cDC865882BzDdbARoHiGCK6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753369163; a=rsa-sha256; cv=none; b=c2XgyMf0DS+ue+aIXdtRFPrGXebqEeY5lM4z9kwDRZ9clqSkyY31HfkV1f4aes1oZBnOi3 pCldv0WiKr+pl7d2pCxzcSdEm7JBkGwsEOQ+o2KweWRpGm6f2krFUL4V29uzDVMJaieGpg wGUaYYQybbrjnbO+/ptYdoQXWzIjPzXAkY9VdZ0IM6n6Rll8bdnHyHvDDURU+W6C1jbq1G 5/DvSTUuv1MaQfkGaqZqLO2VUEWjOi75ceZdMPczgL4R+v8vUhC2S0kk2GKDO0mfDZLEzb 6j8a2jYhBqkUKgbu5sAb2QXOPWDj1h9ueCQ3nCQFw/sUf2XgPAgjY/y+RJZd4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnvKl4XXhz13Yv; Thu, 24 Jul 2025 14:59:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OExN7o011282; Thu, 24 Jul 2025 14:59:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OExNAs011279; Thu, 24 Jul 2025 14:59:23 GMT (envelope-from git) Date: Thu, 24 Jul 2025 14:59:23 GMT Message-Id: <202507241459.56OExNAs011279@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: d2eb8a023547 - main - bluetooth: sdpd: switch to getpeereid() instead of LOCAL_PEERCRED List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: d2eb8a023547b03246f16ce455d20a4acfd552c4 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=d2eb8a023547b03246f16ce455d20a4acfd552c4 commit d2eb8a023547b03246f16ce455d20a4acfd552c4 Author: Kyle Evans AuthorDate: 2025-07-24 14:59:07 +0000 Commit: Kyle Evans CommitDate: 2025-07-24 14:59:07 +0000 bluetooth: sdpd: switch to getpeereid() instead of LOCAL_PEERCRED sdpd's usage was mostly fine, though it debatably should have been checking the xucred version to avoid mishaps. Switch it to getpeereid() anyways to avoid embedding xucred layout details in more program. Reviewed by: emax Differential Revision: https://reviews.freebsd.org/D51152 --- usr.sbin/bluetooth/sdpd/server.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/usr.sbin/bluetooth/sdpd/server.c b/usr.sbin/bluetooth/sdpd/server.c index ab398cd9339f..05a4cb5f0236 100644 --- a/usr.sbin/bluetooth/sdpd/server.c +++ b/usr.sbin/bluetooth/sdpd/server.c @@ -345,14 +345,12 @@ server_accept_client(server_p srv, int32_t fd) return; } } else { - struct xucred cr; + uid_t uid; + gid_t gid; struct passwd *pw; /* Get peer's credentials */ - memset(&cr, 0, sizeof(cr)); - size = sizeof(cr); - - if (getsockopt(cfd, 0, LOCAL_PEERCRED, &cr, &size) < 0) { + if (getpeereid(cfd, &uid, &gid) < 0) { log_err("Could not get peer's credentials. %s (%d)", strerror(errno), errno); close(cfd); @@ -360,12 +358,12 @@ server_accept_client(server_p srv, int32_t fd) } /* Check credentials */ - pw = getpwuid(cr.cr_uid); + pw = getpwuid(uid); if (pw != NULL) priv = (strcmp(pw->pw_name, "root") == 0); else log_warning("Could not verify credentials for uid %d", - cr.cr_uid); + uid); memcpy(&srv->req_sa.l2cap_bdaddr, NG_HCI_BDADDR_ANY, sizeof(srv->req_sa.l2cap_bdaddr)); From nobody Thu Jul 24 14:59:24 2025 X-Original-To: dev-commits-src-all@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 4bnvKn2Tryz62r9L; Thu, 24 Jul 2025 14:59: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnvKm5jPFz3V4d; Thu, 24 Jul 2025 14:59:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753369164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wy3vO/lBcSWCGF7XwqtSqOjo+QwOa6cdlXVdZTzoCJ4=; b=Na94V4o2jl78ocIvYKRjrZTFkGi1528XeyTupjb0YGCG36w9lSUd7WggIwJw18hNIbwsFt f04CSigEfBHBDtdgNbXi2ywliN6RGKYnfkDzVa6Ca3xTJ105cweg1wS3kJih9p6RA6MvPX tDQ8qO6JIjboMmMWto5A6lIuLdBJLaeju6mbMrUTw5RirmiKSI2baByZe0FOx0E6wIAN7F Z8bl8KImGWIaprwBSvqBGM3aHxHI5uPkysk2bHc09u8iduoTcTBLLQ+GfNB0CpQMhu+5ij uVBaTrgVOL8SjUuIKfOOZS1QSf9DAV50w1RJNP7qr83TwRnCKoyGJdjhSZKzeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753369164; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wy3vO/lBcSWCGF7XwqtSqOjo+QwOa6cdlXVdZTzoCJ4=; b=r035jdTq0Yzu5xb3hD6N8H1uLK6Oo8tkxYiZn6UF7tBK9xn1JCVzl6BaZyqA7pw6X7jo7P A5fXSDAAkKVloteMXAamqAbnuIqFZPJOBQLaySiM65ydSzBiKSvYg3s0j6a3v9cgVDjXxZ SF6md3may9bpgcEAQyPGRgaKwxuQrCZL+vGMvZ4WyRU14PZMRWiOhmZnWuK1PGga06/Cz/ xiBW68yKrtsApAQO5AuhqfYejDFhPEiWftvAJPnoYxLcEHsnZyRm2pW8Ja13hHN0G7wLlk +6xbNcysdVi9eAzrrjxz0CCYi2Qc+S1jPoOUvJgPbRTapLkc/Tk+uzrfZ2D9/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753369164; a=rsa-sha256; cv=none; b=YjBrykmtRKz8UGY+YJLyuacKe3qxhBVmVAs5k1JIkQC54olcJEU/es3CMhWCO+ljkZKFfY jnUpkiaSwQs+kuo5LiJnNvtiI0i4ucpMgqVlY4KOe+QN8tUih5+7s3VFKZ6Z0D+c9wRXr/ +nsfIIMT0CxiLRufCOwr90/p+6RHmXKBpKinqfg2fGP6BfiwymCDFCjyyYdw58xWqS+I2g vBjxEAFReBiXE3JkSGWKY15YFDE+rWZf1ILK3veUOCwdkg23cUDWRi5CqWUL0Evt1OZzBb +O2QgViUrAwHJMS3FI/YX6pUxJ+ja7yZARWSqcSK1tpDjImOZ+4fplOclJL7Qg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnvKm5JHBz13T6; Thu, 24 Jul 2025 14:59:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OExOr8011322; Thu, 24 Jul 2025 14:59:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OExODk011320; Thu, 24 Jul 2025 14:59:24 GMT (envelope-from git) Date: Thu, 24 Jul 2025 14:59:24 GMT Message-Id: <202507241459.56OExODk011320@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 46c07316f906 - main - kern: adopt the cr_gid macro for cr_groups[0] more widely List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 46c07316f90628a82dd461376ccff64a81254325 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=46c07316f90628a82dd461376ccff64a81254325 commit 46c07316f90628a82dd461376ccff64a81254325 Author: Kyle Evans AuthorDate: 2025-07-24 14:59:08 +0000 Commit: Kyle Evans CommitDate: 2025-07-24 14:59:08 +0000 kern: adopt the cr_gid macro for cr_groups[0] more widely A future change may split cr_gid out of cr_groups[0] so that there's a cleaner separation between the supplemental groups and the effective group. Do the mechanical conversion where we can, and drop some comments where we need further work because some assumptions about cr_gid == cr_groups[0] have been made. This should not be a functional change, but downstreams and other out-of-tree code are advised to investigate their usage of cr_groups sooner rather than later, as a future change will render assumptions about these two being equivalent harmful. Reviewed by: asomers, kib, olce Differential Revision: https://reviews.freebsd.org/D51153 --- sys/fs/fuse/fuse_internal.h | 6 +++--- sys/fs/fuse/fuse_ipc.c | 2 +- sys/fs/fuse/fuse_vnops.c | 2 +- sys/fs/nfs/nfs_commonport.c | 3 ++- sys/fs/nfsclient/nfs_clrpcops.c | 3 ++- sys/kern/kern_prot.c | 38 +++++++++++++++++++------------------- sys/kern/vfs_syscalls.c | 4 ++-- sys/netpfil/pf/pf.c | 4 ++-- sys/netsmb/smb_conn.c | 4 ++-- sys/rpc/authunix_prot.c | 7 ++++--- sys/rpc/svc_auth_unix.c | 3 ++- sys/security/audit/audit.c | 2 +- sys/security/audit/audit_arg.c | 2 +- sys/ufs/ufs/ufs_vnops.c | 12 ++++++++++-- 14 files changed, 52 insertions(+), 40 deletions(-) diff --git a/sys/fs/fuse/fuse_internal.h b/sys/fs/fuse/fuse_internal.h index cddf88095840..932012b5f52a 100644 --- a/sys/fs/fuse/fuse_internal.h +++ b/sys/fs/fuse/fuse_internal.h @@ -208,9 +208,9 @@ fuse_match_cred(struct ucred *basecred, struct ucred *usercred) if (basecred->cr_uid == usercred->cr_uid && basecred->cr_uid == usercred->cr_ruid && basecred->cr_uid == usercred->cr_svuid && - basecred->cr_groups[0] == usercred->cr_groups[0] && - basecred->cr_groups[0] == usercred->cr_rgid && - basecred->cr_groups[0] == usercred->cr_svgid) + basecred->cr_gid == usercred->cr_gid && + basecred->cr_gid == usercred->cr_rgid && + basecred->cr_gid == usercred->cr_svgid) return (0); return (EPERM); diff --git a/sys/fs/fuse/fuse_ipc.c b/sys/fs/fuse/fuse_ipc.c index 0b6048644d32..a751c09159ff 100644 --- a/sys/fs/fuse/fuse_ipc.c +++ b/sys/fs/fuse/fuse_ipc.c @@ -868,7 +868,7 @@ fuse_setup_ihead(struct fuse_in_header *ihead, struct fuse_ticket *ftick, ihead->pid = pid; ihead->uid = cred->cr_uid; - ihead->gid = cred->cr_groups[0]; + ihead->gid = cred->cr_gid; } /* diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index ae28617537fd..32872e8f3f3a 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -884,7 +884,7 @@ fuse_vnop_copy_file_range(struct vop_copy_file_range_args *ap) return (EXTERROR(ENOSYS, "FUSE_COPY_FILE_RANGE does not " "support different credentials for infd and outfd")); - if (incred->cr_groups[0] != outcred->cr_groups[0]) + if (incred->cr_gid != outcred->cr_gid) return (EXTERROR(ENOSYS, "FUSE_COPY_FILE_RANGE does not " "support different credentials for infd and outfd")); diff --git a/sys/fs/nfs/nfs_commonport.c b/sys/fs/nfs/nfs_commonport.c index 0c94f4e7dc52..222cfc03e4b3 100644 --- a/sys/fs/nfs/nfs_commonport.c +++ b/sys/fs/nfs/nfs_commonport.c @@ -379,7 +379,8 @@ newnfs_setroot(struct ucred *cred) { cred->cr_uid = 0; - cred->cr_groups[0] = 0; + cred->cr_gid = 0; + /* XXXKE Fix this if cr_gid gets separated out. */ cred->cr_ngroups = 1; } diff --git a/sys/fs/nfsclient/nfs_clrpcops.c b/sys/fs/nfsclient/nfs_clrpcops.c index 2f3c59b68518..36b534be531e 100644 --- a/sys/fs/nfsclient/nfs_clrpcops.c +++ b/sys/fs/nfsclient/nfs_clrpcops.c @@ -6933,7 +6933,8 @@ nfscl_dofflayoutio(vnode_t vp, struct uio *uiop, int *iomode, int *must_commit, if ((dp->nfsdi_flags & NFSDI_TIGHTCOUPLED) == 0) { tcred = NFSNEWCRED(cred); tcred->cr_uid = flp->nfsfl_ffm[mirror].user; - tcred->cr_groups[0] = flp->nfsfl_ffm[mirror].group; + tcred->cr_gid = flp->nfsfl_ffm[mirror].group; + /* XXXKE Fix this if cr_gid gets separated out. */ tcred->cr_ngroups = 1; } else tcred = cred; diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index d9aeec68e620..0f0bc056cafd 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -287,7 +287,7 @@ sys_getgid(struct thread *td, struct getgid_args *uap) td->td_retval[0] = td->td_ucred->cr_rgid; #if defined(COMPAT_43) - td->td_retval[1] = td->td_ucred->cr_groups[0]; + td->td_retval[1] = td->td_ucred->cr_gid; #endif return (0); } @@ -307,7 +307,7 @@ int sys_getegid(struct thread *td, struct getegid_args *uap) { - td->td_retval[0] = td->td_ucred->cr_groups[0]; + td->td_retval[0] = td->td_ucred->cr_gid; return (0); } @@ -1080,7 +1080,7 @@ sys_setgid(struct thread *td, struct setgid_args *uap) gid != oldcred->cr_svgid && /* allow setgid(saved gid) */ #endif #ifdef POSIX_APPENDIX_B_4_2_2 /* Use BSD-compat clause from B.4.2.2 */ - gid != oldcred->cr_groups[0] && /* allow setgid(getegid()) */ + gid != oldcred->cr_gid && /* allow setgid(getegid()) */ #endif (error = priv_check_cred(oldcred, PRIV_CRED_SETGID)) != 0) goto fail; @@ -1092,7 +1092,7 @@ sys_setgid(struct thread *td, struct setgid_args *uap) */ if ( #ifdef POSIX_APPENDIX_B_4_2_2 /* use the clause from B.4.2.2 */ - gid == oldcred->cr_groups[0] || + gid == oldcred->cr_gid || #endif /* We are using privs. */ priv_check_cred(oldcred, PRIV_CRED_SETGID) == 0) @@ -1121,7 +1121,7 @@ sys_setgid(struct thread *td, struct setgid_args *uap) * In all cases permitted cases, we are changing the egid. * Copy credentials so other references do not see our changes. */ - if (oldcred->cr_groups[0] != gid) { + if (oldcred->cr_gid != gid) { change_egid(newcred, gid); setsugid(p); } @@ -1167,7 +1167,7 @@ sys_setegid(struct thread *td, struct setegid_args *uap) (error = priv_check_cred(oldcred, PRIV_CRED_SETEGID)) != 0) goto fail; - if (oldcred->cr_groups[0] != egid) { + if (oldcred->cr_gid != egid) { change_egid(newcred, egid); setsugid(p); } @@ -1393,12 +1393,12 @@ sys_setregid(struct thread *td, struct setregid_args *uap) if (((rgid != (gid_t)-1 && rgid != oldcred->cr_rgid && rgid != oldcred->cr_svgid) || - (egid != (gid_t)-1 && egid != oldcred->cr_groups[0] && + (egid != (gid_t)-1 && egid != oldcred->cr_gid && egid != oldcred->cr_rgid && egid != oldcred->cr_svgid)) && (error = priv_check_cred(oldcred, PRIV_CRED_SETREGID)) != 0) goto fail; - if (egid != (gid_t)-1 && oldcred->cr_groups[0] != egid) { + if (egid != (gid_t)-1 && oldcred->cr_gid != egid) { change_egid(newcred, egid); setsugid(p); } @@ -1406,9 +1406,9 @@ sys_setregid(struct thread *td, struct setregid_args *uap) change_rgid(newcred, rgid); setsugid(p); } - if ((rgid != (gid_t)-1 || newcred->cr_groups[0] != newcred->cr_rgid) && - newcred->cr_svgid != newcred->cr_groups[0]) { - change_svgid(newcred, newcred->cr_groups[0]); + if ((rgid != (gid_t)-1 || newcred->cr_gid != newcred->cr_rgid) && + newcred->cr_svgid != newcred->cr_gid) { + change_svgid(newcred, newcred->cr_gid); setsugid(p); } proc_set_cred(p, newcred); @@ -1547,17 +1547,17 @@ sys_setresgid(struct thread *td, struct setresgid_args *uap) if (((rgid != (gid_t)-1 && rgid != oldcred->cr_rgid && rgid != oldcred->cr_svgid && - rgid != oldcred->cr_groups[0]) || + rgid != oldcred->cr_gid) || (egid != (gid_t)-1 && egid != oldcred->cr_rgid && egid != oldcred->cr_svgid && - egid != oldcred->cr_groups[0]) || + egid != oldcred->cr_gid) || (sgid != (gid_t)-1 && sgid != oldcred->cr_rgid && sgid != oldcred->cr_svgid && - sgid != oldcred->cr_groups[0])) && + sgid != oldcred->cr_gid)) && (error = priv_check_cred(oldcred, PRIV_CRED_SETRESGID)) != 0) goto fail; - if (egid != (gid_t)-1 && oldcred->cr_groups[0] != egid) { + if (egid != (gid_t)-1 && oldcred->cr_gid != egid) { change_egid(newcred, egid); setsugid(p); } @@ -1626,8 +1626,8 @@ sys_getresgid(struct thread *td, struct getresgid_args *uap) error1 = copyout(&cred->cr_rgid, uap->rgid, sizeof(cred->cr_rgid)); if (uap->egid) - error2 = copyout(&cred->cr_groups[0], - uap->egid, sizeof(cred->cr_groups[0])); + error2 = copyout(&cred->cr_gid, + uap->egid, sizeof(cred->cr_gid)); if (uap->sgid) error3 = copyout(&cred->cr_svgid, uap->sgid, sizeof(cred->cr_svgid)); @@ -1737,7 +1737,7 @@ groupmember(gid_t gid, const struct ucred *cred) groups_check_positive_len(cred->cr_ngroups); - if (gid == cred->cr_groups[0]) + if (gid == cred->cr_gid) return (true); return (group_is_supplementary(gid, cred)); @@ -3015,7 +3015,7 @@ void change_egid(struct ucred *newcred, gid_t egid) { - newcred->cr_groups[0] = egid; + newcred->cr_gid = egid; } /*- diff --git a/sys/kern/vfs_syscalls.c b/sys/kern/vfs_syscalls.c index c71e0d9ee569..25d40a9806cb 100644 --- a/sys/kern/vfs_syscalls.c +++ b/sys/kern/vfs_syscalls.c @@ -2253,10 +2253,10 @@ kern_accessat(struct thread *td, int fd, const char *path, cred = td->td_ucred; if ((flag & AT_EACCESS) == 0 && ((cred->cr_uid != cred->cr_ruid || - cred->cr_rgid != cred->cr_groups[0]))) { + cred->cr_rgid != cred->cr_gid))) { usecred = crdup(cred); usecred->cr_uid = cred->cr_ruid; - usecred->cr_groups[0] = cred->cr_rgid; + usecred->cr_gid = cred->cr_rgid; td->td_ucred = usecred; } else usecred = cred; diff --git a/sys/netpfil/pf/pf.c b/sys/netpfil/pf/pf.c index c669be47b063..41e9ca27912d 100644 --- a/sys/netpfil/pf/pf.c +++ b/sys/netpfil/pf/pf.c @@ -4976,7 +4976,7 @@ pf_socket_lookup(struct pf_pdesc *pd) } INP_RLOCK_ASSERT(inp); pd->lookup.uid = inp->inp_cred->cr_uid; - pd->lookup.gid = inp->inp_cred->cr_groups[0]; + pd->lookup.gid = inp->inp_cred->cr_gid; INP_RUNLOCK(inp); return (1); @@ -5760,7 +5760,7 @@ pf_test_rule(struct pf_krule **rm, struct pf_kstate **sm, if (inp != NULL) { INP_LOCK_ASSERT(inp); pd->lookup.uid = inp->inp_cred->cr_uid; - pd->lookup.gid = inp->inp_cred->cr_groups[0]; + pd->lookup.gid = inp->inp_cred->cr_gid; pd->lookup.done = 1; } diff --git a/sys/netsmb/smb_conn.c b/sys/netsmb/smb_conn.c index 259635e2d8d5..ab6cd130a057 100644 --- a/sys/netsmb/smb_conn.c +++ b/sys/netsmb/smb_conn.c @@ -422,7 +422,7 @@ smb_vc_create(struct smb_vcspec *vcspec, if (uid == SMBM_ANY_OWNER) uid = realuid; if (gid == SMBM_ANY_GROUP) - gid = cred->cr_groups[0]; + gid = cred->cr_gid; vcp->vc_uid = uid; vcp->vc_grp = gid; @@ -765,7 +765,7 @@ smb_share_create(struct smb_vc *vcp, struct smb_sharespec *shspec, if (uid == SMBM_ANY_OWNER) uid = realuid; if (gid == SMBM_ANY_GROUP) - gid = cred->cr_groups[0]; + gid = cred->cr_gid; ssp = smb_zmalloc(sizeof(*ssp), M_SMBCONN, M_WAITOK); smb_co_init(SSTOCP(ssp), SMBL_SHARE, "smbss ilock", "smbss"); ssp->obj.co_free = smb_share_free; diff --git a/sys/rpc/authunix_prot.c b/sys/rpc/authunix_prot.c index 91fb96f44397..7b531946488a 100644 --- a/sys/rpc/authunix_prot.c +++ b/sys/rpc/authunix_prot.c @@ -93,9 +93,10 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) if (!xdr_uint32_t(xdrs, &cred->cr_uid)) return (FALSE); - if (!xdr_uint32_t(xdrs, &cred->cr_groups[0])) + if (!xdr_uint32_t(xdrs, &cred->cr_gid)) return (FALSE); + /* XXXKE Fix this is cr_gid gets separated out. */ if (xdrs->x_op == XDR_ENCODE) { ngroups = cred->cr_ngroups - 1; if (ngroups > NGRPS) @@ -105,7 +106,7 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) if (!xdr_uint32_t(xdrs, &ngroups)) return (FALSE); for (i = 0; i < ngroups; i++) { - if (i + 1 < ngroups_max + 1) { + if (i < ngroups_max) { if (!xdr_uint32_t(xdrs, &cred->cr_groups[i + 1])) return (FALSE); } else { @@ -115,7 +116,7 @@ xdr_authunix_parms(XDR *xdrs, uint32_t *time, struct xucred *cred) } if (xdrs->x_op == XDR_DECODE) { - if (ngroups + 1 > ngroups_max + 1) + if (ngroups > ngroups_max) cred->cr_ngroups = ngroups_max + 1; else cred->cr_ngroups = ngroups + 1; diff --git a/sys/rpc/svc_auth_unix.c b/sys/rpc/svc_auth_unix.c index 5d6402a05006..b10ef33be704 100644 --- a/sys/rpc/svc_auth_unix.c +++ b/sys/rpc/svc_auth_unix.c @@ -83,12 +83,13 @@ _svcauth_unix(struct svc_req *rqst, struct rpc_msg *msg) str_len = RNDUP(str_len); buf += str_len / sizeof (int32_t); xcr->cr_uid = IXDR_GET_UINT32(buf); - xcr->cr_groups[0] = IXDR_GET_UINT32(buf); + xcr->cr_gid = IXDR_GET_UINT32(buf); gid_len = (size_t)IXDR_GET_UINT32(buf); if (gid_len > NGRPS) { stat = AUTH_BADCRED; goto done; } + /* XXXKE Fix this if cr_gid gets separated out. */ for (i = 0; i < gid_len; i++) { if (i + 1 < XU_NGROUPS) xcr->cr_groups[i + 1] = IXDR_GET_INT32(buf); diff --git a/sys/security/audit/audit.c b/sys/security/audit/audit.c index 05928f1c33e8..7ec50d990d4e 100644 --- a/sys/security/audit/audit.c +++ b/sys/security/audit/audit.c @@ -279,7 +279,7 @@ audit_record_ctor(void *mem, int size, void *arg, int flags) cru2x(cred, &ar->k_ar.ar_subj_cred); ar->k_ar.ar_subj_ruid = cred->cr_ruid; ar->k_ar.ar_subj_rgid = cred->cr_rgid; - ar->k_ar.ar_subj_egid = cred->cr_groups[0]; + ar->k_ar.ar_subj_egid = cred->cr_gid; ar->k_ar.ar_subj_auid = cred->cr_audit.ai_auid; ar->k_ar.ar_subj_asid = cred->cr_audit.ai_asid; ar->k_ar.ar_subj_pid = td->td_proc->p_pid; diff --git a/sys/security/audit/audit_arg.c b/sys/security/audit/audit_arg.c index c667d3968817..3ea645373dbe 100644 --- a/sys/security/audit/audit_arg.c +++ b/sys/security/audit/audit_arg.c @@ -408,7 +408,7 @@ audit_arg_process(struct proc *p) cred = p->p_ucred; ar->k_ar.ar_arg_auid = cred->cr_audit.ai_auid; ar->k_ar.ar_arg_euid = cred->cr_uid; - ar->k_ar.ar_arg_egid = cred->cr_groups[0]; + ar->k_ar.ar_arg_egid = cred->cr_gid; ar->k_ar.ar_arg_ruid = cred->cr_ruid; ar->k_ar.ar_arg_rgid = cred->cr_rgid; ar->k_ar.ar_arg_asid = cred->cr_audit.ai_asid; diff --git a/sys/ufs/ufs/ufs_vnops.c b/sys/ufs/ufs/ufs_vnops.c index 53fac4b0665e..17308706c3f4 100644 --- a/sys/ufs/ufs/ufs_vnops.c +++ b/sys/ufs/ufs/ufs_vnops.c @@ -2064,9 +2064,13 @@ ufs_mkdir( */ ucred.cr_ref = 1; ucred.cr_uid = ip->i_uid; + + /* + * XXXKE Fix this is cr_gid gets separated out + */ ucred.cr_ngroups = 1; ucred.cr_groups = &ucred_group; - ucred.cr_groups[0] = dp->i_gid; + ucred.cr_gid = ucred_group = dp->i_gid; ucp = &ucred; } #endif @@ -2823,9 +2827,13 @@ ufs_makeinode(int mode, struct vnode *dvp, struct vnode **vpp, */ ucred.cr_ref = 1; ucred.cr_uid = ip->i_uid; + + /* + * XXXKE Fix this is cr_gid gets separated out + */ ucred.cr_ngroups = 1; ucred.cr_groups = &ucred_group; - ucred.cr_groups[0] = pdir->i_gid; + ucred.cr_gid = ucred_group = pdir->i_gid; ucp = &ucred; #endif } else { From nobody Thu Jul 24 16:13:27 2025 X-Original-To: dev-commits-src-all@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 4bnwzC4C1Qz62vmn; Thu, 24 Jul 2025 16:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnwzC3b2jz43jN; Thu, 24 Jul 2025 16:13:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753373607; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gzAj6TsFkJrlxRu9Fw9egnaab3POn1WA9na5LTYOr8Y=; b=nxc63BJYn1Aym8EWCDts+uiUg3eFKaygaK+GFV88ajz+hPES1Rn7lf9Kv4f9b0NyVQIcYd UkNuERg0GFuYhMFE7qHJKmP2Zlo0B6hwG/CU+izwMZwJaNzDlfJRjsdqntF/1RK09FY2dZ hZTjDCfAoWLHi2eeHzj5A4Zy5M3kEFmE6GpEJwHmKkjj1W6lRt9WhllmlmydYoAKe4aEQ5 Jh5laXn7Vu3FBYLm9alhQ4hipcHLtiCOddNoSfeyOPEuELxqTFvLF2cRy3HkCjGWP/iBjY JCB8C1O59trhsK8s2/Mw1aHGqPJGNaZV3YF10vvfV0e9/GVJ8hx97FbqL5aYXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753373607; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gzAj6TsFkJrlxRu9Fw9egnaab3POn1WA9na5LTYOr8Y=; b=oVPwb8s5ZIvs9SsG7GKYtnN/aP97X5Ihli7OTMoZd6T+e5ovvGgpzASeVTUaAp4ZnDyuwO 0pLL0t2kTwAGG7vKxeSF2G8QI+roO4Cik+GtVuPwr5LeJ1a9Qkp78uBSOKTs/yoqH07x4W XvNruDieA9PxRDxrNx+pr/PDT/mkZbLrOM6gj+75CRemVCylC7Zncbt1mlV0Fv711H0pgl DgedyQiN5RTojyF9VFqZFNeJlUmntDNbGgrQc6u+Cd1NBZk5va1iczh0kg/L/RGUbYonzc APiJ4+3kUCpP8aKw8UYQSeX11v+710yYV5GPyabtbjKHTZINuO5Jfm6BncuGGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753373607; a=rsa-sha256; cv=none; b=a84i2dj3yn5IS5Ohx7ykhKZwoQrWYPvKVLzRMqH8pfdtawgIysEHFDFNaYxwkCvmEPMiut 4IhnE7dBImrqIbxfOtTiM12+T1/gt1q6ymcTuXHrQqJgJgfvhWMgMjXj0k1i7tbjqinZyJ aRDBpKLIhBeRUYpjjvFZqe67gdvzuwfDYaJSieSdUlN7MCIjcrgFf4K1PC4r8r9XZJsqF/ e3fxrSHo/cFOulVlUBoghpTrep9xu5/FFlNmBup0CJmAKI+J221aLC4GZ1K5sxSINZ/lds ADbLpLOlEv2QIhjtfqzKiiTYtjRNn8hl7np7re6z+omB7FiUyLMHvNZ0/IY2lA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnwzC3BFpz14qK; Thu, 24 Jul 2025 16:13:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OGDRaM061629; Thu, 24 Jul 2025 16:13:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OGDRn0061626; Thu, 24 Jul 2025 16:13:27 GMT (envelope-from git) Date: Thu, 24 Jul 2025 16:13:27 GMT Message-Id: <202507241613.56OGDRn0061626@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: b45aa1d82745 - main - tcp rack,bbr: cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b45aa1d82745e096b7b3006aceb8b5ec13b343f1 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=b45aa1d82745e096b7b3006aceb8b5ec13b343f1 commit b45aa1d82745e096b7b3006aceb8b5ec13b343f1 Author: Michael Tuexen AuthorDate: 2025-07-24 16:11:20 +0000 Commit: Michael Tuexen CommitDate: 2025-07-24 16:11:20 +0000 tcp rack,bbr: cleanup Remove code that can't be enabled in FreeBSD anyway. Reviewed by: glebius, rrs MFC after: 1 week Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D51423 --- sys/netinet/tcp_stacks/bbr.c | 6 +----- sys/netinet/tcp_stacks/rack.c | 9 +-------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index d2636f01714e..4345e6d4480e 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -13172,11 +13172,7 @@ send: mb, moff, &len, if_hw_tsomaxsegcount, if_hw_tsomaxsegsize, msb, - ((rsm == NULL) ? hw_tls : 0) -#ifdef NETFLIX_COPY_ARGS - , NULL, NULL -#endif - ); + ((rsm == NULL) ? hw_tls : 0)); if (len <= maxseg) { /* * Must have ran out of mbufs for the copy diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index 834e1347a152..cb2c021967b4 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -14638,9 +14638,6 @@ rack_init(struct tcpcb *tp, void **ptr) if (rack->r_ctl.pcm_s == NULL) { rack->r_ctl.pcm_i.cnt_alloc = 0; } -#ifdef NETFLIX_STATS - rack->r_ctl.side_chan_dis_mask = tcp_sidechannel_disable_mask; -#endif rack->r_ctl.rack_per_upper_bound_ss = (uint8_t)rack_per_upper_bound_ss; rack->r_ctl.rack_per_upper_bound_ca = (uint8_t)rack_per_upper_bound_ca; if (rack_enable_shared_cwnd) @@ -21556,11 +21553,7 @@ send: m->m_next = tcp_m_copym( mb, moff, &len, if_hw_tsomaxsegcount, if_hw_tsomaxsegsize, msb, - ((rsm == NULL) ? hw_tls : 0) -#ifdef NETFLIX_COPY_ARGS - , &s_mb, &s_moff -#endif - ); + ((rsm == NULL) ? hw_tls : 0)); if (len <= (tp->t_maxseg - optlen)) { /* * Must have ran out of mbufs for the copy From nobody Thu Jul 24 16:19:46 2025 X-Original-To: dev-commits-src-all@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 4bnx6V50Ylz62w8Y; Thu, 24 Jul 2025 16:19: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnx6V47pmz46J8; Thu, 24 Jul 2025 16:19:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753373986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kctomvXLFzzj0IX+8BYJWiNedeyWInemsZLilrWXvOg=; b=QNxWg4fVe9rn2OxPsS1E21Ib5lozImqsuEDl//kDFOBHBoh5SRcUXU9cdvzLsKXeZuDEhn qE+SQvX32CtDK23O+mY6RxN1BnjRVhDotGA5SYDM/L+dzQy+YsdiwGwz7DAsFENXcz4pfL EcySbTgIk7rVnmHKqFj+YT9OGIP0FI7+k49rVc90o6bPS6h78mAxd+LjPBkWAJMFPMCO71 YgIytZuA0H8EYR4kHAbDYalm/ruV5Q0cp+5CDhkUzg0FbYstJB3M0Um9/9geKkP/96oQLm uCVPF3VzQF1aRryZ2Jr0VKKBkWzffTTmbeWNaDX1wOIRrjoBdw+gxlfWLnio+w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753373986; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kctomvXLFzzj0IX+8BYJWiNedeyWInemsZLilrWXvOg=; b=ubW9DRuszFeuXKLW3si8GvxzFjubAzmsbH0Mr+qrCj5liWu0ltB6p8IauWy1UaRdpPuPyK NvcxkDt89Nh9RYWm1C3OBwKk+CC6wYEisrmSXb+pkKME/fodJWzzdnjab4RNzQaeSrJpkJ n6JSsb72C3xkpp94Vj59FkCOPN6qAKxTzJTEZcmaXMQqv7/xDJlRiXUYNMnQWwhxP2iZwU p9c7nB8Lj35+Ljr688dNizU/FtCiq9ivBwyR+5IdBQOYhA5RjyoL8Lurt9q/Ua82weUwu2 pWnlpy9Hkzo5P0KwO0b5uh0xkKYy7gEZJUNZz5EwJvA8i553J5U0bW635D54jA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753373986; a=rsa-sha256; cv=none; b=GeMSEVv9PgNdT+cXH7jyETMePZX7yDLvdRYK8BcOv8IJ00JmGPIn9XrKZSwJyj8DeG+yQE tYszifZfMx4Gd1ujrM6Rny0ESPY9khncC7CSUXpOf92ary+GDCsjXt/v6s2Adu1RjANWov shQqhtd6agnouzWBPP0IWEZVqmU5KbEJfj8Y3qXXK7GBHMRQ1MDxZY+N2BxW8/BQJ6D65Y tEqdbADc8r9nw0iKRhU8cWMzouJo8ndPPjoGkw5ojSdtatmhpQw4qzFNFANAyyeOLcd9zp 8N54JSlCnd+WFJlz6AK2Sf5sh9TS3HvxJ/lsRLGUsUx0+4+q34JCvI1OA4yplQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnx6V3PMTz15N4; Thu, 24 Jul 2025 16:19:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OGJkpf063640; Thu, 24 Jul 2025 16:19:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OGJk71063637; Thu, 24 Jul 2025 16:19:46 GMT (envelope-from git) Date: Thu, 24 Jul 2025 16:19:46 GMT Message-Id: <202507241619.56OGJk71063637@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 15c991fd64b7 - main - tcp: remove trailing whitespaces List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 15c991fd64b79d8c7ba0ac20fa713a4102d60c1e Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=15c991fd64b79d8c7ba0ac20fa713a4102d60c1e commit 15c991fd64b79d8c7ba0ac20fa713a4102d60c1e Author: Nick Banks AuthorDate: 2025-07-24 16:17:35 +0000 Commit: Michael Tuexen CommitDate: 2025-07-24 16:17:35 +0000 tcp: remove trailing whitespaces Reviewed by: cc, tuexen, Peter Lei Sponsored by: Netflix, Inc. Differential Revision: https://reviews.freebsd.org/D51437 --- sys/netinet/in_fib_dxr.c | 6 +++--- sys/netinet/tcp_log_buf.h | 6 +++--- sys/netinet/tcp_lro.c | 12 ++++++------ sys/netinet/tcp_sack.c | 2 +- sys/netinet/tcp_stacks/bbr.c | 12 ++++++------ sys/netinet/tcp_stacks/rack.c | 8 ++++---- sys/netinet/tcp_stacks/rack_pcm.c | 4 ++-- sys/netinet/tcp_stacks/sack_filter.c | 8 ++++---- sys/netinet/tcp_stacks/sack_filter.h | 2 +- sys/netinet/tcp_subr.c | 2 +- sys/netinet/tcp_timer.c | 4 ++-- sys/netinet/tcp_usrreq.c | 8 ++++---- sys/netinet/tcp_var.h | 26 +++++++++++++------------- 13 files changed, 50 insertions(+), 50 deletions(-) diff --git a/sys/netinet/in_fib_dxr.c b/sys/netinet/in_fib_dxr.c index b889131b544b..538cd43a88a3 100644 --- a/sys/netinet/in_fib_dxr.c +++ b/sys/netinet/in_fib_dxr.c @@ -345,7 +345,7 @@ initheap(struct dxr_aux *da, uint32_t dst_u32, uint32_t chunk) struct heap_entry *fhp = &da->heap[0]; struct rtentry *rt; struct route_nhop_data rnd; - + da->heap_index = 0; da->dst.sin_addr.s_addr = htonl(dst_u32); rt = fib4_lookup_rt(da->fibnum, da->dst.sin_addr, 0, NHR_UNLOCKED, @@ -1143,7 +1143,7 @@ dxr_destroy(void *data) free(da, M_DXRAUX); } -static void +static void epoch_dxr_destroy(epoch_context_t ctx) { struct dxr *dxr = __containerof(ctx, struct dxr, epoch_ctx); @@ -1202,7 +1202,7 @@ dxr_dump_end(void *data, struct fib_dp *dp) static enum flm_op_result dxr_dump_rib_item(struct rtentry *rt, void *data) { - + return (FLM_SUCCESS); } diff --git a/sys/netinet/tcp_log_buf.h b/sys/netinet/tcp_log_buf.h index 3e7eef8a1cda..f8c064b6a104 100644 --- a/sys/netinet/tcp_log_buf.h +++ b/sys/netinet/tcp_log_buf.h @@ -377,12 +377,12 @@ extern int32_t tcp_trace_point_count; /* * Returns true if any sort of BB logging is enabled, - * commonly used throughout the codebase. + * commonly used throughout the codebase. */ static inline int tcp_bblogging_on(struct tcpcb *tp) { - if (tp->_t_logstate <= TCP_LOG_STATE_OFF) + if (tp->_t_logstate <= TCP_LOG_STATE_OFF) return (0); if (tp->_t_logstate == TCP_LOG_VIA_BBPOINTS) return (0); @@ -427,7 +427,7 @@ tcp_set_bblog_state(struct tcpcb *tp, uint8_t ls, uint8_t bbpoint) } } -static inline uint32_t +static inline uint32_t tcp_get_bblog_state(struct tcpcb *tp) { return (tp->_t_logstate); diff --git a/sys/netinet/tcp_lro.c b/sys/netinet/tcp_lro.c index 10afed17bf3b..7512679bd4e9 100644 --- a/sys/netinet/tcp_lro.c +++ b/sys/netinet/tcp_lro.c @@ -1301,9 +1301,9 @@ tcp_lro_rx_common(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum, bool use_h return (TCP_LRO_CANNOT); #endif if (((m->m_pkthdr.csum_flags & (CSUM_DATA_VALID | CSUM_PSEUDO_HDR)) != - ((CSUM_DATA_VALID | CSUM_PSEUDO_HDR))) || + ((CSUM_DATA_VALID | CSUM_PSEUDO_HDR))) || (m->m_pkthdr.csum_data != 0xffff)) { - /* + /* * The checksum either did not have hardware offload * or it was a bad checksum. We can't LRO such * a packet. @@ -1334,7 +1334,7 @@ tcp_lro_rx_common(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum, bool use_h #endif /* If no hardware or arrival stamp on the packet add timestamp */ if ((m->m_flags & (M_TSTMP_LRO | M_TSTMP)) == 0) { - m->m_pkthdr.rcv_tstmp = bintime2ns(&lc->lro_last_queue_time); + m->m_pkthdr.rcv_tstmp = bintime2ns(&lc->lro_last_queue_time); m->m_flags |= M_TSTMP_LRO; } @@ -1429,9 +1429,9 @@ tcp_lro_rx(struct lro_ctrl *lc, struct mbuf *m, uint32_t csum) int error; if (((m->m_pkthdr.csum_flags & (CSUM_DATA_VALID | CSUM_PSEUDO_HDR)) != - ((CSUM_DATA_VALID | CSUM_PSEUDO_HDR))) || + ((CSUM_DATA_VALID | CSUM_PSEUDO_HDR))) || (m->m_pkthdr.csum_data != 0xffff)) { - /* + /* * The checksum either did not have hardware offload * or it was a bad checksum. We can't LRO such * a packet. @@ -1481,7 +1481,7 @@ tcp_lro_queue_mbuf(struct lro_ctrl *lc, struct mbuf *mb) ((mb->m_flags & M_TSTMP) == 0)) { /* Add in an LRO time since no hardware */ binuptime(&lc->lro_last_queue_time); - mb->m_pkthdr.rcv_tstmp = bintime2ns(&lc->lro_last_queue_time); + mb->m_pkthdr.rcv_tstmp = bintime2ns(&lc->lro_last_queue_time); mb->m_flags |= M_TSTMP_LRO; } diff --git a/sys/netinet/tcp_sack.c b/sys/netinet/tcp_sack.c index 90d789f0e224..4405098a8620 100644 --- a/sys/netinet/tcp_sack.c +++ b/sys/netinet/tcp_sack.c @@ -744,7 +744,7 @@ tcp_sack_doack(struct tcpcb *tp, struct tcpopt *to, tcp_seq th_ack) while (cur != NULL) { if (!(sblkp >= sack_blocks)) { if (((loss_sblks >= tcprexmtthresh) || - (loss_thresh > (tcprexmtthresh-1)*tp->t_maxseg))) + (loss_thresh > (tcprexmtthresh-1)*tp->t_maxseg))) break; loss_thresh += loss_hiack - cur->end; loss_hiack = cur->start; diff --git a/sys/netinet/tcp_stacks/bbr.c b/sys/netinet/tcp_stacks/bbr.c index 4345e6d4480e..b232d3f08fe6 100644 --- a/sys/netinet/tcp_stacks/bbr.c +++ b/sys/netinet/tcp_stacks/bbr.c @@ -5126,8 +5126,8 @@ bbr_timeout_rxt(struct tcpcb *tp, struct tcp_bbr *bbr, uint32_t cts) tp->t_maxseg = tp->t_pmtud_saved_maxseg; if (tp->t_maxseg < V_tcp_mssdflt) { /* - * The MSS is so small we should not - * process incoming SACK's since we are + * The MSS is so small we should not + * process incoming SACK's since we are * subject to attack in such a case. */ tp->t_flags2 |= TF2_PROC_SACK_PROHIBIT; @@ -10141,7 +10141,7 @@ bbr_init(struct tcpcb *tp, void **ptr) * flags. */ bbr_stop_all_timers(tp, bbr); - /* + /* * Validate the timers are not in usec, if they are convert. * BBR should in theory move to USEC and get rid of a * lot of the TICKS_2 calls.. but for now we stay @@ -11544,7 +11544,7 @@ bbr_do_segment_nounlock(struct tcpcb *tp, struct mbuf *m, struct tcphdr *th, bbr_check_bbr_for_state(bbr, cts, __LINE__, (bbr->r_ctl.rc_lost - lost)); if (nxt_pkt == 0) { if ((bbr->r_wanted_output != 0) || - (tp->t_flags & TF_ACKNOW)) { + (tp->t_flags & TF_ACKNOW)) { bbr->rc_output_starts_timer = 0; did_out = 1; @@ -13802,8 +13802,8 @@ nomore: tp->t_maxseg = old_maxseg - 40; if (tp->t_maxseg < V_tcp_mssdflt) { /* - * The MSS is so small we should not - * process incoming SACK's since we are + * The MSS is so small we should not + * process incoming SACK's since we are * subject to attack in such a case. */ tp->t_flags2 |= TF2_PROC_SACK_PROHIBIT; diff --git a/sys/netinet/tcp_stacks/rack.c b/sys/netinet/tcp_stacks/rack.c index cb2c021967b4..940a4024bb73 100644 --- a/sys/netinet/tcp_stacks/rack.c +++ b/sys/netinet/tcp_stacks/rack.c @@ -7888,8 +7888,8 @@ drop_it: tp->t_maxseg = tp->t_pmtud_saved_maxseg; if (tp->t_maxseg < V_tcp_mssdflt) { /* - * The MSS is so small we should not - * process incoming SACK's since we are + * The MSS is so small we should not + * process incoming SACK's since we are * subject to attack in such a case. */ tp->t_flags2 |= TF2_PROC_SACK_PROHIBIT; @@ -15561,7 +15561,7 @@ rack_log_pcm(struct tcp_rack *rack, uint8_t mod, uint32_t flex1, uint32_t flex2, if (tcp_bblogging_on(rack->rc_tp)) { union tcp_log_stackspecific log; struct timeval tv; - + (void)tcp_get_usecs(&tv); memset(&log, 0, sizeof(log)); log.u_bbr.timeStamp = tcp_tv_to_usectick(&tv); @@ -19912,7 +19912,7 @@ rack_output(struct tcpcb *tp) goto nomore; } else { /* Return == 0, if there is more we can send tot_len wise fall through and send */ - if (tot_len_this_send >= pace_max_seg) + if (tot_len_this_send >= pace_max_seg) return (ret); #ifdef TCP_ACCOUNTING /* We need to re-pin since fast_output un-pined */ diff --git a/sys/netinet/tcp_stacks/rack_pcm.c b/sys/netinet/tcp_stacks/rack_pcm.c index b0e300847c4a..101e6826536c 100644 --- a/sys/netinet/tcp_stacks/rack_pcm.c +++ b/sys/netinet/tcp_stacks/rack_pcm.c @@ -172,7 +172,7 @@ rack_update_pcm_ack(struct tcp_rack *rack, int was_cumack, uint32_t start, uint3 goto skip_ack_accounting; } /* - * Record ACK data. + * Record ACK data. */ ack_arrival = tcp_tv_to_lusectick(&rack->r_ctl.act_rcv_time); if (SEQ_GT(end, rack->r_ctl.pcm_i.eseq)) { @@ -305,7 +305,7 @@ skip_ack_accounting: 0, &log, false, NULL, NULL, 0, &tv); } } - /* + /* * Here we need a lot to be added including: * 1) Some form of measurement, where if we think the measurement * is valid we iterate over the PCM data and come up with a path diff --git a/sys/netinet/tcp_stacks/sack_filter.c b/sys/netinet/tcp_stacks/sack_filter.c index fc9ee8454a1e..2b70548f3cc6 100644 --- a/sys/netinet/tcp_stacks/sack_filter.c +++ b/sys/netinet/tcp_stacks/sack_filter.c @@ -400,7 +400,7 @@ sack_filter_run(struct sack_filter *sf, struct sackblk *in, int numblks, tcp_seq break; } /* Copy it out to the outbound */ - memcpy(&in[at], &blkboard[i], sizeof(struct sackblk)); + memcpy(&in[at], &blkboard[i], sizeof(struct sackblk)); at++; room--; /* now lets add it to our sack-board */ @@ -588,7 +588,7 @@ sack_filter_blks(struct tcpcb *tp, struct sack_filter *sf, struct sackblk *in, i sf->sf_ack = th_ack; for(i=0, sf->sf_cur=0; isnd_max) && + if ((in[i].end != tp->snd_max) && ((in[i].end - in[i].start) < segmax)) { /* * We do not accept blocks less than a MSS minus all @@ -707,7 +707,7 @@ main(int argc, char **argv) out = stdout; memset(&tp, 0, sizeof(tp)); tp.t_maxseg = 1460; - + while ((i = getopt(argc, argv, "dIi:o:?hS:")) != -1) { switch (i) { case 'S': @@ -883,7 +883,7 @@ main(int argc, char **argv) } else { printf("can't open sack_setup.bin -- sorry no load\n"); } - + } else if (strncmp(buffer, "help", 4) == 0) { help: fprintf(out, "You can input:\n"); diff --git a/sys/netinet/tcp_stacks/sack_filter.h b/sys/netinet/tcp_stacks/sack_filter.h index b12fcf84567c..a1c0684a4359 100644 --- a/sys/netinet/tcp_stacks/sack_filter.h +++ b/sys/netinet/tcp_stacks/sack_filter.h @@ -42,7 +42,7 @@ * previously processed sack information. * * The second thing that the sack filter does is help protect against malicious - * attackers that are trying to attack any linked lists (or other data structures) + * attackers that are trying to attack any linked lists (or other data structures) * that are used in sack processing. Consider an attacker sending in sacks for * every other byte of data outstanding. This could in theory drastically split * up any scoreboard you are maintaining and make you search through a very large diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index db415f6bdf03..26e7e53d540c 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -4537,7 +4537,7 @@ tcp_change_time_units(struct tcpcb *tp, int granularity) panic("Unknown granularity:%d tp:%p", granularity, tp); } -#endif +#endif } void diff --git a/sys/netinet/tcp_timer.c b/sys/netinet/tcp_timer.c index 32ce3001929c..3b9fe7a317b0 100644 --- a/sys/netinet/tcp_timer.c +++ b/sys/netinet/tcp_timer.c @@ -757,8 +757,8 @@ tcp_timer_rexmt(struct tcpcb *tp) tp->t_maxseg = tp->t_pmtud_saved_maxseg; if (tp->t_maxseg < V_tcp_mssdflt) { /* - * The MSS is so small we should not - * process incoming SACK's since we are + * The MSS is so small we should not + * process incoming SACK's since we are * subject to attack in such a case. */ tp->t_flags2 |= TF2_PROC_SACK_PROHIBIT; diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 687b0d538666..70e4c04b79e5 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -1768,9 +1768,9 @@ tcp_ctloutput_set(struct inpcb *inp, struct sockopt *sopt) /* * Release the ref count the lookup * acquired. - */ + */ refcount_release(&blk->tfb_refcnt); - /* + /* * Now there is a chance that the * init() function mucked with some * things before it failed, such as @@ -1800,7 +1800,7 @@ tcp_ctloutput_set(struct inpcb *inp, struct sockopt *sopt) * new one already. */ refcount_release(&tp->t_fb->tfb_refcnt); - /* + /* * Set in the new stack. */ tp->t_fb = blk; @@ -1934,7 +1934,7 @@ tcp_set_cc_mod(struct inpcb *inp, struct sockopt *sopt) CC_LIST_RUNLOCK(); return(ESRCH); } - /* + /* * With a reference the algorithm cannot be removed * so we hold a reference through the change process. */ diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 059b2aff689d..b90f65e83cb1 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -182,7 +182,7 @@ struct tcp_sendfile_track { * snd_una). When the response comes back indicating * that there was data (return value 1), then the caller * can build a sendmap entry based on the range and the - * times. The next query would then be done at the + * times. The next query would then be done at the * newly created sendmap_end. Repeated until sendmap_end == snd_max. * * Flags in sendmap_flags are defined below as well. @@ -197,7 +197,7 @@ struct tcp_sendfile_track { * The rack_times are a misc collection of information that * the old stack might possibly fill in. Of course its possible * that an old stack may not have a piece of information. If so - * then setting that value to zero is advised. Setting any + * then setting that value to zero is advised. Setting any * timestamp passed should only place a zero in it when it * is unfilled. This may mean that a time is off by a micro-second * but this is ok in the grand scheme of things. @@ -205,13 +205,13 @@ struct tcp_sendfile_track { * When switching stacks it is desireable to get as much information * from the old stack to the new stack as possible. Though not always * will the stack be compatible in the types of information. The - * init() function needs to take care when it begins changing + * init() function needs to take care when it begins changing * things such as inp_flags2 and the timer units to position these * changes at a point where it is unlikely they will fail after * making such changes. A stack optionally can have an "undo" - * function + * function * - * To transfer information to the old stack from the new in + * To transfer information to the old stack from the new in * respect to LRO and the inp_flags2, the new stack should set * the inp_flags2 to what it supports. The old stack in its * fini() function should call the tcp_handle_orphaned_packets() @@ -544,13 +544,13 @@ typedef enum { * do is: * a) Make sure that the inp_flags2 is setup correctly * for LRO. There are two flags that the previous - * stack may have set INP_MBUF_ACKCMP and + * stack may have set INP_MBUF_ACKCMP and * INP_SUPPORTS_MBUFQ. If the new stack does not * support these it *should* clear the flags. * b) Make sure that the timers are in the proper * granularity that the stack wants. The stack * should check the t_tmr_granularity field. Currently - * there are two values that it may hold + * there are two values that it may hold * TCP_TMR_GRANULARITY_TICKS and TCP_TMR_GRANULARITY_USEC. * Use the functions tcp_timer_convert(tp, granularity); * to move the timers to the correct format for your stack. @@ -558,14 +558,14 @@ typedef enum { * The new stack may also optionally query the tfb_chg_query * function if the old stack has one. The new stack may ask * for one of three entries and can also state to the old - * stack its support for the INP_MBUF_ACKCMP and + * stack its support for the INP_MBUF_ACKCMP and * INP_SUPPORTS_MBUFQ. This is important since if there are * queued ack's without that statement the old stack will * be forced to discard the queued acks. The requests that * can be made for information by the new stacks are: * * Note also that the tfb_tcp_fb_init() when called can - * determine if a query is needed by looking at the + * determine if a query is needed by looking at the * value passed in the ptr. The ptr is designed to be * set in with any allocated memory, but the address * of the condtion (ptr == &tp->t_fb_ptr) will be @@ -573,17 +573,17 @@ typedef enum { * setup of a tcb (which means no query would be needed). * If, however, the value is not t_fb_ptr, then the caller * is in the middle of a stack switch and is the new stack. - * A query would be appropriate (if the new stack support + * A query would be appropriate (if the new stack support * the query mechanism). * * TCP_QUERY_SENDMAP - Query of outstanding data. * TCP_QUERY_TIMERS_UP - Query about running timers. - * TCP_SUPPORTED_LRO - Declaration in req_param of - * the inp_flags2 supported by + * TCP_SUPPORTED_LRO - Declaration in req_param of + * the inp_flags2 supported by * the new stack. * TCP_QUERY_RACK_TIMES - Enquire about various timestamps * and states the old stack may be in. - * + * * tfb_tcp_fb_fini is changed to add a flag to tell * the old stack if the tcb is being destroyed or * not. A one in the flag means the TCB is being From nobody Thu Jul 24 17:14:12 2025 X-Original-To: dev-commits-src-all@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 4bnyKK2gF9z62xtF; Thu, 24 Jul 2025 17:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnyKK15Xsz3cbc; Thu, 24 Jul 2025 17:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753377253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eyw8WIMgRn3WS+6/FwboV2sOIr/mJEW8wwQi3L/0ZsU=; b=GgbRf2tRdp0VXyGPnydTZKiL8NGhuaG8Wxo1Gapg8vKl0GLs6Cx/FAjMoWNAdD5si3OUzo 4pihPeGpw8I+Srvj5607dhiFsWT21KdyOb1JAG7Awjue4oSv58bFtFt2G4UicxgkXMQOhZ 9I607MeIvqNOkV6j6ZN+6przjkihccCAu/DCFMsMG9A9/v4z440hewDXnWYPx6UsHeUZBv HJVIyQervhXaD58pMLyrjoI0mi2/JFqNndMWW9rpKTJYvfUo3gVuZMicwy/MDrkMFDb+uZ qXVL+hMopBTokxVjdKMZg5vI+lupwFg1fCV3cjdWoLjfdE/WY2M49bmEcDW8jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753377253; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eyw8WIMgRn3WS+6/FwboV2sOIr/mJEW8wwQi3L/0ZsU=; b=N58UECR24FG4QZA2bQ1Y/igAuHPSq4+D23pnlPljIQpY4jqhVTgu/jHN0iRlmqd/WH0I4X lVQKBIguY3/lY0EELZtGnQPOlf/sx9cwdqJ2pnH9iXe0x1k4xgflleKCEYj9uACvTjX31x ZxJNGPow+7GHUc4AwRK3bJvNpP5Zf6kuEX1olY0DFJMBlPQJkFAZZEHoFS3EaCmHbk1eXA e80yP3DRlr4/mmeuYehqc/Y5G8CGNaIPxn/wYxrmEvfyTUnzO58W5neifDbhYdshck8bjn RGoCHQUxImHer8lbIa/FCc+SGYdrm4fgpXa27Z2jNGP3qr+PEZv1uhQqu0xz7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753377253; a=rsa-sha256; cv=none; b=W8sjOeFJg629dFIjou8P8j1rzltpv3PabFcNH+CD+kCgPvgcrEHTNhgKQNY7iyNwDYkIc5 51UhyRu1CL+7B7gq72cqCk4LtIrUmfBdmPCftK9J4/NjlKse1bW6SR7T+Co2y4Kgqe+v2l v9ZEDjNXjzbpsxaMyOogtfVHrXmWZjYO2PVMdkmfSmiET21Yd8vvbaMltnIQDwPFFmQ1Cw IKl/FTsvYYSkgQYtFr5KcyN92KPF5BThXdWDc0tI4LJ9y8h7sscfqgfDYqE0f+l7u5JmZw Z7lYZXhllLaxiVRFdxWzhn4X3emBMfS5S9nhamdol09Ga6FLQrw+Ilv2XF9xUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnyKK0hwlz16df; Thu, 24 Jul 2025 17:14:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OHECXt074600; Thu, 24 Jul 2025 17:14:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OHECBa074597; Thu, 24 Jul 2025 17:14:12 GMT (envelope-from git) Date: Thu, 24 Jul 2025 17:14:12 GMT Message-Id: <202507241714.56OHECBa074597@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 188138106b9f - main - krb5: Remove a duplicate include of error_tables/Makefile.inc List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 188138106b9feb05bc2e51329295e41adbc95175 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=188138106b9feb05bc2e51329295e41adbc95175 commit 188138106b9feb05bc2e51329295e41adbc95175 Author: Cy Schubert AuthorDate: 2025-07-24 04:57:26 +0000 Commit: Cy Schubert CommitDate: 2025-07-24 16:31:39 +0000 krb5: Remove a duplicate include of error_tables/Makefile.inc And move the aggregation of its generated sources to the correct library, libkrb5.so. Fixes: ee3960cba106 --- krb5/lib/crypto/Makefile | 4 ---- krb5/lib/krb5/error_tables/Makefile.inc | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/krb5/lib/crypto/Makefile b/krb5/lib/crypto/Makefile index ed1cd7764012..4dda0d85da54 100644 --- a/krb5/lib/crypto/Makefile +++ b/krb5/lib/crypto/Makefile @@ -23,10 +23,6 @@ VERSION_MAP= ${.CURDIR}/version.map # .include "${KRB5_CRYPTOLIBDIR}/builtin/Makefile.inc" # .include "${KRB5_CRYPTOLIBDIR}/openssl/Makefile.inc" -.include "${KRB5_SRCTOP}/lib/krb5/error_tables/Makefile.inc" - -SRCS+= ${GEN_ET} - .include "${KRB5_SRCTOP}/lib/crypto/krb/Makefile.inc" .include "${KRB5_SRCTOP}/lib/crypto/builtin/Makefile.inc" .include "${KRB5_SRCTOP}/lib/crypto/openssl/Makefile.inc" diff --git a/krb5/lib/krb5/error_tables/Makefile.inc b/krb5/lib/krb5/error_tables/Makefile.inc index dee259798dae..5d2ec3b9e920 100644 --- a/krb5/lib/krb5/error_tables/Makefile.inc +++ b/krb5/lib/krb5/error_tables/Makefile.inc @@ -144,3 +144,5 @@ ${GEN_ASN1_ERR_C}: ${GEN_ASN1_ERR} ${COMPILE_ET} et-c-${.PREFIX}.et mv et-c-${.PREFIX}.c ${.PREFIX}.c rm -f et-c-${.PREFIX}.et et-c-${.PREFIX}.c + +SRCS+= ${GEN_ET} From nobody Thu Jul 24 17:14:14 2025 X-Original-To: dev-commits-src-all@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 4bnyKL2lVGz62yFS; Thu, 24 Jul 2025 17:14: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnyKL1nwhz3cmQ; Thu, 24 Jul 2025 17:14:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753377254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AZlDNiPWLiwr6jy70+e6ZF8zO2NJuyxt0Gf1fmeyjxQ=; b=eA7zRgWMO/V1jwOEB40Nqzs9Vle+H4ukw3z7AUnqvwjMjl4hgAy9/Lock9ClEr62s2dq9Y Dgoo2KMqQ6QTbageqiarSJtNbAgYQ0yhmWIDr+JrKyQhmv6Rzr/jugqluqKTewn2kJX5Af yRXyl9zyIPuD9nb8aWZvI4nRmrSxqTevMrp9XyGQjCOueuHPRhRNYcM3yubghspBXh7sFm WalvLvxB4bEjso8PObfy6IUoj+7j7zgVaxgXo9FAmQ+lG9LzXz+B3Tu+QVZN/xS5Wmd1Fw WDelJTSTJ155hUp9p8qeXoarkHwRHycMsaZglLH9nKarEW30mvamGS4y+HpPIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753377254; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AZlDNiPWLiwr6jy70+e6ZF8zO2NJuyxt0Gf1fmeyjxQ=; b=s6pPcgTXY/EGUIcr9M0+hymVGFdnMy6KXRDUr+jt588RiBAXvi0cCndrkO1ndu0pTPwe3A MMBgsfzm9sqfiaza1GgqOHax/dSudk3rRmy9ZTZuX+LtRiVgQw8h1NMJtWODCBXFdEQCmY 5m/FdqkGqIEcCqPdeZSX0vKsGU4DETYhMGHmg4V8SWUBipJzHXt3Mvl2FS/gJbaDjBmasF xfhZl/EnrZfuzgEkCIY8KF0KhyzbvT8hhxGPjD5M1WGq2vEtey1YDPgsY1/SLFLT+9jE2R SuA5aR3zftWrMk+evv220P6LsPHv8c/Ghi4eoHNmNTNmamPqxhsjyfG1JsNczQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753377254; a=rsa-sha256; cv=none; b=q3hgMfyKvOPa3tqCzx+DS2qGhyS/NPpWQf5vHxzUXnhZeF4vCGxpjUGBTcDTCc37fBPKbb NI2HrZ5ewW1RLH7G3AVVw6dAppPdjM7FGmE6p5kucTCCCImXO/4PMhq/aMLHl1+lf6boiR K6jbF+0TC8AxnEIafe+3hUI1/aJQugeAur7pehtY54sdQOrfatDRQ/e8P7VN7eE1BnmhBn UahqojdCDHdorbyhPaveBUBJAenj6dqWIIlKgt+9MscwJST+/Q5614+7/K8SE1kBQt9qgk sJB12BGTUrXYQZCTSK7Tw1c074blwCfwg9sqRjspjC6ROArqNaObBBtExBTgYw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnyKL1KPfz16MK; Thu, 24 Jul 2025 17:14:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OHEEkY074632; Thu, 24 Jul 2025 17:14:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OHEE74074630; Thu, 24 Jul 2025 17:14:14 GMT (envelope-from git) Date: Thu, 24 Jul 2025 17:14:14 GMT Message-Id: <202507241714.56OHEE74074630@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 4680e7fcc70a - main - krb5: Replace version maps with generated version maps List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4680e7fcc70a998765bb9ce602b080d8efb114bc Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=4680e7fcc70a998765bb9ce602b080d8efb114bc commit 4680e7fcc70a998765bb9ce602b080d8efb114bc Author: Cy Schubert AuthorDate: 2025-07-24 14:59:47 +0000 Commit: Cy Schubert CommitDate: 2025-07-24 16:31:39 +0000 krb5: Replace version maps with generated version maps Suggested by: jhb Fixes: ae07a5805b19 --- krb5/lib/crypto/version.map | 3 +- krb5/lib/gssapi/version.map | 95 ++++++++++++++-------------- krb5/lib/kadm5clnt/version.map | 3 +- krb5/lib/kadm5srv/version.map | 3 +- krb5/lib/kdb/version.map | 3 +- krb5/lib/krad/version.map | 3 +- krb5/lib/krb5/version.map | 14 ++++- krb5/lib/rpc/version.map | 3 +- krb5/plugins/audit/version.map | 3 +- krb5/plugins/k5tls/version.map | 3 +- krb5/plugins/kdb/db2/version.map | 108 +------------------------------- krb5/plugins/preauth/otp/version.map | 3 +- krb5/plugins/preauth/pkinit/version.map | 3 +- krb5/plugins/preauth/spake/version.map | 3 +- krb5/plugins/preauth/test/version.map | 3 +- krb5/util/et/version.map | 3 +- krb5/util/profile/version.map | 49 +++++++++++++-- krb5/util/support/version.map | 3 +- krb5/util/verto/version.map | 3 +- 19 files changed, 138 insertions(+), 173 deletions(-) diff --git a/krb5/lib/crypto/version.map b/krb5/lib/crypto/version.map index bd4c2c1cd23f..57448f6d85fa 100644 --- a/krb5/lib/crypto/version.map +++ b/krb5/lib/crypto/version.map @@ -1,4 +1,4 @@ -KRB5_CRYPTO_1.0 { +k5crypto_3_MIT { global: krb5_c_make_random_key; krb5_c_encrypt_length; @@ -106,3 +106,4 @@ KRB5_CRYPTO_1.0 { k5_enctype_to_ssf; krb5int_c_deprecated_enctype; }; +HIDDEN { local: __*; _rest*; _save*; *; }; diff --git a/krb5/lib/gssapi/version.map b/krb5/lib/gssapi/version.map index afdfe9a0a83a..bd0d28df70a7 100644 --- a/krb5/lib/gssapi/version.map +++ b/krb5/lib/gssapi/version.map @@ -1,37 +1,9 @@ -KRB5_GSSAPI_1.0 { +gssapi_krb5_2_MIT { global: GSS_C_ATTR_LOCAL_LOGIN_USER; + GSS_C_INQ_SSPI_SESSION_KEY; GSS_C_INQ_NEGOEX_KEY; GSS_C_INQ_NEGOEX_VERIFY_KEY; - GSS_C_INQ_SSPI_SESSION_KEY; - GSS_C_MA_AUTH_INIT; - GSS_C_MA_AUTH_INIT_ANON; - GSS_C_MA_AUTH_INIT_INIT; - GSS_C_MA_AUTH_TARG; - GSS_C_MA_AUTH_TARG_ANON; - GSS_C_MA_AUTH_TARG_INIT; - GSS_C_MA_CBINDINGS; - GSS_C_MA_COMPRESS; - GSS_C_MA_CONF_PROT; - GSS_C_MA_CTX_TRANS; - GSS_C_MA_DELEG_CRED; - GSS_C_MA_DEPRECATED; - GSS_C_MA_INTEG_PROT; - GSS_C_MA_ITOK_FRAMED; - GSS_C_MA_MECH_COMPOSITE; - GSS_C_MA_MECH_CONCRETE; - GSS_C_MA_MECH_GLUE; - GSS_C_MA_MECH_NEGO; - GSS_C_MA_MECH_PSEUDO; - GSS_C_MA_MIC; - GSS_C_MA_NEGOEX_AND_SPNEGO; - GSS_C_MA_NOT_DFLT_MECH; - GSS_C_MA_NOT_MECH; - GSS_C_MA_OOS_DET; - GSS_C_MA_PFS; - GSS_C_MA_PROT_READY; - GSS_C_MA_REPLAY_DET; - GSS_C_MA_WRAP; GSS_C_NT_ANONYMOUS; GSS_C_NT_COMPOSITE_EXPORT; GSS_C_NT_EXPORT_NAME; @@ -40,20 +12,46 @@ KRB5_GSSAPI_1.0 { GSS_C_NT_MACHINE_UID_NAME; GSS_C_NT_STRING_UID_NAME; GSS_C_NT_USER_NAME; - GSS_C_SEC_CONTEXT_SASL_SSF; - GSS_KRB5_CRED_NO_CI_FLAGS_X; - GSS_KRB5_GET_CRED_IMPERSONATOR; - GSS_KRB5_NT_ENTERPRISE_NAME; GSS_KRB5_NT_PRINCIPAL_NAME; + GSS_KRB5_NT_ENTERPRISE_NAME; GSS_KRB5_NT_X509_CERT; + GSS_KRB5_CRED_NO_CI_FLAGS_X; + GSS_KRB5_GET_CRED_IMPERSONATOR; + GSS_C_MA_MECH_CONCRETE; + GSS_C_MA_MECH_PSEUDO; + GSS_C_MA_MECH_COMPOSITE; + GSS_C_MA_MECH_NEGO; + GSS_C_MA_MECH_GLUE; + GSS_C_MA_NOT_MECH; + GSS_C_MA_DEPRECATED; + GSS_C_MA_NOT_DFLT_MECH; + GSS_C_MA_ITOK_FRAMED; + GSS_C_MA_AUTH_INIT; + GSS_C_MA_AUTH_TARG; + GSS_C_MA_AUTH_INIT_INIT; + GSS_C_MA_AUTH_TARG_INIT; + GSS_C_MA_AUTH_INIT_ANON; + GSS_C_MA_AUTH_TARG_ANON; + GSS_C_MA_DELEG_CRED; + GSS_C_MA_INTEG_PROT; + GSS_C_MA_CONF_PROT; + GSS_C_MA_MIC; + GSS_C_MA_WRAP; + GSS_C_MA_PROT_READY; + GSS_C_MA_REPLAY_DET; + GSS_C_MA_OOS_DET; + GSS_C_MA_CBINDINGS; + GSS_C_MA_PFS; + GSS_C_MA_COMPRESS; + GSS_C_MA_CTX_TRANS; + GSS_C_MA_NEGOEX_AND_SPNEGO; + GSS_C_SEC_CONTEXT_SASL_SSF; gss_accept_sec_context; gss_acquire_cred; - gss_acquire_cred_from; - gss_acquire_cred_impersonate_name; gss_acquire_cred_with_password; + gss_acquire_cred_impersonate_name; gss_add_buffer_set_member; gss_add_cred; - gss_add_cred_from; gss_add_cred_impersonate_name; gss_add_cred_with_password; gss_add_oid_set_member; @@ -85,8 +83,8 @@ KRB5_GSSAPI_1.0 { gss_import_name; gss_import_sec_context; gss_indicate_mechs; - gss_indicate_mechs_by_attrs; gss_init_sec_context; + gss_indicate_mechs_by_attrs; gss_inquire_attrs_for_mech; gss_inquire_context; gss_inquire_cred; @@ -94,7 +92,6 @@ KRB5_GSSAPI_1.0 { gss_inquire_cred_by_oid; gss_inquire_mech_for_saslname; gss_inquire_mechs_for_name; - gss_inquire_name; gss_inquire_names_for_mech; gss_inquire_saslname_for_mech; gss_inquire_sec_context_by_oid; @@ -108,6 +105,8 @@ KRB5_GSSAPI_1.0 { gss_krb5_set_cred_rcache; gss_krb5int_make_seal_token_v3; gss_krb5int_unseal_token_v3; + gsskrb5_extract_authtime_from_sec_context; + gsskrb5_extract_authz_data_from_sec_context; gss_localname; gss_map_name_to_any; gss_mech_iakerb; @@ -128,24 +127,22 @@ KRB5_GSSAPI_1.0 { gss_oid_equal; gss_oid_to_str; gss_pname_to_uid; - gss_process_context_token; gss_pseudo_random; + gss_process_context_token; gss_release_any_name_mapping; - gss_release_buffer; gss_release_buffer_set; + gss_release_buffer; gss_release_cred; gss_release_iov_buffer; gss_release_name; gss_release_oid; gss_release_oid_set; gss_seal; - gss_set_cred_option; gss_set_name_attribute; gss_set_neg_mechs; gss_set_sec_context_option; gss_sign; gss_store_cred; - gss_store_cred_into; gss_str_to_oid; gss_test_oid_set_member; gss_unseal; @@ -161,12 +158,16 @@ KRB5_GSSAPI_1.0 { gss_wrap_iov; gss_wrap_iov_length; gss_wrap_size_limit; - gssint_g_seqstate_init; - gsskrb5_extract_authtime_from_sec_context; - gsskrb5_extract_authz_data_from_sec_context; - gssspi_mech_invoke; + gss_set_cred_option; gssspi_set_cred_option; + gssspi_mech_invoke; krb5_gss_dbg_client_expcreds; krb5_gss_register_acceptor_identity; krb5_gss_use_kdc_context; + gss_inquire_name; + gss_acquire_cred_from; + gss_add_cred_from; + gss_store_cred_into; + gssint_g_seqstate_init; }; +HIDDEN { local: __*; _rest*; _save*; *; }; diff --git a/krb5/lib/kadm5clnt/version.map b/krb5/lib/kadm5clnt/version.map index 9743c7cf6140..1b624130144d 100644 --- a/krb5/lib/kadm5clnt/version.map +++ b/krb5/lib/kadm5clnt/version.map @@ -1,4 +1,4 @@ -KRB5_KADM5_CLNT_1.0 { +kadm5clnt_mit_12_MIT { global: _kadm5_check_handle; _kadm5_chpass_principal_util; @@ -116,3 +116,4 @@ KRB5_KADM5_CLNT_1.0 { xdr_ui_4; kadm5_init_iprop; }; +HIDDEN { local: __*; _rest*; _save*; *; }; diff --git a/krb5/lib/kadm5srv/version.map b/krb5/lib/kadm5srv/version.map index a0e9da6daef2..d18753acad3f 100644 --- a/krb5/lib/kadm5srv/version.map +++ b/krb5/lib/kadm5srv/version.map @@ -1,4 +1,4 @@ -KRB5_KADM5_SRV_1.0 { +kadm5srv_mit_12_MIT { global: _kadm5_check_handle; _kadm5_chpass_principal_util; @@ -135,3 +135,4 @@ KRB5_KADM5_SRV_1.0 { xdr_ui_4; kadm5_init_iprop; }; +HIDDEN { local: __*; _rest*; _save*; *; }; diff --git a/krb5/lib/kdb/version.map b/krb5/lib/kdb/version.map index 9522af1e9edd..63096fe7190a 100644 --- a/krb5/lib/kdb/version.map +++ b/krb5/lib/kdb/version.map @@ -1,4 +1,4 @@ -KRB5_KDB5_1.0 { +kdb5_10_MIT { global: krb5_db_setup_lib_handle; krb5_db_open; @@ -109,3 +109,4 @@ KRB5_KDB5_1.0 { xdr_kdb_incr_update_t; krb5_dbe_sort_key_data; }; +HIDDEN { local: __*; _rest*; _save*; *; }; diff --git a/krb5/lib/krad/version.map b/krb5/lib/krad/version.map index 7e058d9bd494..a18fa4665e50 100644 --- a/krb5/lib/krad/version.map +++ b/krb5/lib/krad/version.map @@ -1,4 +1,4 @@ -KRB5_KRAD_1.0 { +krad_0_MIT { global: krad_code_name2num; krad_code_num2name; @@ -24,3 +24,4 @@ KRB5_KRAD_1.0 { krad_client_free; krad_client_send; }; +HIDDEN { local: __*; _rest*; _save*; *; }; diff --git a/krb5/lib/krb5/version.map b/krb5/lib/krb5/version.map index 3f37ce0dce31..daf066d47cfd 100644 --- a/krb5/lib/krb5/version.map +++ b/krb5/lib/krb5/version.map @@ -1,4 +1,4 @@ -KRB5_KRB5_1.0 { +krb5_3_MIT { global: _krb5_conf_boolean; decode_krb5_ad_kdcissued; @@ -105,6 +105,17 @@ KRB5_KRB5_1.0 { encode_krb5_ticket; encode_krb5_typed_data; encode_utf8_strings; + et_asn1_error_table; + et_k524_error_table; + et_kdb5_error_table; + et_krb5_error_table; + et_kv5m_error_table; + initialize_asn1_error_table; + initialize_k524_error_table; + initialize_kdb5_error_table; + initialize_krb5_error_table; + initialize_k5e1_error_table; + initialize_kv5m_error_table; k5_add_empty_pa_data; k5_add_pa_data_element; k5_add_pa_data_from_data; @@ -615,3 +626,4 @@ KRB5_KRB5_1.0 { krb5int_random_string; krb5int_trace; }; +HIDDEN { local: __*; _rest*; _save*; *; }; diff --git a/krb5/lib/rpc/version.map b/krb5/lib/rpc/version.map index 4a5052b71536..95ef4715572c 100644 --- a/krb5/lib/rpc/version.map +++ b/krb5/lib/rpc/version.map @@ -1,4 +1,4 @@ -KRB5_RPC_1.0 { +gssrpc_4_MIT { global: gssrpc_auth_debug_gss; gssrpc_auth_debug_gssapi; @@ -145,3 +145,4 @@ KRB5_RPC_1.0 { gssrpc_xprt_register; gssrpc_xprt_unregister; }; +HIDDEN { local: __*; _rest*; _save*; *; }; diff --git a/krb5/plugins/audit/version.map b/krb5/plugins/audit/version.map index b6d3368df002..599442dcd8ab 100644 --- a/krb5/plugins/audit/version.map +++ b/krb5/plugins/audit/version.map @@ -1,4 +1,4 @@ -KRB5_AUDIT_1.0 { +audit_121_MIT { global: kau_j_kdc_stop; kau_j_kdc_start; @@ -8,3 +8,4 @@ KRB5_AUDIT_1.0 { kau_j_tgs_s4u2proxy; kau_j_tgs_u2u; }; +HIDDEN { local: __*; _rest*; _save*; *; }; diff --git a/krb5/plugins/k5tls/version.map b/krb5/plugins/k5tls/version.map index 802628aaaf63..d8602cb1559a 100644 --- a/krb5/plugins/k5tls/version.map +++ b/krb5/plugins/k5tls/version.map @@ -1,4 +1,5 @@ -KRB5_K5TLS_1.0 { +HIDDEN { local: __*; _rest*; _save*; *; }; +k5tls_0_MIT { global: tls_k5tls_initvt; }; diff --git a/krb5/plugins/kdb/db2/version.map b/krb5/plugins/kdb/db2/version.map index aa524e506fb8..6c7362e3e06b 100644 --- a/krb5/plugins/kdb/db2/version.map +++ b/krb5/plugins/kdb/db2/version.map @@ -1,109 +1,5 @@ -KRB5_DB2_1.0 { +HIDDEN { local: __*; _rest*; _save*; *; }; +db2_0_MIT { global: - __default_hash; - __kdb2_add_bigpage; - __kdb2_add_ovflpage; - __kdb2_addel; - __kdb2_big_delete; - __kdb2_big_insert; - __kdb2_big_keydata; - __kdb2_big_return; - __kdb2_bt_close; - __kdb2_bt_cmp; - __kdb2_bt_defcmp; - __kdb2_bt_defpfx; - __kdb2_bt_deleaf; - __kdb2_bt_delete; - __kdb2_bt_dmpage; - __kdb2_bt_dnpage; - __kdb2_bt_dpage; - __kdb2_bt_dump; - __kdb2_bt_fd; - __kdb2_bt_free; - __kdb2_bt_get; - __kdb2_bt_new; - __kdb2_bt_open; - __kdb2_bt_pgin; - __kdb2_bt_pgout; - __kdb2_bt_put; - __kdb2_bt_relink; - __kdb2_bt_ret; - __kdb2_bt_search; - __kdb2_bt_seq; - __kdb2_bt_setcur; - __kdb2_bt_split; - __kdb2_bt_stat; - __kdb2_bt_sync; - __kdb2_call_hash; - __kdb2_cursor_creat; - __kdb2_dbpanic; - __kdb2_delete_page; - __kdb2_delpair; - __kdb2_expand_table; - __kdb2_find_bigpair; - __kdb2_free_ovflpage; - __kdb2_get_bigkey; - __kdb2_get_item; - __kdb2_get_item_done; - __kdb2_get_item_first; - __kdb2_get_item_next; - __kdb2_get_item_reset; - __kdb2_get_page; - __kdb2_hash_open; - __kdb2_ibitmap; - __kdb2_log2; - __kdb2_new_page; - __kdb2_ovfl_delete; - __kdb2_ovfl_get; - __kdb2_ovfl_put; - __kdb2_pgin_routine; - __kdb2_pgout_routine; - __kdb2_put_page; - __kdb2_rec_close; - __kdb2_rec_delete; - __kdb2_rec_dleaf; - __kdb2_rec_fd; - __kdb2_rec_fmap; - __kdb2_rec_fpipe; - __kdb2_rec_get; - __kdb2_rec_iput; - __kdb2_rec_open; - __kdb2_rec_put; - __kdb2_rec_ret; - __kdb2_rec_search; - __kdb2_rec_seq; - __kdb2_rec_sync; - __kdb2_rec_vmap; - __kdb2_rec_vpipe; - __kdb2_split_page; - kdb2_dbm_clearerr; - kdb2_dbm_close; - kdb2_dbm_delete; - kdb2_dbm_dirfno; - kdb2_dbm_error; - kdb2_dbm_fetch; - kdb2_dbm_firstkey; - kdb2_dbm_nextkey; - kdb2_dbm_open; - kdb2_dbm_store; - kdb2_dbminit; - kdb2_dbopen; - kdb2_delete; - kdb2_fetch; - kdb2_firstkey; - kdb2_hcreate; - kdb2_hdestroy; - kdb2_hsearch; - kdb2_mpool_close; - kdb2_mpool_delete; - kdb2_mpool_filter; - kdb2_mpool_get; - kdb2_mpool_new; - kdb2_mpool_open; - kdb2_mpool_put; - kdb2_mpool_stat; - kdb2_mpool_sync; - kdb2_nextkey; - kdb2_store; kdb_function_table; }; diff --git a/krb5/plugins/preauth/otp/version.map b/krb5/plugins/preauth/otp/version.map index 9d2ee5ea7213..f2d914551789 100644 --- a/krb5/plugins/preauth/otp/version.map +++ b/krb5/plugins/preauth/otp/version.map @@ -1,4 +1,5 @@ -KRB5_PREAUTH_OTP { +HIDDEN { local: __*; _rest*; _save*; *; }; +otp_0_MIT { global: kdcpreauth_otp_initvt; }; diff --git a/krb5/plugins/preauth/pkinit/version.map b/krb5/plugins/preauth/pkinit/version.map index 39a9f81f83ef..c4498e8f473a 100644 --- a/krb5/plugins/preauth/pkinit/version.map +++ b/krb5/plugins/preauth/pkinit/version.map @@ -1,4 +1,5 @@ -KRB5_PREAUTH_PKINIT_1.0 { +HIDDEN { local: __*; _rest*; _save*; *; }; +pkinit_0_MIT { global: clpreauth_pkinit_initvt; kdcpreauth_pkinit_initvt; diff --git a/krb5/plugins/preauth/spake/version.map b/krb5/plugins/preauth/spake/version.map index 7763f289c80d..d29c0e05083d 100644 --- a/krb5/plugins/preauth/spake/version.map +++ b/krb5/plugins/preauth/spake/version.map @@ -1,4 +1,5 @@ -KRB5_PLUGINS_SPAKE_1.0 { +HIDDEN { local: __*; _rest*; _save*; *; }; +spake_0_MIT { global: clpreauth_spake_initvt; kdcpreauth_spake_initvt; diff --git a/krb5/plugins/preauth/test/version.map b/krb5/plugins/preauth/test/version.map index e27e14869833..d6d445ad5bf8 100644 --- a/krb5/plugins/preauth/test/version.map +++ b/krb5/plugins/preauth/test/version.map @@ -1,4 +1,5 @@ -KRB5_PREAUTH_TEST_1.0 { +HIDDEN { local: __*; _rest*; _save*; *; }; +test_0_MIT { global: clpreauth_test_initvt; kdcpreauth_test_initvt; diff --git a/krb5/util/et/version.map b/krb5/util/et/version.map index be846b139ebc..96f9fe53838c 100644 --- a/krb5/util/et/version.map +++ b/krb5/util/et/version.map @@ -1,4 +1,4 @@ -KRB5_ET_1.0 { +com_err_3_MIT { global: add_error_table; com_err; @@ -10,3 +10,4 @@ KRB5_ET_1.0 { reset_com_err_hook; set_com_err_hook; }; +HIDDEN { local: __*; _rest*; _save*; *; }; diff --git a/krb5/util/profile/version.map b/krb5/util/profile/version.map index d7fd0059983d..31960193977b 100644 --- a/krb5/util/profile/version.map +++ b/krb5/util/profile/version.map @@ -1,33 +1,74 @@ -KRB5_PROFILE_1.0 { +profile_1_MIT { global: et_prof_error_table; initialize_prof_error_table; profile_abandon; + profile_add_node; profile_add_relation; profile_clear_relation; + profile_close_file; + profile_copy; + profile_create_node; + profile_dereference_data; + profile_dereference_data_locked; + profile_file_is_writable; + profile_find_node; + profile_find_node_relation; + profile_find_node_subsection; profile_flush; + profile_flush_file_data; + profile_flush_file_data_to_buffer; + profile_flush_file_data_to_file; + profile_flush_to_buffer; + profile_flush_to_file; + profile_free_buffer; + profile_free_file; profile_free_list; + profile_free_node; profile_get_boolean; profile_get_integer; + profile_get_node_name; + profile_get_node_parent; + profile_get_node_value; profile_get_relation_names; profile_get_string; profile_get_subsection_names; + profile_get_value; profile_get_values; profile_init; profile_init_flags; profile_init_path; profile_init_vtable; + profile_is_modified; + profile_is_node_final; + profile_is_writable; profile_iterator; profile_iterator_create; profile_iterator_free; + profile_lock_global; + profile_make_node_final; + profile_make_prf_data; + profile_node_iterator; + profile_node_iterator_create; + profile_node_iterator_free; + profile_open_file; + profile_parse_file; + profile_process_directory; profile_release; profile_release_string; + profile_remove_node; + profile_rename_node; profile_rename_section; profile_ser_externalize; profile_ser_internalize; profile_ser_size; + profile_set_relation_value; + profile_unlock_global; + profile_update_file_data; + profile_update_file_data_locked; profile_update_relation; - profile_flush_to_file; - profile_flush_to_buffer; - profile_free_buffer; + profile_verify_node; + profile_write_tree_file; + profile_write_tree_to_buffer; }; +HIDDEN { local: __*; _rest*; _save*; *; }; diff --git a/krb5/util/support/version.map b/krb5/util/support/version.map index f4de213d33d9..cc48ec6a4c8e 100644 --- a/krb5/util/support/version.map +++ b/krb5/util/support/version.map @@ -1,4 +1,4 @@ -KRB5_SUPPORT_1.0 { +krb5support_0_MIT { global: k5_base64_decode; k5_base64_encode; @@ -100,3 +100,4 @@ KRB5_SUPPORT_1.0 { krb5int_utf8_mintab; krb5int_zap; }; +HIDDEN { local: __*; _rest*; _save*; *; }; diff --git a/krb5/util/verto/version.map b/krb5/util/verto/version.map index 5fc734e25d3a..ea3b7dcc13b2 100644 --- a/krb5/util/verto/version.map +++ b/krb5/util/verto/version.map @@ -1,4 +1,4 @@ -KRB5_VERTO_1.0 { +verto_0_MIT { global: verto_add_child; verto_add_idle; @@ -34,3 +34,4 @@ KRB5_VERTO_1.0 { verto_set_private; verto_set_proc_status; }; +HIDDEN { local: __*; _rest*; _save*; *; }; From nobody Thu Jul 24 17:14:15 2025 X-Original-To: dev-commits-src-all@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 4bnyKM6m7wz62yFT; Thu, 24 Jul 2025 17:14: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnyKM1tD1z3cs1; Thu, 24 Jul 2025 17:14:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753377255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KkiaRZ8bZR50zKj06IIfoqmyN9m5+9WfUF+nkS0d7FU=; b=bAJiwFe8M1rZ65NOGIRRA6vB2+Gh1Icgn7Fx6DrU+1qDqwAZ405Vioh2YasqF4EBmG3Ax6 DeAM8ghZnrzH4RvPIJ6dJuMOvAY9QU3hRJcvze7gGybIwRy4IJAyBM+IZOlVPQlSYlKe/1 Gb/EGyoXVZvBBFna7b7AnB3vFlc8neDsveESR5WvTi8sCcKIsHDr7lHSPrgK+nVBuHmhdn EoORrWXIH6eNvbADoPZevtVm+0pUouwHh7oxRYON/CDxq7YRicjnZmr/skLON7hbsiqhOT 5qw946PEwpcapcRMVXnVUkmSKDTLff4OVWZlDhYtqr2pmEWVwFDhdrE85nTW6Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753377255; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KkiaRZ8bZR50zKj06IIfoqmyN9m5+9WfUF+nkS0d7FU=; b=mizmVXPbrlReJlxQW3aH9+CmXB6VKNALdV49jlndc/aMG169nOMlhLH4DFWuA/InZmxIgF CEfp5g31nEd15vmIgT10zX1K8W0zKF/sZ2XjXkHhpeY7kZlEX1cWLASZWl3+5zXlMHGj+Q 4JcfY6nEiUu+C+ZsUHHn1vGsZ3FS9NfRuoHgnggKupHXayGbD4csOpiii547TAPxbyKGUc qskkHgWK4GOoHTDd242+skUISrAX4b5B16VjOhGFIZ3XVR0Wf5Q3zjhIGwxjHofM3/yfBE JxNeIuYntsFU872CZMV8bv9P6KLbsLk1JQZuYEJl/u+Fn8TzCYxaMepufMoQ1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753377255; a=rsa-sha256; cv=none; b=JhJ2QdkYTkwvmdp32q6Dl51etxo/nsK6p2SOLX5vIdkdwuTSGLBz+fVIRJnaZb83sNrUku yae8UJ9v+dazSy9kLeGZJKP0SF75UyotwcbG3VG7UlQ5LrbiUflacfhbYI2iS/QsqoYFYR ZAUZ5H0hR3uQjjuJ8GOZrXsdEei+MF+K0IIDApwMZe29q7H0MSIsZ6Hc1kCHkZjoFizw+3 EjSmHfr1YgL1E3jU4So28E/fPNFrK+gGAx6l/Bonr6ZQbqGmLt0ZoKmibKRyRkQ1j5Bugz d1dmnVn27GgVsgzoensVVFJVc9KMcvPV5eR/m2Goh+HUBRuN18C6vC2ITte5qw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnyKM1QqGz16gx; Thu, 24 Jul 2025 17:14:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OHEFsE074664; Thu, 24 Jul 2025 17:14:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OHEFYg074661; Thu, 24 Jul 2025 17:14:15 GMT (envelope-from git) Date: Thu, 24 Jul 2025 17:14:15 GMT Message-Id: <202507241714.56OHEFYg074661@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: e447c252d0ec - main - krb5: Merge Heimdal common functions into version maps List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e447c252d0eca8f1440996f2a3521c75c06ae126 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=e447c252d0eca8f1440996f2a3521c75c06ae126 commit e447c252d0eca8f1440996f2a3521c75c06ae126 Author: Cy Schubert AuthorDate: 2025-07-24 16:24:03 +0000 Commit: Cy Schubert CommitDate: 2025-07-24 16:31:40 +0000 krb5: Merge Heimdal common functions into version maps Requested by: kib --- krb5/lib/gssapi/version.map | 171 +++++++++--------- krb5/lib/krb5/version.map | 430 ++++++++++++++++++++++---------------------- krb5/util/et/version.map | 12 +- 3 files changed, 312 insertions(+), 301 deletions(-) diff --git a/krb5/lib/gssapi/version.map b/krb5/lib/gssapi/version.map index bd0d28df70a7..d52c0d3d1e36 100644 --- a/krb5/lib/gssapi/version.map +++ b/krb5/lib/gssapi/version.map @@ -1,3 +1,90 @@ +HEIMDAL_GSS_2.0 { + global: + gss_accept_sec_context; + gss_acquire_cred; + gss_acquire_cred_with_password; + gss_add_buffer_set_member; + gss_add_cred; + gss_add_cred_with_password; + gss_add_oid_set_member; + gss_authorize_localname; + gss_canonicalize_name; + gss_compare_name; + gss_context_time; + gss_create_empty_buffer_set; + gss_create_empty_oid_set; + gss_decapsulate_token; + gss_delete_name_attribute; + gss_delete_sec_context; + gss_display_mech_attr; + gss_display_name; + gss_display_name_ext; + gss_display_status; + gss_duplicate_name; + gss_encapsulate_token; + gss_export_cred; + gss_export_name; + gss_export_name_composite; + gss_export_sec_context; + gss_get_mic; + gss_get_name_attribute; + gss_import_cred; + gss_import_name; + gss_import_sec_context; + gss_indicate_mechs; + gss_indicate_mechs_by_attrs; + gss_init_sec_context; + gss_inquire_attrs_for_mech; + gss_inquire_context; + gss_inquire_cred; + gss_inquire_cred_by_mech; + gss_inquire_cred_by_oid; + gss_inquire_mech_for_saslname; + gss_inquire_mechs_for_name; + gss_inquire_name; + gss_inquire_names_for_mech; + gss_inquire_saslname_for_mech; + gss_krb5_ccache_name; + gss_krb5_copy_ccache; + gss_krb5_export_lucid_sec_context; + gss_krb5_free_lucid_sec_context; + gss_krb5_get_tkt_flags; + gss_krb5_import_cred; + gss_krb5_set_allowable_enctypes; + gss_oid_equal; + gss_oid_to_str; + gss_pname_to_uid; + gss_process_context_token; + gss_pseudo_random; + gss_release_buffer; + gss_release_buffer_set; + gss_release_cred; + gss_release_iov_buffer; + gss_release_name; + gss_release_oid; + gss_release_oid_set; + gss_seal; + gss_set_cred_option; + gss_set_name_attribute; + gss_set_sec_context_option; + gss_sign; + gss_store_cred; + gss_test_oid_set_member; + gss_unseal; + gss_unwrap; + gss_unwrap_iov; + gss_userok; + gss_verify; + gss_verify_mic; + gss_wrap; + gss_wrap_iov; + gss_wrap_iov_length; + gss_wrap_size_limit; + gsskrb5_extract_authtime_from_sec_context; + gsskrb5_extract_authz_data_from_sec_context; + krb5_gss_register_acceptor_identity; +}; + gssapi_krb5_2_MIT { global: GSS_C_ATTR_LOCAL_LOGIN_USER; @@ -46,67 +133,14 @@ gssapi_krb5_2_MIT { GSS_C_MA_CTX_TRANS; GSS_C_MA_NEGOEX_AND_SPNEGO; GSS_C_SEC_CONTEXT_SASL_SSF; - gss_accept_sec_context; - gss_acquire_cred; - gss_acquire_cred_with_password; gss_acquire_cred_impersonate_name; - gss_add_buffer_set_member; - gss_add_cred; gss_add_cred_impersonate_name; - gss_add_cred_with_password; - gss_add_oid_set_member; - gss_authorize_localname; - gss_canonicalize_name; - gss_compare_name; gss_complete_auth_token; - gss_context_time; - gss_create_empty_buffer_set; - gss_create_empty_oid_set; - gss_decapsulate_token; - gss_delete_name_attribute; - gss_delete_sec_context; - gss_display_mech_attr; - gss_display_name; - gss_display_name_ext; - gss_display_status; - gss_duplicate_name; - gss_encapsulate_token; - gss_export_cred; - gss_export_name; - gss_export_name_composite; - gss_export_sec_context; - gss_get_mic; gss_get_mic_iov; gss_get_mic_iov_length; - gss_get_name_attribute; - gss_import_cred; - gss_import_name; - gss_import_sec_context; - gss_indicate_mechs; - gss_init_sec_context; - gss_indicate_mechs_by_attrs; - gss_inquire_attrs_for_mech; - gss_inquire_context; - gss_inquire_cred; - gss_inquire_cred_by_mech; - gss_inquire_cred_by_oid; - gss_inquire_mech_for_saslname; - gss_inquire_mechs_for_name; - gss_inquire_names_for_mech; - gss_inquire_saslname_for_mech; - gss_inquire_sec_context_by_oid; - gss_krb5_ccache_name; - gss_krb5_copy_ccache; - gss_krb5_export_lucid_sec_context; - gss_krb5_free_lucid_sec_context; - gss_krb5_get_tkt_flags; - gss_krb5_import_cred; - gss_krb5_set_allowable_enctypes; gss_krb5_set_cred_rcache; gss_krb5int_make_seal_token_v3; gss_krb5int_unseal_token_v3; - gsskrb5_extract_authtime_from_sec_context; - gsskrb5_extract_authz_data_from_sec_context; gss_localname; gss_map_name_to_any; gss_mech_iakerb; @@ -124,47 +158,16 @@ gssapi_krb5_2_MIT { gss_nt_service_name_v2; gss_nt_string_uid_name; gss_nt_user_name; - gss_oid_equal; - gss_oid_to_str; - gss_pname_to_uid; - gss_pseudo_random; - gss_process_context_token; gss_release_any_name_mapping; - gss_release_buffer_set; - gss_release_buffer; - gss_release_cred; - gss_release_iov_buffer; - gss_release_name; - gss_release_oid; - gss_release_oid_set; - gss_seal; - gss_set_name_attribute; gss_set_neg_mechs; - gss_set_sec_context_option; - gss_sign; - gss_store_cred; gss_str_to_oid; - gss_test_oid_set_member; - gss_unseal; - gss_unwrap; gss_unwrap_aead; - gss_unwrap_iov; - gss_userok; - gss_verify; - gss_verify_mic; gss_verify_mic_iov; - gss_wrap; gss_wrap_aead; - gss_wrap_iov; - gss_wrap_iov_length; - gss_wrap_size_limit; - gss_set_cred_option; gssspi_set_cred_option; gssspi_mech_invoke; krb5_gss_dbg_client_expcreds; - krb5_gss_register_acceptor_identity; krb5_gss_use_kdc_context; - gss_inquire_name; gss_acquire_cred_from; gss_add_cred_from; gss_store_cred_into; diff --git a/krb5/lib/krb5/version.map b/krb5/lib/krb5/version.map index daf066d47cfd..ce399a93e03e 100644 --- a/krb5/lib/krb5/version.map +++ b/krb5/lib/krb5/version.map @@ -1,3 +1,220 @@ +HEIMDAL_KRB5_2.0 { + global: + initialize_k524_error_table; + initialize_krb5_error_table; + krb524_convert_creds_kdc; + krb5_address_compare; + krb5_address_order; + krb5_address_search; + krb5_allow_weak_crypto; + krb5_aname_to_localname; + krb5_appdefault_boolean; + krb5_appdefault_string; + krb5_auth_con_free; + krb5_auth_con_genaddrs; + krb5_auth_con_getaddrs; + krb5_auth_con_getauthenticator; + krb5_auth_con_getflags; + krb5_auth_con_getkey; + krb5_auth_con_getlocalseqnumber; + krb5_auth_con_getlocalsubkey; + krb5_auth_con_getrcache; + krb5_auth_con_getrecvsubkey; + krb5_auth_con_getremoteseqnumber; + krb5_auth_con_getremotesubkey; + krb5_auth_con_getsendsubkey; + krb5_auth_con_init; + krb5_auth_con_setaddrs; + krb5_auth_con_setflags; + krb5_auth_con_setrcache; + krb5_auth_con_setrecvsubkey; + krb5_auth_con_setsendsubkey; + krb5_build_principal; + krb5_build_principal_ext; + krb5_build_principal_va; + krb5_cc_cache_match; + krb5_cc_close; + krb5_cc_copy_creds; + krb5_cc_default; + krb5_cc_default_name; + krb5_cc_destroy; + krb5_cc_end_seq_get; + krb5_cc_gen_new; + krb5_cc_get_config; + krb5_cc_get_full_name; + krb5_cc_get_name; + krb5_cc_get_principal; + krb5_cc_get_type; + krb5_cc_initialize; + krb5_cc_move; + krb5_cc_new_unique; + krb5_cc_next_cred; + krb5_cc_register; + krb5_cc_remove_cred; + krb5_cc_resolve; + krb5_cc_retrieve_cred; + krb5_cc_set_config; + krb5_cc_set_default_name; + krb5_cc_set_flags; + krb5_cc_start_seq_get; + krb5_cc_store_cred; + krb5_cc_support_switch; + krb5_cc_switch; + krb5_cccol_cursor_free; + krb5_cccol_cursor_new; + krb5_cccol_cursor_next; + krb5_change_password; + krb5_clear_error_message; + krb5_copy_addresses; + krb5_copy_checksum; + krb5_copy_context; + krb5_copy_creds; + krb5_copy_data; + krb5_copy_keyblock; + krb5_copy_keyblock_contents; + krb5_copy_principal; + krb5_copy_ticket; + krb5_expand_hostname; + krb5_fcc_ops; + krb5_free_address; + krb5_free_addresses; + krb5_free_ap_rep_enc_part; + krb5_free_authenticator; + krb5_free_checksum; + krb5_free_checksum_contents; + krb5_free_config_files; + krb5_free_context; + krb5_free_cred_contents; + krb5_free_creds; + krb5_free_data; + krb5_free_data_contents; + krb5_free_default_realm; + krb5_free_error_message; + krb5_free_host_realm; + krb5_free_kdc_rep; + krb5_free_keyblock; + krb5_free_keyblock_contents; + krb5_free_principal; + krb5_free_ticket; + krb5_free_unparsed_name; + krb5_fwd_tgt_creds; + krb5_generate_seq_number; + krb5_generate_subkey; + krb5_get_credentials; + krb5_get_default_config_files; + krb5_get_default_realm; + krb5_get_error_message; + krb5_get_host_realm; + krb5_get_in_tkt_with_keytab; + krb5_get_in_tkt_with_password; + krb5_get_in_tkt_with_skey; + krb5_get_init_creds_keytab; + krb5_get_init_creds_opt_alloc; + krb5_get_init_creds_opt_free; + krb5_get_init_creds_opt_init; + krb5_get_init_creds_opt_set_address_list; + krb5_get_init_creds_opt_set_anonymous; + krb5_get_init_creds_opt_set_canonicalize; + krb5_get_init_creds_opt_set_etype_list; + krb5_get_init_creds_opt_set_forwardable; + krb5_get_init_creds_opt_set_pac_request; + krb5_get_init_creds_opt_set_preauth_list; + krb5_get_init_creds_opt_set_proxiable; + krb5_get_init_creds_opt_set_renew_life; + krb5_get_init_creds_opt_set_salt; + krb5_get_init_creds_opt_set_tkt_life; + krb5_get_init_creds_password; + krb5_get_permitted_enctypes; + krb5_get_renewed_creds; + krb5_get_server_rcache; + krb5_get_validated_creds; + krb5_init_context; + krb5_init_creds_free; + krb5_init_creds_get; + krb5_init_creds_get_creds; + krb5_init_creds_get_error; + krb5_init_creds_init; + krb5_init_creds_set_keytab; + krb5_init_creds_set_password; + krb5_init_creds_set_service; + krb5_is_config_principal; + krb5_is_thread_safe; + krb5_kt_add_entry; + krb5_kt_close; + krb5_kt_default; + krb5_kt_default_name; + krb5_kt_end_seq_get; + krb5_kt_free_entry; + krb5_kt_get_entry; + krb5_kt_get_name; + krb5_kt_get_type; + krb5_kt_have_content; + krb5_kt_next_entry; + krb5_kt_read_service_key; + krb5_kt_register; + krb5_kt_remove_entry; + krb5_kt_resolve; + krb5_kt_start_seq_get; + krb5_kuserok; + krb5_mcc_ops; + krb5_mk_error; + krb5_mk_priv; + krb5_mk_rep; + krb5_mk_req; + krb5_mk_req_extended; + krb5_mk_safe; + krb5_net_read; + krb5_net_write; + krb5_pac_add_buffer; + krb5_pac_free; + krb5_pac_get_buffer; + krb5_pac_get_types; + krb5_pac_init; + krb5_pac_parse; + krb5_pac_verify; + krb5_parse_name; + krb5_parse_name_flags; + krb5_prepend_error_message; + krb5_principal_compare; + krb5_principal_compare_any_realm; + krb5_prompter_posix; + krb5_rc_default; + krb5_rc_destroy; + krb5_rc_get_lifespan; + krb5_rc_initialize; + krb5_rd_cred; + krb5_rd_error; + krb5_rd_priv; + krb5_rd_rep; + krb5_rd_req; + krb5_rd_safe; + krb5_read_message; + krb5_realm_compare; + krb5_recvauth; + krb5_salttype_to_string; + krb5_sendauth; + krb5_sendto_kdc; + krb5_set_config_files; + krb5_set_default_realm; + krb5_set_error_message; + krb5_set_password; + krb5_set_password_using_ccache; + krb5_set_real_time; + krb5_sname_to_principal; + krb5_string_to_deltat; + krb5_string_to_salttype; + krb5_timeofday; + krb5_unparse_name; + krb5_unparse_name_flags; + krb5_us_timeofday; + krb5_verify_init_creds; + krb5_verify_init_creds_opt_init; + krb5_verify_init_creds_opt_set_ap_req_nofail; + krb5_vprepend_error_message; + krb5_vset_error_message; + krb5_write_message; +}; + krb5_3_MIT { global: _krb5_conf_boolean; @@ -111,9 +328,7 @@ krb5_3_MIT { et_krb5_error_table; et_kv5m_error_table; initialize_asn1_error_table; - initialize_k524_error_table; initialize_kdb5_error_table; - initialize_krb5_error_table; initialize_k5e1_error_table; initialize_kv5m_error_table; k5_add_empty_pa_data; @@ -184,55 +399,28 @@ krb5_3_MIT { k5_unmarshal_princ; k5_unwrap_cammac_svc; k5_zapfree_pa_data; - krb524_convert_creds_kdc; krb524_init_ets; krb5_425_conv_principal; krb5_524_conv_principal; krb5_524_convert_creds; - krb5_address_compare; - krb5_address_order; - krb5_address_search; - krb5_allow_weak_crypto; - krb5_aname_to_localname; krb5_anonymous_principal; krb5_anonymous_realm; - krb5_appdefault_boolean; - krb5_appdefault_string; - krb5_auth_con_free; - krb5_auth_con_genaddrs; krb5_auth_con_get_checksum_func; krb5_auth_con_get_authdata_context; - krb5_auth_con_getaddrs; - krb5_auth_con_getauthenticator; - krb5_auth_con_getflags; krb5_auth_con_getivector; - krb5_auth_con_getkey; krb5_auth_con_getkey_k; - krb5_auth_con_getlocalseqnumber; - krb5_auth_con_getlocalsubkey; krb5_auth_con_getpermetypes; - krb5_auth_con_getrcache; - krb5_auth_con_getrecvsubkey; krb5_auth_con_getrecvsubkey_k; - krb5_auth_con_getremoteseqnumber; - krb5_auth_con_getremotesubkey; - krb5_auth_con_getsendsubkey; krb5_auth_con_getsendsubkey_k; - krb5_auth_con_init; krb5_auth_con_initivector; krb5_auth_con_set_authdata_context; krb5_auth_con_set_checksum_func; krb5_auth_con_set_req_cksumtype; krb5_auth_con_set_safe_cksumtype; - krb5_auth_con_setaddrs; - krb5_auth_con_setflags; krb5_auth_con_setivector; krb5_auth_con_setpermetypes; krb5_auth_con_setports; - krb5_auth_con_setrcache; - krb5_auth_con_setrecvsubkey; krb5_auth_con_setrecvsubkey_k; - krb5_auth_con_setsendsubkey; krb5_auth_con_setsendsubkey_k; krb5_auth_con_setuseruserkey; krb5_authdata_context_copy; @@ -247,66 +435,21 @@ krb5_3_MIT { krb5_authdata_export_internal; krb5_authdata_free_internal; krb5_authdata_import_attributes; - krb5_build_principal; krb5_build_principal_alloc_va; - krb5_build_principal_ext; - krb5_build_principal_va; - krb5_cc_cache_match; - krb5_cc_close; - krb5_cc_copy_creds; - krb5_cc_default; - krb5_cc_default_name; - krb5_cc_destroy; krb5_cc_dfl_ops; krb5_cc_dup; - krb5_cc_end_seq_get; krb5_cc_file_ops; - krb5_cc_gen_new; - krb5_cc_get_config; - krb5_cc_get_full_name; - krb5_cc_get_name; - krb5_cc_get_principal; - krb5_cc_get_type; - krb5_cc_move; - krb5_cc_initialize; - krb5_cc_new_unique; - krb5_cc_next_cred; - krb5_cc_register; - krb5_cc_remove_cred; - krb5_cc_resolve; - krb5_cc_retrieve_cred; krb5_cc_select; - krb5_cc_set_config; - krb5_cc_set_default_name; - krb5_cc_set_flags; - krb5_cc_start_seq_get; - krb5_cc_store_cred; - krb5_cc_support_switch; - krb5_cc_switch; - krb5_cccol_cursor_free; - krb5_cccol_cursor_new; - krb5_cccol_cursor_next; krb5_cccol_have_content; krb5_change_cache; - krb5_change_password; krb5_check_clockskew; krb5_check_transited_list; krb5_chpw_message; krb5_chpw_result_code_string; - krb5_clear_error_message; krb5_copy_addr; - krb5_copy_addresses; krb5_copy_authdata; krb5_copy_authenticator; - krb5_copy_checksum; - krb5_copy_context; - krb5_copy_creds; - krb5_copy_data; krb5_copy_error_message; - krb5_copy_keyblock; - krb5_copy_keyblock_contents; - krb5_copy_principal; - krb5_copy_ticket; krb5_crypto_us_timeofday; krb5_decode_authdata_container; krb5_decode_ticket; @@ -316,29 +459,14 @@ krb5_3_MIT { krb5_encode_kdc_rep; krb5_encrypt_helper; krb5_encrypt_tkt_part; - krb5_expand_hostname; - krb5_fcc_ops; krb5_find_authdata; krb5_free_ad_kdcissued; - krb5_free_address; - krb5_free_addresses; krb5_free_ap_rep; - krb5_free_ap_rep_enc_part; krb5_free_ap_req; krb5_free_authdata; - krb5_free_authenticator; krb5_free_authenticator_contents; - krb5_free_checksum; - krb5_free_checksum_contents; - krb5_free_config_files; - krb5_free_context; krb5_free_cred; - krb5_free_cred_contents; krb5_free_cred_enc_part; - krb5_free_creds; - krb5_free_data; - krb5_free_data_contents; - krb5_free_default_realm; krb5_free_enc_data; krb5_free_enc_kdc_rep_part; krb5_free_enc_sam_response_enc_2; @@ -346,18 +474,13 @@ krb5_3_MIT { krb5_free_enc_tkt_part; krb5_free_enctypes; krb5_free_error; - krb5_free_error_message; krb5_free_etype_info; krb5_free_fast_armored_req; krb5_free_fast_req; krb5_free_fast_response; - krb5_free_host_realm; krb5_free_iakerb_finished; krb5_free_iakerb_header; - krb5_free_kdc_rep; krb5_free_kdc_req; - krb5_free_keyblock; - krb5_free_keyblock_contents; krb5_free_keytab_entry_contents; krb5_free_last_req; krb5_free_octet_data; @@ -366,7 +489,6 @@ krb5_3_MIT { krb5_free_pa_for_user; krb5_free_pa_pac_req; krb5_free_pa_s4u_x509_user; - krb5_free_principal; krb5_free_priv; krb5_free_priv_enc_part; krb5_free_realm_tree; @@ -379,169 +501,73 @@ krb5_3_MIT { krb5_free_sam_response_2_contents; krb5_free_string; krb5_free_tgt_creds; - krb5_free_ticket; krb5_free_tickets; krb5_free_tkt_authent; - krb5_free_unparsed_name; - krb5_fwd_tgt_creds; krb5_gen_portaddr; krb5_gen_replay_name; - krb5_generate_seq_number; - krb5_generate_subkey; krb5_get_cred_via_tkt; - krb5_get_credentials; krb5_get_credentials_for_proxy; krb5_get_credentials_for_user; krb5_get_credentials_renew; krb5_get_credentials_validate; - krb5_get_default_config_files; krb5_get_default_in_tkt_ktypes; - krb5_get_default_realm; - krb5_get_error_message; krb5_get_etype_info; krb5_get_fallback_host_realm; - krb5_get_host_realm; - krb5_get_in_tkt_with_keytab; - krb5_get_in_tkt_with_password; - krb5_get_in_tkt_with_skey; - krb5_get_init_creds_keytab; - krb5_get_init_creds_opt_alloc; - krb5_get_init_creds_opt_free; krb5_get_init_creds_opt_free_pa; krb5_get_init_creds_opt_get_fast_flags; krb5_get_init_creds_opt_get_pa; - krb5_get_init_creds_opt_init; - krb5_get_init_creds_opt_set_address_list; - krb5_get_init_creds_opt_set_anonymous; - krb5_get_init_creds_opt_set_canonicalize; krb5_get_init_creds_opt_set_change_password_prompt; - krb5_get_init_creds_opt_set_etype_list; krb5_get_init_creds_opt_set_expire_callback; krb5_get_init_creds_opt_set_fast_ccache; krb5_get_init_creds_opt_set_fast_ccache_name; krb5_get_init_creds_opt_set_fast_flags; - krb5_get_init_creds_opt_set_forwardable; krb5_get_init_creds_opt_set_in_ccache; krb5_get_init_creds_opt_set_out_ccache; krb5_get_init_creds_opt_set_pa; - krb5_get_init_creds_opt_set_pac_request; - krb5_get_init_creds_opt_set_preauth_list; - krb5_get_init_creds_opt_set_proxiable; - krb5_get_init_creds_opt_set_renew_life; krb5_get_init_creds_opt_set_responder; - krb5_get_init_creds_opt_set_salt; - krb5_get_init_creds_opt_set_tkt_life; - krb5_get_init_creds_password; krb5_get_notification_message; - krb5_get_permitted_enctypes; krb5_get_profile; krb5_get_prompt_types; krb5_get_realm_domain; - krb5_get_renewed_creds; - krb5_get_server_rcache; krb5_get_tgs_ktypes; krb5_get_time_offsets; - krb5_get_validated_creds; - krb5_init_context; krb5_init_context_profile; - krb5_init_creds_free; - krb5_init_creds_get; - krb5_init_creds_get_creds; - krb5_init_creds_get_error; krb5_init_creds_get_times; - krb5_init_creds_init; - krb5_init_creds_set_keytab; - krb5_init_creds_set_password; - krb5_init_creds_set_service; krb5_init_creds_step; krb5_init_keyblock; krb5_init_secure_context; - krb5_is_config_principal; krb5_is_permitted_enctype; krb5_is_referral_realm; - krb5_is_thread_safe; krb5_kdc_rep_decrypt_proc; krb5_kdc_sign_ticket; krb5_kdc_verify_ticket; - krb5_kt_add_entry; krb5_kt_client_default; - krb5_kt_close; - krb5_kt_default; - krb5_kt_default_name; krb5_kt_dfl_ops; krb5_kt_dup; - krb5_kt_end_seq_get; - krb5_kt_free_entry; - krb5_kt_get_entry; - krb5_kt_get_name; - krb5_kt_get_type; - krb5_kt_have_content; - krb5_kt_next_entry; - krb5_kt_read_service_key; - krb5_kt_register; - krb5_kt_remove_entry; - krb5_kt_resolve; - krb5_kt_start_seq_get; krb5_ktf_ops; krb5_ktf_writable_ops; - krb5_kuserok; krb5_lock_file; krb5_make_authdata_kdc_issued; krb5_make_full_ipaddr; krb5_make_fulladdr; krb5_marshal_credentials; - krb5_mcc_ops; krb5_merge_authdata; krb5_mk_1cred; - krb5_mk_error; krb5_mk_ncred; - krb5_mk_priv; - krb5_mk_rep; krb5_mk_rep_dce; - krb5_mk_req; - krb5_mk_req_extended; - krb5_mk_safe; - krb5_net_read; - krb5_net_write; krb5_os_localaddr; krb5_overridekeyname; - krb5_pac_add_buffer; - krb5_pac_free; - krb5_pac_get_buffer; - krb5_pac_get_types; - krb5_pac_init; - krb5_pac_parse; krb5_pac_sign; krb5_pac_sign_ext; - krb5_pac_verify; krb5_pac_verify_ext; krb5_pac_get_client_info; - krb5_parse_name; - krb5_parse_name_flags; - krb5_prepend_error_message; krb5_principal2salt; krb5_principal2salt_norealm; - krb5_principal_compare; - krb5_principal_compare_any_realm; krb5_principal_compare_flags; - krb5_prompter_posix; - krb5_rc_default; - krb5_rc_destroy; - krb5_rc_get_lifespan; - krb5_rc_initialize; - krb5_rd_cred; - krb5_rd_error; - krb5_rd_priv; - krb5_rd_rep; krb5_rd_rep_dce; - krb5_rd_req; krb5_rd_req_decoded; krb5_rd_req_decoded_anyflag; - krb5_rd_safe; - krb5_read_message; krb5_read_password; - krb5_realm_compare; - krb5_recvauth; krb5_recvauth_version; krb5_responder_get_challenge; krb5_responder_list_questions; @@ -552,9 +578,6 @@ krb5_3_MIT { krb5_responder_pkinit_get_challenge; krb5_responder_pkinit_set_answer; krb5_responder_pkinit_challenge_free; - krb5_salttype_to_string; - krb5_sendauth; - krb5_sendto_kdc; krb5_ser_pack_bytes; krb5_ser_pack_int32; krb5_ser_pack_int64; @@ -562,25 +585,16 @@ krb5_3_MIT { krb5_ser_unpack_int32; krb5_ser_unpack_int64; krb5_server_decrypt_ticket_keytab; - krb5_set_config_files; krb5_set_debugging_time; - krb5_set_default_realm; krb5_set_default_tgs_enctypes; krb5_set_default_tgs_ktypes; - krb5_set_error_message; - krb5_set_password; - krb5_set_password_using_ccache; krb5_set_principal_realm; - krb5_set_real_time; krb5_set_kdc_send_hook; krb5_set_kdc_recv_hook; krb5_set_time_offsets; krb5_set_trace_callback; krb5_set_trace_filename; krb5_sname_match; - krb5_sname_to_principal; - krb5_string_to_deltat; - krb5_string_to_salttype; krb5_string_to_timestamp; krb5int_tgtname; krb5_tkt_creds_free; @@ -589,28 +603,18 @@ krb5_3_MIT { krb5_tkt_creds_get_times; krb5_tkt_creds_init; krb5_tkt_creds_step; - krb5_timeofday; krb5_timestamp_to_sfstring; krb5_timestamp_to_string; krb5_unlock_file; krb5_unmarshal_credentials; krb5_unpack_full_ipaddr; - krb5_unparse_name; krb5_unparse_name_ext; - krb5_unparse_name_flags; krb5_unparse_name_flags_ext; - krb5_us_timeofday; krb5_use_natural_time; krb5_verify_authdata_kdc_issued; - krb5_verify_init_creds; - krb5_verify_init_creds_opt_init; - krb5_verify_init_creds_opt_set_ap_req_nofail; - krb5_vprepend_error_message; - krb5_vset_error_message; krb5_vwrap_error_message; krb5_walk_realm_tree; krb5_wrap_error_message; - krb5_write_message; krb5int_accessor; krb5int_cc_default; krb5int_cleanup_library; diff --git a/krb5/util/et/version.map b/krb5/util/et/version.map index 96f9fe53838c..3bd290009f22 100644 --- a/krb5/util/et/version.map +++ b/krb5/util/et/version.map @@ -1,13 +1,17 @@ -com_err_3_MIT { +HEIMDAL_COM_ERR_1.0 { global: - add_error_table; com_err; com_err_va; error_message; error_table_name; - error_table_name_r; - remove_error_table; reset_com_err_hook; set_com_err_hook; }; + +com_err_3_MIT { + global: + add_error_table; + error_table_name_r; + remove_error_table; +}; HIDDEN { local: __*; _rest*; _save*; *; }; From nobody Thu Jul 24 17:25:49 2025 X-Original-To: dev-commits-src-all@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 4bnyZk4VDHz62yk6; Thu, 24 Jul 2025 17:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnyZk040bz3lcR; Thu, 24 Jul 2025 17:25:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753377950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vp5fPlTWs7IPP/4KxA85qQLvL718drtpFrVO+xfP8y0=; b=jFsYUbWy39gygqFYiCC7PJkbPqNC5Zq4ekLHlQ1JmEFcUEcSWYBA1lBIAQr2cb4nmAId6a oIIbOYphI2slZ0+hc62V8Yzt9T8amI10oW31YbIV5wEkacpaxGBWKxuI49b020atqIVx5L QnSFiteCLJLRvnQeDT+PjgjjAF5p7dbbVkHes/JX73V/y+Q52TF5Qktlzo2+Lg8RZEdZyr lvU4FRAENcpmbpEdOJbnlI2CMNYA65zVYRf7gONsf2HvIbiS/XdqyF9B2ZugDM//9tYpdB BGDc8qKc+fbI3+5pRRdavCqFIVkWUlDazFc5mWSzcOBOBEyktSOpsJaejKlizQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753377950; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vp5fPlTWs7IPP/4KxA85qQLvL718drtpFrVO+xfP8y0=; b=UCG+a1BbMqoidsrZzkpSbqQkSMr0E07cb2Ix/Q74NZleFXzX6bmk3oPt1VHJIxrsKI5whD Rn8EQc780iboCvFh1cgty1S45nV2XiiVtThdObGJxgg1un1Y4pMPfNNfffzX1qCuqMO43w GmLs5OEAxKJk4lLaz2s/6kHRkYQTjgRSFwJjzGCGtnAFHnj1KxIhgQZaENqKQgXZW99Eig cc0P++rAB4oAcIKTs0yiNcAQA+udhV6Z4XVarGa97SjXcdhoJjYO3cGqNyR93SArNFBXli jhQ5gYMmisXESMd60UmSrMEdYFtOOHLThiMLxVgru6nMrrWZcNooY/I1RlLFVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753377950; a=rsa-sha256; cv=none; b=oE2MYsl8sNZwyL9tem3ReSc8+1Z9DSlZ6FcYVkP5j3W6wGk0a6yQRjkSvHUkgi3E6PW/h1 S/8b5FVjVVdulCfU2e1HKJj1Xl1cbjEqXj4s8z+8CsQmk0PKdt0RRSLZM0zutH3qAj9sSp ityCVj1qv3mekffbiTRFVl97kOeUj2KcJ0s6Z16QR70hJSyOIpMEuCn5qQk3XF1KOnETWe AD18qE0xSaFUk8fKJJG8Jlcd6WG6wRP8r/Mijaf5bOzE1GAcXjIyVpxLLCQbcKbYiBTL/f nKfbJAjjUjls6uCmZHLQZWN/Js4cKcqqIHdUQTW4shHGdeNAGFGFETZ/6fsLiA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnyZj6Lk9z17Ch; Thu, 24 Jul 2025 17:25:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OHPnMB094207; Thu, 24 Jul 2025 17:25:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OHPn8c094204; Thu, 24 Jul 2025 17:25:49 GMT (envelope-from git) Date: Thu, 24 Jul 2025 17:25:49 GMT Message-Id: <202507241725.56OHPn8c094204@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 58d9d2f8daef - main - asa.1: Drop SEE ALSO reference to long-gone f77(1) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 58d9d2f8daef8f646372efd6e87a7d4f5e05656b Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=58d9d2f8daef8f646372efd6e87a7d4f5e05656b commit 58d9d2f8daef8f646372efd6e87a7d4f5e05656b Author: Ed Maste AuthorDate: 2025-07-24 17:23:26 +0000 Commit: Ed Maste CommitDate: 2025-07-24 17:25:39 +0000 asa.1: Drop SEE ALSO reference to long-gone f77(1) Sponsored by: The FreeBSD Foundation --- usr.bin/asa/asa.1 | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.bin/asa/asa.1 b/usr.bin/asa/asa.1 index da1af0e8ce84..68d0735774a6 100644 --- a/usr.bin/asa/asa.1 +++ b/usr.bin/asa/asa.1 @@ -84,8 +84,6 @@ To format the output of a program and redirect it to a line-printer: .Pp .Dl "a.out | asa | lpr" -.Sh SEE ALSO -.Xr f77 1 .Sh STANDARDS The .Nm From nobody Thu Jul 24 17:27:50 2025 X-Original-To: dev-commits-src-all@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 4bnydJ6tl0z6305b; Thu, 24 Jul 2025 17:28:04 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnydJ20qDz3mkV; Thu, 24 Jul 2025 17:28:04 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 56OHRoZu035210; Thu, 24 Jul 2025 20:27:53 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 56OHRoZu035210 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 56OHRosX035209; Thu, 24 Jul 2025 20:27:50 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 24 Jul 2025 20:27:50 +0300 From: Konstantin Belousov To: Cy Schubert Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e447c252d0ec - main - krb5: Merge Heimdal common functions into version maps Message-ID: References: <202507241714.56OHEFYg074661@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202507241714.56OHEFYg074661@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Rspamd-Queue-Id: 4bnydJ20qDz3mkV 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:6939, ipnet:2001:470::/32, country:US] On Thu, Jul 24, 2025 at 05:14:15PM +0000, Cy Schubert wrote: > The branch main has been updated by cy: > > URL: https://cgit.FreeBSD.org/src/commit/?id=e447c252d0eca8f1440996f2a3521c75c06ae126 > > commit e447c252d0eca8f1440996f2a3521c75c06ae126 > Author: Cy Schubert > AuthorDate: 2025-07-24 16:24:03 +0000 > Commit: Cy Schubert > CommitDate: 2025-07-24 16:31:40 +0000 > > krb5: Merge Heimdal common functions into version maps > > Requested by: kib I do not remember that I ever asked to do this. More, I do not understand Kerberos to see such details. But see below. > --- > krb5/lib/gssapi/version.map | 171 +++++++++--------- > krb5/lib/krb5/version.map | 430 ++++++++++++++++++++++---------------------- > krb5/util/et/version.map | 12 +- > 3 files changed, 312 insertions(+), 301 deletions(-) > > diff --git a/krb5/lib/gssapi/version.map b/krb5/lib/gssapi/version.map > index bd0d28df70a7..d52c0d3d1e36 100644 > --- a/krb5/lib/gssapi/version.map > +++ b/krb5/lib/gssapi/version.map > @@ -1,3 +1,90 @@ > +HEIMDAL_GSS_2.0 { > + global: > + gss_accept_sec_context; > + gss_acquire_cred; > + gss_acquire_cred_with_password; > + gss_add_buffer_set_member; > + gss_add_cred; > + gss_add_cred_with_password; > + gss_add_oid_set_member; > + gss_authorize_localname; > + gss_canonicalize_name; > + gss_compare_name; > + gss_context_time; > + gss_create_empty_buffer_set; > + gss_create_empty_oid_set; > + gss_decapsulate_token; > + gss_delete_name_attribute; > + gss_delete_sec_context; > + gss_display_mech_attr; > + gss_display_name; > + gss_display_name_ext; > + gss_display_status; > + gss_duplicate_name; > + gss_encapsulate_token; > + gss_export_cred; > + gss_export_name; > + gss_export_name_composite; > + gss_export_sec_context; > + gss_get_mic; > + gss_get_name_attribute; > + gss_import_cred; > + gss_import_name; > + gss_import_sec_context; > + gss_indicate_mechs; > + gss_indicate_mechs_by_attrs; > + gss_init_sec_context; > + gss_inquire_attrs_for_mech; > + gss_inquire_context; > + gss_inquire_cred; > + gss_inquire_cred_by_mech; > + gss_inquire_cred_by_oid; > + gss_inquire_mech_for_saslname; > + gss_inquire_mechs_for_name; > + gss_inquire_name; > + gss_inquire_names_for_mech; > + gss_inquire_saslname_for_mech; > + gss_krb5_ccache_name; > + gss_krb5_copy_ccache; > + gss_krb5_export_lucid_sec_context; > + gss_krb5_free_lucid_sec_context; > + gss_krb5_get_tkt_flags; > + gss_krb5_import_cred; > + gss_krb5_set_allowable_enctypes; > + gss_oid_equal; > + gss_oid_to_str; > + gss_pname_to_uid; > + gss_process_context_token; > + gss_pseudo_random; > + gss_release_buffer; > + gss_release_buffer_set; > + gss_release_cred; > + gss_release_iov_buffer; > + gss_release_name; > + gss_release_oid; > + gss_release_oid_set; > + gss_seal; > + gss_set_cred_option; > + gss_set_name_attribute; > + gss_set_sec_context_option; > + gss_sign; > + gss_store_cred; > + gss_test_oid_set_member; > + gss_unseal; > + gss_unwrap; > + gss_unwrap_iov; > + gss_userok; > + gss_verify; > + gss_verify_mic; > + gss_wrap; > + gss_wrap_iov; > + gss_wrap_iov_length; > + gss_wrap_size_limit; > + gsskrb5_extract_authtime_from_sec_context; > + gsskrb5_extract_authz_data_from_sec_context; > + krb5_gss_register_acceptor_identity; > +}; > + > gssapi_krb5_2_MIT { > global: > GSS_C_ATTR_LOCAL_LOGIN_USER; > @@ -46,67 +133,14 @@ gssapi_krb5_2_MIT { > GSS_C_MA_CTX_TRANS; > GSS_C_MA_NEGOEX_AND_SPNEGO; > GSS_C_SEC_CONTEXT_SASL_SSF; > - gss_accept_sec_context; > - gss_acquire_cred; > - gss_acquire_cred_with_password; > gss_acquire_cred_impersonate_name; > - gss_add_buffer_set_member; > - gss_add_cred; > gss_add_cred_impersonate_name; > - gss_add_cred_with_password; > - gss_add_oid_set_member; > - gss_authorize_localname; > - gss_canonicalize_name; > - gss_compare_name; > gss_complete_auth_token; > - gss_context_time; > - gss_create_empty_buffer_set; > - gss_create_empty_oid_set; > - gss_decapsulate_token; > - gss_delete_name_attribute; > - gss_delete_sec_context; > - gss_display_mech_attr; > - gss_display_name; > - gss_display_name_ext; > - gss_display_status; > - gss_duplicate_name; > - gss_encapsulate_token; > - gss_export_cred; > - gss_export_name; > - gss_export_name_composite; > - gss_export_sec_context; > - gss_get_mic; > gss_get_mic_iov; > gss_get_mic_iov_length; > - gss_get_name_attribute; > - gss_import_cred; > - gss_import_name; > - gss_import_sec_context; > - gss_indicate_mechs; > - gss_init_sec_context; > - gss_indicate_mechs_by_attrs; > - gss_inquire_attrs_for_mech; > - gss_inquire_context; > - gss_inquire_cred; > - gss_inquire_cred_by_mech; > - gss_inquire_cred_by_oid; > - gss_inquire_mech_for_saslname; > - gss_inquire_mechs_for_name; > - gss_inquire_names_for_mech; > - gss_inquire_saslname_for_mech; > - gss_inquire_sec_context_by_oid; > - gss_krb5_ccache_name; > - gss_krb5_copy_ccache; > - gss_krb5_export_lucid_sec_context; > - gss_krb5_free_lucid_sec_context; > - gss_krb5_get_tkt_flags; > - gss_krb5_import_cred; > - gss_krb5_set_allowable_enctypes; > gss_krb5_set_cred_rcache; > gss_krb5int_make_seal_token_v3; > gss_krb5int_unseal_token_v3; > - gsskrb5_extract_authtime_from_sec_context; > - gsskrb5_extract_authz_data_from_sec_context; > gss_localname; > gss_map_name_to_any; > gss_mech_iakerb; > @@ -124,47 +158,16 @@ gssapi_krb5_2_MIT { > gss_nt_service_name_v2; > gss_nt_string_uid_name; > gss_nt_user_name; > - gss_oid_equal; > - gss_oid_to_str; > - gss_pname_to_uid; > - gss_pseudo_random; > - gss_process_context_token; > gss_release_any_name_mapping; > - gss_release_buffer_set; > - gss_release_buffer; > - gss_release_cred; > - gss_release_iov_buffer; > - gss_release_name; > - gss_release_oid; > - gss_release_oid_set; > - gss_seal; > - gss_set_name_attribute; > gss_set_neg_mechs; > - gss_set_sec_context_option; > - gss_sign; > - gss_store_cred; > gss_str_to_oid; > - gss_test_oid_set_member; > - gss_unseal; > - gss_unwrap; > gss_unwrap_aead; > - gss_unwrap_iov; > - gss_userok; > - gss_verify; > - gss_verify_mic; > gss_verify_mic_iov; > - gss_wrap; > gss_wrap_aead; > - gss_wrap_iov; > - gss_wrap_iov_length; > - gss_wrap_size_limit; > - gss_set_cred_option; > gssspi_set_cred_option; > gssspi_mech_invoke; > krb5_gss_dbg_client_expcreds; > - krb5_gss_register_acceptor_identity; > krb5_gss_use_kdc_context; > - gss_inquire_name; > gss_acquire_cred_from; > gss_add_cred_from; > gss_store_cred_into; This breaks the ABI of _current_ libc on HEAD even more. Please do bump the dso versions for all libs from kerberos/gss with same current name as it was in Heimdal time. From nobody Thu Jul 24 17:34:12 2025 X-Original-To: dev-commits-src-all@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 4bnymS20brz630GJ; Thu, 24 Jul 2025 17:34:16 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta003.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnymR4YT8z3qyJ; Thu, 24 Jul 2025 17:34:15 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTPS id evEUuM6mX9JM2ezpeuCv8B; Thu, 24 Jul 2025 17:34:14 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id ezpdutja0WX70ezpdu0DxK; Thu, 24 Jul 2025 17:34:14 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=d71WygjE c=1 sm=1 tr=0 ts=68826e96 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=Wb1JkmetP80A:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=EEpa6MD88qzaec5TMPsA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 9574AEF7; Thu, 24 Jul 2025 10:34:12 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 8B8E34D6; Thu, 24 Jul 2025 10:34:12 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Konstantin Belousov cc: Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e447c252d0ec - main - krb5: Merge Heimdal common functions into version maps In-reply-to: References: <202507241714.56OHEFYg074661@gitrepo.freebsd.org> Comments: In-reply-to Konstantin Belousov message dated "Thu, 24 Jul 2025 20:27:50 +0300." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 24 Jul 2025 10:34:12 -0700 Message-Id: <20250724173412.8B8E34D6@slippy.cwsent.com> X-CMAE-Envelope: MS4xfDagzy0yZB3MCq95SWPwW+vRQa/V9Gl+c52jqxPnzpyy5tGaHWf2onYLv/Xdo3f08W1mq75vI8OELq5nrCB3Pt3zts+QbMPHuEz7G3NlPASxiOobGnFy FWK1JA2jUVKqgQjT8vCVVLxJ6ULJfv1PfYhSXUrnc+HJVLHP3wkRSTT0nNb5WUltmFnQsnhvWriR60JaXnAMSRc2Y7B/t+PSgD/rH7TFKGucVqtF+VN0TaR0 pL75MPHyvgBQX2qqBBbDul9nxS5DbX3VRRTMiGQL2965MGcSf+bq5dqlYMbVpXbWR5/npEKLwdTJRwgHckGYXtTLaQHUwwEHs/BuHPENIydhN1FgYx4lhl7Y v5YdlCxu X-Rspamd-Queue-Id: 4bnymR4YT8z3qyJ 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:16509, ipnet:3.96.0.0/15, country:US] In message , Konstantin Belousov writes: > On Thu, Jul 24, 2025 at 05:14:15PM +0000, Cy Schubert wrote: > > The branch main has been updated by cy: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=e447c252d0eca8f1440996f2a3521c > 75c06ae126 > > > > commit e447c252d0eca8f1440996f2a3521c75c06ae126 > > Author: Cy Schubert > > AuthorDate: 2025-07-24 16:24:03 +0000 > > Commit: Cy Schubert > > CommitDate: 2025-07-24 16:31:40 +0000 > > > > krb5: Merge Heimdal common functions into version maps > > > > Requested by: kib > I do not remember that I ever asked to do this. > More, I do not understand Kerberos to see such details. > > But see below. > > > --- > > krb5/lib/gssapi/version.map | 171 +++++++++--------- > > krb5/lib/krb5/version.map | 430 ++++++++++++++++++++++------------------ > ---- > > krb5/util/et/version.map | 12 +- > > 3 files changed, 312 insertions(+), 301 deletions(-) > > > > diff --git a/krb5/lib/gssapi/version.map b/krb5/lib/gssapi/version.map > > index bd0d28df70a7..d52c0d3d1e36 100644 > > --- a/krb5/lib/gssapi/version.map > > +++ b/krb5/lib/gssapi/version.map > > @@ -1,3 +1,90 @@ > > +HEIMDAL_GSS_2.0 { > > + global: > > + gss_accept_sec_context; > > + gss_acquire_cred; > > + gss_acquire_cred_with_password; > > + gss_add_buffer_set_member; > > + gss_add_cred; > > + gss_add_cred_with_password; > > + gss_add_oid_set_member; > > + gss_authorize_localname; > > + gss_canonicalize_name; > > + gss_compare_name; > > + gss_context_time; > > + gss_create_empty_buffer_set; > > + gss_create_empty_oid_set; > > + gss_decapsulate_token; > > + gss_delete_name_attribute; > > + gss_delete_sec_context; > > + gss_display_mech_attr; > > + gss_display_name; > > + gss_display_name_ext; > > + gss_display_status; > > + gss_duplicate_name; > > + gss_encapsulate_token; > > + gss_export_cred; > > + gss_export_name; > > + gss_export_name_composite; > > + gss_export_sec_context; > > + gss_get_mic; > > + gss_get_name_attribute; > > + gss_import_cred; > > + gss_import_name; > > + gss_import_sec_context; > > + gss_indicate_mechs; > > + gss_indicate_mechs_by_attrs; > > + gss_init_sec_context; > > + gss_inquire_attrs_for_mech; > > + gss_inquire_context; > > + gss_inquire_cred; > > + gss_inquire_cred_by_mech; > > + gss_inquire_cred_by_oid; > > + gss_inquire_mech_for_saslname; > > + gss_inquire_mechs_for_name; > > + gss_inquire_name; > > + gss_inquire_names_for_mech; > > + gss_inquire_saslname_for_mech; > > + gss_krb5_ccache_name; > > + gss_krb5_copy_ccache; > > + gss_krb5_export_lucid_sec_context; > > + gss_krb5_free_lucid_sec_context; > > + gss_krb5_get_tkt_flags; > > + gss_krb5_import_cred; > > + gss_krb5_set_allowable_enctypes; > > + gss_oid_equal; > > + gss_oid_to_str; > > + gss_pname_to_uid; > > + gss_process_context_token; > > + gss_pseudo_random; > > + gss_release_buffer; > > + gss_release_buffer_set; > > + gss_release_cred; > > + gss_release_iov_buffer; > > + gss_release_name; > > + gss_release_oid; > > + gss_release_oid_set; > > + gss_seal; > > + gss_set_cred_option; > > + gss_set_name_attribute; > > + gss_set_sec_context_option; > > + gss_sign; > > + gss_store_cred; > > + gss_test_oid_set_member; > > + gss_unseal; > > + gss_unwrap; > > + gss_unwrap_iov; > > + gss_userok; > > + gss_verify; > > + gss_verify_mic; > > + gss_wrap; > > + gss_wrap_iov; > > + gss_wrap_iov_length; > > + gss_wrap_size_limit; > > + gsskrb5_extract_authtime_from_sec_context; > > + gsskrb5_extract_authz_data_from_sec_context; > > + krb5_gss_register_acceptor_identity; > > +}; > > + > > gssapi_krb5_2_MIT { > > global: > > GSS_C_ATTR_LOCAL_LOGIN_USER; > > @@ -46,67 +133,14 @@ gssapi_krb5_2_MIT { > > GSS_C_MA_CTX_TRANS; > > GSS_C_MA_NEGOEX_AND_SPNEGO; > > GSS_C_SEC_CONTEXT_SASL_SSF; > > - gss_accept_sec_context; > > - gss_acquire_cred; > > - gss_acquire_cred_with_password; > > gss_acquire_cred_impersonate_name; > > - gss_add_buffer_set_member; > > - gss_add_cred; > > gss_add_cred_impersonate_name; > > - gss_add_cred_with_password; > > - gss_add_oid_set_member; > > - gss_authorize_localname; > > - gss_canonicalize_name; > > - gss_compare_name; > > gss_complete_auth_token; > > - gss_context_time; > > - gss_create_empty_buffer_set; > > - gss_create_empty_oid_set; > > - gss_decapsulate_token; > > - gss_delete_name_attribute; > > - gss_delete_sec_context; > > - gss_display_mech_attr; > > - gss_display_name; > > - gss_display_name_ext; > > - gss_display_status; > > - gss_duplicate_name; > > - gss_encapsulate_token; > > - gss_export_cred; > > - gss_export_name; > > - gss_export_name_composite; > > - gss_export_sec_context; > > - gss_get_mic; > > gss_get_mic_iov; > > gss_get_mic_iov_length; > > - gss_get_name_attribute; > > - gss_import_cred; > > - gss_import_name; > > - gss_import_sec_context; > > - gss_indicate_mechs; > > - gss_init_sec_context; > > - gss_indicate_mechs_by_attrs; > > - gss_inquire_attrs_for_mech; > > - gss_inquire_context; > > - gss_inquire_cred; > > - gss_inquire_cred_by_mech; > > - gss_inquire_cred_by_oid; > > - gss_inquire_mech_for_saslname; > > - gss_inquire_mechs_for_name; > > - gss_inquire_names_for_mech; > > - gss_inquire_saslname_for_mech; > > - gss_inquire_sec_context_by_oid; > > - gss_krb5_ccache_name; > > - gss_krb5_copy_ccache; > > - gss_krb5_export_lucid_sec_context; > > - gss_krb5_free_lucid_sec_context; > > - gss_krb5_get_tkt_flags; > > - gss_krb5_import_cred; > > - gss_krb5_set_allowable_enctypes; > > gss_krb5_set_cred_rcache; > > gss_krb5int_make_seal_token_v3; > > gss_krb5int_unseal_token_v3; > > - gsskrb5_extract_authtime_from_sec_context; > > - gsskrb5_extract_authz_data_from_sec_context; > > gss_localname; > > gss_map_name_to_any; > > gss_mech_iakerb; > > @@ -124,47 +158,16 @@ gssapi_krb5_2_MIT { > > gss_nt_service_name_v2; > > gss_nt_string_uid_name; > > gss_nt_user_name; > > - gss_oid_equal; > > - gss_oid_to_str; > > - gss_pname_to_uid; > > - gss_pseudo_random; > > - gss_process_context_token; > > gss_release_any_name_mapping; > > - gss_release_buffer_set; > > - gss_release_buffer; > > - gss_release_cred; > > - gss_release_iov_buffer; > > - gss_release_name; > > - gss_release_oid; > > - gss_release_oid_set; > > - gss_seal; > > - gss_set_name_attribute; > > gss_set_neg_mechs; > > - gss_set_sec_context_option; > > - gss_sign; > > - gss_store_cred; > > gss_str_to_oid; > > - gss_test_oid_set_member; > > - gss_unseal; > > - gss_unwrap; > > gss_unwrap_aead; > > - gss_unwrap_iov; > > - gss_userok; > > - gss_verify; > > - gss_verify_mic; > > gss_verify_mic_iov; > > - gss_wrap; > > gss_wrap_aead; > > - gss_wrap_iov; > > - gss_wrap_iov_length; > > - gss_wrap_size_limit; > > - gss_set_cred_option; > > gssspi_set_cred_option; > > gssspi_mech_invoke; > > krb5_gss_dbg_client_expcreds; > > - krb5_gss_register_acceptor_identity; > > krb5_gss_use_kdc_context; > > - gss_inquire_name; > > gss_acquire_cred_from; > > gss_add_cred_from; > > gss_store_cred_into; > > This breaks the ABI of _current_ libc on HEAD even more. > Please do bump the dso versions for all libs from kerberos/gss > with same current name as it was in Heimdal time. In other words use Heimdal in the name instead of the names MIT uses? This was certainly short sighted on our part when we put Heimdal in our DSO names at the time. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Thu Jul 24 17:47:18 2025 X-Original-To: dev-commits-src-all@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 4bnz3X5LrCz630TS; Thu, 24 Jul 2025 17:47: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnz3V5PQcz40w4; Thu, 24 Jul 2025 17:47:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753379238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P0mOiozn7Qu9eiVcgh1Z3jwLJ5LxxXoFN8XdBFQWhTM=; b=MLJChgaIiwvTuT84hl+tJ4LPSYvgOO/ZtjaBDzzUes5KZtvKimYbAbYhhE+SlZJQJnRN3P OfFwNm7etGT1fWPRJgKqBEi2yTJTFF5SCG5fc63wD2gQ+unyc79f6c/9MmQIUa4Mxv+mqy UfbHPJJ2PDeLtG0EbLlpvl+lU9fcOi45lKdefLpkfFH6YNQc6QQ/M/G7gK5jy1OsWhtJQw jPFQ4iFvSKL3m153WdZa8eMzCfWCbyuuTZ/CQEZEkVs8nMczFqfIZPCKA2hpjOd2bESRMj KFHQHQeJR/2jsEc1J51A+MNPuiQBN5fjK7SNmRkU0rmYL6Uv3M7KDwLzfuHu0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753379238; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P0mOiozn7Qu9eiVcgh1Z3jwLJ5LxxXoFN8XdBFQWhTM=; b=d+S5s6IRA8mY661nrLcqi2QyTbNPVR4FUqMZo2jqscP+H9nTM83Q2q12/NWb2s8stjNIgZ MoE8NraFQMycVS0bTTnolH/4ykHWYMPk8RGEY2aa82PzcGG0z+Y3QwcF3g90z35Gx6aLzk 9bvJDq0/cs3Vqz0Hi5MWfGn16+DdTg/rlf9FkebU3KFaOuISRwMidYKjlYGh0m2hwnDb81 QT/aOnHXMepSCVJ7EeVFiyZpFF/0SKYbLLZxrcvw4AEIRxrog+nXFZRyrZLsNzRD0THAWh ULjqhpZF8jDbCqMUbSeRfpjGa4YWrYrXAFFr3ZduQW0gXq6ksYbr4hauwmwnzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753379238; a=rsa-sha256; cv=none; b=uKxyTXDeCXkIAjLfQj75rTvPlOMaqTwJ1KaFqA58293DF/EAuYB5VOEfh27mb6hXkymxYm 32t7MZxyAxrxm94AkrtW7OkqAwvCKajConZ71NVdkzjd32SQ354evQG0xtsJSEsiwKaqmw RraeH0ZQhdfq28P/hhYCuEgYNn3Mlp1MqLNffAo1wLeWQThAq80aMkJZZ9x9ekc3bsnf7I NwWJxaboLyP0EVyoxUc0z6qDTqKfZaB2481R+LuASp8wPVHUWoKOfTYperj1DGPdxnEWR+ NfDO2ttnuleA/6dT7QR3xVu/3uLzT8g7Ummq4N1FOv4jU83sDurGEnnp8nlatw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnz3V4vy0z17qq; Thu, 24 Jul 2025 17:47:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OHlIf0032324; Thu, 24 Jul 2025 17:47:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OHlIhB032321; Thu, 24 Jul 2025 17:47:18 GMT (envelope-from git) Date: Thu, 24 Jul 2025 17:47:18 GMT Message-Id: <202507241747.56OHlIhB032321@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 5f8493bbf479 - main - krb5: Use Heimdal DSO names List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f8493bbf479922ee027e2ee7dc733f29f66dd6d Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=5f8493bbf479922ee027e2ee7dc733f29f66dd6d commit 5f8493bbf479922ee027e2ee7dc733f29f66dd6d Author: Cy Schubert AuthorDate: 2025-07-24 17:43:03 +0000 Commit: Cy Schubert CommitDate: 2025-07-24 17:47:09 +0000 krb5: Use Heimdal DSO names Using MIT DSO names breaks the libc ABI, we are forced to use Heimdal DSO names. This is not optimal but necessary. Fixes: e447c252d0ec Requested by: kib --- krb5/lib/gssapi/version.map | 2 +- krb5/lib/krb5/version.map | 2 +- krb5/util/et/version.map | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/krb5/lib/gssapi/version.map b/krb5/lib/gssapi/version.map index d52c0d3d1e36..c7fc5c5813aa 100644 --- a/krb5/lib/gssapi/version.map +++ b/krb5/lib/gssapi/version.map @@ -85,7 +85,7 @@ HEIMDAL_GSS_2.0 { krb5_gss_register_acceptor_identity; }; -gssapi_krb5_2_MIT { +HEIMDAL_GSS_3.0 { global: GSS_C_ATTR_LOCAL_LOGIN_USER; GSS_C_INQ_SSPI_SESSION_KEY; diff --git a/krb5/lib/krb5/version.map b/krb5/lib/krb5/version.map index ce399a93e03e..16fab76fc0c2 100644 --- a/krb5/lib/krb5/version.map +++ b/krb5/lib/krb5/version.map @@ -215,7 +215,7 @@ HEIMDAL_KRB5_2.0 { krb5_write_message; }; -krb5_3_MIT { +HEIMDAL_KRB5_3.0 { global: _krb5_conf_boolean; decode_krb5_ad_kdcissued; diff --git a/krb5/util/et/version.map b/krb5/util/et/version.map index 3bd290009f22..f659576e828e 100644 --- a/krb5/util/et/version.map +++ b/krb5/util/et/version.map @@ -8,7 +8,7 @@ HEIMDAL_COM_ERR_1.0 { set_com_err_hook; }; -com_err_3_MIT { +HEIMDAL_COM_ERR_2.0 { global: add_error_table; error_table_name_r; From nobody Thu Jul 24 17:57:55 2025 X-Original-To: dev-commits-src-all@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 4bnzJ62Frxz630xm; Thu, 24 Jul 2025 17:58:14 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnzJ51CRrz47Cc; Thu, 24 Jul 2025 17:58:13 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 56OHvt9s036175; Thu, 24 Jul 2025 20:57:58 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 56OHvt9s036175 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 56OHvt5J036174; Thu, 24 Jul 2025 20:57:55 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 24 Jul 2025 20:57:55 +0300 From: Konstantin Belousov To: Cy Schubert Cc: Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e447c252d0ec - main - krb5: Merge Heimdal common functions into version maps Message-ID: References: <202507241714.56OHEFYg074661@gitrepo.freebsd.org> <20250724173412.8B8E34D6@slippy.cwsent.com> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250724173412.8B8E34D6@slippy.cwsent.com> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Rspamd-Queue-Id: 4bnzJ51CRrz47Cc 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:6939, ipnet:2001:470::/32, country:US] On Thu, Jul 24, 2025 at 10:34:12AM -0700, Cy Schubert wrote: > In message , Konstantin Belousov writes: > > On Thu, Jul 24, 2025 at 05:14:15PM +0000, Cy Schubert wrote: > > > The branch main has been updated by cy: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=e447c252d0eca8f1440996f2a3521c > > 75c06ae126 > > > > > > commit e447c252d0eca8f1440996f2a3521c75c06ae126 > > > Author: Cy Schubert > > > AuthorDate: 2025-07-24 16:24:03 +0000 > > > Commit: Cy Schubert > > > CommitDate: 2025-07-24 16:31:40 +0000 > > > > > > krb5: Merge Heimdal common functions into version maps > > > > > > Requested by: kib > > I do not remember that I ever asked to do this. > > More, I do not understand Kerberos to see such details. > > > > But see below. > > > > > --- > > > krb5/lib/gssapi/version.map | 171 +++++++++--------- > > > krb5/lib/krb5/version.map | 430 ++++++++++++++++++++++------------------ > > ---- > > > krb5/util/et/version.map | 12 +- > > > 3 files changed, 312 insertions(+), 301 deletions(-) > > > > > > diff --git a/krb5/lib/gssapi/version.map b/krb5/lib/gssapi/version.map > > > index bd0d28df70a7..d52c0d3d1e36 100644 > > > --- a/krb5/lib/gssapi/version.map > > > +++ b/krb5/lib/gssapi/version.map > > > @@ -1,3 +1,90 @@ > > > +HEIMDAL_GSS_2.0 { > > > + global: > > > + gss_accept_sec_context; > > > + gss_acquire_cred; > > > + gss_acquire_cred_with_password; > > > + gss_add_buffer_set_member; > > > + gss_add_cred; > > > + gss_add_cred_with_password; > > > + gss_add_oid_set_member; > > > + gss_authorize_localname; > > > + gss_canonicalize_name; > > > + gss_compare_name; > > > + gss_context_time; > > > + gss_create_empty_buffer_set; > > > + gss_create_empty_oid_set; > > > + gss_decapsulate_token; > > > + gss_delete_name_attribute; > > > + gss_delete_sec_context; > > > + gss_display_mech_attr; > > > + gss_display_name; > > > + gss_display_name_ext; > > > + gss_display_status; > > > + gss_duplicate_name; > > > + gss_encapsulate_token; > > > + gss_export_cred; > > > + gss_export_name; > > > + gss_export_name_composite; > > > + gss_export_sec_context; > > > + gss_get_mic; > > > + gss_get_name_attribute; > > > + gss_import_cred; > > > + gss_import_name; > > > + gss_import_sec_context; > > > + gss_indicate_mechs; > > > + gss_indicate_mechs_by_attrs; > > > + gss_init_sec_context; > > > + gss_inquire_attrs_for_mech; > > > + gss_inquire_context; > > > + gss_inquire_cred; > > > + gss_inquire_cred_by_mech; > > > + gss_inquire_cred_by_oid; > > > + gss_inquire_mech_for_saslname; > > > + gss_inquire_mechs_for_name; > > > + gss_inquire_name; > > > + gss_inquire_names_for_mech; > > > + gss_inquire_saslname_for_mech; > > > + gss_krb5_ccache_name; > > > + gss_krb5_copy_ccache; > > > + gss_krb5_export_lucid_sec_context; > > > + gss_krb5_free_lucid_sec_context; > > > + gss_krb5_get_tkt_flags; > > > + gss_krb5_import_cred; > > > + gss_krb5_set_allowable_enctypes; > > > + gss_oid_equal; > > > + gss_oid_to_str; > > > + gss_pname_to_uid; > > > + gss_process_context_token; > > > + gss_pseudo_random; > > > + gss_release_buffer; > > > + gss_release_buffer_set; > > > + gss_release_cred; > > > + gss_release_iov_buffer; > > > + gss_release_name; > > > + gss_release_oid; > > > + gss_release_oid_set; > > > + gss_seal; > > > + gss_set_cred_option; > > > + gss_set_name_attribute; > > > + gss_set_sec_context_option; > > > + gss_sign; > > > + gss_store_cred; > > > + gss_test_oid_set_member; > > > + gss_unseal; > > > + gss_unwrap; > > > + gss_unwrap_iov; > > > + gss_userok; > > > + gss_verify; > > > + gss_verify_mic; > > > + gss_wrap; > > > + gss_wrap_iov; > > > + gss_wrap_iov_length; > > > + gss_wrap_size_limit; > > > + gsskrb5_extract_authtime_from_sec_context; > > > + gsskrb5_extract_authz_data_from_sec_context; > > > + krb5_gss_register_acceptor_identity; > > > +}; > > > + > > > gssapi_krb5_2_MIT { > > > global: > > > GSS_C_ATTR_LOCAL_LOGIN_USER; > > > @@ -46,67 +133,14 @@ gssapi_krb5_2_MIT { > > > GSS_C_MA_CTX_TRANS; > > > GSS_C_MA_NEGOEX_AND_SPNEGO; > > > GSS_C_SEC_CONTEXT_SASL_SSF; > > > - gss_accept_sec_context; > > > - gss_acquire_cred; > > > - gss_acquire_cred_with_password; > > > gss_acquire_cred_impersonate_name; > > > - gss_add_buffer_set_member; > > > - gss_add_cred; > > > gss_add_cred_impersonate_name; > > > - gss_add_cred_with_password; > > > - gss_add_oid_set_member; > > > - gss_authorize_localname; > > > - gss_canonicalize_name; > > > - gss_compare_name; > > > gss_complete_auth_token; > > > - gss_context_time; > > > - gss_create_empty_buffer_set; > > > - gss_create_empty_oid_set; > > > - gss_decapsulate_token; > > > - gss_delete_name_attribute; > > > - gss_delete_sec_context; > > > - gss_display_mech_attr; > > > - gss_display_name; > > > - gss_display_name_ext; > > > - gss_display_status; > > > - gss_duplicate_name; > > > - gss_encapsulate_token; > > > - gss_export_cred; > > > - gss_export_name; > > > - gss_export_name_composite; > > > - gss_export_sec_context; > > > - gss_get_mic; > > > gss_get_mic_iov; > > > gss_get_mic_iov_length; > > > - gss_get_name_attribute; > > > - gss_import_cred; > > > - gss_import_name; > > > - gss_import_sec_context; > > > - gss_indicate_mechs; > > > - gss_init_sec_context; > > > - gss_indicate_mechs_by_attrs; > > > - gss_inquire_attrs_for_mech; > > > - gss_inquire_context; > > > - gss_inquire_cred; > > > - gss_inquire_cred_by_mech; > > > - gss_inquire_cred_by_oid; > > > - gss_inquire_mech_for_saslname; > > > - gss_inquire_mechs_for_name; > > > - gss_inquire_names_for_mech; > > > - gss_inquire_saslname_for_mech; > > > - gss_inquire_sec_context_by_oid; > > > - gss_krb5_ccache_name; > > > - gss_krb5_copy_ccache; > > > - gss_krb5_export_lucid_sec_context; > > > - gss_krb5_free_lucid_sec_context; > > > - gss_krb5_get_tkt_flags; > > > - gss_krb5_import_cred; > > > - gss_krb5_set_allowable_enctypes; > > > gss_krb5_set_cred_rcache; > > > gss_krb5int_make_seal_token_v3; > > > gss_krb5int_unseal_token_v3; > > > - gsskrb5_extract_authtime_from_sec_context; > > > - gsskrb5_extract_authz_data_from_sec_context; > > > gss_localname; > > > gss_map_name_to_any; > > > gss_mech_iakerb; > > > @@ -124,47 +158,16 @@ gssapi_krb5_2_MIT { > > > gss_nt_service_name_v2; > > > gss_nt_string_uid_name; > > > gss_nt_user_name; > > > - gss_oid_equal; > > > - gss_oid_to_str; > > > - gss_pname_to_uid; > > > - gss_pseudo_random; > > > - gss_process_context_token; > > > gss_release_any_name_mapping; > > > - gss_release_buffer_set; > > > - gss_release_buffer; > > > - gss_release_cred; > > > - gss_release_iov_buffer; > > > - gss_release_name; > > > - gss_release_oid; > > > - gss_release_oid_set; > > > - gss_seal; > > > - gss_set_name_attribute; > > > gss_set_neg_mechs; > > > - gss_set_sec_context_option; > > > - gss_sign; > > > - gss_store_cred; > > > gss_str_to_oid; > > > - gss_test_oid_set_member; > > > - gss_unseal; > > > - gss_unwrap; > > > gss_unwrap_aead; > > > - gss_unwrap_iov; > > > - gss_userok; > > > - gss_verify; > > > - gss_verify_mic; > > > gss_verify_mic_iov; > > > - gss_wrap; > > > gss_wrap_aead; > > > - gss_wrap_iov; > > > - gss_wrap_iov_length; > > > - gss_wrap_size_limit; > > > - gss_set_cred_option; > > > gssspi_set_cred_option; > > > gssspi_mech_invoke; > > > krb5_gss_dbg_client_expcreds; > > > - krb5_gss_register_acceptor_identity; > > > krb5_gss_use_kdc_context; > > > - gss_inquire_name; > > > gss_acquire_cred_from; > > > gss_add_cred_from; > > > gss_store_cred_into; > > > > This breaks the ABI of _current_ libc on HEAD even more. > > Please do bump the dso versions for all libs from kerberos/gss > > with same current name as it was in Heimdal time. > > In other words use Heimdal in the name instead of the names MIT uses? > > This was certainly short sighted on our part when we put Heimdal in our DSO > names at the time. No. Just for all libs that have the same name as old heimdal libs, bump dso version. Do not rewrite version scripts, if there are vendor-provided scripts, patching it locally now would be a maintainence nightmare. I suspect that there is something unclear in "bump the dso version" suggestion. From nobody Thu Jul 24 17:59:38 2025 X-Original-To: dev-commits-src-all@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 4bnzKz6638z631CR for ; Thu, 24 Jul 2025 17:59:51 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnzKz3wdLz486l for ; Thu, 24 Jul 2025 17:59:51 +0000 (UTC) (envelope-from jrtc27@jrtc27.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-3a507e88b0aso824208f8f.1 for ; Thu, 24 Jul 2025 10:59:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753379990; x=1753984790; h=to:references:message-id:content-transfer-encoding:cc:date :in-reply-to:from:subject:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=cImwXEhUDTcx8nr6aZKnSiM36EUiUXK/04HWZe5uoNo=; b=G7PhYBFDtD+IYLdhLtagW+vB8pVOVqd68nHJ0PgawYWYvbJ4Fzs0ekBNGnEOHil+sZ XiIT7bj7ZtUazelFqzWlmG7AWGTz/Wp69sU9xjWa4ROIvkt4fcSrg4Rg6p/GqhTn0KJd cXVRowB/+8CLRGhFBpXb+wc4X1qp6V3YtE3rO/wT527lmF6De7g+O/MzqTj7VNpjYjml s55+rjxBuvba0oKZ9GUsp6fna69CfTmZRmCtlJIEs8mC3afQYDfg8kl4VGhyq+DjCQJ1 P4ZoStsvXJbpdAwOdcpFORhAXswpJK3UUwT1thTLvmFUGczoznMTYukVjvIPse9RX/xz j2Hw== X-Forwarded-Encrypted: i=1; AJvYcCVA8khtvY8fuzQYQxBteddezSYkH+oNM0irqqMMaAofS9CH9BDy8AalykbTimIYNCY/5AdubiFNu9qMSYDp6y1yPt2R@freebsd.org X-Gm-Message-State: AOJu0YxcxGf5DB4OfwzMV+Kiu+o/FXlTIzBSMPzNb00U0/oaiQQM20ku ZS6Dh8y+QfcAApoqLa8ts2qXvWdjn5n1hFYv/ukhnzqFMyTzVWtPjRUwcJFl4U5CtPOM2wl9GAy ghdux X-Gm-Gg: ASbGncuVIwZItbwCdP+VXNgAiuh96FgO56TzBoR8iSAqhKgd2WchyuCz0bvlysMyyyH 3QAgIDBqYaWzxQpsUqZKMHk+DFTdxGIXU0N8ylv4ohlK2Yo4oP/EbtuLScxwCOlQXPgiZIE9yXF q9cOM5nz+l8vlm5nc0/dxp9SpMVUB6LZt0sMgeTKpuJIYWUSWjidVGqGt87OSG+O2HCiHQ4yQfb dT+JAopbYbdMGP4SkSM+QIkaD9kUCrizNmWRVH79Cj9KnlVZQlTPzTjagdJzLV0sglqteLHgP+d UlpgNpEWwldQ0CQoYSj40krBGj9JuTYp54eJhhIp49RU8W9UiAMZ2uUKqkoGlwNIJ7vDNwTunAY zhHSzOehQcw4mGtJj2oz4k35LHQ0y84MZAoOk98PNoQyic1/rSjvI5/s9+1CH39L+bgB2 X-Google-Smtp-Source: AGHT+IGPK6tdNkvD77PVADUjtiXBxKTryRVDkHEOtExb97VJ4fZZa1fB6tbo7myKmRzbZyiRX2Eh9w== X-Received: by 2002:a05:6000:2dca:b0:3b5:f7a3:3960 with SMTP id ffacd0b85a97d-3b768ef9510mr6693190f8f.33.1753379989682; Thu, 24 Jul 2025 10:59:49 -0700 (PDT) Received: from smtpclient.apple (global-184-7.n-1.net.cam.ac.uk. [131.111.184.7]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-45870553d72sm27502225e9.16.2025.07.24.10.59.48 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 24 Jul 2025 10:59:49 -0700 (PDT) Content-Type: text/plain; charset=utf-8 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.600.51.1.1\)) Subject: Re: git: 5f8493bbf479 - main - krb5: Use Heimdal DSO names From: Jessica Clarke In-Reply-To: <202507241747.56OHlIhB032321@gitrepo.freebsd.org> Date: Thu, 24 Jul 2025 18:59:38 +0100 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <4E045416-D94A-46D7-B43D-AC3078CF93AF@freebsd.org> References: <202507241747.56OHlIhB032321@gitrepo.freebsd.org> To: Cy Schubert X-Mailer: Apple Mail (2.3826.600.51.1.1) X-Rspamd-Queue-Id: 4bnzKz3wdLz486l 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:15169, ipnet:209.85.128.0/17, country:US] On 24 Jul 2025, at 18:47, Cy Schubert wrote: >=20 > The branch main has been updated by cy: >=20 > URL: = https://cgit.FreeBSD.org/src/commit/?id=3D5f8493bbf479922ee027e2ee7dc733f2= 9f66dd6d >=20 > commit 5f8493bbf479922ee027e2ee7dc733f29f66dd6d > Author: Cy Schubert > AuthorDate: 2025-07-24 17:43:03 +0000 > Commit: Cy Schubert > CommitDate: 2025-07-24 17:47:09 +0000 >=20 > krb5: Use Heimdal DSO names >=20 > Using MIT DSO names breaks the libc ABI, we are forced to use = Heimdal > DSO names. This is not optimal but necessary. >=20 > Fixes: e447c252d0ec > Requested by: kib I fear you=E2=80=99ve misinterpreted kib=E2=80=99s request; at least, = this is the opposite of how I read it. The request in question was: > This breaks the ABI of _current_ libc on HEAD even more. > Please do bump the dso versions for all libs from kerberos/gss > with same current name as it was in Heimdal time. I take that to mean =E2=80=9Cfor every kerberos library whose SONAME is currently the same between MIT KRB5 and Heimdal, please bump the SONAME, because they are not ABI-compatible=E2=80=9D. What this commit does is instead silence presumed ABI incompatibility, where previously it gave an error at run time. As a more general point, this transition is becoming quite messy, with lots of churn to handle post-commit feedback. I strongly encourage pre-commit review for these changes so we can minimise instances of = =E2=80=9Cdo A, no do B, no do C=E2=80=9D. Jessica > --- > krb5/lib/gssapi/version.map | 2 +- > krb5/lib/krb5/version.map | 2 +- > krb5/util/et/version.map | 2 +- > 3 files changed, 3 insertions(+), 3 deletions(-) >=20 > diff --git a/krb5/lib/gssapi/version.map b/krb5/lib/gssapi/version.map > index d52c0d3d1e36..c7fc5c5813aa 100644 > --- a/krb5/lib/gssapi/version.map > +++ b/krb5/lib/gssapi/version.map > @@ -85,7 +85,7 @@ HEIMDAL_GSS_2.0 { > krb5_gss_register_acceptor_identity; > }; >=20 > -gssapi_krb5_2_MIT { > +HEIMDAL_GSS_3.0 { > global: > GSS_C_ATTR_LOCAL_LOGIN_USER; > GSS_C_INQ_SSPI_SESSION_KEY; > diff --git a/krb5/lib/krb5/version.map b/krb5/lib/krb5/version.map > index ce399a93e03e..16fab76fc0c2 100644 > --- a/krb5/lib/krb5/version.map > +++ b/krb5/lib/krb5/version.map > @@ -215,7 +215,7 @@ HEIMDAL_KRB5_2.0 { > krb5_write_message; > }; >=20 > -krb5_3_MIT { > +HEIMDAL_KRB5_3.0 { > global: > _krb5_conf_boolean; > decode_krb5_ad_kdcissued; > diff --git a/krb5/util/et/version.map b/krb5/util/et/version.map > index 3bd290009f22..f659576e828e 100644 > --- a/krb5/util/et/version.map > +++ b/krb5/util/et/version.map > @@ -8,7 +8,7 @@ HEIMDAL_COM_ERR_1.0 { > set_com_err_hook; > }; >=20 > -com_err_3_MIT { > +HEIMDAL_COM_ERR_2.0 { > global: > add_error_table; > error_table_name_r; From nobody Thu Jul 24 18:24:08 2025 X-Original-To: dev-commits-src-all@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 4bnzt03TS5z632LG; Thu, 24 Jul 2025 18:24:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bnzt02M44z4Mxc; Thu, 24 Jul 2025 18:24:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753381448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qF8TpOWQ4yoaUOUz5wnC+ybT8ruqTj+plXJ6O9RylgA=; b=HAx4KhS5JhL7LKBz6tEzzZCziMzShmNyMXYVF7XiMbzP92IkOlHI6ADf8E29ezt0P8ATR1 UaJGNoJfDF5oKiXpVww1cwx//Oe6Vvjk42yJbHUjVHr8TDEvj9DxgfTXiuKev6gTHiTG21 gOmK9EyT2VqEYGYo9bmPvy46EdSK6ZEPBJkxH91YwcHTRIGBxkko+CiAJCTffT1BlEZmaj mvzVojZuXHB7+DWVepTILRPXUaSOHCV1yCeUVKwjhNIfJBjXUJms9+96TIkxNW4zqn6r3l WszvWdts/6hagwLQKpWTIhHlxmdWAgbPIEAtSdseK/RJnJSNcjpr6iw9IDmOlA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753381448; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qF8TpOWQ4yoaUOUz5wnC+ybT8ruqTj+plXJ6O9RylgA=; b=ZIa3QiII99fNGKlYdMeJ9M/UVwJwXkwc+0YoeBf9bMowz2VhyZo3iUNSymQuNBB8XCO8Jb ruC61iKp5jbshO9/pjCHaxwJX2ul4YxB4864cj1LedfP/3GmjTMVlIZrsHhFlY47YQgNDY rJYHaXNidugU0YZWBN9rD1EFADDLTmfsDPHujTRpKK2ooWhzfsQVNYiYenyZfjRYHU+61C 6fc2RWsNqe4I6giQkC5R4RBhKmjD6i4o4sGipRDENOZnQ9eXgeHjtZyvxtvZaoOwr8+Enx Ed9UNqlNSISmehUy34Cu2Xyiy9YcejJ8QjTC+yyaTrLF0HDPsMdU/kOF46oX+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753381448; a=rsa-sha256; cv=none; b=wlQNrHsrqhKW3Kr9cbOgIMk5v40OSh1fvuX/Hn+Dyh+Tey8Kd0r9dRutvQKGlRn4la5bYP 6BZI4s8K5rYO+OKyq5wEpD5qq40IaXDKJiZn9Z201/6quzYtjYh5UoKLoQECQXwz6oJIBi XiJ7i/Wb8xaUmMThVFi7qn/lAJ6q6nfF1KCmMdGYgzqa8fPn56iYIXfVQUsPzlufodisPl 3/kRcD8eHgicT6PTlXr+ePsUfpo5E092/W2ylhQOEpwMKNu/hAj7zsv22N+LqxoDFFAZzm 7+n89XNCA1uUsGhbJ26ykTVMSiDIwPyKnv18c7Lb8fr/rVIMs/qJTcQ1Tjx4Uw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bnzt01yfDz18f5; Thu, 24 Jul 2025 18:24:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OIO8ck005891; Thu, 24 Jul 2025 18:24:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OIO88s005888; Thu, 24 Jul 2025 18:24:08 GMT (envelope-from git) Date: Thu, 24 Jul 2025 18:24:08 GMT Message-Id: <202507241824.56OIO88s005888@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 962876cc24ee - main - UPDATING: Note the Kerberos package rename (c7da9fb90b0b) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 962876cc24ee9fe1f0ee508f420f11fdeac02ee3 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=962876cc24ee9fe1f0ee508f420f11fdeac02ee3 commit 962876cc24ee9fe1f0ee508f420f11fdeac02ee3 Author: Lexi Winter AuthorDate: 2025-07-24 18:24:33 +0000 Commit: Lexi Winter CommitDate: 2025-07-24 18:25:05 +0000 UPDATING: Note the Kerberos package rename (c7da9fb90b0b) --- UPDATING | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/UPDATING b/UPDATING index 3fd8a0fd0c0b..2be01f2c98c3 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,17 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20250724: + The Kerberos packages which are built when WITH_MITKRB5 is enabled + have been renamed from FreeBSD-krb5* to FreeBSD-kerberos*. This + affects pkgbase users who manually enabled WITH_MITKRB5, *or* use + the default value of WITH_MITKRB5 and updated past c7da9fb90b0b + (20250721) which made WITH_MITKRB5 the default. + + In either case, if you have FreeBSD-krb5* packages installed, you + should remove them and (re)install the equivalent FreeBSD-kerberos* + packages instead. + 20250721: WITH_MITKRB5 is now enabled by default. MIT KRB5 has replaced Heimdal in base. Ports that use USES=gssapi must be rebuilt. From nobody Thu Jul 24 18:29:23 2025 X-Original-To: dev-commits-src-all@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 4bp00K2s1Dz632rB; Thu, 24 Jul 2025 18:29:37 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp00J6DfXz3CMn; Thu, 24 Jul 2025 18:29:36 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 56OITNCa037318; Thu, 24 Jul 2025 21:29:26 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 56OITNCa037318 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 56OITNQQ037317; Thu, 24 Jul 2025 21:29:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 24 Jul 2025 21:29:23 +0300 From: Konstantin Belousov To: Cy Schubert Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 5f8493bbf479 - main - krb5: Use Heimdal DSO names Message-ID: References: <202507241747.56OHlIhB032321@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202507241747.56OHlIhB032321@gitrepo.freebsd.org> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Rspamd-Queue-Id: 4bp00J6DfXz3CMn 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:6939, ipnet:2001:470::/32, country:US] On Thu, Jul 24, 2025 at 05:47:18PM +0000, Cy Schubert wrote: > The branch main has been updated by cy: > > URL: https://cgit.FreeBSD.org/src/commit/?id=5f8493bbf479922ee027e2ee7dc733f29f66dd6d > > commit 5f8493bbf479922ee027e2ee7dc733f29f66dd6d > Author: Cy Schubert > AuthorDate: 2025-07-24 17:43:03 +0000 > Commit: Cy Schubert > CommitDate: 2025-07-24 17:47:09 +0000 > > krb5: Use Heimdal DSO names > > Using MIT DSO names breaks the libc ABI, we are forced to use Heimdal > DSO names. This is not optimal but necessary. > > Fixes: e447c252d0ec It does not, it breaks even more. > Requested by: kib This is not even close to what I asked for. Please use review system. From nobody Thu Jul 24 18:40:10 2025 X-Original-To: dev-commits-src-all@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 4bp0DZ3FqMz633DR; Thu, 24 Jul 2025 18:40:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp0DY5xpsz3HYN; Thu, 24 Jul 2025 18:40:13 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4003a.ext.cloudfilter.net ([10.228.9.183]) by cmsmtp with ESMTPS id egdQuvKV45Mqyf0rUuy2G7; Thu, 24 Jul 2025 18:40:12 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id f0rTu3KRBWbOaf0rUuSCzL; Thu, 24 Jul 2025 18:40:12 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=Q5lx4J2a c=1 sm=1 tr=0 ts=68827e0c a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=Wb1JkmetP80A:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=14_Kx3inMGZtXw7XIGMA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id CBCFEF7C; Thu, 24 Jul 2025 11:40:10 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id C57FA4DA; Thu, 24 Jul 2025 11:40:10 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Konstantin Belousov cc: Cy Schubert , Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e447c252d0ec - main - krb5: Merge Heimdal common functions into version maps In-reply-to: References: <202507241714.56OHEFYg074661@gitrepo.freebsd.org> <20250724173412.8B8E34D6@slippy.cwsent.com> Comments: In-reply-to Konstantin Belousov message dated "Thu, 24 Jul 2025 20:57:55 +0300." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 24 Jul 2025 11:40:10 -0700 Message-Id: <20250724184010.C57FA4DA@slippy.cwsent.com> X-CMAE-Envelope: MS4xfDFqXqBnMqd7dBR7B4VeRzp/YqvqtPJZbXOj+FzuEE3xSgBSrAC3bE2NQH+M+OQnqsFp1AyigFUPPpWf9zHxpLh3KxwmVvfJIb/eAMHZloucoAR7shYb 3ynAGIX6Nbexs6B/qxgTeNx40qZnKn6C8wGti0SecJkMCokMi0jcWI2XcHhrGwxLyRVW/gJs8gar4IeRXe58mVFfKhdipaPdzS0lYf306tqDnfq096b64Kw5 TOk4QNOcPXLLdvftwBj4bXDB/HvwJKaQVWvMkugYzh+Ooms9URbI03zTa4KPfGzj0LWpSDPnd7TFwviELJVAU7oqJdpgq+Z49xFJai7DowAIyNZC3se5HmGB bZjPRVjy X-Rspamd-Queue-Id: 4bp0DY5xpsz3HYN 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:16509, ipnet:3.96.0.0/15, country:US] In message , Konstantin Belousov writes: > On Thu, Jul 24, 2025 at 10:34:12AM -0700, Cy Schubert wrote: > > In message , Konstantin Belousov writes: > > > On Thu, Jul 24, 2025 at 05:14:15PM +0000, Cy Schubert wrote: > > > > The branch main has been updated by cy: > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=e447c252d0eca8f1440996f2a3 > 521c > > > 75c06ae126 > > > > > > > > commit e447c252d0eca8f1440996f2a3521c75c06ae126 > > > > Author: Cy Schubert > > > > AuthorDate: 2025-07-24 16:24:03 +0000 > > > > Commit: Cy Schubert > > > > CommitDate: 2025-07-24 16:31:40 +0000 > > > > > > > > krb5: Merge Heimdal common functions into version maps > > > > > > > > Requested by: kib > > > I do not remember that I ever asked to do this. > > > More, I do not understand Kerberos to see such details. > > > > > > But see below. > > > > > > > --- > > > > krb5/lib/gssapi/version.map | 171 +++++++++--------- > > > > krb5/lib/krb5/version.map | 430 ++++++++++++++++++++++-------------- > ---- > > > ---- > > > > krb5/util/et/version.map | 12 +- > > > > 3 files changed, 312 insertions(+), 301 deletions(-) > > > > > > > > diff --git a/krb5/lib/gssapi/version.map b/krb5/lib/gssapi/version.map > > > > index bd0d28df70a7..d52c0d3d1e36 100644 > > > > --- a/krb5/lib/gssapi/version.map > > > > +++ b/krb5/lib/gssapi/version.map > > > > @@ -1,3 +1,90 @@ > > > > +HEIMDAL_GSS_2.0 { > > > > + global: > > > > + gss_accept_sec_context; > > > > + gss_acquire_cred; > > > > + gss_acquire_cred_with_password; > > > > + gss_add_buffer_set_member; > > > > + gss_add_cred; > > > > + gss_add_cred_with_password; > > > > + gss_add_oid_set_member; > > > > + gss_authorize_localname; > > > > + gss_canonicalize_name; > > > > + gss_compare_name; > > > > + gss_context_time; > > > > + gss_create_empty_buffer_set; > > > > + gss_create_empty_oid_set; > > > > + gss_decapsulate_token; > > > > + gss_delete_name_attribute; > > > > + gss_delete_sec_context; > > > > + gss_display_mech_attr; > > > > + gss_display_name; > > > > + gss_display_name_ext; > > > > + gss_display_status; > > > > + gss_duplicate_name; > > > > + gss_encapsulate_token; > > > > + gss_export_cred; > > > > + gss_export_name; > > > > + gss_export_name_composite; > > > > + gss_export_sec_context; > > > > + gss_get_mic; > > > > + gss_get_name_attribute; > > > > + gss_import_cred; > > > > + gss_import_name; > > > > + gss_import_sec_context; > > > > + gss_indicate_mechs; > > > > + gss_indicate_mechs_by_attrs; > > > > + gss_init_sec_context; > > > > + gss_inquire_attrs_for_mech; > > > > + gss_inquire_context; > > > > + gss_inquire_cred; > > > > + gss_inquire_cred_by_mech; > > > > + gss_inquire_cred_by_oid; > > > > + gss_inquire_mech_for_saslname; > > > > + gss_inquire_mechs_for_name; > > > > + gss_inquire_name; > > > > + gss_inquire_names_for_mech; > > > > + gss_inquire_saslname_for_mech; > > > > + gss_krb5_ccache_name; > > > > + gss_krb5_copy_ccache; > > > > + gss_krb5_export_lucid_sec_context; > > > > + gss_krb5_free_lucid_sec_context; > > > > + gss_krb5_get_tkt_flags; > > > > + gss_krb5_import_cred; > > > > + gss_krb5_set_allowable_enctypes; > > > > + gss_oid_equal; > > > > + gss_oid_to_str; > > > > + gss_pname_to_uid; > > > > + gss_process_context_token; > > > > + gss_pseudo_random; > > > > + gss_release_buffer; > > > > + gss_release_buffer_set; > > > > + gss_release_cred; > > > > + gss_release_iov_buffer; > > > > + gss_release_name; > > > > + gss_release_oid; > > > > + gss_release_oid_set; > > > > + gss_seal; > > > > + gss_set_cred_option; > > > > + gss_set_name_attribute; > > > > + gss_set_sec_context_option; > > > > + gss_sign; > > > > + gss_store_cred; > > > > + gss_test_oid_set_member; > > > > + gss_unseal; > > > > + gss_unwrap; > > > > + gss_unwrap_iov; > > > > + gss_userok; > > > > + gss_verify; > > > > + gss_verify_mic; > > > > + gss_wrap; > > > > + gss_wrap_iov; > > > > + gss_wrap_iov_length; > > > > + gss_wrap_size_limit; > > > > + gsskrb5_extract_authtime_from_sec_context; > > > > + gsskrb5_extract_authz_data_from_sec_context; > > > > + krb5_gss_register_acceptor_identity; > > > > +}; > > > > + > > > > gssapi_krb5_2_MIT { > > > > global: > > > > GSS_C_ATTR_LOCAL_LOGIN_USER; > > > > @@ -46,67 +133,14 @@ gssapi_krb5_2_MIT { > > > > GSS_C_MA_CTX_TRANS; > > > > GSS_C_MA_NEGOEX_AND_SPNEGO; > > > > GSS_C_SEC_CONTEXT_SASL_SSF; > > > > - gss_accept_sec_context; > > > > - gss_acquire_cred; > > > > - gss_acquire_cred_with_password; > > > > gss_acquire_cred_impersonate_name; > > > > - gss_add_buffer_set_member; > > > > - gss_add_cred; > > > > gss_add_cred_impersonate_name; > > > > - gss_add_cred_with_password; > > > > - gss_add_oid_set_member; > > > > - gss_authorize_localname; > > > > - gss_canonicalize_name; > > > > - gss_compare_name; > > > > gss_complete_auth_token; > > > > - gss_context_time; > > > > - gss_create_empty_buffer_set; > > > > - gss_create_empty_oid_set; > > > > - gss_decapsulate_token; > > > > - gss_delete_name_attribute; > > > > - gss_delete_sec_context; > > > > - gss_display_mech_attr; > > > > - gss_display_name; > > > > - gss_display_name_ext; > > > > - gss_display_status; > > > > - gss_duplicate_name; > > > > - gss_encapsulate_token; > > > > - gss_export_cred; > > > > - gss_export_name; > > > > - gss_export_name_composite; > > > > - gss_export_sec_context; > > > > - gss_get_mic; > > > > gss_get_mic_iov; > > > > gss_get_mic_iov_length; > > > > - gss_get_name_attribute; > > > > - gss_import_cred; > > > > - gss_import_name; > > > > - gss_import_sec_context; > > > > - gss_indicate_mechs; > > > > - gss_init_sec_context; > > > > - gss_indicate_mechs_by_attrs; > > > > - gss_inquire_attrs_for_mech; > > > > - gss_inquire_context; > > > > - gss_inquire_cred; > > > > - gss_inquire_cred_by_mech; > > > > - gss_inquire_cred_by_oid; > > > > - gss_inquire_mech_for_saslname; > > > > - gss_inquire_mechs_for_name; > > > > - gss_inquire_names_for_mech; > > > > - gss_inquire_saslname_for_mech; > > > > - gss_inquire_sec_context_by_oid; > > > > - gss_krb5_ccache_name; > > > > - gss_krb5_copy_ccache; > > > > - gss_krb5_export_lucid_sec_context; > > > > - gss_krb5_free_lucid_sec_context; > > > > - gss_krb5_get_tkt_flags; > > > > - gss_krb5_import_cred; > > > > - gss_krb5_set_allowable_enctypes; > > > > gss_krb5_set_cred_rcache; > > > > gss_krb5int_make_seal_token_v3; > > > > gss_krb5int_unseal_token_v3; > > > > - gsskrb5_extract_authtime_from_sec_context; > > > > - gsskrb5_extract_authz_data_from_sec_context; > > > > gss_localname; > > > > gss_map_name_to_any; > > > > gss_mech_iakerb; > > > > @@ -124,47 +158,16 @@ gssapi_krb5_2_MIT { > > > > gss_nt_service_name_v2; > > > > gss_nt_string_uid_name; > > > > gss_nt_user_name; > > > > - gss_oid_equal; > > > > - gss_oid_to_str; > > > > - gss_pname_to_uid; > > > > - gss_pseudo_random; > > > > - gss_process_context_token; > > > > gss_release_any_name_mapping; > > > > - gss_release_buffer_set; > > > > - gss_release_buffer; > > > > - gss_release_cred; > > > > - gss_release_iov_buffer; > > > > - gss_release_name; > > > > - gss_release_oid; > > > > - gss_release_oid_set; > > > > - gss_seal; > > > > - gss_set_name_attribute; > > > > gss_set_neg_mechs; > > > > - gss_set_sec_context_option; > > > > - gss_sign; > > > > - gss_store_cred; > > > > gss_str_to_oid; > > > > - gss_test_oid_set_member; > > > > - gss_unseal; > > > > - gss_unwrap; > > > > gss_unwrap_aead; > > > > - gss_unwrap_iov; > > > > - gss_userok; > > > > - gss_verify; > > > > - gss_verify_mic; > > > > gss_verify_mic_iov; > > > > - gss_wrap; > > > > gss_wrap_aead; > > > > - gss_wrap_iov; > > > > - gss_wrap_iov_length; > > > > - gss_wrap_size_limit; > > > > - gss_set_cred_option; > > > > gssspi_set_cred_option; > > > > gssspi_mech_invoke; > > > > krb5_gss_dbg_client_expcreds; > > > > - krb5_gss_register_acceptor_identity; > > > > krb5_gss_use_kdc_context; > > > > - gss_inquire_name; > > > > gss_acquire_cred_from; > > > > gss_add_cred_from; > > > > gss_store_cred_into; > > > > > > This breaks the ABI of _current_ libc on HEAD even more. > > > Please do bump the dso versions for all libs from kerberos/gss > > > with same current name as it was in Heimdal time. > > > > In other words use Heimdal in the name instead of the names MIT uses? > > > > This was certainly short sighted on our part when we put Heimdal in our DSO > > > names at the time. > No. > > Just for all libs that have the same name as old heimdal libs, bump > dso version. Do not rewrite version scripts, if there are vendor-provided > scripts, patching it locally now would be a maintainence nightmare. > > I suspect that there is something unclear in "bump the dso version" > suggestion. Those were bumped from .11 to .121 (for MIT KRB5 1.21). This should have been evident from the start. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Thu Jul 24 18:58:19 2025 X-Original-To: dev-commits-src-all@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 4bp0dp683wz633rj; Thu, 24 Jul 2025 18:58:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp0dp3mrwz3SX9; Thu, 24 Jul 2025 18:58:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 56OIwKgP038240; Thu, 24 Jul 2025 21:58:23 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 56OIwKgP038240 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 56OIwJ10038239; Thu, 24 Jul 2025 21:58:19 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Thu, 24 Jul 2025 21:58:19 +0300 From: Konstantin Belousov To: Cy Schubert Cc: Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e447c252d0ec - main - krb5: Merge Heimdal common functions into version maps Message-ID: References: <202507241714.56OHEFYg074661@gitrepo.freebsd.org> <20250724173412.8B8E34D6@slippy.cwsent.com> <20250724184010.C57FA4DA@slippy.cwsent.com> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250724184010.C57FA4DA@slippy.cwsent.com> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Rspamd-Queue-Id: 4bp0dp3mrwz3SX9 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:6939, ipnet:2001:470::/32, country:US] On Thu, Jul 24, 2025 at 11:40:10AM -0700, Cy Schubert wrote: > In message , Konstantin Belousov writes: > > On Thu, Jul 24, 2025 at 10:34:12AM -0700, Cy Schubert wrote: > > > In message , Konstantin Belousov writes: > > > > On Thu, Jul 24, 2025 at 05:14:15PM +0000, Cy Schubert wrote: > > > > > The branch main has been updated by cy: > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=e447c252d0eca8f1440996f2a3 > > 521c > > > > 75c06ae126 > > > > > > > > > > commit e447c252d0eca8f1440996f2a3521c75c06ae126 > > > > > Author: Cy Schubert > > > > > AuthorDate: 2025-07-24 16:24:03 +0000 > > > > > Commit: Cy Schubert > > > > > CommitDate: 2025-07-24 16:31:40 +0000 > > > > > > > > > > krb5: Merge Heimdal common functions into version maps > > > > > > > > > > Requested by: kib > > > > I do not remember that I ever asked to do this. > > > > More, I do not understand Kerberos to see such details. > > > > > > > > But see below. > > > > > > > > > --- > > > > > krb5/lib/gssapi/version.map | 171 +++++++++--------- > > > > > krb5/lib/krb5/version.map | 430 ++++++++++++++++++++++-------------- > > ---- > > > > ---- > > > > > krb5/util/et/version.map | 12 +- > > > > > 3 files changed, 312 insertions(+), 301 deletions(-) > > > > > > > > > > diff --git a/krb5/lib/gssapi/version.map b/krb5/lib/gssapi/version.map > > > > > index bd0d28df70a7..d52c0d3d1e36 100644 > > > > > --- a/krb5/lib/gssapi/version.map > > > > > +++ b/krb5/lib/gssapi/version.map > > > > > @@ -1,3 +1,90 @@ > > > > > +HEIMDAL_GSS_2.0 { > > > > > + global: > > > > > + gss_accept_sec_context; > > > > > + gss_acquire_cred; > > > > > + gss_acquire_cred_with_password; > > > > > + gss_add_buffer_set_member; > > > > > + gss_add_cred; > > > > > + gss_add_cred_with_password; > > > > > + gss_add_oid_set_member; > > > > > + gss_authorize_localname; > > > > > + gss_canonicalize_name; > > > > > + gss_compare_name; > > > > > + gss_context_time; > > > > > + gss_create_empty_buffer_set; > > > > > + gss_create_empty_oid_set; > > > > > + gss_decapsulate_token; > > > > > + gss_delete_name_attribute; > > > > > + gss_delete_sec_context; > > > > > + gss_display_mech_attr; > > > > > + gss_display_name; > > > > > + gss_display_name_ext; > > > > > + gss_display_status; > > > > > + gss_duplicate_name; > > > > > + gss_encapsulate_token; > > > > > + gss_export_cred; > > > > > + gss_export_name; > > > > > + gss_export_name_composite; > > > > > + gss_export_sec_context; > > > > > + gss_get_mic; > > > > > + gss_get_name_attribute; > > > > > + gss_import_cred; > > > > > + gss_import_name; > > > > > + gss_import_sec_context; > > > > > + gss_indicate_mechs; > > > > > + gss_indicate_mechs_by_attrs; > > > > > + gss_init_sec_context; > > > > > + gss_inquire_attrs_for_mech; > > > > > + gss_inquire_context; > > > > > + gss_inquire_cred; > > > > > + gss_inquire_cred_by_mech; > > > > > + gss_inquire_cred_by_oid; > > > > > + gss_inquire_mech_for_saslname; > > > > > + gss_inquire_mechs_for_name; > > > > > + gss_inquire_name; > > > > > + gss_inquire_names_for_mech; > > > > > + gss_inquire_saslname_for_mech; > > > > > + gss_krb5_ccache_name; > > > > > + gss_krb5_copy_ccache; > > > > > + gss_krb5_export_lucid_sec_context; > > > > > + gss_krb5_free_lucid_sec_context; > > > > > + gss_krb5_get_tkt_flags; > > > > > + gss_krb5_import_cred; > > > > > + gss_krb5_set_allowable_enctypes; > > > > > + gss_oid_equal; > > > > > + gss_oid_to_str; > > > > > + gss_pname_to_uid; > > > > > + gss_process_context_token; > > > > > + gss_pseudo_random; > > > > > + gss_release_buffer; > > > > > + gss_release_buffer_set; > > > > > + gss_release_cred; > > > > > + gss_release_iov_buffer; > > > > > + gss_release_name; > > > > > + gss_release_oid; > > > > > + gss_release_oid_set; > > > > > + gss_seal; > > > > > + gss_set_cred_option; > > > > > + gss_set_name_attribute; > > > > > + gss_set_sec_context_option; > > > > > + gss_sign; > > > > > + gss_store_cred; > > > > > + gss_test_oid_set_member; > > > > > + gss_unseal; > > > > > + gss_unwrap; > > > > > + gss_unwrap_iov; > > > > > + gss_userok; > > > > > + gss_verify; > > > > > + gss_verify_mic; > > > > > + gss_wrap; > > > > > + gss_wrap_iov; > > > > > + gss_wrap_iov_length; > > > > > + gss_wrap_size_limit; > > > > > + gsskrb5_extract_authtime_from_sec_context; > > > > > + gsskrb5_extract_authz_data_from_sec_context; > > > > > + krb5_gss_register_acceptor_identity; > > > > > +}; > > > > > + > > > > > gssapi_krb5_2_MIT { > > > > > global: > > > > > GSS_C_ATTR_LOCAL_LOGIN_USER; > > > > > @@ -46,67 +133,14 @@ gssapi_krb5_2_MIT { > > > > > GSS_C_MA_CTX_TRANS; > > > > > GSS_C_MA_NEGOEX_AND_SPNEGO; > > > > > GSS_C_SEC_CONTEXT_SASL_SSF; > > > > > - gss_accept_sec_context; > > > > > - gss_acquire_cred; > > > > > - gss_acquire_cred_with_password; > > > > > gss_acquire_cred_impersonate_name; > > > > > - gss_add_buffer_set_member; > > > > > - gss_add_cred; > > > > > gss_add_cred_impersonate_name; > > > > > - gss_add_cred_with_password; > > > > > - gss_add_oid_set_member; > > > > > - gss_authorize_localname; > > > > > - gss_canonicalize_name; > > > > > - gss_compare_name; > > > > > gss_complete_auth_token; > > > > > - gss_context_time; > > > > > - gss_create_empty_buffer_set; > > > > > - gss_create_empty_oid_set; > > > > > - gss_decapsulate_token; > > > > > - gss_delete_name_attribute; > > > > > - gss_delete_sec_context; > > > > > - gss_display_mech_attr; > > > > > - gss_display_name; > > > > > - gss_display_name_ext; > > > > > - gss_display_status; > > > > > - gss_duplicate_name; > > > > > - gss_encapsulate_token; > > > > > - gss_export_cred; > > > > > - gss_export_name; > > > > > - gss_export_name_composite; > > > > > - gss_export_sec_context; > > > > > - gss_get_mic; > > > > > gss_get_mic_iov; > > > > > gss_get_mic_iov_length; > > > > > - gss_get_name_attribute; > > > > > - gss_import_cred; > > > > > - gss_import_name; > > > > > - gss_import_sec_context; > > > > > - gss_indicate_mechs; > > > > > - gss_init_sec_context; > > > > > - gss_indicate_mechs_by_attrs; > > > > > - gss_inquire_attrs_for_mech; > > > > > - gss_inquire_context; > > > > > - gss_inquire_cred; > > > > > - gss_inquire_cred_by_mech; > > > > > - gss_inquire_cred_by_oid; > > > > > - gss_inquire_mech_for_saslname; > > > > > - gss_inquire_mechs_for_name; > > > > > - gss_inquire_names_for_mech; > > > > > - gss_inquire_saslname_for_mech; > > > > > - gss_inquire_sec_context_by_oid; > > > > > - gss_krb5_ccache_name; > > > > > - gss_krb5_copy_ccache; > > > > > - gss_krb5_export_lucid_sec_context; > > > > > - gss_krb5_free_lucid_sec_context; > > > > > - gss_krb5_get_tkt_flags; > > > > > - gss_krb5_import_cred; > > > > > - gss_krb5_set_allowable_enctypes; > > > > > gss_krb5_set_cred_rcache; > > > > > gss_krb5int_make_seal_token_v3; > > > > > gss_krb5int_unseal_token_v3; > > > > > - gsskrb5_extract_authtime_from_sec_context; > > > > > - gsskrb5_extract_authz_data_from_sec_context; > > > > > gss_localname; > > > > > gss_map_name_to_any; > > > > > gss_mech_iakerb; > > > > > @@ -124,47 +158,16 @@ gssapi_krb5_2_MIT { > > > > > gss_nt_service_name_v2; > > > > > gss_nt_string_uid_name; > > > > > gss_nt_user_name; > > > > > - gss_oid_equal; > > > > > - gss_oid_to_str; > > > > > - gss_pname_to_uid; > > > > > - gss_pseudo_random; > > > > > - gss_process_context_token; > > > > > gss_release_any_name_mapping; > > > > > - gss_release_buffer_set; > > > > > - gss_release_buffer; > > > > > - gss_release_cred; > > > > > - gss_release_iov_buffer; > > > > > - gss_release_name; > > > > > - gss_release_oid; > > > > > - gss_release_oid_set; > > > > > - gss_seal; > > > > > - gss_set_name_attribute; > > > > > gss_set_neg_mechs; > > > > > - gss_set_sec_context_option; > > > > > - gss_sign; > > > > > - gss_store_cred; > > > > > gss_str_to_oid; > > > > > - gss_test_oid_set_member; > > > > > - gss_unseal; > > > > > - gss_unwrap; > > > > > gss_unwrap_aead; > > > > > - gss_unwrap_iov; > > > > > - gss_userok; > > > > > - gss_verify; > > > > > - gss_verify_mic; > > > > > gss_verify_mic_iov; > > > > > - gss_wrap; > > > > > gss_wrap_aead; > > > > > - gss_wrap_iov; > > > > > - gss_wrap_iov_length; > > > > > - gss_wrap_size_limit; > > > > > - gss_set_cred_option; > > > > > gssspi_set_cred_option; > > > > > gssspi_mech_invoke; > > > > > krb5_gss_dbg_client_expcreds; > > > > > - krb5_gss_register_acceptor_identity; > > > > > krb5_gss_use_kdc_context; > > > > > - gss_inquire_name; > > > > > gss_acquire_cred_from; > > > > > gss_add_cred_from; > > > > > gss_store_cred_into; > > > > > > > > This breaks the ABI of _current_ libc on HEAD even more. > > > > Please do bump the dso versions for all libs from kerberos/gss > > > > with same current name as it was in Heimdal time. > > > > > > In other words use Heimdal in the name instead of the names MIT uses? > > > > > > This was certainly short sighted on our part when we put Heimdal in our DSO > > > > > names at the time. > > No. > > > > Just for all libs that have the same name as old heimdal libs, bump > > dso version. Do not rewrite version scripts, if there are vendor-provided > > scripts, patching it locally now would be a maintainence nightmare. > > > > I suspect that there is something unclear in "bump the dso version" > > suggestion. > > Those were bumped from .11 to .121 (for MIT KRB5 1.21). This should have > been evident from the start. It is absolutely not evident. Then, why did you do the patches against vendor versioning? Unless we have very good reason, we must stick to stock vendor version scripts. When symbol version was added (presumably to not versioned libs), dso version should have been bumped again, if providing strong ABI stability guarantees. But due to all rototiling in version scripts, I suspect we must admit that this is useless now. From nobody Thu Jul 24 18:58:52 2025 X-Original-To: dev-commits-src-all@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 4bp0f54vCwz633rl; Thu, 24 Jul 2025 18:58:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp0f4554pz3T36; Thu, 24 Jul 2025 18:58:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753383532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uM367atAFxbjO7mab2Qd9Ln37RSYnE1ZxUTOHC6gEzQ=; b=HTcXU3XKR4gfLRl6N+AucbQCTuhdHnVIB8OoV3UToCGKjvGx54t80Ofra1qq+Q8jV+yN9G /+OjAwGW2iaUc2FYnR5GbeKugm4oUrDWVz3RTZjUcpKG3oFTn89ziT04xqs7S6oCS+Ef4+ RDfmHVZaKTsPSytztB8IE0WHDyj4ljiXoFOWih29RDM5rfXC57zRDnC/rdFHwfcVNY3C5i kpGdFCdjiG+KgIRuFzx32KcrLbiRWQQY49PO8Jz/9M1V3HQKR/i85cVSyTOXx39f8KAvIz ia+KhrEWtyRxDXmt0kPuYBnJfISmlnwZj6iJtjjNjBqVK9W0N3kF4xUviG4jJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753383532; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uM367atAFxbjO7mab2Qd9Ln37RSYnE1ZxUTOHC6gEzQ=; b=VfaAePmtbYRNzK0V+NDDC9ONQ2Dr9xReB/P6P0xvJcyxA45NEk75xHq2GvUk/4SRfYFnV0 1ejvAvWpHf6SPSKqRXd9spKKy6hQ5iAsgiKk2nMrvMntzSXpNqFjUuvy6r0LdLhq1+VY7+ wzscBB+XrjGm2Mm5QnKrMce6fkldMxqoGjmEQ7tnCYpgV02v20SfhXdsVtXJxGDS+WwQPA jnU7NPDCL0EapjNalRm8JrxFInXDoqU6VnyXV9DNjDN2Ymt4gnHEonxKVU0NDtzXSEtjep F4TLy4iI5ZjbW/8u3erqrtLDF3lLV8kWQR26BFJCfyP2qpA3lClcGRiXgIO2xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753383532; a=rsa-sha256; cv=none; b=B0h82ed8AuxiTDFjwWX9Lq+9tU5XzVNi3N9zfU68R2lPIJZwWm+Rh1Ch3YGiXdU/JVC5re WsjI99TRSyfPjXs5veyvHC3tQPI6J0p/eVcgQp6oQmnX9xyrAwb9Bnsj9RLXYFKVlsI66S fydAdYK5vfc++rIueDr0xNdurpZGosjXisYzXRYRcwSfBduhUBqtQT2jXdbP/BCE6VGwVo sCVw5vhx8x5toyrWkkvcThu2NwY+XMTCv184YStJd0AwYP/K58OHNRU4wQf6CRdDCeZ/8b ouf4qy1vTjgs/dARhUD1o8NM9H+q4eGSNymLZ6ujXmHSwt8njBk3Zncr4FABvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bp0f432bKz19Cp; Thu, 24 Jul 2025 18:58:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OIwqQP062246; Thu, 24 Jul 2025 18:58:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OIwqIj062243; Thu, 24 Jul 2025 18:58:52 GMT (envelope-from git) Date: Thu, 24 Jul 2025 18:58:52 GMT Message-Id: <202507241858.56OIwqIj062243@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 110111a6cca1 - main - Revert "krb5: Use Heimdal DSO names" List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 110111a6cca14dd46b6d68e6f34e141ff6b7e44e Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=110111a6cca14dd46b6d68e6f34e141ff6b7e44e commit 110111a6cca14dd46b6d68e6f34e141ff6b7e44e Author: Cy Schubert AuthorDate: 2025-07-24 18:40:42 +0000 Commit: Cy Schubert CommitDate: 2025-07-24 18:58:39 +0000 Revert "krb5: Use Heimdal DSO names" This is incorrect. This reverts commit 5f8493bbf479922ee027e2ee7dc733f29f66dd6d. --- krb5/lib/gssapi/version.map | 2 +- krb5/lib/krb5/version.map | 2 +- krb5/util/et/version.map | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/krb5/lib/gssapi/version.map b/krb5/lib/gssapi/version.map index c7fc5c5813aa..d52c0d3d1e36 100644 --- a/krb5/lib/gssapi/version.map +++ b/krb5/lib/gssapi/version.map @@ -85,7 +85,7 @@ HEIMDAL_GSS_2.0 { krb5_gss_register_acceptor_identity; }; -HEIMDAL_GSS_3.0 { +gssapi_krb5_2_MIT { global: GSS_C_ATTR_LOCAL_LOGIN_USER; GSS_C_INQ_SSPI_SESSION_KEY; diff --git a/krb5/lib/krb5/version.map b/krb5/lib/krb5/version.map index 16fab76fc0c2..ce399a93e03e 100644 --- a/krb5/lib/krb5/version.map +++ b/krb5/lib/krb5/version.map @@ -215,7 +215,7 @@ HEIMDAL_KRB5_2.0 { krb5_write_message; }; -HEIMDAL_KRB5_3.0 { +krb5_3_MIT { global: _krb5_conf_boolean; decode_krb5_ad_kdcissued; diff --git a/krb5/util/et/version.map b/krb5/util/et/version.map index f659576e828e..3bd290009f22 100644 --- a/krb5/util/et/version.map +++ b/krb5/util/et/version.map @@ -8,7 +8,7 @@ HEIMDAL_COM_ERR_1.0 { set_com_err_hook; }; -HEIMDAL_COM_ERR_2.0 { +com_err_3_MIT { global: add_error_table; error_table_name_r; From nobody Thu Jul 24 19:05:18 2025 X-Original-To: dev-commits-src-all@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 4bp0nZ2gMkz634Th; Thu, 24 Jul 2025 19:05:22 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp0nY4sy3z3WpW; Thu, 24 Jul 2025 19:05:21 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4002a.ext.cloudfilter.net ([10.228.9.250]) by cmsmtp with ESMTPS id eyZuuw0sM5Mqyf1Fpuymp7; Thu, 24 Jul 2025 19:05:21 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id f1FnuxtdDl5eGf1FoucDCb; Thu, 24 Jul 2025 19:05:20 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=EO6l0EZC c=1 sm=1 tr=0 ts=688283f1 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=Wb1JkmetP80A:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=tgmwZ74WKTCmhDtGSywA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id CF84E1017; Thu, 24 Jul 2025 12:05:18 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id C95DD711; Thu, 24 Jul 2025 12:05:18 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Konstantin Belousov cc: Cy Schubert , Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e447c252d0ec - main - krb5: Merge Heimdal common functions into version maps In-reply-to: References: <202507241714.56OHEFYg074661@gitrepo.freebsd.org> <20250724173412.8B8E34D6@slippy.cwsent.com> <20250724184010.C57FA4DA@slippy.cwsent.com> Comments: In-reply-to Konstantin Belousov message dated "Thu, 24 Jul 2025 21:58:19 +0300." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 24 Jul 2025 12:05:18 -0700 Message-Id: <20250724190518.C95DD711@slippy.cwsent.com> X-CMAE-Envelope: MS4xfGLN934N2Eh9xl56RbGEeu9c62GmJ/vewhJLPk3dFb9KnO0jHxP0z1E9GJg1gaWYOkLwuxqpTcd41agYLEOPMy1WGfTeTHVLJXJVQ/sekeEMVYun0/JI fU0+A3NFzePH+I5+pSp1a60ezjj5GcKJe2xcl4caOSZOfDpdC7/2kVn8bMS8IPYMhNknUDQrAhFUhCWnuhtbLn/FFDTENwj5nTXqFbNNFyzU/AQgHREi3w93 MM0Tw2yDuEhIVMXgy0Fs1iwgrs+z8+9Pl9DztFvBDG3Q82UXAv/eiAYsV/Zv5y0FmYE39WYT/Q7sYhzc+XsyvlAF15fjJUkRyg33dIxJCsoUSHMhrd+YLuky LWs0uDQ7 X-Rspamd-Queue-Id: 4bp0nY4sy3z3WpW 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:16509, ipnet:3.96.0.0/15, country:US] In message , Konstantin Belousov writes: > On Thu, Jul 24, 2025 at 11:40:10AM -0700, Cy Schubert wrote: > > In message , Konstantin Belousov writes: > > > On Thu, Jul 24, 2025 at 10:34:12AM -0700, Cy Schubert wrote: > > > > In message , Konstantin Belousov writes: > > > > > On Thu, Jul 24, 2025 at 05:14:15PM +0000, Cy Schubert wrote: > > > > > > The branch main has been updated by cy: > > > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=e447c252d0eca8f1440996 > f2a3 > > > 521c > > > > > 75c06ae126 > > > > > > > > > > > > commit e447c252d0eca8f1440996f2a3521c75c06ae126 > > > > > > Author: Cy Schubert > > > > > > AuthorDate: 2025-07-24 16:24:03 +0000 > > > > > > Commit: Cy Schubert > > > > > > CommitDate: 2025-07-24 16:31:40 +0000 > > > > > > > > > > > > krb5: Merge Heimdal common functions into version maps > > > > > > > > > > > > Requested by: kib > > > > > I do not remember that I ever asked to do this. > > > > > More, I do not understand Kerberos to see such details. > > > > > > > > > > But see below. > > > > > > > > > > > --- > > > > > > krb5/lib/gssapi/version.map | 171 +++++++++--------- > > > > > > krb5/lib/krb5/version.map | 430 ++++++++++++++++++++++---------- > ---- > > > ---- > > > > > ---- > > > > > > krb5/util/et/version.map | 12 +- > > > > > > 3 files changed, 312 insertions(+), 301 deletions(-) > > > > > > > > > > > > diff --git a/krb5/lib/gssapi/version.map b/krb5/lib/gssapi/version. > map > > > > > > index bd0d28df70a7..d52c0d3d1e36 100644 > > > > > > --- a/krb5/lib/gssapi/version.map > > > > > > +++ b/krb5/lib/gssapi/version.map > > > > > > @@ -1,3 +1,90 @@ > > > > > > +HEIMDAL_GSS_2.0 { > > > > > > + global: > > > > > > + gss_accept_sec_context; > > > > > > + gss_acquire_cred; > > > > > > + gss_acquire_cred_with_password; > > > > > > + gss_add_buffer_set_member; > > > > > > + gss_add_cred; > > > > > > + gss_add_cred_with_password; > > > > > > + gss_add_oid_set_member; > > > > > > + gss_authorize_localname; > > > > > > + gss_canonicalize_name; > > > > > > + gss_compare_name; > > > > > > + gss_context_time; > > > > > > + gss_create_empty_buffer_set; > > > > > > + gss_create_empty_oid_set; > > > > > > + gss_decapsulate_token; > > > > > > + gss_delete_name_attribute; > > > > > > + gss_delete_sec_context; > > > > > > + gss_display_mech_attr; > > > > > > + gss_display_name; > > > > > > + gss_display_name_ext; > > > > > > + gss_display_status; > > > > > > + gss_duplicate_name; > > > > > > + gss_encapsulate_token; > > > > > > + gss_export_cred; > > > > > > + gss_export_name; > > > > > > + gss_export_name_composite; > > > > > > + gss_export_sec_context; > > > > > > + gss_get_mic; > > > > > > + gss_get_name_attribute; > > > > > > + gss_import_cred; > > > > > > + gss_import_name; > > > > > > + gss_import_sec_context; > > > > > > + gss_indicate_mechs; > > > > > > + gss_indicate_mechs_by_attrs; > > > > > > + gss_init_sec_context; > > > > > > + gss_inquire_attrs_for_mech; > > > > > > + gss_inquire_context; > > > > > > + gss_inquire_cred; > > > > > > + gss_inquire_cred_by_mech; > > > > > > + gss_inquire_cred_by_oid; > > > > > > + gss_inquire_mech_for_saslname; > > > > > > + gss_inquire_mechs_for_name; > > > > > > + gss_inquire_name; > > > > > > + gss_inquire_names_for_mech; > > > > > > + gss_inquire_saslname_for_mech; > > > > > > + gss_krb5_ccache_name; > > > > > > + gss_krb5_copy_ccache; > > > > > > + gss_krb5_export_lucid_sec_context; > > > > > > + gss_krb5_free_lucid_sec_context; > > > > > > + gss_krb5_get_tkt_flags; > > > > > > + gss_krb5_import_cred; > > > > > > + gss_krb5_set_allowable_enctypes; > > > > > > + gss_oid_equal; > > > > > > + gss_oid_to_str; > > > > > > + gss_pname_to_uid; > > > > > > + gss_process_context_token; > > > > > > + gss_pseudo_random; > > > > > > + gss_release_buffer; > > > > > > + gss_release_buffer_set; > > > > > > + gss_release_cred; > > > > > > + gss_release_iov_buffer; > > > > > > + gss_release_name; > > > > > > + gss_release_oid; > > > > > > + gss_release_oid_set; > > > > > > + gss_seal; > > > > > > + gss_set_cred_option; > > > > > > + gss_set_name_attribute; > > > > > > + gss_set_sec_context_option; > > > > > > + gss_sign; > > > > > > + gss_store_cred; > > > > > > + gss_test_oid_set_member; > > > > > > + gss_unseal; > > > > > > + gss_unwrap; > > > > > > + gss_unwrap_iov; > > > > > > + gss_userok; > > > > > > + gss_verify; > > > > > > + gss_verify_mic; > > > > > > + gss_wrap; > > > > > > + gss_wrap_iov; > > > > > > + gss_wrap_iov_length; > > > > > > + gss_wrap_size_limit; > > > > > > + gsskrb5_extract_authtime_from_sec_context; > > > > > > + gsskrb5_extract_authz_data_from_sec_context; > > > > > > + krb5_gss_register_acceptor_identity; > > > > > > +}; > > > > > > + > > > > > > gssapi_krb5_2_MIT { > > > > > > global: > > > > > > GSS_C_ATTR_LOCAL_LOGIN_USER; > > > > > > @@ -46,67 +133,14 @@ gssapi_krb5_2_MIT { > > > > > > GSS_C_MA_CTX_TRANS; > > > > > > GSS_C_MA_NEGOEX_AND_SPNEGO; > > > > > > GSS_C_SEC_CONTEXT_SASL_SSF; > > > > > > - gss_accept_sec_context; > > > > > > - gss_acquire_cred; > > > > > > - gss_acquire_cred_with_password; > > > > > > gss_acquire_cred_impersonate_name; > > > > > > - gss_add_buffer_set_member; > > > > > > - gss_add_cred; > > > > > > gss_add_cred_impersonate_name; > > > > > > - gss_add_cred_with_password; > > > > > > - gss_add_oid_set_member; > > > > > > - gss_authorize_localname; > > > > > > - gss_canonicalize_name; > > > > > > - gss_compare_name; > > > > > > gss_complete_auth_token; > > > > > > - gss_context_time; > > > > > > - gss_create_empty_buffer_set; > > > > > > - gss_create_empty_oid_set; > > > > > > - gss_decapsulate_token; > > > > > > - gss_delete_name_attribute; > > > > > > - gss_delete_sec_context; > > > > > > - gss_display_mech_attr; > > > > > > - gss_display_name; > > > > > > - gss_display_name_ext; > > > > > > - gss_display_status; > > > > > > - gss_duplicate_name; > > > > > > - gss_encapsulate_token; > > > > > > - gss_export_cred; > > > > > > - gss_export_name; > > > > > > - gss_export_name_composite; > > > > > > - gss_export_sec_context; > > > > > > - gss_get_mic; > > > > > > gss_get_mic_iov; > > > > > > gss_get_mic_iov_length; > > > > > > - gss_get_name_attribute; > > > > > > - gss_import_cred; > > > > > > - gss_import_name; > > > > > > - gss_import_sec_context; > > > > > > - gss_indicate_mechs; > > > > > > - gss_init_sec_context; > > > > > > - gss_indicate_mechs_by_attrs; > > > > > > - gss_inquire_attrs_for_mech; > > > > > > - gss_inquire_context; > > > > > > - gss_inquire_cred; > > > > > > - gss_inquire_cred_by_mech; > > > > > > - gss_inquire_cred_by_oid; > > > > > > - gss_inquire_mech_for_saslname; > > > > > > - gss_inquire_mechs_for_name; > > > > > > - gss_inquire_names_for_mech; > > > > > > - gss_inquire_saslname_for_mech; > > > > > > - gss_inquire_sec_context_by_oid; > > > > > > - gss_krb5_ccache_name; > > > > > > - gss_krb5_copy_ccache; > > > > > > - gss_krb5_export_lucid_sec_context; > > > > > > - gss_krb5_free_lucid_sec_context; > > > > > > - gss_krb5_get_tkt_flags; > > > > > > - gss_krb5_import_cred; > > > > > > - gss_krb5_set_allowable_enctypes; > > > > > > gss_krb5_set_cred_rcache; > > > > > > gss_krb5int_make_seal_token_v3; > > > > > > gss_krb5int_unseal_token_v3; > > > > > > - gsskrb5_extract_authtime_from_sec_context; > > > > > > - gsskrb5_extract_authz_data_from_sec_context; > > > > > > gss_localname; > > > > > > gss_map_name_to_any; > > > > > > gss_mech_iakerb; > > > > > > @@ -124,47 +158,16 @@ gssapi_krb5_2_MIT { > > > > > > gss_nt_service_name_v2; > > > > > > gss_nt_string_uid_name; > > > > > > gss_nt_user_name; > > > > > > - gss_oid_equal; > > > > > > - gss_oid_to_str; > > > > > > - gss_pname_to_uid; > > > > > > - gss_pseudo_random; > > > > > > - gss_process_context_token; > > > > > > gss_release_any_name_mapping; > > > > > > - gss_release_buffer_set; > > > > > > - gss_release_buffer; > > > > > > - gss_release_cred; > > > > > > - gss_release_iov_buffer; > > > > > > - gss_release_name; > > > > > > - gss_release_oid; > > > > > > - gss_release_oid_set; > > > > > > - gss_seal; > > > > > > - gss_set_name_attribute; > > > > > > gss_set_neg_mechs; > > > > > > - gss_set_sec_context_option; > > > > > > - gss_sign; > > > > > > - gss_store_cred; > > > > > > gss_str_to_oid; > > > > > > - gss_test_oid_set_member; > > > > > > - gss_unseal; > > > > > > - gss_unwrap; > > > > > > gss_unwrap_aead; > > > > > > - gss_unwrap_iov; > > > > > > - gss_userok; > > > > > > - gss_verify; > > > > > > - gss_verify_mic; > > > > > > gss_verify_mic_iov; > > > > > > - gss_wrap; > > > > > > gss_wrap_aead; > > > > > > - gss_wrap_iov; > > > > > > - gss_wrap_iov_length; > > > > > > - gss_wrap_size_limit; > > > > > > - gss_set_cred_option; > > > > > > gssspi_set_cred_option; > > > > > > gssspi_mech_invoke; > > > > > > krb5_gss_dbg_client_expcreds; > > > > > > - krb5_gss_register_acceptor_identity; > > > > > > krb5_gss_use_kdc_context; > > > > > > - gss_inquire_name; > > > > > > gss_acquire_cred_from; > > > > > > gss_add_cred_from; > > > > > > gss_store_cred_into; > > > > > > > > > > This breaks the ABI of _current_ libc on HEAD even more. > > > > > Please do bump the dso versions for all libs from kerberos/gss > > > > > with same current name as it was in Heimdal time. > > > > > > > > In other words use Heimdal in the name instead of the names MIT uses? > > > > > > > > This was certainly short sighted on our part when we put Heimdal in our > DSO > > > > > > > names at the time. > > > No. > > > > > > Just for all libs that have the same name as old heimdal libs, bump > > > dso version. Do not rewrite version scripts, if there are vendor-provide > d > > > scripts, patching it locally now would be a maintainence nightmare. > > > > > > I suspect that there is something unclear in "bump the dso version" > > > suggestion. > > > > Those were bumped from .11 to .121 (for MIT KRB5 1.21). This should have > > been evident from the start. > > It is absolutely not evident. > > Then, why did you do the patches against vendor versioning? > Unless we have very good reason, we must stick to stock vendor version > scripts. > > When symbol version was added (presumably to not versioned libs), dso > version should have been bumped again, if providing strong ABI stability > guarantees. But due to all rototiling in version scripts, I suspect > we must admit that this is useless now. Sorry. I was confused as to why. We can bump to 122. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Thu Jul 24 19:05:26 2025 X-Original-To: dev-commits-src-all@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 4bp0nh39Xyz634KH; Thu, 24 Jul 2025 19:05:28 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp0ng5g4lz3X33; Thu, 24 Jul 2025 19:05:27 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTPS id ej3ouvS0N5Mqyf1Fvuyn4H; Thu, 24 Jul 2025 19:05:27 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id f1Fuuu4ptWX70f1Fvu0PZH; Thu, 24 Jul 2025 19:05:27 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=d71WygjE c=1 sm=1 tr=0 ts=688283f7 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=Wb1JkmetP80A:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=9-x2D7QJGkHYpgIlwuEA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 313CA101C; Thu, 24 Jul 2025 12:05:26 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 2F85A642; Thu, 24 Jul 2025 12:05:26 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Lexi Winter cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 962876cc24ee - main - UPDATING: Note the Kerberos package rename (c7da9fb90b0b) In-reply-to: <202507241824.56OIO88s005888@gitrepo.freebsd.org> References: <202507241824.56OIO88s005888@gitrepo.freebsd.org> Comments: In-reply-to Lexi Winter message dated "Thu, 24 Jul 2025 18:24:08 +0000." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 24 Jul 2025 12:05:26 -0700 Message-Id: <20250724190526.2F85A642@slippy.cwsent.com> X-CMAE-Envelope: MS4xfI9qFtMya31qLCSb4bX6jfXh/5HaTgJmFsEfw3cuQYdOgiaRfwEsr9Bjvubzz53KVvg/25NGuKJxL3kpUnThg6+9Mw1PcieZ6DpKcDTGhoa/1jqnM4hM sCBt40yMp605LIWfF0CjDjeFBf9M825O2UsjSZUTSDd9B0LJkjRJLSPXyKnJ5vZhHJ/8a1yBcj7LVTd5nqucI1rExjTKjAMeCXO4SlQG9mGq66y7ZHyOi04Q nHkn2UisqNjBxe/mGXtj9j9tSUvQ9LPTjeEVseHWGTkrXgI9ZixubBFYsGTDfobQes97smO5RPHeklF7ph6qatbFGnE79Co4gYXuO/1cHec= X-Rspamd-Queue-Id: 4bp0ng5g4lz3X33 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:16509, ipnet:3.96.0.0/15, country:US] In message <202507241824.56OIO88s005888@gitrepo.freebsd.org>, Lexi Winter write s: > The branch main has been updated by ivy: > > URL: https://cgit.FreeBSD.org/src/commit/?id=962876cc24ee9fe1f0ee508f420f11fd > eac02ee3 > > commit 962876cc24ee9fe1f0ee508f420f11fdeac02ee3 > Author: Lexi Winter > AuthorDate: 2025-07-24 18:24:33 +0000 > Commit: Lexi Winter > CommitDate: 2025-07-24 18:25:05 +0000 > > UPDATING: Note the Kerberos package rename (c7da9fb90b0b) > --- > UPDATING | 11 +++++++++++ > 1 file changed, 11 insertions(+) > > diff --git a/UPDATING b/UPDATING > index 3fd8a0fd0c0b..2be01f2c98c3 100644 > --- a/UPDATING > +++ b/UPDATING > @@ -27,6 +27,17 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: > world, or to merely disable the most expensive debugging functionality > at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) > > +20250724: > + The Kerberos packages which are built when WITH_MITKRB5 is enabled > + have been renamed from FreeBSD-krb5* to FreeBSD-kerberos*. This > + affects pkgbase users who manually enabled WITH_MITKRB5, *or* use > + the default value of WITH_MITKRB5 and updated past c7da9fb90b0b > + (20250721) which made WITH_MITKRB5 the default. > + > + In either case, if you have FreeBSD-krb5* packages installed, you > + should remove them and (re)install the equivalent FreeBSD-kerberos* > + packages instead. Shouldn't this be the other way around? Heimdal is FreeBSD-kerberos while MIT is FreeBSD-krb5. I objected to the name change because it could cause people to assume they were one in the same. I'm open to be convinced otherwise though. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Thu Jul 24 19:11:42 2025 X-Original-To: dev-commits-src-all@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 4bp0ww6p1fz634SD; Thu, 24 Jul 2025 19:11:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp0ww3q8qz3c4H; Thu, 24 Jul 2025 19:11:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753384304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Lyzg+luWENEWvrLj2dHyo5WuEJTiGKT40TjsOwvfdqU=; b=x56M//51XE5oc0I4neWuXD3jNjK1G9H/+p0al+q3o8nCoE7VXRUewJ2Q0O5idWWbVMMPF3 QcNwEYnNnjfNm8nwcg9InjNxuNrMpKTaJUDAUiFwmtfqEsqsDAzlZc4MKXLI/WLc3QqgP/ a+/rncZhjFB+ABOPtlwEkdiTO/UUIr3thaIoS7F4Cq5GmahkYZi7GjhpGcadfYaXmAmq8x 1CmwQIRbPDrMKP23UScJRKJDppH8Bx/RoSKew9vPBFcuq29DuPGdy6/rVq/vnqs48/AS74 8xhEKEERzGn6klY22GH/6Cq9c7DqrknPie/iu/SiMb+rAKFAlTy6ncnJuncZog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753384304; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Lyzg+luWENEWvrLj2dHyo5WuEJTiGKT40TjsOwvfdqU=; b=rDDYAWm4+GKfXuh3Ix2BL9iyb8T0J/WzmkMU2jZgLi2G9odXUhuOCsdm/FAyk26ia5tlIm ShBTqV8/qeJ9s6QAo9uvDYImhPXAN+kiRnK6H7Ks/N+WqLn9CGIGl3iQ03ZPCoaNKfQPEE EbwY5gFhajDOY8yxCXneJjkC4d41GzaYykNbWQsp1DJB1/SxF9bNni5q5yZzLu7tCBo2Wn 0ONXT5VVitk6SJgDbmD8xPvQa/hIt56beZP67qPSJ7TM2mEmlyBHSk+Y5PamjvZd82xqEY MeVG17mcaakJNXpWwxQ71zHmi79PL8bHGjmiJ9FVjqlfqAytN+03F7jT8b3aEQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753384304; a=rsa-sha256; cv=none; b=B/PNK00Fc/izeOmeexpR6CNQv6plnJXNqdvqls6uUIb+GzXmrJS00x2c+tdxuusWYWO7zG JU5RzDBsDg1r/UylraB7TgMNPMNNr7dtIgSJJdsntI9cBx8aSzFXKcicdJx4sJeClC7eN4 OH0tZTPwPPOSFIxadl4AHLTsg3TnJeUr8YeI67RrF3UCJecMtwAX3rtBtUhuuzPHL1HKFU xoeymI0TR4dE2K9ZcSZa2cxfOd1FCc/UCupHeux2TYtW+Vr/Kvg656eEaT+Nf578dMycv7 NvJNFcqV8WTUKjaqEOkmlvYSAx7fVRSqnLnrOqSVpb5kIv0XhF3Nu+GaQOtCkA== Received: from [IPV6:2601:5c0:4200:b830:c4db:2d39:7cd2:a145] (unknown [IPv6:2601:5c0:4200:b830:c4db:2d39:7cd2:a145]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4bp0ww1nBxz196D; Thu, 24 Jul 2025 19:11:44 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Thu, 24 Jul 2025 15:11:42 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: ae07a5805b19 - main - krb5: Add version maps Content-Language: en-US From: John Baldwin To: Cy Schubert , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202507221548.56MFmoo2060272@gitrepo.freebsd.org> <7d7427f3-16c2-4948-ab28-56eec1677e13@FreeBSD.org> In-Reply-To: <7d7427f3-16c2-4948-ab28-56eec1677e13@FreeBSD.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/23/25 10:00, John Baldwin wrote: > On 7/22/25 11:48, Cy Schubert wrote: >> The branch main has been updated by cy: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=ae07a5805b1906f29e786f415d67bef334557bd3 >> >> commit ae07a5805b1906f29e786f415d67bef334557bd3 >> Author: Cy Schubert >> AuthorDate: 2025-07-22 15:38:19 +0000 >> Commit: Cy Schubert >> CommitDate: 2025-07-22 15:48:40 +0000 >> >> krb5: Add version maps >> >> Shared objects must have version maps. These were copied from upstream's >> *.exports files. >> >> Reminded by: kib >> Fixes: ee3960cba106 > > Hmmm, does this match the version files built by upstream's build? They > seem to use a different pattern for the version numbers in their build > glue and include a trailing HIDDEN annotation. > > binutils.versions: $(SHLIB_EXPORT_FILE) Makefile > base=`echo "$(LIBBASE)" | sed -e 's/-/_/'`; \ > echo > binutils.versions "$${base}_$(LIBMAJOR)_MIT {" > sed >> binutils.versions < $(SHLIB_EXPORT_FILE) "s/$$/;/" > echo >> binutils.versions "};" > echo >> binutils.versions "HIDDEN { local: __*; _rest*; _save*; *; };" > > (SHLIB_EXPORT_FILE is the foo.exports file) > > Upstream only uses those for Linux but the binutils versions file is the > right format to use with both ld.bfd and lld. > > I also wonder if it would be better to use similar logic to generate these > files at build time? We have some other version maps we generate as build > artifacts rather than checking into the tree IIRC. While I appreciate that you committed a change, I do think it would be useful to answer the questions above. For example, why not generate the maps at runtime to reduce the chances they would get out of sync in future vendor imports? There are probably reasonable thoughts on both sides, but we should at least discuss them. Also, I echo requests from both Jessica and Kostik: please post patches for review. We have time before 15.0 so we can slow down a bit and use discussion and review to arrive at the right changes going forward rather than a flurry of commits that keep fixing each other. -- John Baldwin From nobody Thu Jul 24 19:17:32 2025 X-Original-To: dev-commits-src-all@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 4bp13h0dKWz634gl; Thu, 24 Jul 2025 19:17:36 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp13g33dzz3hHj; Thu, 24 Jul 2025 19:17:35 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id eyYvuw0og5Mqyf1RfuzCFZ; Thu, 24 Jul 2025 19:17:35 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id f1Rdu62fOJhBPf1ReuofTc; Thu, 24 Jul 2025 19:17:35 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=QY3Fvdbv c=1 sm=1 tr=0 ts=688286cf a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=Wb1JkmetP80A:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=N2psXbuA5REMNreiNeQA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 27A6D1027; Thu, 24 Jul 2025 12:17:33 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id E8ADF54D; Thu, 24 Jul 2025 12:17:32 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: John Baldwin cc: Cy Schubert , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: ae07a5805b19 - main - krb5: Add version maps In-reply-to: References: <202507221548.56MFmoo2060272@gitrepo.freebsd.org> <7d7427f3-16c2-4948-ab28-56eec1677e13@FreeBSD.org> Comments: In-reply-to John Baldwin message dated "Thu, 24 Jul 2025 15:11:42 -0400." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 24 Jul 2025 12:17:32 -0700 Message-Id: <20250724191732.E8ADF54D@slippy.cwsent.com> X-CMAE-Envelope: MS4xfCFm0TWnPPqkOF4ZcmnqVN8yhrA9Nlr56oLx+fskx6ODLr0iPLnybY1e9m+Ss5MMYTsF8Js32h1wx+8VCj8QhXPMqYJ5MSaasj1oP6gvqDNHX3Qh+4/k 583ZGK+VfLzN0jNW6g2YEeuENd3rrMf0Fz+PL/GG+ZHqsj9F7/lDv/s4piHHkjpn8c2HgB5O0wpx4D65f3ibE2YsnPOogXKiKq4bkGRJ1k8xzcJ0X6h4xMjA f21bwCJ9h0DUy5j7HnwqTQw6fr+A4U2Hbe6/5kLGJI8r99cr0WJ+ltwQ+hly198YWulZX08yMQJFDfKa3SoNXITKAbSQLcAD0chfO9Bom3lZ7PpgZDpkeRJp AkgEAcox X-Rspamd-Queue-Id: 4bp13g33dzz3hHj 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:16509, ipnet:3.96.0.0/15, country:US] In message , John Baldwin wri tes: > On 7/23/25 10:00, John Baldwin wrote: > > On 7/22/25 11:48, Cy Schubert wrote: > >> The branch main has been updated by cy: > >> > >> URL: https://cgit.FreeBSD.org/src/commit/?id=ae07a5805b1906f29e786f415d67b > ef334557bd3 > >> > >> commit ae07a5805b1906f29e786f415d67bef334557bd3 > >> Author: Cy Schubert > >> AuthorDate: 2025-07-22 15:38:19 +0000 > >> Commit: Cy Schubert > >> CommitDate: 2025-07-22 15:48:40 +0000 > >> > >> krb5: Add version maps > >> > >> Shared objects must have version maps. These were copied from upstre > am's > >> *.exports files. > >> > >> Reminded by: kib > >> Fixes: ee3960cba106 > > > > Hmmm, does this match the version files built by upstream's build? They > > seem to use a different pattern for the version numbers in their build > > glue and include a trailing HIDDEN annotation. This doesn't match upstream's versioning. That would cause the version numbers to go backwards. I used the OpenSSL 1.1.1 update as the example. It also mitigates any conflict between the MIT ports and base. Does this make sense? > > > > binutils.versions: $(SHLIB_EXPORT_FILE) Makefile > > base=`echo "$(LIBBASE)" | sed -e 's/-/_/'`; \ > > echo > binutils.versions "$${base}_$(LIBMAJOR)_MIT {" > > sed >> binutils.versions < $(SHLIB_EXPORT_FILE) "s/$$/;/" > > echo >> binutils.versions "};" > > echo >> binutils.versions "HIDDEN { local: __*; _rest*; _save*; * > ; };" > > > > (SHLIB_EXPORT_FILE is the foo.exports file) > > > > Upstream only uses those for Linux but the binutils versions file is the > > right format to use with both ld.bfd and lld. > > > > I also wonder if it would be better to use similar logic to generate these > > files at build time? We have some other version maps we generate as build > > artifacts rather than checking into the tree IIRC. > > While I appreciate that you committed a change, I do think it would be useful > to answer the questions above. For example, why not generate the maps at > runtime to reduce the chances they would get out of sync in future vendor > imports? There are probably reasonable thoughts on both sides, but we should > at least discuss them. > > Also, I echo requests from both Jessica and Kostik: please post patches for > review. We have time before 15.0 so we can slow down a bit and use discussio > n > and review to arrive at the right changes going forward rather than a flurry > of commits that keep fixing each other. Sure. What is the consensus then? Do we want to use upstream's DSO numbering or our own, like we do with OpenSSL? -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Thu Jul 24 19:23:28 2025 X-Original-To: dev-commits-src-all@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 4bp1BT4Hyzz634yt; Thu, 24 Jul 2025 19:23:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp1BT3V17z3lSn; Thu, 24 Jul 2025 19:23:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753385009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BSmVtFMAvDcSDHu4TySjQvTHDp29Rl6IVt/5g7qJg6E=; b=FvPYoR+eswAkP9s8Or3cJx+tnZ11pa5VaUEg7oShdE7sbMMQQ83JSKo4MkNe/w04MgL//R Xhow+en0Nlhc2/Tp2M4UNd5kCoQ0BGraQwXhGmzyU7F4yUmsZSeuqoN+XWpLaL8n2GKjxW RnZq5Fv8R+e4rzG7czMlkLq+ikFdqmsVHNsgq6m8Z1QzqkX2OvfKvFLkXPjuGKtHtGoJDG 5VpCeSJcg9aPeAzGiIumPtNIatvTbbAMLqe4E+A/ioQg6WF3jEz15k0Q5PbN7GP3XFZVkX QVLI2XDqyYubib/7iT0aitpt06mOd1NKaPsHvhYxh/iyaazQWxMJHksMWsdMSw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753385009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BSmVtFMAvDcSDHu4TySjQvTHDp29Rl6IVt/5g7qJg6E=; b=ginK8NOAgAwLsQptm+PH488ZDqyphkBVJ0EVazwMaLiQAwV+5b0+aVIsk9VBW6f4hYeilD gBhQGSl7aYzHZUQTdMFI0zM39VSmcU8sqzOKA5sjuHyKLIk8hgov8e8z2JTKYryY8BF0ah Ya0T+bz+p3TQGvZnHx19FjI+tAdNWKALTsd7aBBl0dMih8gH/k4KCMMgIid6U6QrEMyBoU o0s7w64aLu1QSk10DgQPhqRcTV3MxTkHDWL12LXWbntYnfnmp8p7+ZHx7khkxBkG9ooxXT EEiD+lK5mde1vrfietn21O/HsKGx6tvJyLyUIhiPb1KjJ4MeGDqXUyzxcsLMpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753385009; a=rsa-sha256; cv=none; b=vBrWEMinOCY3/B8lMe1eqZksTS4i3q/j+jcZxjAtJdJKWXL5F9Ow/0mGqHf+bZUHa8NCi+ +K4gsrRAUeQmQZUlsjgsxYthyHBFCRx8NRwOsTkmYL57KX18gWWRcI9FgNRxqA9Va9WDS7 rzNRXSToqxjuAC1UJT03R4U3/ZgHpUq1pkMwvMJo6AhHBUi31z02frL9xUwRhU1aGiok+m Rw9FAFfKuN7aI7cyXiRbm5fDxWvMQCb105EtYr/WCriC/ouIHBlXDEc+rP5+xW6+Ybf2XA XLKxYkxxNstFNeBl+qac3jeJfacoc3BeQ8MZBrB0TsbqwyUG1cYvhePIvoj7Dg== Received: from [IPV6:2601:5c0:4200:b830:c4db:2d39:7cd2:a145] (unknown [IPv6:2601:5c0:4200:b830:c4db:2d39:7cd2:a145]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4bp1BT1V5Qz19Fk; Thu, 24 Jul 2025 19:23:29 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <28c0e36f-4370-4ab6-877f-6341d1725cba@FreeBSD.org> Date: Thu, 24 Jul 2025 15:23:28 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 962876cc24ee - main - UPDATING: Note the Kerberos package rename (c7da9fb90b0b) Content-Language: en-US To: Cy Schubert , Lexi Winter Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202507241824.56OIO88s005888@gitrepo.freebsd.org> <20250724190526.2F85A642@slippy.cwsent.com> From: John Baldwin In-Reply-To: <20250724190526.2F85A642@slippy.cwsent.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/24/25 15:05, Cy Schubert wrote: > In message <202507241824.56OIO88s005888@gitrepo.freebsd.org>, Lexi Winter > write > s: >> The branch main has been updated by ivy: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=962876cc24ee9fe1f0ee508f420f11fd >> eac02ee3 >> >> commit 962876cc24ee9fe1f0ee508f420f11fdeac02ee3 >> Author: Lexi Winter >> AuthorDate: 2025-07-24 18:24:33 +0000 >> Commit: Lexi Winter >> CommitDate: 2025-07-24 18:25:05 +0000 >> >> UPDATING: Note the Kerberos package rename (c7da9fb90b0b) >> --- >> UPDATING | 11 +++++++++++ >> 1 file changed, 11 insertions(+) >> >> diff --git a/UPDATING b/UPDATING >> index 3fd8a0fd0c0b..2be01f2c98c3 100644 >> --- a/UPDATING >> +++ b/UPDATING >> @@ -27,6 +27,17 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: >> world, or to merely disable the most expensive debugging functionality >> at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) >> >> +20250724: >> + The Kerberos packages which are built when WITH_MITKRB5 is enabled >> + have been renamed from FreeBSD-krb5* to FreeBSD-kerberos*. This >> + affects pkgbase users who manually enabled WITH_MITKRB5, *or* use >> + the default value of WITH_MITKRB5 and updated past c7da9fb90b0b >> + (20250721) which made WITH_MITKRB5 the default. >> + >> + In either case, if you have FreeBSD-krb5* packages installed, you >> + should remove them and (re)install the equivalent FreeBSD-kerberos* >> + packages instead. > > Shouldn't this be the other way around? Heimdal is FreeBSD-kerberos while > MIT is FreeBSD-krb5. I objected to the name change because it could cause > people to assume they were one in the same. > > I'm open to be convinced otherwise though. I think the view expressed here is that "FreeBSD-kerberos" are the kerberos libraries, whichever was enabled when the package set was built. In theory, a user using pkg to upgrade across the default changing would have their libraries transparently switch the same way users using buildworld do. The old pattern meant that users wouldn't get the MIT libraries and the upgrade process would fail to find newer "versions" of the old libraries with the end result that the user just stays on the old heimdal libraries forever. That would probably not be what most users would want, and it doesn't match the behavior of freebsd-update or buildworld/installworld. For example, switching bc from the previous vendor to 'gh-bc' didn't need to change the package name, it's just 'bc'. Also, I think for users, krb5 vs kerberos is probably not at all clear in terms of which one is preferred, or even which one is which (even if we did find a way to build both sets, which we don't currently do). If we really wanted to support having both sets at the same time (and I don't think we do), the two sets of packages would need to have 'heidmal' and 'mit' in the names to have a chance of not confusing users further. -- John Baldwin From nobody Thu Jul 24 19:25:14 2025 X-Original-To: dev-commits-src-all@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 4bp1DV4Tsjz6354T; Thu, 24 Jul 2025 19:25:14 +0000 (UTC) (envelope-from ivy@freebsd.org) Received: from freefall.freebsd.org (freefall.freebsd.org [96.47.72.132]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "freefall.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp1DV3G2Bz3mdj; Thu, 24 Jul 2025 19:25:14 +0000 (UTC) (envelope-from ivy@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753385114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MB0dfm1TuMYZkugz6kdGsKT2HuLtqXCkckIPSyNjLpE=; b=M8POunO4RRsanOs7kOKiAyjJpreKK7UfFUdBcFuKIiDT3GEdODp8z2AMV61pjxbRdCy/qv W1LDqtkBYODtPclAlFPQ6SZjkBdjsevfJ/YwPvBgHD+nSCU1UsSRoG9rfNYjocVsXs73ev xI66AO1ejBrv27+gRWc1brZtp0K23WAcOlLNXTA8tcdgr6gmUoQvFCDlBj9z86Ex73FlRV 0JPov6rR5uL6xBM8KaTySPQ+FCRIqbapF07HDMy+hoVg7heru/BypU8Nf+76Wzv2LnRves UPqN2KLNdl5NwB1/YlCso9Ib2t5weul9K/k1Y1Wr2AVTDaxBY4cysSBFugTTbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753385114; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=MB0dfm1TuMYZkugz6kdGsKT2HuLtqXCkckIPSyNjLpE=; b=GiSD+u1FVK4RFHeudy9wYvAHemJIybVSXeAsZR2GU4FheJW5VX0BxOXIa0MTS87pbHxcSP iIclEuNe13cRzVNgky3o6dhT6p1/mK/qJdyj3+umB6JXQNdzrYWxyoTG2tIWP3FnE09XJZ Ap4zXIQNhf+4tMa5Vdh3nOv/myI2U+QNR0PWcxLo47YOdHZCTPeRhThhWQuwWEywbwABzv LQm4u9W4zYTMp0LniQerEF7TYkzjNbt25n1Wl3vnKC1C69lfasgk/8SERsDZcrehzRt+ZP I7GvLz2zpQU14mKgNZMcFGIW3lCKY7jlyOBh/CC17XTxIEr2osowxE7iC4gEbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753385114; a=rsa-sha256; cv=none; b=hb3D8IbvmKd1+q6oGFPc99lnzCwcWIBRsdAhFS9TFlUeI7vBR39fixhDFjrnMUjQJxoa5B EgjOXXoJ9VtsOVPg77UxEc4v3PAFo1dipo8g/CerNf8U4/wxsPykH5SIXGpMKoIN2SU7VF MvUQ1AKYvC1TOTcYgXXWTZZ2MwU5VMcJFKuPo35RVmj81+g4CsjjHHeUJmtlkJCXRv8Qy2 eIO2wMND8ntCpQauPESosUD2zsaYAAoxtSv5T5+W70OcYfsWrpMrDnGnHx0+r71VSTdYWX +O4Y0eR+vHyLh1Tcbe6mr8SN9xmgAdxZLPy9TDocNRte+xalLhZXNI5CI9+7VA== Received: by freefall.freebsd.org (Postfix, from userid 1532) id 5A51716016; Thu, 24 Jul 2025 19:25:14 +0000 (UTC) Date: Thu, 24 Jul 2025 20:25:14 +0100 From: Lexi Winter To: Cy Schubert Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 962876cc24ee - main - UPDATING: Note the Kerberos package rename (c7da9fb90b0b) Message-ID: Mail-Followup-To: Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202507241824.56OIO88s005888@gitrepo.freebsd.org> <20250724190526.2F85A642@slippy.cwsent.com> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="/cJljwJYtPl3uHOB" Content-Disposition: inline In-Reply-To: <20250724190526.2F85A642@slippy.cwsent.com> --/cJljwJYtPl3uHOB Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable hi Cy, Cy Schubert: > In message <202507241824.56OIO88s005888@gitrepo.freebsd.org>, Lexi Winter= =20 > writes: > > UPDATING: Note the Kerberos package rename (c7da9fb90b0b) =20 > Shouldn't this be the other way around? Heimdal is FreeBSD-kerberos while= =20 > MIT is FreeBSD-krb5. I objected to the name change because it could cause= =20 > people to assume they were one in the same. although i understand you objected to D51420, i landed it anyway[0] which means the packages are back to their old names and there are no more FreeBSD-krb5* packages. let me explain why i did this: - the change to the package names caused friction both inside the project (e.g., it broke the OCI build scripts) and outside the project (according to reports i received from downstream users). - it was not clear there is any advantage to renaming the packages. - due to above i was specifically asked to land this commit by several people, including a pkgbase maintainer, and one of my mentors at the time. - i considered this a reasonable course of action because this restored the previous status quo and undid a change that (as far as i'm aware) hadn't been reviewed by #pkgbase, so in case of doubt, i erred on the side of restoring the previous behaviour. i apologise for reverting your code over your stated objections but now that we are back to the previous behaviour, we can discuss whether to rename these packages, which i suggest doing via a Phabricator review that includes #pkgbase. [0] https://cgit.freebsd.org/src/commit/?id=3D4cb1baa7d85c1e227c4acfcc13a35= a9f1b7e5a44 --/cJljwJYtPl3uHOB Content-Type: application/pgp-signature; name=signature.asc -----BEGIN PGP SIGNATURE----- iHUEABYKAB0WIQSyjTg96lp3RifySyn1nT63mIK/YAUCaIKIlgAKCRD1nT63mIK/ YHd3AP9A9or1MQmAL6n/VYyX5NNn3yuwvuz087fo9WbXvwDlwQD/fM9MorRnGPfX 2QZjPlmRJH1u6mkufCawdwSVDSU8RwU= =ZcJu -----END PGP SIGNATURE----- --/cJljwJYtPl3uHOB-- From nobody Thu Jul 24 19:36:11 2025 X-Original-To: dev-commits-src-all@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 4bp1TC2BDJz635Ym; Thu, 24 Jul 2025 19:36:15 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta003.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp1TB1WnSz3t08; Thu, 24 Jul 2025 19:36:14 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of cy.schubert@cschubert.com designates 3.97.99.32 as permitted sender) smtp.mailfrom=cy.schubert@cschubert.com; dmarc=permerror reason="p tag has invalid value: quarantine rua=mailto:p[ostmaster@cschubert.com" header.from=cschubert.com (policy=permerror) Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTPS id erdyuM0LD9JM2f1jhuGx4e; Thu, 24 Jul 2025 19:36:13 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id f1jguuBoUWX70f1jgu0TOc; Thu, 24 Jul 2025 19:36:13 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=d71WygjE c=1 sm=1 tr=0 ts=68828b2d a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=Wb1JkmetP80A:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=YRnX3NmYjSGvsK8fIC8A:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 94A971088; Thu, 24 Jul 2025 12:36:11 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 5FEAB54F; Thu, 24 Jul 2025 12:36:11 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 962876cc24ee - main - UPDATING: Note the Kerberos package rename (c7da9fb90b0b) In-reply-to: References: <202507241824.56OIO88s005888@gitrepo.freebsd.org> <20250724190526.2F85A642@slippy.cwsent.com> Comments: In-reply-to Lexi Winter message dated "Thu, 24 Jul 2025 20:25:14 +0100." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 24 Jul 2025 12:36:11 -0700 Message-Id: <20250724193611.5FEAB54F@slippy.cwsent.com> X-CMAE-Envelope: MS4xfKhuQBf8B+m/O6YpMN5awKv8DTunGsW/mQrEQZYy5lyfOWo+gdlO4i12Dv0GI9sZGHa63N+gJtkBukXOIFppAxvyDUy8i/Ngz8x4afLeoa9mr7MZsoiT /+0yxlE1F1CUh4cThC7pqVAD14hRpQ6qRiRu4WdYvXE+neF/ndElb/I6RVsxie3edOm7IyKV/dSlZTlgkUmWpc7y45uqkbvC7IZKC+8i/+UL6I05duDCTCWn 9FlqZTZfiwV5fk7yuMdijxmGh2d66znyuTyYLiXT4PMs9b+Q4ky1aNhI4AaRj/oZokXlg1nwG8oaXArJ5rGBFA== X-Spamd-Result: default: False [-0.19 / 15.00]; NEURAL_HAM_SHORT(-1.00)[-1.000]; NEURAL_SPAM_LONG(0.73)[0.726]; MV_CASE(0.50)[]; R_SPF_ALLOW(-0.20)[+ip4:3.97.99.32/31]; MIME_GOOD(-0.10)[text/plain]; RCVD_IN_DNSWL_LOW(-0.10)[3.97.99.32:from]; NEURAL_HAM_MEDIUM(-0.02)[-0.016]; RCVD_VIA_SMTP_AUTH(0.00)[]; ARC_NA(0.00)[]; ASN(0.00)[asn:16509, ipnet:3.96.0.0/15, country:US]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; REPLYTO_EQ_FROM(0.00)[]; DMARC_BAD_POLICY(0.00)[cschubert.com : p tag has invalid value: quarantine rua=mailto:p[ostmaster@cschubert.com]; R_DKIM_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; FROM_HAS_DN(0.00)[]; HAS_REPLYTO(0.00)[Cy.Schubert@cschubert.com]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_COUNT_THREE(0.00)[4]; RCVD_TLS_LAST(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org,dev-commits-src-all@freebsd.org]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4bp1TB1WnSz3t08 X-Spamd-Bar: / In message , Lexi Winter writes: > > > --/cJljwJYtPl3uHOB > Content-Type: text/plain; charset=us-ascii > Content-Disposition: inline > Content-Transfer-Encoding: quoted-printable > > hi Cy, > > Cy Schubert: > > In message <202507241824.56OIO88s005888@gitrepo.freebsd.org>, Lexi Winter= > =20 > > writes: > > > UPDATING: Note the Kerberos package rename (c7da9fb90b0b) > =20 > > Shouldn't this be the other way around? Heimdal is FreeBSD-kerberos while= > =20 > > MIT is FreeBSD-krb5. I objected to the name change because it could cause= > =20 > > people to assume they were one in the same. > > although i understand you objected to D51420, i landed it anyway[0] > which means the packages are back to their old names and there are > no more FreeBSD-krb5* packages. > > let me explain why i did this: > > - the change to the package names caused friction both inside the > project (e.g., it broke the OCI build scripts) and outside the > project (according to reports i received from downstream users). > > - it was not clear there is any advantage to renaming the packages. > > - due to above i was specifically asked to land this commit by several > people, including a pkgbase maintainer, and one of my mentors at the > time. > > - i considered this a reasonable course of action because this restored > the previous status quo and undid a change that (as far as i'm aware) > hadn't been reviewed by #pkgbase, so in case of doubt, i erred on the > side of restoring the previous behaviour. > > i apologise for reverting your code over your stated objections but now > that we are back to the previous behaviour, we can discuss whether to > rename these packages, which i suggest doing via a Phabricator review > that includes #pkgbase. No offense taken. I'm ok if those using the packages understand fully. Do people want /usr/src/krb5 renamed to /usr/src/kerberos5 when Heimdal is removed? I'm open to this. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Thu Jul 24 19:37:16 2025 X-Original-To: dev-commits-src-all@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 4bp1VQ4CDhz635jZ; Thu, 24 Jul 2025 19:37:18 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta003.cacentral1.a.cloudfilter.net (omta001.cacentral1.a.cloudfilter.net [3.97.99.32]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp1VQ2lvXz3tv5; Thu, 24 Jul 2025 19:37:18 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id eyaXuMH6I9JM2f1kkuGzLh; Thu, 24 Jul 2025 19:37:18 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id f1kiu675eJhBPf1kjuohu9; Thu, 24 Jul 2025 19:37:18 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=QY3Fvdbv c=1 sm=1 tr=0 ts=68828b6e a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=Wb1JkmetP80A:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=VxmjJ2MpAAAA:8 a=YxBL1-UpAAAA:8 a=sl9nvr8jfjI-GfRw-WQA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=7gXAzLPJhVmCkEl4_tsf:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id A0775103A; Thu, 24 Jul 2025 12:37:16 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 9E9AC645; Thu, 24 Jul 2025 12:37:16 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Cy Schubert cc: Lexi Winter , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 962876cc24ee - main - UPDATING: Note the Kerberos package rename (c7da9fb90b0b) In-reply-to: <20250724190526.2F85A642@slippy.cwsent.com> References: <202507241824.56OIO88s005888@gitrepo.freebsd.org> <20250724190526.2F85A642@slippy.cwsent.com> Comments: In-reply-to Cy Schubert message dated "Thu, 24 Jul 2025 12:05:26 -0700." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 24 Jul 2025 12:37:16 -0700 Message-Id: <20250724193716.9E9AC645@slippy.cwsent.com> X-CMAE-Envelope: MS4xfCzV687t0pu0WxMyAsQCtFf0xngt5mqLP5uDo3p8qjy3x0wCrE7RnQIcYyPJn0xn4HGfRRMCKk3I+S0NUgKYJ5DH4BF2r/BlCVtZkKRwG4LvUnpMZztI rhUCrZ83VmAh9mZAIDgnwQqw8rqYI5sW7ZfnFSh4dZWcPRuoIkQctRVYVX5dBamNDlhe8ks8j92K0ex/fnhyyzO+zm6kqC2JJbxyfJ4ZJzynXn3ThcSQlBHf h9pNInnDGZyibTo+8/INqy6ZECXij7csQ19QJFfoMVGUKNSI8Q9iCACgGujSTZWiQig4DNQm7tMWFpQTkRRz/EdiiRm6B3K64dNCS5SU+kE= X-Rspamd-Queue-Id: 4bp1VQ2lvXz3tv5 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:16509, ipnet:3.96.0.0/15, country:US] In message <20250724190526.2F85A642@slippy.cwsent.com>, Cy Schubert writes: > In message <202507241824.56OIO88s005888@gitrepo.freebsd.org>, Lexi Winter > write > s: > > The branch main has been updated by ivy: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=962876cc24ee9fe1f0ee508f420f11 > fd > > eac02ee3 > > > > commit 962876cc24ee9fe1f0ee508f420f11fdeac02ee3 > > Author: Lexi Winter > > AuthorDate: 2025-07-24 18:24:33 +0000 > > Commit: Lexi Winter > > CommitDate: 2025-07-24 18:25:05 +0000 > > > > UPDATING: Note the Kerberos package rename (c7da9fb90b0b) > > --- > > UPDATING | 11 +++++++++++ > > 1 file changed, 11 insertions(+) > > > > diff --git a/UPDATING b/UPDATING > > index 3fd8a0fd0c0b..2be01f2c98c3 100644 > > --- a/UPDATING > > +++ b/UPDATING > > @@ -27,6 +27,17 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: > > world, or to merely disable the most expensive debugging functionality > > at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) > > > > +20250724: > > + The Kerberos packages which are built when WITH_MITKRB5 is enabled > > + have been renamed from FreeBSD-krb5* to FreeBSD-kerberos*. This > > + affects pkgbase users who manually enabled WITH_MITKRB5, *or* use > > + the default value of WITH_MITKRB5 and updated past c7da9fb90b0b > > + (20250721) which made WITH_MITKRB5 the default. > > + > > + In either case, if you have FreeBSD-krb5* packages installed, you > > + should remove them and (re)install the equivalent FreeBSD-kerberos* > > + packages instead. > > Shouldn't this be the other way around? Heimdal is FreeBSD-kerberos while > MIT is FreeBSD-krb5. I objected to the name change because it could cause > people to assume they were one in the same. > > I'm open to be convinced otherwise though. Never mind the above. I wasn't aware it was committed anyway. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Thu Jul 24 19:43:21 2025 X-Original-To: dev-commits-src-all@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 4bp1dQ4pCCz63698; Thu, 24 Jul 2025 19:43:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp1dQ3rvFz3y59; Thu, 24 Jul 2025 19:43:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753386202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jq5JhuxtyHJ3dUKx/K3yqpA3K3xajHOFMkN/zpzAPvw=; b=V1b3r+Ke0CefZ7WXiEnunsl3JvLH5r3JOeG5SZEkqnH/m0Zwb7drBX6xIH3laEtCqLSPAJ gus0xsC8MGZD36hEHLqLCpeIUJEBpGk/PTNN2baLpZpqUEPl5/gP2vDHSwANECU3UtghbU sCUkBYnlc/+KNhBxG0tJKAuL8hsc9Ijwc3uvv7bIYsNuZXn+bTOLOiIYbKMue3PJUqW8BY WZNaijwXwzaSk0YSwH5Dv8mLiUiTn2cXmE6EZV/rXA6gxADFpS+iD+lGyMV8BoU+NlpKEN OWoZvi/c8BFmtBPsLF9hTvCb5vbLRH6IHi6SLUc5d3vgfguDhgoYm1UNME4CBQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753386202; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jq5JhuxtyHJ3dUKx/K3yqpA3K3xajHOFMkN/zpzAPvw=; b=imAP3SPqz7oY2aVSqVP/U2sULx3fhrrFnXQ8PGYv2Y9Ojpy125tspaw1r+V5i28xKYKKOR mHMWpiQG2qq7qqUET4v9T5Q31EssT13hcg/UP0NUeGqM4d69tWNzH81SspS1tm+wv9/k/y o++lxC1vz1j32b9YGtGmOfBJ0HXpwHihw7PewkryoDcxyHtfexG0+ukmDRfalzs/3T/gj1 usE32QrBk4jfs3NmakbYwLtD8Wj2+OMZVoyALATv9KTOnbJtfYb0fg3pKlC5l2C3RFGF8E 1DkPSv415U7EDgXK4cUdLfrbN60YbVhvVv8oe9njZfTI9sb3UfFGrWTUdrWnvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753386202; a=rsa-sha256; cv=none; b=t8eTfhSwsHSJ8oDPeVSae/hSLk+VdRvuPUMb6VgWZpaxr+t85qrdDv/dswuOGrprrimERg BsHvmKE1HXuJ/W6Cv3BPvrTxuN3FN7xKFJ8Y83f1gw5uAZIGJM70jYEzflVtrDqQbthsLb tuc4oP9ZY/o1buixUuN8YmjhVXzDH0TXYvoS8vmLkvdv8ljnr52+7q8VGDCngodDoiwMUE rR98C38jG1firvhQSA6Fb69Et/x8COHPyO8ozYiqbLajD83bw+vb9k1AHXH/17UO9mkq+g dugoPWd5vKb1arBCxBkMWob2BNqt4xIzKGQeI+ynIBiMFZAungOdgdzip+E2ZQ== Received: from [IPV6:2601:5c0:4200:b830:c4db:2d39:7cd2:a145] (unknown [IPv6:2601:5c0:4200:b830:c4db:2d39:7cd2:a145]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: jhb) by smtp.freebsd.org (Postfix) with ESMTPSA id 4bp1dQ1X59z18hM; Thu, 24 Jul 2025 19:43:22 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: Date: Thu, 24 Jul 2025 15:43:21 -0400 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: ae07a5805b19 - main - krb5: Add version maps Content-Language: en-US To: Cy Schubert Cc: Cy Schubert , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202507221548.56MFmoo2060272@gitrepo.freebsd.org> <7d7427f3-16c2-4948-ab28-56eec1677e13@FreeBSD.org> <20250724191732.E8ADF54D@slippy.cwsent.com> From: John Baldwin In-Reply-To: <20250724191732.E8ADF54D@slippy.cwsent.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/24/25 15:17, Cy Schubert wrote: > In message , John Baldwin > wri > tes: >> On 7/23/25 10:00, John Baldwin wrote: >>> On 7/22/25 11:48, Cy Schubert wrote: >>>> The branch main has been updated by cy: >>>> >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=ae07a5805b1906f29e786f415d67b >> ef334557bd3 >>>> >>>> commit ae07a5805b1906f29e786f415d67bef334557bd3 >>>> Author: Cy Schubert >>>> AuthorDate: 2025-07-22 15:38:19 +0000 >>>> Commit: Cy Schubert >>>> CommitDate: 2025-07-22 15:48:40 +0000 >>>> >>>> krb5: Add version maps >>>> >>>> Shared objects must have version maps. These were copied from upstre >> am's >>>> *.exports files. >>>> >>>> Reminded by: kib >>>> Fixes: ee3960cba106 >>> >>> Hmmm, does this match the version files built by upstream's build? They >>> seem to use a different pattern for the version numbers in their build >>> glue and include a trailing HIDDEN annotation. > > This doesn't match upstream's versioning. That would cause the version > numbers to go backwards. I used the OpenSSL 1.1.1 update as the example. It > also mitigates any conflict between the MIT ports and base. > > Does this make sense? No, SHLIB_MAJORs and symbol versions are _not_ the same thing. It isn't clear to me why you need to use custom _symbol_ versions. Also, there isn't really a notion of the numbers going backwards. All the versions are just treated as strings without doing any numerical comparisons. The runtime loader doesn't decide to load libfoo.so.(N+1) instead of libfoo.so.N if it finds the N+1 version in the filesystem. The string "libfoo.so.N" is hardcoded in the binary's DT_NEEDED and the runtime loader only looks for that exact file. Similarly, symbol versions are just strings. We tend to follow a pattern to make it easier for the humans to parse, but there's no reason that the symbol versions need to have any relation at all between Heimdal and MIT. And in general, you could rename/rework all the versions of any library anytime you bump SHLIB_MAJOR. Symbol versions are only meaningful to handle ABI changes in a library while both the old and new libraries still have the same SHLIB_MAJOR. >>> binutils.versions: $(SHLIB_EXPORT_FILE) Makefile >>> base=`echo "$(LIBBASE)" | sed -e 's/-/_/'`; \ >>> echo > binutils.versions "$${base}_$(LIBMAJOR)_MIT {" >>> sed >> binutils.versions < $(SHLIB_EXPORT_FILE) "s/$$/;/" >>> echo >> binutils.versions "};" >>> echo >> binutils.versions "HIDDEN { local: __*; _rest*; _save*; * >> ; };" >>> >>> (SHLIB_EXPORT_FILE is the foo.exports file) >>> >>> Upstream only uses those for Linux but the binutils versions file is the >>> right format to use with both ld.bfd and lld. >>> >>> I also wonder if it would be better to use similar logic to generate these >>> files at build time? We have some other version maps we generate as build >>> artifacts rather than checking into the tree IIRC. >> >> While I appreciate that you committed a change, I do think it would be useful >> to answer the questions above. For example, why not generate the maps at >> runtime to reduce the chances they would get out of sync in future vendor >> imports? There are probably reasonable thoughts on both sides, but we should >> at least discuss them. >> >> Also, I echo requests from both Jessica and Kostik: please post patches for >> review. We have time before 15.0 so we can slow down a bit and use discussio >> n >> and review to arrive at the right changes going forward rather than a flurry >> of commits that keep fixing each other. > > Sure. > > What is the consensus then? Do we want to use upstream's DSO numbering or > our own, like we do with OpenSSL? I think there are several orthogonal questions: 1) Do we want to use upstream symbol versioning maps with upstream symbol versions? 2) If yes to 1, do we check in those maps and rely on updating the maps as part of each vendor import, or do we generate the maps from the exports files during the build in .OBJDIR as part of each build? 3) Which SHLIB_MAJOR (_not_ the same thing as the versions used in version maps) should the libraries use? I think we can ignore the current bumpiness of this week, but we need to ensure that any shared library with the same filename as Heimdal is using a different SHLIB_MAJOR for MIT. If you already bumped from .9 or whatever to .121 then that's probably fine and I don't think we need another bump on main. The people that upgraded world this week just need to ensure they have rebuilt to the latest once we've settled what the questions are. The main end goal is that we need to ensure we do not break the ABI for upgrades from 14.x (or even people who are on 15 from last week and still have heimdal) rather than people who upgraded during this week's chaos. This does mean that OptionalObsoleteFiles.inc should be listing all of the heimdal libraries effectively? There shouldn't be any libraries whose name and SHLIB_MAJOR are the same between Heimdal and MIT? Note that adding symbol versioning normally counts as its own ABI break and generally requires bumping SHLIB_MAJOR, but we can roll that all into the switch to MIT and just pretend like the versions were enabled from the beginning. A separate question though is if the SHLIB_MAJOR from base should match what is installed from ports. OpenSSL is a probably a good reference case here, and we may want to follow the model it uses. I can't recall if we purposely use the same SHLIB_MAJOR in base as ports for the same OpenSSL versions or if we use a different SHLIB_MAJOR. It looks like we use different versions (e.g. /usr/lib/libssl.so.3 in base vs libssl.so.12 for security/openssl in ports). I'm not sure what we expect the behavior to be for users on 15 and kerberos in ports. Do we expect some users to use MIT kerberos from ports? If so, should that library override the base system libraries even for base system applications? OpenSSL seems to be following a model where base system components always use the base system OpenSSL, but ports can choose to use a ports OpenSSL instead of the base system OpenSSL. However, for that to work, the ports OpenSSL has to use a different SHLIB_MAJOR so the runtime loader doesn't just use the base system OpenSSL instead for ports linked against the ports OpenSSL. -- John Baldwin From nobody Thu Jul 24 19:56:09 2025 X-Original-To: dev-commits-src-all@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 4bp1wC0SVMz636SQ; Thu, 24 Jul 2025 19:56:11 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp1wB4mL9z461C; Thu, 24 Jul 2025 19:56:10 +0000 (UTC) (envelope-from kevans@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753386970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FQFysw9IDW6P89zx9YB0OebYXFRRDGZPykUUX4NZkyc=; b=N30mYl1kXlh6itS/IRtbZM6SZiobcfic9+LlFi6+1Ux9pxhBizLARxklYKa8GVmsbm5ztj oYmTRDjMhIUm26IZtK6BKKt0Vaq/dXa8Pfq8Ru8lx02XzXiyIk8yKXAQrs/vQQLITrdB2V oVBFvRBl6WzALw4m6wjdGjlevVLECx2nppgibcmaoOtYnCxwBLK2N0KUayfycIZxaCHIcw PWfdDgHMKjoJw8aH6yOrqKX2+C+nJviD2cF+mgnCqddsBdVY0neCgDSiRyRx58IzatsL9o 9ePZFvHKU8aoSPwWIkwpZV2rGK0KKONmfadrIc4PJbWEiVlddJPhiqMwVUpkQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753386970; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=FQFysw9IDW6P89zx9YB0OebYXFRRDGZPykUUX4NZkyc=; b=lrOowCUvcY/sgajmaYTInL6xQkL5i/q8wRrp9PmS3rA1PcilSzSZWsQFsEoWHITyUADXrf k4a5CjkxVV2iVoCcFwoPJXaGElAs+Az5MQK0lr33A5AWr84Jg/57e7S8q8vA4VBD/KE4YD T2NhfiCbLZj0n1Q5yAc+ZA/sspCQOFDr2yH19doJ0xzivRhAVClrH0YR+F7PwoujF+Aan0 MgHqAnMu2SkLtPMY6euean5Qq+Wyk9GZmDL+I5QH4LTyb92PVPCK/tjHJ2hmQ/0QfMJTR8 4HU1k+Ly+oXYunZ1ghnLsDZlq0CQEXJlpP7DdNej6FdszLFR25AMQCXmn0a8ZQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753386970; a=rsa-sha256; cv=none; b=g1r+Fri26abRzpuCzlrHWq95oxD2Kko2ipy1mnXt7OaM0445GhynSTDqEIUSpNhysaYLxc SfkMPum/J83iSTnZ1FGCm1djBzzG8MZnyLlW5JaC5PKZ79F6mXIFryXvIygRRN0isXOUnG TV3WCkWyP+Tgf3GBmu1ez99HNlriWTBqjjJJYjtCaeKwNAppIUsmu5gQacwugm36wzpiZI pVthgCxbsEmCXdVKey90LXLQq4wlkwMsH31yn/nI0lMIGJCRFw8l2fUTNfRe80u4dSAEet LKF80cyllFuX65Wv0HWDuUWhLrMH1S8Wf23vxE7KAqkSF2RGFveiemkQiBi3Fw== Received: from [10.9.4.95] (unknown [209.182.120.176]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: kevans/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4bp1wB1WYCz19rl; Thu, 24 Jul 2025 19:56:10 +0000 (UTC) (envelope-from kevans@FreeBSD.org) Message-ID: <8200b60d-fcf9-431f-a417-7c0865feefd3@FreeBSD.org> Date: Thu, 24 Jul 2025 14:56:09 -0500 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 962876cc24ee - main - UPDATING: Note the Kerberos package rename (c7da9fb90b0b) To: Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <202507241824.56OIO88s005888@gitrepo.freebsd.org> <20250724190526.2F85A642@slippy.cwsent.com> <20250724193611.5FEAB54F@slippy.cwsent.com> Content-Language: en-US From: Kyle Evans In-Reply-To: <20250724193611.5FEAB54F@slippy.cwsent.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 7/24/25 14:36, Cy Schubert wrote: > In message , Lexi Winter writes: >> >> >> --/cJljwJYtPl3uHOB >> Content-Type: text/plain; charset=us-ascii >> Content-Disposition: inline >> Content-Transfer-Encoding: quoted-printable >> >> hi Cy, >> >> Cy Schubert: >>> In message <202507241824.56OIO88s005888@gitrepo.freebsd.org>, Lexi Winter= >> =20 >>> writes: >>>> UPDATING: Note the Kerberos package rename (c7da9fb90b0b) >> =20 >>> Shouldn't this be the other way around? Heimdal is FreeBSD-kerberos while= >> =20 >>> MIT is FreeBSD-krb5. I objected to the name change because it could cause= >> =20 >>> people to assume they were one in the same. >> >> although i understand you objected to D51420, i landed it anyway[0] >> which means the packages are back to their old names and there are >> no more FreeBSD-krb5* packages. >> >> let me explain why i did this: >> >> - the change to the package names caused friction both inside the >> project (e.g., it broke the OCI build scripts) and outside the >> project (according to reports i received from downstream users). >> >> - it was not clear there is any advantage to renaming the packages. >> >> - due to above i was specifically asked to land this commit by several >> people, including a pkgbase maintainer, and one of my mentors at the >> time. >> >> - i considered this a reasonable course of action because this restored >> the previous status quo and undid a change that (as far as i'm aware) >> hadn't been reviewed by #pkgbase, so in case of doubt, i erred on the >> side of restoring the previous behaviour. >> >> i apologise for reverting your code over your stated objections but now >> that we are back to the previous behaviour, we can discuss whether to >> rename these packages, which i suggest doing via a Phabricator review >> that includes #pkgbase. > > No offense taken. I'm ok if those using the packages understand fully. > > Do people want /usr/src/krb5 renamed to /usr/src/kerberos5 when Heimdal is > removed? I'm open to this. > IMO it's fine to stay where it is; krb5 is a designation given to it elsewhere (upstream?), not just a FreeBSD-ism. If it were hard to recognize what that may be for someone familiar with Kerberos implementations it'd be more tempting to move it. I do think we should add a note to ^/README.md with a short description of the krb5/ directory, though. Thanks, Kyle Evans From nobody Thu Jul 24 20:03:43 2025 X-Original-To: dev-commits-src-all@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 4bp24w2KH5z6372Z; Thu, 24 Jul 2025 20:03:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp24w0Z8qz49td; Thu, 24 Jul 2025 20:03:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753387424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uaDxeaPBgtfoLZSCiD9lDWFxu8u+2bJnI3zg19aJwaE=; b=cuzDLd7I/KWGyd+izq01iX0hWAEwraNowSMYhGdE69B1TjEHX3d8OE7vfm3+id3HATkPBD ZdQgcOh8ACxjEOGiizE2xcPGz4VM+lgpKfpj3cTMy5CB96QozIcvhAnO62CZ/zvKQd769H 5sCBZv2c67TaCxcbBRssircinA9xCK0fzJ0pPBUQaABoYCP0nbRA3FCALmKk0jk2bSGblB HoqZDzFhHEOllqihiKDHhK85aWZfdIiupI3mzTK6D7l56Iq1YWMDpzmhOA76diQ7kGIhBX tjeCCDGaXqGbwmD8wSD2uefQuD9K2AtDHgZrJux924HZF7Sfd17LV6d87+CbFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753387424; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uaDxeaPBgtfoLZSCiD9lDWFxu8u+2bJnI3zg19aJwaE=; b=C0huHt+HF/9qV9Ri+aXSYTWHm8Jk9cmvVN0sA9l4pKQJ/iU4ygXhCp+T+aRFDRD2MhwsRt gjN4OXnvjNSi1aE+pP+KfLARS3O0EYCHrJIqJ/4tD2dypA65rmakdE34ZQVzyBfZDBdrmk bJYc3wIs5v5AkUSu2bPSFuqCilc3qKeOYUZPgXAgIEA5w9p8Mib90BBqmZg7bKklqUOSxW pd+O+RPqxcu6aRMaxAWZollGP+z4WFP/pg/AbPFj0J0VTl05i8NVH+0DQM5E0qKCkMTL0a IOBTxgxwsdFpuQvO8a8rJmg8WrtpqIe9oYGxqrNo7jLH8mpT4/03pKa2WTxpYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753387424; a=rsa-sha256; cv=none; b=qCHm+sESCm+vdj0LKDIF2QvfVFXgePK21ZRJQX8Qs+8KaGyVG+7MEjrYnUj+VoF80hTuMZ 7skZ0ILWZPqTuxjcXVxAy4nAH9FMgS49ugEzBdEwoRY2ZeQnBvzpOvdoHoMuV5ISjlJA7D z5E80Qr2CDpr8249ohMqUV0pF5m+EBxRYrbHf82K6E+dz5fbzJQClUkzF/IdFakBk7aC/6 iXkxUZ0Zzm3atFzgh/AYpRnEayFnc9AnCPfJybNUs6+c7EkESSlz2nFgk51mxT75VQV0Z2 7YMzlEJ7dTZXZF5ywQoM/Fkw8IkxJFe6Lcq4jLzzYl0nOZfNe4b57jTBagpvNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bp24w0B02z1C41; Thu, 24 Jul 2025 20:03:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OK3hJ3092841; Thu, 24 Jul 2025 20:03:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OK3h4Y092838; Thu, 24 Jul 2025 20:03:43 GMT (envelope-from git) Date: Thu, 24 Jul 2025 20:03:43 GMT Message-Id: <202507242003.56OK3h4Y092838@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 10fb5e7117e5 - main - tests/ci: Fix race condition with ci-extractmeta List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 10fb5e7117e522540167fa02692e1e7b8e38eec0 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=10fb5e7117e522540167fa02692e1e7b8e38eec0 commit 10fb5e7117e522540167fa02692e1e7b8e38eec0 Author: Siva Mahadevan AuthorDate: 2025-07-24 20:01:50 +0000 Commit: Li-Wen Hsu CommitDate: 2025-07-24 20:01:50 +0000 tests/ci: Fix race condition with ci-extractmeta This solves an issue where 'ci-extractmeta' runs in parallel with 'ci-runtest', which would extract an empty test result into the final test reports output dir. This also cleans up the intermediate temporary files created along the way. Signed-off-by: Siva Mahadevan Reviewed by: emaste, lwhsu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51363 --- tests/ci/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/ci/Makefile b/tests/ci/Makefile index b8797e06ac75..ac7faff3afae 100644 --- a/tests/ci/Makefile +++ b/tests/ci/Makefile @@ -205,6 +205,7 @@ ci-create-meta: .PHONY ci-extract-meta: .PHONY tar xfv ${META_TAR} -C ${META_DIROUT} + rm -rf ${META_TAR} ${META_DIR} @echo "Extracted kyua reports to ${META_DIROUT}" ci-runtest: ci-buildimage-${TARGET_ARCH:tl} portinstall .PHONY @@ -254,7 +255,7 @@ ci-checktarget: .PHONY ci-smoke: ci-set-smoke-var ci-create-meta ci-checktarget .WAIT ci-runtest-${TARGET_ARCH:tl} .PHONY -ci-full: ci-set-full-var ci-create-meta ci-checktarget .WAIT ci-runtest-${TARGET_ARCH:tl} ci-extract-meta .PHONY +ci-full: ci-set-full-var ci-create-meta ci-checktarget .WAIT ci-runtest-${TARGET_ARCH:tl} .WAIT ci-extract-meta .PHONY ci: ci-${CITYPE:tl} .PHONY From nobody Thu Jul 24 20:06:37 2025 X-Original-To: dev-commits-src-all@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 4bp28G3YYLz6373L; Thu, 24 Jul 2025 20:06: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp28G0ltFz3DDH; Thu, 24 Jul 2025 20:06:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753387598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qRaHZfdd7FISlSIPklWamhXwVoRVWbtM5ts09hNTUlo=; b=coebCi39EHEWIvLOdVXUGhUOt5JZVNzJ72epNNmdu7o7WF1+AMT2b5dus20PuJ1j9mveIL On7QRDYamektvM4oLaTxSutTpyG3hEVnJpdAFlfB7P5UCp3T2AwfpxKEBbx/iG7ukbEr2R QkXWaVd8OjrmIggTUmgpISEqwSq+VaNPn3VOq7PW7//zMiQU3TViEJZtK34Sb2ruYXrziI ORp+DTP907T3YAlwC1+qRJ3MW2WiW8qGxplEBAyOFLnKT8d+F6TtXyri/tfSJpSUVUGCLd IebbI4Hu7vXLSp/diC1nA1Zd5leL4qjZucJWPl8J9HLThQasVlHHc9HSm7ND2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753387598; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qRaHZfdd7FISlSIPklWamhXwVoRVWbtM5ts09hNTUlo=; b=nNGeEl2N8WCq76MtOOiZy2bU51ApakOOsPt2qH9/iqXEL2K0zdLzeW6A7esx86ftWLJbyJ 6G9qMMfeT/1DpZ26d3pxpgsxyUFBykd04e583p6N7CsJ1oft1KCjXLMHpx5CNUuIYKFSn/ CIS04CP+eIO2RfLwpmRPUfImQLWkbrkV5T0gj/gUUeMLmIyJqtSViPVeG3P4q1t5UJiMTz yurCUV+ruuBDUhFhuVtMcf7oUH1VOcxX1ykTznrbndo/NztNqEYC3naFZGIkj0T5YoN6V9 otdKQBFPLhpa+Zuw1ZKbVcioTYBA+3bZ3Z3D4n8v2pUfqM4PigJ2P8DEp82nHw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753387598; a=rsa-sha256; cv=none; b=CCxBcMPODO0XFaTJwdhfHRMSSKWB74Aw80ZDwG0FAflW4zMh0Ek5SenUcBmITWlR+So5zM a+uTFsn1Om+toeLsz+LLE2vxhjshBo1/oCZmpnX4tbCovLRqXomP1y4KlQlbRkh3+2naJZ 1BBKsx+aCVpgczQE322oYD7sZOTMIWznB6UG9Cg4O+egxrGF4ES/DbfWRjtPEeef6ysrrt BRxXhBAFb9LLlawsO2d1jVLglP+gDEVmZ+xAfVQvZo1vX2jdhbE40RuncpaA9JAHWa3njm xvH6zV9dMNGbBfzVPdelWJZ9ucG+i1YoKTEDRJjzUl7hhAySUu0fBrYkGV0SUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bp28G0KJHz1BR0; Thu, 24 Jul 2025 20:06:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OK6bIa093677; Thu, 24 Jul 2025 20:06:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OK6bSq093674; Thu, 24 Jul 2025 20:06:37 GMT (envelope-from git) Date: Thu, 24 Jul 2025 20:06:37 GMT Message-Id: <202507242006.56OK6bSq093674@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 6a41fd466701 - main - top.1: Fix incorrect default value for -s option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ziaee X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6a41fd466701db71da443e1b87b31d463d99d056 Auto-Submitted: auto-generated The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=6a41fd466701db71da443e1b87b31d463d99d056 commit 6a41fd466701db71da443e1b87b31d463d99d056 Author: Artem Bunichev AuthorDate: 2025-07-24 20:03:34 +0000 Commit: Alexander Ziaee CommitDate: 2025-07-24 20:06:21 +0000 top.1: Fix incorrect default value for -s option The default delay between screen updates was incorrectly transfered from roff(7) register that was used in previous version of man page. Reviewed by: ziaee Fixes: 9d6cce02a78c (initial pass to freebsdize) Differential Revision: https://reviews.freebsd.org/D51503 --- usr.bin/top/top.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.bin/top/top.1 b/usr.bin/top/top.1 index 53b078839526..9b1860246de9 100644 --- a/usr.bin/top/top.1 +++ b/usr.bin/top/top.1 @@ -189,7 +189,7 @@ This option makes them visible. Set the delay between screen updates to .Ar time seconds, which may be fractional. -The default delay between updates is 1 second. +The default delay between updates is 2 seconds. .It Fl T Toggle displaying thread ID (tid) instead of process id (pid). .It Fl t From nobody Thu Jul 24 20:07:47 2025 X-Original-To: dev-commits-src-all@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 4bp29f6LDzz6377x; Thu, 24 Jul 2025 20:07:50 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp29f3dVmz3FBZ; Thu, 24 Jul 2025 20:07:50 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4004a.ext.cloudfilter.net ([10.228.9.227]) by cmsmtp with ESMTPS id eyaXuw0uv5Mqyf2EHu0eCH; Thu, 24 Jul 2025 20:07:49 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id f2EGu6DgoJhBPf2EGuoldV; Thu, 24 Jul 2025 20:07:49 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=QY3Fvdbv c=1 sm=1 tr=0 ts=68829295 a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=Wb1JkmetP80A:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=CbypWpSP8IqaBM0Grl4A:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 49E5A105A; Thu, 24 Jul 2025 13:07:47 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id 4403F554; Thu, 24 Jul 2025 13:07:47 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: John Baldwin cc: Cy Schubert , Cy Schubert , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: ae07a5805b19 - main - krb5: Add version maps In-reply-to: References: <202507221548.56MFmoo2060272@gitrepo.freebsd.org> <7d7427f3-16c2-4948-ab28-56eec1677e13@FreeBSD.org> <20250724191732.E8ADF54D@slippy.cwsent.com> Comments: In-reply-to John Baldwin message dated "Thu, 24 Jul 2025 15:43:21 -0400." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 24 Jul 2025 13:07:47 -0700 Message-Id: <20250724200747.4403F554@slippy.cwsent.com> X-CMAE-Envelope: MS4xfBZcgh4R1lHF4R9K1mHxab8h74ao8nr1URUThyEPPrLvIv/qMNX/cTxyTZxrC3kduMVii8bupgB1qdq96xqZLMHESTEp48A03iGC0k7QUBWGWOoaUv75 EGwKTKVenjanerppJ/60Gbdinrknew/Z9dBFoHrjZZLLlPupoSmhZWLy2N8cls6+kb2oLHprCi+78TtRn4gjUAXQmOq4F5HFRQBrqbZLP2YhR6Rj0peo3TJP S0AiNZcGvLz+8j/I398idaRMeT6YCh1o1FOiVSiyJKgsJZOMrj96zQF6ggmqctNExwTE+pvzu9+XQiP6HED4FSzmG66M6iiSGwrRnCTB0N0LFNUlI+Lb0JWb 74S5DxpP X-Rspamd-Queue-Id: 4bp29f3dVmz3FBZ 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:16509, ipnet:3.96.0.0/15, country:US] In message , John Baldwin wri tes: > On 7/24/25 15:17, Cy Schubert wrote: > > In message , John Baldwin > > wri > > tes: > >> On 7/23/25 10:00, John Baldwin wrote: > >>> On 7/22/25 11:48, Cy Schubert wrote: > >>>> The branch main has been updated by cy: > >>>> > >>>> URL: https://cgit.FreeBSD.org/src/commit/?id=ae07a5805b1906f29e786f415d6 > 7b > >> ef334557bd3 > >>>> > >>>> commit ae07a5805b1906f29e786f415d67bef334557bd3 > >>>> Author: Cy Schubert > >>>> AuthorDate: 2025-07-22 15:38:19 +0000 > >>>> Commit: Cy Schubert > >>>> CommitDate: 2025-07-22 15:48:40 +0000 > >>>> > >>>> krb5: Add version maps > >>>> > >>>> Shared objects must have version maps. These were copied from ups > tre > >> am's > >>>> *.exports files. > >>>> > >>>> Reminded by: kib > >>>> Fixes: ee3960cba106 > >>> > >>> Hmmm, does this match the version files built by upstream's build? They > >>> seem to use a different pattern for the version numbers in their build > >>> glue and include a trailing HIDDEN annotation. > > > > This doesn't match upstream's versioning. That would cause the version > > numbers to go backwards. I used the OpenSSL 1.1.1 update as the example. It > > also mitigates any conflict between the MIT ports and base. > > > > Does this make sense? > > No, SHLIB_MAJORs and symbol versions are _not_ the same thing. It isn't clea > r > to me why you need to use custom _symbol_ versions. Also, there isn't really > a > notion of the numbers going backwards. All the versions are just treated as > strings without doing any numerical comparisons. The runtime loader doesn't > decide to load libfoo.so.(N+1) instead of libfoo.so.N if it finds the N+1 > version in the filesystem. The string "libfoo.so.N" is hardcoded in the > binary's DT_NEEDED and the runtime loader only looks for that exact file. > > Similarly, symbol versions are just strings. We tend to follow a pattern to > make it easier for the humans to parse, but there's no reason that the symbol > versions need to have any relation at all between Heimdal and MIT. And in ge > neral, > you could rename/rework all the versions of any library anytime you bump > SHLIB_MAJOR. Symbol versions are only meaningful to handle ABI changes in a > library while both the old and new libraries still have the same SHLIB_MAJOR. Noted. > > >>> binutils.versions: $(SHLIB_EXPORT_FILE) Makefile > >>> base=`echo "$(LIBBASE)" | sed -e 's/-/_/'`; \ > >>> echo > binutils.versions "$${base}_$(LIBMAJOR)_MIT {" > >>> sed >> binutils.versions < $(SHLIB_EXPORT_FILE) "s/$$/;/" > >>> echo >> binutils.versions "};" > >>> echo >> binutils.versions "HIDDEN { local: __*; _rest*; _save* > ; * > >> ; };" > >>> > >>> (SHLIB_EXPORT_FILE is the foo.exports file) > >>> > >>> Upstream only uses those for Linux but the binutils versions file is the > >>> right format to use with both ld.bfd and lld. > >>> > >>> I also wonder if it would be better to use similar logic to generate thes > e > >>> files at build time? We have some other version maps we generate as buil > d > >>> artifacts rather than checking into the tree IIRC. > >> > >> While I appreciate that you committed a change, I do think it would be use > ful > >> to answer the questions above. For example, why not generate the maps at > >> runtime to reduce the chances they would get out of sync in future vendor > >> imports? There are probably reasonable thoughts on both sides, but we sho > uld > >> at least discuss them. > >> > >> Also, I echo requests from both Jessica and Kostik: please post patches fo > r > >> review. We have time before 15.0 so we can slow down a bit and use discus > sio > >> n > >> and review to arrive at the right changes going forward rather than a flur > ry > >> of commits that keep fixing each other. > > > > Sure. > > > > What is the consensus then? Do we want to use upstream's DSO numbering or > > our own, like we do with OpenSSL? > > I think there are several orthogonal questions: > > 1) Do we want to use upstream symbol versioning maps with upstream symbol > versions? > > 2) If yes to 1, do we check in those maps and rely on updating the maps as > part of each vendor import, or do we generate the maps from the exports > files during the build in .OBJDIR as part of each build? Probably. But the input to the upstream scripts results in a duplication of symbols in libkrb5profile and libkrb5. Whatever we/I build will need to remove those. I have the crude beginnings of such a script here. Certainly not ready to share with anyone yet. > > 3) Which SHLIB_MAJOR (_not_ the same thing as the versions used in version > maps) should the libraries use? I think we can ignore the current bumpin > ess > of this week, but we need to ensure that any shared library with the > same filename as Heimdal is using a different SHLIB_MAJOR for MIT. If yo > u > already bumped from .9 or whatever to .121 then that's probably fine and > I don't think we need another bump on main. The people that upgraded wor > ld > this week just need to ensure they have rebuilt to the latest once we've > settled what the questions are. The main end goal is that we need to ens > ure > we do not break the ABI for upgrades from 14.x (or even people who are on > 15 from last week and still have heimdal) rather than people who upgraded > during this week's chaos. > > This does mean that OptionalObsoleteFiles.inc should be listing all of th > e > heimdal libraries effectively? There shouldn't be any libraries whose > name and SHLIB_MAJOR are the same between Heimdal and MIT? The libraries in OptionalObsoleteFiles.inc were versioned so there would be no overlap. The .121 version made that simpler. Note that when Heimdal is finally removed this complexity goes away. > > Note that adding symbol versioning normally counts as its own ABI break > and generally requires bumping SHLIB_MAJOR, but we can roll that all into > the switch to MIT and just pretend like the versions were enabled from > the beginning. Noted. > > A separate question though is if the SHLIB_MAJOR from base should match > what is installed from ports. OpenSSL is a probably a good reference > case here, and we may want to follow the model it uses. I can't recall i > f > we purposely use the same SHLIB_MAJOR in base as ports for the same > OpenSSL versions or if we use a different SHLIB_MAJOR. It looks like we > use different versions (e.g. /usr/lib/libssl.so.3 in base vs libssl.so.12 > for security/openssl in ports). I'm not sure what we expect the behavior > to be for users on 15 and kerberos in ports. Do we expect some users to > use MIT kerberos from ports? If so, should that library override the > base system libraries even for base system applications? OpenSSL seems t > o > be following a model where base system components always use the base > system OpenSSL, but ports can choose to use a ports OpenSSL instead of > the base system OpenSSL. However, for that to work, the ports OpenSSL > has to use a different SHLIB_MAJOR so the runtime loader doesn't just use > the base system OpenSSL instead for ports linked against the ports > OpenSSL. We do use a different version number in base and ports. The port uses 12 while base uses 30. > > -- > John Baldwin There were a lot of problems with the linking against the different Kerberos (MIT and Heimdal in ports and base) in the past. This was fixed ten or more years ago. People will still want to install the MIT port to host the KDC database using LDAP. One should be able to build OpenLDAP now with MIT in base, then build the MIT flavour in ports depending on OpenLDAP. -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Thu Jul 24 20:09:31 2025 X-Original-To: dev-commits-src-all@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 4bp2Cf0Zxmz63786; Thu, 24 Jul 2025 20:09:34 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Received: from omta004.cacentral1.a.cloudfilter.net (omta002.cacentral1.a.cloudfilter.net [3.97.99.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "Client", Issuer "CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp2Cd5yCHz3GMZ; Thu, 24 Jul 2025 20:09:33 +0000 (UTC) (envelope-from cy.schubert@cschubert.com) Authentication-Results: mx1.freebsd.org; none Received: from shw-obgw-4001a.ext.cloudfilter.net ([10.228.9.142]) by cmsmtp with ESMTPS id f29LuwDak5Mqyf2Fxu0iAt; Thu, 24 Jul 2025 20:09:33 +0000 Received: from spqr.komquats.com ([70.66.136.217]) by cmsmtp with ESMTPSA id f2FwuuJ8eWX70f2Fwu0Wz5; Thu, 24 Jul 2025 20:09:33 +0000 X-Auth-User: cschuber X-Authority-Analysis: v=2.4 cv=d71WygjE c=1 sm=1 tr=0 ts=688292fd a=h7br+8Ma+Xn9xscxy5znUg==:117 a=h7br+8Ma+Xn9xscxy5znUg==:17 a=kj9zAlcOel0A:10 a=Wb1JkmetP80A:10 a=6I5d2MoRAAAA:8 a=EkcXrb_YAAAA:8 a=YxBL1-UpAAAA:8 a=s6AfPRkKuVrWsxFoEGoA:9 a=CjuIK1q_8ugA:10 a=LK5xJRSDVpKd5WXXoEvA:22 a=Ia-lj3WSrqcvXOmTRaiG:22 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id D67BC10BB; Thu, 24 Jul 2025 13:09:31 -0700 (PDT) Received: by slippy.cwsent.com (Postfix, from userid 1000) id D118D784; Thu, 24 Jul 2025 13:09:31 -0700 (PDT) X-Mailer: exmh version 2.9.0 11/07/2018 with nmh-1.8+dev Reply-to: Cy Schubert From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.cschubert.com/ To: Kyle Evans cc: Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 962876cc24ee - main - UPDATING: Note the Kerberos package rename (c7da9fb90b0b) In-reply-to: <8200b60d-fcf9-431f-a417-7c0865feefd3@FreeBSD.org> References: <202507241824.56OIO88s005888@gitrepo.freebsd.org> <20250724190526.2F85A642@slippy.cwsent.com> <20250724193611.5FEAB54F@slippy.cwsent.com> <8200b60d-fcf9-431f-a417-7c0865feefd3@FreeBSD.org> Comments: In-reply-to Kyle Evans message dated "Thu, 24 Jul 2025 14:56:09 -0500." List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 24 Jul 2025 13:09:31 -0700 Message-Id: <20250724200931.D118D784@slippy.cwsent.com> X-CMAE-Envelope: MS4xfO++olcv3u/qlo2zB9yiBJ3Pb8LmlI0kfd/zmSMq4C9T3Z3H3mhIJ6fqSBGvGyAH5ay6CXwtOj5sPbrWj3uZED5QvklviZxtT1UmaLUEtCcLdD/0B7xx C5GdWtjD2SeLqPEtSvSZuwe2n2LzCC7PCqKrgpfcUAve6taQ+eV3FFI+z5YgdO6aBYmVpUR4p6Pvw36Hhal3tYFtBfxsiL9F/GAPkMNq+fOZuKcfaBR7cwaK SOBX4WAG1Fv84jsMeta4pHnYV+9GbxW2JIK9FGKFseNNtovkY4AnppSueJKjlUwvv8DSRhv1z+z6bkXRliqXWAdYP8NY1HQDHtzJ8WF+nAs= X-Rspamd-Queue-Id: 4bp2Cd5yCHz3GMZ 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:16509, ipnet:3.96.0.0/15, country:US] In message <8200b60d-fcf9-431f-a417-7c0865feefd3@FreeBSD.org>, Kyle Evans write s: > On 7/24/25 14:36, Cy Schubert wrote: > > In message , Lexi Winter writes: > >> > >> > >> --/cJljwJYtPl3uHOB > >> Content-Type: text/plain; charset=us-ascii > >> Content-Disposition: inline > >> Content-Transfer-Encoding: quoted-printable > >> > >> hi Cy, > >> > >> Cy Schubert: > >>> In message <202507241824.56OIO88s005888@gitrepo.freebsd.org>, Lexi Winter > = > >> =20 > >>> writes: > >>>> UPDATING: Note the Kerberos package rename (c7da9fb90b0b) > >> =20 > >>> Shouldn't this be the other way around? Heimdal is FreeBSD-kerberos while > = > >> =20 > >>> MIT is FreeBSD-krb5. I objected to the name change because it could cause > = > >> =20 > >>> people to assume they were one in the same. > >> > >> although i understand you objected to D51420, i landed it anyway[0] > >> which means the packages are back to their old names and there are > >> no more FreeBSD-krb5* packages. > >> > >> let me explain why i did this: > >> > >> - the change to the package names caused friction both inside the > >> project (e.g., it broke the OCI build scripts) and outside the > >> project (according to reports i received from downstream users). > >> > >> - it was not clear there is any advantage to renaming the packages. > >> > >> - due to above i was specifically asked to land this commit by several > >> people, including a pkgbase maintainer, and one of my mentors at the > >> time. > >> > >> - i considered this a reasonable course of action because this restored > >> the previous status quo and undid a change that (as far as i'm aware) > >> hadn't been reviewed by #pkgbase, so in case of doubt, i erred on the > >> side of restoring the previous behaviour. > >> > >> i apologise for reverting your code over your stated objections but now > >> that we are back to the previous behaviour, we can discuss whether to > >> rename these packages, which i suggest doing via a Phabricator review > >> that includes #pkgbase. > > > > No offense taken. I'm ok if those using the packages understand fully. > > > > Do people want /usr/src/krb5 renamed to /usr/src/kerberos5 when Heimdal is > > removed? I'm open to this. > > > IMO it's fine to stay where it is; krb5 is a designation given to it > elsewhere (upstream?), not just a FreeBSD-ism. If it were hard to > recognize what that may be for someone familiar with Kerberos > implementations it'd be more tempting to move it. > > I do think we should add a note to ^/README.md with a short description > of the krb5/ directory, though. This is a good idea. > > Thanks, > > Kyle Evans -- Cheers, Cy Schubert FreeBSD UNIX: Web: https://FreeBSD.org NTP: Web: https://nwtime.org e**(i*pi)+1=0 From nobody Thu Jul 24 20:13:08 2025 X-Original-To: dev-commits-src-all@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 4bp2Hm5BQLz637Wb; Thu, 24 Jul 2025 20:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp2Hm4LjDz3KRY; Thu, 24 Jul 2025 20:13:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753387988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Iszg4UM4Ysp9BFsjb01LPa1D18R1iblryI1s4f5AXBY=; b=ErpSE0w83gFAIp3lXjTHrcmVY16mIKxS9WjLKtxBtE+Ck2Qx2bB4hgkUYyH/lWkswcs44X d/CBGO7yFG2VFCd5fuqMkC2SBM2SseOJr8aayZd0viHXvI0yZGM5qToLKK+SS5b9VEmZf4 nD2SpCvkwrl5myMYE4aFyFdOD9u/mjTCnkwrTcXJ1tTuZfsbFo4hHKO5CJC34yyvIGdwgU UMQUtXmzlUnS4Em6iZkVuF1PceJQSVx3UhBnXcfdAIYlcScsJ/tMAmvXAkZm7A2947+Lrx doHwguZItLvXr95eeQz3p+08qFCcrOW+z9cDL7DxDbo1OO1LFwy/wqf382n5qg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753387988; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Iszg4UM4Ysp9BFsjb01LPa1D18R1iblryI1s4f5AXBY=; b=thh4ZWQASYpEyS5ZIloqtFyT928GlBZXRoG3a/eDadvZTO11nI0B5OaPoanx+koKMu2Etv LEyctHCbFMOvqjdWk7YI/38v5ypes/uhOJ1mL79GDYsZrRdXizhsby1Xw++n4oCYBZFfdI /y9Ul2opUdcdieohkwfRZh+IRWU92Zk1oNxWGHDF2HKSmQHSmns7u92NiQe16zTqGxdk7l x65HScsXfW/8SqZpf8i3zqpT3iWs4PEx32D1pMhrYhp6jYFyfY7XSVonIYVvxfM7Gd8dER eEIFCOzRDuo4whnoFdR5hu1IFwFMdpBIlR3K9CBNCR9zY+hts1Oz0q5nixl87A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753387988; a=rsa-sha256; cv=none; b=viMxOYUcyw5PeTrOXZwA/GFYayIyWhmZv2x/NQXzl6MHgoXMRld9AaAgooxAQZy8POnhE0 HkIjQp0UtbzGJ2FDVEWa1PbNN2BJldldB5QgxaH/Oi3/uVi45imBxArGA/8YwAlyTFrfG0 kliu8RK6vzyxJwjbcYOREJDtk3xwReKoOd8h6wfVTnNrQiNNP4II8l63Ygw0iaDSgqTrJJ zJY1vwtQSIqISPx4Fsk+MYRmBXp7uRpZsBKhYTrqkOhYdIp8KyrE7reVjWyZMk7jQRAQ8P ktoKrPmuzXwyY9Eb/bJtNn6ZUleWLiGoV8yQPHaBm8XneoYto0aQZ4Y31fbCZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bp2Hm3s6tz1Cgc; Thu, 24 Jul 2025 20:13:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OKD8bH012141; Thu, 24 Jul 2025 20:13:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OKD84K012138; Thu, 24 Jul 2025 20:13:08 GMT (envelope-from git) Date: Thu, 24 Jul 2025 20:13:08 GMT Message-Id: <202507242013.56OKD84K012138@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 66fe805070d1 - main - tests/ci: Fix wrong chflags target path in 'beforeclean' target List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 66fe805070d121d4b93f63b7b02a70d76069edfc Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=66fe805070d121d4b93f63b7b02a70d76069edfc commit 66fe805070d121d4b93f63b7b02a70d76069edfc Author: Siva Mahadevan AuthorDate: 2025-07-24 20:11:18 +0000 Commit: Li-Wen Hsu CommitDate: 2025-07-24 20:12:53 +0000 tests/ci: Fix wrong chflags target path in 'beforeclean' target Signed-off-by: Siva Mahadevan Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51304 --- tests/ci/Makefile | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/tests/ci/Makefile b/tests/ci/Makefile index ac7faff3afae..964664cbfbb9 100644 --- a/tests/ci/Makefile +++ b/tests/ci/Makefile @@ -134,7 +134,8 @@ METAMODE?=-DWITH_META_MODE .endif CLEANFILES+= ${.OBJDIR}/${CIIMAGE} ${.OBJDIR}/ci.img ${META_TAR} -CLEANDIRS+= ${.OBJDIR}/ci-buildimage +IMAGEDIR= ${.OBJDIR}/ci-buildimage +CLEANDIRS+= ${IMAGEDIR} portinstall: portinstall-pkg portinstall-qemu portinstall-expect portinstall-${TARGET_ARCH:tl} .PHONY @@ -157,7 +158,7 @@ portinstall-expect: portinstall-pkg .PHONY .endif beforeclean: .PHONY - chflags -R noschg ${.OBJDIR}/${.TARGET} + chflags -R noschg ${IMAGEDIR} .include clean: beforeclean .PHONY From nobody Thu Jul 24 20:28:18 2025 X-Original-To: dev-commits-src-all@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 4bp2dH1pyxz6381y; Thu, 24 Jul 2025 20:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp2dG6srZz3XKM; Thu, 24 Jul 2025 20: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=1753388899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ltOelwswXQjZQCdp1cLgKrz8mzEpvwC/YCcOXRLnF3c=; b=Xmi0Uk71+wouDUUT+xzz2nFCYhwjdBjvH2cQQZ3wNTo5sWDV81+avoxUtkF+YPbgumzG+7 l5Oequo7+mGJnBlOda65BxVgUaOw+mpi2//zQgGVI3FvYut4dppQD9NSqxHMi0tmXFHgUG TN+rya2R1N6oHjsf5fnhmT7vksbqlBoVhmZcyd0LxTt6FnytYn0+4Sgo4kHq3BBnC1uP7F DSkCCJ9prZtSnaPiDJZNCzLIAGJEzCSoEN3tqqBPEgtU4tazknSXRAv6lI252shlOX9GbF MInhyH4TiT8OaLZ3vxdVi5Y6+7FHRJ9Atrd50PqUBVDxjDloa0cygroPV0tc8g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753388899; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ltOelwswXQjZQCdp1cLgKrz8mzEpvwC/YCcOXRLnF3c=; b=GZJs4kcmXe5ZG3UxszeSMBKHWFeCfhLjRDPYjSz3AhfOhNbQrqtygToLH65fMGL/hg3Ag0 02Ne7kuE0ojrh7nEF8ybrbZptHcrBKdEiQXPdG/lzQX5OhZJpmlCDSTSw95LvtiNVko4vS n9yhWFc6WRi4hgpVEGCbLRyCsYMajC0xXT9LFqMHdrxtWxV6vXxg+c5Rqtwxo6i48kKIeh VymVgoIvhrhdlYjJmnZExAJfZGl5IcyTGNxdN4ITBXumrcVofRra+C8QBYTXckoKruN8Fw nOeiNPSSxAzm9eHuDk4rk+cxpkhPjrweWlGv3X4RQsHFA+DX57r0xY0nrWg2EQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753388899; a=rsa-sha256; cv=none; b=uwL3nrqPZhXB0QAPJIYjHonp4Agh6Lq6vrS5vFblUzGcKln17ePNpd+TJStzztgEjCn5PA R6yXsLCmNXVJAoSgT5evb6M56N6gtZzLDgk70E027Te4SOVh4GbQ3NBNgTx6QQ0xvR4DUb 4aaBE864Nb+qyivG5bdtNvBIRLA08ON/7eVnfmQietvxfjam7VJUtNLlrkGZqBH73AOPl7 QokYEfOCc1n/ZfvKPa2V9LQ3t9jVIQwsJkJoQg914sfc8gDa2rCRJxTGWXQuqV4tKBYRaf 6sDMKXAxxGWw+RF9PRhckcK9KSLau6gKjspDGBGzHbfAFLo7Y01wsolf1z/0CA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bp2dG6PNxz1CcB; Thu, 24 Jul 2025 20:28:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OKSInI032251; Thu, 24 Jul 2025 20:28:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OKSIkE032249; Thu, 24 Jul 2025 20:28:18 GMT (envelope-from git) Date: Thu, 24 Jul 2025 20:28:18 GMT Message-Id: <202507242028.56OKSIkE032249@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: df88c711a26c - main - cap_net/net_test: require 'allow_network_access' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: df88c711a26c04192761e96dc08a6f3f9e42afed Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=df88c711a26c04192761e96dc08a6f3f9e42afed commit df88c711a26c04192761e96dc08a6f3f9e42afed Author: Siva Mahadevan AuthorDate: 2025-07-18 13:20:19 +0000 Commit: Li-Wen Hsu CommitDate: 2025-07-24 20:25:47 +0000 cap_net/net_test: require 'allow_network_access' Signed-off-by: Siva Mahadevan Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1779 --- lib/libcasper/services/cap_net/tests/net_test.c | 168 ++++++++++++++++++++---- 1 file changed, 140 insertions(+), 28 deletions(-) diff --git a/lib/libcasper/services/cap_net/tests/net_test.c b/lib/libcasper/services/cap_net/tests/net_test.c index e1045341fe47..adf5773233c8 100644 --- a/lib/libcasper/services/cap_net/tests/net_test.c +++ b/lib/libcasper/services/cap_net/tests/net_test.c @@ -331,7 +331,11 @@ test_extend_mode(cap_channel_t *capnet, int current) } } -ATF_TC_WITHOUT_HEAD(capnet__getnameinfo); +ATF_TC(capnet__getnameinfo); +ATF_TC_HEAD(capnet__getnameinfo, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__getnameinfo, tc) { cap_channel_t *capnet; @@ -344,7 +348,11 @@ ATF_TC_BODY(capnet__getnameinfo, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__connect); +ATF_TC(capnet__connect); +ATF_TC_HEAD(capnet__connect, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__connect, tc) { cap_channel_t *capnet; @@ -356,7 +364,11 @@ ATF_TC_BODY(capnet__connect, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__bind); +ATF_TC(capnet__bind); +ATF_TC_HEAD(capnet__bind, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__bind, tc) { cap_channel_t *capnet; @@ -368,7 +380,11 @@ ATF_TC_BODY(capnet__bind, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__getaddrinfo); +ATF_TC(capnet__getaddrinfo); +ATF_TC_HEAD(capnet__getaddrinfo, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__getaddrinfo, tc) { cap_channel_t *capnet; @@ -386,7 +402,11 @@ ATF_TC_BODY(capnet__getaddrinfo, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__gethostbyname); +ATF_TC(capnet__gethostbyname); +ATF_TC_HEAD(capnet__gethostbyname, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__gethostbyname, tc) { cap_channel_t *capnet; @@ -398,7 +418,11 @@ ATF_TC_BODY(capnet__gethostbyname, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__gethostbyaddr); +ATF_TC(capnet__gethostbyaddr); +ATF_TC_HEAD(capnet__gethostbyaddr, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__gethostbyaddr, tc) { cap_channel_t *capnet; @@ -411,7 +435,11 @@ ATF_TC_BODY(capnet__gethostbyaddr, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__getnameinfo_buffer); +ATF_TC(capnet__getnameinfo_buffer); +ATF_TC_HEAD(capnet__getnameinfo_buffer, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__getnameinfo_buffer, tc) { cap_channel_t *chan; @@ -450,7 +478,11 @@ ATF_TC_BODY(capnet__getnameinfo_buffer, tc) cap_close(chan); } -ATF_TC_WITHOUT_HEAD(capnet__limits_addr2name_mode); +ATF_TC(capnet__limits_addr2name_mode); +ATF_TC_HEAD(capnet__limits_addr2name_mode, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_addr2name_mode, tc) { cap_channel_t *capnet; @@ -481,7 +513,11 @@ ATF_TC_BODY(capnet__limits_addr2name_mode, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_addr2name_family); +ATF_TC(capnet__limits_addr2name_family); +ATF_TC_HEAD(capnet__limits_addr2name_family, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_addr2name_family, tc) { cap_channel_t *capnet; @@ -526,7 +562,11 @@ ATF_TC_BODY(capnet__limits_addr2name_family, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_addr2name); +ATF_TC(capnet__limits_addr2name); +ATF_TC_HEAD(capnet__limits_addr2name, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_addr2name, tc) { cap_channel_t *capnet; @@ -580,7 +620,11 @@ ATF_TC_BODY(capnet__limits_addr2name, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_deprecated_addr2name_mode); +ATF_TC(capnet__limits_deprecated_addr2name_mode); +ATF_TC_HEAD(capnet__limits_deprecated_addr2name_mode, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_deprecated_addr2name_mode, tc) { cap_channel_t *capnet; @@ -609,7 +653,11 @@ ATF_TC_BODY(capnet__limits_deprecated_addr2name_mode, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_deprecated_addr2name_family); +ATF_TC(capnet__limits_deprecated_addr2name_family); +ATF_TC_HEAD(capnet__limits_deprecated_addr2name_family, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_deprecated_addr2name_family, tc) { cap_channel_t *capnet; @@ -660,7 +708,11 @@ ATF_TC_BODY(capnet__limits_deprecated_addr2name_family, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_deprecated_addr2name); +ATF_TC(capnet__limits_deprecated_addr2name); +ATF_TC_HEAD(capnet__limits_deprecated_addr2name, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_deprecated_addr2name, tc) { cap_channel_t *capnet; @@ -712,7 +764,11 @@ ATF_TC_BODY(capnet__limits_deprecated_addr2name, tc) } -ATF_TC_WITHOUT_HEAD(capnet__limits_name2addr_mode); +ATF_TC(capnet__limits_name2addr_mode); +ATF_TC_HEAD(capnet__limits_name2addr_mode, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_name2addr_mode, tc) { cap_channel_t *capnet; @@ -744,7 +800,11 @@ ATF_TC_BODY(capnet__limits_name2addr_mode, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_name2addr_hosts); +ATF_TC(capnet__limits_name2addr_hosts); +ATF_TC_HEAD(capnet__limits_name2addr_hosts, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_name2addr_hosts, tc) { cap_channel_t *capnet; @@ -797,7 +857,11 @@ ATF_TC_BODY(capnet__limits_name2addr_hosts, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_name2addr_hosts_servnames_strict); +ATF_TC(capnet__limits_name2addr_hosts_servnames_strict); +ATF_TC_HEAD(capnet__limits_name2addr_hosts_servnames_strict, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_name2addr_hosts_servnames_strict, tc) { cap_channel_t *capnet; @@ -829,7 +893,11 @@ ATF_TC_BODY(capnet__limits_name2addr_hosts_servnames_strict, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_name2addr_hosts_servnames_mix); +ATF_TC(capnet__limits_name2addr_hosts_servnames_mix); +ATF_TC_HEAD(capnet__limits_name2addr_hosts_servnames_mix, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_name2addr_hosts_servnames_mix, tc) { cap_channel_t *capnet; @@ -882,7 +950,11 @@ ATF_TC_BODY(capnet__limits_name2addr_hosts_servnames_mix, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_name2addr_family); +ATF_TC(capnet__limits_name2addr_family); +ATF_TC_HEAD(capnet__limits_name2addr_family, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_name2addr_family, tc) { cap_channel_t *capnet; @@ -941,7 +1013,11 @@ ATF_TC_BODY(capnet__limits_name2addr_family, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_deprecated_name2addr_mode); +ATF_TC(capnet__limits_deprecated_name2addr_mode); +ATF_TC_HEAD(capnet__limits_deprecated_name2addr_mode, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_deprecated_name2addr_mode, tc) { cap_channel_t *capnet; @@ -972,7 +1048,11 @@ ATF_TC_BODY(capnet__limits_deprecated_name2addr_mode, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_deprecated_name2addr_hosts); +ATF_TC(capnet__limits_deprecated_name2addr_hosts); +ATF_TC_HEAD(capnet__limits_deprecated_name2addr_hosts, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_deprecated_name2addr_hosts, tc) { cap_channel_t *capnet; @@ -1011,7 +1091,11 @@ ATF_TC_BODY(capnet__limits_deprecated_name2addr_hosts, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_deprecated_name2addr_family); +ATF_TC(capnet__limits_deprecated_name2addr_family); +ATF_TC_HEAD(capnet__limits_deprecated_name2addr_family, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_deprecated_name2addr_family, tc) { cap_channel_t *capnet; @@ -1065,7 +1149,11 @@ ATF_TC_BODY(capnet__limits_deprecated_name2addr_family, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_bind_mode); +ATF_TC(capnet__limits_bind_mode); +ATF_TC_HEAD(capnet__limits_bind_mode, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_bind_mode, tc) { cap_channel_t *capnet; @@ -1097,7 +1185,11 @@ ATF_TC_BODY(capnet__limits_bind_mode, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_bind); +ATF_TC(capnet__limits_bind); +ATF_TC_HEAD(capnet__limits_bind, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_bind, tc) { cap_channel_t *capnet; @@ -1122,7 +1214,11 @@ ATF_TC_BODY(capnet__limits_bind, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_connect_mode); +ATF_TC(capnet__limits_connect_mode); +ATF_TC_HEAD(capnet__limits_connect_mode, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_connect_mode, tc) { cap_channel_t *capnet; @@ -1154,7 +1250,11 @@ ATF_TC_BODY(capnet__limits_connect_mode, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_connect_dns_mode); +ATF_TC(capnet__limits_connect_dns_mode); +ATF_TC_HEAD(capnet__limits_connect_dns_mode, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_connect_dns_mode, tc) { cap_channel_t *capnet; @@ -1186,7 +1286,11 @@ ATF_TC_BODY(capnet__limits_connect_dns_mode, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_connect); +ATF_TC(capnet__limits_connect); +ATF_TC_HEAD(capnet__limits_connect, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_connect, tc) { cap_channel_t *capnet; @@ -1230,7 +1334,11 @@ ATF_TC_BODY(capnet__limits_connect, tc) cap_close(capnet); } -ATF_TC_WITHOUT_HEAD(capnet__limits_connecttodns); +ATF_TC(capnet__limits_connecttodns); +ATF_TC_HEAD(capnet__limits_connecttodns, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_connecttodns, tc) { cap_channel_t *capnet; @@ -1279,7 +1387,11 @@ ATF_TC_BODY(capnet__limits_connecttodns, tc) } -ATF_TC_WITHOUT_HEAD(capnet__limits_deprecated_connecttodns); +ATF_TC(capnet__limits_deprecated_connecttodns); +ATF_TC_HEAD(capnet__limits_deprecated_connecttodns, tc) +{ + atf_tc_set_md_var(tc, "require.config", "allow_network_access"); +} ATF_TC_BODY(capnet__limits_deprecated_connecttodns, tc) { cap_channel_t *capnet; From nobody Thu Jul 24 21:04:50 2025 X-Original-To: dev-commits-src-all@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 4bp3RR1xHyz639Yq; Thu, 24 Jul 2025 21:04: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp3RQ5zntz3vGB; Thu, 24 Jul 2025 21:04:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753391090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ILOiBkfN+LIkCUCBcQjsZbareqnVAHfJ1Z1VdcjLcdE=; b=VY0YPqkdTRpLqtDOdg20AgGcOBsVGk6Z8NijAvJfx7ER0HC/zQJHaXZUQIh5e6Qy9OUPXX LcGIPA7wUVHQnWmFVlcAg5ojUnw713qIKJLaKuZ6OPHEKeo1uBto/0GAjX8ek5sriEJdr9 fJ7iHtYQ72e3BISJIKFdWWlBo6oQqyYYv0YyGFv6n+aaG6tVJWbaVyglccXr7vE8aVJt3o pRNH1OemFaIlG59Tfhq1HMkwVC89Jyg6v3GF1pLLITfVxvMgXOIfdlHRuhpHoXVE5Zeo28 5leDSHJ7kSnsgOs3zR/UuP5e3n1u2sw3CtXQp3BDZvvzB5TkVmx2VojE9JIVlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753391090; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ILOiBkfN+LIkCUCBcQjsZbareqnVAHfJ1Z1VdcjLcdE=; b=F4VtDZSb83mbrt8q/C2j9ctSYInmfgyTjEb0rQ7cWI7I+Jnzw4O2jIa2VB8jR0Il9+1yf3 cpiGCWyF22ZnpLRVRL+sUIhQRhonnIRnSlRapGkwckXf7x3vlnF8YMuwt2vuGlfZgKnuxo nObM2dGmXyk71xSekT7Bfoqf3T+jElRQwk3zrShz6XkPVwnxuKT4wsuv3sjyV4oujxe8zC 8mWXk3uWuTJJl7f0Z67e/ix/buXiuoT9C1M9zmNsoQKiUITUtgy9wK/kfvE6oh7N6lSURt 8jhK8kO9mwFlrVVB8v8Ah4xkM91xOgm+FWtNV7vfaJPgO/B8EB5tZPM4FsJXBA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753391090; a=rsa-sha256; cv=none; b=p9mJykj/l1KMLRJWcEDjm3YlewxAVu84YcMaFsEdUPZNs+dGF6Df+m2sBJLlv+526ef02T pwl5V5PwRBuQQXpP9zC4C/1L2swbHgRSgshVEIUi7HLA1c37B+noTw5HGxPCmYYn9QJ+Gn xchWwJ7KXTh1Zjj6oM5YNp29eG/U0wU3KqfRlqP1PSSn55FWFw3p1fJ888XR2lZJJ1IDAs QZDn33HCh+ciMfXgmO9haF+/2AF2cjvKDAXDWQpBcxeGVAjD9XyU70SlR1UBZ4ZAcdBxin UJX4+0rJW4M4rHU+3XW0nr33bW6b5BkHjaW7062AqWRp4KSjLsKvc27SYBe3XQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bp3RQ4L48zbH; Thu, 24 Jul 2025 21:04:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OL4oFp006602; Thu, 24 Jul 2025 21:04:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OL4oLA006599; Thu, 24 Jul 2025 21:04:50 GMT (envelope-from git) Date: Thu, 24 Jul 2025 21:04:50 GMT Message-Id: <202507242104.56OL4oLA006599@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: e8d6b58ef5a4 - main - devinfo: Fix some libxo errors List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: e8d6b58ef5a4afe0d155b6967c92d55f3bbd53fe Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=e8d6b58ef5a4afe0d155b6967c92d55f3bbd53fe commit e8d6b58ef5a4afe0d155b6967c92d55f3bbd53fe Author: Warner Losh AuthorDate: 2025-07-24 21:02:24 +0000 Commit: Warner Losh CommitDate: 2025-07-24 21:04:06 +0000 devinfo: Fix some libxo errors Add missing names of fields, as exposed by --libxo:JPW Fixes: c759aca606cee Noticed by: phil Sponsored by: Netflix --- usr.sbin/devinfo/devinfo.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/usr.sbin/devinfo/devinfo.c b/usr.sbin/devinfo/devinfo.c index 629a04ba6687..4163151ec840 100644 --- a/usr.sbin/devinfo/devinfo.c +++ b/usr.sbin/devinfo/devinfo.c @@ -100,7 +100,7 @@ print_kvlist(char *s) while ((kv = strsep(©, " ")) != NULL) { char* k = strsep(&kv, "="); - xo_emit("{ea:%s/%s} {d:%s}={d:%s}", k, kv, k, kv); + xo_emit("{ea:%s/%s} {d:key/%s}={d:value/%s}", k, kv, k, kv); } free(copy); } @@ -200,7 +200,7 @@ print_device_rman_resources(struct devinfo_rman *rman, void *arg) /* there are, print header */ safe_desc = xml_safe_string(rman->dm_desc); print_indent(indent); - xo_emit("{d:%s}:\n", rman->dm_desc); + xo_emit("<{:description/%s}>\n", rman->dm_desc); xo_open_list(safe_desc); /* print resources */ @@ -220,8 +220,7 @@ print_device_props(struct devinfo_dev *dev) { if (vflag) { if (*dev->dd_desc) { - xo_emit(" <{d:%s}>", dev->dd_desc); - xo_emit("{e:description/%s}", dev->dd_desc); + xo_emit("<{:description/%s}>", dev->dd_desc); } if (*dev->dd_pnpinfo) { xo_open_container("pnpinfo"); @@ -273,7 +272,7 @@ print_device(struct devinfo_dev *dev, void *arg) print_indent(indent); xo_open_container(devname); - xo_emit("{d:%s}", devname); + xo_emit("{d:devicename/%s}", devname); print_device_props(dev); xo_emit("\n"); @@ -367,7 +366,7 @@ print_rman(struct devinfo_rman *rman, void *arg __unused) { char* safe_desc = xml_safe_string(rman->dm_desc); - xo_emit("{d:%s}:\n", rman->dm_desc); + xo_emit("<{:description/%s}\n>", rman->dm_desc); xo_open_container(safe_desc); devinfo_foreach_rman_resource(rman, print_rman_resource, 0); @@ -385,7 +384,7 @@ print_device_path_entry(struct devinfo_dev *dev) xo_open_container(devname); open_tag_count++; - xo_emit("{d:%s }", devname); + xo_emit("{:devicename/%s} ", devname); print_device_props(dev); if (vflag) xo_emit("\n"); From nobody Thu Jul 24 21:11:30 2025 X-Original-To: dev-commits-src-all@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 4bp3b71L9mz639tf; Thu, 24 Jul 2025 21:11: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp3b70HrQz413c; Thu, 24 Jul 2025 21:11:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753391491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8GsPlAcz9QpVr1rp9ufG115/cHT0T7g2PP/X/ILcC9A=; b=DhrNdKmClEe8FeAAXqoqQh3Y40C6oW7y45GFFe7ew8fY+yczZEfWusfXdiMiml60NMeawa DIZfqL8yzWfaoCqFS5qERTSVbjTePrTIy4+0rfLRGWc/26H2bFiHBkDA+4aeGKs2f2hYN4 eBNe0jkuCQL4MIb+7wepgSsjJwDR+ip+K1BsckgzaJArcgDY+GryTdfro851zKseowpOAd gPltqDVYHguej6Z4akpRja88Ew+14v+wMyZDbbRhfIvP6bl3OlYpyBy6PoF+FIRwS2EhvS +dofeAgmUQqc+7i7ZRYl2FNOotI4+m+33CbR97K299sPRGQigwT+qzZWk1YNPw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753391491; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8GsPlAcz9QpVr1rp9ufG115/cHT0T7g2PP/X/ILcC9A=; b=soCxsUsh0V9OYPsb3Easui7634uurK6u5HYpASfH5dRBY/PaYJToY1azBZiInJlbUxI5KE v5dVyKHyKKL0JdQ8uYF6rC9bgAKiXaBDDz+fnQ2q/98jiDFTnA9AkIvTTB0PBoazjwDIky uhkc4/mul2aDkjV1nSk9WcpIYoD9IRIsppJvdfQ413YnstwzpTcvXf6Kdp7NZLapLYiJo6 GI9zEPY56YSu0zV2wdIYl4IyBOLb5qGth9D+wD7Y/Qc5nY9KE7VqCJgyp5SNojsYaKHXWX eGfVtNW+CZV2q7jYM0448XZO8XC2kH2fQgj6aabcLoUTuBgjYayN38FrjVYBkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753391491; a=rsa-sha256; cv=none; b=sLAcE64K1zpSUSsxhmTLEmrfDaVhelxhgDgxtrvHAKbS6xl32o3p6EbXSiRZfmzmklAkoX wwpq5eIgKkCRl3oCmlSjiVZwi8J1TcEwPseqeEmnUOEdUUOM+xRlMM6CsgX5WHfg2xGsg0 BpIYWfHPzNJz4mLgNyAY4wZb3fdGsuvF77xwhqgPVJslbST78STps4ZLO2LIozcVMvaogB sTvlEAQyhQWG8YTD3JGIHGduFzPehLUkPd71X85Q0gv7mmeC9yYkrwu/FUUbSPkyItBWoe aouFoH1kOJrey++7dauiHe3Y1BZqyWJXFvQmP5RQYIh7J2fKSviIm5hVnFCAeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bp3b66rMkzhc; Thu, 24 Jul 2025 21:11:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56OLBUNt021652; Thu, 24 Jul 2025 21:11:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56OLBUcm021649; Thu, 24 Jul 2025 21:11:30 GMT (envelope-from git) Date: Thu, 24 Jul 2025 21:11:30 GMT Message-Id: <202507242111.56OLBUcm021649@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: bf0ee5f2175a - main - pom.6: add a more complete bibliography List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bf0ee5f2175a3c6eb52f9fc74b93b445d37a6086 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=bf0ee5f2175a3c6eb52f9fc74b93b445d37a6086 commit bf0ee5f2175a3c6eb52f9fc74b93b445d37a6086 Author: Lexi Winter AuthorDate: 2025-07-24 21:12:50 +0000 Commit: Lexi Winter CommitDate: 2025-07-24 21:13:57 +0000 pom.6: add a more complete bibliography Source: Wikipedia --- usr.bin/pom/pom.6 | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usr.bin/pom/pom.6 b/usr.bin/pom/pom.6 index a3dc68b0a46b..a4dbdde2d4f5 100644 --- a/usr.bin/pom/pom.6 +++ b/usr.bin/pom/pom.6 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 14, 2010 +.Dd July 24, 2025 .Dt POM 6 .Os .Sh NAME @@ -60,4 +60,10 @@ but not has been specified, it will calculate the phase of the moon on that day at midnight. .Sh SEE ALSO -`Practical Astronomy with Your Calculator' by Duffett-Smith. +.Rs +.%A Peter Duffett-Smith +.%B Practical Astronomy with Your Calculator +.%I Cambridge University Press +.%C Cambridge, UK +.%D 1979 +.Re From nobody Thu Jul 24 22:44:11 2025 X-Original-To: dev-commits-src-all@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 4bp5f650Y3z63Fhn; Thu, 24 Jul 2025 22:44:14 +0000 (UTC) (envelope-from glebius@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp5f64919z42sl; Thu, 24 Jul 2025 22:44:14 +0000 (UTC) (envelope-from glebius@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753397054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rkyW8LBA+OhGePxrJadWXjqF0IL/z5urMR7wLxusYfg=; b=sLZpxagBKMJF2VtEMTdriBZ73yv2FP74fI7+axELPuKFAtOBTVkqr7yE9WQBKr4/O8ZJBC sRfy164przOK4dADj3+dkekCErKTZnpdsjXAdIoriiL5+BVMgKTTI6LoxRm7EPrM1I66b3 +sfgG2AE7I+/2EEWqt1TNOH9p6C/qCb3TF4DNT78lFF8Vjfbz8azCme81OzsRgyCwrvuMm zN74fqoOjWw+J4rRvLNwak6R3ts/dN8DQRarycsPXHBcb4RljIZT82mx2Lmws6dwO+S0bu sWUiey1pc+TI+70NXWsVYeieQ9cVRXNquszRoyUAk80O1ffI3kXmXxy92AUDtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753397054; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=rkyW8LBA+OhGePxrJadWXjqF0IL/z5urMR7wLxusYfg=; b=Bkw9Yv3tuoDE8EbeAvOdg2F31o/H3Od0cbACIc1MhOquYujh+olT2ALCgZPSMkb64RfuWc gkiodQR1sk8hDrYHRJH5IE0yOLx7/hpFhc2Ga6TWs3ikHMLMNk4jpSeyOaSDh8YdhyYQRC 0OLXXAWDd5/A8BGWK/gytlA5mAkaJpOfHqZJMxA8SjlJJza/Glku3Pr5mkG5oH2QffllGD YraH9M91UR0mOvpWpCa845gR5mj3yjjF3nWoKcTLCzW7pE1WXwc0oGuh8oSqJdilHp5LJ+ ZY4RvJqgjcoiLauhSH9nxKyTyOVKQKbweRDS7evyswWlCxm+u+8qrHxvV3Yv0Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753397054; a=rsa-sha256; cv=none; b=hWIIj3/DVbwvLw6N7gaSgf6ZP7RRtISMXF00Rptuf6TQzEeVMb23uoqxCkavSJJOZ56ZCm 8cXddZoarLCafwBYbzZ9nYaLuM2b+PK0Pxr4QQVfkg/fbDKQWhyrh1HT1XltBCf2764nsx XFQcJQrsRfPm8zITnYuKTOWEZrCMBXNqT9PjTrUEEUk2/MPCg+MLUCIlr+R2S9FY6ZhJPv DZRyad6a1T/LozH3eNYnZITdwRu7tmvggOtiklOJcro2qxOrXB0oSPjkCb/O0/QJuuHDSv 3hffY05gvK0z//TF8iuKmVZtE6xfX/n9ruMLzresi3XKje69a7l4NluKYjlAyQ== Received: from cell.glebi.us (glebi.us [162.251.186.162]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: glebius) by smtp.freebsd.org (Postfix) with ESMTPSA id 4bp5f56WdVz1DlR; Thu, 24 Jul 2025 22:44:13 +0000 (UTC) (envelope-from glebius@freebsd.org) Date: Thu, 24 Jul 2025 15:44:11 -0700 From: Gleb Smirnoff To: Kristof Provost Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 4bb3b3657764 - main - pf: unify DPFPRINTF definitions Message-ID: References: <202507231423.56NENthc031396@gitrepo.freebsd.org> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202507231423.56NENthc031396@gitrepo.freebsd.org> On Wed, Jul 23, 2025 at 02:23:55PM +0000, Kristof Provost wrote: K> commit 4bb3b365776458bd8f710e40f97e2c68994e3306 K> Author: Kristof Provost K> AuthorDate: 2025-07-18 14:55:35 +0000 K> K> pf: unify DPFPRINTF definitions K> K> We define DPFPRINTF() in a few different versions in most pf source files. K> Move to one definition in pfvar.h and use that one everywhere. K> K> While here change it to add an endline, as OpenBSD does, so we consistently end K> all logs with an endline. K> Also add a static probe point to ease future debugging. This way we can detect K> log evens even when logging is disabled, and extract more information (e.g. K> stack traces, frequency, ...). Thanks a lot! Every time I was debugging something in pf, I was missing those SDTs. -- Gleb Smirnoff From nobody Thu Jul 24 23:06:27 2025 X-Original-To: dev-commits-src-all@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 4bp67l3wWWz6231V; Thu, 24 Jul 2025 23:06: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp67l2CWLz4Lb4; Thu, 24 Jul 2025 23:06:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753398387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=12Qb2yZWy33TqOvNbwgz5sib6e7JJFImEg6uC7AOTVQ=; b=GKW24tDsv4tY+4KCB5pjSNduZpx/BCFRZlCb3mol++v3fYlQ8LkIPdxBQzLVthR7cUQxRH 6M90aefTohA2IhjXinskw/7ZyZNC+gTCZ/CY3tF+NJREJVG4W9YwMDE4g5qVWYiXXVQy5g kB94sK1UVX6V/+Tk5PN7w45GldW6uDTzg0d4mY0ZRhv1bkHnZyjBSjQpM/fvazHzjuQCB9 XEs5b3rkyH2ZsqYs6z3uQJj8xuWazOZ6mHdC3sJ+4gCxEu0ycFjMAtda31WkUOXOIiLFLW kYsRAIyT9lvW9S4xWqPjRI5lLSh1tse6f+/rpbhNiH+gHNoeuJ0a0ieh1bJERg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753398387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=12Qb2yZWy33TqOvNbwgz5sib6e7JJFImEg6uC7AOTVQ=; b=oO2+7NTs0+OD/wpFZ3fUrclro6GtRmfN/LJZd60t19fB+kRN1VWN5awduLQrf1/ErHPcM5 QuBkYOXK+Q2ndWkv06atAmxQ6zmH+fr/LKI224wIN0pvTiZJ3/iJIID6W5kAs2goFEZYjr +xjPwGyWwoC1/GxjZV82sPVBAd/pgbL8vo36zaMy7wF7aKOyWek9FYoFENb5Ge0p41Yws/ S2HZzGc0ubHOiQb5WMs+bIPpe/Wn9Sqd5zAizUPWvVn2GZUfr3hFVzZry11PmKh46xIM+8 DG4sN4YgPfpvuIpjdvwSPCDsN/6xyf83iV2ZsVZ+vK9MCzoRelPbWBYA5B6pXQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753398387; a=rsa-sha256; cv=none; b=WwTD2UnbjuUN1qr2F+XT+NQqRCVqKg5D4/fk9LBsXTphDBP+DLn/DO0fd4cvCfon67ehCr JwHAEXYxZhyycqjilBuKdiq8luCpn+yL2g/iPMAk/DAT/pPXDfz7ifV5N0OVDhKZQ6rFwA oFY3XheBGiB4Nr11sroVTpZFY4yH+mFCyaMiSsEfPq+k3ugv6ozAJv00X0PUBz1OS0gB/X 0+8eABuDL+DOsn1L45VqiaVk+SQMqjz+6ohbaujzSTzaL5tjeFqPAcxJqAoB4X4+4VGqOV RClR+Ngqcm2kvQMGimBWYeJ1M1lHNai5PQwkx9zo72koVpWwLFbBSBuW48UKVQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bp67l1Fjsz3yn; Thu, 24 Jul 2025 23:06:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56ON6Rg6032155; Thu, 24 Jul 2025 23:06:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56ON6RPs032152; Thu, 24 Jul 2025 23:06:27 GMT (envelope-from git) Date: Thu, 24 Jul 2025 23:06:27 GMT Message-Id: <202507242306.56ON6RPs032152@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: c754cdedb380 - main - named_attribute.7: Add a section for ZFS "sa" attributes List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c754cdedb3804b7c24b5a0edf6291abeb80f003b Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=c754cdedb3804b7c24b5a0edf6291abeb80f003b commit c754cdedb3804b7c24b5a0edf6291abeb80f003b Author: Rick Macklem AuthorDate: 2025-07-24 23:03:14 +0000 Commit: Rick Macklem CommitDate: 2025-07-24 23:03:14 +0000 named_attribute.7: Add a section for ZFS "sa" attributes On ZFS, extended attributes with small values (as in number of bytes) that are created when xattr is set to "sa" will only be visible via extattr(2) and not as named attributes. This man page patch documents the above. This is a content change. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D51444 --- share/man/man7/named_attribute.7 | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/share/man/man7/named_attribute.7 b/share/man/man7/named_attribute.7 index 7cd778620357..4080dfce2fab 100644 --- a/share/man/man7/named_attribute.7 +++ b/share/man/man7/named_attribute.7 @@ -3,7 +3,7 @@ .\" .\" SPDX-License-Identifier: BSD-2-Clause .\" -.Dd July 3, 2025 +.Dd July 20, 2025 .Dt NAMED_ATTRIBUTE 7 .Os .Sh NAME @@ -122,7 +122,7 @@ Although the named attribute machanism might require different internal implementation of extended attributes within a file system, both ZFS and NFSv4 provide both mechanisms, which can be used interchangeably to manipulate -extended attributes, but with a couple of limitations. +extended attributes, but with a few limitations. .Bl -bullet .It The @@ -135,6 +135,24 @@ The named attribute interface does not support system namespace extended attributes and, as such, system namespace extended attributes must be manipulated via .Xr extattr 2 . +.It +For ZFS, if an extended attribute with a value +that is a small length in bytes is created when the ZFS +.Dv xattr +property is set to +.Dq sa , +that extended attribute is only visible via +.Xr extattr 2 +and not as a named attribute. +Archiving/de-archiving the file via +.Xr tar 1 +after setting the +.Dv xattr +property to +.Dq dir +will make the attribute(s) visible as both named attributes +and via +.Xr extattr 2 . .El .Pp The named attribute mechanism/system call interface provides certain @@ -259,6 +277,7 @@ enters the named attribute directory for the file object .Sh SEE ALSO .Xr bash 1 , .Xr runat 1 , +.Xr tar 1 , .Xr chdir 2 , .Xr extattr 2 , .Xr lseek 2 , From nobody Thu Jul 24 23:40:19 2025 X-Original-To: dev-commits-src-all@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 4bp6tr1XVXz625P0; Thu, 24 Jul 2025 23:40: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bp6tr0cYDz3WJj; Thu, 24 Jul 2025 23:40:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753400420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sJZviwnWxXKr1io9bxZVQ53C5mOr1CRudtnwIXfkaEo=; b=u4QAIA7yZitPnPiFwcp+nHReFDyXK+I8taWdGh2cIPlvyUHxH8CG5NO7Gs00TNSEr4rJcY scoeqPg39PoBY0EYB2p9cjgEtLRTuGfBcOYZqIU7iDNOR/+mld4knQ0bWPaX/CGDbr0+8S zSBvd6Igtqhh4gPklGCCABDes+1M+stmi6cuGxCC/gCznEKcnRnddaxqQVmxqm/UgqJJVs azbMkLAP9t5DEFo1SQc1LZJLuw9u7lOwqheUZCnOTF6s3KtavrSqEh0qzbZMo9oYbQ7swP 2hYI8XNWnFqYy+NONgDKrZL1FUaQT/2Ut7reh6g11ZdtasdfmELpFMOovWCjDQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753400420; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sJZviwnWxXKr1io9bxZVQ53C5mOr1CRudtnwIXfkaEo=; b=w4dnzUIZSaGP3FsNPUwFNycB8Sxvs9I3TXi/YrdAdm9N7O7B9kc8t+yG4AlD8GXHR44OOR LVhrUfNSZfS4L6b7xeVH4rl+hVB9z/1GQ0346cnDCRXAGp1FTRWXmholpVpwKAy2PtPvaf 2FydVOb4hGpDXTjJc+1L6Bb/Px246KfXPVTaHTDcR6K9qCQxTWiuco7lE78kAdMyvLuJKT TjdO9HfCS2KcqTxbY/lDbpuli88Xgv5fsVoVjT5X9EuEh/dvMwRMbGC2pBUJAcn4B5WFRU i1I1mPsHOqzLlz+GjXe+pMNaPEpyVq9E16SzeHkVjErNWC8GkrQnBwXN+2stXA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753400420; a=rsa-sha256; cv=none; b=gpyO1ww+/5uFrT1So5Aii5+QMYCMon7wQSLDROmfoApBjZSDXGY3CfcJYm4vfg0mo9InlJ meZ0enKB+/WD4ZObd3RtRIjZGW+yIeyRoNdb2ckINUPVjdNciEgKQOZFm+tZ+eSrRYYGJ5 VL4gwgdBRLTuvY/JqNIW6sn7ugcITFSlfXzDysibyg0zS/zmGB0uMxlWvvWjJkjQXcGI/H 1BmYDZ9gPouiEYvn7124KVQH7ua0cjwSMsGB2QgX7gCselUe62rnCsDrEeTKUVdXXYmuLJ 5oXHLOHYR06hxOD5qLfcV841O3vQqkPboGh4wXchdZUpRDG+0djOFydZqYIjWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bp6tq6rrVz4Xv; Thu, 24 Jul 2025 23:40:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56ONeJXu097955; Thu, 24 Jul 2025 23:40:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56ONeJ96097952; Thu, 24 Jul 2025 23:40:19 GMT (envelope-from git) Date: Thu, 24 Jul 2025 23:40:19 GMT Message-Id: <202507242340.56ONeJ96097952@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Pierre Pronchery Subject: git: d0d92b35d540 - stable/14 - bsdinstall: restore the environment when restarting List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: khorben X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: d0d92b35d5404243dc25dee8cf12b75288e0eacb Auto-Submitted: auto-generated The branch stable/14 has been updated by khorben: URL: https://cgit.FreeBSD.org/src/commit/?id=d0d92b35d5404243dc25dee8cf12b75288e0eacb commit d0d92b35d5404243dc25dee8cf12b75288e0eacb Author: Pierre Pronchery AuthorDate: 2025-05-23 15:50:42 +0000 Commit: Pierre Pronchery CommitDate: 2025-07-24 23:37:49 +0000 bsdinstall: restore the environment when restarting It is possible to restart the installation process upon errors, when installing normally through the `auto` script, or when installing a jail with the `jail` script. However, some values obtained interactively from the user or guessed by some scripts were kept in the environment when restarting the process; this made it impossible to re-run some steps as expected after the restart. For instance, if a bad choice of mirror was made in the `mirrorselect` phase, restarting the installer remembered the choice made, and would never prompt for a different one again. Rebooting was then the only easy way out of this situation. This change restores a pre-defined list of environment variables when restarting the installation process. PR: 266987 Reviewed by: emaste Approved by: philip (mentor) Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D42281 (cherry picked from commit 9de72af2cceb6fc4aead0990cccdf565531bc248) --- usr.sbin/bsdinstall/scripts/auto | 33 ++++++++++++++++++++++++++ usr.sbin/bsdinstall/scripts/jail | 51 ++++++++++++++++++++++++++++++++++++---- 2 files changed, 80 insertions(+), 4 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/auto b/usr.sbin/bsdinstall/scripts/auto index abd445282316..ab0191feea17 100755 --- a/usr.sbin/bsdinstall/scripts/auto +++ b/usr.sbin/bsdinstall/scripts/auto @@ -34,6 +34,13 @@ f_include $BSDCFG_SHARE/dialog.subr ############################################################ GLOBALS +# +# List of environment variables that may be defined by the user, but modified +# during the installation process. They are then restored when restarting this +# script. +# +user_env_vars="BSDINSTALL_DISTSITE DISTRIBUTIONS WORKAROUND_GPTACTIVE WORKAROUND_LENOVO ZFSBOOT_PARTITION_SCHEME" + # # Strings that should be moved to an i18n file and loaded with f_include_lang() # @@ -90,6 +97,7 @@ error() --yes-label "$msg_restart" \ --yesno "$prompt" $height $width then + environment_restore exec $0 # NOTREACHED fi @@ -138,10 +146,35 @@ dialog_workaround() --yesno "$prompt" $height $width } +# environment_restore +# +# Restore a list of environment variables when this script is restarted. +# +environment_restore() +{ + for var in $user_env_vars; do + eval "if [ -n \"\${ORIG_$var}\" -o -z \"\${ORIG_$var-z}\" ]; then $var=\${ORIG_$var}; else unset $var; fi" + done +} + +# environment_save +# +# Save any user-defined environment variable that may be modified during the +# installation process. They are then restored when restarting this script. +# +environment_save() +{ + for var in $user_env_vars; do + eval "if [ -n \"\${$var}\" -o -z \"\${$var-z}\" ]; then ORIG_$var=\${$var}; else unset ORIG_$var; fi" + done +} + ############################################################ MAIN f_dprintf "Began Installation at %s" "$( date )" +environment_save + rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC diff --git a/usr.sbin/bsdinstall/scripts/jail b/usr.sbin/bsdinstall/scripts/jail index e5822087e97b..191cc5e89563 100755 --- a/usr.sbin/bsdinstall/scripts/jail +++ b/usr.sbin/bsdinstall/scripts/jail @@ -31,13 +31,23 @@ BSDCFG_SHARE="/usr/share/bsdconfig" . $BSDCFG_SHARE/common.subr || exit 1 -############################################################ MAIN +############################################################ GLOBALS -: ${BSDDIALOG_OK=0} +# +# List of environment variables that may be defined by the user, but modified +# during the installation process. They are then restored when restarting this +# script. +# +user_env_vars="BSDINSTALL_DISTSITE DISTRIBUTIONS" -f_dprintf "Began Installation at %s" "$( date )" -export BSDINSTALL_CHROOT=$1 +############################################################ FUNCTIONS +# error [$msg] +# +# Display generic error message when a script fails. An optional message +# argument can preceed the generic message. User is given the choice of +# restarting the installer or exiting. +# error() { local msg if [ -n "$1" ]; then @@ -49,10 +59,43 @@ error() { if [ $? -ne $BSDDIALOG_OK ]; then exit else + environment_restore exec $0 $BSDINSTALL_CHROOT fi } +# environment_restore +# +# Restore a list of environment variables when this script is restarted. +# +environment_restore() +{ + for var in $user_env_vars; do + eval "if [ -n \"\${ORIG_$var}\" -o -z \"\${ORIG_$var-z}\" ]; then $var=\${ORIG_$var}; else unset $var; fi" + done +} + +# environment_save +# +# Save any user-defined environment variable that may be modified during the +# installation process. They are then restored when restarting this script. +# +environment_save() +{ + for var in $user_env_vars; do + eval "if [ -n \"\${$var}\" -o -z \"\${$var-z}\" ]; then ORIG_$var=\${$var}; else unset ORIG_$var; fi" + done +} + +############################################################ MAIN + +: ${BSDDIALOG_OK=0} + +f_dprintf "Began Installation at %s" "$( date )" +export BSDINSTALL_CHROOT=$1 + +environment_save + rm -rf $BSDINSTALL_TMPETC mkdir $BSDINSTALL_TMPETC mkdir -p $1 || error "mkdir failed for $1" From nobody Fri Jul 25 03:24:25 2025 X-Original-To: dev-commits-src-all@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 4bpCsP4cTsz62K1p; Fri, 25 Jul 2025 03:24:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpCsP3g6Dz3NQY; Fri, 25 Jul 2025 03:24:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753413865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k4ZBU5hrgbl/C8C3oAHf+oWFcckoAtF49soZeDYo3Sg=; b=doB94s1noS0lm0n2qRxxupgCcF0QbV4lCa+8K7cYy/87B0IxLZekwA3i8KMhOv5+bxPZNU vVecixEefukT5M44FsmP24DOpGIHmmUHO+Zp5KoWhp61wzmTusimdy0SVYRg9Lj2rRwFH5 nWZu7Fi/l2MEblpvBaptMCcYdsrR2LO37T8CWqK48+yCCwuTDwk3TBTvYI9+cOlp/9o8LK zwKwUlB8VEp+UuUAwsKtI7XfWYLcWc7Rp5YJvynPW84tZ5K691Qhu7FmZfp49KbFB/mpjk eRbg54DNIP5tQRt54Yv1i2EW/ojd3hJK7DRMDre9c0iVuz8ld36BPrfatAlIAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753413865; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=k4ZBU5hrgbl/C8C3oAHf+oWFcckoAtF49soZeDYo3Sg=; b=hhkCKmapCchXwx4Wa8gRehIBrNZ9qnLORTYlimPrcEMRu5+eFruKIUnze0dOpU+alvQX5S Fk2YbYotfKOGjvKHTZ6o5tJQLeJIOdjJPV8R9fmNDBcpK/ZQb6zBA/DyYJPk1xyy177ClW L5Nm53FlmivpS6UcO0lRCdW3B60cv82Ajdn4hev5BX3Jwp89U40agpK5MTstA1asqZhjve mOljAli7WOdFfEh5Pf7M38+dERiLZZ5wrYNPNzaxp7CWPaELswLFVE7I/MJ2uKYzX7LJ8u BFPVJzVcfa4/Nbo93xqisz0A7/T/m4yE+MNXuCcWsY6a93ocmrJrW4HwQLvHpw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753413865; a=rsa-sha256; cv=none; b=qx8e+J3dBJ4/9v0UzUX+mgzPffeE60js/VADKzBK60LzTTwoun/McEyj11THsIfyu45jfh rXm1HLceBDK/l4imGvdTUqKR5UVOQ76Oxzlf1t4dOTpBiiRg19PdOXyBHF7itxn9OiAcJt a7ewnUAk4CHXQtesRu8YPT1Z9C4ptjeYmHR/72m/l7U0flsMUU75zzDQOCptrul0DkysIK xZpWSN8wxZG5TDQU0IUa5FeyLnlqHU1ENjB72sdJmIPAy1l9fgdGvCFc0sYd2lHntcStNX KH5EwYOAs+Bg7CBDepntbcpe5Ixpk5lN7qbzuOeO8+6yUFliz7Ew3frRIFw2cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpCsP3BzFzC17; Fri, 25 Jul 2025 03:24:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56P3OPZQ018448; Fri, 25 Jul 2025 03:24:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56P3OPgR018445; Fri, 25 Jul 2025 03:24:25 GMT (envelope-from git) Date: Fri, 25 Jul 2025 03:24:25 GMT Message-Id: <202507250324.56P3OPgR018445@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: 1c250e04505f - stable/14 - rtld: do not relocate tlsinit address twice List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 1c250e04505f0d3e9b103fa22fe1cf103182a695 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=1c250e04505f0d3e9b103fa22fe1cf103182a695 commit 1c250e04505f0d3e9b103fa22fe1cf103182a695 Author: Konstantin Belousov AuthorDate: 2025-07-21 04:09:53 +0000 Commit: Konstantin Belousov CommitDate: 2025-07-25 03:23:49 +0000 rtld: do not relocate tlsinit address twice PR: 288334 (cherry picked from commit db9ef9d5f517a14160bb3d0a599b8392e01fb400) --- libexec/rtld-elf/map_object.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libexec/rtld-elf/map_object.c b/libexec/rtld-elf/map_object.c index 0b1500a15183..06be8c02137e 100644 --- a/libexec/rtld-elf/map_object.c +++ b/libexec/rtld-elf/map_object.c @@ -320,7 +320,7 @@ map_object(int fd, const char *path, const struct stat *sb) obj->tlsalign = phtls->p_align; obj->tlspoffset = phtls->p_offset; obj->tlsinitsize = phtls->p_filesz; - obj->tlsinit = mapbase + phtls->p_vaddr; + obj->tlsinit = obj->relocbase + phtls->p_vaddr; } obj->stack_flags = stack_flags; obj->relro_page = obj->relocbase + rtld_trunc_page(relro_page); From nobody Fri Jul 25 03:24:26 2025 X-Original-To: dev-commits-src-all@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 4bpCsQ62F1z62Jpv; Fri, 25 Jul 2025 03:24:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpCsQ4WKTz3NHn; Fri, 25 Jul 2025 03:24:26 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753413866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tnfd2gKBtDsdbPdb6baYNz4D4rHu4slnaIPifgY/Og0=; b=l8T+h9uzZi7sXbjw/LPKZgBTvjc8YKghQb2kA6qhoCYhEAW1EMQoPJcOmiq8NK1sjQuu6y RRaKh+7djcp04UlmZhT2PIWoCmM7KwSPMO5ZmnabCOnDm9v5psGBtFpdmeSHAwHeJ0eNoC uj2tuSUvbs8ibJaQQ0Qlvi9XdcpjjQtNKXN3xzLHS9kTCALFQyb5nb7R+vcF2KhGuH1aVk d7LHFqntTf1nPUkg/EDJyK3oxL5Aq7kHojkxVVh6zsVgQtWAbtUwzuBQBtE9QCybWmhuuQ nhSv9I10evQGCgPeUiM4q8/pX5P4Y/eVuFi+DuyGlMOSuUyy94xwKmFTf+CLVg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753413866; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Tnfd2gKBtDsdbPdb6baYNz4D4rHu4slnaIPifgY/Og0=; b=aMBhD9SPn3naEXxfxj4SICpw8lawVvM6Rv8Yp77r1g+14ssWjimAg/l+eIfFuCSAe2w04q gYLPzu6T/YJNT6V8pHT2HNnBR3UzgbHUqxAvDU+Nq4iPS3/cWcsaXCCqhx5nG3nwgtJYqh UB5VpYdkMH2x8fd/i9ESkbGgOLg3AwuDix2Evd7J5Ew6xZcTE55Ol3E7yzEsvbXAvU91QG Khb51X0ky3Odgsv/+0xdAd3F64pHlGX1tx/Gn1XQOwDygQXXE7zwPdxE/WEZKsD3wWjFUy z6Ni3U+5h8UorDO/oKyWpAM+FFEBeipV8jEF++T/RrL5spqJp43+PDCeez0mDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753413866; a=rsa-sha256; cv=none; b=YHPEHCy/ANBfHf1vrjNwmeD7ncllXsrsJJn6uZsCjHksTiRy409fwY7BEWxPk56hdsSGt8 4uC4/YMnJSh+RNjlRC07RvpCbKhoAUhXT9WfBgJllVPAkfBGlmDN3IXxKaWmqt4rBXpU3U XefltiWsiTUfPK2Qg6dN0iCc0p5qW1aR6UH/A0mWb4xJvb6kJDn27FgAr95iaby+BC+rvQ zknSPleaWBSVQPFelELqKTimcfhsMZ8Tqn91s3GZpIQcf9/mRGCsI87QlZCyXn9GaBBcEP /AtDCaA6Sb9zEYKdFTsRkMxmawvCGgEI4RIkfK1sAfaleYzIYuBEA9O7qTk6Xw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpCsQ3xG0zC1Z; Fri, 25 Jul 2025 03:24:26 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56P3OQIW018481; Fri, 25 Jul 2025 03:24:26 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56P3OQsx018478; Fri, 25 Jul 2025 03:24:26 GMT (envelope-from git) Date: Fri, 25 Jul 2025 03:24:26 GMT Message-Id: <202507250324.56P3OQsx018478@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: 823b81ac9c75 - stable/14 - memchr.3: mention the len argument in the functions description List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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: 823b81ac9c75f4c86b8e85e12bf1f0219ae59608 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=823b81ac9c75f4c86b8e85e12bf1f0219ae59608 commit 823b81ac9c75f4c86b8e85e12bf1f0219ae59608 Author: Konstantin Belousov AuthorDate: 2025-07-19 12:15:44 +0000 Commit: Konstantin Belousov CommitDate: 2025-07-25 03:23:49 +0000 memchr.3: mention the len argument in the functions description (cherry picked from commit 441995e161a2564d37947d054a2f1219754deb5f) --- lib/libc/string/memchr.3 | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/libc/string/memchr.3 b/lib/libc/string/memchr.3 index 72a4fa70e536..52343c23f9db 100644 --- a/lib/libc/string/memchr.3 +++ b/lib/libc/string/memchr.3 @@ -54,7 +54,10 @@ locates the first occurrence of (converted to an .Vt "unsigned char" ) in string -.Fa b . +.Fa b , +limited to at most +.Fa len +characters. .Pp The .Fn memrchr @@ -63,15 +66,18 @@ function behaves like except that it locates the last occurrence of .Fa c in string -.Fa b . +.Fa b , +limited to the first +.Fa len +characters. .Sh RETURN VALUES The .Fn memchr and .Fn memrchr -functions -return a pointer to the byte located, -or NULL if no such byte exists within +functions return a pointer to the byte located, or +.Dv NULL +if no such byte exists within .Fa len bytes. .Sh SEE ALSO From nobody Fri Jul 25 03:28:34 2025 X-Original-To: dev-commits-src-all@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 4bpCyX1WnWz62KFv; Fri, 25 Jul 2025 03:28:52 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpCyW473Yz3RXh; Fri, 25 Jul 2025 03:28:51 +0000 (UTC) (envelope-from kostikbel@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: from tom.home (kib@localhost [127.0.0.1] (may be forged)) by kib.kiev.ua (8.18.1/8.18.1) with ESMTP id 56P3SY08053900; Fri, 25 Jul 2025 06:28:37 +0300 (EEST) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.10.3 kib.kiev.ua 56P3SY08053900 Received: (from kostik@localhost) by tom.home (8.18.1/8.18.1/Submit) id 56P3SYhQ053899; Fri, 25 Jul 2025 06:28:34 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Fri, 25 Jul 2025 06:28:34 +0300 From: Konstantin Belousov To: Cy Schubert Cc: Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: e447c252d0ec - main - krb5: Merge Heimdal common functions into version maps Message-ID: References: <202507241714.56OHEFYg074661@gitrepo.freebsd.org> <20250724173412.8B8E34D6@slippy.cwsent.com> <20250724184010.C57FA4DA@slippy.cwsent.com> <20250724190518.C95DD711@slippy.cwsent.com> List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250724190518.C95DD711@slippy.cwsent.com> X-Spam-Status: No, score=-1.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FORGED_GMAIL_RCVD,FREEMAIL_FROM, NML_ADSP_CUSTOM_MED autolearn=no autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on tom.home X-Rspamd-Queue-Id: 4bpCyW473Yz3RXh 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:6939, ipnet:2001:470::/32, country:US] On Thu, Jul 24, 2025 at 12:05:18PM -0700, Cy Schubert wrote: > In message , Konstantin Belousov writes: > > On Thu, Jul 24, 2025 at 11:40:10AM -0700, Cy Schubert wrote: > > > In message , Konstantin Belousov writes: > > > > On Thu, Jul 24, 2025 at 10:34:12AM -0700, Cy Schubert wrote: > > > > > In message , Konstantin Belousov writes: > > > > > > On Thu, Jul 24, 2025 at 05:14:15PM +0000, Cy Schubert wrote: > > > > > > > The branch main has been updated by cy: > > > > > > > > > > > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=e447c252d0eca8f1440996 > > f2a3 > > > > 521c > > > > > > 75c06ae126 > > > > > > > > > > > > > > commit e447c252d0eca8f1440996f2a3521c75c06ae126 > > > > > > > Author: Cy Schubert > > > > > > > AuthorDate: 2025-07-24 16:24:03 +0000 > > > > > > > Commit: Cy Schubert > > > > > > > CommitDate: 2025-07-24 16:31:40 +0000 > > > > > > > > > > > > > > krb5: Merge Heimdal common functions into version maps > > > > > > > > > > > > > > Requested by: kib > > > > > > I do not remember that I ever asked to do this. > > > > > > More, I do not understand Kerberos to see such details. > > > > > > > > > > > > But see below. > > > > > > > > > > > > > --- > > > > > > > krb5/lib/gssapi/version.map | 171 +++++++++--------- > > > > > > > krb5/lib/krb5/version.map | 430 ++++++++++++++++++++++---------- > > ---- > > > > ---- > > > > > > ---- > > > > > > > krb5/util/et/version.map | 12 +- > > > > > > > 3 files changed, 312 insertions(+), 301 deletions(-) > > > > > > > > > > > > > > diff --git a/krb5/lib/gssapi/version.map b/krb5/lib/gssapi/version. > > map > > > > > > > index bd0d28df70a7..d52c0d3d1e36 100644 > > > > > > > --- a/krb5/lib/gssapi/version.map > > > > > > > +++ b/krb5/lib/gssapi/version.map > > > > > > > @@ -1,3 +1,90 @@ > > > > > > > +HEIMDAL_GSS_2.0 { > > > > > > > + global: > > > > > > > + gss_accept_sec_context; > > > > > > > + gss_acquire_cred; > > > > > > > + gss_acquire_cred_with_password; > > > > > > > + gss_add_buffer_set_member; > > > > > > > + gss_add_cred; > > > > > > > + gss_add_cred_with_password; > > > > > > > + gss_add_oid_set_member; > > > > > > > + gss_authorize_localname; > > > > > > > + gss_canonicalize_name; > > > > > > > + gss_compare_name; > > > > > > > + gss_context_time; > > > > > > > + gss_create_empty_buffer_set; > > > > > > > + gss_create_empty_oid_set; > > > > > > > + gss_decapsulate_token; > > > > > > > + gss_delete_name_attribute; > > > > > > > + gss_delete_sec_context; > > > > > > > + gss_display_mech_attr; > > > > > > > + gss_display_name; > > > > > > > + gss_display_name_ext; > > > > > > > + gss_display_status; > > > > > > > + gss_duplicate_name; > > > > > > > + gss_encapsulate_token; > > > > > > > + gss_export_cred; > > > > > > > + gss_export_name; > > > > > > > + gss_export_name_composite; > > > > > > > + gss_export_sec_context; > > > > > > > + gss_get_mic; > > > > > > > + gss_get_name_attribute; > > > > > > > + gss_import_cred; > > > > > > > + gss_import_name; > > > > > > > + gss_import_sec_context; > > > > > > > + gss_indicate_mechs; > > > > > > > + gss_indicate_mechs_by_attrs; > > > > > > > + gss_init_sec_context; > > > > > > > + gss_inquire_attrs_for_mech; > > > > > > > + gss_inquire_context; > > > > > > > + gss_inquire_cred; > > > > > > > + gss_inquire_cred_by_mech; > > > > > > > + gss_inquire_cred_by_oid; > > > > > > > + gss_inquire_mech_for_saslname; > > > > > > > + gss_inquire_mechs_for_name; > > > > > > > + gss_inquire_name; > > > > > > > + gss_inquire_names_for_mech; > > > > > > > + gss_inquire_saslname_for_mech; > > > > > > > + gss_krb5_ccache_name; > > > > > > > + gss_krb5_copy_ccache; > > > > > > > + gss_krb5_export_lucid_sec_context; > > > > > > > + gss_krb5_free_lucid_sec_context; > > > > > > > + gss_krb5_get_tkt_flags; > > > > > > > + gss_krb5_import_cred; > > > > > > > + gss_krb5_set_allowable_enctypes; > > > > > > > + gss_oid_equal; > > > > > > > + gss_oid_to_str; > > > > > > > + gss_pname_to_uid; > > > > > > > + gss_process_context_token; > > > > > > > + gss_pseudo_random; > > > > > > > + gss_release_buffer; > > > > > > > + gss_release_buffer_set; > > > > > > > + gss_release_cred; > > > > > > > + gss_release_iov_buffer; > > > > > > > + gss_release_name; > > > > > > > + gss_release_oid; > > > > > > > + gss_release_oid_set; > > > > > > > + gss_seal; > > > > > > > + gss_set_cred_option; > > > > > > > + gss_set_name_attribute; > > > > > > > + gss_set_sec_context_option; > > > > > > > + gss_sign; > > > > > > > + gss_store_cred; > > > > > > > + gss_test_oid_set_member; > > > > > > > + gss_unseal; > > > > > > > + gss_unwrap; > > > > > > > + gss_unwrap_iov; > > > > > > > + gss_userok; > > > > > > > + gss_verify; > > > > > > > + gss_verify_mic; > > > > > > > + gss_wrap; > > > > > > > + gss_wrap_iov; > > > > > > > + gss_wrap_iov_length; > > > > > > > + gss_wrap_size_limit; > > > > > > > + gsskrb5_extract_authtime_from_sec_context; > > > > > > > + gsskrb5_extract_authz_data_from_sec_context; > > > > > > > + krb5_gss_register_acceptor_identity; > > > > > > > +}; > > > > > > > + > > > > > > > gssapi_krb5_2_MIT { > > > > > > > global: > > > > > > > GSS_C_ATTR_LOCAL_LOGIN_USER; > > > > > > > @@ -46,67 +133,14 @@ gssapi_krb5_2_MIT { > > > > > > > GSS_C_MA_CTX_TRANS; > > > > > > > GSS_C_MA_NEGOEX_AND_SPNEGO; > > > > > > > GSS_C_SEC_CONTEXT_SASL_SSF; > > > > > > > - gss_accept_sec_context; > > > > > > > - gss_acquire_cred; > > > > > > > - gss_acquire_cred_with_password; > > > > > > > gss_acquire_cred_impersonate_name; > > > > > > > - gss_add_buffer_set_member; > > > > > > > - gss_add_cred; > > > > > > > gss_add_cred_impersonate_name; > > > > > > > - gss_add_cred_with_password; > > > > > > > - gss_add_oid_set_member; > > > > > > > - gss_authorize_localname; > > > > > > > - gss_canonicalize_name; > > > > > > > - gss_compare_name; > > > > > > > gss_complete_auth_token; > > > > > > > - gss_context_time; > > > > > > > - gss_create_empty_buffer_set; > > > > > > > - gss_create_empty_oid_set; > > > > > > > - gss_decapsulate_token; > > > > > > > - gss_delete_name_attribute; > > > > > > > - gss_delete_sec_context; > > > > > > > - gss_display_mech_attr; > > > > > > > - gss_display_name; > > > > > > > - gss_display_name_ext; > > > > > > > - gss_display_status; > > > > > > > - gss_duplicate_name; > > > > > > > - gss_encapsulate_token; > > > > > > > - gss_export_cred; > > > > > > > - gss_export_name; > > > > > > > - gss_export_name_composite; > > > > > > > - gss_export_sec_context; > > > > > > > - gss_get_mic; > > > > > > > gss_get_mic_iov; > > > > > > > gss_get_mic_iov_length; > > > > > > > - gss_get_name_attribute; > > > > > > > - gss_import_cred; > > > > > > > - gss_import_name; > > > > > > > - gss_import_sec_context; > > > > > > > - gss_indicate_mechs; > > > > > > > - gss_init_sec_context; > > > > > > > - gss_indicate_mechs_by_attrs; > > > > > > > - gss_inquire_attrs_for_mech; > > > > > > > - gss_inquire_context; > > > > > > > - gss_inquire_cred; > > > > > > > - gss_inquire_cred_by_mech; > > > > > > > - gss_inquire_cred_by_oid; > > > > > > > - gss_inquire_mech_for_saslname; > > > > > > > - gss_inquire_mechs_for_name; > > > > > > > - gss_inquire_names_for_mech; > > > > > > > - gss_inquire_saslname_for_mech; > > > > > > > - gss_inquire_sec_context_by_oid; > > > > > > > - gss_krb5_ccache_name; > > > > > > > - gss_krb5_copy_ccache; > > > > > > > - gss_krb5_export_lucid_sec_context; > > > > > > > - gss_krb5_free_lucid_sec_context; > > > > > > > - gss_krb5_get_tkt_flags; > > > > > > > - gss_krb5_import_cred; > > > > > > > - gss_krb5_set_allowable_enctypes; > > > > > > > gss_krb5_set_cred_rcache; > > > > > > > gss_krb5int_make_seal_token_v3; > > > > > > > gss_krb5int_unseal_token_v3; > > > > > > > - gsskrb5_extract_authtime_from_sec_context; > > > > > > > - gsskrb5_extract_authz_data_from_sec_context; > > > > > > > gss_localname; > > > > > > > gss_map_name_to_any; > > > > > > > gss_mech_iakerb; > > > > > > > @@ -124,47 +158,16 @@ gssapi_krb5_2_MIT { > > > > > > > gss_nt_service_name_v2; > > > > > > > gss_nt_string_uid_name; > > > > > > > gss_nt_user_name; > > > > > > > - gss_oid_equal; > > > > > > > - gss_oid_to_str; > > > > > > > - gss_pname_to_uid; > > > > > > > - gss_pseudo_random; > > > > > > > - gss_process_context_token; > > > > > > > gss_release_any_name_mapping; > > > > > > > - gss_release_buffer_set; > > > > > > > - gss_release_buffer; > > > > > > > - gss_release_cred; > > > > > > > - gss_release_iov_buffer; > > > > > > > - gss_release_name; > > > > > > > - gss_release_oid; > > > > > > > - gss_release_oid_set; > > > > > > > - gss_seal; > > > > > > > - gss_set_name_attribute; > > > > > > > gss_set_neg_mechs; > > > > > > > - gss_set_sec_context_option; > > > > > > > - gss_sign; > > > > > > > - gss_store_cred; > > > > > > > gss_str_to_oid; > > > > > > > - gss_test_oid_set_member; > > > > > > > - gss_unseal; > > > > > > > - gss_unwrap; > > > > > > > gss_unwrap_aead; > > > > > > > - gss_unwrap_iov; > > > > > > > - gss_userok; > > > > > > > - gss_verify; > > > > > > > - gss_verify_mic; > > > > > > > gss_verify_mic_iov; > > > > > > > - gss_wrap; > > > > > > > gss_wrap_aead; > > > > > > > - gss_wrap_iov; > > > > > > > - gss_wrap_iov_length; > > > > > > > - gss_wrap_size_limit; > > > > > > > - gss_set_cred_option; > > > > > > > gssspi_set_cred_option; > > > > > > > gssspi_mech_invoke; > > > > > > > krb5_gss_dbg_client_expcreds; > > > > > > > - krb5_gss_register_acceptor_identity; > > > > > > > krb5_gss_use_kdc_context; > > > > > > > - gss_inquire_name; > > > > > > > gss_acquire_cred_from; > > > > > > > gss_add_cred_from; > > > > > > > gss_store_cred_into; > > > > > > > > > > > > This breaks the ABI of _current_ libc on HEAD even more. > > > > > > Please do bump the dso versions for all libs from kerberos/gss > > > > > > with same current name as it was in Heimdal time. > > > > > > > > > > In other words use Heimdal in the name instead of the names MIT uses? > > > > > > > > > > This was certainly short sighted on our part when we put Heimdal in our > > DSO > > > > > > > > > names at the time. > > > > No. > > > > > > > > Just for all libs that have the same name as old heimdal libs, bump > > > > dso version. Do not rewrite version scripts, if there are vendor-provide > > d > > > > scripts, patching it locally now would be a maintainence nightmare. > > > > > > > > I suspect that there is something unclear in "bump the dso version" > > > > suggestion. > > > > > > Those were bumped from .11 to .121 (for MIT KRB5 1.21). This should have > > > been evident from the start. > > > > It is absolutely not evident. > > > > Then, why did you do the patches against vendor versioning? > > Unless we have very good reason, we must stick to stock vendor version > > scripts. > > > > When symbol version was added (presumably to not versioned libs), dso > > version should have been bumped again, if providing strong ABI stability > > guarantees. But due to all rototiling in version scripts, I suspect > > we must admit that this is useless now. > > Sorry. I was confused as to why. We can bump to 122. Yes, please do, after all gratitious changes to the vendor version scripts are rolled back. From nobody Fri Jul 25 03:57:35 2025 X-Original-To: dev-commits-src-all@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 4bpDbg5gwPz62LPx; Fri, 25 Jul 2025 03: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpDbg2N7wz3lxq; Fri, 25 Jul 2025 03:57:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753415855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tJwbzNV7dw8Bt3PVofrw9DVYeEmhCVWKgdZm6Vlj0vc=; b=bKD84HwOQAcR5qQwqmJH5/B5KyWDW4fNDYoQs93MciApTErvUbD7afyebjmzbgbaBJDx73 WAI640TD2E2E56WvDmk0FlwMWDGSL/9uE2+HhlMiP2HzsWNdShIgEnPhCs4vQXZ+LZ+kC4 y9lutbs7iL/R3b4Fi+Oc/XUtZZPY4c4VNoMkqICLXnqsz38N/uaT/JrVLY9x6S8wlCZ0ok EwBhQ6CQ6wB0fGbK0sapmpoIk86E6ZKfTLRPjnifgDRHF0bSYRULQPA0N+R7pDyiJUUqoP k1LnIdUj0GsIRLYr1RA5MIThf1wPzHjLZLZRtCsVtZiKYJlNNmQh6rQw6O0a9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753415855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tJwbzNV7dw8Bt3PVofrw9DVYeEmhCVWKgdZm6Vlj0vc=; b=Py1xwux6F5KXOr+N9GVeMTn+4kG37KdqjE/dD8gmEr+w1E7fZhenXsozAMRHm3XQZF7ELc 9rZTWBePDDFGweAwvlBm6YlwRTVfxeR7n1RJqMM77/DEX7A9AOanvNzz5OcHzrOzs2HPGK fXMth3k2Jg7YnwrF5N7PVb0lZQbnpKnbnL5BDmnc+QaSsEhzpRA5bqpRorRzsCDQhN/Dj4 htLsNPxP1SDq3AEpxsn7UNkplJX9MJzv7WjPdWQiBqF8MX6kC3KJgtbyUxvxPiWSapLy+h 37ywVq+w47SsGz/saCpMFsjgiU9S/DzzpJ0zB3tqU9JTgOj8QvpUBj+Gsl+bTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753415855; a=rsa-sha256; cv=none; b=L3Uasy09Nbxt1CvGNh8tbaPy74Edrzha82Pk/qYSGKRwIGG/X7+iDxHqgKmbaGxToFZEas y32eXHx7ci9VDZ+sK3HB0rOv0EsDIYb/tkmYDrdISqz/d0Spveb4wo00x+3zZpN2DvrZwL DD0QBJ6PbWCoxjmtifsgK0FiIC1KSspv3Z+MQdAR7zOSSNW81q7zzHlgCkmjaPRqAG6rMJ G9Z7O7mCGLzpAZ6GynAyeVR9R5Qwa1m97ijrP/RJ5gpUjOPh2abEqYHXBPLAi/6wHm6Sms CcZIRyro7XCGV6te+rQi+78XzlXaeTWLE07AnnxD/OH7PYxiIoAsvcY3uDWYfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpDbg1ycGzCpV; Fri, 25 Jul 2025 03:57:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56P3vZrP075285; Fri, 25 Jul 2025 03:57:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56P3vZ1r075282; Fri, 25 Jul 2025 03:57:35 GMT (envelope-from git) Date: Fri, 25 Jul 2025 03:57:35 GMT Message-Id: <202507250357.56P3vZ1r075282@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Eric Joyner Subject: git: fdefa79abef2 - main - ice.4: Update man page List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: erj X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fdefa79abef25dac6c058059c8dc2b85cef1c8f7 Auto-Submitted: auto-generated The branch main has been updated by erj: URL: https://cgit.FreeBSD.org/src/commit/?id=fdefa79abef25dac6c058059c8dc2b85cef1c8f7 commit fdefa79abef25dac6c058059c8dc2b85cef1c8f7 Author: Eric Joyner AuthorDate: 2025-03-21 20:03:36 +0000 Commit: Eric Joyner CommitDate: 2025-07-24 00:02:24 +0000 ice.4: Update man page This is a combination of imported information from the out-of-tree driver's documentation, as well as some all new information: - Add previously undocumented loader tunables and expand the descriptions for all of them - Add references to the iavf and irdma man pages - Add some documentation for the DDP package (ice_ddp) - Remove mentions of the ports/packages for the utilities since those are no longer supported, and update the names of the utilities to match the names used on the Intel Download Center - Add information on RDMA and RDMA mirroring sections - Document QoS capability And more! Signed-off-by: Eric Joyner Reviewed by: ziaee@ Pull Request: https://github.com/freebsd/freebsd-src/pull/1622 Closes: https://github.com/freebsd/freebsd-src/pull/1622 --- share/man/man4/ice.4 | 946 ++++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 890 insertions(+), 56 deletions(-) diff --git a/share/man/man4/ice.4 b/share/man/man4/ice.4 index 63fdb244f3ed..3f7a9017756d 100644 --- a/share/man/man4/ice.4 +++ b/share/man/man4/ice.4 @@ -32,18 +32,18 @@ .\" .\" * Other names and brands may be claimed as the property of others. .\" -.Dd May 20, 2024 +.Dd March 28, 2025 .Dt ICE 4 .Os .Sh NAME .Nm ice -.Nd "Intel Ethernet 800 Series Driver" +.Nd "Intel\(rg Ethernet 800 Series Driver" .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your kernel configuration file: -.Bd -ragged -offset indent -.Cd "device iflib" -.Cd "device ice" +.Bd -literal -offset indent +.Cd device iflib +.Cd device ice .Ed .Pp To load the driver as a module at boot time, place the following lines in @@ -57,7 +57,7 @@ The .Nm driver provides support for any PCI Express adapter or LOM (LAN On Motherboard) -in the Intel Ethernet 800 Series. +in the Intel\(rg Ethernet 800 Series. As of this writing, the series includes devices with these model numbers: .Pp .Bl -bullet -compact @@ -73,6 +73,16 @@ Intel\(rg Ethernet Connection E822\-L Intel\(rg Ethernet Connection E823\-C .It Intel\(rg Ethernet Connection E823\-L +.It +Intel\(rg Ethernet Connection E825\-C +.It +Intel\(rg Ethernet Connection E830\-C +.It +Intel\(rg Ethernet Connection E830\-CC +.It +Intel\(rg Ethernet Connection E830\-L +.It +Intel\(rg Ethernet Connection E830\-XXV .El .Pp For questions related to hardware requirements, refer to the documentation @@ -83,11 +93,17 @@ Selecting an MTU larger than 1500 bytes with the .Xr ifconfig 8 utility configures the adapter to receive and transmit Jumbo Frames. The maximum MTU size for Jumbo Frames is 9706. -This value coincides with the maximum Jumbo Frame size of 9728. +For more information, see the +.Sx Jumbo Frames +section. .Pp This driver version supports VLANs. -For information on enabling VLANs, see the -.Pa README . +For information on enabling VLANs, see +.Xr vlan 4 . +For additional information on configuring VLANs, see +.Xr ifconfig 8 Ap s +.Dq VLAN Parameters +section. .Pp Offloads are also controlled via the interface, for instance, checksumming for both IPv4 and IPv6 can be set and unset, TSO4 and/or TSO6, and finally LRO can @@ -95,29 +111,739 @@ be set and unset. .Pp For more information on configuring this device, see .Xr ifconfig 8 . +.Pp +The associated Virtual Function (VF) driver for this driver is +.Xr iavf 4 . +.Pp +The associated RDMA driver for this driver is +.Xr irdma 4 . +.Ss Dynamic Device Personalization +The DDP package loads during device initialization. +The driver looks for the +.Sy ice_ddp +module and checks that it contains a valid DDP package file. +.Pp +If the driver is unable to load the DDP package, the device will enter Safe +Mode. +Safe Mode disables advanced and performance features and supports only +basic traffic and minimal functionality, such as updating the NVM or +downloading a new driver or DDP package. +Safe Mode only applies to the affected physical function and does not impact +any other PFs. +See the +.Dq Intel\(rg Ethernet Adapters and Devices User Guide +for more details on DDP and Safe Mode. +.Pp +If you encounter issues with the DDP package file, you may need to download +an updated driver or +.Sy ice_ddp +module. +See the log messages for more information. +.Pp +You cannot update the DDP package if any PF drivers are already loaded. +To overwrite a package, unload all PFs and then reload the driver with the +new package. +.Pp +You can only use one DDP package per driver, even if you have more than one +device installed that uses the driver. +.Pp +Only the first loaded PF per device can download a package for that device. +.Ss Jumbo Frames +Jumbo Frames support is enabled by changing the Maximum Transmission Unit (MTU) +to a value larger than the default value of 1500. +.Pp +Use +.Xr ifconfig 8 +to increase the MTU size. +.Pp +The maximum MTU setting for jumbo frames is 9706. +This corresponds to the maximum jumbo frame size of 9728 bytes. +.Pp +This driver will attempt to use multiple page sized buffers to receive +each jumbo packet. +This should help to avoid buffer starvation issues when allocating receive +packets. +.Pp +Packet loss may have a greater impact on throughput when you use jumbo +frames. +If you observe a drop in performance after enabling jumbo frames, enabling +flow control may mitigate the issue. +.Ss Remote Direct Memory Access +Remote Direct Memory Access, or RDMA, allows a network device to transfer data +directly to and from application memory on another system, increasing +throughput and lowering latency in certain networking environments. +.Pp +The ice driver supports both the iWARP (Internet Wide Area RDMA Protocol) and +RoCEv2 (RDMA over Converged Ethernet) protocols. +The major difference is that iWARP performs RDMA over TCP, while RoCEv2 uses +UDP. +.Pp +Devices based on the Intel\(rg Ethernet 800 Series do not support RDMA when +operating in multiport mode with more than 4 ports. +.Pp +For detailed installation and configuration information for RDMA, see +.Xr irdma 4 . +.Ss RDMA Monitoring +For debugging/testing purposes, you can use sysctl to set up a mirroring +interface on a port. +The interface can receive mirrored RDMA traffic for packet +analysis tools like +.Xr tcpdump 1 . +This mirroring may impact performance. +.Pp +To use RDMA monitoring, you may need to reserve more MSI\-X interrupts. +Before the +.Nm +driver loads, configure the following tunable provided by +.Xr iflib 4 : +.Bd -literal -offset indent +dev.ice..iflib.use_extra_msix_vectors=4 +.Ed +.Pp +You may need to adjust the number of extra MSI\-X interrupt vectors. +.Pp +To create/delete the interface: +.Bd -literal -offset indent +sysctl dev.ice..create_interface=1 +sysctl dev.ice..delete_interface=1 +.Ed +.Pp +The mirrored interface receives both LAN and RDMA traffic. +Additional filters can be configured in tcpdump. +.Pp +To differentiate the mirrored interface from the primary interface, the network +interface naming convention is: +.Bd -literal -offset indent + +.Ed +.Pp +For example, +.Dq Li ice0m0 +is the first mirroring interface on +.Dq Li ice0 . +.Ss Data Center Bridging +Data Center Bridging (DCB) is a configuration Quality of Service +implementation in hardware. +It uses the VLAN priority tag (802.1p) to filter traffic. +That means that there are 8 different priorities that traffic can be filtered +into. +It also enables priority flow control (802.1Qbb) which can limit or eliminate +the number of dropped packets during network stress. +Bandwidth can be allocated to each of these priorities, which is enforced at +the hardware level (802.1Qaz). +.Pp +DCB is normally configured on the network using the DCBX protocol (802.1Qaz), a +specialization of LLDP (802.1AB). The +.Nm +driver supports the following mutually exclusive variants of DCBX support: +.Bl -bullet -compact +.It +Firmware\-based LLDP Agent +.It +Software\-based LLDP Agent +.El +.Pp +In firmware\-based mode, firmware intercepts all LLDP traffic and handles DCBX +negotiation transparently for the user. +In this mode, the adapter operates in +.Dq willing +DCBX mode, receiving DCB settings from the link partner (typically a +switch). +The local user can only query the negotiated DCB configuration. +For information on configuring DCBX parameters on a switch, please consult the +switch manufacturer'ss documentation. +.Pp +In software\-based mode, LLDP traffic is forwarded to the network stack and user +space, where a software agent can handle it. +In this mode, the adapter can operate in +.Dq nonwilling +DCBX mode and DCB configuration can be both queried and set locally. +This mode requires the FW\-based LLDP Agent to be disabled. +.Pp +Firmware\-based mode and software\-based mode are controlled by the +.Dq fw_lldp_agent +sysctl. +Refer to the Firmware Link Layer Discovery Protocol Agent section for more +information. +.Pp +Link\-level flow control and priority flow control are mutually exclusive. +The ice driver will disable link flow control when priority flow control +is enabled on any traffic class (TC). +It will disable priority flow control when link flow control is enabled. +.Pp +To enable/disable priority flow control in software\-based DCBX mode: +.Bd -literal -offset indent +sysctl dev.ice..pfc=1 (or 0 to disable) +.Ed +.Pp +Enhanced Transmission Selection (ETS) allows you to assign bandwidth to certain +TCs, to help ensure traffic reliability. +To view the assigned ETS configuration, use the following: +.Bd -literal -offset indent +sysctl dev.ice..ets_min_rate +.Ed +.Pp +To set the minimum ETS bandwidth per TC, separate the values by commas. +All values must add up to 100. +For example, to set all TCs to a minimum bandwidth of 10% and TC 7 to 30%, +use the following: +.Bd -literal -offset indent +sysctl dev.ice..ets_min_rate=10,10,10,10,10,10,10,30 +.Ed +.Pp +To set the User Priority (UP) to a TC mapping for a port, separate the values +by commas. +For example, to map UP 0 and 1 to TC 0, UP 2 and 3 to TC 1, UP 4 and +5 to TC 2, and UP 6 and 7 to TC 3, use the following: +.Bd -literal -offset indent +sysctl dev.ice..up2tc_map=0,0,1,1,2,2,3,3 +.Ed +.Ss L3 QoS mode +The +.Nm +driver supports setting DSCP\-based Layer 3 Quality of Service (L3 QoS) +in the PF driver. +The driver initializes in L2 QoS mode by default; L3 QoS is disabled by +default. +Use the following sysctl to enable or disable L3 QoS: +.Bd -literal -offset indent +sysctl dev.ice..pfc_mode=1 (or 0 to disable) +.Ed +.Pp +If you disable L3 QoS mode, it returns to L2 QoS mode. +.Pp +To map a DSCP value to a traffic class, separate the values by commas. +For example, to map DSCPs 0\-3 and DSCP 8 to DCB TCs 0\-3 and 4, respectively: +.Bd -literal -offset indent +sysctl dev.ice..dscp2tc_map.0\-7=0,1,2,3,0,0,0,0 +sysctl dev.ice..dscp2tc_map.8\-15=4,0,0,0,0,0,0,0 +.Ed +.Pp +To change the DSCP mapping back to the default traffic class, set all the +values back to 0. +.Pp +To view the currently configured mappings, use the following: +.Bd -literal -offset indent +sysctl dev.ice..dscp2tc_map +.Ed +.Pp +L3 QoS mode is not available when FW\-LLDP is enabled. +.Pp +You also cannot enable FW\-LLDP if L3 QoS mode is active. +.Pp +Disable FW\-LLDP before switching to L3 QoS mode. +.Pp +Refer to the +.Sx Firmware Link Layer Discovery Protocol Agent +section in this README for more information on disabling FW\-LLDP. +.Ss Firmware Link Layer Discovery Protocol Agent +Use sysctl to change FW\-LLDP settings. +The FW\-LLDP setting is per port and persists across boots. +.Pp +To enable the FW\-LLDP Agent: +.Bd -literal -offset indent +sysctl dev.ice..fw_lldp_agent=1 +.Ed +.Pp +To disable the FW\-LLDP Agebt: +.Bd -literal -offset indent +sysctl dev.ice..fw_lldp_agent=0 +.Ed +.Pp +To check the current LLDP setting: +.Bd -literal -offset indent +sysctl dev.ice..fw_lldp_agent +.Ed +.Pp +You must enable the UEFI HII LLDP Agent attribute for this setting +to take effect. +If the +.Dq LLDP AGENT +attribute is set to disabled, you cannot enable the FW\-LLDP Agent from the +driver. +.Ss Link\-Level Flow Control (LFC) +Ethernet Flow Control (IEEE 802.3x) can be configured with sysctl to enable +receiving and transmitting pause frames for +.Nm . +When transmit is enabled, pause frames are generated when the receive packet +buffer crosses a predefined threshold. +When receive is enabled, the transmit unit will halt for the time delay +specified in the firmware when a pause frame is received. +.Pp +Flow Control is disabled by default. +.Pp +Use sysctl to change the flow control settings for a single interface without +reloading the driver: +.Bd -literal -offset indent +sysctl dev.ice..fc +.Ed +.Pp +The available values for flow control are: +.Bd -literal -offset indent +0 = Disable flow control +1 = Enable Rx pause +2 = Enable Tx pause +3 = Enable Rx and Tx pause +.Ed +.Pp +Verify that link flow control was negotiated on the link by checking the +interface entry in +.Xr ifconfig 8 +and looking for the flags +.Dq txpause +and/or +.Dq rxpause +in the +.Dq media +status. +.Pp +The +.Nm +driver requires flow control on both the port and link partner. +If flow control is disabled on one of the sides, the port may appear to +hang on heavy traffic. +.Pp +For more information on priority flow control, refer to the +.Sx Data Center Bridging +section. +.Pp +The VF driver does not have access to flow control. +It must be managed from the host side. +.Ss Forward Error Correction +Forward Error Correction (FEC) improves link stability but increases latency. +Many high quality optics, direct attach cables, and backplane channels can +provide a stable link without FEC. +.Pp +For devices to benefit from this feature, link partners must have FEC enabled. +.Pp +If you enable the sysctl +.Em allow_no_fec_modules_in_auto +Auto FEC negotiation will include +.Dq No FEC +in case your link partner does not have FEC enabled or is not FEC capable: +.Bd -literal -offset indent +sysctl dev.ice..allow_no_fec_modules_in_auto=1 +.Ed +.Pp +NOTE: This flag is currently not supported on the Intel\(rg Ethernet 830 +Series. +.Pp +To show the current FEC settings that are negotiated on the link: +.Bd -literal -offset indent +sysctl dev.ice..negotiated_fec +.Ed +.Pp +To view or set the FEC setting that was requested on the link: +.Bd -literal -offset indent +sysctl dev.ice..requested_fec +.Ed +.Pp +To see the valid FEC modes for the link: +.Bd -literal -offset indent +sysctl \-d dev.ice..requested_fec +.Ed +.Ss Speed and Duplex Configuration +You cannot set duplex or autonegotiation settings. +.Pp +To have your device change the speeds it will use in auto-negotiation or +force link with: +.Bd -literal -offset indent +sysctl dev.ice..advertise_speed= +.Ed +.Pp +Supported speeds will vary by device. +Depending on the speeds your device supports, valid bits used in a speed mask +could include: +.Bd -literal -offset indent +0x0 \- Auto +0x2 \- 100 Mbps +0x4 \- 1 Gbps +0x8 \- 2.5 Gbps +0x10 \- 5 Gbps +0x20 \- 10 Gbps +0x80 \- 25 Gbps +0x100 \- 40 Gbps +0x200 \- 50 Gbps +0x400 \- 100 Gbps +0x800 \- 200 Gbps +.Ed +.Ss Disabling physical link when the interface is brought down +When the +.Va link_active_on_if_down +sysctl is set to +.Dq 0 , +the port's link will go down when the interface is brought down. +By default, link will stay up. +.Pp +To disable link when the interface is down: +.Bd -literal -offset indent +sysctl dev.ice..link_active_on_if_down=0 +.Ed +.Ss Firmware Logging +The +.Nm +driver allows for the generation of firmware logs for supported categories of +events, to help debug issues with Customer Support. +Refer to the +.Dq Intel\(rg Ethernet Adapters and Devices User Guide +for an overview of this feature and additional tips. +.Pp +At a high level, to capture a firmware log: +.Bl -enum -compact +.It +Set the configuration for the firmware log. +.It +Perform the necessary steps to generate the issue you are trying to debug. +.It +Capture the firmware log. +.It +Stop capturing the firmware log. +.It +Reset your firmware log settings as needed. +.It +Work with Customer Support to debug the issue. +.El +.Pp +NOTE: Firmware logs are generated in a binary format and must be decoded by +Customer Support. +Information collected is related only to firmware and hardware for debug +purposes. +.Pp +Once the driver is loaded, it will create the +.Va fw_log +sysctl node under the debug section of the driver's sysctl list. +The driver groups these events into categories, called +.Dq modules . +Supported modules include: +.Pp +.Bl -tag -offset indent -compact -width "task_dispatch" +.It Va general +General (Bit 0) +.It Va ctrl +Control (Bit 1) +.It Va link +Link Management (Bit 2) +.It Va link_topo +Link Topology Detection (Bit 3) +.It Va dnl +Link Control Technology (Bit 4) +.It Va i2c +I2C (Bit 5) +.It Va sdp +SDP (Bit 6) +.It Va mdio +MDIO (Bit 7) +.It Va adminq +Admin Queue (Bit 8) +.It Va hdma +Host DMA (Bit 9) +.It Va lldp +LLDP (Bit 10) +.It Va dcbx +DCBx (Bit 11) +.It Va dcb +DCB (Bit 12) +.It Va xlr +XLR (function\-level resets; Bit 13) +.It Va nvm +NVM (Bit 14) +.It Va auth +Authentication (Bit 15) +.It Va vpd +Vital Product Data (Bit 16) +.It Va iosf +Intel On\-Chip System Fabric (Bit 17) +.It Va parser +Parser (Bit 18) +.It Va sw +Switch (Bit 19) +.It Va scheduler +Scheduler (Bit 20) +.It Va txq +TX Queue Management (Bit 21) +.It Va acl +ACL (Access Control List; Bit 22) +.It Va post +Post (Bit 23) +.It Va watchdog +Watchdog (Bit 24) +.It Va task_dispatch +Task Dispatcher (Bit 25) +.It Va mng +Manageability (Bit 26) +.It Va synce +SyncE (Bit 27) +.It Va health +Health (Bit 28) +.It Va tsdrv +Time Sync (Bit 29) +.It Va pfreg +PF Registration (Bit 30) +.It Va mdlver +Module Version (Bit 31) +.El +.Pp +You can change the verbosity level of the firmware logs. +You can set only one log level per module, and each level includes the +verbosity levels lower than it. +For instance, setting the level to +.Dq normal +will also log warning and error messages. +Available verbosity levels are: +.Pp +.Bl -item -offset indent -compact +.It +0 = none +.It +1 = error +.It +2 = warning +.It +3 = normal +.It +4 = verbose +.El +.Pp +To set the desired verbosity level for a module, use the following sysctl +command and then register it: +.Bd -literal -offset indent +sysctl dev.ice..debug.fw_log.severity.= +.Ed +.Pp +For example: +.Bd -literal -offset indent +sysctl dev.ice.0.debug.fw_log.severity.link=1 +sysctl dev.ice.0.debug.fw_log.severity.link_topo=2 +sysctl dev.ice.0.debug.fw_log.register=1 +.Ed +.Pp +To log firmware messages after booting, but before the driver initializes, use +.Xr kenv 1 +to set the tunable. +The +.Va on_load +setting tells the device to register the variable as soon as possible during +driver load. +For example: +.Bd -literal -offset indent +kenv dev.ice.0.debug.fw_log.severity.link=1 +kenv dev.ice.0.debug.fw_log.severity.link_topo=2 +kenv dev.ice.0.debug.fw_log.on_load=1 +.Ed +.Pp +To view the firmware logs and redirect them to a file, use the following +command: +.Bd -literal -offset indent +dmesg > log_output +.Ed +.Pp +NOTE: Logging a large number of modules or too high of a verbosity level will +add extraneous messages to dmesg and could hinder debug efforts. +.Ss Debug Dump +Intel\(rg Ethernet 800 Series devices support debug dump, which allows you to +obtain runtime register values from the firmware for +.Dq clusters +of events and then write the results to a single dump file, for debugging +complicated issues in the field. +.Pp +This debug dump contains a snapshot of the device and its existing hardware +configuration, such as switch tables, transmit scheduler tables, and other +information. +Debug dump captures the current state of the specified cluster(s) and is a +stateless snapshot of the whole device. +.Pp +NOTE: Like with firmware logs, the contents of the debug dump are not +human\-readable. +You must work with Customer Support to decode the file. +.Pp +Debug dump is per device, not per PF. +.Pp +Debug dump writes all information to a single file. +.Pp +To generate a debug dump file in +.Fx +do the following: +.Pp +Specify the cluster(s) to include in the dump file, using a bitmask and the +following command: +.Bd -literal -offset indent +sysctl dev.ice..debug.dump.clusters= +.Ed +.Pp +To print the complete cluster bitmask and parameter list to the screen, +pass the +.Fl d +argument. +For example: +.Bd -literal -offset indent +sysctl \-d dev.ice.0.debug.dump.clusters +.Ed +.Pp +Possible bitmask values for +.Va clusters +are: +.Bl -bullet -compact +.It +0 \- Dump all clusters (only supported on Intel\(rg Ethernet E810 Series and +Intel\(rg Ethernet E830 Series) +.It +0x1 \- Switch +.It +0x2 \- ACL +.It +0x4 \- Tx Scheduler +.It +0x8 \- Profile Configuration +.It +0x20 \- Link +.It +0x80 \- DCB +.It +0x100 \- L2P +.It +0x400000 \- Manageability Transactions (only supported on Intel\(rg Ethernet +E810 Series) +.El +.Pp +For example, to dump the Switch, DCB, and L2P clusters, use the following: +.Bd -literal -offset indent +sysctl dev.ice.0.debug.dump.clusters=0x181 +.Ed +.Pp +To dump all clusters, use the following: +.Bd -literal -offset indent +sysctl dev.ice.0.debug.dump.clusters=0 +.Ed +.Pp +NOTE: Using 0 will skip Manageability Transactions data. +.Pp +If you don't specify a cluster, the driver will dump all clusters to a +single file. +Issue the debug dump command, using the following: +.Bd -literal -offset indent +sysctl \-b dev.ice..debug.dump.dump=1 > dump.bin +.Ed +.Pp +NOTE: The driver will not receive the command if you do not write +.Dq 1 +to the sysctl. +.Pp +Replace +.Dq dump.bin +above with the file name you want to use. +.Pp +To clear the +.Va clusters +mask before a subsequent debug dump and then do the dump: +.Bd -literal -offset indent +sysctl dev.ice.0.debug.dump.clusters=0 +sysctl dev.ice.0.debug.dump.dump=1 +.Ed +.Ss Debugging PHY Statistics +The ice driver supports the ability to obtain the values of the PHY registers +from Intel(R) Ethernet 810 Series devices in order to debug link and +connection issues during runtime. +.Pp +The driver allows you to obtain information about: +.Bl -bullet +.It +Rx and Tx Equalization parameters +.It +RS FEC correctable and uncorrectable block counts +.El +.Pp +Use the following sysctl to read the PHY registers: +.Bd -literal -offset indent +sysctl dev.ice..debug.phy_statistics +.Ed +.Pp +NOTE: The contents of the registers are not human\-readable. +Like with firmware logs and debug dump, you must work with Customer Support +to decode the file. +.Ss Transmit Balancing +Some Intel(R) Ethernet 800 Series devices allow you to enable a transmit +balancing feature to improve transmit performance under certain conditions. +When the feature is enabled, you should experience more consistent transmit +performance across queues and/or PFs and VFs. +.Pp +By default, transmit balancing is disabled in the NVM. +To enable this feature, use one of the following to persistently change the +setting for the device: +.Bl -bullet +.It +Use the Ethernet Port Configuration Tool (EPCT) to enable the +.Va tx_balancing +option. +Refer to the EPCT readme for more information. +.It +Enable the Transmit Balancing device setting in UEFI HII. +.El +.Pp +When the driver loads, it reads the transmit balancing setting from the NVM and +configures the device accordingly. +.Pp +NOTE: The user selection for transmit balancing in EPCT or HII is persistent +across reboots. +You must reboot the system for the selected setting to take effect. +.Pp +This setting is device wide. +.Pp +The driver, NVM, and DDP package must all support this functionality to +enable the feature. +.Ss Thermal Monitoring +Intel(R) Ethernet 810 Series and Intel(R) Ethernet 830 Series devices can +display temperature data (in degrees Celsius) via: +.Bd -literal -offset indent +sysctl dev.ice..temp +.Ed +.Ss Network Memory Buffer Allocation +.Fx +may have a low number of network memory buffers (mbufs) by default. +If the number of mbufs available is too low, it may cause the driver to fail +to initialize and/or cause the system to become unresponsive. +You can check to see if the system is mbuf\-starved by running +.Ic netstat Fl m . +Increase the number of mbufs by editing the lines below in +.Pa /etc/sysctl.conf : +.Bd -literal -offset indent +kern.ipc.nmbclusters +kern.ipc.nmbjumbop +kern.ipc.nmbjumbo9 +kern.ipc.nmbjumbo16 +kern.ipc.nmbufs +.Ed +.Pp +The amount of memory that you allocate is system specific, and may require some +trial and error. +Also, increasing the following in +.Pa /etc/sysctl.conf +could help increase network performance: +.Bd -literal -offset indent +kern.ipc.maxsockbuf +net.inet.tcp.sendspace +net.inet.tcp.recvspace +net.inet.udp.maxdgram +net.inet.udp.recvspace +.Ed .Ss Additional Utilities There are additional tools available from Intel to help configure and update the adapters covered by this driver. These tools can be downloaded directly from Intel at .Lk https://downloadcenter.intel.com , -by searching for their names, or by installing certain packages: +by searching for their names: .Bl -bullet .It -To change the behavior of the QSFP28 ports on E810-C adapters, use the -Intel EPCT (Ethernet Port configuration tool); installed by the -.Em sysutils/intel-epct -package. +To change the behavior of the QSFP28 ports on E810-C adapters, use the Intel +.Sy Ethernet Port Configuration Tool - FreeBSD . .It -To update the firmware on an adapter, use the Intel Non-Volatile Memory (NVM) -Update Utility for Intel Network Adapter 800 series; installed by the -.Em sysutils/intel-nvmupdate-100g -package. +To update the firmware on an adapter, use the Intel +.Sy Non-Volatile Memory (NVM) Update Utility for Intel Ethernet Network Adapters E810 series - FreeBSD .El .Sh HARDWARE The .Nm driver supports the Intel Ethernet 800 series. -Most adapters in this series with SFP28/QSFP28 cages +Some adapters in this series with SFP28/QSFP28 cages have firmware that requires that Intel qualified modules are used; these qualified modules are listed below. This qualification check cannot be disabled by the driver. @@ -173,6 +899,38 @@ SFF-8472 v10.4 specifications. .Pp This is not an exhaustive list; please consult product documentation for an up-to-date list of supported media. +.Ss Fiber optics and auto\-negotiation +Modules based on 100GBASE\-SR4, active optical cable (AOC), and active copper +cable (ACC) do not support auto\-negotiation per the IEEE specification. +To obtain link with these modules, auto\-negotiation must be turned off on the +link partner's switch ports. +.Ss PCI-Express Slot Bandwidth +Some PCIe x8 slots are actually configured as x4 slots. +These slots have insufficient bandwidth for full line rate with dual port and +quad port devices. +In addition, if you put a PCIe v4.0 or v3.0\-capable adapter into a PCIe v2.x +slot, you cannot get full bandwidth. +.Pp +The driver detects this situation and writes the following message in the +system log: +.Bd -literal -offset indent +PCI\-Express bandwidth available for this device may be insufficient for +optimal performance. +Please move the device to a different PCI\-e link with more lanes and/or +higher transfer rate. +.Ed +.Pp +If this error occurs, moving your adapter to a true PCIe x8 or x16 slot will +resolve the issue. +For best performance, install devices in the following PCI slots: +.Bl -bullet +.It +Any 100Gbps\-capable Intel(R) Ethernet 800 Series device: Install in a +PCIe v4.0 x8 or v3.0 x16 slot +.It +A 200Gbps\-capable Intel(R) Ethernet 830 Series device: Install in a +PCIe v5.0 x8 or v4.0 x16 slot +.El .Sh LOADER TUNABLES Tunables can be set at the .Xr loader 8 @@ -182,42 +940,62 @@ See the .Xr iflib 4 man page for more information on using iflib sysctl variables as tunables. .Bl -tag -width indent -.It Va hw.ice.#.enable_health_events -TBW -.It Va hw.ice.#.debug.enable_tx_fc_filter -TBW -.It Va hw.ice.#.debug.enable_tx_lldp_filter -TBW -.It Va hw.ice.#.debug.enable_health_events -TBW -.El -.Sh SYSCTL PROCEDURES +.It Va hw.ice.enable_health_events +Set to 1 to enable firmware health event reporting across all devices. +Enabled by default. +.Pp +If enabled, when the driver receives a firmware health event message, it will +print out a description of the event to the kernel message buffer and if +applicable, possible actions to take to remedy it. +.It Va hw.ice.irdma +Set to 1 to enable the RDMA client interface, required by the +.Xr irdma 4 +driver. +Enabled by default. +.It Va hw.ice.rdma_max_msix +Set the maximum number of per-device MSI-X vectors that are allocated for use +by the +.Xr irdma 4 +driver. +Set to 64 by default. +.It Va hw.ice.debug.enable_tx_fc_filter +Set to 1 to enable the TX Flow Control filter across all devices. +Enabled by default. +.Pp +If enabled, the hardware will drop any transmitted Ethertype 0x8808 control +frames that do not originate from the hardware. +.It Va hw.ice.debug.enable_tx_lldp_filter +Set to 1 to enable the TX LLDP filter across all devices. +Enabled by default. +.Pp +If enabled, the hardware will drop any transmitted Ethertype 0x88cc LLDP frames +that do not originate from the hardware. +This must be disabled in order to use LLDP daemon software such as +.Xr lldpd 8 . +.It Va hw.ice.debug.ice_tx_balance_en +Set to 1 to allow the driver to use the 5-layer Tx Scheduler tree topology if +configured by the DDP package. +.Pp +Enabled by default. +.El +.Sh SYSCTL VARIABLES .Bl -tag -width indent -.It Va dev.ice.#.fc -Allows one to set the flow control value. -A value of 0 disables flow control, 3 enables full, 1 is RX, and 2 is -TX pause. -.It Va dev.ice.#.advertise_speed -Allows one to set advertised link speeds, this will then cause a link -renegotiation. .It Va dev.ice.#.current_speed -This is a display of the current setting. +This is a display of the current link speed of the interface. +This is expected to match the speed of the media type in-use displayed by +.Xr ifconfig 8 . .It Va dev.ice.#.fw_version Displays the current firmware and NVM versions of the adapter. +This information should be submitted along with any support requests. .It Va dev.ice.#.ddp_version -TBW -.It Va dev.ice.#.requested_fec -TBW -.It Va dev.ice.#.negotiated_fec -TBW -.It Va dev.ice.#.fw_lldp_agent -TBW -.It Va dev.ice.#.ets_min_rate -TBW -.It Va dev.ice.#.up2tc_map -TBW -.It Va dev.ice.#.pfc -TBW +Displays the current DDP package version downloaded to the adapter. +This information should be submitted along with any support requests. +.It Va dev.ice.#.pba_number +Displays the Product Board Assembly Number. *** 91 LINES SKIPPED *** From nobody Fri Jul 25 09:05:09 2025 X-Original-To: dev-commits-src-all@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 4bpMQd3KSqz62tct; Fri, 25 Jul 2025 09:05:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpMQd2TZWz3wkg; Fri, 25 Jul 2025 09:05:13 +0000 (UTC) (envelope-from avg@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753434313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=dSWdHpUF69xKzP3vNVtlOu7agXYHxWO8QpK6gIkiFrY=; b=R229qIGaBEC5ihdxVaAW5SOWtSqlp8oqfBjBJDz0iE2/3RwVM2oS1y6G8Q80r9v9NZJqM6 0kcsEBxQEI3jsNrRhg4K2/aDyGc95qkWzR75Zlp21sIdTSuZLtEsE+tt0UJSO80DRYFwJF S0oXBdXDlL5NYJpPrY1kbT/19cKEJJ3f2TBwVujChLLbqTi/+dv5Xc2kf+HhWOTnsU8yMf UV2sTE/Ixo6U3ubHenT+gYYrIHBS/prfWpdXp1PWeGHsPgBObT2Fd7bbR+aBBrWB5Wq2Dy VvxZju1Ko6dnlHzS9yTGQJUE96ew6FNHxqkvG7E0sLtjvJ62o4JYAR1NQDaGlg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753434313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:autocrypt:autocrypt; bh=dSWdHpUF69xKzP3vNVtlOu7agXYHxWO8QpK6gIkiFrY=; b=Ljat1+D1wn4bu1r1PhB0G7h106uZ2FSVE5/KXoaUzb7MvnyE67yWzP+/X+MCLJB9uF0kGE Uy/l/deZRTGvW44SH/wHVH+td2i2NfzydPIRrLgmuPVLHUol0xP+WIXhCcMpKpYx0EOgVi LUCAaLj0XCbJBmFq0jmRzoPDkkUSh5cdi9E+LxghMqE2Qru3yxANJo7NWK/69esiX1Joc3 hCNVwLhtYV/NC98ykf+PcWkaUSQAnEsIdEv+gO839SjYfsBlbUySI0BsdGrFHZQdzfBAms Ar7VjHAoxPg6oUoyGDV6JWWFpNW2na/JZkXcC/4TGcC8dS4yEThYuQyFtvb85w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753434313; a=rsa-sha256; cv=none; b=WZRsV3AqVJJiE/9yuH51ZX3FwAhkyQtaXJVzHaNJxf5iHkvBPHO3ozWemwvfvgM6ded8eM jCI+JuuFADGhdLhqtwKPnigAAyslzyRBYi6eCer2BUfsRhHyQi+k6h2v/zs+StRGhKUiWp UxDeOXyUEvQNfQ6vzlB5heCzLBOijCEY6nOp/ETQx5xdsJ5nOpSLVKTclE5TdTYlFP8S4j 2R/GVocnl5+N32SEi9vPpoLiMumGJ7vC2PcYsLsALaOlDY80GUUZv5PZ4wuttXaeJBRfN8 ez8mfI7DTcIfiA0W1Q24xrhYYL6AAeWataKaviFZWXRrNx/n5xnmoazgWGY3LQ== Received: from [192.168.0.88] (unknown [93.188.39.137]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) (Authenticated sender: avg/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4bpMQc4r5Mz1R46; Fri, 25 Jul 2025 09:05:12 +0000 (UTC) (envelope-from avg@FreeBSD.org) Message-ID: Date: Fri, 25 Jul 2025 12:05:09 +0300 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 441995e161a2 - main - memchr.3: mention the len argument in the functions description To: Konstantin Belousov , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <202507221511.56MFBlfh096304@gitrepo.freebsd.org> Content-Language: en-US From: Andriy Gapon Autocrypt: addr=avg@FreeBSD.org; keydata= xsDNBGcKrHEBDADRvwQOK0b/yo4ys5cs6bOQMhEh4xtfbaZ/CU00cpPgUip3sOZCdrtMWlRC g25z97prxE9pKueZi+HXDhIPpa9xl14ghqF4oYScuJ1i18HyiOH2y5Q3Vv/TtFiSzicd3EAu QgS3jVidpgDSPDdj2Yz3UxYpZ+PuFl6nOnvCvqOFcjUlzKCyPaiN2b86l1Nscmhnc+zQ/faB erUOEFEDQbWMA5YfXi8HrbeR16hfRfGt7E0aMDlIj9FIPIq71UWMN9CimPgs4+rbNr1MAlLa z4GxSDhVYZEY5rqtCzr+PLXboRQWnaUwXl0/biw9enf17NHdYv1SNAFTX2eC4dZ3qBVI74dS PgNprm+PMfz+6Hhs/dAv+Nan5nVhg3EFIjYTiy0MnjMSq8uI0v0ykpAGAcJJ5xl6d23aLxgN 6f0z6pJRCO0hGPgU7UzvFD0MxJxmbzqdT1R51KDan1oD41b+tjl2LMBuCDCoB0U44Pu0zLdp xMfFTxCXtwIYKIUxwd28jwMAEQEAAc0eQW5kcml5IEdhcG9uIDxhdmdARnJlZUJTRC5vcmc+ wsENBBMBCAA3FiEEmXvSmjiQFHPVOpLnzDOt5NLj67sFAmcKrHEFCQeEzgACGwMECwkIBwUV CAkKCwUWAgMBAAAKCRDMM63k0uPru5tSDACFK15LLbq89RSQ6QMnjiIm1t/wYJyumb519MHu Dhzxx1lbr8oghf0RHtF6kYRLQPaW2VdToi74pRobd3CN4bhZKDLSL6WfTn17RfavDjL6Njwp KBo30CkOeYKWq1mDmo0xEoQj8cc7ybEZnus+YScZOpj8Ti4EFwhRt6SHer7YDb161IHKL8m4 MsCxpFSGEjbKj8Iul3Ri/fTOO8w14ivcuEEQIvJt4/+4YV5Az8G23wKzL/3aJ7SOT3oYGmR9 atBTmVO3DlODjM+rZLegd8SfLSPTcBTHspWE5duemIzZbEX3BP77r3Qx4Fo5Tkit3bG1XVar yPQato+sFGFEGifdE9USBQoAoOaaeZevwAWjDU0TIuCT0CUe0sKtQuNP4LRq0n9EEHOXBu9a CfdMhFUSkAZnuE7miSVwgPvoVNJ1stA37EXLN/sVsWik7wslTQ5vF81VpdGFiwoQPOe2XEKh ogcwGSnXbwv1gD4x+Gz/7Y+kFyr1NY+4/nSaeXVcS2fOwM0EZwqscgEMAMQTe6ypAmQe/TFO HqKD2hfFKdksTptKi6uEh8xIwct8G/0FBldDWXo9eu8CGr/ZrDg0/bAwJxbaLRQCMH19Gq2Y hLvZ1QK5GQJVzZKcqfxbF2LiDUTs6WkdOBIhGpdDy7p1xFrvqCGCtNFYHuGYm067EozibBSF BWAPstKu2FQuVHZNMOfs7p3OIz3Yfqu9woXDeg3/8G2qVQJINe+8EwXKlhgh4CyDbq7nAZoA kIu1SE9z9u3WI5mcNy/0dFmVUsFxBqRC3ewbvzie8tKyZ9yFOlaZPT0Y4nRBXQTI3mLZ8zQ8 mtrWK5OOmrJ02kdeO9RBXe+OMaUUWMf92ZIoBFb4HP6N+B+4N1y1OwULousfl7JRoYxA4MRL ls7E2sSoJvrEBTJB3Pc34xu8rsJ1A5V3NgN6djX8yEZYpTRkcmrBeWy/ofDqZPVqneAx0LRm eldDS9msXDW4KXODyPZ+9unvmHAcoH0xaBYaSH44CDZDQDg4LNcmbOvuu1TEXBJhjQARAQAB wsD8BBgBCAAmFiEEmXvSmjiQFHPVOpLnzDOt5NLj67sFAmcKrHMFCQeEzgACGwwACgkQzDOt 5NLj67sUCAv5AXqgWnYN9EblapMbZjkiqL8pZQ0GNqh+Pg9FwbyULxjtRTO6rD4D0IxizByb ef+neeUNyYlagt5nfKMysEr0SU/gHKCi8vyTF/63ukMrGUNGmJJxrndl5ZYKC6j6eX7twrZF L1Uvlmn6FnQ22red5kHO93fDjG4zaDIZvHfwj7kzjZ4tpC7Byinf88s14mdZeScc0PnU2hj4 UGYju/wg2FF4YxaZYhcmdTiRYY0Wx85XSMZv19pnn78sadEuRvfRd4JTmw++j1xGXeqQGWzz /CTG5/Ex9GAkQ02hZbmi236byDXoet4G8TEyOph9QFVkV9bNd0jQZaFZPGEj4PSPUYGAF7s5 xJaNGgctC3aZ7WjEv1FBoo44XCU4xcjJ1wZQUrHxRhx6TW0Jtcl0U9qfKFW30TSPo6RyiXuj X4ltWKAtjoXB8nUmEJckaz7IRu2b4pXDeazZuz5JBygUs10yJjDxh2vFQZo0KaBAPx9MZlPn gpPTjT15L8xGftEjQXF6 In-Reply-To: <202507221511.56MFBlfh096304@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 22/07/2025 18:11, Konstantin Belousov wrote: > The branch main has been updated by kib: > > URL: https://cgit.FreeBSD.org/src/commit/?id=441995e161a2564d37947d054a2f1219754deb5f > > commit 441995e161a2564d37947d054a2f1219754deb5f > Author: Konstantin Belousov > AuthorDate: 2025-07-19 12:15:44 +0000 > Commit: Konstantin Belousov > CommitDate: 2025-07-22 15:11:40 +0000 > > memchr.3: mention the len argument in the functions description > > Otherwise, its use is only specified in the error case, which is > somewhat obscure. Also properly typeset NULL. > > Reviewed by: pauamma_gundo.com > Discussed with: emaste > Sponsored by: The FreeBSD Foundation > MFC after: 3 days > Differential revision: https://reviews.freebsd.org/D51424 > --- > lib/libc/string/memchr.3 | 16 +++++++++++----- > 1 file changed, 11 insertions(+), 5 deletions(-) > > diff --git a/lib/libc/string/memchr.3 b/lib/libc/string/memchr.3 > index f5d1fe5d5c7f..65617a117371 100644 > --- a/lib/libc/string/memchr.3 > +++ b/lib/libc/string/memchr.3 > @@ -52,7 +52,10 @@ locates the first occurrence of > (converted to an > .Vt "unsigned char" ) > in string Maybe this is also a good time to change 'string' to 'memory object' (using POSIX wording) or something of that kind. Most people would read 'string' as C string which the parameter doesn't have to be. > -.Fa b . > +.Fa b , > +limited to at most > +.Fa len > +characters. > .Pp > The > .Fn memrchr > @@ -61,15 +64,18 @@ function behaves like > except that it locates the last occurrence of > .Fa c > in string > -.Fa b . > +.Fa b , > +limited to the first > +.Fa len > +characters. > .Sh RETURN VALUES > The > .Fn memchr > and > .Fn memrchr > -functions > -return a pointer to the byte located, > -or NULL if no such byte exists within > +functions return a pointer to the byte located, or > +.Dv NULL > +if no such byte exists within > .Fa len > bytes. > .Sh SEE ALSO -- Andriy Gapon From nobody Fri Jul 25 09:23:23 2025 X-Original-To: dev-commits-src-all@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 4bpMqb2HcVz62vB5; Fri, 25 Jul 2025 09:23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpMqb1JkZz44t5; Fri, 25 Jul 2025 09:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753435403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FraJIN7VkjSVlemxLwnWMn+O8yfbaLPi7Md7Yfd2aVw=; b=iv804mWlV+D0orZvS7uvshqsRj3Hzm96M6zUnpKT0vfkb4UwlZsvkyZUooeQEgfRD6uW5h YJnldbY67dGAWEoSS/bVxWSrdNhMRgTT6KgBdPFM4bt5EHWBDRIovMBwrHqqIbXBcf9+l3 Dc4FxTPeeJtAnPiRT19JyUTTcDZXfg76msRmT3JIihvsosiv2/4jiA/ZoQfIVm/CtK85OY e5jXO3L8YSkDVMdcM217mOifDx/NTUv2pDKsqIpKwv3do3bGol1U6C/+/FM4PcFuwxZmIz /dvTREwHVYErEot4xc4qKxfQtl5sr1Pbu8MPXFWpJvryDlFuZsn5ZAXiOjJwjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753435403; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FraJIN7VkjSVlemxLwnWMn+O8yfbaLPi7Md7Yfd2aVw=; b=cB2mkT2UVyJPhIjmtTpZo6zY7+ElAe4FeGM8fiuAz02EM/y+8qz5lnWP7p3uZftxcr1xWA L7XRvGZ4DxZtME3RbBOhy7oHLIVpujNImIM4NsLQCCNqMTGSZZUdntCEwb4xLbmkHNAKWk BCCoMmnplthLXFJiKOubkj2flMLZsUd4mglv9ibKf9HJiHi2PaztJlaPGlZRfI5A7Y+OUB p9ixsIY9CPngtlW/+FN371ifCOiesCI5pY8K8vp5+M0ofKsMww8Gjn/MleYusiqjA/oDrp duO8mt3b1TeusNdpkRSRVKNECqSUmCEStUoHTMbx6fBLBFPyGhqT2ebNY31fEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753435403; a=rsa-sha256; cv=none; b=OtYUVj/U7RzwfJy80ooxrA8l/rkDp6w+UUT1xn0V7p93/mkIGB7QullliZsPsDQwk3RpQw bNxpJUDMFKGJczw3Aafn2aT1SNRvhlxAEAW8dtdDiVWSiKdWtywD+uBreRoc86jN9kOQma FCv8NfVgtNCWxWRgowjHjVT1hQMxkh1+ubV51RJ7pabAUwmMfrPiKYPRnv/8CTeVkcidgj Rr0GmNiLbpI8OG6hKC0OaofNv7dBl/XdDfs0YiHLQUKUb4VRxQHHTtQJfyDnSAUzVwkPSa sNb2dx4zKwyZ9/gYoS68OTuFmyqY41wJLJ8HHgFv27hlMHBO8FYbh1sSxNtgJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpMqb0nq8zfWT; Fri, 25 Jul 2025 09:23:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56P9NNjf092089; Fri, 25 Jul 2025 09:23:23 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56P9NNxm092086; Fri, 25 Jul 2025 09:23:23 GMT (envelope-from git) Date: Fri, 25 Jul 2025 09:23:23 GMT Message-Id: <202507250923.56P9NNxm092086@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: 108e2d1137aa - main - db/hash.c: Do not return an error when opening a missing database with O_CREAT List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 108e2d1137aabc65db3cff545615e9e8927dbe23 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=108e2d1137aabc65db3cff545615e9e8927dbe23 commit 108e2d1137aabc65db3cff545615e9e8927dbe23 Author: Bojan Novković AuthorDate: 2025-07-24 15:07:34 +0000 Commit: Bojan Novković CommitDate: 2025-07-25 09:22:44 +0000 db/hash.c: Do not return an error when opening a missing database with O_CREAT dbm_open currently returns an error when opening a missing database with O_CREAT but creates the request database file. This is caused by a buggy check in __hash_open which attempts to detect a new (or empty) database file, but fails to take the O_CREAT flag into account. Fix this by expanding the check to include O_CREAT. Fixes: edcdc752ecdd Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D51491 --- lib/libc/db/hash/hash.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libc/db/hash/hash.c b/lib/libc/db/hash/hash.c index 7a66f5443d94..cc96fb5ce326 100644 --- a/lib/libc/db/hash/hash.c +++ b/lib/libc/db/hash/hash.c @@ -120,7 +120,8 @@ __hash_open(const char *file, int flags, int mode, if ((hashp->fp = _open(file, flags | O_CLOEXEC, mode)) == -1) RETURN_ERROR(errno, error0); new_table = _fstat(hashp->fp, &statbuf) == 0 && - statbuf.st_size == 0 && (flags & O_ACCMODE) != O_RDONLY; + statbuf.st_size == 0 && + ((flags & O_ACCMODE) != O_RDONLY || (flags & O_CREAT) != 0); } else new_table = 1; From nobody Fri Jul 25 09:23:24 2025 X-Original-To: dev-commits-src-all@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 4bpMqc5Dgdz62v7n; Fri, 25 Jul 2025 09:23:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpMqc26lPz455h; Fri, 25 Jul 2025 09:23:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753435404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S2vEAjjaT4Hh0gt0UKNs+JC8O7xzPHKskpqopUSKETY=; b=Qir8ZI6N1gyVSBqNGQ8J91a/yHdffD46tEnqOaIyiMTv01JRoC7m4f5fTwYMV+3OiK2cJL VndUeuxrh1VUsQN41Xj7xCgtgvzevU5sMyuWvb8wASNaU3yGmzTei4T+Yy2yjUzFv70ip+ RIHoGxy9oMhSs3ASYGklvfIOfO3zRLwpZtIZM4Ba/QDn4hUv/S/JmnDaW72PWghPmunLvl ktjPhRkQRT87YtB4k8olhqPzJmsxBvaPTAr9OfQ3HaybWM8XL+kxOMIaK2pyOOhzZQSrc3 i7N4vnm92ZMJQYjvNFjmdXJbb0StpswUgqhnnKFJzb3DX1axrRialx6YuIJQIg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753435404; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=S2vEAjjaT4Hh0gt0UKNs+JC8O7xzPHKskpqopUSKETY=; b=BvcEvDm+W+k1EMQFP5PYhlSTG+u7rlxZ+W4oi3GhUu26OQINu5AX4GxatTUOXkoMTI1KTO 3gsJwgPP7xI1FkmttcIWl/091pxvSJX2LnPn9+jZgvfXtjlfKlzKovVCB8rN9BDTvSY6xW tiN2XXgKo+M06qSIuvUKc9H8C1JyH6fYLxAGEtBtrybvhYAwBjUGCmZSKcjEts/UYYkpWw fSImpH2dbVTYe1MTZ/WhfPk1hQoT5TZXTJLqVx/bpXMvY3GzK+Vfa9nRQa9r43LxWHSLnU pFS6JFXG966hcldBrw70MNyrrlSihPzYYPd3TW0ceIbvjptqBS5h8en/CkC1Fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753435404; a=rsa-sha256; cv=none; b=rlky7NY0aBEOr9kZ8wLLvs1voTg6FKFeHVubGJBVzsAWG7tHOLM+IEhTKFPYNOgjKkarVZ 5QVuyZ9Mo+zd6q6dk06wq7P8rUyxaD7Z/vFiTaF3CYQiPNUwR3zg2lNWf3YHlZDXMhdoGK tQDUp9mahBlJbYL4A5jhkIxzw9yq0652q83oNLKUTj6WeveZwlGgeqAoGAhICJ11YUwbBy Gg8oNDg2Ymw1C0mbJFR2kQR6kaOsTeAWFkMMQnXSrCPXRdeG13YOVkcMBTFoPUtecpGB8d KpoDRVCoiotkhJU7ECFqR6XTremcX78IzOd7JvkoSKyT+zvDOS/HjFVeMxIY0w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpMqc1jQkzf7W; Fri, 25 Jul 2025 09:23:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56P9NOBu092131; Fri, 25 Jul 2025 09:23:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56P9NOs3092128; Fri, 25 Jul 2025 09:23:24 GMT (envelope-from git) Date: Fri, 25 Jul 2025 09:23:24 GMT Message-Id: <202507250923.56P9NOs3092128@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: e1e77dd23ced - main - dbm: Add tests for dbm_open List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e1e77dd23cedc6d19e48e03d9454c5a3d552ed50 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=e1e77dd23cedc6d19e48e03d9454c5a3d552ed50 commit e1e77dd23cedc6d19e48e03d9454c5a3d552ed50 Author: Bojan Novković AuthorDate: 2025-07-24 15:23:51 +0000 Commit: Bojan Novković CommitDate: 2025-07-25 09:23:00 +0000 dbm: Add tests for dbm_open Sponsored by: Klara, Inc. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D51492 --- lib/libc/tests/db/Makefile | 2 ++ lib/libc/tests/db/dbm_open_test.c | 43 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 45 insertions(+) diff --git a/lib/libc/tests/db/Makefile b/lib/libc/tests/db/Makefile index f1f33bd2bafc..54b38b94a581 100644 --- a/lib/libc/tests/db/Makefile +++ b/lib/libc/tests/db/Makefile @@ -7,6 +7,8 @@ PROGS+= h_lfsr ${PACKAGE}FILES+= README +ATF_TESTS_C+= dbm_open_test + NETBSD_ATF_TESTS_C+= db_hash_seq_test NETBSD_ATF_TESTS_SH+= db_test ATF_TESTS_SH_SED_db_test= -e 's,/bin/csh,/bin/cat,g' diff --git a/lib/libc/tests/db/dbm_open_test.c b/lib/libc/tests/db/dbm_open_test.c new file mode 100644 index 000000000000..18d398e16b2a --- /dev/null +++ b/lib/libc/tests/db/dbm_open_test.c @@ -0,0 +1,43 @@ +/*- + * Copyright (c) 2025 Klara, Inc. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include + +#include +#include +#include + +#include + +ATF_TC(dbm_open_missing_test); +ATF_TC_HEAD(dbm_open_missing_test, tc) +{ + atf_tc_set_md_var(tc, "descr", + "Test dbm_open when creating a new database"); +} + +ATF_TC_BODY(dbm_open_missing_test, tc) +{ + const char *path = "tmp"; + const char *dbname = "tmp.db"; + + /* + * POSIX.1 specifies that a missing database file should + * always get created if O_CREAT is present, except when + * O_EXCL is specified as well. + */ + ATF_CHECK(dbm_open(path, O_RDONLY, _PROT_ALL) == NULL); + ATF_REQUIRE(!atf_utils_file_exists(dbname)); + ATF_CHECK(dbm_open(path, O_RDONLY | O_CREAT, _PROT_ALL) != NULL); + ATF_REQUIRE(atf_utils_file_exists(dbname)); + ATF_CHECK(dbm_open(path, O_RDONLY | O_CREAT | O_EXCL, _PROT_ALL) == NULL); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, dbm_open_missing_test); + return (atf_no_error()); +} From nobody Fri Jul 25 13:29:40 2025 X-Original-To: dev-commits-src-all@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 4bpTJ36fXHz637dM; Fri, 25 Jul 2025 13:29:55 +0000 (UTC) (envelope-from wschnr@googlemail.com) Received: from mail-wr1-f49.google.com (mail-wr1-f49.google.com [209.85.221.49]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpTJ25DQgz3vfg; Fri, 25 Jul 2025 13:29:54 +0000 (UTC) (envelope-from wschnr@googlemail.com) Authentication-Results: mx1.freebsd.org; dkim=none; spf=pass (mx1.freebsd.org: domain of wschnr@googlemail.com designates 209.85.221.49 as permitted sender) smtp.mailfrom=wschnr@googlemail.com; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none) Received: by mail-wr1-f49.google.com with SMTP id ffacd0b85a97d-3a4fb9c2436so1251964f8f.1; Fri, 25 Jul 2025 06:29:54 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753450192; x=1754054992; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=g69cjjXyN/i181RMn3javlyorhHYYJIefMJoWV8NC/U=; b=q+dOlt/wQQQSWYGMfDxqwlK/dsP4vJjCOyMcOoyj8i+ErIXP3mhEcCC1elDf0OB1vf S/WWt2BKftgjq1J+nWmG5PM7JTvCBCuECLOlXFZHvp7Mk3eNT7dGAGxI2dyJn1INUyYg zYRGEJpDdqq9L+4cFtJQ96VcSNPN5TzeJYFUUiPt3xmwjsat+EqM2hlV1uU2GBiRkYZ5 wofH5MxjEtCwQQw5NZ56kS0FrJ+ef/8hv17DXwODJxGkdAZ7StxEbcQqTlpKfWE59unL +RCac1myO4CrOtfEXkk9GXlsWvIDtK5Fj1ka95gyU4GSHzpxCMObEaJNVS2Vjiyytumo T/tA== X-Forwarded-Encrypted: i=1; AJvYcCWBfxBXpjRQB7wEQNLdoXVCCdjoTeQrddKsV6MLAAA/tHj8SyriYkpmiBtJpG2F2lPsI5KXSogRsbUs5+pAxcPFlhXZaKs=@freebsd.org, AJvYcCWURmvp9bXV9LccIlmuGJl5C9SG9QyW3Mh8iuzRCOtURx6Wa+Ya08M8CMzwkTSNhoB3cy0fEg7EN6LxyVuo8wde4QG2@freebsd.org X-Gm-Message-State: AOJu0YxMTKbgHfgfBCXz5N7RPIu/mpX1fIKUxvDsbbpzucXVXXb+/7Cu Tgylan7t8OJV6UuabL/iOtJVE+fTvef21fPtiHAr/qe6gfwHC3O9sk8gSay5Swu548obsA07u3R lOyJ1rJGEDC7w/xTig6ENCcbx7UstragnWm0D X-Gm-Gg: ASbGnctYp60W7SoDIrM8DLl5KjUvG2Rz4ZN8TUyUPUCume528lCVg2raZ/VaOOoonvB P855iVKSu+B9s3nwepnUMV7IQhI3i557z+t6u0vSZuJ1QbYqtJlWQjPSyGufW4L2J2HhZMTSv3Q ffBZOhRfAfwEBuyiZ+2izIePweD4FwyUw7x4AOSlhG6HwX3uCZq9YW0qNsM2UqUPWGvxW+xhX0v EAqcIQ= X-Google-Smtp-Source: AGHT+IFkR1xaAEoAL38BVTQe0FFN4HEhvn1gx68cdP3aWES3HahqOq6nAOpAKC8zGv6ocSc4bOCSLDvicTF22RxE8PM= X-Received: by 2002:a05:6000:230d:b0:3b7:608a:7e3f with SMTP id ffacd0b85a97d-3b7765e578fmr1685142f8f.8.1753450191672; Fri, 25 Jul 2025 06:29:51 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202507211410.56LEAD6J066633@gitrepo.freebsd.org> In-Reply-To: <202507211410.56LEAD6J066633@gitrepo.freebsd.org> From: Wolfram Schneider Date: Fri, 25 Jul 2025 15:29:40 +0200 X-Gm-Features: Ac12FXyX70q8Jp8tJGmStj_LLY89JlcVNVsLUhYFsMTpf50Kr2OS67bSifro6ik Message-ID: Subject: Re: git: c7da9fb90b0b - main - KRB5: Enable MIT KRB5 by default To: Cy Schubert Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Spamd-Result: default: False [-0.73 / 15.00]; NEURAL_SPAM_LONG(1.00)[1.000]; NEURAL_HAM_SHORT(-0.95)[-0.946]; NEURAL_HAM_MEDIUM(-0.88)[-0.885]; FORGED_SENDER(0.30)[wosch@freebsd.org,wschnr@googlemail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; FREEMAIL_ENVFROM(0.00)[googlemail.com]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; RCVD_COUNT_ONE(0.00)[1]; ARC_NA(0.00)[]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.221.49:from]; RCVD_IN_DNSWL_NONE(0.00)[209.85.221.49:from]; FROM_NEQ_ENVFROM(0.00)[wosch@freebsd.org,wschnr@googlemail.com]; FROM_HAS_DN(0.00)[]; MISSING_XM_UA(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-all@freebsd.org,dev-commits-src-main@freebsd.org]; RCVD_TLS_LAST(0.00)[]; R_DKIM_NA(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Rspamd-Queue-Id: 4bpTJ25DQgz3vfg X-Spamd-Bar: / On Mon, 21 Jul 2025 at 16:10, Cy Schubert wrote: > > The branch main has been updated by cy: > > URL: https://cgit.FreeBSD.org/src/commit/?id=c7da9fb90b0b6385e99bb7747476359b712993fa > > commit c7da9fb90b0b6385e99bb7747476359b712993fa > Author: Cy Schubert > AuthorDate: 2025-07-19 14:11:18 +0000 > Commit: Cy Schubert > CommitDate: 2025-07-21 14:07:22 +0000 > > KRB5: Enable MIT KRB5 by default > > Set WITH_MITKRB5=yes as the default. > > Rebuild all USES=gssapi ports is recommended. > > A clean buildworld is required. > > Relnotes: yes IMHO this commit breaks cross compiling of FreeBSD on macOS due a missing include file 'endian.h' make buildworld [...] clang -O2 -pipe -fno-common -Wno-deprecated-non-prototype -Wno-macro-redefined -Wno-unused-parameter -I/Users/wosch/projects/wosch-src/crypto/krb5/src/util/support -I/Users/wosch/projects/wosch-src/crypto/krb5/src/include -I/Users/wosch/projects/wosch-src/krb5/include -I/var/folders/mw/16w0zx815gdb3xg581_8m2dh0000gn/T//freebsd-obj/Users/wosch/projects/wosch-src/arm64.aarch64/tmp/obj-tools/krb5/util/support -Wno-deprecated-non-prototype -Wno-macro-redefined -Wno-unused-parameter -MD -MF.depend.base64.o -MTbase64.o -std=gnu17 -Wno-format-zero-length -Wsystem-headers -Wno-pointer-sign -Wdate-time -Wno-system-headers -Wno-empty-body -Wno-string-plus-int -Wno-unused-const-variable -Wno-error=unused-but-set-parameter -Wno-error=cast-function-type-mismatch -Wno-tautological-compare -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function -Wno-enum-conversion -Wno-unused-local-typedef -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum -Wno-knr-promoted-parameter -Wno-parentheses -Wno-typedef-redefinition -Werror=incompatible-pointer-types-discards-qualifiers -Qunused-arguments -I/var/folders/mw/16w0zx815gdb3xg581_8m2dh0000gn/T//freebsd-obj/Users/wosch/projects/wosch-src/arm64.aarch64/tmp/legacy/usr/include -Werror=implicit-function-declaration -Werror=implicit-int -Werror=return-type -Wundef -DHAVE_NBTOOL_CONFIG_H=1 -D_DARWIN_C_SOURCE=1 -I/Users/wosch/projects/wosch-src/tools/build/cross-build/include/mac -idirafter /Users/wosch/projects/wosch-src/contrib/libarchive/libarchive -I/Users/wosch/projects/wosch-src/tools/build/cross-build/include/common -c /Users/wosch/projects/wosch-src/crypto/krb5/src/util/support/base64.c -o base64.o In file included from /Users/wosch/projects/wosch-src/crypto/krb5/src/util/support/base64.c:36: /Users/wosch/projects/wosch-src/crypto/krb5/src/include/k5-platform.h:439:11: fatal error: 'endian.h' file not found 439 | # include | ^~~~~~~~~~ 1 error generated. *** [base64.o] Error code 1 bmake[3]: stopped making "all" in /Users/wosch/projects/wosch-src/krb5/util/support As a workaround, you can set the makefile variable WITHOUT_MITKRB5=1 and buildworld will work again on macOS. -Wolfram -- Wolfram Schneider https://wolfram.schneider.org From nobody Fri Jul 25 13:36:57 2025 X-Original-To: dev-commits-src-all@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 4bpTSR6KQ1z637qx; Fri, 25 Jul 2025 13:37:11 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-io1-f53.google.com (mail-io1-f53.google.com [209.85.166.53]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpTSR1RnWz40DQ; Fri, 25 Jul 2025 13:37:11 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-io1-f53.google.com with SMTP id ca18e2360f4ac-8733548c627so83669539f.3; Fri, 25 Jul 2025 06:37:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753450629; x=1754055429; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=DqsGNKEil3155hZAWmKm5Xz7dN/txa+oDcrHGM88rrM=; b=oWDsAkAhzwM9vaEtLS2XQ/2AADHoPbdGq4zKfudtPU+G61pa+q0AtX+zSyiCGnaCcf U43N0jcai/T0dXtfOxWMnZZBMqozA/VHMufzX8yH9G68hX8YSGkBekzgHqqVKtbb7tXG nSU7eY9n+bFj3IhJfEjeXZ4aoLX3OlasniXrEcbqTnjbWXr9zPSzMYTt092VO+cYuZbx yp6BIPv+TAGocRPZT0N6ZenjJPUxrgwbCDxI7++uO5/DEFtLZ1fVD5xyIUxdlvNBq6EG Ku7ctJy4pZ+WL19hoVL3wOwGjSgcKfgpnyaH0UAD+xp/HGg0YbJMpCyFOhbJDFTp5QJw 3UGQ== X-Forwarded-Encrypted: i=1; AJvYcCV5XlgSFEcMCUGbdakDrqZI8ohh0X9toKAmoFuq5ezUwD7YReqxIosir1Ap4j6TDP/Q81iQuh3LthcGdgYgju4=@freebsd.org, AJvYcCXLnOS5JAQlrcjCNemDMiRWqiL6C3xTJ3AN+zEwNzMCttv26M+s15pvRRVCKnqL0Yad1SRrSmhI3yjzKlrl2b2d9dws@freebsd.org, AJvYcCXy8DRCaZaKDY3w2IhjbQFSk1Cz/NVQfdkyrlrP8B0hSnF8t9zbic3mmVnTzrLB/GYs4Ef2P9eMnX3Et82uXqI7WV6VpJI=@freebsd.org X-Gm-Message-State: AOJu0Ywz6+q7y68VeHke4GpQtPycxBQjwa//1GWYjNUVqT6Mo9V3lPcK P2Xf8bEkqX3Wxx64azfbNFq8odqT+lkHvH4VKNsFN6PoHmrRT0nKyD5jFXJmcxPI9DphINbJFQ5 CSxB0zHmdCTYLc9G4Hw2TLBYJvtaIZppNgolT4z0= X-Gm-Gg: ASbGnct6JSnhd6xI4jaReVTJvGyMS8MrUcZHVsiRWGC/VfV2QSR8OzuDydut3hjMgrt v7xSJ/AG1hr0Mo8zFVnZ3CPqH7XJ8Au+30obZgO4ARW+j4fD209MdgcKZFKwRcRIz/l6YmEYmu6 6MPPmnV6QDyBbKi1sZ2CXadLVUO5zV0aw4gCd1P+0Qvp12y9GUQlkpbFLzejD7d8KDXRbYCb2Ub /a4Njo= X-Google-Smtp-Source: AGHT+IHEy3FeBp+Hof5dU75m0VGOU7hKdYxK7eP+VirXEwqqEQOT0PyJy6ygylIpSAIZz/Gg3EPamGkGrEZ4ssjjtgk= X-Received: by 2002:a05:6602:2dca:b0:876:a7cc:6eb7 with SMTP id ca18e2360f4ac-880228f7cb2mr316824239f.9.1753450629424; Fri, 25 Jul 2025 06:37:09 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202507221511.56MFBlfh096304@gitrepo.freebsd.org> In-Reply-To: From: Ed Maste Date: Fri, 25 Jul 2025 09:36:57 -0400 X-Gm-Features: Ac12FXy2ACLYorzMpKI0ld4bA92ELkYD-MaJnbfDiBFqT6uIjHRd01ZBC4mzdvg Message-ID: Subject: Re: git: 441995e161a2 - main - memchr.3: mention the len argument in the functions description To: Andriy Gapon Cc: Konstantin Belousov , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" X-Rspamd-Queue-Id: 4bpTSR1RnWz40DQ 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:15169, ipnet:209.85.128.0/17, country:US] On Fri, 25 Jul 2025 at 05:05, Andriy Gapon wrote: > > On 22/07/2025 18:11, Konstantin Belousov wrote: > > The branch main has been updated by kib: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=441995e161a2564d37947d054a2f1219754deb5f > > > > commit 441995e161a2564d37947d054a2f1219754deb5f > > Author: Konstantin Belousov > > AuthorDate: 2025-07-19 12:15:44 +0000 > > Commit: Konstantin Belousov > > CommitDate: 2025-07-22 15:11:40 +0000 > > > > memchr.3: mention the len argument in the functions description > ... > Maybe this is also a good time to change 'string' to 'memory object' (using > POSIX wording) or something of that kind. > Most people would read 'string' as C string which the parameter doesn't have to be. That's a good clarification. https://reviews.freebsd.org/D51523 From nobody Fri Jul 25 13:48:52 2025 X-Original-To: dev-commits-src-all@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 4bpTjx0LDfz638QL; Fri, 25 Jul 2025 13:48: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpTjw59R4z44Zx; Fri, 25 Jul 2025 13:48:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753451332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i5u3dxSvAZtBHQxh657nStDfI+UUBVXWVVgt2zATltQ=; b=VsEZ+uIdWG7GSiNGzXc5zxUC9g5qT4OPVR+20R/qthy7ZIiV8G5pItDTl6jtJu8+Nh+lHg GaLF4nr4ZmW3AGOzGTF15RNUgQWN6Y0PR8Na/nh5JhnluTld7u8Y+xEMz4HIF3QGOX3GrL gmUpmDO+ALMlzXT4/2Rt6seNrLSPpTe/OG+8vEVcCUpSk89V6Yt/ohAChs2wj20mZ6btZW U7uAN/4MFMaR7xpiYNGS2An1F1KlP6Ij4hJFw+/w/8xwlk+OGPeqN1qA0fjaE9X+9dTP4o xP7rcOzyvgL850wb/E0yFUIyDfHf7vq9KtRG8a5kSXzjF5352SVfjxUtkM+KUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753451332; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i5u3dxSvAZtBHQxh657nStDfI+UUBVXWVVgt2zATltQ=; b=Jg6aru7KBLcLf675H+015O8+XAZ9TbWya/PUkK+Ytlq0uNUTsHKDAQby/yPMQjLKCYqemA Nveqs3EuzQhmYkguFS7L/7XajFYXEsPzdZk+uK04ubHee+22rFT/xApYoIqpqAUuflMjde LzMcyZ7EO9ptXbVvBsuUJCzAgZx7zh05AwESuRnbUC39PwWHGEmMTpbXRXkWNs6fRTcaZm 55FDF9snwsOZKPlmyyVEMlefHN4Ky8AKfnKdS1idzXk9/EmmP8tVc0HCA0KAMHypLeaGDw U91FnzB05azI0iNyNuhzLu6yXZ44Jxyp9AwsNWPEuGEr5P+VpbfeK47qu/1ILg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753451332; a=rsa-sha256; cv=none; b=EXWvxYJ3g7UrwSyYc+hfk+SbrYvvAVpcJyI5iSTJEgZyHiLQU9Bj5wknWKjrQ5rnpnIPw1 6EfPn4MANuQXDS6+a9pMlOU7S5qg7ZOXQIVYzvRp+tHQq8kBTFZV8G5s9hjiMskdHyxqY+ bXfo6DntbSVH82o8tWi8O4Kxpn5Vtqxx8oD1rLFJ7yCeD49GftpiYjG6oNyQA38e5/mYDh 80Y3yLgDhutPZSCsTuH2hlbddux8rf9z/byE1lb2I4Q4b9WZs4wQgWpFGfGu0SyUtWA/Be clTJLtP9pgZ2xHxMDmwMiupFBunBngor4nSSO1G2rttVhY1WOV3ACp5I1OgMfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpTjw4mnfzn7c; Fri, 25 Jul 2025 13:48:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PDmqH5079651; Fri, 25 Jul 2025 13:48:52 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PDmqpk079648; Fri, 25 Jul 2025 13:48:52 GMT (envelope-from git) Date: Fri, 25 Jul 2025 13:48:52 GMT Message-Id: <202507251348.56PDmqpk079648@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 6924e4211b87 - main - memchr.3: Operates on objects, not strings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 6924e4211b8781c630acf7e9a2e08e87804dd01c Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=6924e4211b8781c630acf7e9a2e08e87804dd01c commit 6924e4211b8781c630acf7e9a2e08e87804dd01c Author: Ed Maste AuthorDate: 2025-07-25 13:34:48 +0000 Commit: Ed Maste CommitDate: 2025-07-25 13:48:42 +0000 memchr.3: Operates on objects, not strings Suggested by: avg Reviewed by: avg Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51523 --- lib/libc/string/memchr.3 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/libc/string/memchr.3 b/lib/libc/string/memchr.3 index 65617a117371..c50e932d3382 100644 --- a/lib/libc/string/memchr.3 +++ b/lib/libc/string/memchr.3 @@ -34,7 +34,7 @@ .Os .Sh NAME .Nm memchr -.Nd locate byte in byte string +.Nd locate byte in memory object .Sh LIBRARY .Lb libc .Sh SYNOPSIS @@ -51,7 +51,7 @@ locates the first occurrence of .Fa c (converted to an .Vt "unsigned char" ) -in string +in object .Fa b , limited to at most .Fa len @@ -63,7 +63,7 @@ function behaves like .Fn memchr , except that it locates the last occurrence of .Fa c -in string +in object .Fa b , limited to the first .Fa len From nobody Fri Jul 25 15:34:05 2025 X-Original-To: dev-commits-src-all@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 4bpX3K2TJPz63DwD; Fri, 25 Jul 2025 15:34: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpX3K1rKtz3y4d; Fri, 25 Jul 2025 15:34:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753457645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jaJ6vN40ogy/oxRb6U9YdFh4mVYTBIM3vnAR6cm0oD8=; b=Sysr1klc7XiDgCm3rA7RkWNYvHvX1syQU01XjG87MAzO43cEZ0WkNPXpjA3X2DkV16aTrj Ld0hfRsqA8ATpv+8/E4ZLpsr+6/bMsDeUYAE4C/1MYjcA6qnZFKbtUdwVqLxgZLda7pIYd oKdSzZiujvD8bF3yDqqiSyXgqzt6y5K3zB9cLnUDKw4HSYe56K6UiBJzSST9xhYIFtjXeY OL6IRHUS52b/f4lOLTeCfySOLgv4QaTY2Jyl6iyzkPHjSXiFkbbQyrzSMI51PJgz9k3BRL iOtyOVFIrqw3EYvou5H9LSYFm8vzae9g/Um1ZeBE7L3qEhV9jhvWaPai3sbtqw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753457645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jaJ6vN40ogy/oxRb6U9YdFh4mVYTBIM3vnAR6cm0oD8=; b=izUAdHtVW8lThah4MYpWStusdCHxthfOW/m97oQZi7wU7ha0rnAENmav744f+BAXkTqf4i KuOHXyH+WVBYx5EDXGWWkh/qyrfV6pDwIFGSeXYPF+pcuem9oruiaCjRB+QQs36j8pXWV1 k2SYOy1VDqm0CQI1vYBwT2CTdrCCtAtjedkGnGtxIM2T2viLXqoTUYVcXlRbJAlAA+H686 A0AIg6VOl34vmm5eLcpS6ef/dcPSoKfD75LlIYpaWlc64WWlXZM1512m1X2aWuAoxgi5rN iSnhN6MzVTH2GNY85hL823nu5BHwe9RhiG0mVnqefriEQ+eKbDzBTa/+PY8PzQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753457645; a=rsa-sha256; cv=none; b=sqaqTiuKgJYhFASMwwkbqXyzVLq2exS8QmqYm79TcaWs4Vyq7PAQHVeWnadyODYCWW558c ZP+JVK1VXn0MXKjldIInHBdvl3/w7YnmNzuZ6WhHUFCdPJZiKHsbPQMD+SOBwzDCJ/75Jq UhQg71WjX589gax9ZHpntRzg2kc9czOyH9ItYfx8nwYxEkAs7ChRnj1G2D6CnFVUdvhw2v r6oEiGX3PvNy1NWTsttHNyj9x93buyVpHqwqrhQ28b7EWRt8x/yoQyWYv2zgY6q9DOxOYs kHDbpRBC+wVDzQAFcATN/5zamyOX6Iltl6+MM3YQ1Ogd8c7sHlCtGC5NDUhj+w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpX3K1BxgzqwM; Fri, 25 Jul 2025 15:34:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PFY5jr085342; Fri, 25 Jul 2025 15:34:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PFY5PS085339; Fri, 25 Jul 2025 15:34:05 GMT (envelope-from git) Date: Fri, 25 Jul 2025 15:34:05 GMT Message-Id: <202507251534.56PFY5PS085339@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 00294d7b0a2e - main - bsdinstall: Guard against invalid branch/revision List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 00294d7b0a2e3ae3e870333ef7c8ecbc9fa26da3 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=00294d7b0a2e3ae3e870333ef7c8ecbc9fa26da3 commit 00294d7b0a2e3ae3e870333ef7c8ecbc9fa26da3 Author: Ed Maste AuthorDate: 2025-07-25 14:56:22 +0000 Commit: Ed Maste CommitDate: 2025-07-25 15:33:56 +0000 bsdinstall: Guard against invalid branch/revision I somehow ended up with a tree where make -V BRANCH and make -V REVISION were broken, resulting in a FreeBSD-base.conf with a broken repo URL. Check for BRANCH == RELEASE explicitly and emit a warning if BRANCH does not match an expected case. Reviewed by: Isaac Freund Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51528 --- usr.sbin/bsdinstall/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/Makefile b/usr.sbin/bsdinstall/Makefile index 75db149b814b..e5bb3197fa05 100644 --- a/usr.sbin/bsdinstall/Makefile +++ b/usr.sbin/bsdinstall/Makefile @@ -22,8 +22,11 @@ REVISION?= ${_REVISION} .if ${BRANCH} == CURRENT || ${BRANCH} == STABLE SUBURL= base_latest -.else +.elif ${BRANCH} == RELEASE SUBURL= base_release_${REVISION:C/[0-9]+\.//} +.else +.warning Invalid branch "${BRANCH}" +SUBURL= base_latest .endif FreeBSD-base.conf: FreeBSD-base.conf.in From nobody Fri Jul 25 16:35:11 2025 X-Original-To: dev-commits-src-all@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 4bpYPq6cGLz624GS; Fri, 25 Jul 2025 16:35: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpYPq59k9z3bq0; Fri, 25 Jul 2025 16:35:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753461311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1k/HREX2uomhGGDECz3b88NRnbNg1VWO4DvPouSV+zg=; b=mFuKDjya7crqbNjVX6vMrUsda2l3AOxF5bDZXB/7X4wll/CoJmz33NLL0oUjj2TSSFrqlM wnl6Oq3zr5GK+UHrYZTt7oj8j7W8eMR3jef7M1Sa+fN311/45uH5nLchUsFs8zXt1BFjn8 X5FZpxYJvQGHycTFRwaC3roOIuJPCqaL2iPDGN+Aeap7u87Uv8U1HmnGdUiGXSHOhpFGbP DUjWkDXSnN7HFyWUHVXZo6SlItgyCkaAcr2O+8a34+Xg4Sw1niVGRrds6heXzalYFBq1md fvxwmratJjjare8O2Q7nka3JWg5kkauB4IwdTz5pmbTg0iwZjSpjWGQqjtHBog== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753461311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1k/HREX2uomhGGDECz3b88NRnbNg1VWO4DvPouSV+zg=; b=WjawprM/BCoJCO9MoFYI8pRhwj/Pd53AKi+Ou6HrVylOjWDN+G9Eq3mVOAZCvnMD1874mV NpUURsdMJRku2PyX9U7R4a98eFuf2TDeznBkZh7S+jkEz7DdYfrqiKz+4RvlyLEthMw94x Rwp24xqwzBd1uBviHDk14/y4iWDI1OK9VfCowezJjHBHan4RgX7T6ZBTHSVKVmzEjyO0zT jVjQYmFiUxfQQyYerrOoWCVXNzrSz7czsUZqjYW4DRVFAc2tsCz5kClLVYQnbO7m0FFign Mo5LTKPr5aeUqxyL2KpbBMO44Rbjt/0+qCFpBga9YQi3xlgiCXE/nXqu0e+LGg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753461311; a=rsa-sha256; cv=none; b=Oa3PzxNUbmjq1hxGoa9EtcDQFjyW3dij367kS0nfXfDxPl9V63Ty2ijJKM3a6BXTJxvfKr ke2kzjNR44yQvkbKed6N4bwg7X98HxdXrq8v08JktmHatPjuRe3j4loi6atbh0xiAZsCzd Fut8pVEdFRVTKSpbLQ8WE5m2Wze9ZPxQMoCGyC9Su7I4IXQ7cvPhRkv8T5h/jCAafEaGwu FIDUw3AlBSjdr5ybro49tdsQnWIOLzZYYK9ebx9d8XN0i+oTvyZGS7ozn6bKAe67PwgOC4 nlmbxV8RkvoO8dpRaXsyuVZiG0n5O/RJMYl5H6PW66RhaaeDudINuhcTrhLRvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpYPq4XztzrpK; Fri, 25 Jul 2025 16:35:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PGZBxl098556; Fri, 25 Jul 2025 16:35:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PGZB73098553; Fri, 25 Jul 2025 16:35:11 GMT (envelope-from git) Date: Fri, 25 Jul 2025 16:35:11 GMT Message-Id: <202507251635.56PGZB73098553@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 7b9c912c41f4 - main - find: Add GNU find's -printf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 7b9c912c41f484b0fe75b30fbac465cc984e56b2 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=7b9c912c41f484b0fe75b30fbac465cc984e56b2 commit 7b9c912c41f484b0fe75b30fbac465cc984e56b2 Author: Warner Losh AuthorDate: 2025-07-25 16:30:06 +0000 Commit: Warner Losh CommitDate: 2025-07-25 16:34:37 +0000 find: Add GNU find's -printf Implements most of gnu find's -printf predicate. However, the '#', '-', '.' and size format modifiers are unimplemented, as are %P, %H, %F, %y, and %Y formats. Follows what I think it should do based on the info page, I've not looked at the gnu find code. Sponsored by: Netflix Discussed with: des, jilles Reviewed by: pauamma@gundo.com (man) Differential Revision: https://reviews.freebsd.org/D38138 --- usr.bin/find/Makefile | 2 +- usr.bin/find/extern.h | 4 + usr.bin/find/find.1 | 84 +++++++++++++ usr.bin/find/find.h | 2 + usr.bin/find/function.c | 27 +++++ usr.bin/find/option.c | 2 +- usr.bin/find/printf.c | 307 ++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 426 insertions(+), 2 deletions(-) diff --git a/usr.bin/find/Makefile b/usr.bin/find/Makefile index 904c08620833..48b164133bb0 100644 --- a/usr.bin/find/Makefile +++ b/usr.bin/find/Makefile @@ -3,7 +3,7 @@ PACKAGE= runtime PROG= find -SRCS= find.c function.c ls.c main.c misc.c operator.c option.c \ +SRCS= find.c function.c ls.c main.c misc.c operator.c option.c printf.c \ getdate.y YFLAGS= CFLAGS.clang+= -Werror=undef diff --git a/usr.bin/find/extern.h b/usr.bin/find/extern.h index feb2e0202056..6760ac24fb04 100644 --- a/usr.bin/find/extern.h +++ b/usr.bin/find/extern.h @@ -44,6 +44,8 @@ void printlong(char *, char *, struct stat *); int queryuser(char **); OPTION *lookup_option(const char *); void finish_execplus(void); +void do_printf(PLAN *plan, FTSENT *entry, FILE *fout); + creat_f c_Xmin; creat_f c_Xtime; @@ -68,6 +70,7 @@ creat_f c_nogroup; creat_f c_nouser; creat_f c_perm; creat_f c_print; +creat_f c_printf; creat_f c_regex; creat_f c_samefile; creat_f c_simple; @@ -106,6 +109,7 @@ exec_f f_path; exec_f f_perm; exec_f f_print; exec_f f_print0; +exec_f f_printf; exec_f f_prune; exec_f f_quit; exec_f f_readable; diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1 index 8c2d8624a82a..1217d9151168 100644 --- a/usr.bin/find/find.1 +++ b/usr.bin/find/find.1 @@ -821,6 +821,17 @@ It prints the pathname of the current file to standard output, followed by an ASCII .Dv NUL character (character code 0). +.It Ic -printf Ar fmt +This primary always evaluates to true. +It prints information about the file, interpreting +.Sq \ +and +.Sq % +escape sequences as described in the PRINTF FORMATS section. +Unlike +.Ic -print , +.Ic -printf +does not add a newline automatically. .It Ic -prune This primary always evaluates to true. It causes @@ -993,6 +1004,79 @@ All operands and primaries must be separate arguments to Primaries which themselves take arguments expect each argument to be a separate argument to .Nm . +.Sh PRINTF FORMATS +The following +.Sq \e +escapes are recognized: +.Bl -tag -width Ds -offset indent -compact +.It Cm \ea +Write a character. +.It Cm \eb +Write a character. +.It Cm \ec +Writes no characters, but terminates the string and flushes the output so far +after each match. +.It Cm \ef +Write a character. +.It Cm \en +Write a character. +.It Cm \er +Write a character. +.It Cm \et +Write a character. +.It Cm \ev +Write a character. +.It Cm \e\' +Write a character. +.It Cm \e\e +Write a backslash character. +.It Cm \e Ns Ar num +Write a byte whose +value is the 1-, 2-, or 3-digit +octal number +.Ar num . +Multibyte characters can be constructed using multiple +.Cm \e Ns Ar num +sequences. +.El +.Pp +Each format specification is introduced by the percent character +(``%''). +The remainder of the format specification includes, +in the following order: +.Bl -tag -width Ds +.It "Zero or more of the following flags:" +.Bl -tag -width Ds +.It Cm # +A `#' character, has no effect on almost all formats. +It is not yet implemented. +.It Cm \&\- +A minus sign `\-' which specifies +.Em left adjustment +of the output in the indicated field; +It is not yet implemented. +.It "Field Width:" +An optional digit string specifying a +.Em field width ; +if the output string has fewer bytes than the field width it will +be blank-padded on the left (or right, if the left-adjustment indicator +has been given) to make up the field width (note that a leading zero +is a flag, but an embedded zero is part of a field width); +It is not yet implemented. +.It Precision: +An optional period, +.Sq Cm \&.\& , +followed by an optional digit string giving a +.Em precision +which specifies the maximum number of bytes to be printed +from a string; if the digit string is missing, the precision is treated +as zero; +It is not yet implemented. +.It Format: +One or two characters, described below, which indicates the information to display. +XXX need to write this. +.El +.El .Sh ENVIRONMENT The .Ev LANG , LC_ALL , LC_COLLATE , LC_CTYPE , LC_MESSAGES diff --git a/usr.bin/find/find.h b/usr.bin/find/find.h index 1664eeb9a93f..2ddb70fd7bcc 100644 --- a/usr.bin/find/find.h +++ b/usr.bin/find/find.h @@ -97,6 +97,8 @@ typedef struct _plandata *creat_f(struct _option *, char ***); #define F_TIME2_B 0x00080000 /* one of -newer?B */ #endif #define F_LINK 0x00100000 /* lname or ilname */ +/* Notes about execution */ +#define F_HAS_WARNED 0x10000000 /* Has issued a warning for maybe bad input */ /* node definition */ typedef struct _plandata { diff --git a/usr.bin/find/function.c b/usr.bin/find/function.c index ef610903cc00..21dfab8fe408 100644 --- a/usr.bin/find/function.c +++ b/usr.bin/find/function.c @@ -1388,6 +1388,33 @@ f_print0(PLAN *plan __unused, FTSENT *entry) /* c_print0 is the same as c_print */ +/* + * -printf functions -- + * + * Always true. Causes information as specified in the + * argument to be written to standard output. + */ +int +f_printf(PLAN *plan, FTSENT *entry) +{ + do_printf(plan, entry, stdout); + return 1; +} + +PLAN * +c_printf(OPTION *option, char ***argvp) +{ + PLAN *new; + + isoutput = 1; + ftsoptions &= ~FTS_NOSTAT; + + new = palloc(option); + new->c_data = nextarg(option, argvp); + + return (new); +} + /* * -prune functions -- * diff --git a/usr.bin/find/option.c b/usr.bin/find/option.c index 268803343a8d..79fa581e79f5 100644 --- a/usr.bin/find/option.c +++ b/usr.bin/find/option.c @@ -148,7 +148,7 @@ static OPTION const options[] = { { "-perm", c_perm, f_perm, 0 }, { "-print", c_print, f_print, 0 }, { "-print0", c_print, f_print0, 0 }, -// -printf + { "-printf", c_printf, f_printf, 0 }, { "-prune", c_simple, f_prune, 0 }, { "-quit", c_simple, f_quit, 0 }, { "-readable", c_simple, f_readable, 0 }, diff --git a/usr.bin/find/printf.c b/usr.bin/find/printf.c new file mode 100644 index 000000000000..643f04b9cef5 --- /dev/null +++ b/usr.bin/find/printf.c @@ -0,0 +1,307 @@ +/*- + * Copyright (c) 2023, Netflix, Inc + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "find.h" + +/* translate \X to proper escape, or to itself if no special meaning */ +static const char *esc = "\a\bcde\fghijklm\nopq\rs\tu\v"; + +static inline bool +isoct(char c) +{ + return (c >= '0' && c <= '7'); +} + +static inline bool +isesc(char c) +{ + return (c >= 'a' && c <= 'v' && esc[c - 'a'] != c); +} + +static const char * +escape(const char *str, bool *flush, bool *warned) +{ + char c; + int value; + char *tmpstr; + size_t tmplen; + FILE *fp; + + fp = open_memstream(&tmpstr, &tmplen); + + /* + * Copy the str string into a new struct sbuf and return that expanding + * the different ANSI escape sequences. + */ + *flush = false; + for (c = *str++; c; c = *str++) { + if (c != '\\') { + putc(c, fp); + continue; + } + c = *str++; + + /* + * User error \ at end of string + */ + if (c == '\0') { + putc('\\', fp); + break; + } + + /* + * \c terminates output now and is supposed to flush the output + * too... + */ + if (c == 'c') { + *flush = true; + break; + } + + /* + * Is it octal? If so, decode up to 3 octal characters. + */ + if (isoct(c)) { + value = 0; + for (int i = 3; i-- > 0 && isoct(c); + c = *str++) { + value <<= 3; + value += c - '0'; + } + str--; + putc((char)value, fp); + continue; + } + + /* + * It's an ANSI X3.159-1989 escape, use the mini-escape lookup + * table to translate. + */ + if (isesc(c)) { + putc(esc[c - 'a'], fp); + continue; + } + + /* + * Otherwise, it's self inserting. gnu find specifically says + * not to rely on this behavior though. gnu find will issue + * a warning here, while printf(1) won't. + */ + if (!*warned) { + warn("Unknown character %c after \\.", c); + *warned = true; + } + putc(c, fp); + } + fclose(fp); + + return (tmpstr); +} + +static void +fp_ctime(FILE *fp, time_t t) +{ + char s[26]; + + ctime_r(&t, s); + s[24] = '\0'; /* kill newline, though gnu find info silent on issue */ + fputs(s, fp); +} + +/* + * Assumes all times are displayed in UTC rather than local time, gnu find info + * page silent on the issue. + * + * Also assumes that gnu find doesn't support multiple character escape sequences, + * which it's info page is also silent on. + */ +static void +fp_strftime(FILE *fp, time_t t, char mod) +{ + struct tm tm; + char buffer[128]; + char fmt[3] = "% "; + + /* + * Gnu libc extension we don't yet support -- seconds since epoch + * Used in Linux kernel build, so we kinda have to support it here + */ + if (mod == '@') { + fprintf(fp, "%ju", (uintmax_t)t); + return; + } + + gmtime_r(&t, &tm); + fmt[1] = mod; + printf("fmt is '%s'\n", fmt); + if (strftime(buffer, sizeof(buffer), fmt, &tm) == 0) + errx(1, "Format bad or data too long for buffer"); /* Can't really happen ??? */ + fputs(buffer, fp); +} + +void +do_printf(PLAN *plan, FTSENT *entry, FILE *fout) +{ + const char *fmt, *path, *pend, *all; + char c; + FILE *fp; + bool flush, warned; + struct stat *sb; + char *tmp; + size_t tmplen; + + fp = open_memstream(&tmp, &tmplen); + warned = (plan->flags & F_HAS_WARNED) != 0; + all = fmt = escape(plan->c_data, &flush, &warned); + if (warned) + plan->flags |= F_HAS_WARNED; + sb = entry->fts_statp; + for (c = *fmt++; c; c = *fmt++) { + if (c != '%') { + putc(c, fp); + continue; + } + c = *fmt++; + /* Style(9) deviation: case order same as gnu find info doc */ + switch (c) { + case '%': + putc(c, fp); + break; + case 'p': /* Path to file */ + fputs(entry->fts_path, fp); + break; + case 'f': /* filename w/o dirs */ + fputs(entry->fts_name, fp); + break; + case 'h': + /* + * path, relative to the starting point, of the file, or + * '.' if that's empty for some reason. + */ + path = entry->fts_path; + pend = strrchr(path, '/'); + if (pend == NULL) + putc('.', fp); + else { + char *t = malloc(pend - path + 1); + memcpy(t, path, pend - path); + t[pend - path] = '\0'; + fputs(t, fp); + free(t); + } + break; + case 'P': /* file with command line arg rm'd -- HOW? fts_parent? */ + errx(1, "%%%c is unimplemented", c); + case 'H': /* Command line arg -- HOW? */ + errx(1, "%%%c is unimplemented", c); + case 'g': /* gid human readable */ + fputs(group_from_gid(sb->st_gid, 0), fp); + break; + case 'G': /* gid numeric */ + fprintf(fp, "%d", sb->st_gid); + break; + case 'u': /* uid human readable */ + fputs(user_from_uid(sb->st_uid, 0), fp); + break; + case 'U': /* uid numeric */ + fprintf(fp, "%d", sb->st_uid); + break; + case 'm': /* mode in octal */ + fprintf(fp, "%o", sb->st_mode & 07777); + break; + case 'M': { /* Mode in ls-standard form */ + char mode[12]; + strmode(sb->st_mode, mode); + fputs(mode, fp); + break; + } + case 'k': /* kbytes used by file */ + fprintf(fp, "%ld", sb->st_blocks / 2); + break; + case 'b': /* blocks used by file */ + fprintf(fp, "%ld", sb->st_blocks); + break; + case 's': /* size in bytes of file */ + fprintf(fp, "%zu", sb->st_size); + break; + case 'S': /* sparseness of file */ + fprintf(fp, "%3.1f", + (float)sb->st_blocks * 512 / (float)sb->st_size); + break; + case 'd': /* Depth in tree */ + fprintf(fp, "%ld", entry->fts_level); + break; + case 'D': /* device number */ + fprintf(fp, "%lu", sb->st_dev); + break; + case 'F': /* Filesystem type */ + errx(1, "%%%c is unimplemented", c); + case 'l': /* object of symbolic link */ + fprintf(fp, "%s", entry->fts_accpath); + break; + case 'i': /* inode # */ + fprintf(fp, "%lu", sb->st_ino); + break; + case 'n': /* number of hard links */ + fprintf(fp, "%lu", sb->st_nlink); + break; + case 'y': /* -type of file, incl 'l' */ + errx(1, "%%%c is unimplemented", c); + case 'Y': /* -type of file, following 'l' types L loop ? error */ + errx(1, "%%%c is unimplemented", c); + case 'a': /* access time ctime */ + fp_ctime(fp, sb->st_atime); + break; + case 'A': /* access time with next char strftime format */ + fp_strftime(fp, sb->st_atime, *fmt++); + break; + case 'B': /* birth time with next char strftime format */ +#ifdef HAVE_STRUCT_STAT_ST_BIRTHTIME + if (sb->st_birthtime != 0) + fp_strftime(fp, sb->st_birthtime, *fmt); +#endif + fmt++; + break; /* blank on systems that don't support it */ + case 'c': /* status change time ctime */ + fp_ctime(fp, sb->st_ctime); + break; + case 'C': /* statuc change time with next char strftime format */ + fp_strftime(fp, sb->st_ctime, *fmt++); + break; + case 't': /* modification change time ctime */ + fp_ctime(fp, sb->st_mtime); + break; + case 'T': /* modification time with next char strftime format */ + fp_strftime(fp, sb->st_mtime, *fmt++); + break; + case 'Z': /* empty string for compat SELinux context string */ + break; + /* Modifier parsing here, but also need to modify above somehow */ + case '#': case '-': case '0': case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': case '.': + errx(1, "Format modifier %c not yet supported: '%s'", c, all); + /* Any FeeeBSD-specific modifications here -- none yet */ + default: + errx(1, "Unknown format %c '%s'", c, all); + } + } + fputs(tmp, fout); + if (flush) + fflush(fout); + free(__DECONST(char *, fmt)); + free(tmp); +} From nobody Fri Jul 25 16:35:12 2025 X-Original-To: dev-commits-src-all@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 4bpYPs2yJNz6244j; Fri, 25 Jul 2025 16:35:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpYPr6ZmNz3bkJ; Fri, 25 Jul 2025 16:35:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753461313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QsPrGVBmaxKrp1DjGrd5FX8IU+pB2HlMBpkDPo+8qPs=; b=yx3FKEHJjr+tZ6za147/XjZajItFdkjZhZjRbOwjfw5oAHVqUw8f8vb0Tsr4XHwr8pHX2i oLcdR50Nefn690roWiQJgYsZTACF+SUNQOhYmi+wJZmcf2Hn1GQSTLHYyqxT8axJZU5vOe 5hfhPDT+FeXhGVq38NFGmQ0ozeGdMBOW3aqnTNw6PrET/XrGnj6fX/wD8VbfBkyZjXyE3D q70tqA8bJ7PohADpQxEj1UOXSl0WpuQI5b3OiuT13GmEE5WPX7NP3M3F+tQa8mG92jcTIW Zme3O9ymTttvd6By/DqymoiF3GxGPI8sEtY3jPTlM1xdzrS9C1b6RbZHUWOu7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753461313; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QsPrGVBmaxKrp1DjGrd5FX8IU+pB2HlMBpkDPo+8qPs=; b=DsxkwSORZbmu3Pt8jnf8lOkB8USHm/wpeGU+vavtSk3cA1Oley9O2d2NnXq/uh7zpZhK3U lxaUmCMfThHm/6hS+LUOQo5yq1KCtLWjWybTqDOQEecTF9kV/ggmoisZA+mJIbtpLpAOQf dhTZsjI8sZ2chkXxGIIR0fCDMpmVXjJuHSzd0g3ySlX3hNEKZ+9er9sLnIZ04HLXz1lYwj V4nKtzeekI2xccXTvlj0yMafiRCRh1tW0Zq/bAgLXPsC8ckj8UF8STOgdxMMLmKKwxgwQa IntRyok08b+IRak8CPWEQEMhZ5OVmJMoYsU5u8tew0E62p8WX7gs+NofkEJl0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753461313; a=rsa-sha256; cv=none; b=kxj/dfMQDj9HoKyEx3ISRBUDm55yrweGN3vM1RzU5uFT+7hc+J0rMCRAJEv/hUQ0vW695j DDeuTapXJdLTzblvuVbfrqfqHdGetV5znz4xYk69aQZYlZDqFNEpOce4LwcGTHKYKxGNMK yJKfrDNdI9Zq29qqV5tSduga8f0D+1ajjojy6LzVzp4myZi3rijXyFZR9yG3RTYFcuvItO F0Aak9A4oA6CbOZPQAHrunX848WQZe7lKMs+1d0oMeObjzIwumhPjfReJNzCknNSncz1lD qDOg3hp3R9xInOR+0WDmBcecP55nJ0t1+3OoSqxAJVd9ArqUhrOE+j6bex4qBw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpYPr5KJczsJx; Fri, 25 Jul 2025 16:35:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PGZCQn098590; Fri, 25 Jul 2025 16:35:12 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PGZCTh098587; Fri, 25 Jul 2025 16:35:12 GMT (envelope-from git) Date: Fri, 25 Jul 2025 16:35:12 GMT Message-Id: <202507251635.56PGZCTh098587@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 486cae8f06b1 - main - find: implement -fprint and -fprint0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 486cae8f06b1956b5b6f6b9b89c175aa02d56dda Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=486cae8f06b1956b5b6f6b9b89c175aa02d56dda commit 486cae8f06b1956b5b6f6b9b89c175aa02d56dda Author: Warner Losh AuthorDate: 2025-07-25 16:30:10 +0000 Commit: Warner Losh CommitDate: 2025-07-25 16:34:49 +0000 find: implement -fprint and -fprint0 Implement -fprint fn which will print the matching files to fn, each followed by a newline ('\n'). And -fprint0 (same, except followed by a NUL). Both of these are always true. The file is created if it does not exist, or truncated if it does. This is done first thing unconditionally, so if there's no output, the file will have zero length. Note: GNU Find appears to collect the output for -fprint* to the same file such that they don't interfere. That detail is unimplemented at present. Sponsored by: Netflix Discussed with: jilles Reviewed by: pauamma@gundo.com (man) Differential Revision: https://reviews.freebsd.org/D42667 --- usr.bin/find/extern.h | 3 +++ usr.bin/find/find.1 | 22 ++++++++++++++++++++++ usr.bin/find/find.h | 2 ++ usr.bin/find/function.c | 43 +++++++++++++++++++++++++++++++++++++++++++ usr.bin/find/option.c | 4 ++-- 5 files changed, 72 insertions(+), 2 deletions(-) diff --git a/usr.bin/find/extern.h b/usr.bin/find/extern.h index 6760ac24fb04..02c85d06a34c 100644 --- a/usr.bin/find/extern.h +++ b/usr.bin/find/extern.h @@ -57,6 +57,7 @@ creat_f c_empty; creat_f c_exec; creat_f c_flags; creat_f c_follow; +creat_f c_fprint; creat_f c_fstype; creat_f c_group; creat_f c_ignore_readdir_race; @@ -93,6 +94,8 @@ exec_f f_executable; exec_f f_expr; exec_f f_false; exec_f f_flags; +exec_f f_fprint; +exec_f f_fprint0; exec_f f_fstype; exec_f f_group; exec_f f_inum; diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1 index 1217d9151168..3012ae472015 100644 --- a/usr.bin/find/find.1 +++ b/usr.bin/find/find.1 @@ -515,6 +515,28 @@ and none of the .Ar flags bits match those of .Ar notflags . +.It Ic -fprint Ar filename +This primary always evaluates to true. +This creates +.Ar filename +or truncates the file if it already exists. +The file is created at startup. +It writes the pathname of the current file to this file, followed +by a newline character. +The file will be empty if no files are matched. +.Pp +.It Ic -fprint0 Ar filename +This primary always evaluates to true. +This creates +.Ar filename +or truncates the file if it already exists. +The file is created at startup. +It writes the pathname of the current file to this file, followed +by an ASCII +.Dv NUL +character (character code 0). +The file will be empty if no files are matched. +.Pp .It Ic -fstype Ar type True if the file is contained in a file system of type .Ar type . diff --git a/usr.bin/find/find.h b/usr.bin/find/find.h index 2ddb70fd7bcc..e8bb0ca8c649 100644 --- a/usr.bin/find/find.h +++ b/usr.bin/find/find.h @@ -135,6 +135,7 @@ typedef struct _plandata { char *_a_data[2]; /* array of char pointers */ char *_c_data; /* char pointer */ regex_t *_re_data; /* regex */ + FILE *_fprint_file; /* file stream for -fprint */ } p_un; } PLAN; #define a_data p_un._a_data @@ -162,6 +163,7 @@ typedef struct _plandata { #define e_pbsize p_un.ex._e_pbsize #define e_psizemax p_un.ex._e_psizemax #define e_next p_un.ex._e_next +#define fprint_file p_un._fprint_file typedef struct _option { const char *name; /* option name */ diff --git a/usr.bin/find/function.c b/usr.bin/find/function.c index 21dfab8fe408..ac7fe4dd4e98 100644 --- a/usr.bin/find/function.c +++ b/usr.bin/find/function.c @@ -866,6 +866,49 @@ c_follow(OPTION *option, char ***argvp __unused) return palloc(option); } +/* + * -fprint functions -- + * + * Always true, causes the current pathname to be written to + * specified file followed by a newline + */ +int +f_fprint(PLAN *plan, FTSENT *entry) +{ + fprintf(plan->fprint_file, "%s\n", entry->fts_path); + return 1; +} + +PLAN * +c_fprint(OPTION *option, char ***argvp) +{ + PLAN *new; + char *fn; + + isoutput = 1; + + new = palloc(option); + fn = nextarg(option, argvp); + new->fprint_file = fopen(fn, "w"); + if (new->fprint_file == NULL) + err(1, "fprint: cannot create %s", fn); + + return (new); +} + +/* + * -fprint0 functions -- + * + * Always true, causes the current pathname to be written to + * specified file followed by a NUL + */ +int +f_fprint0(PLAN *plan, FTSENT *entry) +{ + fprintf(plan->fprint_file, "%s%c", entry->fts_path, '\0'); + return 1; +} + #if HAVE_STRUCT_STATFS_F_FSTYPENAME /* * -fstype functions -- diff --git a/usr.bin/find/option.c b/usr.bin/find/option.c index 79fa581e79f5..fa09231a3152 100644 --- a/usr.bin/find/option.c +++ b/usr.bin/find/option.c @@ -83,8 +83,8 @@ static OPTION const options[] = { #endif // -fls { "-follow", c_follow, f_always_true, 0 }, -// -fprint -// -fprint0 + { "-fprint", c_fprint, f_fprint, 0 }, + { "-fprint0", c_fprint, f_fprint0, 0 }, // -fprintf #if HAVE_STRUCT_STATFS_F_FSTYPENAME { "-fstype", c_fstype, f_fstype, 0 }, From nobody Fri Jul 25 17:11:57 2025 X-Original-To: dev-commits-src-all@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 4bpZDF6v3Nz626R8; Fri, 25 Jul 2025 17:11: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZDF4xWZz40Qj; Fri, 25 Jul 2025 17:11:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753463517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/cgpyw6CSEydMvrry+5QFR9osbMoljD5/4O0RIa69ns=; b=KqTZrpPOPYuzRd+JbhhPi4880+gmIxM558/Kx5XzIPW7YhD5Ag5NwyR6KtUHuiNCMVQMOD BFnIRAqgVUyyUBtVMFhDxKP6mf4KsZKZ2wgV+nltH2agBGicvdLhXznwmbjAd+eks8vEdT yO75ydhUASM7EEDlXTBJ+6G0x3mg9x/95H6nKKzD98vE5j0gU6lpSIUml7uRSgb4hEuqTF n9wxLl2ObbH1dIEgUEk/66E3XCVqHbO56MwTzUqEYMOzLCxAUApevqs7aB2UY3TjO/9a4T sK1onbaYgTsVVX/ZMgR6ZHz8LG2x+V/Pe7QjD6S9TH0S7x+96Nh6yDiOlTFvWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753463517; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/cgpyw6CSEydMvrry+5QFR9osbMoljD5/4O0RIa69ns=; b=G90q99yr3jYRnMRo3pU7yztrNDrf8uNm4ZBMpdjWlgd1MICy9QIkPK/iMZmanaSMegPN2u uf0DPKCxwh4if/vUqYc9lfqJa01ZhzFBzv6+Rj4wf88w4+ZDjxcKSHHUhV3DLdiL2TqVUc 4v69/9pMlZqzvMiYXkLdgiOPSD6ZrD0gL/JjZDz2U1ECbdrQ7fgfakKnbVZH8a2a1WiCYS E6Tzm6E7wVvX7rjyAx3EdshrF5xtWkW6IiXDfWzbLsUtfM0raCNzuxuGClF44uDkAoGU6L WYbTw9YLJ6Y9aPCbWUBvVLlyE/OKk0H39XqMDkUc4nlt7Ug69R3NvN58PI1ZBQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753463517; a=rsa-sha256; cv=none; b=s78zwm2gH/Aqrm6vihUcBhiVp1qkwIiQ/BvDcPau6Hfv5PWkWT2M8lR9p1aGguRjmLaylR 1eTZBjRTC9tofRL215XAVsI6y7LWH0s1Qxv4FGPrb0MtqV7clEah4ZrfqHxEeKzVbSYOhW NlcYBbf2uHPvjqaYwZVgfrAFmsh5+otE4liZekUHWdoBu9GUig5BWIYBnl8nJKZBi0Qzp4 crjg9+xxzofEwZadtEousmx9kXs9e2mJJ64McMP/n7bZSuAFT2Xve7OjPtSMRB/NMTepCn pthG+1yUBkTNPNxFCsx/QX/P4vHfzsXYb+ZFOZcMNJG8XuZm7b/voxJh9CE8jQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZDF4HXTzsCJ; Fri, 25 Jul 2025 17:11:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHBvfl073619; Fri, 25 Jul 2025 17:11:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHBveJ073616; Fri, 25 Jul 2025 17:11:57 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:11:57 GMT Message-Id: <202507251711.56PHBveJ073616@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 5c3081bda964 - main - devd/moused.conf: Stop moused quietly on destroy of a ums device List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 5c3081bda9649310f0c507fde90e2cf01974ebe1 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=5c3081bda9649310f0c507fde90e2cf01974ebe1 commit 5c3081bda9649310f0c507fde90e2cf01974ebe1 Author: Konstantin Zhulidov AuthorDate: 2025-07-12 22:12:32 +0000 Commit: Warner Losh CommitDate: 2025-07-25 16:50:34 +0000 devd/moused.conf: Stop moused quietly on destroy of a ums device Signed-off-by: Konstantin Zhulidov Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/1764 --- sbin/devd/moused.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/devd/moused.conf b/sbin/devd/moused.conf index 002edad9a8a9..ed1060ffdf2e 100644 --- a/sbin/devd/moused.conf +++ b/sbin/devd/moused.conf @@ -31,5 +31,5 @@ notify 100 { match "type" "DESTROY"; match "cdev" "ums[0-9]+"; - action "service moused stop $cdev"; + action "service moused quietstop $cdev"; }; From nobody Fri Jul 25 17:28:39 2025 X-Original-To: dev-commits-src-all@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 4bpZbX4tydz626t7; Fri, 25 Jul 2025 17:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZbX0sz6z3FB3; Fri, 25 Jul 2025 17:28:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753464520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BVNKHCFO9nE4b99Kl59ao71yjlnZwx6iReaEyS8N3Rk=; b=Hf0GIKdjHQohD6Vw4APA07O8AlLQNjAXXcvGzjhUUu4JlMEmtUfA2bl4g5KrcA0C7fxTbg zFeUueKIm4Dh5H+nrwLFBYgZ7gXX61sx39by7gBx5hNFjMObeThAga0yTZ1KUg0BzZeoLb HGzni/LHNVZWQm8K83H2+tgy9NBu2MEkRco5yiqCEzjneHw38J1Y6R6kfmHYUnGBl9wEMl DMlpfbUA2Ack9XDczPT11jRY4XJLTnpLSBu32XPVWMtAqM923fu3L23+P5ewBZ3jN6ooSk 9KRSCGwellX1Sou4TsD4km6U4s0sR98rr5TSKIiXjSsBUOFoiJ4dSEpnXFwo1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753464520; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BVNKHCFO9nE4b99Kl59ao71yjlnZwx6iReaEyS8N3Rk=; b=btWxp71fFc3QetkQ+1wOIa+6Tkl1yA1alIkBEMmlfQLpj7W8Xp3rEzR/a1SaXiJdq9yfSU eTpA0QeccDQ18c3GQ4UmnaunM1DHOAsJBDkWnbxD/t9GeciGY9qCWaroYagYNYGR5t9f2G YDG++YaFmuugBKRpDEjPzqVguzHNDVvPzuP2VXiL2Gzwk22biKCvYmygfRqwHKAoXMAEDS ZxWKC7IH2REp7ADs+re1Q05C9Fbjhle/40eeRjwl6bDrAKKs0RKG1wTLq7rA83+JKD3/zx gbPGFbYp81jOTAgifm1Qv/5636sGGXcSPPdPLQIT9wCcQs9iWK1x4yokxYXgOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753464520; a=rsa-sha256; cv=none; b=jyAI9dw8emfhymsVzTctVtevwZ+J4JWaFkpMOMBTmelPdRGXHlAZbjBxFXpyX6W53gBS/k QkUKk2zAoARwOIifTfyCoPvpzXXUQzzQ5Eza7Zw6Q0zKLnY0lpaEpf/gRxUjyQtH1Zcnks K3PqXz6b/1Q44nHy55aIF1lF4sDti7eR+nKG3lxmX6ip3IMCGuhq8t9L5XZqmoFrtsGOIE 9KFfDxiNrfhwNq1UdECGELWcRmLEwH4Lxtms6rUZaaWAtfwfTrQJQAuSILDIgzrRYUvLwg uzOpELmqjNir5IQM8IBxkRTTpvudN9E6yxad+2hTTGyWqDX/Ob40K+FKCnqOgA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZbX0ByMzt7B; Fri, 25 Jul 2025 17:28:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHSdVX093700; Fri, 25 Jul 2025 17:28:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHSdN7093697; Fri, 25 Jul 2025 17:28:39 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:28:39 GMT Message-Id: <202507251728.56PHSdN7093697@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 5e50b89ddf2b - main - bsd.man.mk: add MANGROUPS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5e50b89ddf2b47154b3b632b46bc99876d01866d Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=5e50b89ddf2b47154b3b632b46bc99876d01866d commit 5e50b89ddf2b47154b3b632b46bc99876d01866d Author: Lexi Winter AuthorDate: 2025-07-25 14:00:48 +0000 Commit: Lexi Winter CommitDate: 2025-07-25 17:31:26 +0000 bsd.man.mk: add MANGROUPS MANGROUPS allows manpages to be divided into groups with their own options, analogous to CONFGROUPS. This is mainly used for installing manpages into the correct package by setting ${PACKAGE}. Convert the backward-compatibility variables MAN1..MAN9 into man groups. Reviewed by: sjg Differential Revision: https://reviews.freebsd.org/D51490 --- share/mk/bsd.man.mk | 158 +++++++++++++++++++++++++++++++++------------------- 1 file changed, 101 insertions(+), 57 deletions(-) diff --git a/share/mk/bsd.man.mk b/share/mk/bsd.man.mk index 96b8f07c25e2..a5a4fd528268 100644 --- a/share/mk/bsd.man.mk +++ b/share/mk/bsd.man.mk @@ -39,6 +39,13 @@ # # MANDOC_CMD command and flags to create preformatted pages # +# MANGROUPS A list of groups, each of which should be a variable containing +# a list of manual pages in that group. By default one group is +# defined called "MAN". +# +# For each group, group-specific options may be set: +# OWN, GRP, MODE and PACKAGE. +# # +++ targets +++ # # maninstall: @@ -49,11 +56,10 @@ .error bsd.man.mk cannot be included directly. .endif -.if ${MK_MANSPLITPKG} == "no" -MINSTALL?= ${INSTALL} ${TAG_ARGS} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} -.else -MINSTALL?= ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},man} -o ${MANOWN} -g ${MANGRP} -m ${MANMODE} -.endif +MANGROUPS?= MAN + +# Backwards compatibility. +MINSTALL?= ${MANINSTALL} CATDIR= ${MANDIR:H:S/$/\/cat/} CATEXT= .cat @@ -65,18 +71,55 @@ MCOMPRESS_EXT?= ${COMPRESS_EXT} SECTIONS= 1 2 3 4 5 6 7 8 9 .SUFFIXES: ${SECTIONS:S/^/./g} - # Backwards compatibility. .if !defined(MAN) .for __sect in ${SECTIONS} -.if defined(MAN${__sect}) && !empty(MAN${__sect}) -MAN+= ${MAN${__sect}} -.endif +MANGROUPS+= MAN${__sect} .endfor .endif +# Following the conventions of MANGROUPS, manpage links should be defined +# as ${group}LINKS, which means the default groups' links would be called +# MANLINKS. However it's actually called MLINKS, so for compatibility, +# use ${MLINKS} as the default group's links if it's set. +.if defined(MLINKS) +MANLINKS= ${MLINKS} +.endif + +maninstall: realmaninstall manlinksinstall .PHONY +# Make sure all manpages are installed before we try to link any. +.ORDER: realmaninstall manlinksinstall +realmaninstall: .PHONY +manlinksinstall: .PHONY + all-man: +.for __group in ${MANGROUPS} + +realmaninstall: realmaninstall-${__group} +manlinksinstall: manlinksinstall-${__group} + +${__group}OWN?= ${MANOWN} +${__group}GRP?= ${MANGRP} +${__group}MODE?= ${MANMODE} + +# Tag processing is only done for NO_ROOT installs. +.if defined(NO_ROOT) + +.if !defined(${__group}TAGS) || ! ${${__group}TAGS:Mpackage=*} +.if ${MK_MANSPLITPKG} == "no" +${__group}TAGS+= package=${${__group}PACKAGE:U${PACKAGE:Uutilities}} +.else +${__group}TAGS+= package=${${__group}PACKAGE:U${PACKAGE:Uutilities}}-man +.endif +.endif + +${__group}TAG_ARGS= -T ${${__group}TAGS:[*]:S/ /,/g} +.endif # defined(NO_ROOT) + +${__group}INSTALL?= ${INSTALL} ${${__group}TAG_ARGS} \ + -o ${${__group}OWN} -g ${${__group}GRP} -m ${${__group}MODE} + .if ${MK_MANCOMPRESS} == "no" # Make special arrangements to filter to a temporary file at build time @@ -90,10 +133,10 @@ FILTEXTENSION= ZEXT= .if defined(MANFILTER) -.if defined(MAN) && !empty(MAN) -CLEANFILES+= ${MAN:T:S/$/${FILTEXTENSION}/g} -CLEANFILES+= ${MAN:T:S/$/${CATEXT}${FILTEXTENSION}/g} -.for __page in ${MAN} +.if defined(${__group}) && !empty(${__group}) +CLEANFILES+= ${${__group}:T:S/$/${FILTEXTENSION}/g} +CLEANFILES+= ${${__group}:T:S/$/${CATEXT}${FILTEXTENSION}/g} +.for __page in ${${__group}} .for __target in ${__page:T:S/$/${FILTEXTENSION}/g} all-man: ${__target} ${__target}: ${__page} @@ -107,12 +150,12 @@ ${__target}: ${__page} .endfor .endif .endfor -.endif # !empty(MAN) +.endif # !empty(${__group}) .else # !defined(MANFILTER) -.if defined(MAN) && !empty(MAN) -CLEANFILES+= ${MAN:T:S/$/${CATEXT}/g} +.if defined(${__group}) && !empty(${__group}) +CLEANFILES+= ${${__group}:T:S/$/${CATEXT}/g} .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) -.for __page in ${MAN} +.for __page in ${${__group}} .for __target in ${__page:T:S/$/${CATEXT}/g} all-man: ${__target} ${__target}: ${__page} @@ -120,7 +163,7 @@ ${__target}: ${__page} .endfor .endfor .else -all-man: ${MAN} +all-man: ${${__group}} .endif .endif .endif # defined(MANFILTER) @@ -129,10 +172,10 @@ all-man: ${MAN} ZEXT= ${MCOMPRESS_EXT} -.if defined(MAN) && !empty(MAN) -CLEANFILES+= ${MAN:T:S/$/${MCOMPRESS_EXT}/g} -CLEANFILES+= ${MAN:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g} -.for __page in ${MAN} +.if defined(${__group}) && !empty(${__group}) +CLEANFILES+= ${${__group}:T:S/$/${MCOMPRESS_EXT}/g} +CLEANFILES+= ${${__group}:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g} +.for __page in ${${__group}} .for __target in ${__page:T:S/$/${MCOMPRESS_EXT}/} all-man: ${__target} ${__target}: ${__page} @@ -158,8 +201,9 @@ ${__target}: ${__page} .endif # ${MK_MANCOMPRESS} == "no" -.if !defined(NO_MLINKS) && defined(MLINKS) && !empty(MLINKS) -.for _oname _osect _dname _dsect in ${MLINKS:C/\.([^.]*)$/.\1 \1/} +_MANLINKS= +.if !defined(NO_MLINKS) && defined(${__group}LINKS) && !empty(${__group}LINKS) +.for _oname _osect _dname _dsect in ${${__group}LINKS:C/\.([^.]*)$/.\1 \1/} _MANLINKS+= ${MANDIR}${_osect}${MANSUBDIR}/${_oname} \ ${MANDIR}${_dsect}${MANSUBDIR}/${_dname} .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) @@ -169,37 +213,37 @@ _MANLINKS+= ${CATDIR}${_osect}${MANSUBDIR}/${_oname} \ .endfor .endif -.if defined(MAN) && !empty(MAN) +.if defined(${__group}) && !empty(${__group}) .if ${MK_STAGING_MAN} == "yes" -STAGE_TARGETS+= stage_files -_mansets:= ${MAN:E:O:u:M*[1-9]:@s@man$s@} -STAGE_SETS+= ${_mansets} -.for _page in ${MAN} -stage_files.man${_page:T:E}: ${_page} +STAGE_TARGETS+= stage_files.${__group} +_mansets.${__group}:= ${${__group}:E:O:u:M*[1-9]:@s@man$s@} +STAGE_SETS+= ${_mansets.${__group}} +.for _page in ${${__group}} +stage_files.${__group}.man${_page:T:E}: ${_page} .if target(${_page}${MCOMPRESS_EXT}) -stage_files.man${_page:T:E}: ${_page}${MCOMPRESS_EXT} +stage_files.${__group}.man${_page:T:E}: ${_page}${MCOMPRESS_EXT} .endif -STAGE_DIR.man${_page:T:E}?= ${STAGE_OBJTOP}${MANDIR}${_page:T:E}${MANSUBDIR} +STAGE_DIR.${__group}.man${_page:T:E}?= ${STAGE_OBJTOP}${MANDIR}${_page:T:E}${MANSUBDIR} .endfor -.if !defined(NO_MLINKS) && !empty(MLINKS) -STAGE_SETS+= mlinks -STAGE_TARGETS+= stage_links -STAGE_LINKS.mlinks:= ${MLINKS:M*.[1-9]:@f@${f:S,^,${MANDIR}${f:E}${MANSUBDIR}/,}@} -stage_links.mlinks: ${_mansets:@s@stage_files.$s@} +.if !defined(NO_MLINKS) && !empty(${__group}LINKS) +STAGE_SETS+= mlinks.${__group} +STAGE_TARGETS+= stage_links.${__group} +STAGE_LINKS.mlinks.${__group}:= ${${__group}LINKS:M*.[1-9]:@f@${f:S,^,${MANDIR}${f:E}${MANSUBDIR}/,}@} +stage_links.mlinks.${__group}: ${_mansets.${__group}:@s@stage_files.${__group}.$s@} .endif .endif .endif -maninstall: -.if defined(MAN) && !empty(MAN) -maninstall: ${MAN} +realmaninstall-${__group}: +.if defined(${__group}) && !empty(${__group}) +realmaninstall-${__group}: ${${__group}} .if ${MK_MANCOMPRESS} == "no" .if defined(MANFILTER) -.for __page in ${MAN} - ${MINSTALL} ${__page:T:S/$/${FILTEXTENSION}/g} \ +.for __page in ${${__group}} + ${${__group}INSTALL} ${__page:T:S/$/${FILTEXTENSION}/g} \ ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}/${__page} .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) - ${MINSTALL} ${__page:T:S/$/${CATEXT}${FILTEXTENSION}/g} \ + ${${__group}INSTALL} ${__page:T:S/$/${CATEXT}${FILTEXTENSION}/g} \ ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page} .endif .endfor @@ -212,41 +256,39 @@ maninstall: ${MAN} esac; \ page=$$1; shift; sect=$$1; shift; \ d=${DESTDIR}${MANDIR}$${sect}${MANSUBDIR}; \ - ${ECHO} ${MINSTALL} $${page} $${d}; \ - ${MINSTALL} $${page} $${d}; \ + ${ECHO} ${${__group}INSTALL} $${page} $${d}; \ + ${${__group}INSTALL} $${page} $${d}; \ done .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) -.for __page in ${MAN} - ${MINSTALL} ${__page:T:S/$/${CATEXT}/} \ +.for __page in ${${__group}} + ${${__group}INSTALL} ${__page:T:S/$/${CATEXT}/} \ ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T} .endfor .endif .endif # defined(MANFILTER) .else # ${MK_MANCOMPRESS} == "yes" -.for __page in ${MAN} - ${MINSTALL} ${__page:T:S/$/${MCOMPRESS_EXT}/g} \ +.for __page in ${${__group}} + ${${__group}INSTALL} ${__page:T:S/$/${MCOMPRESS_EXT}/g} \ ${DESTDIR}${MANDIR}${__page:E}${MANSUBDIR}/ .if defined(MANBUILDCAT) && !empty(MANBUILDCAT) - ${MINSTALL} ${__page:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g} \ + ${${__group}INSTALL} ${__page:T:S/$/${CATEXT}${MCOMPRESS_EXT}/g} \ ${DESTDIR}${CATDIR}${__page:E}${MANSUBDIR}/${__page:T:S/$/${MCOMPRESS_EXT}/} .endif .endfor .endif # ${MK_MANCOMPRESS} == "no" .endif + +manlinksinstall-${__group}: .for l t in ${_MANLINKS} # On MacOS, assume case folding FS, and don't install links from foo.x to FOO.x. .if ${.MAKE.OS} != "Darwin" || ${l:tu} != ${t:tu} -.if ${MK_MANSPLITPKG} == "no" - ${INSTALL_MANLINK} ${TAG_ARGS} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT} -.else - ${INSTALL_MANLINK} ${TAG_ARGS:D${TAG_ARGS},man} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT} -.endif + ${INSTALL_MANLINK} ${${__group}TAG_ARGS} ${DESTDIR}${l}${ZEXT} ${DESTDIR}${t}${ZEXT} .endif .endfor manlint: -.if defined(MAN) && !empty(MAN) -.for __page in ${MAN} +.if defined(${__group}) && !empty(${__group}) +.for __page in ${${__group}} manlint: ${__page}lint ${__page}lint: ${__page} .if defined(MANFILTER) @@ -256,3 +298,5 @@ ${__page}lint: ${__page} .endif .endfor .endif + +.endfor # __group in ${MANGROUPS} From nobody Fri Jul 25 17:28:42 2025 X-Original-To: dev-commits-src-all@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 4bpZbZ6JvFz626bZ; Fri, 25 Jul 2025 17:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZbZ32WPz3Dxm; Fri, 25 Jul 2025 17:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753464522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iJL9RmFp5t2n7YLr8da6YgGs2YQV/4W4lAonaIOPFm8=; b=usxF53wRIcrt2SIarfy6XQTkiRxpPMpKk4YOFXF9x3FYqMJm9AtZnw6rFdtlDcyiRr3lxw XUSjwA0WXOVfPxdXHBmX6WovJ0ugbBCJoRRDho19RgiI0mtqFitzkp8inJLjiqswr3P5Pk 1aC5Kehq73JqzaCnKja5g1d9ITpn88QCOF76HFEgGProGIItI7xuvpT7j0GKlxjZ+lTjQ+ azHy5BbU8qW+FccH+9wBKOSJHgrG3h52obGFvJKDUgnZw4PThlKG883yFyoIkLxfALD2on jl6th8tWMuHs0ywbhffH/GF8aznkKgpGk4CgmSgNDMmVMFt/ez3fR+RTycvaMA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753464522; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iJL9RmFp5t2n7YLr8da6YgGs2YQV/4W4lAonaIOPFm8=; b=kBRXWQotIQ3mB982DRRFJV34p52WDmsN7/rUGm5TYcgY5IqhcEK/fEcibYmAWsLnNElqBr 97sQ2WEMxxOyQt0vkur91gh1DD48B25Ujd00hF2ea75C7BZdtGbYVHM32kMXFAvDjZirqt Vq6qrd28/gtd8Z7dWxDiMpznmpZMnaAmwsVUm4G+UI2LKAW0cSR6PTcZKkqlWxSBIM7UmL VlwfOrdkDSzznCixfSe7xjnoazNN4yW7tokOjTHGzGWZa1HKhh64Rwud7Rlch4P7tj1wz9 f5QxCkuQVNGwrZWekrFP/STELunRciOiVmt8USJhXeoiI8ZdsiJbvEgqayzqAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753464522; a=rsa-sha256; cv=none; b=O0DlWb3ktq0av78gMt2WxGuu+U9AxaMcPbp4yIMuqD2x0PT9R5Yy4vCr1H1r+mRnqRSmu+ KLqnj5OyXSC5jLzmzcedYhPDnlkjmTRiGpaMDFHLrJgBUkjVaCVaPDGHaYQ6Z0fGmhi94h IyocHxtgqNn8xxD/WAg69OAA0Vlkz/IR1RkIOD8n2b5SL7FS4EEJgMnNLzP98shcN8lNxt Xgw9KS/zK/aypyeQEuUhG6DiBRWvEp1FC5yLTFIUHgIdgNuStz5igN526v2k98tAbXQK12 wKKjx7Dcgw4zMnQ7dW5LReuZe6ieFMZRi1gyLknc0GfnU4mOby2g5IOxuoulmQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZbZ1fGFztkS; Fri, 25 Jul 2025 17:28:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHSgg3093775; Fri, 25 Jul 2025 17:28:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHSg1J093772; Fri, 25 Jul 2025 17:28:42 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:28:42 GMT Message-Id: <202507251728.56PHSg1J093772@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 2a454b05f2c1 - main - krb5: remove private headers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2a454b05f2c1f9dc2d27f0d553fd1f890b750aa1 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=2a454b05f2c1f9dc2d27f0d553fd1f890b750aa1 commit 2a454b05f2c1f9dc2d27f0d553fd1f890b750aa1 Author: Lexi Winter AuthorDate: 2025-07-25 14:04:03 +0000 Commit: Lexi Winter CommitDate: 2025-07-25 17:31:26 +0000 krb5: remove private headers I compared the contents of the FreeBSD-kerberos-lib-dev package with the contents of the security/krb5 port. Based on that, remove all the headers which are installed by base krb5 but not by the port. These all appear to be internal headers which are not meant to be publicly visible. This removes some headers with unfortunate conflict-prone names like and . Reviewed by: des, cy Differential Revision: https://reviews.freebsd.org/D51518 --- ObsoleteFiles.inc | 12 ++++++++++++ krb5/lib/kadm5clnt/Makefile | 7 ++----- krb5/lib/kadm5srv/Makefile | 7 ++----- krb5/lib/krad/Makefile | 4 ---- krb5/lib/rpc/Makefile | 6 ------ krb5/libexec/kadmind/Makefile | 1 + krb5/plugins/kdb/db2/Makefile | 1 + krb5/usr.sbin/kdb5_util/Makefile | 1 + 8 files changed, 19 insertions(+), 20 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index e5a3da94e127..2c68b2ab783c 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,18 @@ # xargs -n1 | sort | uniq -d; # done +# 20250725: Headers installed by krb5 which shouldn't have been. +OLD_FILES+=usr/include/kadm5/admin_internal.h +OLD_FILES+=usr/include/kadm5/admin_xdr.h +OLD_FILES+=usr/include/kadm5/kadm_rpc.h +OLD_FILES+=usr/include/kadm5/server_internal.h +OLD_FILES+=usr/include/internal.h +OLD_FILES+=usr/include/t_daemon.h +OLD_FILES+=usr/include/t_test.h +OLD_FILES+=usr/include/dyn.h +OLD_FILES+=usr/include/dynP.h +OLD_FILES+=usr/include/gssrpcint.h + # 20250716: Remove an old manual page, vn(4) was removed in FreeBSD 5.0 OLD_FILES+=usr/share/man/man4/vn.4.gz diff --git a/krb5/lib/kadm5clnt/Makefile b/krb5/lib/kadm5clnt/Makefile index 22d78d7ae2f1..898276e77d04 100644 --- a/krb5/lib/kadm5clnt/Makefile +++ b/krb5/lib/kadm5clnt/Makefile @@ -28,7 +28,8 @@ SRCS= alt_prof.c \ .include "${KRB5_SRCTOP}/lib/kadm5clnt/clnt/Makefile.inc" -CFLAGS+=-I${KRB5_DIR}/lib/kadm5 \ +CFLAGS+=-I${KRB5_DIR}/lib \ + -I${KRB5_DIR}/lib/kadm5 \ -I${KRB5_DIR}/include \ -I${KRB5_OBJTOP}/include/krb5_private \ -I${KRB5_SRCTOP}/include \ @@ -36,10 +37,6 @@ CFLAGS+=-I${KRB5_DIR}/lib/kadm5 \ INCSDIR=${INCLUDEDIR}/kadm5 INCS= admin.h \ - admin_internal.h \ - admin_xdr.h \ - kadm_rpc.h \ - server_internal.h \ ${GENI} KADM_ERR= kadm_err.et diff --git a/krb5/lib/kadm5srv/Makefile b/krb5/lib/kadm5srv/Makefile index 50f1e859f17b..e0ec557a3f5b 100644 --- a/krb5/lib/kadm5srv/Makefile +++ b/krb5/lib/kadm5srv/Makefile @@ -37,7 +37,8 @@ INCS= admin.h \ GEN= kadm_err.c kadm_err.h chpass_util_strings.c chpass_util_strings.h CLEANFILES= ${GEN} ${GENI} -CFLAGS+=-I${KRB5_DIR}/lib/kadm5 \ +CFLAGS+=-I${KRB5_DIR}/lib \ + -I${KRB5_DIR}/lib/kadm5 \ -I${KRB5_DIR}/include \ -I${KRB5_OBJTOP}/include/krb5_private \ -I${KRB5_SRCTOP}/include \ @@ -48,10 +49,6 @@ CFLAGS+=-I${KRB5_DIR}/lib/kadm5 \ HDRDIR= ${KRB5_OBJHDR}/kadm5 HDRS= ${HDRDIR}/admin.h \ - ${HDRDIR}/admin_internal.h \ - ${HDRDIR}/admin_xdr.h \ - ${HDRDIR}/kadm_rpc.h \ - ${HDRDIR}/server_internal.h \ ${HDRDIR}/chpass_util_strings.h \ ${HDRDIR}/kadm_err.h diff --git a/krb5/lib/krad/Makefile b/krb5/lib/krad/Makefile index 0bc74e8318f8..a990354c1877 100644 --- a/krb5/lib/krad/Makefile +++ b/krb5/lib/krad/Makefile @@ -24,10 +24,6 @@ SRCS= attr.c \ packet.c \ remote.c -INCS= internal.h \ - t_daemon.h \ - t_test.h - CFLAGS+=-I${KRB5_DIR}/lib/krad \ -I${KRB5_DIR}/include \ -I${KRB5_SRCTOP}/include \ diff --git a/krb5/lib/rpc/Makefile b/krb5/lib/rpc/Makefile index 3bcd7ff7d9d3..a539803cc57c 100644 --- a/krb5/lib/rpc/Makefile +++ b/krb5/lib/rpc/Makefile @@ -65,10 +65,6 @@ SRCS= auth_gss.c \ xdr_sizeof.c \ xdr_stdio.c -INCS= dyn.h \ - dynP.h \ - gssrpcint.h - CFLAGS+=-I${KRB5_DIR}/lib/rpc \ -I${KRB5_DIR}/include \ -I${KRB5_SRCTOP}/include \ @@ -79,6 +75,4 @@ CFLAGS+=-I${KRB5_DIR}/lib/rpc \ .include -.SUFFIXES: .h .c - .PATH: ${KRB5_DIR}/lib/rpc diff --git a/krb5/libexec/kadmind/Makefile b/krb5/libexec/kadmind/Makefile index a845851f708e..62046214af7b 100644 --- a/krb5/libexec/kadmind/Makefile +++ b/krb5/libexec/kadmind/Makefile @@ -29,6 +29,7 @@ CFLAGS+=-I${KRB5_DIR}/include \ -I${KRB5_SRCTOP}/include \ -I${KRB5_OBJTOP}/lib/gssapi \ -I${KRB5_OBJTOP}/lib \ + -I${KRB5_DIR}/lib \ -I${KRB5_DIR}/lib/gssapi/krb5 \ -I${KRB5_DIR}/lib/gssapi/generic diff --git a/krb5/plugins/kdb/db2/Makefile b/krb5/plugins/kdb/db2/Makefile index e9429bc03de1..1d42951c3c97 100644 --- a/krb5/plugins/kdb/db2/Makefile +++ b/krb5/plugins/kdb/db2/Makefile @@ -49,6 +49,7 @@ CFLAGS+=-I${KRB5_DIR}/plugins/kdb/db2 \ -I${KRB5_DIR}/include \ -I${KRB5_SRCTOP}/include \ -I${KRB5_DIR}/lib/kdb \ + -I${KRB5_DIR}/lib \ -I${KRB5_OBJTOP}/plugins/kdb/db2 \ -I${KRB5_OBJTOP}/lib/kdb diff --git a/krb5/usr.sbin/kdb5_util/Makefile b/krb5/usr.sbin/kdb5_util/Makefile index 5b3d3ecc3410..1fab7ee58556 100644 --- a/krb5/usr.sbin/kdb5_util/Makefile +++ b/krb5/usr.sbin/kdb5_util/Makefile @@ -32,6 +32,7 @@ INCS= ${GENI} MAN= kdb5_util.8 CFLAGS+=-I${KRB5_DIR}/include \ + -I${KRB5_DIR}/lib \ -I${KRB5_SRCTOP}/include MAN= kdb5_util.8 From nobody Fri Jul 25 17:28:43 2025 X-Original-To: dev-commits-src-all@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 4bpZbb71P5z626bf; Fri, 25 Jul 2025 17: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZbb382Wz3FBF; Fri, 25 Jul 2025 17: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=1753464523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BUzpq2ps3j2SPl4pAygs3uxIfxrhevi3EBD5D31HWgQ=; b=JUF/5A1DkaGLQdrBWrShtIp61gma/VNwpOOaJ9vPh7p5qGkHrHwwfZz67kj5ILqKY7eAyE edycukznxfksUnue1Q5uS2VX51uzjs2ZhqEwpwXIVRCi+ukZI2ULOQP6yghZuGp8HR5tls h/Iqo8topsfGjGwc51aYIr0DDOKrzl8oNInWyTAdnj2yeS0oWPh+wKcppuaEc8Z0mEyY4s fNrvPb6Xe2poyy17nOo3aPCDpgUir7yQYzuBAGs4BdnLoYx+UBjI3opRo73DqmQm+3VdP7 mwGdYMSNR5XhnyFK8m+/svBBODtiA5farEGZ14gdM3DSTUzc1dKmmTIskwcY3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753464523; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BUzpq2ps3j2SPl4pAygs3uxIfxrhevi3EBD5D31HWgQ=; b=Rc80taI9i4fb5uZmq334ST+qTRUYxnmCgsJvivoXp0bBldIumu9/pUa8KvBC0AaSyCInMY LDHoDOhX3gCaeWkDKew6w8ifVIUbENtrVw+cGH5xB7iIGIiqrimlee7Gj21TWjtwHh1gKn Z4vkmG5YPiLtuxO1QB67l9RB+ML4wHfYjNktLQkmkplAZGsaeJgXTI7QPhC16Bq9No52my HmheeU0QENZ4v4HCBtRkSNKWfQ4OojDc98gqbzG+B92dVM93+ouiKm5en5C2+I8B0LYPzn 73Q6ktRcUAzSzKlh4+3x7JJ+SYjdStEfDJn2I4AmdX5ylrV7CE+tIwD18XM9uQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753464523; a=rsa-sha256; cv=none; b=AJtZsGedCa8ao66Pprf6C+aP+m0NIzP6BpyJnkfaxl0kKD0atdMNuRkEAmpFIHH66spuHL VQORlz3VQt5zp9CmVvkUzDbL+SP/n7Dmou5QP1j0ADP5NnezsRPVGovgeoIaLCd37n02hl P1JZU971B6QldD28T/7YZVQAuWJIgfSreRFmeFXjYmSJAOBBqjT++vU84UpVIClPtkx47x VOLVf9EbSNuR6EIZl1fVZMKGRRBW0tGKCEsAmkhS1cpQ+phVxLwOSotAcbZxaQLaCr1vZr tlhfkUltjZiasCA6ImV2J07Zn23bgOKoV4KukeFZTVRzhHVVZOjxiOQUHZ1PwA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZbb2fypztj3; Fri, 25 Jul 2025 17:28:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHShqo093808; Fri, 25 Jul 2025 17:28:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHSh9j093805; Fri, 25 Jul 2025 17:28:43 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:28:43 GMT Message-Id: <202507251728.56PHSh9j093805@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 98d46e05ab08 - main - krb5/util/profile: Do not install profile.5 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 98d46e05ab08c015247b53e770895521acca93fe Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=98d46e05ab08c015247b53e770895521acca93fe commit 98d46e05ab08c015247b53e770895521acca93fe Author: Lexi Winter AuthorDate: 2025-07-25 14:04:40 +0000 Commit: Lexi Winter CommitDate: 2025-07-25 17:31:26 +0000 krb5/util/profile: Do not install profile.5 I am not sure what this file from upstream is supposed to be, but it's not a manual page. Remove it and add to ObsoleteFiles. Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D51517 --- ObsoleteFiles.inc | 3 ++- krb5/util/profile/Makefile | 7 +------ 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 2c68b2ab783c..c66ece2a0767 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,7 +51,7 @@ # xargs -n1 | sort | uniq -d; # done -# 20250725: Headers installed by krb5 which shouldn't have been. +# 20250725: Files which were briefly installed by WITH_MITKRB5 in 15.0. OLD_FILES+=usr/include/kadm5/admin_internal.h OLD_FILES+=usr/include/kadm5/admin_xdr.h OLD_FILES+=usr/include/kadm5/kadm_rpc.h @@ -62,6 +62,7 @@ OLD_FILES+=usr/include/t_test.h OLD_FILES+=usr/include/dyn.h OLD_FILES+=usr/include/dynP.h OLD_FILES+=usr/include/gssrpcint.h +OLD_FILES+=usr/share/man/man5/profile.5.gz # 20250716: Remove an old manual page, vn(4) was removed in FreeBSD 5.0 OLD_FILES+=usr/share/man/man4/vn.4.gz diff --git a/krb5/util/profile/Makefile b/krb5/util/profile/Makefile index a921e29150bb..7d1b806bfb5d 100644 --- a/krb5/util/profile/Makefile +++ b/krb5/util/profile/Makefile @@ -67,13 +67,8 @@ profile.h: profile.hin prof_err.h prof_file.c: profile.h -MAN= profile.5 - .include -.SUFFIXES: .h .c .man .1 .et - -.man.5: - cp ${.ALLSRC} ${.TARGET} +.SUFFIXES: .et .PATH: ${KRB5_DIR}/util/profile From nobody Fri Jul 25 17:28:45 2025 X-Original-To: dev-commits-src-all@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 4bpZbf2RhXz626tV; Fri, 25 Jul 2025 17:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZbd6HXyz3FDR; Fri, 25 Jul 2025 17:28:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753464525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sIqclLu5Yyo+/MVj+SA2/JB9A8tFVg1HpyjWDACe6gM=; b=ex0oTPxiXsV7h4cetfFAkV9va8K+UC8tR+TgVpPJXCxsqHnKJVSyhcWY1IohgApjEMRfdI HJqiE72MCjwxeb+LU92yygBZcleT+pxXhlKDK902MNk3bs1JIQbdAsGTd0vaSh5mJkErsu SXPIpo1+8D0qmVHVFOZReXO8TLPgnhHzM3oQBbEAYJP3t9GmSBAW3Rz/tttKu6TJzPKXyM n6aImdrUF4ZqRcfIDLsUHxw1ADgvqdmShxCIi5zN8R+5On5RXMr2r7ccaxRYJ8oS2L5VwU 0MugUbd0gUQBs0U7LrLkmCD853+wDnXdstbK1q48NcODuD3jA82XcRIqZzPcnA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753464525; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sIqclLu5Yyo+/MVj+SA2/JB9A8tFVg1HpyjWDACe6gM=; b=Nq5GAMmwTXEZwCjHin1jElt+2U1Cgtlq4mjLQa3EBdMFWB5x2+wpnMv/Q6EQtljEviwM2O tApSpfFBO8ZWbjQdFydrupkDOAMR0Mt6egoWqTUPJPWJf9rBvaJr2aYatwglYQlXn9cwAz eHDck1hnup9BIi4k4/yfB7BTi4nqJ2KAlvabZ+1Rs9a72W7W9bwNlK2HYo84x9Qb9HinXt +BTTx9YC8ry5BOTZYRfDl+fPCOXmNLie6zeRgSXQ2qd8rDAINgTwbsg5WksA7K2laXy7Rm PqDCNPhQF52h4aBOgXODscsKdWqVZ4WsUYylmansDtswxzh5So9OIuS1ej72hg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753464525; a=rsa-sha256; cv=none; b=hXfinl0AOM02jCMFxoZjwQNqbjYgve8Dc6ErRxpnLSavC5IPedXIhk/OdUJ9vwVG5LKl2p EC6ZV2BTO0zeLm1lav6xaSWd9DbVurh2np3+vU46QDjuaOGAK4q68irSEJqOrgronRvLdw 3n085ttnmsnSUx6epTGMjUtyXbwZVzwUQ+HXQAoH9FhwAsqzchwnWuRo5Ch5SjAt+ypMNT HWGfPe/N4sZfQCGVXjmhDDlew7LfueEFOHwPv6z46WYtyZ9nPBKijRF0CS7PjxwOiv75x1 32NadHrPYNOT4Zf05kQTlLCojq6JqMsc6kbiTLYtnqxZ/WP2fyh3q2IF8nye0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZbd4WKBztD0; Fri, 25 Jul 2025 17:28:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHSjel093875; Fri, 25 Jul 2025 17:28:45 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHSjSK093872; Fri, 25 Jul 2025 17:28:45 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:28:45 GMT Message-Id: <202507251728.56PHSjSK093872@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: ca9ccf0ce9ad - main - krb5/usr.bin/kadmin: Fix typo kamdin -> kadmin List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ca9ccf0ce9adf9c0e079936f2766fc464181b6c2 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=ca9ccf0ce9adf9c0e079936f2766fc464181b6c2 commit ca9ccf0ce9adf9c0e079936f2766fc464181b6c2 Author: Lexi Winter AuthorDate: 2025-07-25 14:05:51 +0000 Commit: Lexi Winter CommitDate: 2025-07-25 17:31:26 +0000 krb5/usr.bin/kadmin: Fix typo kamdin -> kadmin While here, remove some redundant SUFFIXES. Reviewed by: des, cy Differential Revision: https://reviews.freebsd.org/D51513 --- ObsoleteFiles.inc | 1 + krb5/usr.bin/kadmin/Makefile | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index c66ece2a0767..0da710c94797 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -63,6 +63,7 @@ OLD_FILES+=usr/include/dyn.h OLD_FILES+=usr/include/dynP.h OLD_FILES+=usr/include/gssrpcint.h OLD_FILES+=usr/share/man/man5/profile.5.gz +OLD_FILES+=usr/share/man/man8/kamdin.local.8.gz # 20250716: Remove an old manual page, vn(4) was removed in FreeBSD 5.0 OLD_FILES+=usr/share/man/man4/vn.4.gz diff --git a/krb5/usr.bin/kadmin/Makefile b/krb5/usr.bin/kadmin/Makefile index 36b7378dee11..b2a094795d48 100644 --- a/krb5/usr.bin/kadmin/Makefile +++ b/krb5/usr.bin/kadmin/Makefile @@ -19,7 +19,7 @@ SCRIPTS= k5srvutil.sh MAN= kadmin.1 \ k5srvutil.1 -MLINKS= kadmin.1 kamdin.local.8 +MLINKS= kadmin.1 kadmin.local.8 CLEANFILES= kadmin.1 k5srvutil.1 @@ -32,7 +32,7 @@ k5srvutil.1: k5srvutil.man .include -.SUFFIXES: .h .c. .man .1 +.SUFFIXES: .man .man.1: @cp ${.ALLSRC} ${.TARGET} From nobody Fri Jul 25 17:28:46 2025 X-Original-To: dev-commits-src-all@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 4bpZbg4BtSz6278q; Fri, 25 Jul 2025 17:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZbg0ym9z3F8R; Fri, 25 Jul 2025 17:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753464527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1D7w7+AwBn7Vg1Rh8B1rTE/XkuiDn3To4KwuhgVg/XM=; b=Lidr+Eh4JqeeORe1FkV5x6ND21m1sBA2zIxov8w8s2TzFRdRpFjtVvQaBWdahkVOoLvuzc dWPdYaBSkWm+gjk7dRtLgb1Ser48IXYzsXhN4TAjuQ+aZ2yPKAIefGnS2YwpQpuX88aqi8 4ao/JPSzQWUSrkn+Gv9aFBnCyMbPTtyxv/Ko2oWTUpyaFqDzLwvH7uKx/g3HNwlmWlqhP9 ux61HCO1sW+icgbFFjsfdspIiqTKbpdZTdWs6sh8rZlH9nrh9hq2UL4XUsX69m3hl6wg3P r48nxA8SZ8ZO517SoLh9zh/pRVbVe1yKuAZcSqm9LQTexkHLedreVgT+SLrYzQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753464527; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1D7w7+AwBn7Vg1Rh8B1rTE/XkuiDn3To4KwuhgVg/XM=; b=lwGr01gwZ7f2jA4mQG0cbrBgkQKnHKyuGvfLVeAjPqgha6b1A28IctUnr7H9Z5Xk1NNJP1 WC1t+igNJdL831DvP7X6difL/kKGvGg76FF1bMFTX6Elf1RK5gKvqa0aszjv+ZHpAp/cZA 0/agZ0BlL1zS26xt3f7zIiwBoY6vlh4cA3Knx1jPlE/7tlWyFjRcRLBxwzwBqwEM7yXy88 hUxUdY55wh39W/FKVfjZ9pqbd0uP8uzKKL5dLB0Yl1Gi/u70dPDKzUO+CEc+1fji48oWgV MesueaEP6j7OHmJW4tlzGFlMubp3kuJ26q1oLXG3JwRshAJo+yf6g0k96mmylw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753464527; a=rsa-sha256; cv=none; b=xwEbzmIRmlFvS520fekbNCSxp6o1TK+ZyVOFRQrY7PoQa3BnrzGmWSX51sKg3enSSzk1O6 tER3hKqf5AIEHeok2YBm8aqj3tejtBiUdaK0XQeh9oeBZ/i7jvdxx1AcAPBBoirE64HZoC zaI1vhIokxPMPMeHH1LT8YH1yTgh9yp+WJZ/75qrsCq/xEddj20As7blP8I7W3PmdmVBun TJj8Orhk12xEeY/37wY0hJRvCgEUnjRuWYJxyEyxOAfBe00Me/KLvVJvLmaQ0x2AOg2lyq 9wDL/uE++4tCVxK/uP7jsY2kTTMh0NVzboNvhdJQ4W2e91iQ00q0e/bvGMtrNA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZbf5ZRgztmp; Fri, 25 Jul 2025 17:28:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHSk9V093908; Fri, 25 Jul 2025 17:28:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHSkDU093905; Fri, 25 Jul 2025 17:28:46 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:28:46 GMT Message-Id: <202507251728.56PHSkDU093905@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: b98d0566b2bd - main - krb5: don't install /usr/include/import_err.h List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b98d0566b2bddb3478abe6f26cfde180920de092 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=b98d0566b2bddb3478abe6f26cfde180920de092 commit b98d0566b2bddb3478abe6f26cfde180920de092 Author: Lexi Winter AuthorDate: 2025-07-25 14:06:21 +0000 Commit: Lexi Winter CommitDate: 2025-07-25 17:31:26 +0000 krb5: don't install /usr/include/import_err.h This header is not installed by upstream krb5, and since it's part of kdb5_util, installing it causes an unwanted krb5-dev package to be created. Reviewed by: des Differential Revision: https://reviews.freebsd.org/D51419 --- ObsoleteFiles.inc | 1 + krb5/usr.sbin/kdb5_util/Makefile | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 0da710c94797..76c7b2eda4e8 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -62,6 +62,7 @@ OLD_FILES+=usr/include/t_test.h OLD_FILES+=usr/include/dyn.h OLD_FILES+=usr/include/dynP.h OLD_FILES+=usr/include/gssrpcint.h +OLD_FILES+=usr/include/import_err.h OLD_FILES+=usr/share/man/man5/profile.5.gz OLD_FILES+=usr/share/man/man8/kamdin.local.8.gz diff --git a/krb5/usr.sbin/kdb5_util/Makefile b/krb5/usr.sbin/kdb5_util/Makefile index 1fab7ee58556..ef821d6867f5 100644 --- a/krb5/usr.sbin/kdb5_util/Makefile +++ b/krb5/usr.sbin/kdb5_util/Makefile @@ -27,11 +27,12 @@ SRCS= dump.c \ tdumputil.c \ ${GEN} -INCS= ${GENI} +DPSRCS= ${GENI} MAN= kdb5_util.8 -CFLAGS+=-I${KRB5_DIR}/include \ +CFLAGS+=-I. \ + -I${KRB5_DIR}/include \ -I${KRB5_DIR}/lib \ -I${KRB5_SRCTOP}/include From nobody Fri Jul 25 17:28:44 2025 X-Original-To: dev-commits-src-all@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 4bpZbd0Hrhz6272s; Fri, 25 Jul 2025 17:28:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZbc41d2z3FBJ; Fri, 25 Jul 2025 17:28:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753464524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hQAWkj+n5mSadteZxgUIt5KOK+gCCLDyjsSycBCMQ2w=; b=mzKIQFE56bG734DQbmhtiQmIfSQ7CKzOVdCVeFskBcY+WdZkxm206koExepD91GZIpTSW7 QaJ3UVroYHGYekn3bmv7goZbMNWGghrmA4z/2l9i1BcBUTqrVSvz8Dq1P7a18xfqViO8iE brBlYjwRSMIVztwKK3rD9lKVNLDrjlND1beQjR5iTS4BYOeGEiyLVHREFYid8Ls0YS0S0/ 0z24KU11ruG9R7OmJZI1c06w9imnJkSoqNd10WEvCPTo8VSS7h8U1s0221RXJebGbLlF3q QbxLj+fOvWpdPLRJSMETgNP3EBHpcSx1T/ns4nIerOvJT+jGIZkygGpYPCrjlQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753464524; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hQAWkj+n5mSadteZxgUIt5KOK+gCCLDyjsSycBCMQ2w=; b=Xt2yLh/q2iucWVUuVy+zfC8nzy+1Ma1Q3uhydCcbWuI53vtPGBtgtpDZtPBg/C7coJKIr/ 5LOiSWZPJx9ezStSlwSclGWz+zk3xHUsoBrkymJWJ7uYSVJ5iewm2nNbPzwyjaGETAhBFC Z1zzecHAZ/kHHV3a/K4s5aPYJWKXNDeILPeYrm6JTTH38jjT1dVyjaH7FstoMNB5yWCE1B IGHgq0PScsia7giIdHEF2YAYBkQFQm1WwjrczBfEoaUEvLGVn3UJKbm4fbsxD9DiVs32YL 3y644UUwF+bUq7vEfHonyD/N13YTn1rJ3dDpuSc9b1+e5iSO2+sndmvs0X+f7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753464524; a=rsa-sha256; cv=none; b=nn8wQVAWNJBaJcayeOtMCZIayPPApgWFS0JZWxoLfnW5fGyM9OBc7D9AkZvsmHc3NvTV1j 1fFy+BBaCTgJ/mVY9Ln9El05LulZfyfkR7H9z17yJwbwVRg76ie+PgmJTsYQOuX7scC1tb rQVWpOKCgVvmjT7M1RcXG6H/ebm1Bh4bGzPFIKJlS/Pcj00NpW4Zdl0HfIcn8+3QrbA5sM tbO57VGzvmyznhe9RDeBqd1senf4N64TbmKjK887RzX6V7J2BS9Y3wRDXp0fiIe0i3u+A5 KRksfEOX2GJvrrwZ6Mh0sM7AXzzEHQchWiE4R4yqA+Z89fgEdWrQFIm+Q1EHXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZbc3Zymztj4; Fri, 25 Jul 2025 17:28:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHSiRT093841; Fri, 25 Jul 2025 17:28:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHSifZ093838; Fri, 25 Jul 2025 17:28:44 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:28:44 GMT Message-Id: <202507251728.56PHSifZ093838@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 6b28571cb6ba - main - krb5: Move some manpages to other packages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6b28571cb6ba7efc6b710ac0e3987e67976f7355 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=6b28571cb6ba7efc6b710ac0e3987e67976f7355 commit 6b28571cb6ba7efc6b710ac0e3987e67976f7355 Author: Lexi Winter AuthorDate: 2025-07-25 14:05:14 +0000 Commit: Lexi Winter CommitDate: 2025-07-25 17:31:26 +0000 krb5: Move some manpages to other packages Move KDC manpages to kerberos-kdc-man. Move the generic Kerberos manpages (e.g., kerberos.7) to kerberos-man instead of kerberos-lib-man. Although they technically describe behaviour implemented in the libraries, conceptually, they are more associated with Kerberos in general. While here, remove some redundant SUFFIXES. Reviewed by: manu, cy Differential Revision: https://reviews.freebsd.org/D51515 --- krb5/lib/krb5/Makefile | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/krb5/lib/krb5/Makefile b/krb5/lib/krb5/Makefile index 163005b6abf3..dc6c53ec6ce2 100644 --- a/krb5/lib/krb5/Makefile +++ b/krb5/lib/krb5/Makefile @@ -50,19 +50,24 @@ CFLAGS+=${DEFINES} \ -I${KRB5_SRCTOP}/include \ -I${KRB5_DIR} -MAN= k5identity.5 \ - k5login.5 \ - kadm5.acl.5 \ - kdc.conf.5 \ - krb5.conf.5 \ - kerberos.7 +MANGROUPS= KRB5 +KRB5= k5identity.5 \ + k5login.5 \ + krb5.conf.5 \ + kerberos.7 +KRB5PACKAGE= kerberos +KRB5LINKS=k5identity.5 .k5identity.5 +KRB5LINKS+=k5login.5 .k5login.5 + +MANGROUPS+= KDC +KDC= kadm5.acl.5 \ + kdc.conf.5 +KDCPACKAGE= kerberos-kdc -MLINKS= k5identity.5 .k5identity.5 -MLINKS+=k5login.5 .k5login.5 .include -.SUFFIXES: .h .c .et .man .5 .7 +.SUFFIXES: .et .man .man.5: @cp ${.ALLSRC} ${.TARGET} From nobody Fri Jul 25 17:28:47 2025 X-Original-To: dev-commits-src-all@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 4bpZbj1LHKz6276R; Fri, 25 Jul 2025 17:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZbh01yJz3FMq; Fri, 25 Jul 2025 17:28:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753464528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mx7opgGp6IQOjErdb9ScOJCyoDUqgVlASBL9svauXaM=; b=cMyqsV2OIiemfjwRa+j+//hIIOEEi/XUivcPrMbcd+BQpHJ4PWQN+ugBZVc79SljKePz+g qR0SB2VJUaWyYEtydSDlurhVdqtsA0ODWdQnDsLrRO8Q5NZs3+Y8Cu7RWAxJi5Tj6TC7n2 1CaBBhQUo9ptEsI3fCN9G8wInKy1QqMDda6rhLtrpLqZhPEq7AbNRPt0Um05QQzTNNFj3n /YW31zklYXOr1tuU2F164Y22ZME+ODaUgQeJhoczjTIeagn9mornux6CKXx+WOBRkVsLkx oS0zp6FZbKhz9kgtUNomMrU2zVu6lQgNxay/yHwSfKzVEQwNsl7lii4D2ZarqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753464528; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Mx7opgGp6IQOjErdb9ScOJCyoDUqgVlASBL9svauXaM=; b=Z79govPND6ovkAzLSZ30GnAuh9tq//lHJvuSUWwveL28rxVaqnonN+kGp/raF6pBS9FjJj QcipKTSSeiMVKx1jSqQB+3WEbDT1XEn7u80ovAtoxZfimZs76CCT9rtc/ZD6CnetA705mi ZKluUyO0dzXaC55oF3mRO4wDwMwFb2rde+Bdw2DbBy8aDDOMosDdfIsupJIpizVoEZ2HGZ j/S5sQ38KAaSrQmgEeJiMAJW5rsy8FiS7GTTd3TaOB540ecHhgsxpWjD/4DRxN7/SLnMoo uLJa77ekn5Yryori9kJa2d4ZmbK8+fJEu7jMcbhicUi6V57Eww4kNnmeVHQfmQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753464528; a=rsa-sha256; cv=none; b=FlqvXRO65ejAiNUPYILXiFKgsTgKv9f4zwKW3k3Gg6r5+UvwJ62f68nx3LfDEHjUQPRUDs Onb57VX4J2bH9lFnNDb24hPMV/32vcSyatyZfSwEzGY4ysS9tfKwAJY9LQWcqF7Ow/5/0N d6ms3kqmespQSNVe+5PF6chQjQWFFoLsLaEXOeHB0tNIQtw/bKwMhuqktjf0QitBhhFCqs HYXjSKYeyseg9cixFW6+A1dkohe/UAsLaMqAOmW+btqhLTHDEYNTRDvGXmLg275lHk5frm 2UqPTOE5Ab+AB4YPa/uQLviizFg3m7Wrn8AC65KVS2jiPyC2Jm+OA7KhYJASvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZbg5vxQztmq; Fri, 25 Jul 2025 17:28:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHSlLN093941; Fri, 25 Jul 2025 17:28:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHSlbW093938; Fri, 25 Jul 2025 17:28:47 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:28:47 GMT Message-Id: <202507251728.56PHSlbW093938@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: fb1ccc04adfe - main - krb5: don't install libdb manual pages List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: fb1ccc04adfe6357b84b577704cd641e192d69d8 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=fb1ccc04adfe6357b84b577704cd641e192d69d8 commit fb1ccc04adfe6357b84b577704cd641e192d69d8 Author: Lexi Winter AuthorDate: 2025-07-25 14:07:14 +0000 Commit: Lexi Winter CommitDate: 2025-07-25 17:31:27 +0000 krb5: don't install libdb manual pages This version of libdb is private to Kerberos and not intended for external use, so avoid installing manual pages that may conflict with another version of libdb. Reviewed by: des, cy Differential Revision: https://reviews.freebsd.org/D51418 --- ObsoleteFiles.inc | 8 ++++++++ krb5/plugins/kdb/db2/Makefile | 14 -------------- 2 files changed, 8 insertions(+), 14 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 76c7b2eda4e8..808e7be828c5 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -63,6 +63,14 @@ OLD_FILES+=usr/include/dyn.h OLD_FILES+=usr/include/dynP.h OLD_FILES+=usr/include/gssrpcint.h OLD_FILES+=usr/include/import_err.h +OLD_FILES+=usr/share/man/man3/db_btree.3.gz +OLD_FILES+=usr/share/man/man3/db_hash.3.gz +OLD_FILES+=usr/share/man/man3/db_lock.3.gz +OLD_FILES+=usr/share/man/man3/db_log.3.gz +OLD_FILES+=usr/share/man/man3/db_mpool.3.gz +OLD_FILES+=usr/share/man/man3/db_open.3.gz +OLD_FILES+=usr/share/man/man3/db_recno.3.gz +OLD_FILES+=usr/share/man/man3/db_txn.3.gz OLD_FILES+=usr/share/man/man5/profile.5.gz OLD_FILES+=usr/share/man/man8/kamdin.local.8.gz diff --git a/krb5/plugins/kdb/db2/Makefile b/krb5/plugins/kdb/db2/Makefile index 1d42951c3c97..3230a77171f4 100644 --- a/krb5/plugins/kdb/db2/Makefile +++ b/krb5/plugins/kdb/db2/Makefile @@ -29,15 +29,6 @@ SRCS= \ .include "${KRB5_SRCTOP}/plugins/kdb/db2/libdb2/Makefile.inc" -MAN= db_btree.3 \ - db_hash.3 \ - db_lock.3 \ - db_log.3 \ - db_mpool.3 \ - db_open.3 \ - db_recno.3 \ - db_txn.3 - CFLAGS+=-I${KRB5_DIR}/plugins/kdb/db2 \ -I${KRB5_DIR}/plugins/kdb/db2/libdb2 \ -I${KRB5_DIR}/plugins/kdb/db2/libdb2/include \ @@ -55,11 +46,6 @@ CFLAGS+=-I${KRB5_DIR}/plugins/kdb/db2 \ .include -.SUFFIXES: .h .c .man .3 - -.man.3: - @cp ${.ALLSRC} ${.TARGET} - .PATH: ${KRB5_DIR}/plugins/kdb/db2 \ ${KRB5_DIR}/plugins/kdb/db2/libdb2 \ ${KRB5_DIR}/plugins/kdb/db2/libdb2/man From nobody Fri Jul 25 17:28:48 2025 X-Original-To: dev-commits-src-all@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 4bpZbj73NDz62793; Fri, 25 Jul 2025 17:28: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZbj0YTHz3FL9; Fri, 25 Jul 2025 17:28:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753464529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0aq+F7ohphqAOJohMQrCoZFWlz7xI3saXBraZ9DIYCE=; b=GmM5NmyDhoeTLX/Wtue/RiS84vKea5+O3TNIrUakrANdNS45KLLwtSgsW46XFiSWIjqg4O UMxDQDhwuAlVlRnF4AbO1vMw9R/AOwdcHaBcN9frF+MtlRtKCWLofqmBLmOn0xjcHICA8m 63abxL1q2YKqpQPlxkw94zBvZvPYb+y9Jl061opOg0Mkli82JdcwI+uOK70OiJGuxYKDDa BRaWxOqTuBQkFKcxpGQ5xJzc/Jp01IFUaC+q0pmI9F7tyg8QFBWEWE6ogXFNyjBO64Uxbh aftKidS4NcV8xTrAJcRfwReY7q13DNy1k/prqmpvznawkcir5BIDC5/vmQMvkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753464529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0aq+F7ohphqAOJohMQrCoZFWlz7xI3saXBraZ9DIYCE=; b=RxHy5C2bbdlGIipg9QoI5lIhBLjgpD5kUM5QxIfSvh9S3vyCtvUx71FihKbN8oKfXNw5ZU mDRtZ4DocPVSPfy8L/QWvkmTjjZUsvZO1P89BjQMua3MyuDDYxhFlDaWkUdu5IC1TMui7U b871Nu6guQ/fr0eRGTnzpbfbzMq/IGrurRJkqF7BK7Esnjj/58djy/CuxphTFpYWfD5seq C9yacUXtpFg3ji6xtD5Jk7ExTdHvByn8vxI/H7k/jQ0cCMYQ0EP7KY8XLZJZZvdbELXe/Z iP2FIRR0xoH0JHM/p8ujalG0lhKYPPPIDEQfxhQehYDpLrMwKkVkjfQfW0f3Jg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753464529; a=rsa-sha256; cv=none; b=Bpq+ueJ1zZ9hu3DMr8KQifqy5TZzrQwb1uiLAejZ7KNx0Oi1JxUTCoRisIE6H6KHZEGFAR XIWpOA3yKswk3juUrPn5jgbg7e1gulkvxbq22baBITRLwta/JYGuORvaWUa1NzTzeqGio2 V7uqrDbWYpO7sMR7grA0sic9Q5TmUUle3yAxXvTlDpriCHPkkAiPKj+swZT3JY27DLne8D h3HW5zY89RXMVeOoARZkhKoCzlrW2O6lV+F+Nrs4X6OihlEW/k2+EtjA3Msn9YVWL618yk ReEndr0HdnZPCBH7rjkvjobbTGLsizoQYueTMVt7857PSTmwCFx9uVbHMpzxiw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZbj01lRzt2s; Fri, 25 Jul 2025 17:28:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHSmTG093974; Fri, 25 Jul 2025 17:28:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHSm8L093971; Fri, 25 Jul 2025 17:28:48 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:28:48 GMT Message-Id: <202507251728.56PHSm8L093971@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 76446b5aa350 - main - gssd: move to a new package List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 76446b5aa350873c3c426de734fdd9a0052f6270 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=76446b5aa350873c3c426de734fdd9a0052f6270 commit 76446b5aa350873c3c426de734fdd9a0052f6270 Author: Lexi Winter AuthorDate: 2025-07-25 14:08:03 +0000 Commit: Lexi Winter CommitDate: 2025-07-25 17:31:27 +0000 gssd: move to a new package It's reasonable to want to install gssd without the Kerberos utilities (e.g., if using security/krb5 from ports), so move gssd to its own package to allow this. Reviewed by: manu, cy Differential Revision: https://reviews.freebsd.org/D51486 --- libexec/rc/rc.d/Makefile | 2 +- release/packages/ucl/gssd-all.ucl | 11 +++++++++++ usr.sbin/gssd/Makefile | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/libexec/rc/rc.d/Makefile b/libexec/rc/rc.d/Makefile index 8199779e5772..27d8a7526691 100644 --- a/libexec/rc/rc.d/Makefile +++ b/libexec/rc/rc.d/Makefile @@ -223,7 +223,7 @@ FTPDPACKAGE= ftpd .if ${MK_GSSAPI} != "no" CONFGROUPS+= GSSD GSSD= gssd -GSSDPACKAGE= kerberos +GSSDPACKAGE= gssd .endif .if ${MK_HAST} != "no" diff --git a/release/packages/ucl/gssd-all.ucl b/release/packages/ucl/gssd-all.ucl new file mode 100644 index 000000000000..5a01b0559854 --- /dev/null +++ b/release/packages/ucl/gssd-all.ucl @@ -0,0 +1,11 @@ +comment = "gssd(8) daemon for kernel GSS-API" +desc = < -PACKAGE= kerberos +PACKAGE= gssd PROG= gssd MAN= gssd.8 From nobody Fri Jul 25 17:31:10 2025 X-Original-To: dev-commits-src-all@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 4bpZfR16D3z627X8; Fri, 25 Jul 2025 17:31:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZfQ6N1Jz3KH3; Fri, 25 Jul 2025 17:31:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753464670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i8L7Jsa20qmuK4DhU5MODur7g1HWhgFLgJvH9mreaiA=; b=Xx3bLJaPtF5pL1uLguYtN/CetbC4aj+YxGq02SEQmNnOgcoX6YJv9C7MWm9+Jm39KYyrpl nrtzb5+kJM3kdSrMiIcANsnMbnB+ahTeu2m8H1RyIzX3WTe9fbzd1dY+Zs3uyBlEqzyoY+ 7b5enInqmkTOchmcLs+AHmA6p5wyXNBFV05bbcl3q8bePMpRxxx2EixgfLpOcv0ApKBceE uZZzfHsMw6Lwe4WlI4UKt6OWDWMXbutEn8aJKMlVLfZlSmeot/AGYUaJIg9+InTBCj1C4j OpDcYL/8mnFlED2dGOZ/TUZQDqNcUM865O8xXQke8F+FjogSNlF5Gc8upHcDsA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753464670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i8L7Jsa20qmuK4DhU5MODur7g1HWhgFLgJvH9mreaiA=; b=NaMe3i2PoGJAzhmx2GbnfcVko6nbAeDb+XQHi7l/fKFdb9F6SQBWA5F26+/9zemo6XJ+lP /qDlDHyNBL7COv9GGSh2CVch+sROt18uGNaacDyBAgxyO1pnbh8Nh0cgw5Y2E3FARCdRIM 4D9MlXjfcCBTHhcwwRDhiIp5yiFEZkOuzGVQLnqAmmYAcLNOWuUzR60d6IMz8qeeE83xmX R4D0znElLa3Sl1glHBN2G4onhYwCrnZYdb8Z6bCUMpQ6DMokC8jsAbGpu/vcbd080z1oB6 nVlNjkFahMZH0g1zhkSHsD92GXIpncAsa/iGjN00vwg7veXOi3FwLuOJ2sOCOQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753464670; a=rsa-sha256; cv=none; b=jdflCANk6CKJsNJpJuuZR9mDJ6qjh3+yywjgiBpmrAHHVzrTbm8KZ78+ld+1cjaVYJCbff d73udnVbP3yvEwNKZE107goJBWGCuC2LtvAMuy5gBuDKXJRYBg2mXYpgOZUbIvo1CJcdVL saX4k4VGffi7mvrpjtfkEEiMWtZpdV0kqE2yr9EndSZ13yj4gCPii/Ls2L8o5vFm0Zo+gf R00Kb853/MxYaYAPw3eKzh3NIROx10KhaCufbUEeWLCDIkw7OyoCHVosoY776k6Bwu0XAB OCwkxPUAM70jE79v5Rb7GIFq2XMv1MM/HvBAJJG7bVDEduwIxkE1oc1daAx+TQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZfQ5ztFztwR; Fri, 25 Jul 2025 17:31:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHVADN007109; Fri, 25 Jul 2025 17:31:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHVAfb007106; Fri, 25 Jul 2025 17:31:10 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:31:10 GMT Message-Id: <202507251731.56PHVAfb007106@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: c6da58bc17fa - main - UPDATING: note the new gssd package List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c6da58bc17fa2cd9d39ad53a5b15b7c74d445df8 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=c6da58bc17fa2cd9d39ad53a5b15b7c74d445df8 commit c6da58bc17fa2cd9d39ad53a5b15b7c74d445df8 Author: Lexi Winter AuthorDate: 2025-07-25 17:34:14 +0000 Commit: Lexi Winter CommitDate: 2025-07-25 17:34:14 +0000 UPDATING: note the new gssd package --- UPDATING | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/UPDATING b/UPDATING index 2be01f2c98c3..a2843aa95127 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,10 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20250725: + gssd(8) has been moved to a new package, FreeBSD-gssd. If you use + pkgbase and you need gssd, you should install this package. + 20250724: The Kerberos packages which are built when WITH_MITKRB5 is enabled have been renamed from FreeBSD-krb5* to FreeBSD-kerberos*. This From nobody Fri Jul 25 17:39:14 2025 X-Original-To: dev-commits-src-all@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 4bpZqk33dNz627cF; Fri, 25 Jul 2025 17: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZqk2Fh5z3S1R; Fri, 25 Jul 2025 17:39:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753465154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lbnY2PZBQ/g7wij15XLksgfvT5W/oEMe6YHLHZWunfc=; b=nRr+omM7Lci+v/lqO2TIzF4F4qL5w37eK1HGO6mL9IqOp4N8nu6OzeUzBCZPZiwJMU5JtF wzg2jRKQJXR/tM3qrtYhx39WfKGhx600pBq+ykPrh4MG5u3yHbbB+/3/yzyGBSuCZYAMPC +Fn5rEfVOfcNL0fYGop54ukawwGVXI1/a1Nh4SbUKCMfMscwr6nSFGxl3bMAoFUu6DkDSE 1WzqmjDw15yQs/4ZuPZCk64HYAEEG2ZxYNNhbfDjUOrtbdi2/AYsyiBU7j+Elo/EroccEw uyokvF1PsjHGOnA6xvHEFPr1ZD2uAhiVTI2vaawRjBHuxVyinNc/w6Dnkqmf2A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753465154; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lbnY2PZBQ/g7wij15XLksgfvT5W/oEMe6YHLHZWunfc=; b=Ub31MGLp9twlYyRvCEUIXLXQOHPoMPq1YfIJIJMl+bAeQJwAM87MVxjfjwck716kaUzB/O pDjXNS9JMtol6FR2PqanIWwPY2mykUqwEyVHFV2BbpiRLz9rnqDtZu+C89RCCMzNFnETJN qC8Kvw26viZHKfyJTaNPdJorqUhmoI8gEGYoFcgFDDWyz8Mz3pHH82f6KVGyba6TMqkuff PpI2RZ43VROLstHtcEze7gPRLFFoalYbSYEWxutBEv2aXBl4zdG+qXs/jjEezgS1pLscZf HFLKTZeh1B9s2NPODoNnCBLY4aFCY/BNRms/pCMonr5CYzcybqoApvNU9pi4/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753465154; a=rsa-sha256; cv=none; b=PpqWf/MlRtILhTBMoA86oyzy1NXK9h89QP65mtRwOrwjD95QtmHdAR6BVoIuIv+9NPVbt7 WLn9lAdcDqjcEo8pjR/ewAVKgpV0GckET4nEpKKgXn0NHOGCE5tQYs8MDmp/mIlbH5LJkl dsVTfi7aWoBkdJZDCs631BoG7AhCuV8NlhlNIfQAX1IeWLcBHQXDwUb2rzxPiD3zv5zJbP Oly6I0EGcuDF+DLEmNanjZVzym1vPrPSivUyJmrhnutdhcK10r1SflkzmPzlZ1R4SXBc4m 0ei6zpT7Y6THJVubfxvgtTDNNSfUWteotf7vOEnX6o2O5qRwCOZ8XJuOxjeKOw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZqk1mLXzt7m; Fri, 25 Jul 2025 17:39:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHdENm012660; Fri, 25 Jul 2025 17:39:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHdEuN012657; Fri, 25 Jul 2025 17:39:14 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:39:14 GMT Message-Id: <202507251739.56PHdEuN012657@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: e1751ef89611 - main - udp: Fix a inpcb refcount leak in the tunnel receive path List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: e1751ef896119d7372035b1b60f18a6342bd0e3b Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e1751ef896119d7372035b1b60f18a6342bd0e3b commit e1751ef896119d7372035b1b60f18a6342bd0e3b Author: Mark Johnston AuthorDate: 2025-07-25 13:10:24 +0000 Commit: Mark Johnston CommitDate: 2025-07-25 17:39:00 +0000 udp: Fix a inpcb refcount leak in the tunnel receive path When the socket has a tunneling function attached, udp_append() drops the inpcb lock before calling it. To keep the inpcb alive, we bump the refcount. After commit 742e7210d00b we only dropped the reference if the tunnel consumed the packet, but it needs to be dropped in either case. if_ovpn is the only driver that can trigger this bug. Fixes: 742e7210d00b ("udp: allow udp_tun_func_t() to indicate it did not eat the packet") Reviewed by: kp MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D51505 --- sys/netinet/udp_usrreq.c | 11 ++++++++--- sys/netinet6/udp6_usrreq.c | 11 ++++++++--- 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/sys/netinet/udp_usrreq.c b/sys/netinet/udp_usrreq.c index dafbaf6dc672..42cfb919e263 100644 --- a/sys/netinet/udp_usrreq.c +++ b/sys/netinet/udp_usrreq.c @@ -243,7 +243,6 @@ udp_append(struct inpcb *inp, struct ip *ip, struct mbuf *n, int off, struct sockaddr_in6 udp_in6; #endif struct udpcb *up; - bool filtered; INP_LOCK_ASSERT(inp); @@ -252,13 +251,19 @@ udp_append(struct inpcb *inp, struct ip *ip, struct mbuf *n, int off, */ up = intoudpcb(inp); if (up->u_tun_func != NULL) { + bool filtered; + in_pcbref(inp); INP_RUNLOCK(inp); filtered = (*up->u_tun_func)(n, off, inp, (struct sockaddr *)&udp_in[0], up->u_tun_ctx); INP_RLOCK(inp); - if (filtered) - return (in_pcbrele_rlocked(inp)); + if (in_pcbrele_rlocked(inp)) + return (1); + if (filtered) { + INP_RUNLOCK(inp); + return (1); + } } off += sizeof(struct udphdr); diff --git a/sys/netinet6/udp6_usrreq.c b/sys/netinet6/udp6_usrreq.c index 304effa26e01..b3ed16fda713 100644 --- a/sys/netinet6/udp6_usrreq.c +++ b/sys/netinet6/udp6_usrreq.c @@ -142,7 +142,6 @@ udp6_append(struct inpcb *inp, struct mbuf *n, int off, struct socket *so; struct mbuf *opts = NULL, *tmp_opts; struct udpcb *up; - bool filtered; INP_LOCK_ASSERT(inp); @@ -151,13 +150,19 @@ udp6_append(struct inpcb *inp, struct mbuf *n, int off, */ up = intoudpcb(inp); if (up->u_tun_func != NULL) { + bool filtered; + in_pcbref(inp); INP_RUNLOCK(inp); filtered = (*up->u_tun_func)(n, off, inp, (struct sockaddr *)&fromsa[0], up->u_tun_ctx); INP_RLOCK(inp); - if (filtered) - return (in_pcbrele_rlocked(inp)); + if (in_pcbrele_rlocked(inp)) + return (1); + if (filtered) { + INP_RUNLOCK(inp); + return (1); + } } off += sizeof(struct udphdr); From nobody Fri Jul 25 17:39:15 2025 X-Original-To: dev-commits-src-all@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 4bpZql4bNpz627nV; Fri, 25 Jul 2025 17: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZql2wSNz3RnR; Fri, 25 Jul 2025 17: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=1753465155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CzWoE4t5juubG8QZkqckxL1Gu07AnAB0zYfcCVSIZKU=; b=UkRnFOiruAgr649WaQrMOmv8zNxIRPe/KmEGSG9URKxiWmmJphIeEWxmFW4mAvmVRRfbfV ZJHkavJLhaHkHKR8rfuXUnj259nPlO23drabeI6/GR1oN2wRTX4gWeNsUsrafxUB5Rei7U qbDlXFqRY1uwkN37RT/vWrrrQ178RK51dRRPUEMK6lPxzGy40dCOuMLirCeqCa/SCcXItK u4CG1SkBGIgTcQkuhuDTv2kTkEf1TBeh5xLFcxBYvY8Raxh/8e/brpQxtgPeHqMpRUBVyn wRTnP1kMu/7jn1JDTIGe/xXMiiCvpXdFTqkyMECL49kRI1zxRomZXnV9zHeZXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753465155; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CzWoE4t5juubG8QZkqckxL1Gu07AnAB0zYfcCVSIZKU=; b=Ud187Ha4+U6dHE2S4CJh6x/37d4yZlXwCGUpsvht3ZrztVCyFLgKjiDI3hmWkFKgHvnR28 d1HAC97g+OS/hkBE0c4wA0KxvOf2EH61PC7BRTlx6NLmv80plU66paHyr+3Cb1QD8+zQzE rpYritA5DIel/uopl7eexH6LSw2GzqTOUVeRlz1XDhDisd6utNKurbMU9191vj8Dy/VHKI NIPRmXaMssUX0jErz0Ph2xO/uismEVAkR9BQ9nBLKEj7Yw7sfnhiWoAt2YyvIB0iNg1jUR YisavONHlRSi0fr5F9crOAD9QjVUqGDm0St9xuIwNDSIHu/Kn/YYRIlEvk6T6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753465155; a=rsa-sha256; cv=none; b=p621Iuhejdy9PWjCaBfAwYA5yiR9Fj101vhpfXN6rd2qWWsG0AHFHso7We2xOQZmKve8ls EsyqB/VJdKL14NYDo3yosnoMJagWFP4y5DPcP3ln/Kze2KoHXujFv+vDtcPD8+41yk3IA9 vLlHqXbu8Z1UDJximrincKKXywJckVo9/6fXvPBwLBekLQBv4kVqcquZpMULSK7gRJNxZn XpAewKDecHYfu6Xijbva03NxJqbUXIe2G5u6hdfcdh39duV/Lkwc1iZTa3rl0cXkQsVbwc xE+D051RNO6fndnsuil4SqG14jCjQaaHP2S6bqzk+tLRKPwIXyUVSemm51EmWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZql2K3Tztww; Fri, 25 Jul 2025 17:39:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHdFh7012692; Fri, 25 Jul 2025 17:39:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHdFeL012689; Fri, 25 Jul 2025 17:39:15 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:39:15 GMT Message-Id: <202507251739.56PHdFeL012689@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 3d3add7d43ad - main - if_ovpn: Remove an unused field from struct ovpn_kkey_dir List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 3d3add7d43adb891ec054ec3f1c3d6d20b78dca8 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=3d3add7d43adb891ec054ec3f1c3d6d20b78dca8 commit 3d3add7d43adb891ec054ec3f1c3d6d20b78dca8 Author: Mark Johnston AuthorDate: 2025-07-25 13:12:45 +0000 Commit: Mark Johnston CommitDate: 2025-07-25 17:39:00 +0000 if_ovpn: Remove an unused field from struct ovpn_kkey_dir No functional change intended. Reviewed by: kp MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D51493 --- sys/net/if_ovpn.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index 6755997fd1f0..5081cc906433 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -79,7 +79,6 @@ #include "if_ovpn.h" struct ovpn_kkey_dir { - int refcount; uint8_t key[32]; uint8_t keylen; uint8_t nonce[8]; From nobody Fri Jul 25 17:39:16 2025 X-Original-To: dev-commits-src-all@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 4bpZqm5qFkz627nW; Fri, 25 Jul 2025 17: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZqm3PHPz3S65; Fri, 25 Jul 2025 17: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=1753465156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3tElwIxPygsPKtfjIcfLXr1M6NKcWgfxC6lddTnRfH0=; b=CWVMtDs+GjXyMsoiSdT6qMeL7Dfr6UEOxxFJM8QrTj+lX0jUOJe+AYdUdIq3CLyDHpG8gT ftOqEPUnq3QWdGM//a8uoVSVDUJgjgXisVhUaR0gEClfcM5EsHIsBDeAu7QQ6vhSaIs1rs FjZAp9pHsyYADFmcMVS51X4Xu9yC5sSOA2wY1ugRJo9BMerULTKgg5+1vGSTY/bfaDe7/+ FJhZ2ij/+wnZKTB0mo/uI5FppmVGICQko8wgYjU69EhdVtVR9v9wjYJ0X2Bs4v5nqztswd PzynBEb/VWWH9Yy2vCvf4DMtuUxmuSXOTND3119Gg8QKiMnr5vVgmyylSkhjAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753465156; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3tElwIxPygsPKtfjIcfLXr1M6NKcWgfxC6lddTnRfH0=; b=xpgikHcK+O61sTwrt3xYr+f7FIsBZXwlIsikH/svEQmDyBZUgEeQztz54Sc34QMTAp8Phf O2V23cFDPEC1HYk0GiZVqCg+MU/YqkjMcNSSfH6xNCbZigD3D6D5e9lAef85HlJgnGcyaz q08HUQDaivG5p5BGMxFiyie/dNZhIxOf8xSdX9diy/FnrjZbpAAci+iHCuEQfx+TEg5uA5 Pn0pPHprga29axUmmPPX0SYRuvSnQBBhz6JLrWIkwCozI+FWm8a1vG8yKcVv7nxG85pj5H FWQXYacjUYOb5sXP7w13X61DEQwh1THr9CJItofOdVfQxAJReov2PX3EyY8MNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753465156; a=rsa-sha256; cv=none; b=i0lYbrodtTUT0ne6DdB8XVSDX4lswrqmKoiNytluXDjsGZyNDXQ4cDFj4tBNPv0DILFp0d ZNRSfJclXzNi/gh2RhxBj51Fni5ms1iv1rQxXA65b/AMXsuqENMQVJYNmW7z90OgXKfg+s goA4wj9Iq0M5CVc4067FTN5JqLOzQF3JChPTb3bZ+e1yhPRB9DOItCkvvAoWonM15AmkQ7 i3v20D8wviQbuTIcxYi6SHzQj079tUh56qR9IWbHGPiU7bWLOiNc/HaJjnvEZEo0FpJnYI OuTIC8H8jqboHVwdikqVLmieAnE+Y3krA4AobdjFl+Sttpv27tE4gmLGV62otA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZqm2zgwzt7n; Fri, 25 Jul 2025 17:39:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHdGgJ012726; Fri, 25 Jul 2025 17:39:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHdGnr012723; Fri, 25 Jul 2025 17:39:16 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:39:16 GMT Message-Id: <202507251739.56PHdGnr012723@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 2ff1587e3803 - main - if_ovpn: Sprinkle const over some helper functions List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 2ff1587e3803e76a9726e1734181a5170079ddbe Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2ff1587e3803e76a9726e1734181a5170079ddbe commit 2ff1587e3803e76a9726e1734181a5170079ddbe Author: Mark Johnston AuthorDate: 2025-07-25 13:13:13 +0000 Commit: Mark Johnston CommitDate: 2025-07-25 17:39:01 +0000 if_ovpn: Sprinkle const over some helper functions No functional change intended. Reviewed by: kp MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D51494 --- sys/net/if_ovpn.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index 5081cc906433..4c7cbed06bf0 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -204,7 +204,8 @@ static int ovpn_encap(struct ovpn_softc *, uint32_t, struct mbuf *); static int ovpn_get_af(struct mbuf *); static void ovpn_free_kkey_dir(struct ovpn_kkey_dir *); static bool ovpn_check_replay(struct ovpn_kkey_dir *, uint32_t); -static int ovpn_peer_compare(struct ovpn_kpeer *, struct ovpn_kpeer *); +static int ovpn_peer_compare(const struct ovpn_kpeer *, + const struct ovpn_kpeer *); static RB_PROTOTYPE(ovpn_kpeers, ovpn_kpeer, tree, ovpn_peer_compare); static RB_GENERATE(ovpn_kpeers, ovpn_kpeer, tree, ovpn_peer_compare); @@ -277,7 +278,7 @@ SYSCTL_INT(_net_link_openvpn, OID_AUTO, netisr_queue, "Use netisr_queue() rather than netisr_dispatch()."); static int -ovpn_peer_compare(struct ovpn_kpeer *a, struct ovpn_kpeer *b) +ovpn_peer_compare(const struct ovpn_kpeer *a, const struct ovpn_kpeer *b) { return (a->peerid - b->peerid); } @@ -303,15 +304,15 @@ ovpn_find_only_peer(struct ovpn_softc *sc) } static uint16_t -ovpn_get_port(struct sockaddr_storage *s) +ovpn_get_port(const struct sockaddr_storage *s) { switch (s->ss_family) { case AF_INET: { - struct sockaddr_in *in = (struct sockaddr_in *)s; + const struct sockaddr_in *in = (const struct sockaddr_in *)s; return (in->sin_port); } case AF_INET6: { - struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)s; + const struct sockaddr_in6 *in6 = (const struct sockaddr_in6 *)s; return (in6->sin6_port); } default: From nobody Fri Jul 25 17:39:17 2025 X-Original-To: dev-commits-src-all@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 4bpZqp3DK2z627nf; Fri, 25 Jul 2025 17:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZqn4RRvz3Rnc; Fri, 25 Jul 2025 17:39:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753465157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sypyBTb97SzJySCGEnYOyldNxHMPPqIT77CFIl5B8WQ=; b=r2m6V3ufdZRkvElv8u34yNmu62WRCp3112xLUOsPk93ITWB7KgxMMSsw/s+gY10D7INRMC c7JUcymGkdWcho1N3Gi+vQoVrUZr0csIU3HodUjSwr42jVqXSUU6p9syyKsRgk7OuI3rTW i9rbAAIEwiAA0XmZP/cWD0jN1nXZLFlrRGnKZk6XWxRhe6I43mg9M+sqM2aY6dhzicy3VV w4+KBb0wcpYnAe9TBa8QZ0dE/85JyOFH8Bd7zymk/qUig7Uk03ep0LfDFNyQqUCQf9Lw3U YSlFStcfH9TAZtqDn/r82RXKCMP0tQmM2Pz2NK1cY6jRZMfi7Eu1lLaAXuR1LQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753465157; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sypyBTb97SzJySCGEnYOyldNxHMPPqIT77CFIl5B8WQ=; b=i1QqEoSh1f4p4M+kv+6P7r6XdUHKZqJZBzDGtGD/EWDUImiBjQb+YInEyaEa/vUPDei8Z0 NKHgxxjmxsbuvT33tCfFGZIyJqWPR7ulSjEwWBJvMDJ9p+Mgap1Y3GA+AWFRFAZnxsp9Yz TLHvFwVBLXZG/78Ai/suOgPqPAUQ9f9oFdLMa8kf8Eu74v6fXkZOoDVOi99ScS3HdDEbY3 FIcoltBVJtSNqQMYk0DQOEUkQno9wlGxHXbUdUDAO+Bzvo9Dnw+vsoGHxlgI2rUDVPnjW7 Gqfu56wj3tzqVzs3KDcyF3J+VGCjZGicCTeaug05f4+QRQQrcR5BGgA1ESFe/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753465157; a=rsa-sha256; cv=none; b=K+UmfSuMuL7Gp4ayDIMzkU8OphnlN0lcizPhldFAUBGxo5oWB+TcgJ/zjaFdQdM9o48vcT eRGJRKz7epg3ahIgih6kicIYrcES+S1/8EmGAjAEshX5hk1V3zlEGZoTydbFNvJi4l/3r+ b0jT35hIG/uATLpy4B7U/D+PW1f3RkP1lC3tIiZk1Ni4JddvcCkUp2TjbmcPzRAHS6/JDI 6OPNBAZPUli82dGVxtF5WTJQJEStBVGv1ChuGon9bFviANFenzJnz3Py68g78GxUlhEzMm AKQH3BhuNobmx4jgugu/ip2Lw5pNjh0yrmsgW+HGiwnbzf1i607uYI1S09d0cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZqn3sb5ztwx; Fri, 25 Jul 2025 17:39:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHdHIj012764; Fri, 25 Jul 2025 17:39:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHdHkP012761; Fri, 25 Jul 2025 17:39:17 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:39:17 GMT Message-Id: <202507251739.56PHdHkP012761@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 9bc6980bdf57 - main - if_ovpn: Destroy the datapath lock when destroying a clone List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 9bc6980bdf57432ee8519a3707423f410c5ec639 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=9bc6980bdf57432ee8519a3707423f410c5ec639 commit 9bc6980bdf57432ee8519a3707423f410c5ec639 Author: Mark Johnston AuthorDate: 2025-07-25 13:13:31 +0000 Commit: Mark Johnston CommitDate: 2025-07-25 17:39:01 +0000 if_ovpn: Destroy the datapath lock when destroying a clone Reviewed by: kp MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D51495 --- sys/net/if_ovpn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index 4c7cbed06bf0..3ff55dc3040d 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -2521,6 +2521,7 @@ ovpn_clone_destroy_cb(struct epoch_context *ctx) COUNTER_ARRAY_FREE(sc->counters, OVPN_COUNTER_SIZE); + rm_destroy(&sc->lock); if_free(sc->ifp); free(sc, M_OVPN); } From nobody Fri Jul 25 17:39:18 2025 X-Original-To: dev-commits-src-all@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 4bpZqq23fTz627ZZ; Fri, 25 Jul 2025 17:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZqp5q2Cz3RyC; Fri, 25 Jul 2025 17:39:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753465158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e7sREEDfKh58NWfRHAH3szrVksC1Y3CYLZd7gyH8WGc=; b=hP+xgMfmC3V0N7f+mFniKxfM5oriIGq/Kn4s26fnQJGvD8Ns05werzNcrTepe89mJdgFPe xKjMFlvtLjwTrFYmE0Y8yx772Q6qixpMfqLeN3PrbpmBj4EPouhdx+a22ZKnEAUFDWjExU 6W9JqzzMtXwvov0254X7Cirm4SQUqVrHAQoHIMv9WmAOkFF5GevDErNVv06s/t8ojf9Qh6 DlyxtEXIfOg2irzSxL1+3q9sal9Ppy3lnPuiau3Zy3l98RFRhJIiffEUAZ1FYcvjvQQwXU PQXF69GsT+7+4yVe3CxPaxDHbGaOlcvfGkHF/14redi8VPl/LZlKxo1a8ED7oA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753465158; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e7sREEDfKh58NWfRHAH3szrVksC1Y3CYLZd7gyH8WGc=; b=jwbSS1K9HtB9wzEUXEok5XgIvVdid3N4M8lxMFlTn1LUuV1dy8WPn7UShRU/9sVNrfXd2t mGzw1xTuP7haDqHS+va1bvHNp2oVdTPJfwj6cTIuU6gqsB8vgNKACiJ6oI6b2fbi90eUVs xhDHm8zCR/XJZBpCCVdJOxpufUyLrP5A7R+zf/qmw/OeNSJ9PdAhpltVrmkNCsj/RaTUzk P48q7uk3MFOI54Mixj+lzFN5V8qfspoflL6nNYZij70dJvfoJX1Ydj6+R4PjD9ghnPywAk OuELJJU6zvrMsVZYUouIz4n/mKYmffr0iz5fgJjYymb12v8+SZxC4pCx3MCoMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753465158; a=rsa-sha256; cv=none; b=nBhDqyYIUlFM0O6qEUy2694xr2G9b3SUOg6pmyspn8h4mM732ggG3FwcQvur0WNNvN14ce 4/fd7i2WlvpUStC2mLlo4hbNt6w+wdqRbT/dhL9sPtyYfSJhw1J3KujUPiNPoRWjgUC1ZU alvLIZRuFhQL/OKVocKxiIi3eLv6E7GG9MV074IGBW1jfGyfSvVsia94/EFF1tDac4SAbh bLfQ/XklMddv0AaT/UKbvlKJHFCaToUCNQWZVqVRo27lmLPWe8rCRfJ3RQLc/kpSv7jUdL WLlb5yIGOQ/2PBNXhb6iv2GTwZGAUoWgzWo90us2g/OQbjdnkr8Xm7VczaY98A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZqp4QmPztsV; Fri, 25 Jul 2025 17:39:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHdIj7012796; Fri, 25 Jul 2025 17:39:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHdI6B012793; Fri, 25 Jul 2025 17:39:18 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:39:18 GMT Message-Id: <202507251739.56PHdI6B012793@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: a7dfc570f274 - main - if_ovpn: Assert that udp_set_kernel_tunneling() succeeds List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: a7dfc570f2747668b2fdd8fde6e1954fcedb2378 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a7dfc570f2747668b2fdd8fde6e1954fcedb2378 commit a7dfc570f2747668b2fdd8fde6e1954fcedb2378 Author: Mark Johnston AuthorDate: 2025-07-25 13:13:52 +0000 Commit: Mark Johnston CommitDate: 2025-07-25 17:39:01 +0000 if_ovpn: Assert that udp_set_kernel_tunneling() succeeds We do this elsewhere, so copy the pattern here. Reviewed by: kp MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D51496 --- sys/net/if_ovpn.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index 3ff55dc3040d..67530281eefa 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -635,6 +635,7 @@ ovpn_new_peer(struct ifnet *ifp, const nvlist_t *nvl) * a new one. */ ret = udp_set_kernel_tunneling(sc->so, NULL, NULL, NULL); + MPASS(ret == 0); sorele(sc->so); sc->so = NULL; } From nobody Fri Jul 25 17:39:19 2025 X-Original-To: dev-commits-src-all@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 4bpZqr4qk8z627Zb; Fri, 25 Jul 2025 17:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZqq5VXDz3S2G; Fri, 25 Jul 2025 17:39:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753465159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7fJq71J2Ufn0zLhVtk3paXK29EOGH+1gcUitGNhheZQ=; b=TRA2b9RTz8DmxIEL5CSMp7V4tj49FgOcv08h1WJt9RH6SIFNRA97u8d86RsJviQEK9s9Dq Vak8nLqbkmWDpDwrxcyCnvSwRLbLuyDLhtUvAGpiMdKc1Urzzskt27mquh+2RjX2+lUltZ WB5AQUNeImZ0yd1DO+F29wvX/oroIDMV3K5YSZkkVToZUT+tOswiJY1tQ4nsAkvbhlxhaK SMPB8H0v7Fsi3hIWGDQCt9I0UFl4Uzmm5hEtWz/JjRtVdxGAUfYo4Cr7AsAtYCP9lv6gpz uwqElf4XEmRusbFYm25Iob46R5HA8f7lDgqT5NZCU9cs2m0xZ3KNWZAQkoReNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753465159; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7fJq71J2Ufn0zLhVtk3paXK29EOGH+1gcUitGNhheZQ=; b=FbmAB0VpsDL2El/nv4hEQW5O4u1AEP6gQb1rFw6SHeAxZV8CeeSTn9zTPEva5mg6GsJcZA arccx69guYPXmACtzAD0UIFE27GnyHblptzoLzi/0fbiBanG0gIhzzhuE0ThrN87+hnMNH JW9bYJpQg1txeV5q05ZMuJH8IFipNTbmvCVfNO+KeBIQUGupoE3FR9zOf9KXegPaz2zJuB zRvWIxbHw7bc/7vuKDd0OGkKmIpOC7S/ObAwAj/ftrJ0bl5wvKcNF0ZnXa2Xv/MQYXLhtA kd9gvuvrD65dwAdYReZSt5dqkVuNoIx4dnzMWL1mwEesUcnxq8oojlggyg0OlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753465159; a=rsa-sha256; cv=none; b=hivCCW4XZDS6WfrIkVRR3neDBPQAithdcXhTBvQNN0H9t3107O28c1sOpqhaZU5+0XDTZP rjlmxfEkFLKHffuvXbm8azUn80GOQLa8k0kJQsbO57TEpcuzZ8+fA4p0JqYCm9HNkvmdaB 91CtYFM+KOn2sGwaQ45NexXRC6r9SSl+yltE/3rT1xwqXve3S09Sbcfwpg6J5Xi28cvG1g cLKyWvfQBQ/0JtfEsYAntrhB2Wt6MtgQLKN1bZZ+boToQ44IlWhgQeCTtNdn8HHDXhhbUq s8jBJWUWk8n2+k6KuWTlpVWVWFs1DzC3tCgEBODDgft7V1kq8gt7XGdT8l4P2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZqq4xPJztsW; Fri, 25 Jul 2025 17:39:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHdJg6012830; Fri, 25 Jul 2025 17:39:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHdJsB012827; Fri, 25 Jul 2025 17:39:19 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:39:19 GMT Message-Id: <202507251739.56PHdJsB012827@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 26ef5e9e234f - main - if_ovpn: Remove a no-op function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 26ef5e9e234f1d1729dd43b15d1e591e479f1816 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=26ef5e9e234f1d1729dd43b15d1e591e479f1816 commit 26ef5e9e234f1d1729dd43b15d1e591e479f1816 Author: Mark Johnston AuthorDate: 2025-07-25 13:14:08 +0000 Commit: Mark Johnston CommitDate: 2025-07-25 17:39:01 +0000 if_ovpn: Remove a no-op function ovpn used to maintain one socket ref per peer. This scheme was changed in commit 3acf7e0da487 ("if_ovpn: avoid LOR between ovpn and UDP locks"), which turned ovpn_rele_so() in a no-op. Just remove the whole function and a related helper, as the remaining assertion there isn't useful. No functional change intended. Reviewed by: kp MFC after: 2 weeks Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D51497 --- sys/net/if_ovpn.c | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index 67530281eefa..d3ee1654ce82 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -372,33 +372,6 @@ ovpn_nvlist_to_sockaddr(const nvlist_t *nvl, struct sockaddr_storage *sa) return (0); } -static bool -ovpn_has_peers(struct ovpn_softc *sc) -{ - OVPN_ASSERT(sc); - - return (sc->peercount > 0); -} - -static void -ovpn_rele_so(struct ovpn_softc *sc) -{ - bool has_peers; - - OVPN_WASSERT(sc); - - if (sc->so == NULL) - return; - - has_peers = ovpn_has_peers(sc); - - if (! has_peers) { - MPASS(sc->peercount == 0); - } else { - MPASS(sc->peercount > 0); - } -} - static void ovpn_notify_del_peer(struct ovpn_softc *sc, struct ovpn_kpeer *peer) { @@ -487,8 +460,6 @@ ovpn_peer_release_ref(struct ovpn_kpeer *peer, bool locked) ovpn_free_kkey_dir(peer->keys[i].decrypt); } - ovpn_rele_so(sc); - callout_stop(&peer->ping_send); callout_stop(&peer->ping_rcv); uma_zfree_pcpu(pcpu_zone_4, peer->last_active); From nobody Fri Jul 25 17:39:20 2025 X-Original-To: dev-commits-src-all@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 4bpZqs39Q9z627jt; Fri, 25 Jul 2025 17:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZqr5vN6z3SCL; Fri, 25 Jul 2025 17:39:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753465160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lXfMyNO6CmVXtG5o6/G2E4tj0nFq7DRcAujoALf088E=; b=mTytPtiTozbsrBNYWFLgovnmHvWbfxZ+USz39b/iy11AVIY7tfJ+3WNaj460BZEDOKQC4z Kow/ZwhXt9K0kfoEXt7BgIycjFPhI0NUSK1wiskJgeFrrwBXXXMDbW/37JPfmOOlGSB6RP Gm5xJYKhXA6AmFnqUSvTbs3+knBDTqPMJLDCZ2Q7QfQDSf65GWfHzKvTkBe8xLmkHDtbkH oxPIAPRSW/eI/pIeBuWmntc6jzowKomQRZwvKoNISZHjzjTF6p1akxoBs+/yVqFbvsPQ7G hwBgwbl2Mv6X9POiavN7G/wKENzmPrOTie5npfUYsSnpHU6Tfp7WJ/xMTdUhXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753465160; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lXfMyNO6CmVXtG5o6/G2E4tj0nFq7DRcAujoALf088E=; b=Z15r+CUYm1nU55wJ+7kd1+vctXa2EVqsTTz7E/1rw8FiCsUr1P7Cdsos+8JVDfBZa4CB7V q+9N5nzxxgR1au6nF+Vp072aSoS0e4f4CB5qGdzyp/R9l3TXgWJa3mZLB/DqGKuTQceQHx cvDQn9fS3m4UYp3UwRnW3C5yMJ0rcF+6PPuPHBRSGlHUtTkajlcbawMC+7YeiBSw8HcCUz 6Lf1iuUao0c0htXut6nv87sFMIoICKGIonQb6T6/oJhZ8f9EAEMQxU1r9ikBnuKl4ZemjV ukjzPaZtY7DTjwQ49zoXWTVuiGCC+t8La/tQmPKVXlIf6wHLQ++5RscJB5sCWA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753465160; a=rsa-sha256; cv=none; b=WVgUg8an7BlMeBKrBg3hCHLw24rELqTeN3Lq6ow15P9QSOYcEdy7L4SR6PkkaH6Y8eFyFs m+jNJRQuTXRCHad2XWOM1m1Ij2qA+u/tS2P5cQX1ad8iTics5isj+xM/v6OENahn1papoi ezH2kImp26ssMaS/Hgcx5cwCdgGJLeNY/eTnhJI/yGigs4cTavD69PzGSNWpnTg+jjhYmX 6Cq36bbw18kY1nhDgmpH9iCjDB/GUNeI3voOU82HQHnNgyW2YyaNSVf2uOm/hqNY80JCGz z1PWY/cX7rz7M/mbo57k4uKqm/JorrhukFwWl8CK8qu2BvVpN7truc2uEylFvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZqr5Sslztk7; Fri, 25 Jul 2025 17:39:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHdKjY012863; Fri, 25 Jul 2025 17:39:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHdKAY012860; Fri, 25 Jul 2025 17:39:20 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:39:20 GMT Message-Id: <202507251739.56PHdKAY012860@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 05b5d56c5403 - main - if_ovpn: Support multihomed server configurations List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 05b5d56c540335ed17acf843810901338bf862d5 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=05b5d56c540335ed17acf843810901338bf862d5 commit 05b5d56c540335ed17acf843810901338bf862d5 Author: Mark Johnston AuthorDate: 2025-07-25 13:15:02 +0000 Commit: Mark Johnston CommitDate: 2025-07-25 17:39:01 +0000 if_ovpn: Support multihomed server configurations In UDP server mode, openvpn implements the "multihome" option, which makes it avoid binding to an address. Instead, the server socket is bound to INADDR_ANY. Today, when configuring a new peer and setting the source address, sockaddr() returns the wildcard address, so the source address is implicitly determined by the output interface. This doesn't work as one would want if the WAN interface has multiple addresses and clients connect to non-primary addresses. Make multihome mode work properly: use the local address supplied by openvpn in preference to that of the socket. We still fetch the port number out of the socket. PR: 273664 Reviewed by: kp MFC after: 1 month Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D51498 --- sys/net/if_ovpn.c | 53 ++++++++++++++++++++++++++++++++++++++++++++++------- 1 file changed, 46 insertions(+), 7 deletions(-) diff --git a/sys/net/if_ovpn.c b/sys/net/if_ovpn.c index d3ee1654ce82..853a0556a080 100644 --- a/sys/net/if_ovpn.c +++ b/sys/net/if_ovpn.c @@ -320,6 +320,25 @@ ovpn_get_port(const struct sockaddr_storage *s) } } +static void +ovpn_set_port(struct sockaddr_storage *s, unsigned short port) +{ + switch (s->ss_family) { + case AF_INET: { + struct sockaddr_in *in = (struct sockaddr_in *)s; + in->sin_port = port; + break; + } + case AF_INET6: { + struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)s; + in6->sin6_port = port; + break; + } + default: + panic("Unsupported address family %d", s->ss_family); + } +} + static int ovpn_nvlist_to_sockaddr(const nvlist_t *nvl, struct sockaddr_storage *sa) { @@ -333,13 +352,14 @@ ovpn_nvlist_to_sockaddr(const nvlist_t *nvl, struct sockaddr_storage *sa) return (EINVAL); af = nvlist_get_number(nvl, "af"); - switch (af) { #ifdef INET case AF_INET: { struct sockaddr_in *in = (struct sockaddr_in *)sa; size_t len; const void *addr = nvlist_get_binary(nvl, "address", &len); + + memset(in, 0, sizeof(*in)); in->sin_family = af; in->sin_len = sizeof(*in); if (len != sizeof(in->sin_addr)) @@ -355,6 +375,8 @@ ovpn_nvlist_to_sockaddr(const nvlist_t *nvl, struct sockaddr_storage *sa) struct sockaddr_in6 *in6 = (struct sockaddr_in6 *)sa; size_t len; const void *addr = nvlist_get_binary(nvl, "address", &len); + + memset(in6, 0, sizeof(*in6)); in6->sin6_family = af; in6->sin6_len = sizeof(*in6); if (len != sizeof(in6->sin6_addr)) @@ -475,7 +497,7 @@ ovpn_new_peer(struct ifnet *ifp, const nvlist_t *nvl) #ifdef INET6 struct epoch_tracker et; #endif - struct sockaddr_storage remote; + struct sockaddr_storage local, remote; struct ovpn_kpeer *peer = NULL; struct file *fp = NULL; struct ovpn_softc *sc = ifp->if_softc; @@ -544,20 +566,37 @@ ovpn_new_peer(struct ifnet *ifp, const nvlist_t *nvl) callout_init_rm(&peer->ping_send, &sc->lock, CALLOUT_SHAREDLOCK); callout_init_rm(&peer->ping_rcv, &sc->lock, 0); - peer->local.ss_len = sizeof(peer->local); - ret = sosockaddr(so, (struct sockaddr *)&peer->local); - if (ret) + memset(&local, 0, sizeof(local)); + local.ss_len = sizeof(local); + ret = sosockaddr(so, (struct sockaddr *)&local); + if (ret != 0) goto error; + if (nvlist_exists_nvlist(nvl, "local")) { + struct sockaddr_storage local1; - if (ovpn_get_port(&peer->local) == 0) { + ret = ovpn_nvlist_to_sockaddr(nvlist_get_nvlist(nvl, "local"), + &local1); + if (ret != 0) + goto error; + + /* + * openvpn doesn't provide a port here when in multihome mode, + * just steal the one the socket is bound to. + */ + if (ovpn_get_port(&local1) == 0) + ovpn_set_port(&local1, ovpn_get_port(&local)); + memcpy(&local, &local1, sizeof(local1)); + } + if (ovpn_get_port(&local) == 0) { ret = EINVAL; goto error; } - if (peer->local.ss_family != remote.ss_family) { + if (local.ss_family != remote.ss_family) { ret = EINVAL; goto error; } + memcpy(&peer->local, &local, sizeof(local)); memcpy(&peer->remote, &remote, sizeof(remote)); #ifdef INET6 From nobody Fri Jul 25 17:39:21 2025 X-Original-To: dev-commits-src-all@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 4bpZqt60qPz627tT; Fri, 25 Jul 2025 17:39: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpZqt0PXNz3SFM; Fri, 25 Jul 2025 17:39:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753465162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EXqJSG1DQbmbt/Bc3OTvawiPdoGJqM4efHZEBB4p+9M=; b=n081ZXIl8k4E9M3aD6cTdukPlmH+8bsPVDzwpeS5alwcLRUSIgMLXl1GIkuxrkkoOAkd6F WxuDn5gBEAKDCtYecmiShPx+Soo1TJfoBpMNBjl4X46AmUoa8VRJDVGEM+RCeE+a94IqMv p6E19XDiTy8T1vUQOjm+grnyBdRsNRwDov1RDl4iCW2drUAgM5f4cKTuakXmliy64RF5Id jJ8C6e0kZ/mIDUa43VVgGQNEROQ2cuqlxoT8zLt7jqqfuVy/9ZoJOjhZ2YRZk73ZJZj6QQ GIopupKrvvbjsi4jT6ywtpjnlytKMfgKy2eNo2CnE2qjQZVcWfPVJGBwMteh0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753465162; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EXqJSG1DQbmbt/Bc3OTvawiPdoGJqM4efHZEBB4p+9M=; b=q+Ylm6Y67qXURRvwlKsV50K+CY1DoADeY1VHR3P2Ym7ssk+g3SgiXQ1KiSU4CmQKwBNNhD XpX838LFQvOIHuqlZVwefzbyj7Z1bTs18VlY+MdP4wZXJJlO2GvM+IW1AUCmtCYCVaaWwk 8mqrL7YxCMZxlMCImrauMEczGaseL2h2Bs0iKBESCKv7GDTyxlqYnmkzP0zTcsw8p0Tus0 /J0cAgk8GGr6F/DhVifFOAVYtPVgTB9M+Itpzyfje+jmzvafI6RzVbSVgWLRGkokAovdSv L+cntzGf5C3TAbhuGu84LSebbLmN84ZQZpsqfLUJwXF+DfC4LwRGVpBCGJT8Ow== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753465162; a=rsa-sha256; cv=none; b=jpTHflIy+CToF897yrFsSo2ISBgvB/cg1td5f8SmdWnlBPSV4P7vqy1R8sB/+5HDqv5v83 0QDO3YRo4YEwfNiNlfMaHJvLDQ4vPnqJqNbvM31Oea0fA4pVSitZOIeftdQSgn9R+5avkO pLZaisTitJU6mcxPzC2Et6Xfi4jdj8D4wr8w5wHv54E7QYvb2xr3nQjseoAjykSek41VRg HIaLzrCUGtKPGVFJkX6qsoySuinQTlTR0hOn/BJ3LMSVIiwC/rw5wtuX9H1BLioN3nQDWv 18x8KbJmD6eINuPkRM8X+wxw14FcTt2FpuFRVlKLvNPdFArekebkr9gUJqS3ag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpZqs6QzwztNC; Fri, 25 Jul 2025 17:39:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PHdLum012896; Fri, 25 Jul 2025 17:39:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PHdLJN012893; Fri, 25 Jul 2025 17:39:21 GMT (envelope-from git) Date: Fri, 25 Jul 2025 17:39:21 GMT Message-Id: <202507251739.56PHdLJN012893@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 0bfcfb3cb1cb - main - if_ovpn tests: Exercise the multihome option List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 0bfcfb3cb1cbfa383cbd24eff39d39f143eb63ba Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0bfcfb3cb1cbfa383cbd24eff39d39f143eb63ba commit 0bfcfb3cb1cbfa383cbd24eff39d39f143eb63ba Author: Mark Johnston AuthorDate: 2025-07-25 13:15:39 +0000 Commit: Mark Johnston CommitDate: 2025-07-25 17:39:01 +0000 if_ovpn tests: Exercise the multihome option These test cases are variants of the 4in4 and 6in6 tests wherein the server interface has an alias assigned and the client is configured to connect to the alias rather than the primary address. Reviewed by: kp MFC after: 1 month Sponsored by: Stormshield Sponsored by: Klara, Inc. Differential Revision: https://reviews.freebsd.org/D51499 --- tests/sys/net/if_ovpn/if_ovpn.sh | 167 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 167 insertions(+) diff --git a/tests/sys/net/if_ovpn/if_ovpn.sh b/tests/sys/net/if_ovpn/if_ovpn.sh index 2138e0f666ec..26807a095455 100644 --- a/tests/sys/net/if_ovpn/if_ovpn.sh +++ b/tests/sys/net/if_ovpn/if_ovpn.sh @@ -1149,6 +1149,171 @@ destroy_unused_cleanup() ovpn_cleanup } +atf_test_case "multihome4" "cleanup" +multihome4_head() +{ + atf_set descr 'Test multihome IPv4 with OpenVPN' + atf_set require.user root + atf_set require.progs openvpn +} + +multihome4_body() +{ + pft_init + ovpn_init + + l=$(vnet_mkepair) + + vnet_mkjail a ${l}a + atf_check jexec a ifconfig ${l}a inet 192.0.2.1/24 + atf_check jexec a ifconfig ${l}a alias 192.0.2.2/24 + vnet_mkjail b ${l}b + atf_check jexec b ifconfig ${l}b inet 192.0.2.3/24 + + # Sanity check + atf_check -s exit:0 -o ignore jexec b ping -c 1 192.0.2.1 + atf_check -s exit:0 -o ignore jexec b ping -c 1 192.0.2.2 + + ovpn_start a " + dev ovpn0 + dev-type tun + proto udp4 + + cipher AES-256-GCM + auth SHA256 + + multihome + server 198.51.100.0 255.255.255.0 + ca $(atf_get_srcdir)/ca.crt + cert $(atf_get_srcdir)/server.crt + key $(atf_get_srcdir)/server.key + dh $(atf_get_srcdir)/dh.pem + + mode server + script-security 2 + auth-user-pass-verify /usr/bin/true via-env + topology subnet + + keepalive 100 600 + " + ovpn_start b " + dev tun0 + dev-type tun + + client + + remote 192.0.2.2 + auth-user-pass $(atf_get_srcdir)/user.pass + + ca $(atf_get_srcdir)/ca.crt + cert $(atf_get_srcdir)/client.crt + key $(atf_get_srcdir)/client.key + dh $(atf_get_srcdir)/dh.pem + + keepalive 100 600 + " + + # Block packets from the primary address, openvpn should only use the + # configured remote address. + jexec b pfctl -e + pft_set_rules b \ + "block in quick from 192.0.2.1 to any" \ + "pass all" + + # Give the tunnel time to come up + sleep 10 + + atf_check -s exit:0 -o ignore jexec b ping -c 3 198.51.100.1 +} + +multihome4_cleanup() +{ + ovpn_cleanup + pft_cleanup +} + +multihome6_head() +{ + atf_set descr 'Test multihome IPv6 with OpenVPN' + atf_set require.user root + atf_set require.progs openvpn +} + +multihome6_body() +{ + ovpn_init + + l=$(vnet_mkepair) + + vnet_mkjail a ${l}a + atf_check jexec a ifconfig ${l}a inet6 2001:db8::1/64 no_dad + atf_check jexec a ifconfig ${l}a inet6 alias 2001:db8::2/64 no_dad + vnet_mkjail b ${l}b + atf_check jexec b ifconfig ${l}b inet6 2001:db8::3/64 no_dad + + # Sanity check + atf_check -s exit:0 -o ignore jexec b ping6 -c 1 2001:db8::1 + atf_check -s exit:0 -o ignore jexec b ping6 -c 1 2001:db8::2 + + ovpn_start a " + dev ovpn0 + dev-type tun + proto udp6 + + cipher AES-256-GCM + auth SHA256 + + multihome + server-ipv6 2001:db8:1::/64 + + ca $(atf_get_srcdir)/ca.crt + cert $(atf_get_srcdir)/server.crt + key $(atf_get_srcdir)/server.key + dh $(atf_get_srcdir)/dh.pem + + mode server + script-security 2 + auth-user-pass-verify /usr/bin/true via-env + topology subnet + + keepalive 100 600 + " + ovpn_start b " + dev tun0 + dev-type tun + + client + + remote 2001:db8::2 + auth-user-pass $(atf_get_srcdir)/user.pass + + ca $(atf_get_srcdir)/ca.crt + cert $(atf_get_srcdir)/client.crt + key $(atf_get_srcdir)/client.key + dh $(atf_get_srcdir)/dh.pem + + keepalive 100 600 + " + + # Block packets from the primary address, openvpn should only use the + # configured remote address. + jexec b pfctl -e + pft_set_rules b \ + "block in quick from 2001:db8::1 to any" \ + "pass all" + + # Give the tunnel time to come up + sleep 10 + + atf_check -s exit:0 -o ignore jexec b ping6 -c 3 2001:db8:1::1 + atf_check -s exit:0 -o ignore jexec b ping6 -c 3 -z 16 2001:db8:1::1 +} + +multihome6_cleanup() +{ + ovpn_cleanup +} + atf_init_test_cases() { atf_add_test_case "4in4" @@ -1165,4 +1330,6 @@ atf_init_test_cases() atf_add_test_case "chacha" atf_add_test_case "gcm_128" atf_add_test_case "destroy_unused" + atf_add_test_case "multihome4" + atf_add_test_case "multihome6" } From nobody Fri Jul 25 19:09:24 2025 X-Original-To: dev-commits-src-all@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 4bpcr74f6Kz62D41 for ; Fri, 25 Jul 2025 19:09:43 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-pj1-x1032.google.com (mail-pj1-x1032.google.com [IPv6:2607:f8b0:4864:20::1032]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "WR4" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpcr6504Cz3NS8 for ; Fri, 25 Jul 2025 19:09:42 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-pj1-x1032.google.com with SMTP id 98e67ed59e1d1-313eeb77b1fso2011646a91.1 for ; Fri, 25 Jul 2025 12:09:42 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20230601.gappssmtp.com; s=20230601; t=1753470576; x=1754075376; darn=freebsd.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=K1kx+xDNUHDa/bMLIb0x+InBZR/b6t6JCWLkC5VhhOI=; b=ZUZoKtIAozjHGABl5yemXI0RiGr0r+lZeJqCnFEiA5GRlPWTkshHjw1Q3h2Z0PYwW0 tjf+FfrSMyS8YcsswZn/pTULbXz2WnVgkb2dEjEHgeV8mFRAw6KTP53ek93HuAuX2H75 uWI9z0Aj3c/DPb3Jj/WfPH6bfcrFneI/6I0zn4qxdH8d5l5+THrojamLccRPozHQcvKK U+02aWW8Oy3PZNnYuQbI7UUiLBtZSt0z4EqdrBtOpphS6Z6HFkrqmnWLC+cuOfGlZTcX AgiT9RTU5hLp9pwQcUrBAruP6aDV5fqZ0OBTsWpXQ0CpeDwaJCck9Uyd2fIMJLPlVZ54 6lDA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1753470576; x=1754075376; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=K1kx+xDNUHDa/bMLIb0x+InBZR/b6t6JCWLkC5VhhOI=; b=kwEWRSFYmXAhSziGOr47m9GYeiRnaNmgN1jM0xz0BrF0UPGyMyOTnPUJrbUJqpZSUe f0YCBSyxrcY+0W9r7uO1dIEfXGw2fR1NhUhuwdcbrmg4UnEJo3sAPhsHux3JO7nY1ARN lD0ANqe4lvjvY2vlTrjyaHDv1VtKtTTwYn14AQMFVEGmmsAT3r+kWeZ1kFliaP23nY+n 6dOVd7OAb0wTBLZE3BbwNgoxWyGvKWnRY0ELh+KPyRMF+JlrmZ0+4M0s5EIlwYSojwm2 h/etYC/yTWVp3vr0PadKAhOfmOIf9OvHJ1XC7El7eTU41r1dwNlwwmige11ZB8cY4k6w x0bw== X-Forwarded-Encrypted: i=1; AJvYcCUg2ZCTKbLKXI2XRCGIxtY+x5NMPbNnrrZSRfNwZ+Y2zcFpTaWq57uAYP/5b8/csexLFk3m3Gj/1gAbC/IkAsl3b3Xc@freebsd.org X-Gm-Message-State: AOJu0YzgfpfIXsY/KDETbaLQvf8k+HievWh2mHzSQ6GFgjDy5RCglJfM sAkl0dW6Zs4lzOQhtZz/+wE+6Khi3xB6w1xBotMI/Ce/rMDI+Mzd6EBDLvhiiZRUpKZ8Tqk3SW1 o9AbPDbnGEI6yIR+ww1BcOejy2B9c5BLMaYYS95fhuvceaZUs6XfTMQn84w== X-Gm-Gg: ASbGncvHc1AIONd3vdibMTlBIdIu0WHRE9gAu0AqecKg1Ye5GARcVmr3k7SNuqxMOSU h7GjW3hYon6nBxdf2fsuF8X+y8Mu+pIpmSpvrSmORwQA1/FU/WMccmBRd1T6ptYh63htPu5dDUB 5+Pd8o06fRO2hUVMmb3arxUs6HMyPMkKTa5DWbRQ+m8Qs443/Z/g0HSpjdNdDn2EWuriFgA85lG snrYz4= X-Google-Smtp-Source: AGHT+IEALg3uTOGlqujJPt8vj1b0+qLwqZPAYC28d662GIOXTyziARPBtE+fMuV5GxczDELMkcsfTcTPWuzUUwg3dBg= X-Received: by 2002:a17:90b:3c81:b0:312:e9d:4002 with SMTP id 98e67ed59e1d1-31e77a140c0mr4444426a91.28.1753470575831; Fri, 25 Jul 2025 12:09:35 -0700 (PDT) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 References: <202507211410.56LEAD6J066633@gitrepo.freebsd.org> In-Reply-To: From: Warner Losh Date: Fri, 25 Jul 2025 13:09:24 -0600 X-Gm-Features: Ac12FXzBVfv79BfMmrSNAoJI-E5VMII5YX98S2hrl6Q1BnnM0QJcImCtkcnZBRk Message-ID: Subject: Re: git: c7da9fb90b0b - main - KRB5: Enable MIT KRB5 by default To: Wolfram Schneider Cc: Cy Schubert , src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Rspamd-Queue-Id: 4bpcr6504Cz3NS8 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:15169, ipnet:2607:f8b0::/32, country:US] On Fri, Jul 25, 2025 at 7:30=E2=80=AFAM Wolfram Schneider wrote: > > On Mon, 21 Jul 2025 at 16:10, Cy Schubert wrote: > > > > The branch main has been updated by cy: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dc7da9fb90b0b6385e99bb774= 7476359b712993fa > > > > commit c7da9fb90b0b6385e99bb7747476359b712993fa > > Author: Cy Schubert > > AuthorDate: 2025-07-19 14:11:18 +0000 > > Commit: Cy Schubert > > CommitDate: 2025-07-21 14:07:22 +0000 > > > > KRB5: Enable MIT KRB5 by default > > > > Set WITH_MITKRB5=3Dyes as the default. > > > > Rebuild all USES=3Dgssapi ports is recommended. > > > > A clean buildworld is required. > > > > Relnotes: yes > > IMHO this commit breaks cross compiling of FreeBSD on macOS due a > missing include file 'endian.h' > > make buildworld > [...] > clang -O2 -pipe -fno-common -Wno-deprecated-non-prototype > -Wno-macro-redefined -Wno-unused-parameter > -I/Users/wosch/projects/wosch-src/crypto/krb5/src/util/support > -I/Users/wosch/projects/wosch-src/crypto/krb5/src/include > -I/Users/wosch/projects/wosch-src/krb5/include > -I/var/folders/mw/16w0zx815gdb3xg581_8m2dh0000gn/T//freebsd-obj/Users/wos= ch/projects/wosch-src/arm64.aarch64/tmp/obj-tools/krb5/util/support > -Wno-deprecated-non-prototype -Wno-macro-redefined > -Wno-unused-parameter -MD -MF.depend.base64.o -MTbase64.o -std=3Dgnu17 > -Wno-format-zero-length -Wsystem-headers -Wno-pointer-sign -Wdate-time > -Wno-system-headers -Wno-empty-body -Wno-string-plus-int > -Wno-unused-const-variable -Wno-error=3Dunused-but-set-parameter > -Wno-error=3Dcast-function-type-mismatch -Wno-tautological-compare > -Wno-unused-value -Wno-parentheses-equality -Wno-unused-function > -Wno-enum-conversion -Wno-unused-local-typedef > -Wno-address-of-packed-member -Wno-switch -Wno-switch-enum > -Wno-knr-promoted-parameter -Wno-parentheses -Wno-typedef-redefinition > -Werror=3Dincompatible-pointer-types-discards-qualifiers > -Qunused-arguments > -I/var/folders/mw/16w0zx815gdb3xg581_8m2dh0000gn/T//freebsd-obj/Users/wos= ch/projects/wosch-src/arm64.aarch64/tmp/legacy/usr/include > -Werror=3Dimplicit-function-declaration -Werror=3Dimplicit-int > -Werror=3Dreturn-type -Wundef -DHAVE_NBTOOL_CONFIG_H=3D1 > -D_DARWIN_C_SOURCE=3D1 > -I/Users/wosch/projects/wosch-src/tools/build/cross-build/include/mac > -idirafter /Users/wosch/projects/wosch-src/contrib/libarchive/libarchive > -I/Users/wosch/projects/wosch-src/tools/build/cross-build/include/common > -c /Users/wosch/projects/wosch-src/crypto/krb5/src/util/support/base64.c > -o base64.o > In file included from > /Users/wosch/projects/wosch-src/crypto/krb5/src/util/support/base64.c:36: > /Users/wosch/projects/wosch-src/crypto/krb5/src/include/k5-platform.h:439= :11: > fatal error: 'endian.h' file not found > 439 | # include > | ^~~~~~~~~~ > 1 error generated. > *** [base64.o] Error code 1 > bmake[3]: stopped making "all" in > /Users/wosch/projects/wosch-src/krb5/util/support > > As a workaround, you can set the makefile variable WITHOUT_MITKRB5=3D1 > and buildworld will work again on macOS. Adding a macos compat endian.h shim may be as simple as a one-liner "#include " depending on what kerberos uses from there. tools/build/cross-build/include/macos/endian.h would be where it goes. I'm about to depart on vacation, or I'd take a stab at this. Warner From nobody Fri Jul 25 19:26:24 2025 X-Original-To: dev-commits-src-all@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 4bpdCP2PxHz62FYs; Fri, 25 Jul 2025 19:26: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpdCP1YS6z3XVd; Fri, 25 Jul 2025 19:26:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753471585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4W9XG+D5MA4Mr9v1WZPH3Vb2ei0WGKsY5po9t9yoNOo=; b=b98L7feed3QNVbugAjSLh/wBmyzKTJmsHIUsN4ltQ2bYvGxAN94VLFF5f+FUUvCjwXwENp sMPHi+WLuqLzVDv3UmPxAwMSsvx3xvfPb3coU6861fhEGe9Xt5bPGNsEpBTpjVKHOg+VLX nEh8Frz0jw/KGlNa5sr4+o67vF1ZhyOQbQug7iX4HH+9XrUW+7zRPlzV89EKtcZKYnIkAk uH2PdRaPvVPGBA+74ddCx95iifQNZZWbU3eNZNBTTOu4fB41cVqO7zDYCT897zr3ubhTj6 /MSPPzj7H2zBf+R+CXAwII2rBEFOmqZJmhZbNpSytKTrpxtu61iLxoQ86xTT4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753471585; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4W9XG+D5MA4Mr9v1WZPH3Vb2ei0WGKsY5po9t9yoNOo=; b=NOE3tQb6/qBjnjA227FXdvgNSANwUBvgmf5h0N2QV5fiX835snZHRqwcSe8WypsJIuIXLt qM6rERnAauM8p9Oyh3tWqhwWPCqpYwiIJkXG4pyEV2IN5r9q7GIRFUCNfnJhJ7tl6zzT94 ZUzNGIzkss/6maaZ/MHvsxIn4KVynERGwNiMXhR+JPdP1Byv0L80my49m5MlScDSBpPSti kf42BPr5qVqRC2D1F+eN+2GsOPRrtRQyHPmc0sp/q1QdBZDLawjinIGkOO9un5GL3P4372 UNt3SzwGlC26iJvZ9zYAYrhSqBCSJWjTnC8sMXplMxKXQ5qSm40bxq1zc1jd0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753471585; a=rsa-sha256; cv=none; b=BdzK8VCC6TEeZak/8NwkfjVf7pQiE47Xp2boHTvSD99bUSRvQklu81fOT5+znqlB6S/4ni k7tT6aooLHUpgIpjd5HgqpZKG1to8CzDqG42Y1BRfd3Gf5UCWzXbyXl/2e+yeGBzdn/l6E QyO1uRZi9cue4ysyjAn2YQVgzyGoO6Jfx9Q8lGi8PlnZu3PLWJgbAoQUe/H14WWgezDIng kQ4D16bi7vbAOLyaUvWN3HnAPJo3U3w0J2eRMSgeftgsEE4Hmz2dEhS80oNlZxLIHOx+dk d8de4QteXchSQr1U3Q/1gBjocdcpc/ldShLdoMswxYR1W1UuScPrnNEbVvg4Mw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpdCP12KYzxkt; Fri, 25 Jul 2025 19:26:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PJQP4d018698; Fri, 25 Jul 2025 19:26:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PJQODb018695; Fri, 25 Jul 2025 19:26:24 GMT (envelope-from git) Date: Fri, 25 Jul 2025 19:26:24 GMT Message-Id: <202507251926.56PJQODb018695@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: ee110941e35c - main - bsdinstall: Remove support for ZFS + MBR disk layouts List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: ee110941e35c4354baa2e5b6fd64d3025cff4b7e Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ee110941e35c4354baa2e5b6fd64d3025cff4b7e commit ee110941e35c4354baa2e5b6fd64d3025cff4b7e Author: Ed Maste AuthorDate: 2025-06-25 01:19:12 +0000 Commit: Ed Maste CommitDate: 2025-07-25 19:26:09 +0000 bsdinstall: Remove support for ZFS + MBR disk layouts It hasn't worked for some time -- as reported in review D40816 "Installing FreeBSD with Auto ZFS + MBR has been broken ever since the move to OpenZFS with FreeBSD 13." It relied on the partition table and ZFS data overlapping in a very fragile way and is not a good idea. Reviewed by: jhb Relnotes: Yes Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51028 --- usr.sbin/bsdinstall/scripts/zfsboot | 141 ++---------------------------------- 1 file changed, 8 insertions(+), 133 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/zfsboot b/usr.sbin/bsdinstall/scripts/zfsboot index 493f137092ec..60feec28e888 100755 --- a/usr.sbin/bsdinstall/scripts/zfsboot +++ b/usr.sbin/bsdinstall/scripts/zfsboot @@ -86,7 +86,7 @@ f_include $BSDCFG_SHARE/variable.subr # # Create a separate boot pool? -# NB: Automatically set when using geli(8) or MBR +# NB: Automatically set when using geli(8) # : ${ZFSBOOT_BOOT_POOL=} @@ -96,12 +96,12 @@ f_include $BSDCFG_SHARE/variable.subr : ${ZFSBOOT_BOOT_POOL_CREATE_OPTIONS:=} # -# Default name for boot pool when enabled (e.g., geli(8) or MBR) +# Default name for boot pool when enabled (e.g., geli(8)) # : ${ZFSBOOT_BOOT_POOL_NAME:=bootpool} # -# Default size for boot pool when enabled (e.g., geli(8) or MBR) +# Default size for boot pool when enabled (e.g., geli(8)) # : ${ZFSBOOT_BOOT_POOL_SIZE:=2g} @@ -790,7 +790,7 @@ zfs_create_diskpart() # Check for unknown partition scheme before proceeding further case "$ZFSBOOT_PARTITION_SCHEME" in - ""|MBR|GPT*) : known good ;; + ""|GPT*) : known good ;; *) f_dprintf "$funcname: %s is an unsupported partition scheme" \ "$ZFSBOOT_PARTITION_SCHEME" @@ -825,14 +825,11 @@ zfs_create_diskpart() # # Lay down the desired type of partition scheme # - local setsize mbrindex align_small align_big + local setsize align_small align_big # # If user has requested 4 K alignment, add these params to the # gpart add calls. With GPT, we align large partitions to 1 M for - # improved performance on SSDs. MBR does not always play well with gaps - # between partitions, so all alignment is only 4k for that case. - # With MBR, we align the BSD partition that contains the MBR, otherwise - # the system fails to boot. + # improved performance on SSDs. # if [ "$ZFSBOOT_FORCE_4K_SECTORS" ]; then align_small="-a 4k" @@ -974,90 +971,6 @@ zfs_create_diskpart() /dev/$disk$targetpart ;; - MBR) f_dprintf "$funcname: Creating MBR layout..." - # - # Enable boot pool if encryption is desired - # - [ "$ZFSBOOT_GELI_ENCRYPTION" ] && ZFSBOOT_BOOT_POOL=1 - # - # 1. Create MBR layout (no labels) - # - f_eval_catch $funcname gpart "$GPART_CREATE" mbr $disk || - return $FAILURE - f_eval_catch $funcname gpart "$GPART_BOOTCODE" /boot/mbr \ - $disk || return $FAILURE - - # - # 2. Add freebsd slice with all available space - # - f_eval_catch $funcname gpart "$GPART_ADD_ALIGN" \ - "$align_small" freebsd $disk || return $FAILURE - f_eval_catch $funcname gpart "$GPART_SET_ACTIVE" 1 $disk || - return $FAILURE - # Pedantically nuke any old labels - f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \ - /dev/${disk}s1 - # Pedantically nuke any old scheme - f_eval_catch -d $funcname gpart "$GPART_DESTROY_F" ${disk}s1 - - # - # 3. Write BSD scheme to the freebsd slice - # - f_eval_catch $funcname gpart "$GPART_CREATE" BSD ${disk}s1 || - return $FAILURE - - # NB: ZFS pools will use s1a (no labels) - bootpart=s1a swappart=s1b targetpart=s1d mbrindex=4 - - # - # Always prepare a boot pool on MBR - # Do not align this partition, there must not be a gap - # - ZFSBOOT_BOOT_POOL=1 - f_eval_catch $funcname gpart \ - "$GPART_ADD_ALIGN_INDEX_WITH_SIZE" \ - "" 1 freebsd-zfs ${bootsize}b ${disk}s1 || - return $FAILURE - # Pedantically nuke any old labels - f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \ - /dev/$disk$bootpart - if [ "$ZFSBOOT_GELI_ENCRYPTION" ]; then - # Pedantically detach targetpart for later - f_eval_catch -d $funcname geli \ - "$GELI_DETACH_F" \ - /dev/$disk$targetpart - fi - - # - # 4. Add freebsd-swap partition - # - if [ ${swapsize:-0} -gt 0 ]; then - f_eval_catch $funcname gpart \ - "$GPART_ADD_ALIGN_INDEX_WITH_SIZE" \ - "$align_small" 2 freebsd-swap \ - ${swapsize}b ${disk}s1 || return $FAILURE - # Pedantically nuke any old labels on the swap - f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \ - /dev/${disk}s1b - fi - - # - # 5. Add freebsd-zfs partition for zroot - # - if [ "$ZFSBOOT_POOL_SIZE" ]; then - f_eval_catch $funcname gpart "$GPART_ADD_ALIGN_INDEX_WITH_SIZE" \ - "$align_small" $mbrindex freebsd-zfs $ZFSBOOT_POOL_SIZE ${disk}s1 || return $FAILURE - else - f_eval_catch $funcname gpart "$GPART_ADD_ALIGN_INDEX" \ - "$align_small" $mbrindex freebsd-zfs ${disk}s1 || return $FAILURE - fi - f_eval_catch -d $funcname zpool "$ZPOOL_LABELCLEAR_F" \ - /dev/$disk$targetpart # Pedantic - f_eval_catch $funcname dd "$DD_WITH_OPTIONS" \ - /boot/zfsboot /dev/${disk}s1 count=1 || - return $FAILURE - ;; - esac # $ZFSBOOT_PARTITION_SCHEME # Update fstab(5) @@ -1102,7 +1015,7 @@ zfs_create_boot() local zroot_vdevtype="$2" local zroot_vdevs= # Calculated below local swap_devs= # Calculated below - local boot_vdevs= # Used for geli(8) and/or MBR layouts + local boot_vdevs= # Used for geli(8) layouts shift 2 # poolname vdev_type local disks="$*" disk local isswapmirror @@ -1191,7 +1104,6 @@ zfs_create_boot() f_dprintf "$funcname: With 4K sectors..." f_eval_catch $funcname sysctl "$SYSCTL_ZFS_MIN_ASHIFT_12" \ || return $FAILURE - sysctl kern.geom.part.mbr.enforce_chs=0 fi local n=0 for disk in $disks; do @@ -1415,40 +1327,6 @@ zfs_create_boot() "bootfs=\"$zroot_name/$zroot_bootfs\"" "$zroot_name" || return $FAILURE - # MBR boot loader touch-up - if [ "$ZFSBOOT_PARTITION_SCHEME" = "MBR" ]; then - # Export the pool(s) - f_dprintf "$funcname: Temporarily exporting ZFS pool(s)..." - f_eval_catch $funcname zpool "$ZPOOL_EXPORT" "$zroot_name" || - return $FAILURE - if [ "$ZFSBOOT_BOOT_POOL" ]; then - f_eval_catch $funcname zpool "$ZPOOL_EXPORT" \ - "$bootpool_name" || return $FAILURE - fi - - f_dprintf "$funcname: Updating MBR boot loader on disks..." - # Stick the ZFS boot loader in the "convenient hole" after - # the ZFS internal metadata - for disk in $disks; do - f_eval_catch $funcname dd "$DD_WITH_OPTIONS" \ - /boot/zfsboot /dev/$disk$bootpart \ - "skip=1 seek=1024" || return $FAILURE - done - - # Re-import the ZFS pool(s) - f_dprintf "$funcname: Re-importing ZFS pool(s)..." - f_eval_catch $funcname zpool "$ZPOOL_IMPORT_WITH_OPTIONS" \ - "-o altroot=\"$BSDINSTALL_CHROOT\"" \ - "$zroot_name" || return $FAILURE - if [ "$ZFSBOOT_BOOT_POOL" ]; then - # Import the bootpool, but do not mount it yet - f_eval_catch $funcname zpool \ - "$ZPOOL_IMPORT_WITH_OPTIONS" \ - "-o altroot=\"$BSDINSTALL_CHROOT\" -N" \ - "$bootpool_name" || return $FAILURE - fi - fi - # Remount bootpool and create symlink(s) if [ "$ZFSBOOT_BOOT_POOL" ]; then f_eval_catch $funcname zfs "$ZFS_MOUNT" "$bootpool_name" || @@ -1793,7 +1671,7 @@ while :; do fi ;; ?" $msg_partition_scheme") - # Toggle between GPT (BIOS), GPT (UEFI) and MBR + # Toggle between partition schemes if [ "$ZFSBOOT_PARTITION_SCHEME" = "GPT" -a \ "$ZFSBOOT_BOOT_TYPE" = "BIOS" ] then @@ -1805,9 +1683,6 @@ while :; do ZFSBOOT_PARTITION_SCHEME="GPT" ZFSBOOT_BOOT_TYPE="BIOS+UEFI" elif [ "$ZFSBOOT_PARTITION_SCHEME" = "GPT" ]; then - ZFSBOOT_PARTITION_SCHEME="MBR" - ZFSBOOT_BOOT_TYPE="BIOS" - elif [ "$ZFSBOOT_PARTITION_SCHEME" = "MBR" ]; then ZFSBOOT_PARTITION_SCHEME="GPT + Active" ZFSBOOT_BOOT_TYPE="BIOS" elif [ "$ZFSBOOT_PARTITION_SCHEME" = "GPT + Active" ]; then From nobody Fri Jul 25 20:06:48 2025 X-Original-To: dev-commits-src-all@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 4bpf613L8Qz62HRM; Fri, 25 Jul 2025 20:06: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpf610L0lz47S5; Fri, 25 Jul 2025 20:06:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753474009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0ZTyyWHYFSBHB3lbwO0xN2JOxiuGsGkjPCatJcgg7yY=; b=N8RbwA0SMEBlkznBpId3kwJYnedZ9zcwFeZIgf4cXx2mv8YzfImTKTJ9/eDfZ17MOsx5he 5TN5Dp6U/Dvp0qwGvDNiMWlNbRInBYNulwBhQ6lylHUakDGrXdotJ+kA4QYCUbMNvJc+dR osnVrrN0qRKLVl5iYwnfOU4qR54LYQzKe2dc/vNUDKsrSjnk2b0NJx7shBHVaVvMA7kZT1 ote4wBXvnapV3LSN8cA7VLDzOh+I8aOA1iI9mU6Y0pZhd5NDpi2k+ayZt3Hr7wfkX5GR9a SF9NpGDb4trcRIas4zVlBx4/0e+cA6r2LC8VxNEfhN0eeTXYfIP28LYGSWDhBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753474009; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0ZTyyWHYFSBHB3lbwO0xN2JOxiuGsGkjPCatJcgg7yY=; b=jksV0J7hIuLYMB/q04gMB1sUoSpWYL+I6zVj+PiUKBWfpSmVhVEyrvv4yBT/HBPrqQg3Eq hgX7mEhLRsMjyczBzI/55vwuyIJoxQxaUoiKRthvKNF00AQaWgCHFTbNKvEVudiMTlnPTW 6PbvrD7U5m7eHB7SDEbOsUQUROku7v2q9eVlrwhxnI5FQ+aQcxAiXXY45+Lp1JgI2W4noB iSsRwKnQ4XNK+KqwYHgEduHBZpKbjzLJvifXauRxulZiQ28gCC0z4y2hNvK0WLSD2SD1/5 ByZn8x4IdCLpGdxw//e6RdUzlqRx/1IVn0UyPsJlGc+2sb6HBBlZlLbBkAK2tQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753474009; a=rsa-sha256; cv=none; b=bjjzTc1VWYFcW17c5+j31ZbjpOy2wdrjMlmelqAMo1V3txPT20HJFNT9gB+O94v5a4/87i sOk4aHihH0gQLCqIvh+3rcbMMU38Y9l5io9FELPtptygj5g8F8p0rpofPsR/RYDTJIzpSE L3IKSbLqamUe4M2W193MoaRWJaBwEeq2IEN3Q5Acxdgx03nK1iD6qD9aL2iIqfGVJgFBIV OXcHbEwtoFA69O5HtV6ipRiq491cn6toUtzZRuI/paNPKccZZ0CpABYi6RF0VlRspQrjKu hLYW2n615rAwMv6DElpF0b7Hf9xKRFfqMlNZdWeWimHlqDUjnhNrEw7orSMjfg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpf6073P6zyZX; Fri, 25 Jul 2025 20:06:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PK6mFZ094108; Fri, 25 Jul 2025 20:06:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PK6m1a094104; Fri, 25 Jul 2025 20:06:48 GMT (envelope-from git) Date: Fri, 25 Jul 2025 20:06:48 GMT Message-Id: <202507252006.56PK6m1a094104@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: f2c2ed7df313 - main - sendfile: don't hack sb_lowat for sockets that manage the watermark List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f2c2ed7df313f641451ca5a468f658fd350aae52 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=f2c2ed7df313f641451ca5a468f658fd350aae52 commit f2c2ed7df313f641451ca5a468f658fd350aae52 Author: Gleb Smirnoff AuthorDate: 2025-07-25 20:05:56 +0000 Commit: Gleb Smirnoff CommitDate: 2025-07-25 20:05:56 +0000 sendfile: don't hack sb_lowat for sockets that manage the watermark In the sendfile(2) we carry an old hack (originating from d99b0dd2c5297) to help dumb benchmarks and applications to achieve higher performance. We would modify low watermark on the socket send buffer to avoid socket being reported as writable too early, which would result in lots of small writes. Skip that hack for applications that do setsockopt(SO_SNDLOWAT) or that register the socket in kevent(2) with NOTE_LOWAT feature. First, we don't want the hack to rewrite the watermark value explicitly specified by the user. Second, in certain cases that can lead to real performance regressions. A kevent(2) with NOTE_LOWAT would report socket as writable, but then sendfile(2) would write 0 bytes and return EAGAIN. The change also disables the hack for unix(4) sockets, leaving only TCP. Reviewed by: rrs Differential Revision: https://reviews.freebsd.org/D50581 --- sys/kern/kern_sendfile.c | 11 +++++++---- sys/kern/uipc_sockbuf.c | 1 + sys/kern/uipc_socket.c | 6 +++++- sys/netinet/tcp_usrreq.c | 2 +- sys/sys/sockbuf.h | 2 +- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index 35b258e68701..8438298afc0e 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -698,10 +698,13 @@ sendfile_wait_generic(struct socket *so, off_t need, int *space) */ error = 0; SOCK_SENDBUF_LOCK(so); - if (so->so_snd.sb_lowat < so->so_snd.sb_hiwat / 2) - so->so_snd.sb_lowat = so->so_snd.sb_hiwat / 2; - if (so->so_snd.sb_lowat < PAGE_SIZE && so->so_snd.sb_hiwat >= PAGE_SIZE) - so->so_snd.sb_lowat = PAGE_SIZE; + if (so->so_snd.sb_flags & SB_AUTOLOWAT) { + if (so->so_snd.sb_lowat < so->so_snd.sb_hiwat / 2) + so->so_snd.sb_lowat = so->so_snd.sb_hiwat / 2; + if (so->so_snd.sb_lowat < PAGE_SIZE && + so->so_snd.sb_hiwat >= PAGE_SIZE) + so->so_snd.sb_lowat = PAGE_SIZE; + } retry_space: if (so->so_snd.sb_state & SBS_CANTSENDMORE) { error = EPIPE; diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index ec00878cd9a5..ffaa9b800592 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -779,6 +779,7 @@ sbsetopt(struct socket *so, struct sockopt *sopt) * high-water. */ *lowat = (cc > *hiwat) ? *hiwat : cc; + *flags &= ~SB_AUTOLOWAT; break; } diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 6c9eb7139cd1..4e8c179acee9 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -1211,7 +1211,8 @@ solisten_clone(struct socket *head) so->so_rcv.sb_timeo = head->sol_sbrcv_timeo; so->so_snd.sb_timeo = head->sol_sbsnd_timeo; so->so_rcv.sb_flags = head->sol_sbrcv_flags & SB_AUTOSIZE; - so->so_snd.sb_flags = head->sol_sbsnd_flags & SB_AUTOSIZE; + so->so_snd.sb_flags = head->sol_sbsnd_flags & + (SB_AUTOSIZE | SB_AUTOLOWAT); if ((so->so_proto->pr_flags & PR_SOCKBUF) == 0) { so->so_snd.sb_mtx = &so->so_snd_mtx; so->so_rcv.sb_mtx = &so->so_rcv_mtx; @@ -4514,6 +4515,9 @@ sokqfilter_generic(struct socket *so, struct knote *kn) SOCK_BUF_LOCK(so, which); knlist_add(knl, kn, 1); sb->sb_flags |= SB_KNOTE; + if ((kn->kn_sfflags & NOTE_LOWAT) && + (sb->sb_flags & SB_AUTOLOWAT)) + sb->sb_flags &= ~SB_AUTOLOWAT; SOCK_BUF_UNLOCK(so, which); } SOCK_UNLOCK(so); diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index 70e4c04b79e5..98c934955121 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -164,7 +164,7 @@ tcp_usr_attach(struct socket *so, int proto, struct thread *td) goto out; so->so_rcv.sb_flags |= SB_AUTOSIZE; - so->so_snd.sb_flags |= SB_AUTOSIZE; + so->so_snd.sb_flags |= (SB_AUTOLOWAT | SB_AUTOSIZE); error = in_pcballoc(so, &V_tcbinfo); if (error) goto out; diff --git a/sys/sys/sockbuf.h b/sys/sys/sockbuf.h index 7f6234ade6f4..2fed44bc9825 100644 --- a/sys/sys/sockbuf.h +++ b/sys/sys/sockbuf.h @@ -40,7 +40,7 @@ #define SB_SEL 0x08 /* someone is selecting */ #define SB_ASYNC 0x10 /* ASYNC I/O, need signals */ #define SB_UPCALL 0x20 /* someone wants an upcall */ -/* was SB_NOINTR 0x40 */ +#define SB_AUTOLOWAT 0x40 /* sendfile(2) may autotune sb_lowat */ #define SB_AIO 0x80 /* AIO operations queued */ #define SB_KNOTE 0x100 /* kernel note attached */ #define SB_NOCOALESCE 0x200 /* don't coalesce new data into existing mbufs */ From nobody Fri Jul 25 20:06:50 2025 X-Original-To: dev-commits-src-all@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 4bpf624PPxz62HRL; Fri, 25 Jul 2025 20:06: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpf621Y1dz47SB; Fri, 25 Jul 2025 20:06:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753474010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+8RNKTh/XV1QGAygBkqmwUeM+jReO6K9Zp0KdCXrA9U=; b=TFy5l/HSRQVzForoE2HZXucJRWj7osy9ocNxnOI5emgobcsS7s/uZl7VPCM3ruYh/nWnfG 3WC4SdjnIrFcl8WN6xiaoSGp2CDRHwkfI4FxDN9HNaVeZ66r2I+DvBwabbgjeJoTXb+uym Lk9vD1VAGeNBP5KTaw8MCVTJQjUr7WvV/vX0mYSU0E2BMbKRL7bgiJA1BjKjtqEiViVKH6 5H6kfe/DDcCisEGbVd2W0NwqN5Ckiu22Lg2twZR1azJYlDMEVmvqryj8g4/5IJMQ6fSDbU LcHHThT42d5Oc25yHSJkAdKf+3fX6m5esDe9ZuubAfMDl6fMeITJTSV5mVDR4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753474010; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+8RNKTh/XV1QGAygBkqmwUeM+jReO6K9Zp0KdCXrA9U=; b=GncHx8PjDTUGxpVWt0EFfAe61Jo/IkZXMpqXAE+LTq0TYDwpkdPZg2VDgjSwcNo4SO5e+V jsim7g0aT1+DcjW4XddAb9Oblud9KRmFZVd4CE49dhbzx+bWC4ZNYGpOHHmfqKuSgk9tdw JdVCyU2QIdRI0NymjN35En7wQe4AKoQeeAgNI+f+Za1skVRmxS4dK2M0OmQkIZ2WIs8cam +x8DEINLrh4KALyOpcZFvrBZIx+nj9sCVSAqd7uoWBkvqiClXxjq7h+fO4kCDqCTxVr0l1 LVdJDde67P9FZTAgmN6c0Ju1A//o3jubBlI6uPimjiGUT1gNKbyOe26qJ0fWEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753474010; a=rsa-sha256; cv=none; b=oQcc0T6LI0lhsDytglEzTrZuFLrbc0Nsg54Cg0RGbuRzh/CkVEmLrs8kcPPewDz17gnBE1 MlZiHcJazQz87HieuXhv4BDBvGBaZkI0fGaEH0Nyj2j2B0v7QZnPIlkyn/SR6km61aF0XM jVavYYVGFEdlbtuQq9KEKlQULcZPUNZndAgOlqqJ1kMW74UwBpGqFsd7CLAHIxc96XXHpF OPuAYS5+V1lt99glcYWZ0+1BzzBU7gcwkE3ROzAC9K/Ld+H66moWL78LSO6qT1e5ylB1Uu S2yf8VuW9TkI0/NM+ChoyQ6K005ByffJS3Li8BQZWEz9UMbgkk3Ad9Zz2j9e8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpf620x7YzylM; Fri, 25 Jul 2025 20:06:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PK6o6g094145; Fri, 25 Jul 2025 20:06:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PK6opi094142; Fri, 25 Jul 2025 20:06:50 GMT (envelope-from git) Date: Fri, 25 Jul 2025 20:06:50 GMT Message-Id: <202507252006.56PK6opi094142@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: b93e930ca233 - main - sendfile: retire M_BLOCKED List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b93e930ca233e3b3cb5e017bc9b09086f8909800 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=b93e930ca233e3b3cb5e017bc9b09086f8909800 commit b93e930ca233e3b3cb5e017bc9b09086f8909800 Author: Gleb Smirnoff AuthorDate: 2025-07-25 20:06:28 +0000 Commit: Gleb Smirnoff CommitDate: 2025-07-25 20:06:28 +0000 sendfile: retire M_BLOCKED Follow unix(4) commit 51ac5ee0d57f and retire M_BLOCKED for TCP sockets as well. The M_BLOCKED flag was introduced back 2016 together with non- blocking sendfile(2). It marked mbufs in a sending socket buffer that could be ready to sent, but are sitting behind an M_NOTREADY mbuf(s), that blocks them. You may consider this flag as an INVARIANT flag that helped to ensure socket buffer consistency. Or maybe the socket code was so convoluted back then, that it was unclear if sbfree() may be called on an mbuf that is in the middle of the buffer, and I decided to introduce the flag to protect against that. With today state of socket buffer code it became clear that the latter cannot happen. And this commit adds an assertion proving that. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D50728 --- sys/dev/cxgbe/tom/t4_cpl_io.c | 6 +++--- sys/dev/cxgbe/tom/t4_tls.c | 4 ++-- sys/kern/uipc_ktls.c | 2 +- sys/kern/uipc_sockbuf.c | 42 +++++++++++++++--------------------------- sys/kern/uipc_socket.c | 2 +- sys/sys/sockbuf.h | 2 -- 6 files changed, 22 insertions(+), 36 deletions(-) diff --git a/sys/dev/cxgbe/tom/t4_cpl_io.c b/sys/dev/cxgbe/tom/t4_cpl_io.c index 8547f21586e1..7a6b1cbdd736 100644 --- a/sys/dev/cxgbe/tom/t4_cpl_io.c +++ b/sys/dev/cxgbe/tom/t4_cpl_io.c @@ -703,7 +703,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep, int drop) for (m = sndptr; m != NULL; m = m->m_next) { int n; - if ((m->m_flags & M_NOTAVAIL) != 0) + if ((m->m_flags & M_NOTREADY) != 0) break; if (m->m_flags & M_EXTPG) { #ifdef KERN_TLS @@ -787,7 +787,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep, int drop) /* nothing to send */ if (plen == 0) { - KASSERT(m == NULL || (m->m_flags & M_NOTAVAIL) != 0, + KASSERT(m == NULL || (m->m_flags & M_NOTREADY) != 0, ("%s: nothing to send, but m != NULL is ready", __func__)); break; @@ -880,7 +880,7 @@ t4_push_frames(struct adapter *sc, struct toepcb *toep, int drop) toep->txsd_avail--; t4_l2t_send(sc, wr, toep->l2te); - } while (m != NULL && (m->m_flags & M_NOTAVAIL) == 0); + } while (m != NULL && (m->m_flags & M_NOTREADY) == 0); /* Send a FIN if requested, but only if there's no more data to send */ if (m == NULL && toep->flags & TPF_SEND_FIN) diff --git a/sys/dev/cxgbe/tom/t4_tls.c b/sys/dev/cxgbe/tom/t4_tls.c index c6377980fca9..27c16b9988ae 100644 --- a/sys/dev/cxgbe/tom/t4_tls.c +++ b/sys/dev/cxgbe/tom/t4_tls.c @@ -563,7 +563,7 @@ t4_push_ktls(struct adapter *sc, struct toepcb *toep, int drop) * If there is no ready data to send, wait until more * data arrives. */ - if (m == NULL || (m->m_flags & M_NOTAVAIL) != 0) { + if (m == NULL || (m->m_flags & M_NOTREADY) != 0) { if (sowwakeup) sowwakeup_locked(so); else @@ -614,7 +614,7 @@ t4_push_ktls(struct adapter *sc, struct toepcb *toep, int drop) /* Shove if there is no additional data pending. */ shove = ((m->m_next == NULL || - (m->m_next->m_flags & M_NOTAVAIL) != 0)) && + (m->m_next->m_flags & M_NOTREADY) != 0)) && (tp->t_flags & TF_MORETOCOME) == 0; if (sb->sb_flags & SB_AUTOSIZE && diff --git a/sys/kern/uipc_ktls.c b/sys/kern/uipc_ktls.c index ce09042abdac..66ce1b5a081d 100644 --- a/sys/kern/uipc_ktls.c +++ b/sys/kern/uipc_ktls.c @@ -1207,7 +1207,7 @@ sb_mark_notready(struct sockbuf *sb) for (; m != NULL; m = m->m_next) { KASSERT(m->m_nextpkt == NULL, ("%s: m_nextpkt != NULL", __func__)); - KASSERT((m->m_flags & M_NOTAVAIL) == 0, ("%s: mbuf not avail", + KASSERT((m->m_flags & M_NOTREADY) == 0, ("%s: mbuf not ready", __func__)); KASSERT(sb->sb_acc >= m->m_len, ("%s: sb_acc < m->m_len", __func__)); diff --git a/sys/kern/uipc_sockbuf.c b/sys/kern/uipc_sockbuf.c index ffaa9b800592..745702bd4a4f 100644 --- a/sys/kern/uipc_sockbuf.c +++ b/sys/kern/uipc_sockbuf.c @@ -195,14 +195,14 @@ int sbready(struct sockbuf *sb, struct mbuf *m0, int count) { struct mbuf *m; - u_int blocker; + bool blocker; SOCKBUF_LOCK_ASSERT(sb); KASSERT(sb->sb_fnrdy != NULL, ("%s: sb %p NULL fnrdy", __func__, sb)); KASSERT(count > 0, ("%s: invalid count %d", __func__, count)); m = m0; - blocker = (sb->sb_fnrdy == m) ? M_BLOCKED : 0; + blocker = (sb->sb_fnrdy == m); while (count > 0) { KASSERT(m->m_flags & M_NOTREADY, @@ -217,8 +217,7 @@ sbready(struct sockbuf *sb, struct mbuf *m0, int count) m->m_epg_nrdy = 0; } else count--; - - m->m_flags &= ~(M_NOTREADY | blocker); + m->m_flags &= ~M_NOTREADY; if (blocker) sb->sb_acc += m->m_len; m = m->m_next; @@ -240,12 +239,8 @@ sbready(struct sockbuf *sb, struct mbuf *m0, int count) } /* This one was blocking all the queue. */ - for (; m && (m->m_flags & M_NOTREADY) == 0; m = m->m_next) { - KASSERT(m->m_flags & M_BLOCKED, - ("%s: m %p !M_BLOCKED", __func__, m)); - m->m_flags &= ~M_BLOCKED; + for (; m && (m->m_flags & M_NOTREADY) == 0; m = m->m_next) sb->sb_acc += m->m_len; - } sb->sb_fnrdy = m; sbready_compress(sb, m0, m); @@ -269,8 +264,7 @@ sballoc(struct sockbuf *sb, struct mbuf *m) sb->sb_fnrdy = m; else sb->sb_acc += m->m_len; - } else - m->m_flags |= M_BLOCKED; + } if (m->m_type != MT_DATA && m->m_type != MT_OOBDATA) sb->sb_ctl += m->m_len; @@ -287,29 +281,29 @@ sballoc(struct sockbuf *sb, struct mbuf *m) void sbfree(struct sockbuf *sb, struct mbuf *m) { + struct mbuf *n; #if 0 /* XXX: not yet: soclose() call path comes here w/o lock. */ SOCKBUF_LOCK_ASSERT(sb); #endif - sb->sb_ccc -= m->m_len; - if (!(m->m_flags & M_NOTAVAIL)) - sb->sb_acc -= m->m_len; - if (m == sb->sb_fnrdy) { - struct mbuf *n; - KASSERT(m->m_flags & M_NOTREADY, ("%s: m %p !M_NOTREADY", __func__, m)); n = m->m_next; while (n != NULL && !(n->m_flags & M_NOTREADY)) { - n->m_flags &= ~M_BLOCKED; sb->sb_acc += n->m_len; n = n->m_next; } sb->sb_fnrdy = n; + } else { + /* Assert that mbuf is not behind sb_fnrdy. */ + for (n = sb->sb_fnrdy; n != NULL; n = n->m_next) + KASSERT(n != m, ("%s: sb %p freeing %p behind sb_fnrdy", + __func__, sb, m)); + sb->sb_acc -= m->m_len; } if (m->m_type != MT_DATA && m->m_type != MT_OOBDATA) @@ -1129,13 +1123,7 @@ sbcheck(struct sockbuf *sb, const char *file, int line) } fnrdy = m; } - if (fnrdy) { - if (!(m->m_flags & M_NOTAVAIL)) { - printf("sb %p: fnrdy %p, m %p is avail\n", - sb, sb->sb_fnrdy, m); - goto fail; - } - } else + if (fnrdy == NULL) acc += m->m_len; ccc += m->m_len; mbcnt += MSIZE; @@ -1602,8 +1590,8 @@ sbcut_internal(struct sockbuf *sb, int len) next = m->m_nextpkt; } if (m->m_len > len) { - KASSERT(!(m->m_flags & M_NOTAVAIL), - ("%s: m %p M_NOTAVAIL", __func__, m)); + KASSERT(!(m->m_flags & M_NOTREADY), + ("%s: m %p M_NOTREADY", __func__, m)); m->m_len -= len; m->m_data += len; sb->sb_ccc -= len; diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 4e8c179acee9..17b456deb71f 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -3342,7 +3342,7 @@ deliver: for (m = sb->sb_mb; m != NULL && m->m_len <= len; m = m->m_next) { - KASSERT(!(m->m_flags & M_NOTAVAIL), + KASSERT(!(m->m_flags & M_NOTREADY), ("%s: m %p not available", __func__, m)); len -= m->m_len; uio->uio_resid -= m->m_len; diff --git a/sys/sys/sockbuf.h b/sys/sys/sockbuf.h index 2fed44bc9825..b4593f38f592 100644 --- a/sys/sys/sockbuf.h +++ b/sys/sys/sockbuf.h @@ -210,8 +210,6 @@ typedef enum { SO_RCV, SO_SND } sb_which; * Socket buffer private mbuf(9) flags. */ #define M_NOTREADY M_PROTO1 /* m_data not populated yet */ -#define M_BLOCKED M_PROTO2 /* M_NOTREADY in front of m */ -#define M_NOTAVAIL (M_NOTREADY | M_BLOCKED) void sbappend(struct sockbuf *sb, struct mbuf *m, int flags); void sbappend_locked(struct sockbuf *sb, struct mbuf *m, int flags); From nobody Fri Jul 25 20:12:01 2025 X-Original-To: dev-commits-src-all@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 4bpfD21QG9z62Hf7; Fri, 25 Jul 2025 20:12: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpfD202J7z3G8D; Fri, 25 Jul 2025 20:12:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753474322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C6B5kf+jfF3DY0zxF1AGThlwq7g8Utbiy5BQRPBohzM=; b=X/qhIdxP05hIeLDu0xib7VDxdLo1UH0WVpJkdBixw+It0rWWKE/UAyBK9LW/IiPEjKlqOU 9j90AX4qNL+GIns54LouuWVNSZH21EF+Hj3QutN/sl4Q1VMFdbPt9onnWBuiyzy5yJFHHp QlbGiyaT3bVKtt873r0i+/JfJDIoFT/NhloYVaFruF1fWqkU56uowzlbeGfssj9Kd//rgm 7yIKlrz7558jytHsDxxegzZ1gmdfyIMR4xGW8qVh667MUO02Jr9csmA3b+AP9mjaG1R/m+ vQbjr1OsscDaHYekyAGYC9FvL0WWDCrMXfHX/VQ767X1A/2jOIlvvVCF4Busww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753474322; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=C6B5kf+jfF3DY0zxF1AGThlwq7g8Utbiy5BQRPBohzM=; b=TT46TK5X3VpU0s0x9wZoY77Q0T0XqJKPfBVhMJvw5BTpkq6uPtJ0iTQfcuMlYXTN4Vy8NF 87en5BjeYU9j8TBj3wqRt+uWgxFkORKHeCwNGBTMFJphTuSDC654A5b1e9tcXeYpen6rQK Xr8eHcPYe0CK4KuNSaV2RCHLubAfGLY7xdoWgk5AUgF3fMhVgUqPn/5BL4oxrt+s/DQsAS egxctFyEpE8rIY4BOWRjM4FE6kfzOts4XXVJCfEPdMpTbUez4qDFkTYMiMIaEn6gwkNFBG 838GTeSkjTG1/lZ2x4QtvIj1+Ac5+ZQhpLfzNN6j2iLBXMgfk45qO56BFBgG0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753474322; a=rsa-sha256; cv=none; b=GJP/WQultuQGOOTIRw72neWdUEBEGdjOz3oXHdZh3VT04PbN+zC4s1s7UsZuvY97XvFLJ2 17zi1ox690a3ZSmmH/iN70hGYlanMJqlLuxv6j/wXmgu/1U3jg8pnWhlhtscR0vuKQrN00 RonZ/o8jaGSUyh8s2Fv1UUXTLRO8bcHeK8PLEfAx8wz0ad5U2lM6UNxvWfeLuT7plqdtee EjXEI5COkI2TTc7VL1Nl/33weOMp5rTXMfMyXpwcHGAqZG6a43m9Z5gn21dXp7pFSG+d+8 x4SrI8xNtRJXISDTes3mmp7RnM93YVrdENwrp8glkXaUUwPWcOs1YCkRdlming== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpfD16XsQzymw; Fri, 25 Jul 2025 20:12:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PKC1cZ010117; Fri, 25 Jul 2025 20:12:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PKC1ia010114; Fri, 25 Jul 2025 20:12:01 GMT (envelope-from git) Date: Fri, 25 Jul 2025 20:12:01 GMT Message-Id: <202507252012.56PKC1ia010114@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: c8312acdc25b - main - bsnmpd: deprecate legacy UDP transport trans_udp.c List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c8312acdc25bfa9c67e153f7227bb5e7537cf01f Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=c8312acdc25bfa9c67e153f7227bb5e7537cf01f commit c8312acdc25bfa9c67e153f7227bb5e7537cf01f Author: Gleb Smirnoff AuthorDate: 2025-07-25 20:09:29 +0000 Commit: Gleb Smirnoff CommitDate: 2025-07-25 20:09:29 +0000 bsnmpd: deprecate legacy UDP transport trans_udp.c Since 04d1781439aa we have a more generic trans_inet.c, that supports IPv6 and can be extended further. The default config file we ship was switched to the new transport since 12.1-RELEASE, so for most people deprecation would go unnoticed. Others [who never run etcupdate(8)] would need to merge a couple lines into their snmpd.config. This will be reflected in RELNOTES file. Reviewed by: harti Differential Revision: https://reviews.freebsd.org/D51359 --- contrib/bsnmp/snmpd/main.c | 3 - contrib/bsnmp/snmpd/trans_udp.c | 438 ---------------------------------------- contrib/bsnmp/snmpd/tree.def | 9 - usr.sbin/bsnmpd/bsnmpd/Makefile | 2 +- 4 files changed, 1 insertion(+), 451 deletions(-) diff --git a/contrib/bsnmp/snmpd/main.c b/contrib/bsnmp/snmpd/main.c index c77572934d24..f71e3f9515f2 100644 --- a/contrib/bsnmp/snmpd/main.c +++ b/contrib/bsnmp/snmpd/main.c @@ -237,7 +237,6 @@ static struct request_info req; #endif /* transports */ -extern const struct transport_def udp_trans; extern const struct transport_def lsock_trans; struct transport_list transport_list = TAILQ_HEAD_INITIALIZER(transport_list); @@ -1661,8 +1660,6 @@ main(int argc, char *argv[]) syslog(LOG_ERR, "atexit failed: %m"); exit(1); } - if (udp_trans.start() != SNMP_ERR_NOERROR) - syslog(LOG_WARNING, "cannot start UDP transport"); if (lsock_trans.start() != SNMP_ERR_NOERROR) syslog(LOG_WARNING, "cannot start LSOCK transport"); if (inet_trans.start() != SNMP_ERR_NOERROR) diff --git a/contrib/bsnmp/snmpd/trans_udp.c b/contrib/bsnmp/snmpd/trans_udp.c deleted file mode 100644 index 55824b82f6c8..000000000000 --- a/contrib/bsnmp/snmpd/trans_udp.c +++ /dev/null @@ -1,438 +0,0 @@ -/* - * Copyright (c) 2003 - * Fraunhofer Institute for Open Communication Systems (FhG Fokus). - * All rights reserved. - * - * Author: Harti Brandt - * - * 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 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 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. - * - * $Begemot: bsnmp/snmpd/trans_udp.c,v 1.5 2005/10/04 08:46:56 brandt_h Exp $ - * - * UDP transport - */ -#include -#include -#include - -#include -#include -#include -#include -#include -#include - -#include -#include - -#include "snmpmod.h" -#include "snmpd.h" -#include "trans_udp.h" -#include "tree.h" -#include "oid.h" - -static int udp_start(void); -static int udp_stop(int); -static void udp_close_port(struct tport *); -static int udp_init_port(struct tport *); -static ssize_t udp_send(struct tport *, const u_char *, size_t, - const struct sockaddr *, size_t); -static ssize_t udp_recv(struct tport *, struct port_input *); - -/* exported */ -const struct transport_def udp_trans = { - .name = "udp", - .id = OIDX_begemotSnmpdTransUdp, - .start = udp_start, - .stop = udp_stop, - .close_port = udp_close_port, - .init_port = udp_init_port, - .send = udp_send, - .recv = udp_recv, -}; -static struct transport *my_trans; - -static int -udp_start(void) -{ - return (trans_register(&udp_trans, &my_trans)); -} - -static int -udp_stop(int force __unused) -{ - if (my_trans != NULL) - if (trans_unregister(my_trans) != 0) - return (SNMP_ERR_GENERR); - return (SNMP_ERR_NOERROR); -} - -/* - * A UDP port is ready - */ -static void -udp_input(int fd __unused, void *udata) -{ - struct udp_port *p = udata; - - p->input.peerlen = sizeof(p->ret); - snmpd_input(&p->input, &p->tport); -} - -/* - * Create a UDP socket and bind it to the given port - */ -static int -udp_init_port(struct tport *tp) -{ - struct udp_port *p = (struct udp_port *)tp; - struct sockaddr_in addr; - u_int32_t ip; - const int on = 1; - - if ((p->input.fd = socket(PF_INET, SOCK_DGRAM, 0)) < 0) { - syslog(LOG_ERR, "creating UDP socket: %m"); - return (SNMP_ERR_RES_UNAVAIL); - } - ip = (p->addr[0] << 24) | (p->addr[1] << 16) | (p->addr[2] << 8) | - p->addr[3]; - memset(&addr, 0, sizeof(addr)); - addr.sin_addr.s_addr = htonl(ip); - addr.sin_port = htons(p->port); - addr.sin_family = AF_INET; - addr.sin_len = sizeof(addr); - if (addr.sin_addr.s_addr == INADDR_ANY) { - if (setsockopt(p->input.fd, IPPROTO_IP, IP_RECVDSTADDR, &on, - sizeof(on)) == -1) { - syslog(LOG_ERR, "setsockopt(IP_RECVDSTADDR): %m"); - close(p->input.fd); - p->input.fd = -1; - return (SNMP_ERR_GENERR); - } - p->recvdstaddr = true; - } - if (bind(p->input.fd, (struct sockaddr *)&addr, sizeof(addr))) { - if (errno == EADDRNOTAVAIL) { - close(p->input.fd); - p->input.fd = -1; - return (SNMP_ERR_INCONS_NAME); - } - syslog(LOG_ERR, "bind: %s:%u %m", inet_ntoa(addr.sin_addr), - p->port); - close(p->input.fd); - p->input.fd = -1; - return (SNMP_ERR_GENERR); - } - if ((p->input.id = fd_select(p->input.fd, udp_input, - p, NULL)) == NULL) { - close(p->input.fd); - p->input.fd = -1; - return (SNMP_ERR_GENERR); - } - return (SNMP_ERR_NOERROR); -} - -/* - * Create a new SNMP Port object and start it, if we are not - * in initialization mode. The arguments are in host byte order. - */ -static int -udp_open_port(u_int8_t *addr, u_int32_t udp_port, struct udp_port **pp) -{ - struct udp_port *port; - int err; - - if (udp_port > 0xffff) - return (SNMP_ERR_NO_CREATION); - if ((port = malloc(sizeof(*port))) == NULL) - return (SNMP_ERR_GENERR); - memset(port, 0, sizeof(*port)); - - /* initialize common part */ - port->tport.index.len = 5; - port->tport.index.subs[0] = addr[0]; - port->tport.index.subs[1] = addr[1]; - port->tport.index.subs[2] = addr[2]; - port->tport.index.subs[3] = addr[3]; - port->tport.index.subs[4] = udp_port; - - port->addr[0] = addr[0]; - port->addr[1] = addr[1]; - port->addr[2] = addr[2]; - port->addr[3] = addr[3]; - port->port = udp_port; - - port->input.fd = -1; - port->input.id = NULL; - port->input.stream = 0; - port->input.cred = 0; - port->input.peer = (struct sockaddr *)&port->ret; - port->input.peerlen = sizeof(port->ret); - - trans_insert_port(my_trans, &port->tport); - - if (community != COMM_INITIALIZE && - (err = udp_init_port(&port->tport)) != SNMP_ERR_NOERROR) { - udp_close_port(&port->tport); - return (err); - } - *pp = port; - return (SNMP_ERR_NOERROR); -} - -/* - * Close an SNMP port - */ -static void -udp_close_port(struct tport *tp) -{ - struct udp_port *port = (struct udp_port *)tp; - - snmpd_input_close(&port->input); - trans_remove_port(tp); - free(port); -} - -/* - * Send something - */ -static ssize_t -udp_send(struct tport *tp, const u_char *buf, size_t len, - const struct sockaddr *addr, size_t addrlen) -{ - struct udp_port *p = (struct udp_port *)tp; - struct cmsghdr *cmsg; - struct msghdr msg; - char cbuf[CMSG_SPACE(sizeof(struct in_addr))]; - struct iovec iov; - - iov.iov_base = __DECONST(void*, buf); - iov.iov_len = len; - - msg.msg_flags = 0; - msg.msg_iov = &iov; - msg.msg_iovlen = 1; - msg.msg_name = __DECONST(void *, addr); - msg.msg_namelen = addrlen; - - if (p->recvdstaddr) { - msg.msg_control = cbuf; - msg.msg_controllen = sizeof(cbuf); - - cmsg = CMSG_FIRSTHDR(&msg); - cmsg->cmsg_level = IPPROTO_IP; - cmsg->cmsg_type = IP_SENDSRCADDR; - cmsg->cmsg_len = CMSG_LEN(sizeof(struct in_addr)); - memcpy(CMSG_DATA(cmsg), &p->dstaddr, sizeof(struct in_addr)); - } else { - msg.msg_control = NULL; - msg.msg_controllen = 0; - } - - return (sendmsg(p->input.fd, &msg, 0)); -} - -static void -check_priv_dgram(struct port_input *pi, struct sockcred *cred) -{ - - /* process explicitly sends credentials */ - if (cred) - pi->priv = (cred->sc_euid == 0); - else - pi->priv = 0; -} - -/* - * Input from a datagram socket. - * Each receive should return one datagram. - */ -static ssize_t -udp_recv(struct tport *tp, struct port_input *pi) -{ - u_char embuf[1000]; - char cbuf[CMSG_SPACE(SOCKCREDSIZE(CMGROUP_MAX)) + - CMSG_SPACE(sizeof(struct in_addr))]; - struct udp_port *p = (struct udp_port *)tp; - struct msghdr msg; - struct iovec iov[1]; - ssize_t len; - struct cmsghdr *cmsg; - struct sockcred *cred = NULL; - - if (pi->buf == NULL) { - /* no buffer yet - allocate one */ - if ((pi->buf = buf_alloc(0)) == NULL) { - /* ups - could not get buffer. Read away input - * and drop it */ - (void)recvfrom(pi->fd, embuf, sizeof(embuf), - 0, NULL, NULL); - /* return error */ - return (-1); - } - pi->buflen = buf_size(0); - } - - /* try to get a message */ - msg.msg_name = pi->peer; - msg.msg_namelen = pi->peerlen; - msg.msg_iov = iov; - msg.msg_iovlen = 1; - memset(cbuf, 0, sizeof(cbuf)); - msg.msg_control = cbuf; - msg.msg_controllen = sizeof(cbuf); - msg.msg_flags = 0; - - iov[0].iov_base = pi->buf; - iov[0].iov_len = pi->buflen; - - len = recvmsg(pi->fd, &msg, 0); - - if (len == -1 || len == 0) - /* receive error */ - return (-1); - - if (msg.msg_flags & MSG_TRUNC) { - /* truncated - drop */ - snmpd_stats.silentDrops++; - snmpd_stats.inTooLong++; - return (-1); - } - - pi->length = (size_t)len; - - for (cmsg = CMSG_FIRSTHDR(&msg); cmsg != NULL; - cmsg = CMSG_NXTHDR(&msg, cmsg)) { - if (cmsg->cmsg_level == IPPROTO_IP && - cmsg->cmsg_type == IP_RECVDSTADDR) - memcpy(&p->dstaddr, CMSG_DATA(cmsg), - sizeof(struct in_addr)); - if (cmsg->cmsg_level == SOL_SOCKET && - cmsg->cmsg_type == SCM_CREDS) - cred = (struct sockcred *)(void *)CMSG_DATA(cmsg); - } - - if (pi->cred) - check_priv_dgram(pi, cred); - - return (0); -} - -/* - * Port table - */ -int -op_snmp_port(struct snmp_context *ctx, struct snmp_value *value, - u_int sub, u_int iidx, enum snmp_op op) -{ - asn_subid_t which = value->var.subs[sub-1]; - struct udp_port *p; - u_int8_t addr[4]; - u_int32_t port; - - switch (op) { - - case SNMP_OP_GETNEXT: - if ((p = (struct udp_port *)trans_next_port(my_trans, - &value->var, sub)) == NULL) - return (SNMP_ERR_NOSUCHNAME); - index_append(&value->var, sub, &p->tport.index); - break; - - case SNMP_OP_GET: - if ((p = (struct udp_port *)trans_find_port(my_trans, - &value->var, sub)) == NULL) - return (SNMP_ERR_NOSUCHNAME); - break; - - case SNMP_OP_SET: - p = (struct udp_port *)trans_find_port(my_trans, - &value->var, sub); - ctx->scratch->int1 = (p != NULL); - - if (which != LEAF_begemotSnmpdPortStatus) - abort(); - if (!TRUTH_OK(value->v.integer)) - return (SNMP_ERR_WRONG_VALUE); - - ctx->scratch->int2 = TRUTH_GET(value->v.integer); - - if (ctx->scratch->int2) { - /* open an SNMP port */ - if (p != NULL) - /* already open - do nothing */ - return (SNMP_ERR_NOERROR); - - if (index_decode(&value->var, sub, iidx, addr, &port)) - return (SNMP_ERR_NO_CREATION); - return (udp_open_port(addr, port, &p)); - - } else { - /* close SNMP port - do in commit */ - } - return (SNMP_ERR_NOERROR); - - case SNMP_OP_ROLLBACK: - p = (struct udp_port *)trans_find_port(my_trans, - &value->var, sub); - if (ctx->scratch->int1 == 0) { - /* did not exist */ - if (ctx->scratch->int2 == 1) { - /* created */ - if (p != NULL) - udp_close_port(&p->tport); - } - } - return (SNMP_ERR_NOERROR); - - case SNMP_OP_COMMIT: - p = (struct udp_port *)trans_find_port(my_trans, - &value->var, sub); - if (ctx->scratch->int1 == 1) { - /* did exist */ - if (ctx->scratch->int2 == 0) { - /* delete */ - if (p != NULL) - udp_close_port(&p->tport); - } - } - return (SNMP_ERR_NOERROR); - - default: - abort(); - } - - /* - * Come here to fetch the value - */ - switch (which) { - - case LEAF_begemotSnmpdPortStatus: - value->v.integer = 1; - break; - - default: - abort(); - } - - return (SNMP_ERR_NOERROR); -} diff --git a/contrib/bsnmp/snmpd/tree.def b/contrib/bsnmp/snmpd/tree.def index 61b581120528..074a6e7e5390 100644 --- a/contrib/bsnmp/snmpd/tree.def +++ b/contrib/bsnmp/snmpd/tree.def @@ -117,15 +117,6 @@ typedef BegemotSnmpdTransportProto ENUM ( ) ) # -# Port table -# - (4 begemotSnmpdPortTable - (1 begemotSnmpdPortEntry : IPADDRESS INTEGER op_snmp_port - (1 begemotSnmpdPortAddress IPADDRESS) - (2 begemotSnmpdPortPort UNSIGNED32) - (3 begemotSnmpdPortStatus INTEGER GET SET) - )) -# # Community table # (5 begemotSnmpdCommunityTable diff --git a/usr.sbin/bsnmpd/bsnmpd/Makefile b/usr.sbin/bsnmpd/bsnmpd/Makefile index e7c7a87eec7c..601fc31ec475 100644 --- a/usr.sbin/bsnmpd/bsnmpd/Makefile +++ b/usr.sbin/bsnmpd/bsnmpd/Makefile @@ -9,7 +9,7 @@ CONTRIB=${SRCTOP}/contrib/bsnmp CONFS= snmpd.config CONFSMODE= 600 PROG= bsnmpd -SRCS= main.c action.c config.c export.c trap.c trans_udp.c trans_lsock.c +SRCS= main.c action.c config.c export.c trap.c trans_lsock.c SRCS+= trans_inet.c oid.h tree.c tree.h XSYM= snmpMIB begemotSnmpdModuleTable begemotSnmpd begemotTrapSinkTable \ sysUpTime snmpTrapOID coldStart authenticationFailure \ From nobody Fri Jul 25 20:12:02 2025 X-Original-To: dev-commits-src-all@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 4bpfD346v1z62HZR; Fri, 25 Jul 2025 20:12: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpfD30mfCz3GPg; Fri, 25 Jul 2025 20:12:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753474323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=56pJikeju2ode/Sz35bbLmhoz2EDpwQI7HM9DQ7YxB4=; b=XP5IWOZd+8hAYJQxF3rZxCKtUdeH9D+6lGs2MRkujMHCdF9MoZtLROKIE4TKfcAO2j/S3Q Uf7quGPApTl1YNs+lXRfHsvlu/hRWfHXCnU6fyfcKXO6VKX9MmFwxOc4z5SfaiaKfjbpAc V5qFtT3GAHMifnMBrlQVnc3Kw4JPvDh8PNO8Qy89gz6pGhi5JRagQ0KqWEkl+BlNeB9o4T I5yU5lMo1NSG57/3LqkfHQK4jROXmCYXRz28uFX1bI7BhcWIn9eF66UoknHNrziVYz22lV eyPleTO28ZNjJL+PtRyzdUP0aioi+fEYw/OMjagI5fxlNmOr5XXvjs9UfnuaGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753474323; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=56pJikeju2ode/Sz35bbLmhoz2EDpwQI7HM9DQ7YxB4=; b=iLMlJ7M2k/e7R5X8sKRAZ8hmuv0V9578IquKS9Y+JW6vIGsiBkHm7NpUIz31FR26+U9eDU fgFaaoye/pASdUACyq82CfL4w3dZS7/GVHDyCALLIW6xZEIuyw9tZY3Uq3oYq1thN7nuh7 +QF8OqD8YVRj9vuujAmN8xBf/1WlWhl/RjI+oWM8cyRfopNZJDHM3LyhAPawYvLKy346q/ ylGt+kSTPOY1q3bzDjny/mZIIDgpEq1txFrEvksjodLbupNnvnzMr4UpFpBa1whxMCa6yA dyLwN1AN4CB0xENiHPY1RXcCeg+AY+fOMTTGTupdAb/vXLcOa/WNNxt3sN8Bjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753474323; a=rsa-sha256; cv=none; b=F+Di8WO/kyctFKmPpka3QWAzv9jsdlE56hwcqAr2pMT/OuP6gpC0SgOxUz/8iferam2YJw nOAUBbYbDQE6/dmpv8jRbYO/OHW1WX9Aswb+LNkGxdTHpaCCkchYeWtGBPvzJiqsatBUkI PSoAQwbJd190BngZQCsSR9Q3S9j6Zm3VLRIZDW+tXbgI6FQnoaSCdRss+aA2M7O2NaI2Wx 0O88OwqxkVZNMau361Nu+lh0rfefMdTNJhuzHB6zMl27I8IyRojfv3daIv3UhQcoh1R7O3 Ec0rc1W3/Wck4Ly/kC2+eIKNRbUpct77au5enjra3OB6W+dcb7MH3OpvbtUlSQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpfD30N4qzymx; Fri, 25 Jul 2025 20:12:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PKC2NV010152; Fri, 25 Jul 2025 20:12:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PKC2Dr010149; Fri, 25 Jul 2025 20:12:02 GMT (envelope-from git) Date: Fri, 25 Jul 2025 20:12:02 GMT Message-Id: <202507252012.56PKC2Dr010149@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 183d09305677 - main - bsnmpd: merge send and send2 methods for transports List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 183d09305677b7c669eba8ed6fe8d0b879684913 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=183d09305677b7c669eba8ed6fe8d0b879684913 commit 183d09305677b7c669eba8ed6fe8d0b879684913 Author: Gleb Smirnoff AuthorDate: 2025-07-25 20:09:36 +0000 Commit: Gleb Smirnoff CommitDate: 2025-07-25 20:09:36 +0000 bsnmpd: merge send and send2 methods for transports Shall be no functional change for normal SNMP sends, e.g. replies and traps. NB: for the inet_send() called from snmp_send_port() we now actually use supplied address, but we could do a better job at finding matching socket. However, it could be that snmp_send_port() is not used by any external module, and in that case it is easier to just deprecate it as poorly fitting design of the server. This will be checked with exp-run. Reviewed by: harti Differential Revision: https://reviews.freebsd.org/D51360 --- contrib/bsnmp/snmpd/main.c | 17 +++++++---------- contrib/bsnmp/snmpd/snmpd.h | 6 +----- contrib/bsnmp/snmpd/trans_inet.c | 9 ++++----- contrib/bsnmp/snmpd/trans_lsock.c | 13 +++++++------ 4 files changed, 19 insertions(+), 26 deletions(-) diff --git a/contrib/bsnmp/snmpd/main.c b/contrib/bsnmp/snmpd/main.c index f71e3f9515f2..933ab7aa655a 100644 --- a/contrib/bsnmp/snmpd/main.c +++ b/contrib/bsnmp/snmpd/main.c @@ -1186,12 +1186,7 @@ snmpd_input(struct port_input *pi, struct tport *tport) sndbuf, &sndlen, "SNMP", ierr, vi, NULL); if (ferr == SNMPD_INPUT_OK) { - if (tport->transport->vtab->send != NULL) - slen = tport->transport->vtab->send(tport, sndbuf, - sndlen, pi->peer, pi->peerlen); - else - slen = tport->transport->vtab->send2(tport, sndbuf, - sndlen, pi); + slen = tport->transport->vtab->send(tport, sndbuf, sndlen, pi); if (slen == -1) syslog(LOG_ERR, "send*: %m"); else if ((size_t)slen != sndlen) @@ -1214,6 +1209,11 @@ void snmp_send_port(void *targ, const struct asn_oid *port, struct snmp_pdu *pdu, const struct sockaddr *addr, socklen_t addrlen) { + struct port_input pi = { + .fd = -1, + .peer = __DECONST(struct sockaddr *, addr), + .peerlen = addrlen, + }; struct transport *trans = targ; struct tport *tp; u_char *sndbuf; @@ -1231,10 +1231,7 @@ snmp_send_port(void *targ, const struct asn_oid *port, struct snmp_pdu *pdu, snmp_output(pdu, sndbuf, &sndlen, "SNMP PROXY"); - if (trans->vtab->send != NULL) - len = trans->vtab->send(tp, sndbuf, sndlen, addr, addrlen); - else - len = trans->vtab->send2(tp, sndbuf, sndlen, NULL); + len = trans->vtab->send(tp, sndbuf, sndlen, &pi); if (len == -1) syslog(LOG_ERR, "sendto: %m"); diff --git a/contrib/bsnmp/snmpd/snmpd.h b/contrib/bsnmp/snmpd/snmpd.h index 394a4f4736d6..b0e60040d025 100644 --- a/contrib/bsnmp/snmpd/snmpd.h +++ b/contrib/bsnmp/snmpd/snmpd.h @@ -192,12 +192,8 @@ struct transport_def { int (*init_port)(struct tport *); ssize_t (*send)(struct tport *, const u_char *, size_t, - const struct sockaddr *, size_t); - ssize_t (*recv)(struct tport *, struct port_input *); - - /** send via a multi-socket port */ - ssize_t (*send2)(struct tport *, const u_char *, size_t, struct port_input *); + ssize_t (*recv)(struct tport *, struct port_input *); }; struct transport { struct asn_oid index; /* transport table index */ diff --git a/contrib/bsnmp/snmpd/trans_inet.c b/contrib/bsnmp/snmpd/trans_inet.c index eb41f9b678e9..d06b85ac11f6 100644 --- a/contrib/bsnmp/snmpd/trans_inet.c +++ b/contrib/bsnmp/snmpd/trans_inet.c @@ -375,17 +375,16 @@ inet_recv(struct tport *tp, struct port_input *pi) * \param tp port * \param buf data to send * \param len number of bytes to send - * \param addr destination address - * \param addlen destination address length + * \param pi destination * * \return number of bytes sent */ static ssize_t -inet_send2(struct tport *tp, const u_char *buf, size_t len, +inet_send(struct tport *tp, const u_char *buf, size_t len, struct port_input *pi) { struct inet_port *p = __containerof(tp, struct inet_port, tport); - struct port_sock *s = (pi == NULL) ? TAILQ_FIRST(&p->socks) : + struct port_sock *s = (pi->fd == -1) ? TAILQ_FIRST(&p->socks) : __containerof(pi, struct port_sock, input); struct iovec iov; @@ -421,7 +420,7 @@ const struct transport_def inet_trans = { .close_port = inet_destroy_port, .init_port = inet_activate, .recv = inet_recv, - .send2 = inet_send2, + .send = inet_send, }; struct inet_port_params { diff --git a/contrib/bsnmp/snmpd/trans_lsock.c b/contrib/bsnmp/snmpd/trans_lsock.c index 68aea2c77187..4a850d434d7c 100644 --- a/contrib/bsnmp/snmpd/trans_lsock.c +++ b/contrib/bsnmp/snmpd/trans_lsock.c @@ -58,7 +58,7 @@ static int lsock_stop(int); static void lsock_close_port(struct tport *); static int lsock_init_port(struct tport *); static ssize_t lsock_send(struct tport *, const u_char *, size_t, - const struct sockaddr *, size_t); + struct port_input *); static ssize_t lsock_recv(struct tport *, struct port_input *); /* exported */ @@ -396,9 +396,9 @@ lsock_init_port(struct tport *tp) */ static ssize_t lsock_send(struct tport *tp, const u_char *buf, size_t len, - const struct sockaddr *addr, size_t addrlen) + struct port_input *pi) { - struct lsock_port *p = (struct lsock_port *)tp; + struct lsock_port *p = __containerof(tp, struct lsock_port, tport); struct lsock_peer *peer; if (p->type == LOCP_DGRAM_PRIV || p->type == LOCP_DGRAM_UNPRIV) { @@ -407,8 +407,8 @@ lsock_send(struct tport *tp, const u_char *buf, size_t len, } else { /* search for the peer */ LIST_FOREACH(peer, &p->peers, link) - if (peer->input.peerlen == addrlen && - memcmp(peer->input.peer, addr, addrlen) == 0) + if (peer->input.peerlen == pi->peerlen && + memcmp(peer->input.peer, pi->peer, pi->peerlen) == 0) break; if (peer == NULL) { errno = ENOTCONN; @@ -416,7 +416,8 @@ lsock_send(struct tport *tp, const u_char *buf, size_t len, } } - return (sendto(peer->input.fd, buf, len, MSG_NOSIGNAL, addr, addrlen)); + return (sendto(peer->input.fd, buf, len, MSG_NOSIGNAL, pi->peer, + pi->peerlen)); } static void From nobody Fri Jul 25 20:12:05 2025 X-Original-To: dev-commits-src-all@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 4bpfD570pDz62Hp0; Fri, 25 Jul 2025 20:12: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpfD52jM2z3G5C; Fri, 25 Jul 2025 20:12:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753474325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+PuFDs6N4zih+XgSTLjMayHapKM+6rvRCAlA/yFXZ4I=; b=Lo67LHCcy2RzJsrbOFY8FbEJKLFBfYqxMH2lrfrcCS7K6xvAeJTnO2R+HWDPJp0ErQBF0e pPx1svi4Oib12cVSNgBIdjMfHUou6niZz5aPjBGRshCu/gVm/HLSzKYULZNTxHsx2vu0M4 qiaVhVGpqV3w1ndz9JMPquXadxnv2884lzqhF3HqHxfqGQBCRguryu7iuuuNmPdwVaIhH2 Yb/Fo+ejMB+Cuuydd6AW30LJV9eaHgPk/2grxqTkM/bKpV8KRP1MDUO9xdoMaG3FemJcwN 8K5DxCWhzqZl2eE2x4PKGJY2LuXtEF7k8Vb59APlprMnSL9paV0kJcFkKDK8nA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753474325; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+PuFDs6N4zih+XgSTLjMayHapKM+6rvRCAlA/yFXZ4I=; b=AWWwmIKsqYjVy+grtSapsNaCNzjHpfuL7ANGwE5HFCVNTRYSWH7QI7v7q1MFL4g8lpS/RD JisxuFkrVdVa3SeTboXkGaPgEFNz4n/XrA/KlKYsmBQNT+2NBc5rc16SfEqfXs26+DGLLa +qD/0dLiMMti1k8BbDNMIbcIZfQxEbq1YYpN3L6ue//fTNIQRSHs0cw4oWOGYhP5cZRQ+V qudfM93QaqtFG2XnEWLvkRHEbhTnf0LPLMJgvsXC/SizWC1qSV/dSVdhzKqzPlIAlcLVE2 StjARpF0Yc6oBql2UZaPpUPNhncLRvzBVKKhQZ1+U2qxCTjsuTmsoWOg7DJiVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753474325; a=rsa-sha256; cv=none; b=J1Y3eGBXq4OtYKepH2wp0gF09JZ2He2r7cW5aGE+1C+gAiFVSHrWVpcWnki9bUqlNPTRlc vnODd2FZQI/RBO9dZ20WXLZrPHfiTlMH6Qf5q1+6sTuOMn3sdAQ9AFdW9dNDMj2IS2nBs3 opEPbuaW07KqSCejIvb91uteCBbgHd0KMc2JxHlftCso6IHRvJUegxbIZEwHJXfNOAtL0J 9Mn4WBg/LZddsHNNLTXBw+5E/9MQ3XpFOT+LutFcC6cG0rlsSVUPHF3MpbLclEvc26tm7H R+4/kauJwfFzKiLr7l9f6fqzvtOjw+8qT7hnBiLWo3vy4KRw4L7QFu6N+Iz3tQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpfD525gszyKC; Fri, 25 Jul 2025 20:12:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PKC5JV010229; Fri, 25 Jul 2025 20:12:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PKC5dk010226; Fri, 25 Jul 2025 20:12:05 GMT (envelope-from git) Date: Fri, 25 Jul 2025 20:12:05 GMT Message-Id: <202507252012.56PKC5dk010226@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 777123969db5 - main - libbsnmp: make binding of client UNIX socket optional and configurable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 777123969db5ee8eceee28d7df72b7fd7352cb85 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=777123969db5ee8eceee28d7df72b7fd7352cb85 commit 777123969db5ee8eceee28d7df72b7fd7352cb85 Author: Gleb Smirnoff AuthorDate: 2025-07-25 20:10:17 +0000 Commit: Gleb Smirnoff CommitDate: 2025-07-25 20:10:17 +0000 libbsnmp: make binding of client UNIX socket optional and configurable Before this change snmp_open(3) would always bind(2) client socket to a random "/tmp/snmpXXXXXXXXXXXXXX" name. However, this binding is not required for SOCK_STREAM transport. Also, any attempt to specify a different name would fail, as open_client_local() would blindly rewrite the name to the default. Make this binding optional. If application had initialized snmp_client.local_path, then try to bind to the specified pathname, otherwise perform the random name binding only if we are in the SOCK_DGRAM mode. While here change snmp_client.local_path size to SUNPATHLEN, so that any legitimate local socket name can be used. This requires library version bump. Note that this code has been broken by 81e0e7b9e36d for three years, thus it is known not to be widely used. Reviewed by: harti Differential Revision: https://reviews.freebsd.org/D51070 --- ObsoleteFiles.inc | 3 + contrib/bsnmp/lib/bsnmpclient.3 | 19 ++++-- contrib/bsnmp/lib/snmpclient.c | 74 ++++++++++++++---------- contrib/bsnmp/lib/snmpclient.h | 5 +- lib/libbsnmp/libbsnmp/Makefile | 2 +- tools/build/mk/OptionalObsoleteFiles.inc | 2 +- usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c | 5 +- 7 files changed, 69 insertions(+), 41 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 808e7be828c5..385e891049e7 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20250725: libbsnmp bumped to version 7 +OLD_LIBS+=usr/lib/libbsnmp.so.6 + # 20250725: Files which were briefly installed by WITH_MITKRB5 in 15.0. OLD_FILES+=usr/include/kadm5/admin_internal.h OLD_FILES+=usr/include/kadm5/admin_xdr.h diff --git a/contrib/bsnmp/lib/bsnmpclient.3 b/contrib/bsnmp/lib/bsnmpclient.3 index 0a2286eb14c4..1a5aa2e5e3a6 100644 --- a/contrib/bsnmp/lib/bsnmpclient.3 +++ b/contrib/bsnmp/lib/bsnmpclient.3 @@ -31,7 +31,7 @@ .\" .\" $Begemot: bsnmp/lib/bsnmpclient.3,v 1.12 2005/10/04 08:46:50 brandt_h Exp $ .\" -.Dd March 31, 2020 +.Dd June 24, 2025 .Dt BSNMPCLIENT 3 .Os .Sh NAME @@ -155,7 +155,7 @@ struct snmp_client { snmp_timeout_start_f timeout_start; snmp_timeout_stop_f timeout_stop; - char local_path[sizeof(SNMP_LOCAL_PATH)]; + char local_path[SUNPATHLEN]; }; .Ed .Pp @@ -285,8 +285,19 @@ The function will be called with the return value of the corresponding .Fn timeout_start function. .It Va local_path -If in local socket mode, the name of the clients socket. -Not needed by the application. +In local socket mode, optional path name the client socket shall be bound to +before connecting to the server. +For +.Dv SOCK_STREAM +local socket the named path is optional, and library will skip +.Xr bind 2 +if path is not provided. +For +.Dv SOCK_DGRAM +local socket the named path is required, thus library will create a random +one in +.Pa /tmp +if path is not provided. .El .Pp In the current implementation there is a global variable diff --git a/contrib/bsnmp/lib/snmpclient.c b/contrib/bsnmp/lib/snmpclient.c index d5d4af998a0c..5fa7d4f5be2a 100644 --- a/contrib/bsnmp/lib/snmpclient.c +++ b/contrib/bsnmp/lib/snmpclient.c @@ -977,7 +977,10 @@ remove_local(void) static int open_client_local(const char *path) { - struct sockaddr_un sa; + struct sockaddr_un sa = { + .sun_family = AF_LOCAL, + .sun_len = sizeof(sa), + }; char *ptr; int stype; @@ -1003,43 +1006,56 @@ open_client_local(const char *path) return (-1); } - snprintf(snmp_client.local_path, sizeof(snmp_client.local_path), - "%s", SNMP_LOCAL_PATH); - - if (mktemp(snmp_client.local_path) == NULL) { - seterr(&snmp_client, "%s", strerror(errno)); - (void)close(snmp_client.fd); - snmp_client.fd = -1; - return (-1); + /* + * A datagram socket requires a name to receive replies back. Would + * be cool to have an extension to unix(4) sockets similar to ip(4) + * IP_RECVDSTADDR/IP_SENDSRCADDR, so that a one-to-many datagram + * UNIX socket can send replies to its anonymous peers. + */ + if (snmp_client.trans == SNMP_TRANS_LOC_DGRAM && + snmp_client.local_path[0] == '\0') { + (void)strlcpy(snmp_client.local_path, "/tmp/snmpXXXXXXXXXXXXXX", + sizeof(snmp_client.local_path)); + if (mktemp(snmp_client.local_path) == NULL) { + seterr(&snmp_client, "mktemp(3): %s", strerror(errno)); + goto fail; + } } - sa.sun_family = AF_LOCAL; - sa.sun_len = sizeof(sa); - strcpy(sa.sun_path, snmp_client.local_path); - - if (bind(snmp_client.fd, (struct sockaddr *)&sa, sizeof(sa)) == -1) { - seterr(&snmp_client, "%s", strerror(errno)); - (void)close(snmp_client.fd); - snmp_client.fd = -1; - (void)remove(snmp_client.local_path); - return (-1); + if (snmp_client.local_path[0] != '\0') { + if (strlcpy(sa.sun_path, snmp_client.local_path, + sizeof(sa.sun_path)) >= + sizeof(sa.sun_path)) { + seterr(&snmp_client, "%s", + "Local socket pathname too long"); + goto fail; + } + if (bind(snmp_client.fd, (struct sockaddr *)&sa, sizeof(sa)) == + -1) { + seterr(&snmp_client, "%s", strerror(errno)); + goto fail; + } + atexit(remove_local); } - atexit(remove_local); - sa.sun_family = AF_LOCAL; - sa.sun_len = offsetof(struct sockaddr_un, sun_path) + - strlen(snmp_client.chost); - strncpy(sa.sun_path, snmp_client.chost, sizeof(sa.sun_path) - 1); - sa.sun_path[sizeof(sa.sun_path) - 1] = '\0'; + if (strlcpy(sa.sun_path, snmp_client.chost, sizeof(sa.sun_path)) >= + sizeof(sa.sun_path)) { + seterr(&snmp_client, "%s", "Server socket pathname too long"); + goto fail; + } if (connect(snmp_client.fd, (struct sockaddr *)&sa, sa.sun_len) == -1) { seterr(&snmp_client, "%s", strerror(errno)); - (void)close(snmp_client.fd); - snmp_client.fd = -1; - (void)remove(snmp_client.local_path); - return (-1); + goto fail; } return (0); + +fail: + (void)close(snmp_client.fd); + snmp_client.fd = -1; + if (snmp_client.local_path[0] != '\0') + (void)remove(snmp_client.local_path); + return (-1); } /* diff --git a/contrib/bsnmp/lib/snmpclient.h b/contrib/bsnmp/lib/snmpclient.h index 662dc7c4a204..a8a79ff824bc 100644 --- a/contrib/bsnmp/lib/snmpclient.h +++ b/contrib/bsnmp/lib/snmpclient.h @@ -35,6 +35,7 @@ #include #include #include +#include #include #include @@ -42,8 +43,6 @@ #define SNMP_STRERROR_LEN 200 #define SNMP_DEFAULT_LOCAL "/var/run/snmpd.sock" -#define SNMP_LOCAL_PATH "/tmp/snmpXXXXXXXXXXXXXX" - /* * transport methods */ @@ -111,7 +110,7 @@ struct snmp_client { snmp_timeout_start_f timeout_start; snmp_timeout_stop_f timeout_stop; - char local_path[sizeof(SNMP_LOCAL_PATH)]; + char local_path[SUNPATHLEN]; }; /* the global context */ diff --git a/lib/libbsnmp/libbsnmp/Makefile b/lib/libbsnmp/libbsnmp/Makefile index 6bdb4003fdf4..2e2770b56c4a 100644 --- a/lib/libbsnmp/libbsnmp/Makefile +++ b/lib/libbsnmp/libbsnmp/Makefile @@ -7,7 +7,7 @@ CONTRIB= ${SRCTOP}/contrib/bsnmp/lib .PATH: ${CONTRIB} LIB= bsnmp -SHLIB_MAJOR= 6 +SHLIB_MAJOR= 7 LD_FATAL_WARNINGS= no CFLAGS+= -I${CONTRIB} -DHAVE_ERR_H -DHAVE_GETADDRINFO -DHAVE_STRLCPY diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 4c127b392138..3183c5f0b45c 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -461,7 +461,7 @@ OLD_FILES+=usr/include/bsnmp/snmpclient.h OLD_FILES+=usr/include/bsnmp/snmpmod.h OLD_FILES+=usr/lib/libbsnmp.a OLD_FILES+=usr/lib/libbsnmp.so -OLD_LIBS+=usr/lib/libbsnmp.so.6 +OLD_LIBS+=usr/lib/libbsnmp.so.7 OLD_FILES+=usr/lib/libbsnmp_p.a OLD_FILES+=usr/lib/libbsnmptools.a OLD_FILES+=usr/lib/libbsnmptools.so diff --git a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c index b4613763fff5..d8fbb55290a8 100644 --- a/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c +++ b/usr.sbin/bsnmpd/tools/libbsnmptools/bsnmptools.c @@ -881,12 +881,11 @@ parse_local_path(char *opt_arg) { assert(opt_arg != NULL); - if (sizeof(opt_arg) > sizeof(SNMP_LOCAL_PATH)) { + if (strlcpy(snmp_client.local_path, opt_arg, + sizeof(snmp_client.local_path)) >= sizeof(snmp_client.local_path)) { warnx("Filename too long - %s", opt_arg); return (-1); } - - strlcpy(snmp_client.local_path, opt_arg, sizeof(SNMP_LOCAL_PATH)); return (2); } From nobody Fri Jul 25 20:12:04 2025 X-Original-To: dev-commits-src-all@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 4bpfD45JVtz62HfB; Fri, 25 Jul 2025 20:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpfD41Q1rz3GNK; Fri, 25 Jul 2025 20:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753474324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fkl4+L8+s3gpMmOIYhWBBByCi359GA3k6QOnWZ9V01U=; b=dFUPlfB78uXEgVeiAFuvqCd6TOn1vGaLRomcTFs28XFJ9VuNuCQ/BBayeQg8BtqF4LyupV JI1X7W0/sRJbWgyR65rUvIRwgGxxWBuBuXpSHUTzOqfTbQWm1BN2B/WhkI24aypZ1ROvWx 8Tqa50cozm4TnIyPvYEkuIavmjY3uZToSvHk/XBwK9Gva6h9bnxu/Tsx7Fqaq16+K+wGcw 8ZH0Wpcua8OTi8MWH8dpAcOUwWY2Q3S9v0fniOZaXSrIo19oEr8JmCax4PNKC26MdKQRRS 6k+KVxVgIWQ5yEr94KwD95+fxef2zFJaGpz0u3MfNnoF/icRqMfEQGWCho3kkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753474324; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fkl4+L8+s3gpMmOIYhWBBByCi359GA3k6QOnWZ9V01U=; b=XaRNyDaHR1R64jXEfbcFUi8dowbAOv79GZoW+zPDNwaE/SWg8OPv/IAqrmFpV8WcMrQfEN XDVaXCpUwxVmrbbkHRy4u9HCQ66qhrlnYxV8D72n0CnVtO0xa8zEP0qnX1dJ5buGczKnYD iPDYlZqjORFdP0NDewhP0U3k15gFxXGV+4KYGIwp7zBHAF1+Obz5RD2rTdpLRx9EowE4fQ yCJ8dY3DHV2cIuMRxQxu7yQmquAmpKFKIZyOpnSDWlsEXIFNlpQlWi0NYtaY+q/9U5kHXL zMTkCPgZEjBhvgkAQfTC8qntxLuLzPL8loXiioOaYz1p97sDLUwHrLi/yRdM4w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753474324; a=rsa-sha256; cv=none; b=OP+A35iM3GE/JLFFQ4ZdMEeXn7E+fJXAylI2HCnp36JDp51SJ7VDcpRQzp4INBgWxOmd72 pZIZaQ4btT47ANhqxN9QUkIimzxlB1T6C0qYisqM/4S9kCM2Zul9IJQsUp4xFxSGkfb7Pc urXIpPXinZXUM6x0WysEEqkxo4AksPa8lu6a2OAP9OBfOotpBN1c+8847roIsZcoICelVJ TbLU6IDjDGhjxFoZPVke9f7/fNyiFwMFVM9zKPHvXSPCld1T+wWDBy1udALryLdy8NWJdX 9hN74xUzztLRgxTA4G10qXlmtBd4tyf4jZBajutcyc9ZQwjJLPcnCWW1pK58MA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpfD40wsdzymy; Fri, 25 Jul 2025 20:12:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PKC4vX010196; Fri, 25 Jul 2025 20:12:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PKC40I010191; Fri, 25 Jul 2025 20:12:04 GMT (envelope-from git) Date: Fri, 25 Jul 2025 20:12:04 GMT Message-Id: <202507252012.56PKC40I010191@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: b9fa99600a78 - main - bsnmpd: fix unix/stream socket operation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9fa99600a78c66dce9040595f04bfe2ba25652c Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=b9fa99600a78c66dce9040595f04bfe2ba25652c commit b9fa99600a78c66dce9040595f04bfe2ba25652c Author: Gleb Smirnoff AuthorDate: 2025-07-25 20:09:59 +0000 Commit: Gleb Smirnoff CommitDate: 2025-07-25 20:09:59 +0000 bsnmpd: fix unix/stream socket operation With new send method, that gives us directly port_input pointer, we know the correct file descriptor right away, no matter are we in SOCK_DGRAM or in SOCK_STREAM mode. Previously, the function tried to search for the socket, and that was totally wrong. With several simultaneous connections this end up with sending a reply to incorrect socket. Reviewed by: harti Differential Revision: https://reviews.freebsd.org/D51361 --- contrib/bsnmp/snmpd/trans_lsock.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/contrib/bsnmp/snmpd/trans_lsock.c b/contrib/bsnmp/snmpd/trans_lsock.c index 4a850d434d7c..01beb01927ec 100644 --- a/contrib/bsnmp/snmpd/trans_lsock.c +++ b/contrib/bsnmp/snmpd/trans_lsock.c @@ -395,29 +395,10 @@ lsock_init_port(struct tport *tp) * Send something */ static ssize_t -lsock_send(struct tport *tp, const u_char *buf, size_t len, +lsock_send(struct tport *tp __unused, const u_char *buf, size_t len, struct port_input *pi) { - struct lsock_port *p = __containerof(tp, struct lsock_port, tport); - struct lsock_peer *peer; - - if (p->type == LOCP_DGRAM_PRIV || p->type == LOCP_DGRAM_UNPRIV) { - peer = LIST_FIRST(&p->peers); - - } else { - /* search for the peer */ - LIST_FOREACH(peer, &p->peers, link) - if (peer->input.peerlen == pi->peerlen && - memcmp(peer->input.peer, pi->peer, pi->peerlen) == 0) - break; - if (peer == NULL) { - errno = ENOTCONN; - return (-1); - } - } - - return (sendto(peer->input.fd, buf, len, MSG_NOSIGNAL, pi->peer, - pi->peerlen)); + return (sendto(pi->fd, buf, len, MSG_NOSIGNAL, pi->peer, pi->peerlen)); } static void From nobody Fri Jul 25 20:12:06 2025 X-Original-To: dev-commits-src-all@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 4bpfD66l1zz62Hp1; Fri, 25 Jul 2025 20:12: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpfD63DW3z3G5P; Fri, 25 Jul 2025 20:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753474326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AMIDZoqjAAHe5rKip/YJrwx+lNDl+lUkFAqlYQCvJZo=; b=XUrvZQ1P5s5TZ1yrVPX+2NMI3cmSAnpvDEGKiwWxgHCJZ6x+fLSL1jvURukfj591hfoRJp GGswJF9khihpn9yzlKOBCItvwbKCyfV2MkZ0NVOeVoVXF2N4R+VT/KgdAg7plLNv2UWCxJ 8M8iZVR+YAMkbqQO20vYd8baWKfFiwkzjWuyMwZJg7rKF50gMZQ90KxX/rsi7vOfipx1uK cQDEar0ZO++CfTuxIPjmJNl5aHGrtGLCFAxQBStCgxLRr6VEl06dFUpEjKB5g8bN3bqUTY tdOLMyQ2QO3vtKtbUME6nKDwVJlKveBQgZA7/aW8BV2hz2XKyICwBaAdIIXZZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753474326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AMIDZoqjAAHe5rKip/YJrwx+lNDl+lUkFAqlYQCvJZo=; b=PUh4Egex22K8vBGGvHdKVdrsLTCLmPJhCuhrxzAEtTlm8KJXIZ53Xf8KRwJ+DpSLkLCYlj h5aI5eBRKeUeVPvDXuoptxgYXQWxUV3jcsPzZPcHshscpMlo29irq2SgXpdiHLbWYj3wXe QJKKtq+RqjRWa3UP81YBqlr1tM6J0712Bj+ENN9vGjnd2MnviwkSWURnE8d69WjjlCP/9C tq/HfFrfbyIOw6QsAHgdFMMHMW4toGZ8e3w5/i2SYhwrPwCCkcpixzmyKKmGhyDzSDLjPn lW+9Ftl6XB8EhRlT60MszTX8piYVYl83jzF78tmsvv7KBPszy8M6T/sBjKDTWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753474326; a=rsa-sha256; cv=none; b=WOeUQghleK8ExerCn6ioSHLYtf55fTnAVl+Wl/SA/vsbFz3Rz33OlD5yWefW/md7fh3GS4 pBuFkSP1YM+rsWG3bi77rXq4Fo9nV67iXaGEx/Y8ySGOHprL2dR32rWMiKDTJ0rJ9kN+PH xI/5qXhFvNQV6uxNnJEu2Gq+tdeiSukShYp0MXN0vFraJnD+tAbr7TrJtqCuPGPfBnj0Xa S2pQ6fa8JIw0+2RterD6lGsI+sYtQ7MZBM1u6zJonYQFCxADcXupjo3z/uguRUPbyS1nj3 n7V3Xsn/PaT42iRScZij/EWKhKjN2RGoyGRdY05heJjk3C1/vV9Kz07d3h4j0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpfD62mWmzyn1; Fri, 25 Jul 2025 20:12:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PKC6Bc010262; Fri, 25 Jul 2025 20:12:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PKC65n010259; Fri, 25 Jul 2025 20:12:06 GMT (envelope-from git) Date: Fri, 25 Jul 2025 20:12:06 GMT Message-Id: <202507252012.56PKC65n010259@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 9ba51cce8bbd - main - libbsnmp: make snmp_parse_server() more robust when lacking info List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9ba51cce8bbd8bb2bb761b1698a875c81dee317f Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=9ba51cce8bbd8bb2bb761b1698a875c81dee317f commit 9ba51cce8bbd8bb2bb761b1698a875c81dee317f Author: Gleb Smirnoff AuthorDate: 2025-07-25 20:10:53 +0000 Commit: Gleb Smirnoff CommitDate: 2025-07-25 20:10:53 +0000 libbsnmp: make snmp_parse_server() more robust when lacking info Per documentation snmp_parse_server() has all 4 components optional. We want inputs like "udp::", "udp6::", "stream::" work with local default sockets and even degenerate case of "" shall end with defaults instead of a failure. While here make the parser more robust. Make all parser helpers to behave the same way: on successful return they are responsible to update both start & end of matched substring and return next characater to parse. This eliminates special handling of IPv6 and port parser that used to need to skip a character, and thus eliminates unchecked step forward in snmp_parse_server() itself. Additionally: - use strchr(3) instead of own cycle - INET_ADDRSTRLEN includes space for NUL character - INET6_ADDRSTRLEN includes both the scope and NUL character - prefer sizeof() comparison instead of preprocessor define repetitive use Reviewed by: harti Differential Revision: https://reviews.freebsd.org/D51072 --- contrib/bsnmp/lib/snmpclient.c | 183 +++++++++++++++++++---------------------- 1 file changed, 85 insertions(+), 98 deletions(-) diff --git a/contrib/bsnmp/lib/snmpclient.c b/contrib/bsnmp/lib/snmpclient.c index 5fa7d4f5be2a..44dfbd5a06b1 100644 --- a/contrib/bsnmp/lib/snmpclient.c +++ b/contrib/bsnmp/lib/snmpclient.c @@ -1942,70 +1942,64 @@ get_transp(struct snmp_client *sc, const char **strp) * community strings are legal. * * \param sc client struct to set errors - * \param strp possible start of community; updated to the point to - * the next character to parse + * \param comm possible start of community; updated to start & end * - * \return end of community; equals *strp if there is none; NULL if there - * was an error + * \return the next character to parse; NULL if there was an error */ static inline const char * -get_comm(struct snmp_client *sc, const char **strp) +get_comm(struct snmp_client *sc, const char *comm[2]) { - const char *p = strrchr(*strp, '@'); + const char *p = strrchr(comm[0], '@'); if (p == NULL) /* no community string */ - return (*strp); + return (comm[1] = comm[0]); - if (p - *strp > SNMP_COMMUNITY_MAXLEN) { + if (p - comm[0] > SNMP_COMMUNITY_MAXLEN) { seterr(sc, "community string too long '%.*s'", - p - *strp, *strp); + p - comm[0], comm[0]); return (NULL); } - *strp = p + 1; - return (p); + return ((comm[1] = p) + 1); } /** * Try to get an IPv6 address. This starts with an [ and should end with an ] * and everything between should be not longer than INET6_ADDRSTRLEN and - * parseable by inet_pton(). + * parseable by getaddrinfo(). * * \param sc client struct to set errors - * \param strp possible start of IPv6 address (the '['); updated to point to - * the next character to parse (the one after the closing ']') + * \param ipv6 possible start of IPv6 address (the '['); updated to actual + * start (one after '[') and actual end (the '[' itself) * - * \return end of address (equals *strp + 1 if there is none) or NULL - * on errors + * \return the next character to parse (the one after the closing ']') + * or NULL on errors */ static inline const char * -get_ipv6(struct snmp_client *sc, const char **strp) +get_ipv6(struct snmp_client *sc, const char *ipv6[2]) { - char str[INET6_ADDRSTRLEN + IF_NAMESIZE]; + char str[INET6_ADDRSTRLEN]; + const char *p; struct addrinfo hints, *res; int error; - if (**strp != '[') - return (*strp + 1); + if (ipv6[0][0] != '[') + return (ipv6[1] = ipv6[0]); - const char *p = *strp + 1; - while (*p != ']' ) { - if (*p == '\0') { - seterr(sc, "unterminated IPv6 address '%.*s'", - p - *strp, *strp); - return (NULL); - } - p++; + if ((p = strchr(++(ipv6[0]), ']')) == NULL) { + seterr(sc, "unterminated IPv6 address '%s'", ipv6[0]); + return (NULL); } - if (p - *strp > INET6_ADDRSTRLEN + IF_NAMESIZE) { - seterr(sc, "IPv6 address too long '%.*s'", p - *strp, *strp); + if ((size_t)(p - ipv6[0]) >= sizeof(str)) { + seterr(sc, "IPv6 address too long '%.*s'", + p - ipv6[0], ipv6[0]); return (NULL); } - strncpy(str, *strp + 1, p - (*strp + 1)); - str[p - (*strp + 1)] = '\0'; + strncpy(str, ipv6[0], p - ipv6[0]); + str[p - ipv6[0]] = '\0'; memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_CANONNAME | AI_NUMERICHOST; @@ -2018,8 +2012,7 @@ get_ipv6(struct snmp_client *sc, const char **strp) return (NULL); } freeaddrinfo(res); - *strp = p + 1; - return (p); + return ((ipv6[1] = p) + 1); } /** @@ -2028,30 +2021,29 @@ get_ipv6(struct snmp_client *sc, const char **strp) * inet_aton(). * * \param sc client struct to set errors - * \param strp possible start of IPv4 address; updated to point to the - * next character to parse + * \param ipv4 possible start of IPv4 address; updated to start & end * - * \return end of address (equals *strp if there is none) or NULL - * on errors + * \return the next character to parse; or NULL on errors */ static inline const char * -get_ipv4(struct snmp_client *sc, const char **strp) +get_ipv4(struct snmp_client *sc, const char *ipv4[2]) { - const char *p = *strp; + char str[INET_ADDRSTRLEN]; + const char *p = ipv4[0]; while (isascii(*p) && (isdigit(*p) || *p == '.')) p++; - if (p - *strp > INET_ADDRSTRLEN) { - seterr(sc, "IPv4 address too long '%.*s'", p - *strp, *strp); + if ((size_t)(p - ipv4[0]) >= sizeof(str)) { + seterr(sc, "IPv4 address too long '%.*s'", + p - ipv4[0], ipv4[0]); return (NULL); } - if (*strp == p) - return *strp; + if (p == ipv4[0]) + return (ipv4[1] = ipv4[0]); - char str[INET_ADDRSTRLEN + 1]; - strncpy(str, *strp, p - *strp); - str[p - *strp] = '\0'; + strncpy(str, ipv4[0], p - ipv4[0]); + str[p - ipv4[0]] = '\0'; struct in_addr addr; if (inet_aton(str, &addr) != 1) { @@ -2059,8 +2051,7 @@ get_ipv4(struct snmp_client *sc, const char **strp) return (NULL); } - *strp = p; - return (p); + return (ipv4[1] = p); } /** @@ -2068,24 +2059,19 @@ get_ipv4(struct snmp_client *sc, const char **strp) * the last colon (if any). There is no length restriction. * * \param sc client struct to set errors - * \param strp possible start of hostname; updated to point to the next - * character to parse (the trailing NUL character or the last - * colon) + * \param host possible start of hostname; start & end updated * - * \return end of address (equals *strp if there is none) + * \return next character to parse (semicolon or NUL) */ static inline const char * -get_host(struct snmp_client *sc __unused, const char **strp) +get_host(struct snmp_client *sc __unused, const char *host[2]) { - const char *p = strrchr(*strp, ':'); + const char *p = strrchr(host[0], ':'); - if (p == NULL) { - *strp += strlen(*strp); - return (*strp); - } + if (p == NULL) + return (host[1] = host[0] + strlen(host[0])); - *strp = p; - return (p); + return (host[1] = p); } /** @@ -2093,25 +2079,24 @@ get_host(struct snmp_client *sc __unused, const char **strp) * of string. The port number must not be empty. * * \param sc client struct to set errors - * \param strp possible start of port specification; if this points to a + * \param port possible start of port specification; if this points to a * colon there is a port specification * * \return end of port number (equals *strp if there is none); NULL * if there is no port number */ static inline const char * -get_port(struct snmp_client *sc, const char **strp) +get_port(struct snmp_client *sc, const char *port[2]) { - if (**strp != ':') - return (*strp + 1); + if (*port[0] != ':') + return (port[1] = port[0]); - if ((*strp)[1] == '\0') { + if (port[0][1] == '\0') { seterr(sc, "empty port name"); return (NULL); } - *strp += strlen(*strp); - return (*strp); + return (port[1] = ++(port[0]) + strlen(port[0])); } /** @@ -2172,6 +2157,7 @@ int snmp_parse_server(struct snmp_client *sc, const char *str) { const char *const orig = str; + const char *comm[2], *ipv6[2], *ipv4[2], *host[2], *port[2]; /* parse input */ int def_trans = 0, trans = get_transp(sc, &str); @@ -2181,42 +2167,32 @@ snmp_parse_server(struct snmp_client *sc, const char *str) if (orig == str) def_trans = 1; - const char *const comm[2] = { - str, - get_comm(sc, &str), - }; - if (comm[1] == NULL) + comm[0] = str; + if ((str = get_comm(sc, comm)) == NULL) return (-1); - const char *const ipv6[2] = { - str + 1, - get_ipv6(sc, &str), - }; - if (ipv6[1] == NULL) + ipv6[0] = str; + if ((str = get_ipv6(sc, ipv6)) == NULL) return (-1); - const char *ipv4[2] = { - str, - str, - }; - - const char *host[2] = { - str, - str, - }; - if (ipv6[0] == ipv6[1]) { - ipv4[1] = get_ipv4(sc, &str); + ipv4[0] = str; + if ((str = get_ipv4(sc, ipv4)) == NULL) { + /* This failure isn't fatal: restore str. */ + str = ipv4[0]; + ipv4[0] = ipv4[1] = NULL; + } - if (ipv4[0] == ipv4[1]) - host[1] = get_host(sc, &str); - } + if (ipv4[0] == ipv4[1]) { + host[0] = str; + str = get_host(sc, host); + } else + host[0] = host[1] = NULL; + } else + ipv4[0] = ipv4[1] = host[0] = host[1] = NULL; - const char *port[2] = { - str + 1, - get_port(sc, &str), - }; - if (port[1] == NULL) + port[0] = str; + if ((str = get_port(sc, port)) == NULL) return (-1); if (*str != '\0') { @@ -2247,7 +2223,7 @@ snmp_parse_server(struct snmp_client *sc, const char *str) return (-1); if (def_trans) trans = SNMP_TRANS_UDP; - } else { + } else if (host[0] != host[1]) { if ((chost = save_str(sc, host)) == NULL) return (-1); @@ -2262,6 +2238,17 @@ snmp_parse_server(struct snmp_client *sc, const char *str) break; } } + } else switch (trans) { + case SNMP_TRANS_UDP: + case SNMP_TRANS_UDP6: + if ((chost = strdup(DEFAULT_HOST)) == NULL) + return (-1); + break; + case SNMP_TRANS_LOC_DGRAM: + case SNMP_TRANS_LOC_STREAM: + if ((chost = strdup(SNMP_DEFAULT_LOCAL)) == NULL) + return (-1); + break; } char *cport; From nobody Fri Jul 25 20:20:01 2025 X-Original-To: dev-commits-src-all@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 4bpfPG0PcBz62Hww; Fri, 25 Jul 2025 20:20: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpfPF5WNHz3QcD; Fri, 25 Jul 2025 20:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753474801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I1/gNFH6gQVoQzujUkKmOaECUM2q4VusN3aRqT4QjCM=; b=QZa5i7zEtvG0ensU3S6aDNqG86IKbbA0utqtReputF4q+N/M6yFqA6nTBfm6wmsePGtpre pjtSVCgaPXm8GPW1LQHWIT/wzCAkVMHy+BJzVop1evLHZZs5wFKcMfvHbEguEd3weDo1mS 8LrV3QQYESZ3kxjP9HXUPuyy6xX53mztDQveOG5PBdfskpQ1DLanNrzY2Xxa0i8+sc9RKM 53NOqg+ZdFOawlx3OlyWOSZEsXSqng554OpGaQ5hsZ4zEyWOjLdHYH/2Y6oEc7sc2J1eHP scftMSJF3Sx4/0bwR3PReeanwu4V71I02IWgqq13xVA/VtPfgWvGobg7Ag3Cyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753474801; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I1/gNFH6gQVoQzujUkKmOaECUM2q4VusN3aRqT4QjCM=; b=QoONo+LR4modXa2qS9Lh/y49ytimBunaA5KsJV07ALryQZi4W/+jfb32mMo1NBuUnMVeJk kY9jCi8R/L/sp5q26EbN01k10CAd0kmip29Low1Jz9WgUI34MPFGAnqDCjY7GDWu/a3MkI HXPR0MUrz+r3FGQYDuzi0qFmzoMhkKkJ3jQ/Ml6dt/R4O5RGhsG1FYfDx84+MPDySUb94j s7B1WzFLB+9pDkYRi6nRsPQHoYcgg6YH4BDcDQQ0LYZ4hfdEJrzdAwOqon2hyE1LQLATW1 HONRo2MSWnLK5eO3WuWN2OctFEIsclrtLUgT0H0PxF0IR9SAZAjHq0E3kbjeFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753474801; a=rsa-sha256; cv=none; b=ppB0C6eV5lnWBDTLK6f0gIb7SZv6qLTeNKTU7FLGCoLvEr8SrmPh0NP4Ruf5bh0QbLt83W 3KW0315ZL2894lUw152BlXnhUTeBVmLNZy+IuqiNlf3wY3SvzvTVW5CXIUjK0jW7y/2nn2 P7Frn4p7ij3ARyh+dl2Tm3SDcrIMwZbs39mQokYjCV64bxSruSXN6VvG8yXrnhnn8ZG3DB W3slgmw9RZt59Hd7LAtaqX5WW6CyGjhBBUbfmXjBqHBgErNRPqbORsmmyV5sUDOUZMyJDj IeDEaHi8lDkJeXegK6xZbslPfjqdg9O7cdLTH9NRTjvkNSVcgfUP3T8qZbUpXw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpfPF4pM6zywn; Fri, 25 Jul 2025 20:20:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PKK1oH016009; Fri, 25 Jul 2025 20:20:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PKK1Ig016005; Fri, 25 Jul 2025 20:20:01 GMT (envelope-from git) Date: Fri, 25 Jul 2025 20:20:01 GMT Message-Id: <202507252020.56PKK1Ig016005@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 672c8d2aee18 - main - RELNOTES: mention deprecation of begemotSnmpdPortStatus in bsnmpd(1) List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 672c8d2aee18c5deafc20c1dbc81ee8dde910af1 Auto-Submitted: auto-generated The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=672c8d2aee18c5deafc20c1dbc81ee8dde910af1 commit 672c8d2aee18c5deafc20c1dbc81ee8dde910af1 Author: Gleb Smirnoff AuthorDate: 2025-07-25 20:18:35 +0000 Commit: Gleb Smirnoff CommitDate: 2025-07-25 20:18:35 +0000 RELNOTES: mention deprecation of begemotSnmpdPortStatus in bsnmpd(1) --- RELNOTES | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/RELNOTES b/RELNOTES index bd275e809777..9ab511b7a3d3 100644 --- a/RELNOTES +++ b/RELNOTES @@ -10,6 +10,13 @@ newline. Entries should be separated by a newline. Changes to this file should not be MFCed. +9ba51cce8bbd: + bsnmpd(1) no longer supports legacy UDP transport. Users, that have + not updated their /etc/snmpd.config since 12.0-RELEASE or older will + need to merge in the new configuration. In particular, the transport + definition shall be changed from begemotSnmpdPortStatus OID to + begemotSnmpdTransInetStatus. + 1349a733cf28: Add a driver supporting a new storage controller interface, Universal Flash Storage Host Controller Interface, supporting From nobody Fri Jul 25 20:55:57 2025 X-Original-To: dev-commits-src-all@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 4bpgBk1F4Dz62L0H; Fri, 25 Jul 2025 20:55: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpgBj5xYlz3vMk; Fri, 25 Jul 2025 20:55:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753476957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z0EYgVGn6ZZPpiHLrCDNm3dJHypqXyX2+EGATloL5Wc=; b=pB0R6uwbETtRvAynpDYD7uOx5/TSvM6UDqAmE9U+4Ac9d8MyBt/YGpsHCFQkxpsR6MImVj sVfSEQq2LF0Y+LEb1nqDCjH0X5aSG7x0K4j7t5tKwHCCFsiOhyj5UZnB6zTOV04PBI4jlo AnMd6A+oeMDeGXe/RYih3ejvDrsRLuq6FOrYAYniK7XAG0PEUfN/82AiAQAplTB5afTW4r VQnnqN+ySBZTYJXsb00h5wumKVVoVVjTtKA9Q1dBSx/3WHL8X+Qyy0xhH4FhhKbq294XyG kH6yqihFf3i0ocYIKJ0X20Jvy911RYqrXWTI5k2Hker5plPfX0BHuB9bDuH6Mw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753476957; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z0EYgVGn6ZZPpiHLrCDNm3dJHypqXyX2+EGATloL5Wc=; b=X0ZJ5/VGqJ3u5VEmS6ag3NdAnjnItDk/n4hMz/oajF6D/cZqAkEoxdCeOjKpK++ghkxS8X 8XOL0/O+1gylPvDXAM7o26h0a+eEjeihcwWiF60buWd5aXDRbf998HoWIoZ2UXtoZkLPhe AJx0ef5krpkM3gTr5cck/5nnThbleAnrFs0/T+ioFpsQxtpzeS4XCmawwnXN3sB6CJYBTO nWsqIH2UR8ybxQ9+qVyiyKaGB48BUvOuHxsOUZmZv8xeHvpnWlVOPIsXuwXpKvRX/XIIil Jl6Eut0u98AitodGVBVdlUD86bu3SYkRY8R++DlworLOThnxLS4LPE/kA/y1jA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753476957; a=rsa-sha256; cv=none; b=N74K28VUqeK7DKfVw3adVZNOU8ryadHzg8m1vb4ZYyyvYcoMp0OYNZBhbFbnoH3t6j8l1o 8u9T3iewm9MTf6BsnUcqwEwra57QyjP9sC+VRSyF9pBOTKupEeDmA57aAo74dRY/wboOJ8 xZigZ65kHwoxZMnpUB68F8BNwCbxNwJqMMfWwwqxekEXELiobSEtjTt/4Fuz2hviaeWt9w nLnGD/I8ZvCGUoDBU+lALB48wwOfd24yWaj/MrGI36/JYW845y9ZSCV79r3anK9G2tDNiI 6jALrG9p81IkTFUMc6je3wI8zXfBd66kYl6jx4z6hRhluslIXkc09oCRl9/QXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpgBj55qPz10Jb; Fri, 25 Jul 2025 20:55:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PKtv1v087386; Fri, 25 Jul 2025 20:55:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PKtvAg087383; Fri, 25 Jul 2025 20:55:57 GMT (envelope-from git) Date: Fri, 25 Jul 2025 20:55:57 GMT Message-Id: <202507252055.56PKtvAg087383@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 5dadfac51c38 - main - tests/mac_portacl: enable is_exclusive for now List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5dadfac51c3876b0ba6fde831cb4417594167fed Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=5dadfac51c3876b0ba6fde831cb4417594167fed commit 5dadfac51c3876b0ba6fde831cb4417594167fed Author: Siva Mahadevan AuthorDate: 2025-07-15 16:45:24 +0000 Commit: Li-Wen Hsu CommitDate: 2025-07-25 20:55:01 +0000 tests/mac_portacl: enable is_exclusive for now Both tests rely on ports 77 and 7777 to be available and thus cannot be run concurrently. This is a temporary measure to ensure that they don't conflict with each other. In the future, these should be rewritten to wait until the necessary ports are available, or deterministically select a free port instead. Signed-off-by: Siva Mahadevan Sponsored by: The FreeBSD Foundation Pull Request: https://github.com/freebsd/freebsd-src/pull/1790 --- tests/sys/mac/portacl/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/sys/mac/portacl/Makefile b/tests/sys/mac/portacl/Makefile index c9fb6bbaae3e..856a85d331d5 100644 --- a/tests/sys/mac/portacl/Makefile +++ b/tests/sys/mac/portacl/Makefile @@ -10,6 +10,7 @@ TAP_TESTS_SH+= root_test .for t in ${TAP_TESTS_SH} TEST_METADATA.$t+= required_user="root" TEST_METADATA.$t+= timeout="450" +TEST_METADATA.$t+= is_exclusive="true" .endfor .include From nobody Fri Jul 25 21:13:41 2025 X-Original-To: dev-commits-src-all@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 4bpgbB3XVXz62Ljp; Fri, 25 Jul 2025 21:13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpgbB0Hb0z3Cfg; Fri, 25 Jul 2025 21:13:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753478022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=acz6PfTFnX7utdF9kH7IR8oZhE6xMOqc0dKEcMMNrt8=; b=L8MVpkjjuNt+6VrA/JjTG6gtB8E0gx1rdzwaiyk6wOOMdVTtGoC2D4i3shvCCH2h/6jL0c BHx3HG8hwlY/dLKjZe78+MAxqWEmdsmMDD3qzP7ZkPtX+YmVHxHNPlB+7oTKYW5uiVu+ag a846yUlcl67iu5qiw2nqNvdxqnvBs0zF3L53PKYA/sx+cNJZFsQRj7fMULuBCzo34e85zs c9voptLJKEmFTyy3dnGJFnXLVOwhChS8YyY/ASUkSCRaiXOP7E+SHg+B+M3bELXtsccdJ+ yAooq3v30/W+il+XzxaUxr024vsphyW6HV8rnNxKX/4meoxncaNsqXZG2dWlJQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753478022; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=acz6PfTFnX7utdF9kH7IR8oZhE6xMOqc0dKEcMMNrt8=; b=yu2SWWzxqNNajsnu/LJU0lchAPu1/KZnOZLcndJUoHW9mig0gS6ndSUrF+e1hQycsxmGbJ +Pcmx8el+QXe8ML0WEqyiVHZbFclXcj+IY8M+QlrD/KYolcWD3LEjXLMP0joOoaboAUf1b pgsfYl6IcDIffa2Z02GPvpYH7nfQG0mtoxvAtLIQRp+KInvNbkcoEUO5/5DYkpLBSjFIZY pRPSw+wZ7/HbNgJmSXxbC41mK5oyfCLJ2ifdJtF2hVVMlBWxu2TpaMtYzFmBuxaoyfcp3L NXHbQ1zL4XFYTDsVmfDZmj0fClEvVhLpcg7aIofs+mUr40BzTA3OONQJCMWarA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753478022; a=rsa-sha256; cv=none; b=u0Q/5oEQ5UiAsl5QUowkFlv7aSRHZlFqdpvr6UKfHcnpwOIVNS/dGaHV2Ia0qasIqnUAt6 p5sG1Ea7ix12LyXiHLKepwfVDYzyF0Em+9gNt8+z637L5uvSkQSv/ZtwS4tlGDToXsfcmV R8F2cU1lMYfoKmtlnH4OtcINVCEvv0M3GqzFUGY+f7lUsZFWZbpc02F0Qbu4F6gPzdwJzB OaOUi9Q4uWHGdCkR8k+1YJTBA7gEvGOeKskDmZftQ4EWUajbJsXo7YGPG6BQeO/Yx83tr+ j8Zp5ap6mYQindk+7E3tbt1Nx3TaIq1jkX2IYAMu4dFmJ1PutSv27dV1bi2y4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpgb970Lxz10kr; Fri, 25 Jul 2025 21:13:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PLDfuJ025674; Fri, 25 Jul 2025 21:13:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PLDfvj025671; Fri, 25 Jul 2025 21:13:41 GMT (envelope-from git) Date: Fri, 25 Jul 2025 21:13:41 GMT Message-Id: <202507252113.56PLDfvj025671@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 26188470cff6 - main - socket: Chase a lingering reference to M_NOTAVAIL List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 26188470cff6ec436c8d5dd570539c38eea20e5d Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=26188470cff6ec436c8d5dd570539c38eea20e5d commit 26188470cff6ec436c8d5dd570539c38eea20e5d Author: Mark Johnston AuthorDate: 2025-07-25 21:00:53 +0000 Commit: Mark Johnston CommitDate: 2025-07-25 21:00:53 +0000 socket: Chase a lingering reference to M_NOTAVAIL Fixes: b93e930ca233 ("sendfile: retire M_BLOCKED") --- sys/kern/uipc_socket.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/kern/uipc_socket.c b/sys/kern/uipc_socket.c index 17b456deb71f..fe2d8d056062 100644 --- a/sys/kern/uipc_socket.c +++ b/sys/kern/uipc_socket.c @@ -2989,8 +2989,8 @@ dontblock: */ moff = 0; offset = 0; - while (m != NULL && !(m->m_flags & M_NOTAVAIL) && uio->uio_resid > 0 - && error == 0) { + while (m != NULL && !(m->m_flags & M_NOTREADY) && uio->uio_resid > 0 && + error == 0) { /* * If the type of mbuf has changed since the last mbuf * examined ('type'), end the receive operation. From nobody Fri Jul 25 21:52:59 2025 X-Original-To: dev-commits-src-all@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 4bphSX2Mpxz62PmG; Fri, 25 Jul 2025 21:53:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bphSW6SvMz3hdF; Fri, 25 Jul 2025 21:52:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753480379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IsbrlnGtGpq4jbme4enR31vwHp1EhfhMFJY5mv6zRc8=; b=q+i6ikcGkZW27syLjhtqpVTckRx8oaRhnD8V2RznsvWv1Ngkk9gztNCLNwXvf/h/blCN2d DENi/nd3wKRNiADjvsabwDtGLoCQbL6bQ8EkgoFJIvkCB5Vfdoqn70RC3Kt5ZTolzB4YwG lo99qfKw0g+43RPKqqweEIcFKca0gbMQ4HG0mis6+lE4GnE5LTe/y4/VWwLn2Od3xWeSJD /784UtXfLLYtNmHQ3jb+loU4CNfnJAp+9NFzu7fEFLQQdP0No5z+ec2nuRir/B++R+cpEe Bc4EoutYb+BCTrsspccbvzHpSCOmC7Ys8pVRMvvNcI+hjCQhl6tQB+svD1IXEA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753480379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IsbrlnGtGpq4jbme4enR31vwHp1EhfhMFJY5mv6zRc8=; b=U70qCFrw9ngYvIcmcOVuRvSAETmlbkTrceTe1tLhgLSpwmxMC3j5AvhSVqsNtrI3fNvpul YDiAn7Zio6JqRTF/rUTg0kOSsCd1nBtNQeR1nHhG+Dx+9PnaHDLDZkymH+AwzZdcEqVCgB q+4GYvEiitxU3b75q1axM5JpjkkLtS9PAQWAH7QhuaYCe9Uy6y6C6owd2luSslDAfM6I6w HgOxY9EnSdQtrBgzJA2M/eS7gWoRAl7VOvJJzLHfZH0VJsGgeYNAjZfXoZqCrHKCJ3lrqm MdGnj5VvEA75hKcWX3XmLT/HdlR0TEeCKCYbfTG3cOlXDrbl46tGRRnAmZ6Gww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753480379; a=rsa-sha256; cv=none; b=OEiR903t71unOGGDnTRlHcxirho4SbC9nDp8JrLxzejngJnPMn66OFoQLS3Y/oSMGA1gEI dLsvyeO7rJCQlMVO1/kA6U2OXI086x+Sq51BWWVKsj/SM6Ft+hlKWNLw1UY6lOSXiPcdq+ szHVWEx2U17GBL6y/rnqX85cvul9iNPmm0oO8hnI6B1tNHPJZjPIGs1LjBiMnrwo5MU+7z 80H9ZT9OyByMJSpBkKB+H0GLDgbIaqAIRAu/AOXJg5D5hI5vA3HEh3Yp+ndLmjzBw+KR2N HRz0eM3UP2nDwlDyTI168QI8GrAfUXJcDXqtojRwuOrI2ICEsdnbvpy2f4h77g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bphSW5sbjz11yn; Fri, 25 Jul 2025 21:52:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PLqxlL099594; Fri, 25 Jul 2025 21:52:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PLqxMM099591; Fri, 25 Jul 2025 21:52:59 GMT (envelope-from git) Date: Fri, 25 Jul 2025 21:52:59 GMT Message-Id: <202507252152.56PLqxMM099591@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Li-Wen Hsu Subject: git: 9ec37e8ff49c - main - tests/ci: Use QEMU blockdev declaration for all platforms List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: lwhsu X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9ec37e8ff49c6b555e8d4f522adc9378157df170 Auto-Submitted: auto-generated The branch main has been updated by lwhsu: URL: https://cgit.FreeBSD.org/src/commit/?id=9ec37e8ff49c6b555e8d4f522adc9378157df170 commit 9ec37e8ff49c6b555e8d4f522adc9378157df170 Author: Siva Mahadevan AuthorDate: 2025-07-25 21:46:08 +0000 Commit: Li-Wen Hsu CommitDate: 2025-07-25 21:52:32 +0000 tests/ci: Use QEMU blockdev declaration for all platforms This patch uses the QEMU manpage-recommended '-blockdev' option instead of '-drive' to declare block devices. This also makes the mandatory '-device' declarations constant across all platforms, which fixes the missing QEMU_DEVICES tarfs device declarations on all Makefile. files. Signed-off-by: Siva Mahadevan Reviewed by: imp, lwhsu Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51479 --- tests/ci/Makefile | 8 +++++--- tests/ci/Makefile.aarch64 | 2 +- tests/ci/Makefile.armv7 | 2 +- tests/ci/Makefile.powerpc64 | 1 - tests/ci/Makefile.powerpc64le | 1 - tests/ci/Makefile.riscv64 | 1 - 6 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/ci/Makefile b/tests/ci/Makefile index 964664cbfbb9..48e638fdb79c 100644 --- a/tests/ci/Makefile +++ b/tests/ci/Makefile @@ -110,7 +110,7 @@ QEMUTGT=portinstall-qemu . endif .endif QEMUTGT?= -QEMU_DEVICES?=-device virtio-blk,drive=hd0 -device virtio-blk,drive=hd1 +QEMU_DEVICES?= QEMU_EXTRA_PARAM?= QEMU_MACHINE?=virt QEMUBIN=/usr/local/bin/qemu-system-${QEMU_ARCH} @@ -237,8 +237,10 @@ ci-runtest: ci-buildimage-${TARGET_ARCH:tl} portinstall .PHONY -nographic \ -no-reboot \ ${QEMU_EXTRA_PARAM} \ - -drive if=none,file=${CIDISK},format=raw,id=hd0 \ - -drive if=none,file=${META_TAR},format=raw,id=hd1 \ + -device virtio-blk,drive=hd0 \ + -device virtio-blk,drive=hd1 \ + -blockdev driver=raw,node-name=hd0,file.driver=file,file.filename=${CIDISK} \ + -blockdev driver=raw,node-name=hd1,file.driver=file,file.filename=${META_TAR} \ ${QEMU_DEVICES} .endif diff --git a/tests/ci/Makefile.aarch64 b/tests/ci/Makefile.aarch64 index 9cbec6010a36..5a62e73d8eaa 100644 --- a/tests/ci/Makefile.aarch64 +++ b/tests/ci/Makefile.aarch64 @@ -8,7 +8,7 @@ # CI Makefile for aarch64. # QEMU_ARCH=aarch64 -QEMU_DEVICES=-device virtio-blk,drive=hd0 -device ahci,id=ahci +QEMU_DEVICES=-device ahci,id=ahci QEMU_EXTRA_PARAM=-bios /usr/local/share/u-boot/u-boot-qemu-arm64/u-boot.bin -cpu cortex-a57 QEMU_MAX_CPU_COUNT=64 QEMU_MAX_MEM_SIZE=64 diff --git a/tests/ci/Makefile.armv7 b/tests/ci/Makefile.armv7 index 21ee6b387b05..3b0d180fa352 100644 --- a/tests/ci/Makefile.armv7 +++ b/tests/ci/Makefile.armv7 @@ -8,7 +8,7 @@ # CI Makefile for armv7. # QEMU_ARCH=arm -QEMU_DEVICES=-device virtio-blk,drive=hd0 -device ahci,id=ahci +QEMU_DEVICES=-device ahci,id=ahci QEMU_EXTRA_PARAM=-bios /usr/local/share/u-boot/u-boot-qemu-arm/u-boot.bin QEMU_MAX_CPU_COUNT=1 QEMU_MAX_MEM_SIZE=3 diff --git a/tests/ci/Makefile.powerpc64 b/tests/ci/Makefile.powerpc64 index 26712b45f30b..d4e8e2cdc778 100644 --- a/tests/ci/Makefile.powerpc64 +++ b/tests/ci/Makefile.powerpc64 @@ -8,7 +8,6 @@ # CI Makefile for powerpc64. # QEMU_ARCH=ppc64 -QEMU_DEVICES=-device virtio-blk,drive=hd0 QEMU_EXTRA_PARAM=-vga none -accel tcg,thread=multi QEMU_MACHINE=pseries,cap-hpt-max-page-size=16M QEMU_MAX_CPU_COUNT=1 diff --git a/tests/ci/Makefile.powerpc64le b/tests/ci/Makefile.powerpc64le index 974ab04b8eed..60c255f569fa 100644 --- a/tests/ci/Makefile.powerpc64le +++ b/tests/ci/Makefile.powerpc64le @@ -8,7 +8,6 @@ # CI Makefile for powerpc64le. # QEMU_ARCH=ppc64 -QEMU_DEVICES=-device virtio-blk,drive=hd0 QEMU_EXTRA_PARAM=-vga none -accel tcg,thread=multi QEMU_MACHINE=pseries,cap-hpt-max-page-size=16M QEMU_MAX_CPU_COUNT=1 diff --git a/tests/ci/Makefile.riscv64 b/tests/ci/Makefile.riscv64 index 749df3f0b369..d494fc4f43f5 100644 --- a/tests/ci/Makefile.riscv64 +++ b/tests/ci/Makefile.riscv64 @@ -8,7 +8,6 @@ # CI Makefile for riscv64. # QEMU_ARCH=riscv64 -QEMU_DEVICES=-device virtio-blk-device,drive=hd0 QEMU_EXTRA_PARAM=-bios /usr/local/share/opensbi/lp64/generic/firmware/fw_jump.elf -kernel /usr/local/share/u-boot/u-boot-qemu-riscv64/u-boot.bin QEMU_MAX_CPU_COUNT=16 QEMU_MAX_MEM_SIZE=64 From nobody Fri Jul 25 22:25:16 2025 X-Original-To: dev-commits-src-all@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 4bpj9n08FVz62Qwj; Fri, 25 Jul 2025 22:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpj9m5VsLz4F89; Fri, 25 Jul 2025 22:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753482316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gAXrUZmktzOaCgY/GCxBR9FX3NyOBe01V0UDacwRZz0=; b=rgso+fJomLflzbS2Mn68B3OpBl+b0WfV2ASQlWQn+xUXhS8uBcFSOTGC7esddab1mDkokp E2hVp0HAIjjU5ZawU584ce/d82CuE36dki8BOhcj1z6Zq/D16CXLfo2sZnBnt/Kv2jTeHJ wTjhFpC19z8cLZ4IiOmevK2NKqHOGxX9aLuaFg7EKP+t3tKRejtNiv8qqnkfB1xEUAaR8g IKeN0604POTjGozCHOILXeNE4PmRkOHUceo4xWvQBBwu8+0ShINdLJVc0figJs+NcyKRI3 bzbHeWzsgiQsKKG9DuHhIqu9b94z1GuE9XG3WBRJ2PIB1yMx/AAU6EEOJa/5vg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753482316; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gAXrUZmktzOaCgY/GCxBR9FX3NyOBe01V0UDacwRZz0=; b=qKRDW+0hTdBVwRPAGMznjwyBQLZ6yGQ0oKpQskQ3s983a8Dd5t6JEpjDwsrAJcIVCDzwiQ 6WtkUOkAQuoZW7w1SqUBhco5g2Sz+FUH4/7V9MzC9mUzwktoNZ+9sd+rjmpNcxBJJx31hs 2wtwfzwa6RZXy4Hhe/IJOZ1IOgvj0pnKi0mltNhRoE9t2rm3MthJ+umymgobG6Zu/9N6OD IuuB/LfVrnQiCvXRmD/Xq3MzR+kXeJNf5XzW8AXMCPy4pKFswbGtxBOkNqMI76xyrWxV98 KPn8OWl/5a85MMY2y/hCrdQjKJIISoWsdG5aDK/e2V5G6s41iR0Hx9Yinbf7pg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753482316; a=rsa-sha256; cv=none; b=KHvgNOX4KtyfzSmBRg7uxRVee7DAcH9Ne2UocjtWd+RsAD+Mkr1Vz9DKOgRg2ogyLDLSqR d7F/D5voAeIdTIxwx5K3w7PlLMCp4etQy6N7nHp4VN9PNjuewpMQbQJYmDIMkKdPef/QFV ZzwCeYAH2i4hgoov8INNEeCdsWLLdfwmuibNSLJjFdGw28dBnua0yoRZbTCMN59YNigwrM /D78HB28VneiyNVvIv2Gm6bXiLLNgUbLnTTBII46WsRzRuppOp3ObMt48x/T2QjZhwWIqm NxmyCkKrr/IP3YuYGB6RxXHfegHENu/5FEEF2QMaav7+JyNXpqz5NnmKHri4wQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpj9m4Mg2z12qs; Fri, 25 Jul 2025 22:25:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PMPGax058946; Fri, 25 Jul 2025 22:25:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PMPGlf058943; Fri, 25 Jul 2025 22:25:16 GMT (envelope-from git) Date: Fri, 25 Jul 2025 22:25:16 GMT Message-Id: <202507252225.56PMPGlf058943@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 015ae6688993 - main - github: Update with better guidance on what's acceptable for src List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 015ae668899383ebf7969863dae1b45e169bbcdc Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=015ae668899383ebf7969863dae1b45e169bbcdc commit 015ae668899383ebf7969863dae1b45e169bbcdc Author: Warner Losh AuthorDate: 2025-07-25 22:24:34 +0000 Commit: Warner Losh CommitDate: 2025-07-25 22:24:34 +0000 github: Update with better guidance on what's acceptable for src Tighten and clarify the submission requirements: * No AI submissions * No trivial submissions: pull requests have to solve a real problem * We may timeout requests after a month * FreeBSD committers (all repos) are responible for merging their commits to the appropriate repo. github can be used to seek approval for such commits (eg a ports committer wants to make a src change). * Wordsmith a few things to make them clearer to people new to our jargon. * Not all psuedonyms are created equal, and we may disallow a PR based on that. Sponsored by: Netflix Feedback from: emaste Differential Revision: https://reviews.freebsd.org/D51538 --- CONTRIBUTING.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8e79652a09d2..02d718ef8018 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -33,9 +33,10 @@ and need discussion, or changes that require specialized review. A pull request will be considered if: +* The request is substantive in nature. We generally don't accept minor or cosmetic changes unless they are part of larger work in that area. Pull requests should solve a real, actual problem. * It is ready or nearly ready to be committed. A committer should be able to land the pull request with less than 10 minutes of additional work. * It passes all the GitHub CI jobs. -* You can respond to feedback quickly. +* You can respond to feedback quickly. If feedback is requested and one month passes without a response we may close the pull request. * It touches fewer than about 10 files and the changes are less than about 200 lines. Changes larger than this may be OK, or you may be asked to submit multiple pull requests of a more manageable size. * Each logical change is a separate commit within the pull request. Commit messages for each change should follow the [commit log message guide](https://docs.freebsd.org/en/articles/committers-guide/#commit-log-message). * All commits have, as the author, your name and valid email address as you would like to see them in the FreeBSD repository. Fake github.com addresses cannot be used. @@ -43,11 +44,14 @@ A pull request will be considered if: * Fixup commits should be squashed with the commit they are fixing. Each commit in your branch should be suitable for FreeBSD's repository. * Commits should include one or more `Signed-off-by:` lines with full name and email address certifying [Developer Certificate of Origin](https://developercertificate.org/). * The commits follow FreeBSD's style guide. See [Style](#Style). -* Run tools/build/checkstyle9.pl on your Git branch and eliminate all errors. +* Run tools/build/checkstyle9.pl on your Git branch and eliminate all errors, or provide an explanation for exceptions. * The commits do not introduce trailing white space. -* If the commit fixes a bug, please add 'PR: \' to the commit message. -* If there's a code review in Phabricator, please include a link as a 'Differential Revision: ' line. +* If the commit fixes a bug, please add 'PR: \' to the commit message to document the Bugzilla Problem Report number. +* If there's a code review related to this change, please include its URL in the commit message. However, where possible, please do not open both a differential review and a GitHub pull request. * If you have run FreeBSD's sources through a static analysis tool, please don't submit the raw results. Please also see the chunking up guidelines. Also, please make sure that kyua tests are the same before / after your change. Ideally, you'd also create a test case that shows an actual bug that's being fixed by these changes. +* FreeBSD committers submitting pull requests are responsible for pushing them into the tree (possibly with approval if cross-repo commit bit policy needs it). Pull requests by FreeBSD committers will be closed after a month unless there's a very good reason not to. +* Submissions using generative AI will be rejected. +* Submissions from AI chatbots will result in the account being banned. When updating your pull request, please rebase with a forced push rather than a merge commit. @@ -70,7 +74,8 @@ so. While the project strives to have a uniform coding style, our style offers a range of choices making some 'cleanups' ambiguous at best. Also, some files have their own consistent style that deviates from style(9). Style changes take volunteer time to process, but that time can be quite limited, so please be -respectful. +respectful. Trivial spelling changes should generally not be made in isolation +as they usually add little value, but do take up valuable volunteer time. The current theory for pull requests on GitHub is to facilitate inclusion in the project. The guidelines are streamlined for quick decisions about each pull @@ -90,7 +95,8 @@ closing it. We require that contributions are associated with a unique identity. The author email address should not be `@users.noreply.github.com`. Do note that your name and email address will become a permanent and immutable -part of the public Git history of the FreeBSD source tree. +part of the public Git history of the FreeBSD source tree. Authors that use +pseudonyms will be considered on a case by case basis. ## Style @@ -128,7 +134,7 @@ not present in FreeBSD's [shell](https://man.freebsd.org/cgi/man.cgi?query=sh&se ## Signed-off-by -Other projects use Signed-off-by to create a paper trail for contributions they +Other projects mandate Signed-off-by to create a paper trail for contributions they receive. The Developer Certificate of Origin is an attestation that the person making the contribution can do it under the current license of the file. Other projects that have 'delegated' hierarchies also use it when maintainers From nobody Fri Jul 25 22:25:17 2025 X-Original-To: dev-commits-src-all@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 4bpj9n66vwz62R7s; Fri, 25 Jul 2025 22:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpj9n4p8Kz4FJd; Fri, 25 Jul 2025 22:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753482317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vw+SxXqXZhlBgJDHXxkcXIkBCfR9QtXEAGVHybRVUcA=; b=hB9fspSocnRZfeoCaef4iWcG8R0K+nTOHs4eoX3fYfSKKsWF99ooOocJzXSLcjOhHerxU/ G46J9StORV4m4PfGXEEGqhfSBIi8e1tesDuw2yhisWE/VhYtAMboSg9G/PB/L9ff75upWg g2PH/RjatE7R5l0uydOSh5pJQA74PdRXLhs6sjJNeLFMlEHzUcQAVxSGZkirH4vMh80Ezs Or2miPs5m2548gXbSvMAuZdpMW34K7OvfQUir0KlQJFubOQBFL6KhtftfpOkPj7F5Ji2GD utLjbsoIa15i1wFXAbSaK1JFTKbHmdYpEtQIrkDeIRdxhvqLyqk1QsYjBIE1eA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753482317; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Vw+SxXqXZhlBgJDHXxkcXIkBCfR9QtXEAGVHybRVUcA=; b=NjNMeEy1YxJsUI662FfM3m63sH9nDgj0JEm968eTKjIrJqllE36opW6oSHubiTUnOlLoLg Y9MK2EspNh+UZeFQ3q70YfBWF6Ib/oYAGdRY5J+4xiZSh44gnUAvyPvpwmZYc+gpUDH8yq JgNQ+B3/GtYQGezD691/a++0rFlIuYAkoswRp+JWFez+4v03LcGDxDXH1xSBzQ/Nr+B6Rn nYC7thYH51/OmMs0clzvX0lTG24gb5WYz6apEXow07e2wa77dq6kRfSZaiirLL8vpDhVua 2VcmWvFZiMqqJdijUysoW6WelsBwnZkrl28WQUTNJTowx9ql4QO/TLOGNbWO6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753482317; a=rsa-sha256; cv=none; b=If1yhKCFdyMHyRk4AkHZDAqIkT7t17xfiw8ZDTpCkwnMxmQcmjNLhMYjGlbFKy7pFRnxyt GZkcPyaSCeY/+SN+roWV1PYIT3BLag6YnvAVQ8IOHRSL7rGoYjRWexNpZ91CuL+q8FJ2KL gueRhLoGkve+H+olx/sY/IpS7AWU11uC09VTZHOtOIJkzEZWpdMd2ECgg6B3vsgCHrH6TT iFC6ttWBl3nO4R2QDFpVNbhkM1+uf6zWaqoOwwVPPkFxxf3VEScwjszh7bAf7fJNgsVPeZ k551L4IjvML+tkFitGCifWl0wJCqJSUQKOTbKjC5zZOKioLm2R7GwOcjPQzvxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpj9n4GlLz12qt; Fri, 25 Jul 2025 22:25:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PMPHfS058978; Fri, 25 Jul 2025 22:25:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PMPHkN058975; Fri, 25 Jul 2025 22:25:17 GMT (envelope-from git) Date: Fri, 25 Jul 2025 22:25:17 GMT Message-Id: <202507252225.56PMPHkN058975@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: fd186cd16eaf - main - find: Fix items from the review I missed for printf List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: fd186cd16eafabfa28aa95175d8df97cbf08b0c7 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=fd186cd16eafabfa28aa95175d8df97cbf08b0c7 commit fd186cd16eafabfa28aa95175d8df97cbf08b0c7 Author: Warner Losh AuthorDate: 2025-07-25 22:24:49 +0000 Commit: Warner Losh CommitDate: 2025-07-25 22:24:49 +0000 find: Fix items from the review I missed for printf Minor fixes I missed in a review comment until after the commit. Pointy-hat-to: imp Fixes: 7b9c912c41f4 Sponsored by: Netflix --- usr.bin/find/function.c | 5 ++++- usr.bin/find/printf.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/usr.bin/find/function.c b/usr.bin/find/function.c index ac7fe4dd4e98..11455b395022 100644 --- a/usr.bin/find/function.c +++ b/usr.bin/find/function.c @@ -1450,7 +1450,10 @@ c_printf(OPTION *option, char ***argvp) PLAN *new; isoutput = 1; - ftsoptions &= ~FTS_NOSTAT; + /* + * XXX We could scan the format looking for stat-dependent formats, and + * turn off the stat if there's none: `%p`/`%f`/`%h` don't need a stat. + */ new = palloc(option); new->c_data = nextarg(option, argvp); diff --git a/usr.bin/find/printf.c b/usr.bin/find/printf.c index 643f04b9cef5..6ca018d58f34 100644 --- a/usr.bin/find/printf.c +++ b/usr.bin/find/printf.c @@ -279,7 +279,7 @@ do_printf(PLAN *plan, FTSENT *entry, FILE *fout) case 'c': /* status change time ctime */ fp_ctime(fp, sb->st_ctime); break; - case 'C': /* statuc change time with next char strftime format */ + case 'C': /* status change time with next char strftime format */ fp_strftime(fp, sb->st_ctime, *fmt++); break; case 't': /* modification change time ctime */ From nobody Fri Jul 25 23:10:01 2025 X-Original-To: dev-commits-src-all@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 4bpk9Q6mHNz62TBs; Fri, 25 Jul 2025 23:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpk9Q19z2z3cVS; Fri, 25 Jul 2025 23:10:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753485002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HEZYMcSJaqNENoXSDCoTVlEiNxzsa7sbIpeKoWWmYAs=; b=oBWUidFkUHppFwsLBN1pYdkdui/vgleFutGvlsPRWUG80jbNJZoCBnoiCxBcUyi/0L49qk QlWjYTls/4FttiStgqU2l55ntMv7BiO3zo/eYG/L+LUlk15FBy3DZUE5WK+r6+zxWsEjtV MURGQ27OW7EQUm7yT4oNqATceSLPXoayyDsq/4lji58p+4ELxfZkqCtYOEGLmund8HB7/m X5toPCnNfMsJh+0El62K1oFIoOA/pfcROZw/iGXlLAGKO+BRvg79x9A22T/tQ8l6fPtVM+ e60fLHRs/+Zs1qJJnL1UZpnSdhTljAlIN2c/+s3w1fPFqFtZY4bXS7n4KBjwCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753485002; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HEZYMcSJaqNENoXSDCoTVlEiNxzsa7sbIpeKoWWmYAs=; b=kDhX0gj8Q5cqKL2DIQ/PkWpSIYp6aglmaDA+SAbLevq1GWtd5mKzh/8IVMT2G1D+6Oi0x+ TuHZswmD+6tu0oCz2Xabiz/vOfAzLKWHtyss+8SnXBB+2Si0kUcFyOmbqMPnzfKP80mXzP 4xDWq6GdvMNYEjeCaLwTJ96bnPqn0ftehcOPN/2koajAVpwlZmc2kboF1IrXBv4q/+EjIN ZbtASpt1FjfGZzF5p+YAJBhEYkT2hJyJg27sSTvcuPLDT7lU+v9tWYPLewjHPxVpF0ryuH j0rRYE2AdARYHqpCn7Q8jLLjGhsVXdS4kwYCBlxK4NQt3RIO7en8MnOPOhQViw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753485002; a=rsa-sha256; cv=none; b=ltSmju/Q97KZsC0jHk15bBCRlkjBr8d9XUs5H1rjWq62NBt0kDfrosiUrSFQzjzHoejOy6 CiJLQLHA+GXQqOIcjPbedekCbGggJr2j61kLQeOsepxPntfcIJ4ubTD10yZ0gTvrnlLEcB Z5O+aoLe1jIq2fBoVGh50mCHEYBMdmxXG6jlAB/h7Pz38orhcq+iQgwTc+UAMa7cIdouyo E7R3ZoC65sZPF7zfRsbdXgOIdema8rOKtO+mzysNaqv1Iu1K7Cs4APQsc8X/Te7Ln9/HSn 7KI9xaMQpHxhC5MMqwfoAUUeS4rjDsKG20Jbu2xs1cN9NbRkPqevOjRgqrqBLg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpk9Q0VDZz14J5; Fri, 25 Jul 2025 23:10:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PNA1ud038006; Fri, 25 Jul 2025 23:10:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PNA1M2038001; Fri, 25 Jul 2025 23:10:01 GMT (envelope-from git) Date: Fri, 25 Jul 2025 23:10:01 GMT Message-Id: <202507252310.56PNA1M2038001@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: e6ef675de261 - main - tests/sys/net/if_bridge_test: fix MTU test List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e6ef675de261b15ed66d434d054a6e5e69308ce5 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=e6ef675de261b15ed66d434d054a6e5e69308ce5 commit e6ef675de261b15ed66d434d054a6e5e69308ce5 Author: Lexi Winter AuthorDate: 2025-07-25 23:11:39 +0000 Commit: Lexi Winter CommitDate: 2025-07-25 23:13:16 +0000 tests/sys/net/if_bridge_test: fix MTU test "ifconfig gif0 ether" doesn't return any output, so this wasn't correctly checking the MTU on the gif interface. Remove "ether". Reviewed by: zlei, kp Differential Revision: https://reviews.freebsd.org/D51245 --- tests/sys/net/if_bridge_test.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/sys/net/if_bridge_test.sh b/tests/sys/net/if_bridge_test.sh index cc0b212aebd2..cd38adea28ad 100755 --- a/tests/sys/net/if_bridge_test.sh +++ b/tests/sys/net/if_bridge_test.sh @@ -537,7 +537,7 @@ get_mtu() { intf=$1 - ifconfig ${intf} ether | awk '$5 == "mtu" { print $6 }' + ifconfig ${intf} | awk '$5 == "mtu" { print $6 }' } check_mtu() @@ -546,7 +546,7 @@ check_mtu() expected=$2 mtu=$(get_mtu $intf) - if [ $mtu -ne $expected ]; + if [ "$mtu" -ne "$expected" ]; then atf_fail "Expected MTU of $expected on $intf but found $mtu" fi From nobody Fri Jul 25 23:10:02 2025 X-Original-To: dev-commits-src-all@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 4bpk9R3Qcgz62T3k; Fri, 25 Jul 2025 23:10: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpk9R1JrXz3cpK; Fri, 25 Jul 2025 23:10:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753485003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aEpkq2yFgsMmgrRYZKj5xKExLx908AO93oa5ErB1OI8=; b=S2l9WNStemYrchuwWQGgfA7jeoj8QEc3NTdN4kTYSIYbwRrgR+H8ky8qG0N7qYum18Tuwb mvNeAu1jheNhIiwYzQbYjPh6gmuQZ17y2aXCimAqbiA/jl5MOdko9TMQpJXuGElU8cqoeV 8hhCyftradwnjPCNvO8b1cDs1f40YlU6/L9EXTCaqEU//ab+vz/hnnj9vuC91dGly3FohJ OE5YVFbCYRYjyGKQ6+Sa7xwRJOE88YsZ0+6lqAlekuxzee85VWEuepAghITniPpqhlV+eK wgc+R8JU/UeJETMQiJRq48bXB0w3+YdKWj/ec9SHQ65b94WTVCrf7iekrVhR0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753485003; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aEpkq2yFgsMmgrRYZKj5xKExLx908AO93oa5ErB1OI8=; b=K4O5ApEE5cAp2EUykGMH8jx/zyAOZgdy0F2cPc5OegX7TwzKzIRj++wbZRYN/8FeYhutVU Hzn958NPIDaAGk41o7j5dKOw5CM8B7wjshjhjs/0n8+h0DB6cpYx6gvZE4fQEjEoSlXZim 5/jGWq75EJiGQ47AWQ14chf1xgiEU4B+gBLzYAAx1+sJLZ6CVfRGA0O+Qwgezc0zB2+I3i xmudaxmqA0ohW5NjrnP8ABJuUkkP3/XmH6mNAEzLSKu2KM5M7J0WJNrQ2kSELhUGcLF+Gv oh92aEYSesVa+EZfdDBFVwCDdLQhF+ILX5T/EXI0e3uAiC9Vlwm+Y59Kf0cpxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753485003; a=rsa-sha256; cv=none; b=mc+coRI818tEuUOpu6nvJhOJ+j8NyfHGqlnbbiel5LtMDGODmOrinBnz3AsIaG/XzJtiV8 fAPogCwKLQhuP0ltVHEKWa+AaQA03miBxGkJ5mToGms3KD59j43ZOYsG8NNWXJ9Mjvo+V4 uNUrI6xiteaA9BMNUXTIMmM/GUEF/H771zyEwo+AngoMxwzrJCnriSk7Il5g2Uj0YvuFkc +lOTIymQhOMTAw+B4sMy6yzuwsuvGWJNvhC3knEKELDB7uO2DIkz5AKgwTyPdSH7NJM92G oobHa2zqAqyyPq4+oxDjs3sTk+sxeSSD93BDy25NPcDk7zVixi5C9f9pljMj+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 4bpk9R06ccz13kK; Fri, 25 Jul 2025 23:10:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56PNA2eE038275; Fri, 25 Jul 2025 23:10:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56PNA2MD038270; Fri, 25 Jul 2025 23:10:02 GMT (envelope-from git) Date: Fri, 25 Jul 2025 23:10:02 GMT Message-Id: <202507252310.56PNA2MD038270@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Lexi Winter Subject: git: 763d1bc05a71 - main - ifconfig: don't print bridge member ifmaxaddr if it's 0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ivy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 763d1bc05a718cbc29f45cfca7d566183e3349a4 Auto-Submitted: auto-generated The branch main has been updated by ivy: URL: https://cgit.FreeBSD.org/src/commit/?id=763d1bc05a718cbc29f45cfca7d566183e3349a4 commit 763d1bc05a718cbc29f45cfca7d566183e3349a4 Author: Lexi Winter AuthorDate: 2025-07-25 23:12:23 +0000 Commit: Lexi Winter CommitDate: 2025-07-25 23:13:16 +0000 ifconfig: don't print bridge member ifmaxaddr if it's 0 Most bridge interfaces will have ifmaxaddr set to 0 (the default). Save a little horizontal space by not printing it in this case. Reviewed by: kp Differential Revision: https://reviews.freebsd.org/D51252 --- sbin/ifconfig/ifbridge.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sbin/ifconfig/ifbridge.c b/sbin/ifconfig/ifbridge.c index ce5d2f4894fa..3465dc223ada 100644 --- a/sbin/ifconfig/ifbridge.c +++ b/sbin/ifconfig/ifbridge.c @@ -217,8 +217,9 @@ bridge_status(if_ctx *ctx) printf("%s%s ", prefix, member->ifbr_ifsname); printb("flags", member->ifbr_ifsflags, IFBIFBITS); printf("\n%s", pad); - printf("ifmaxaddr %u port %u priority %u path cost %u", - member->ifbr_addrmax, + if (member->ifbr_addrmax != 0) + printf("ifmaxaddr %u ", member->ifbr_addrmax); + printf("port %u priority %u path cost %u", member->ifbr_portno, member->ifbr_priority, member->ifbr_path_cost); From nobody Sat Jul 26 03:14:04 2025 X-Original-To: dev-commits-src-all@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 4bpqb06gncz62y3Q; Sat, 26 Jul 2025 03:14: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpqb03GP1z3cKX; Sat, 26 Jul 2025 03:14:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753499644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uD9ajMfonvAiyCRPUKgUxEHZtChwXUiyQWIo752uTEM=; b=diEzv7ws8fqmA7LOH9Cj8tvTaymamEDX0CPXVgAWPcM3F6sCYZpYg063DfDslizhc7fDYB Qn5BPVjZcNYJBqTtX1mA+8GfI0C7lUqvO0WY6rNGWkWpz5AicAormXQ8utGFtGx1IXHpO4 x3o2NTI1PtFq2Mcss/DFDnwYEy9NOeU6zSMtKM/KuDlcPUmnXTRwDgfDcupSX0HSOTJ9Uj ZnB2+PsaMNpghOgWRpnxgIhER8hc1hJzmKzDgjY8XNqZnCLPyW/0qc98kcwP86IpMNfkGd tJ4FgDtqPzm3mnHGpvee0ASLCDastlAmaiopBs5EJOwPLpJFS8BV61UHTUqfqQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753499644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uD9ajMfonvAiyCRPUKgUxEHZtChwXUiyQWIo752uTEM=; b=GkEARHC2auLZ6BMGgURY3a5ITmaXAoMkhqRthYZqu4KNMTf1hcODfTcxmjBnOi5/1lewvi uBxaVSvHXmX/UMFXgHJZDqIF5ctfYNAZnZYLC/q78N7DYRO6+VcnIhBJx+EyQp3bgixHru svGyZF6AKAfvYAkgO1E4hRNri3vWJFcTULuj0E/G34ohQBitarY8LXCTfRQz3BXskWnfK9 7VUbt67nK6dXn0dozGOeYPc6NTDHNYFCENnVlG9/DKFfknmSqvraqMVOkfbN7Qi9g47f07 hETidF/BvbPv/kbHHwTyQs5iJYt8HUtH9f6JJCH/2b6UZPoe+wyqrncNA2E8kg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753499644; a=rsa-sha256; cv=none; b=azEi5CqQ9VWw/ACscn/j3XtJTrLWUgE0D/pCxGHxoMb7yC9x3a3eATK/NI9PJfqRX2oBJl LmJiyblKhDY9JL33a8lFWwvLy27e4MPRNYES8OrGlSpGDbSiBEuAO7hIbdbtQvE4GPI+xH t8U3T7lDyV7di8c5UUCoZ1eZqIWK5VYeSNp1QdJye+ho5ATeJDoFICkNFrvqjCumIZj3/A zNj78ANLKQmUDdeb9zTOrh1o/OkVXt1Qb/cKvmWwwmpnPO0xIfxYagwh98Tpn4AiMOKmj/ mwCjYv05QHLrfp4DQD6s+Mv1X9ooOuanzAAt+F/+i+el7LrvWl7XKlttdEyGAQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpqb01DL4z1BhL; Sat, 26 Jul 2025 03:14:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56Q3E4KY002839; Sat, 26 Jul 2025 03:14:04 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56Q3E4PE002836; Sat, 26 Jul 2025 03:14:04 GMT (envelope-from git) Date: Sat, 26 Jul 2025 03:14:04 GMT Message-Id: <202507260314.56Q3E4PE002836@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: cfc595f4a05e - main - jail: tests: cleanup the commands test a bit List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: cfc595f4a05ed6fc690b17adee967e652b8636b3 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=cfc595f4a05ed6fc690b17adee967e652b8636b3 commit cfc595f4a05ed6fc690b17adee967e652b8636b3 Author: Kyle Evans AuthorDate: 2025-07-26 03:13:40 +0000 Commit: Kyle Evans CommitDate: 2025-07-26 03:13:40 +0000 jail: tests: cleanup the commands test a bit We shouldn't be doing setup in a head() function, as this can cause various problems. For instance, in this case, it caused test listing to fail in some cases if we didn't get to execute the cleanup properly by complaining to stderr if the directory could not be created. Switch to using atf_check for sanity checking stdout; most of these expressions are self-explanatory and will make it clear what the problem is. commands.jail.conf contains a hard-coded path that we can avoid, which is probably good to avoid weird conflicts if other tests try to copy it and do the same. Just make a copy of our jail.conf and add the test's $PWD to it to get a generally unique jail root. Finally, simplify the cleanup handler a bit. Reviewed by: jamie Differential Revision: https://reviews.freebsd.org/D51501 --- usr.sbin/jail/tests/commands.jail.conf | 2 -- usr.sbin/jail/tests/jail_basic_test.sh | 35 +++++++++++++++++++--------------- 2 files changed, 20 insertions(+), 17 deletions(-) diff --git a/usr.sbin/jail/tests/commands.jail.conf b/usr.sbin/jail/tests/commands.jail.conf index afd56d1fa5d6..ad152a28b7fe 100644 --- a/usr.sbin/jail/tests/commands.jail.conf +++ b/usr.sbin/jail/tests/commands.jail.conf @@ -4,6 +4,4 @@ exec.prestart = "echo START"; exec.poststart = "env"; persist; -path = "/tmp/test_${name}_root"; - basejail {} diff --git a/usr.sbin/jail/tests/jail_basic_test.sh b/usr.sbin/jail/tests/jail_basic_test.sh index 6498eb1c1fdc..f3c8be4a6595 100755 --- a/usr.sbin/jail/tests/jail_basic_test.sh +++ b/usr.sbin/jail/tests/jail_basic_test.sh @@ -129,38 +129,43 @@ commands_head() { atf_set descr 'Commands jail test' atf_set require.user root - mkdir /tmp/test_basejail_root } commands_body() { + cp "$(atf_get_srcdir)/commands.jail.conf" jail.conf + echo "path = \"$PWD\";" >> jail.conf + # exec.prestart (START) and exec.poststart (env) - atf_check -s exit:0 -o save:stdout -e empty \ - jail -f $(atf_get_srcdir)/commands.jail.conf -qc basejail - grep -E '^START$' stdout || atf_fail "exec.prestart output not found" - grep -E '^JID=[0-9]+' stdout || atf_fail "JID not found in exec.poststart env output" - grep -E '^JNAME=basejail$' stdout || atf_fail "JNAME not found in exec.poststart env output" - grep -E '^JPATH=/tmp/test_basejail_root$' stdout || atf_fail "JPATH not found in exec.poststart env output" + atf_check -o save:stdout -e empty \ + jail -f jail.conf -qc basejail + + # exec.prestart output is missing + atf_check grep -qE '^START$' stdout + # JID was not set in the exec.poststart env + atf_check grep -qE '^JID=[0-9]+' stdout + # JNAME was not set in the exec.poststart env + atf_check grep -qE '^JNAME=basejail$' stdout + # JPATH was not set in the exec.poststart env + atf_check grep -qE "^JPATH=$PWD$" stdout # exec.prestop by jailname atf_check -s exit:0 -o inline:"STOP\n" \ - jail -f $(atf_get_srcdir)/commands.jail.conf -qr basejail + jail -f jail.conf -qr basejail # exec.prestop by jid - jail -f $(atf_get_srcdir)/commands.jail.conf -qc basejail + jail -f jail.conf -qc basejail atf_check -s exit:0 -o inline:"STOP\n" \ - jail -f $(atf_get_srcdir)/commands.jail.conf -qr `jls -j basejail jid` + jail -f jail.conf -qr `jls -j basejail jid` } -commands_cleanup() +commands_cleanup() { - jls -j basejail > /dev/null 2>&1 - if [ $? -e 0 ] - then + if jls -j basejail > /dev/null 2>&1; then jail -r basejail fi - rmdir /tmp/test_basejail_root } + atf_init_test_cases() { atf_add_test_case "basic" From nobody Sat Jul 26 03:14:05 2025 X-Original-To: dev-commits-src-all@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 4bpqb1395hz62xqq; Sat, 26 Jul 2025 03:14: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpqb12F0Lz3cNF; Sat, 26 Jul 2025 03:14:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753499645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ibWzX7SSYVruR4u9UGSMsjW4/Lc7yr9ic3/F8n/GVuw=; b=sFSFIPRiu3RQo3hhitIBzoyZRCTuU7M7AdGgRdkcGyK0izYYAU72xtRofU13o1tWJV6rkY Uo+mJAkFdmreNsfCqaq1UA6YWHE87P45oDyj2hNxjiWLQ7DB4gWxoqpSZabt1vM546IWQQ fO947rhznPy6tii7j8q6dNFCy8dLyi9R+gqCz0xtAEG6TgpGnls5dtn7S3GlzdIGJ754/U gIm22QMJfim05NrCRj9UrD+wttFik2wJx5N3mbKlj2/m1SLZ9169ZguGfZlqrIjwMtBHyI bDavfPRLFuBNxDJPA7P4KrC7Iof1+ChZYMF6t5pc+i806OJu6LERLXTIeM4/2w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753499645; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ibWzX7SSYVruR4u9UGSMsjW4/Lc7yr9ic3/F8n/GVuw=; b=Nk5Vr31U/cw9Qc28RleQZSBsxTXDNmsI+l71CGlNPIQTE1p0egB7lxi3imFdCLMFfBiFyq 9G61bJ2wJKUcLpcvgH6+SsuFcMgyWkT/3L1cMsfhqv7LLkFStTSNTvYdjOxAoC3z5PbynP OVzL0PlHjVEvapdV16q3m9xsjzmQFXehmR+uOu1XyWFBP7d3R5b76/CxNfkPE3Lfe9wbEt rk0YcMtXYjZL6fkcJuJ9+2YTxGRMNMYkp7+OXcdTEEtJSMgD3AqqXnE/uiTZfONZb1XNUr o1Et5x3uQw8L8+5egRnavQq4CLGjuCCrYoPnhk+yPJEOG87bXAm9GDgiG4lsGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753499645; a=rsa-sha256; cv=none; b=IjncXZYgFIgDJMoDDpRvea9FHsbIDCd1HtOl+lnMS+DjsX+dTjqb/XmBdzV2lOZzbbirNM 3rjWonLvAVx5z2yK27DbrlOjIEndNBnzw0unlUdKSg4CWqXmRa6y5M1oRYQZNPV+1ITx7L 3l0SNfFc+5RyRTm2kwKvq1QmzOOkjqTUZjBYWaGK0SRyHWtYawBIKy4viysbuJSYMvBhXQ ZNJxenVTzI1Jj1O/Y2OpmhaEu+pYDpaD04msiXnOP6fI4xT1wck+i1a4zaxI1MnDwF5pNo wwtTgGSJzxpBVfc843AyiIuP4jL+raEGsBpknTdR76PXjNcj7+uU73GprxeVcg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpqb11gQQz1Bcr; Sat, 26 Jul 2025 03:14:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56Q3E5w2002872; Sat, 26 Jul 2025 03:14:05 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56Q3E5cY002869; Sat, 26 Jul 2025 03:14:05 GMT (envelope-from git) Date: Sat, 26 Jul 2025 03:14:05 GMT Message-Id: <202507260314.56Q3E5cY002869@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: dbaaadd4373a - main - jls: minor simplification to arg handling List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: dbaaadd4373a725950ad11e578dab61537b7c4f2 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=dbaaadd4373a725950ad11e578dab61537b7c4f2 commit dbaaadd4373a725950ad11e578dab61537b7c4f2 Author: Kyle Evans AuthorDate: 2025-07-26 03:13:41 +0000 Commit: Kyle Evans CommitDate: 2025-07-26 03:13:41 +0000 jls: minor simplification to arg handling It's easier to reason about the state of argc/argv if we just augment them by optind after our getopt() loop. No functional change, but this sets the stage for another change to add a `-c` mode to (c)heck for the existence of a jail quietly without the caller having to worry about spurious output. Reviewed by: jamie Differential Revision: https://reviews.freebsd.org/D51540 --- usr.sbin/jls/jls.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/usr.sbin/jls/jls.c b/usr.sbin/jls/jls.c index bd193a69c458..a1d1716713aa 100644 --- a/usr.sbin/jls/jls.c +++ b/usr.sbin/jls/jls.c @@ -140,8 +140,11 @@ main(int argc, char **argv) ip4_ok = feature_present("inet"); #endif + argc -= optind; + argv += optind; + /* Add the parameters to print. */ - if (optind == argc) { + if (argc == 0) { if (pflags & (PRINT_HEADER | PRINT_NAMEVAL)) add_param("all", NULL, (size_t)0, NULL, JP_USER); else if (pflags & PRINT_VERBOSE) { @@ -179,9 +182,8 @@ main(int argc, char **argv) } } else { pflags &= ~PRINT_VERBOSE; - while (optind < argc) - add_param(argv[optind++], NULL, (size_t)0, NULL, - JP_USER); + for (i = 0; i < argc; i++) + add_param(argv[i], NULL, (size_t)0, NULL, JP_USER); } if (pflags & PRINT_SKIP) { From nobody Sat Jul 26 03:14:06 2025 X-Original-To: dev-commits-src-all@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 4bpqb25z17z62yB7; Sat, 26 Jul 2025 03:14: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpqb23Z7zz3cBd; Sat, 26 Jul 2025 03:14:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753499646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Dok1xo4iwILFvIj03H3RKivfY6A6/FZN5VtS+Gn0VU=; b=aTWmLEg2PLfkHVh2pxmEvSPjAdOJsvY0nx2MH1wZhVaVQ5IIhFE95kvJEuUfIwT5XO237v 482PC+bzn1fbx3JaBkMwMqQmkso4H1IPdAJK2axtjReZZj+RgsSro8kjAv/ckrmck4OIxQ lUrjrJ8Jt/am/Wr/Qm267JWMv6Ke8YdnraROHfEZm7xRNo+EvB5R4pnBrztiOGHGuR4B5Z kqD2mOwPRnBXNi0gICK+Jh6TAiNFafoH+weExcEU81lRPbFBSv1xx3d/Vx4coO75cLYp1u 05ifu8PTaD4xNPeGCY6w0NtTLqv24m1fksvQhwTLDZUEJkASlv+gdvCzTSY9DQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753499646; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=3Dok1xo4iwILFvIj03H3RKivfY6A6/FZN5VtS+Gn0VU=; b=R5WOG01oImXUzGEjAQsULPM5rMra3SeY0XSYckqytA1FxvV0O5p01XTii9uiglOQ23/9rx OPEf53NgG+I4t+ucMmNTy4oTQr4LA23v4S/saxogXW3Qotr7piw4adE9bfgKS7vIJAVXBG EdbMfMn+HD5RNkDF06AniJ93K+jT4wYEJdSWrBO3Uj3PVju3JeY5yXOxepTW4efk3TpKke Ira8ZTWZtaKyWXUlkHzkor9NLbs524m56Zy/CObEQNnZ7JEcJiLJjw0992R9pwMhXVY0B7 Zww1FMXOoleYH2Kbx55dzuUJzw8Gf711WCrXgv/2qPigmQYFbxkNTA9As8V0RQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753499646; a=rsa-sha256; cv=none; b=rkEPz/LUTNBhzD4jwgKwv5SfZTmy5cAAvFKdwpG74xRkf+5WjqvMLaiiF4T+ouTuGVeweV PK99CVVwEZxuFB/r40xIpyj094/BeKJSSZ3+C3Q/MuRiqqJaLovwWPlWzbo7dwn43zUO04 r2aJMqaUZ1l0BU4vWJxT5v6pwI2Qz7aZeZVH12dmpY2jwMPTWwZ6fzo8YGZG/siyicNKQy YFE+dNufuXJeO37dN171yqLo+2+BQ41QeokqFNBCmXaYxEVXxk6PjBl1AmBo38lqFEiXWm urTEC07NBBVZFJki1ow/IkulviCq2sBDmbcL6izYYwBloXvOVTuvE32TdeHmfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpqb22bJmz1BQ8; Sat, 26 Jul 2025 03:14:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56Q3E6o9002905; Sat, 26 Jul 2025 03:14:06 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56Q3E68k002902; Sat, 26 Jul 2025 03:14:06 GMT (envelope-from git) Date: Sat, 26 Jul 2025 03:14:06 GMT Message-Id: <202507260314.56Q3E68k002902@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 1d8590371049 - main - jls: add a -c mode to check for a jail's existence List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 1d8590371049bb14a6410fa83cd03d9eca32f764 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=1d8590371049bb14a6410fa83cd03d9eca32f764 commit 1d8590371049bb14a6410fa83cd03d9eca32f764 Author: Kyle Evans AuthorDate: 2025-07-26 03:13:43 +0000 Commit: Kyle Evans CommitDate: 2025-07-26 03:13:43 +0000 jls: add a -c mode to check for a jail's existence This is intended to be primarily used in scripts that want to check if a jail exists before taking some action -- for instance, the jail(8) test cleanup functions that want to remove the jail if it still exists. Having a mode that limits its output for their usage is useful both for cleaner scripts and also to avoid masking real problems. Reviewed by: jamie Differential Revision: https://reviews.freebsd.org/D51541 --- usr.sbin/jls/jls.8 | 20 ++++++++++++++++++-- usr.sbin/jls/jls.c | 48 ++++++++++++++++++++++++++++++++++++++++++++---- 2 files changed, 62 insertions(+), 6 deletions(-) diff --git a/usr.sbin/jls/jls.8 b/usr.sbin/jls/jls.8 index f7a5eeb321ef..715033082963 100644 --- a/usr.sbin/jls/jls.8 +++ b/usr.sbin/jls/jls.8 @@ -23,7 +23,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd February 13, 2025 +.Dd July 25, 2025 .Dt JLS 8 .Os .Sh NAME @@ -35,6 +35,10 @@ .Op Fl dhNnqsv .Op Fl j Ar jail .Op Ar parameter ... +.Nm +.Fl c +.Op Fl d +.Fl j Ar jail .Sh DESCRIPTION The .Nm @@ -54,11 +58,21 @@ for a description of some core parameters. If no .Ar parameters or any of the options -.Fl hns +.Fl chns are given, the following four columns will be printed: jail identifier (jid), IP address (ip4.addr), hostname (host.hostname), and path (path). .Pp +When the +.Fl c +option is used, +.Nm +will not emit any output except for usage errors. +This mode is intended solely to check for a single jail's existence, and it does +not accept any +.Ar parameter +or print-option flags. +.Pp The following options are available: .Bl -tag -width indent .It Fl -libxo @@ -68,6 +82,8 @@ in a selection of different human and machine readable formats. See .Xr xo_options 7 for details on command line arguments. +.It Fl c +Only check for the jail's existence. .It Fl d List .Va dying diff --git a/usr.sbin/jls/jls.c b/usr.sbin/jls/jls.c index a1d1716713aa..4f697a5bb382 100644 --- a/usr.sbin/jls/jls.c +++ b/usr.sbin/jls/jls.c @@ -37,6 +37,7 @@ #include #include +#include #include #include #include @@ -59,6 +60,7 @@ #define PRINT_SKIP 0x10 #define PRINT_VERBOSE 0x20 #define PRINT_JAIL_NAME 0x40 +#define PRINT_EXISTS 0x80 static struct jailparam *params; static int *param_parent; @@ -81,6 +83,14 @@ static void quoted_print(int pflags, char *name, char *value); static void emit_ip_addr_list(int af_family, const char *list_name, struct jailparam *param); +static void +usage(void) +{ + xo_errx(1, + "usage: jls [-dhNnqv] [-j jail] [param ...]\n" + " jls -c [-d] -j jail"); +} + int main(int argc, char **argv) { @@ -94,12 +104,15 @@ main(int argc, char **argv) xo_set_version(JLS_XO_VERSION); jname = NULL; pflags = jflags = jid = 0; - while ((c = getopt(argc, argv, "adj:hNnqsv")) >= 0) + while ((c = getopt(argc, argv, "acdj:hNnqsv")) >= 0) switch (c) { case 'a': case 'd': jflags |= JAIL_DYING; break; + case 'c': + pflags |= PRINT_EXISTS; + break; case 'j': jid = strtoul(optarg, &ep, 10); if (!jid || *ep) { @@ -130,7 +143,7 @@ main(int argc, char **argv) PRINT_VERBOSE; break; default: - xo_errx(1, "usage: jls [-dhNnqv] [-j jail] [param ...]"); + usage(); } #ifdef INET6 @@ -144,7 +157,24 @@ main(int argc, char **argv) argv += optind; /* Add the parameters to print. */ - if (argc == 0) { + if ((pflags & PRINT_EXISTS) != 0) { + if ((pflags & ~PRINT_EXISTS) != 0) { + xo_warnx("-c is incompatible with other print options"); + usage(); + } else if (argc != 0) { + xo_warnx("-c does not accept non-option arguments"); + usage(); + } else if (jid == 0 && jname == NULL) { + xo_warnx("-j jail to check must be provided for -c"); + usage(); + } + + /* + * Force libxo to be silent, as well -- we're only wanting our + * exit status. + */ + xo_set_style(NULL, XO_STYLE_TEXT); + } else if (argc == 0) { if (pflags & (PRINT_HEADER | PRINT_NAMEVAL)) add_param("all", NULL, (size_t)0, NULL, JP_USER); else if (pflags & PRINT_VERBOSE) { @@ -239,9 +269,17 @@ main(int argc, char **argv) xo_open_list("jail"); /* Fetch the jail(s) and print the parameters. */ if (jid != 0 || jname != NULL) { - if (print_jail(pflags, jflags) < 0) + if (print_jail(pflags, jflags) < 0) { + /* + * We omit errors from existential issues if we're just + * doing a -c check that the jail exists. + */ + if (pflags & PRINT_EXISTS) + exit(1); xo_errx(1, "%s", jail_errmsg); + } } else { + assert((pflags & PRINT_EXISTS) == 0); for (lastjid = 0; (lastjid = print_jail(pflags, jflags)) >= 0; ) ; @@ -392,6 +430,8 @@ print_jail(int pflags, int jflags) jid = jailparam_get(params, nparams, jflags); if (jid < 0) return jid; + else if (pflags & PRINT_EXISTS) + return 0; xo_open_instance("jail"); From nobody Sat Jul 26 03:14:07 2025 X-Original-To: dev-commits-src-all@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 4bpqb36Gttz62y7s; Sat, 26 Jul 2025 03:14: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpqb34S86z3c8q; Sat, 26 Jul 2025 03:14:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753499647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G1z8oIs1aXxyLw/WOtOnm/Uc1f9I0pmhJY6qaPi/8Ok=; b=EXkwgBK4ACrtNhytZnWl1H0IIPPBKq2oqabqETLhkgIhnwT3TMDQB9EIYusR21KBorMhCj GljTiZ0pfAMOlnj5IXNMUpN1yNGIpHeH4mms8fsp0GLeSbh7ZCJIE+gonyEjzmO6buYoBs 5sckeEfqdG5IxNkkAXWXFVprBGiN0wiT2v4/n5GoRFKtI29Bx6Ynb+LgzoIE+7SvD5Fw8V N8sBgSrS/pBYDKMn8qDXcvTmXr7zZAahTz/VY4V1n4fKk/H8cDd9T1qKMR9SQZsRZ7Vq0E pltTFbNyjtejy1XjYq9/7MaHL4mM0Roe5Z/tB38ZPJ4hOGTr7ToHAkR35LeDGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753499647; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G1z8oIs1aXxyLw/WOtOnm/Uc1f9I0pmhJY6qaPi/8Ok=; b=R47cQ0Zcow6FKHAX7pKGUbLbhLVdXmiJQrk/pJ2/t2Vrt3WCTdT07JebFBUhmModqNy8cf MtXSi6NVOc6GsTTa2o84yOTKsNhnsqhODud6/Wy1PEZc015UcYA5JzHnV4+85CEDVivESl 5/K+HHpMHKKACg4t8HxMFtTZaqHl6JgQYvq6HhUS/jfZiW8F82D734zxtOpj3biMwubAnZ aZJTPbOoNgEukpdPcp/Ivir099ehBmRF8FkjHUwvn8oiVSCRqBUWcqq+e9aD1HyymCTUQk xw0jAaYXdILDUJaN3Sv4vM3wbNUe0nIRVNqAB9QFE6llleqmIIf0hBcUBrltPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753499647; a=rsa-sha256; cv=none; b=OgNRp6pzIFM7XuYI3125lqyOGrr4ajcD4Nl2xkckrTgPXIE+hmj2xJqbXdL0+vylWDR6n+ yXCNDqi6UW7eV7TdIxK9f92ZVXwr5MtpM3wcsilOQJtlMEFJDqlL8YVQc5UlHPW4Z2oTR8 lu7rYeiOFZA+Lre9bpGapsvKySmJOSy/7dF7j7cOvnIFiESGr+UmX6rDv2UAxpabUSnjQ5 E+sPy2wiNX7f0SPjprb/dFMyCXn+utIH/DsLFviPDDutKg0runGFT5u9FIYHWX7GxL67wl DKzlmkkrxmvyuvFzWe1zc4uG4huFyNNt3mVf2Z6rKiqAe1wF16IhxGliM3tnsQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpqb33rvCz1B38; Sat, 26 Jul 2025 03:14:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56Q3E7Bi002947; Sat, 26 Jul 2025 03:14:07 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56Q3E72I002944; Sat, 26 Jul 2025 03:14:07 GMT (envelope-from git) Date: Sat, 26 Jul 2025 03:14:07 GMT Message-Id: <202507260314.56Q3E72I002944@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 02944d8c4969 - main - jail: consistently populate the KP_JID and KP_NAME parameters List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 02944d8c4969ffe97fcf84cb2ccb672e828c1d04 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=02944d8c4969ffe97fcf84cb2ccb672e828c1d04 commit 02944d8c4969ffe97fcf84cb2ccb672e828c1d04 Author: Kyle Evans AuthorDate: 2025-07-26 03:13:44 +0000 Commit: Kyle Evans CommitDate: 2025-07-26 03:13:44 +0000 jail: consistently populate the KP_JID and KP_NAME parameters The gaps here, specifically, were: - When we have to discover a running jail's jid from name, we should populate the missing jid param - When we populate jid/name from the config, if the name is a jid we wouldn't populate the name; now we do both. - When we create a jail, we should populate jid and name with whatever details we have now that we didn't both. As a consequence, we can cleanup a few things: - vnet.interface and zfs.dataset can just always use the jid - Trying to populate JNAME should always work now, where it would be a little crashy before if you create a jail that didn't have a name or jid on the command line - We can simplify the just-prior JID population now that we'll keep a stringified jid in our intparams. This primarily fixes the below, but the issues with vnet.interface and zfs.dataset were pre-existing. Fixes: d8f021add40c3 ("jail: add JID, JNAME and JPATH to env [...]") Reviewed by: jamie Differential Revision: https://reviews.freebsd.org/D51502 --- usr.sbin/jail/command.c | 38 ++++++---- usr.sbin/jail/config.c | 13 +++- usr.sbin/jail/jail.c | 7 ++ usr.sbin/jail/tests/jail_basic_test.sh | 129 +++++++++++++++++++++++++++++++++ 4 files changed, 173 insertions(+), 14 deletions(-) diff --git a/usr.sbin/jail/command.c b/usr.sbin/jail/command.c index 8ea3f3ee8795..9da4fe51673a 100644 --- a/usr.sbin/jail/command.c +++ b/usr.sbin/jail/command.c @@ -290,7 +290,7 @@ run_command(struct cfjail *j) const struct cfstring *comstring, *s; login_cap_t *lcap; const char **argv; - char *acs, *ajidstr, *cs, *comcs, *devpath; + char *acs, *cs, *comcs, *devpath; const char *jidstr, *conslog, *fmt, *path, *ruleset, *term, *username; enum intparam comparam; size_t comlen, ret; @@ -332,6 +332,25 @@ run_command(struct cfjail *j) printf("%d\n", j->jid); if (verbose >= 0 && (j->name || verbose > 0)) jail_note(j, "created\n"); + + /* + * Populate our jid and name parameters if they were not + * provided. This simplifies later logic that wants to + * use the jid or name to be able to do so reliably. + */ + if (j->intparams[KP_JID] == NULL) { + char ljidstr[16]; + + (void)snprintf(ljidstr, sizeof(ljidstr), "%d", + j->jid); + add_param(j, NULL, KP_JID, ljidstr); + } + + /* This matches the kernel behavior. */ + if (j->intparams[KP_NAME] == NULL) + add_param(j, j->intparams[KP_JID], KP_NAME, + NULL); + dep_done(j, DF_LIGHT); } return 0; @@ -456,8 +475,7 @@ run_command(struct cfjail *j) argv[0] = _PATH_IFCONFIG; argv[1] = comstring->s; argv[2] = down ? "-vnet" : "vnet"; - jidstr = string_param(j->intparams[KP_JID]); - argv[3] = jidstr ? jidstr : string_param(j->intparams[KP_NAME]); + argv[3] = string_param(j->intparams[KP_JID]); argv[4] = NULL; break; @@ -592,9 +610,7 @@ run_command(struct cfjail *j) case IP_ZFS_DATASET: argv = alloca(4 * sizeof(char *)); - jidstr = string_param(j->intparams[KP_JID]) ? - string_param(j->intparams[KP_JID]) : - string_param(j->intparams[KP_NAME]); + jidstr = string_param(j->intparams[KP_JID]); fmt = "if [ $(/sbin/zfs get -H -o value jailed %s) = on ]; then /sbin/zfs jail %s %s || echo error, attaching %s to jail %s failed; else echo error, you need to set jailed=on for dataset %s; fi"; comlen = strlen(fmt) + 2 * strlen(jidstr) @@ -796,14 +812,10 @@ run_command(struct cfjail *j) endpwent(); } if (!injail) { - if (asprintf(&ajidstr, "%d", j->jid) == -1) { - jail_warnx(j, "asprintf jid=%d: %s", j->jid, - strerror(errno)); - exit(1); - } - setenv("JID", ajidstr, 1); - free(ajidstr); + if (string_param(j->intparams[KP_JID])) + setenv("JID", string_param(j->intparams[KP_JID]), 1); setenv("JNAME", string_param(j->intparams[KP_NAME]), 1); + path = string_param(j->intparams[KP_PATH]); setenv("JPATH", path ? path : "", 1); } diff --git a/usr.sbin/jail/config.c b/usr.sbin/jail/config.c index 3af0088626c9..70de82e662e7 100644 --- a/usr.sbin/jail/config.c +++ b/usr.sbin/jail/config.c @@ -156,11 +156,14 @@ load_config(const char *cfname) TAILQ_CONCAT(&opp, &j->params, tq); /* * The jail name implies its "name" or "jid" parameter, - * though they may also be explicitly set later on. + * though they may also be explicitly set later on. After we + * collect other parameters, we'll go back and ensure they're + * both set if we need to do so here. */ add_param(j, NULL, strtol(j->name, &ep, 10) && !*ep ? KP_JID : KP_NAME, j->name); + /* * Collect parameters for the jail, global parameters/variables, * and any matching wildcard jails. @@ -180,6 +183,14 @@ load_config(const char *cfname) TAILQ_FOREACH(p, &opp, tq) add_param(j, p, 0, NULL); + /* + * We only backfill if it's the name that wasn't set; if it was + * the jid, we can assume that will be populated later when the + * jail is created or found. + */ + if (j->intparams[KP_NAME] == NULL) + add_param(j, j->intparams[KP_JID], KP_NAME, NULL); + /* Resolve any variable substitutions. */ pgen = 0; TAILQ_FOREACH(p, &j->params, tq) { diff --git a/usr.sbin/jail/jail.c b/usr.sbin/jail/jail.c index 27769cc14958..46cabf76ae11 100644 --- a/usr.sbin/jail/jail.c +++ b/usr.sbin/jail/jail.c @@ -890,7 +890,14 @@ running_jid(struct cfjail *j) j->jid = -1; return; } + j->jid = jail_get(jiov, 2, 0); + if (j->jid > 0 && j->intparams[KP_JID] == NULL) { + char jidstr[16]; + + (void)snprintf(jidstr, sizeof(jidstr), "%d", j->jid); + add_param(j, NULL, KP_JID, jidstr); + } } static void diff --git a/usr.sbin/jail/tests/jail_basic_test.sh b/usr.sbin/jail/tests/jail_basic_test.sh index f3c8be4a6595..509900e8569c 100755 --- a/usr.sbin/jail/tests/jail_basic_test.sh +++ b/usr.sbin/jail/tests/jail_basic_test.sh @@ -165,6 +165,133 @@ commands_cleanup() fi } +atf_test_case "jid_name_set" "cleanup" +jid_name_set_head() +{ + atf_set descr 'Test that one can set both the jid and name in a config file' + atf_set require.user root +} + +find_unused_jid() +{ + : ${JAIL_MAX=999999} + + # We'll start at a higher jid number and roll through the space until + # we find one that isn't taken. We start high to avoid racing parallel + # activity for the 'next available', though ideally we don't have a lot + # of parallel jail activity like that. + jid=5309 + while jls -cj "$jid"; do + if [ "$jid" -eq "$JAIL_MAX" ]; then + atf_skip "System has too many jail, cannot find free slot" + fi + + jid=$((jid + 1)) + done + + echo "$jid" | tee -a jails.lst +} +clean_jails() +{ + if [ ! -s jails.lst ]; then + return 0 + fi + + while read jail; do + if jls -e -j "$jail"; then + jail -r "$jail" + fi + done < jails.lst +} + +jid_name_set_body() +{ + local jid=$(find_unused_jid) + + echo "basejail" >> jails.lst + echo "$jid { name = basejail; persist; }" > jail.conf + atf_check -o match:"$jid: created" jail -f jail.conf -c "$jid" + atf_check -o match:"$jid: removed" jail -f jail.conf -r "$jid" + + echo "basejail { jid = $jid; persist; }" > jail.conf + atf_check -o match:"basejail: created" jail -f jail.conf -c basejail + atf_check -o match:"basejail: removed" jail -f jail.conf -r basejail +} + +jid_name_set_cleanup() +{ + clean_jails +} + +atf_test_case "param_consistency" "cleanup" +param_consistency_head() +{ + atf_set descr 'Test for consistency in jid/name params being set implicitly' + atf_set require.user root +} + +param_consistency_body() +{ + local iface jid + + echo "basejail" >> jails.lst + + # Most basic test: exec.poststart running a command without a jail + # config. This would previously crash as we only had the jid and name + # as populated at creation time. + atf_check jail -c path=/ exec.poststart="true" command=/usr/bin/true + + iface=$(ifconfig lo create) + atf_check test -n "$iface" + echo "$iface" >> interfaces.lst + + # Now do it again but exercising IP_VNET_INTERFACE, which is an + # implied command that wants to use the jid or name. This would crash + # as neither KP_JID or KP_NAME are populated when a jail is created, + # just as above- just at a different spot. + atf_check jail -c \ + path=/ vnet=new vnet.interface="$iface" command=/usr/bin/true + + # Test that a jail that we only know by name will have its jid resolved + # and added to its param set. + echo "basejail {path = /; exec.prestop = 'echo STOP'; persist; }" > jail.conf + + atf_check -o ignore jail -f jail.conf -c basejail + atf_check -o match:"STOP" jail -f jail.conf -r basejail + + # Do the same sequence as above, but use a jail with a jid-ish name. + jid=$(find_unused_jid) + echo "$jid {path = /; exec.prestop = 'echo STOP'; persist; }" > jail.conf + + atf_check -o ignore jail -f jail.conf -c "$jid" + atf_check -o match:"STOP" jail -f jail.conf -r "$jid" + + # Ditto, but now we set a name for that jid-jail. + echo "$jid {name = basejail; path = /; exec.prestop = 'echo STOP'; persist; }" > jail.conf + + atf_check -o ignore jail -f jail.conf -c "$jid" + atf_check -o match:"STOP" jail -f jail.conf -r "$jid" + + # Confirm that we have a valid jid available in exec.poststop. It's + # probably debatable whether we should or not. + echo "basejail {path = /; exec.poststop = 'echo JID=\$JID'; persist; }" > jail.conf + atf_check -o ignore jail -f jail.conf -c basejail + jid=$(jls -j basejail jid) + + atf_check -o match:"JID=$jid" jail -f jail.conf -r basejail + +} + +param_consistency_cleanup() +{ + clean_jails + + if [ -f "interfaces.lst" ]; then + while read iface; do + ifconfig "$iface" destroy + done < interfaces.lst + fi +} atf_init_test_cases() { @@ -172,4 +299,6 @@ atf_init_test_cases() atf_add_test_case "list" atf_add_test_case "nested" atf_add_test_case "commands" + atf_add_test_case "jid_name_set" + atf_add_test_case "param_consistency" } From nobody Sat Jul 26 05:02:41 2025 X-Original-To: dev-commits-src-all@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 4bpt0K55rtz6340B; Sat, 26 Jul 2025 05:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpt0K4BC4z3PWl; Sat, 26 Jul 2025 05:02:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753506161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rxHxmUc+Ut/twRCzW/2LkflVxh339u/zmkSVgdTMC1Y=; b=Ug5BjgDm9nWKznavqpPxPSu3o2SS0EVknSh+Hpqavd8oWs3N/9xhbBVfoQcYLpJSgcIlO2 BDVWEJbUh3Dlx+jaUY0A5QHaj7Cd6VjG0niP8RnbSK7pYWJ2T81YZo75Qa4k5mYFSCjrPO IBdsM1dem9bWpanP+ku7MfXkTsX3rxVHcocvHsX4RMOXsikhQS5G/1nuxuspbT/2VSKZtd MX60sbE7N2IBRx5YdduyWKmo2H38IwGOdl41d0nyXb+Tl0Icxgm3RYBpoXPPu1OZ1IljpG ZCGkfGwzWRihtCzU9QE8AcBp79kokG6bz6pRJzUibtPq8fSiHmzx8NWAVIceWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753506161; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rxHxmUc+Ut/twRCzW/2LkflVxh339u/zmkSVgdTMC1Y=; b=agdA11jQdfobmg43dRBCLct7tA9Zlf9XDEW3b6ksGMpm2KQpYko/PIh7NOR5g4sW3LCNqy 4VoC1XVzlgXhORIrz1lZdhXY0i9PBl0IhLY/Vpz/eFr+8KsCh08sQcwNSU6KtrqGHni1pi 5yWweKMLW+1Fk2AaLSdbWIPQFcadwgFgDGtvM4GaZOatjgAIRCxrWOpXQyMwgLKSrivmaD A8t+7lom4VybixoxUcZPd0OQRsRiMT+3yljffY8u7WIMejKaF3yQyuKnN0ctTZcBCZGsOD 5gQO682gh9lcu/qHEerJW1JEitp3oTvrvopJlyOYE4Ec6OBBlkZ0WY7x/zkuJw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753506161; a=rsa-sha256; cv=none; b=GiFcSZngZv2mvKg9VyYbcnFffbcVkA5yczsaf6vHAwkhPapPDhnC2QbjIQ/Xq9rH3KLifT 4FymOW1jNM4874unomBizATivJkUGfH2UviatyQzg+FL+XW8Im7CbcBpC5K2FXcilmU+ZW Vfi3pNwbut7fTS/Aw4X72nhx32AioCMTc5BAykLV5Y42lbeBu3BDsj/AI5KMRVZqKDlqqb /lcTkVDTVRXPytTQfsZ+u43jHBMqa5wAomX8bc8QnUkCSv7o/c2M6cojYkO+Q1941SdVIS jMDOXSj4x2X5cp/RkaJBAdGZAYoH3g5uh7JdVVhaUR4RjkEQQRQcfc2gR40r2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpt0K3hM3z139; Sat, 26 Jul 2025 05:02:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56Q52ftl010443; Sat, 26 Jul 2025 05:02:41 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56Q52fOT010440; Sat, 26 Jul 2025 05:02:41 GMT (envelope-from git) Date: Sat, 26 Jul 2025 05:02:41 GMT Message-Id: <202507260502.56Q52fOT010440@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: 1f2c178e5688 - main - find: Use formats that work on 32-bit too... List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 1f2c178e5688cac21d61ce240a736652ddf02265 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=1f2c178e5688cac21d61ce240a736652ddf02265 commit 1f2c178e5688cac21d61ce240a736652ddf02265 Author: Warner Losh AuthorDate: 2025-07-26 04:58:49 +0000 Commit: Warner Losh CommitDate: 2025-07-26 05:02:31 +0000 find: Use formats that work on 32-bit too... Sponsored by: Netflix --- usr.bin/find/printf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.bin/find/printf.c b/usr.bin/find/printf.c index 6ca018d58f34..671d1d1dbb9a 100644 --- a/usr.bin/find/printf.c +++ b/usr.bin/find/printf.c @@ -230,13 +230,13 @@ do_printf(PLAN *plan, FTSENT *entry, FILE *fout) break; } case 'k': /* kbytes used by file */ - fprintf(fp, "%ld", sb->st_blocks / 2); + fprintf(fp, "%jd", (intmax_t)sb->st_blocks / 2); break; case 'b': /* blocks used by file */ - fprintf(fp, "%ld", sb->st_blocks); + fprintf(fp, "%jd", (intmax_t)sb->st_blocks); break; case 's': /* size in bytes of file */ - fprintf(fp, "%zu", sb->st_size); + fprintf(fp, "%ju", (uintmax_t)sb->st_size); break; case 'S': /* sparseness of file */ fprintf(fp, "%3.1f", @@ -246,7 +246,7 @@ do_printf(PLAN *plan, FTSENT *entry, FILE *fout) fprintf(fp, "%ld", entry->fts_level); break; case 'D': /* device number */ - fprintf(fp, "%lu", sb->st_dev); + fprintf(fp, "%ju", (uintmax_t)sb->st_dev); break; case 'F': /* Filesystem type */ errx(1, "%%%c is unimplemented", c); @@ -254,10 +254,10 @@ do_printf(PLAN *plan, FTSENT *entry, FILE *fout) fprintf(fp, "%s", entry->fts_accpath); break; case 'i': /* inode # */ - fprintf(fp, "%lu", sb->st_ino); + fprintf(fp, "%ju", (uintmax_t)sb->st_ino); break; case 'n': /* number of hard links */ - fprintf(fp, "%lu", sb->st_nlink); + fprintf(fp, "%ju", (uintmax_t)sb->st_nlink); break; case 'y': /* -type of file, incl 'l' */ errx(1, "%%%c is unimplemented", c); From nobody Sat Jul 26 06:12:13 2025 X-Original-To: dev-commits-src-all@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 4bpvXY6K5hz6379k; Sat, 26 Jul 2025 06:12:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpvXY4F0Mz3pRQ; Sat, 26 Jul 2025 06:12:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753510333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hMnDf3M46PwQ3UM5hEpBYpXcSGUvX95g0yiAyhtQeyU=; b=qZ5VCQT3Ii36ygggYUwjw1c1avb3pJGLQGhP5985xlVFLb+jUeUPVAyaKUG9LkWqOr7FD2 O0yHxLyAqHrb0qkOu/ekabyKqFt13XytKNIb37Mcl87nT9t95YQAKN8L3ffsedUINSq/Ha jukln7QTZJ85GU+HCxAo0ZLVbliz3pbYphdGtbNc2w1ZtXtKlEueyo863tinHyR41knkdZ cPmlzLY0hlzp9iNWVPC7LuTzCU9PWKNt8MzMw2qpGU/lJ5mUK13EDR4kXTQ8ly6RwIIfxH 57tjCmmAOVC0TKAZzVxIb0lLcJpDNOI6dlXhGkqr3rwYyv+bJiV27m+Jk2Le1Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753510333; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hMnDf3M46PwQ3UM5hEpBYpXcSGUvX95g0yiAyhtQeyU=; b=LzHgs/chm7FJzPR05DfLH3P2zPhG5FIawBmQjnl2QZPmV43Ns0LA/q40dq9MqLvGybFBNY mbfl8C8QDnEicLW98UeZZim5KfDz1aYDTopSLVI3Xt91soVjlVHM8Rz1fhDArpfpP2yGEy C2peOVB+68xSlgHUOfbmjT6xdSADUw5luGmTO0Tmjofw6ze6SbwobeGfZXeWCBSef95tr1 9+gw8ug0T63tTf3Ntu7lZP58Um6BA/R1QLiUllLraGumIzyK4/tyeQAnBVkHlkFlwJDg69 h5slgH/sDTl1FgsJ3eagYkKGHJH9QGWxuAzCUqSWl5U5mFnADg9rd9WLccV2Qw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753510333; a=rsa-sha256; cv=none; b=yNShn1rbTZ8srQtsYHFJzN++OAC2XraEnflblQZF3ZcgwL7WbNwtB9hWpaZBKPvTpxKKpw zXDx2XMJOGu65P+qiyq6J9helPbLebg8N54TMXTTQIl7btK4GETcgJErEzdcut/qvUs8t8 HTOqduw86iwImoDkkjGBfK2s87HatEcxyfT6/utmNaBRi0uG99IIQGw3YIWk2o/+ku09rs BXmrnHJ//xQK7wt00IH1pOncG1ssE+fdx0j6KM2vRUAxBV5OVfAZipcSYUCZF6ifulC06K LR+QlYQnodSrSlFVpQye3azwvytiFHvbn4aMGkza2oACIzbu7oynADrMnHYOsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpvXY3rBdz2Tn; Sat, 26 Jul 2025 06:12:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56Q6CD8e036843; Sat, 26 Jul 2025 06:12:13 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56Q6CDxm036840; Sat, 26 Jul 2025 06:12:13 GMT (envelope-from git) Date: Sat, 26 Jul 2025 06:12:13 GMT Message-Id: <202507260612.56Q6CDxm036840@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 48fd05999b0f - main - chroot: don't clobber the egid with the first supplemental group List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 48fd05999b0f8e822fbf7069779378d103a35f5c Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=48fd05999b0f8e822fbf7069779378d103a35f5c commit 48fd05999b0f8e822fbf7069779378d103a35f5c Author: Kyle Evans AuthorDate: 2025-07-26 06:11:58 +0000 Commit: Kyle Evans CommitDate: 2025-07-26 06:11:58 +0000 chroot: don't clobber the egid with the first supplemental group There are two problems here, really: 1.) If -G is specified, the egid of the runner will get clobbered by the first supplemental group 2.) If both -G and -g are specified, the first supplemental group will get clobbered by the -g group Ideally our users shouldn't have to understand the quirks of our setgroups(2) and the manpage doesn't describe the group list as needing to contain the egid, so populate the egid slot as necessary. I note that this code seems to have already been marginally aware of the historical behavior because it was allocating NGROUPS_MAX + 1, but this is an artifact of a later conversion to doing dynamic allocations instead of pushing NGROUPS_MAX arrays on the stack -- the original code did in-fact only have an NGROUPS_MAX-sized array, and the layout was still incorrect. MFC after: 3 days Reviewed by: olce Differential Revision: https://reviews.freebsd.org/D51508 --- usr.sbin/chroot/chroot.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/usr.sbin/chroot/chroot.c b/usr.sbin/chroot/chroot.c index 32becaf12588..bd4932ee9b48 100644 --- a/usr.sbin/chroot/chroot.c +++ b/usr.sbin/chroot/chroot.c @@ -111,7 +111,12 @@ main(int argc, char *argv[]) ngroups_max = sysconf(_SC_NGROUPS_MAX) + 1; if ((gidlist = malloc(sizeof(gid_t) * ngroups_max)) == NULL) err(1, "malloc"); - for (gids = 0; + /* Populate the egid slot in our groups to avoid accidents. */ + if (gid == 0) + gidlist[0] = getegid(); + else + gidlist[0] = gid; + for (gids = 1; (p = strsep(&grouplist, ",")) != NULL && gids < ngroups_max; ) { if (*p == '\0') continue; From nobody Sat Jul 26 06:12:14 2025 X-Original-To: dev-commits-src-all@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 4bpvXZ6d8Vz637DB; Sat, 26 Jul 2025 06:12: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpvXZ50Kjz3pXD; Sat, 26 Jul 2025 06:12:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753510334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Jtlai08NqyDBCUm7qgQjuyJVUaNNczEBPvItoj88ak=; b=O3gBM0jC+MNeW/nWRJKsUGT0b5Rzy2qgrkeKWjlok5BfNFR/fib7dojr5WhHXx4dvs1Bn6 fk6MfTGPkaeo6jX4U32zWG0nv7iZ21CULTejMPHz6DPJ0aOYBfv4hQ7ZF3V1Hj+9zMI0eT nOM8oL+4qTWqKjlq4Arr8YAouHNqi4j2w3gjyPvOAwCHO2wrvk5ljAWFcwvY/QqP94AgQM PcDb4kR1HWxCz6g2MZH+YYnoTgCBdtWo3xTGYz24bW0PdG2N4lMlKn456o2duX9c7CENOo j1oZN1Vdd8swVA/nYQkWZU6hY4hT2BkyjLuVvvCLzQKaa0t0yPt6lFJW2dELEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753510334; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0Jtlai08NqyDBCUm7qgQjuyJVUaNNczEBPvItoj88ak=; b=KDj8Z74xK1cPoWuSnnkU8RYg2/qeWqNx/hj2XN2+osXgoHzj7T3lUvdtcMueNDaWN1V/0B MZSMsxEt7AQ/2mF2k+eoeoXtAqhG88hhlY2EfZaOfIsxcKqUtRebhLEoNKMDLurPHU6ReZ fdDJ+LBH58Yr/5XrMZaS7tqOMPG1SE7gFTfUXYI/dg130sIWtd+Xq3X7Qe5egLVmA75KxY UgOKKbAmcNzykB6/q24gTeuFtr5DxIuHZ94w23u9pPesbQLZqC9Pj+dUJxhcfZZQw82ml7 RrMgDsSoHJQdMZK2L0KDkSl9UQCdxGPz/aGM6fXpmASiqUHskcPOd2aC4RHsjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753510334; a=rsa-sha256; cv=none; b=fZcef5owW1DgGJVml1JPv4c+jepd+uC6s8tN9IYmVMr1m2mB/KaGL50sDe/aVWP5+XSTCj 0rH1aPsZkQu1AvXOX1nCb1Tu2Yy0LjPSY7WHAKtUH2P/xISH0CyLDRjHfSWuiiC7lx9oWB 7r31JNU3AQ8DfxJvULPYS9VCe5qKf9NUcjANsq5fqapps912idT0zx9B90Jjl3cJoHTl+7 dn9xapXJGy+sOIm7EwkmmypUa+lc1OyAFt+44KNVr31YJHv84YEVDgKpzp7/GdyxkTFd60 lABrNCjCK1qpHh0GBtdaCGiW1mhLDkNEPHvtUJHI/oSs/8rGlX7TZ0IfUT8dhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpvXZ4VWKz38M; Sat, 26 Jul 2025 06:12:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56Q6CEYZ036898; Sat, 26 Jul 2025 06:12:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56Q6CETY036890; Sat, 26 Jul 2025 06:12:14 GMT (envelope-from git) Date: Sat, 26 Jul 2025 06:12:14 GMT Message-Id: <202507260612.56Q6CETY036890@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 1286fd8eccb7 - main - base: do a sweep of setgroups() that mean to clear the supplementaries List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 1286fd8eccb78e540aae0b03c3a3f6d1865bdb81 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=1286fd8eccb78e540aae0b03c3a3f6d1865bdb81 commit 1286fd8eccb78e540aae0b03c3a3f6d1865bdb81 Author: Kyle Evans AuthorDate: 2025-07-26 06:11:58 +0000 Commit: Kyle Evans CommitDate: 2025-07-26 06:11:58 +0000 base: do a sweep of setgroups() that mean to clear the supplementaries In the future, this will be beneficial as we move the egid out of the groups list; there's no need to track the egid explicitly in our supplemental groups, and doing so could become a security issue if setgid() would not end up switching groups[0] as it does today and we end up wanting to change our egid. The rwhod diff is a little gratuitious, but I like patterns and setgroups() -> setgid() -> setuid() is a lot more common than setgid() -> setgroups() -> setuid(). This is sweep is not exhaustive and intentionally did not include contrib/, crypto/ or tools/. Reviewed by: olce Differential Revision: https://reviews.freebsd.org/D51510 --- sbin/dhclient/dhclient.c | 2 +- usr.sbin/rwhod/rwhod.c | 8 ++++---- usr.sbin/ypldap/ldapclient.c | 2 +- usr.sbin/ypldap/ypldap.c | 2 +- usr.sbin/ypldap/ypldap_dns.c | 2 +- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c index cbab3fa2973c..5d2a7453578b 100644 --- a/sbin/dhclient/dhclient.c +++ b/sbin/dhclient/dhclient.c @@ -539,7 +539,7 @@ main(int argc, char *argv[]) setproctitle("%s", ifi->name); /* setgroups(2) is not permitted in capability mode. */ - if (setgroups(1, &pw->pw_gid) != 0) + if (setgroups(0, NULL) != 0) error("can't restrict groups: %m"); if (caph_enter_casper() < 0) diff --git a/usr.sbin/rwhod/rwhod.c b/usr.sbin/rwhod/rwhod.c index 237663eef74d..b99e4ea74b5a 100644 --- a/usr.sbin/rwhod/rwhod.c +++ b/usr.sbin/rwhod/rwhod.c @@ -246,12 +246,12 @@ main(int argc, char *argv[]) syslog(LOG_ERR, "bind: %m"); exit(1); } - if (setgid(unpriv_gid) != 0) { - syslog(LOG_ERR, "setgid: %m"); + if (setgroups(0, NULL) != 0) { + syslog(LOG_ERR, "setgroups: %m"); exit(1); } - if (setgroups(1, &unpriv_gid) != 0) { /* XXX BOGUS groups[0] = egid */ - syslog(LOG_ERR, "setgroups: %m"); + if (setgid(unpriv_gid) != 0) { + syslog(LOG_ERR, "setgid: %m"); exit(1); } if (setuid(unpriv_uid) != 0) { diff --git a/usr.sbin/ypldap/ldapclient.c b/usr.sbin/ypldap/ldapclient.c index acd4410d939f..a246a25a9605 100644 --- a/usr.sbin/ypldap/ldapclient.c +++ b/usr.sbin/ypldap/ldapclient.c @@ -385,7 +385,7 @@ ldapclient(int pipe_main2client[2]) ypldap_process = PROC_CLIENT; #ifndef DEBUG - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) || setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid)) fatal("cannot drop privileges"); diff --git a/usr.sbin/ypldap/ypldap.c b/usr.sbin/ypldap/ypldap.c index 01b5955aa822..b9e938227831 100644 --- a/usr.sbin/ypldap/ypldap.c +++ b/usr.sbin/ypldap/ypldap.c @@ -602,7 +602,7 @@ main(int argc, char *argv[]) fatal("getpwnam"); #ifndef DEBUG - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) || setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid)) fatal("cannot drop privileges"); diff --git a/usr.sbin/ypldap/ypldap_dns.c b/usr.sbin/ypldap/ypldap_dns.c index 09ce636ebdc8..9dbbf26d237b 100644 --- a/usr.sbin/ypldap/ypldap_dns.c +++ b/usr.sbin/ypldap/ypldap_dns.c @@ -91,7 +91,7 @@ ypldap_dns(int pipe_ntp[2], struct passwd *pw) setproctitle("dns engine"); close(pipe_ntp[0]); - if (setgroups(1, &pw->pw_gid) || + if (setgroups(0, NULL) || setresgid(pw->pw_gid, pw->pw_gid, pw->pw_gid) || setresuid(pw->pw_uid, pw->pw_uid, pw->pw_uid)) fatal("can't drop privileges"); From nobody Sat Jul 26 07:08:44 2025 X-Original-To: dev-commits-src-all@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 4bpwnn0JTFz639Yh; Sat, 26 Jul 2025 07:08: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpwnm6Cg5z3Jhp; Sat, 26 Jul 2025 07:08:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753513724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zbA5Aqywq90pJU9osSzezNsQfe5LC7qyEtfXnuQKok8=; b=UKcbd4Rtt36s7m5xZ69B8SMTXRdWdgsrPD5rDO/dW+BXnCLe3HK3i6zkXgiD34bE9B46Px Id/i8cdFwyAl06lZUaLAFbIgIyyJq8nIfz/4ZSk1K/yje31lfObNVitQ0xMX8SAP7Smtq3 VahEy0OEYn1yL6nw6cHdw0Wii7C+I6xpEWaIVruRaTCJUl0/+wY/IEiomNNl+WCB/pjOT5 8SLyeTO9sEeNoN7YqJHwe3Zmka5bzGbTsInUyXRO0jlkdcUwrJ9oArEd4dPylB8D404hYr HuOZZLZoPImP5APT42yEnP07qtGSTf/NnVqLN6totxUWzx1WVUMajR4UW5enaw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753513724; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zbA5Aqywq90pJU9osSzezNsQfe5LC7qyEtfXnuQKok8=; b=eEkc2OCAmGCYCne36vAE/A94b7OEAgoc8pTEDc081odOavV/cMwi6ZEeLSO4rUrglFe4eH 4bIefWWwg8rziqWOjGcAzBJi2n5s7kEXeVPLa3u+rtvU4EzaO9i6By81HK1tSYBpqckzHW zFbCM7dERum57/3TNOjtYUdxSxoYtCEi35bE7jFJ7CqkEm/RXgBf3pYIWyllaL+vLb9gdM TzPJkZmIGagBMDx0E4DCT7bLlBWZUUxAG1y/s04DnZdVsZ16tkwk+OrUoCAZm697kFiqpv 9MhsNOtsb6k7B4ca/rfImH60aSu+TwSR/sjE1Q8yfnMoEmvE1KiVKD0kgksiiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753513724; a=rsa-sha256; cv=none; b=OaOqYwpxPvbCKYDchUvA7WTSQKpmxoldCsyvRrz6nI6a8u+AfsmCfFh0k6zpx0/e7fY4nC e3eFRsL9vF/GgIzklyH1yHdLVvBguySo5cwQbZnNp6tuvBndwLKWMxFAAcT4PgVEqGESlF JbQ6PTz0xznPtEtF+VRzXhv40QV+mmeUfBoumZ1klW10wCq8vDqpf+y9AsJOtB2f/BbVVD aiZujC96TBKEaLnC90fvyjw/713LCqEgdV4aVMx0jB9L0JwUkDpOW0aiuLmsnWqioM8YWK kJyiF6mhEVo2DQ+O2u2/iLe0npTrbKwPpaEXVwHuSGw5AlpS8+9R2MGcZJ4Tlg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpwnm5ZNpz48F; Sat, 26 Jul 2025 07:08:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56Q78iS0037062; Sat, 26 Jul 2025 07:08:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56Q78irs037059; Sat, 26 Jul 2025 07:08:44 GMT (envelope-from git) Date: Sat, 26 Jul 2025 07:08:44 GMT Message-Id: <202507260708.56Q78irs037059@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: bbe75ea73442 - stable/14 - devd: Add vm_guest variable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: bbe75ea73442651b8e6277984b817308663193b6 Auto-Submitted: auto-generated The branch stable/14 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=bbe75ea73442651b8e6277984b817308663193b6 commit bbe75ea73442651b8e6277984b817308663193b6 Author: Warner Losh AuthorDate: 2025-07-19 05:31:50 +0000 Commit: Eugene Grosbein CommitDate: 2025-07-26 07:07:44 +0000 devd: Add vm_guest variable Fetch vm_guest on startup in case we're running under a hypervisor. Co-authored-by: eugen@ PR: 287873 Sponsored by: Netflix (cherry picked from commit bd4a4e46ceacd8dfc5a5469ec6edd8c92c53605a) --- sbin/devd/devd.cc | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc index 28aab82803c8..e4abf0e33fae 100644 --- a/sbin/devd/devd.cc +++ b/sbin/devd/devd.cc @@ -154,6 +154,8 @@ static volatile sig_atomic_t romeo_must_die = 0; static const char *configfile = CF; +static char vm_guest[80]; + static void devdlog(int priority, const char* message, ...) __printflike(2, 3); static void event_loop(void); @@ -868,6 +870,8 @@ process_event(char *buffer) cfg.set_variable("timestamp", timestr); free(timestr); + cfg.set_variable("vm_guest", vm_guest); + // Match doesn't have a device, and the format is a little // different, so handle it separately. switch (type) { @@ -1323,6 +1327,7 @@ int main(int argc, char **argv) { int ch; + size_t len; check_devd_enabled(); while ((ch = getopt(argc, argv, "df:l:nq")) != -1) { @@ -1347,6 +1352,12 @@ main(int argc, char **argv) } } + len = sizeof(vm_guest); + if (sysctlbyname("kern.vm_guest", vm_guest, &len, NULL, 0) < 0) { + devdlog(LOG_ERR, + "sysctlbyname(kern.vm_guest) failed: %d\n", errno); + } + cfg.parse(); if (!no_daemon && daemonize_quick) { cfg.open_pidfile(); From nobody Sat Jul 26 07:14:08 2025 X-Original-To: dev-commits-src-all@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 4bpww13fPvz639bk; Sat, 26 Jul 2025 07:14: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpww06zJrz3LxH; Sat, 26 Jul 2025 07:14:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753514049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I44TasudBxj0BwTwH0zj6q/kKCz8+75Iuf+oDR8ufZY=; b=e+67S+YFNyxWQT1LhHajo+jXy21WMTgeYJOZtaEJ1kKDPl3kGOBDcecg0WdhfAEnywcHb4 FN59nFextvhoJhmJm1Fg1eYLLBJ1YoJ8BAaYaCobhQY9Ss8s8ru8SiEI0GvHI1rTqTkxfS 0Bwl/qW7SQRhzEtEPO0q0BAiZFVJILtysjh5Qv5w+Q5NY+LjeIgE0hpuKRVeWxndrB1IDy ZrB2nL7MuVpAsQST21JS0BxqLaxmsPqdeR6AxCrHMNGoJe54yOCVWWeUSc+3FsG4MNFO9Z mYeNVFJzVmBLrVbZiO9aj5by60IPpyOjx3tjj4YBkcEvQdC4RS7TfWNeApzucg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753514049; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I44TasudBxj0BwTwH0zj6q/kKCz8+75Iuf+oDR8ufZY=; b=XBGxutleJhj0wPBukDx64MhG7glAPEyhzp2IBNI4KQLFOQ9PAb8DL3wU5qRWDyKv0lgAZV vz6kxZ/7GQt8Xtre9I3D3Vju0QITrNH82AL1tCfu4rb/Gpk+v1JXH/5JBV2XWSAtVZs+Gw ypqm1XtgxeBi87W4KVjFJYoxORVzlgijifRarH2EABYWmjDm1Mbiktttv9Dfrohov8m7cz fvvchRYDRD0w36jt/iwHMHKkL9Ra2jNUjLLk6DU+jpiKHXhCm+/j2so4RrOEF4PZX+ZcUm vCIHf1zB/R+uhrxiJ3vwpVS1Xw4cN7OtldW5l1AejkfsVmA+GhYjkwYOVQRWSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753514049; a=rsa-sha256; cv=none; b=DyOER9IrF4ImEVCV3OiHVu+gNL8ekzHyEyTskPn0RcstYBiUHON17mtQoAb2p2J+TDR42U BrRegktN/P8WwBmCrz3uH2CTOD1pB6z0saU2lJWkLRbeOpuro9L6RyErtjFc7q/9T5wyk0 KIXXZDnGI3HJpciwotZH2dAayw1FU0LF4x7YIKCzojRFFbUE3jjyV+D6hFAwCtTQ6/WATp qTt+5B4PPAAMaDUduGpClNODAX0Dw+er7FGG6HbcJ2ji/uEjdlVvjLtvp5yDXwzwV019Ec 7bfOTh4mL9ynMF92ZIhyGknUUO9Fid27G8b4ItdbuMC6WqD/AuhYt8In0cKrTw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpww064Qqz4ZN; Sat, 26 Jul 2025 07:14:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56Q7E8fr054632; Sat, 26 Jul 2025 07:14:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56Q7E8Da054629; Sat, 26 Jul 2025 07:14:08 GMT (envelope-from git) Date: Sat, 26 Jul 2025 07:14:08 GMT Message-Id: <202507260714.56Q7E8Da054629@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: a04e1adff054 - stable/14 - devd.conf(5): call hyperv_vfattach in a Hyper-V guest only List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: a04e1adff054e0bb644759b39b54d4c172655801 Auto-Submitted: auto-generated The branch stable/14 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=a04e1adff054e0bb644759b39b54d4c172655801 commit a04e1adff054e0bb644759b39b54d4c172655801 Author: Eugene Grosbein AuthorDate: 2025-07-22 10:06:24 +0000 Commit: Eugene Grosbein CommitDate: 2025-07-26 07:13:34 +0000 devd.conf(5): call hyperv_vfattach in a Hyper-V guest only Limit calls to /usr/libexec/hyperv/hyperv_vfattach to Hyper-V guests. PR: 287873 (cherry picked from commit d4a0e749cc66cd5d019d8fb8f43427109aef4c9f) --- sbin/devd/hyperv.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/devd/hyperv.conf b/sbin/devd/hyperv.conf index 13695a0c75b6..70108ac36e54 100644 --- a/sbin/devd/hyperv.conf +++ b/sbin/devd/hyperv.conf @@ -103,5 +103,6 @@ notify 10 { notify 10 { match "system" "ETHERNET"; match "type" "IFATTACH"; + match "vm_guest" "hv"; action "/usr/libexec/hyperv/hyperv_vfattach $subsystem 0"; }; From nobody Sat Jul 26 07:17:18 2025 X-Original-To: dev-commits-src-all@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 4bpwzg158fz639ln; Sat, 26 Jul 2025 07:17: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpwzf6ZTbz3P3w; Sat, 26 Jul 2025 07:17:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753514239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ovUQeNlfAzJtnTBKna5ffd99ge3y4ZJx/CCZGlOzjis=; b=WZGtvXLbO4c0oGtZsG224eqa2eGUSrHtDjXTp+NyJ18kMpsaj+mTxTkCeprQKZbtTBzg6L lFzCD2WkGTv0tGQPlFTW5Sf73A9/gUBCSdtyyFG0p6NTExMiLlv3wgUk4dzU4Jurf9kiNF GvvaIy15sx7RrXvZ6SIBytLBa0afFNv4K5lCK83VWJ54l/35FqUJUnfShk1RfHnKjhrPQA ugvMU7Hsrm4sdMWK8rNspDSDx2xQk9OZ0klH6dRVKdLDs0pUyVAVZIVP+4eEdCLUA1r4Nx 3/rrzswlQi3x3a1kEdCkX088Et5xzNBmEdXc1TBCe1BpI1rFCTh6lo8ghn+HHQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753514239; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ovUQeNlfAzJtnTBKna5ffd99ge3y4ZJx/CCZGlOzjis=; b=pG8JmnTIcaykqxPPS0mKzU3BxmXXsX9EK0fc/axh30bSfoTk8L3lEXTfIR9e9BuBofXLYn zrFNt1uXxtK/0oq20Uc6RYq/El6F2moEYnudzevHMUmxaR8rsAkK0Onk4LOteWL4zoWNdo PgeAS89tWRVn/HMml725LMFUhu8E2wsZSmAc1pF972YuP61cKS6PfOCvPplEzbAA/Uljoq Hx7kaastFGqNCIo+xJvi+xH4TnGrEYreiYY5BrWZg42UhR7fjHBOMyUXmp0zm7ccS+vev+ s8i9rEtUSqpzoYFUExv9h0Lq8EkPMK6xl9tn0mwgeyDqxWkPmN+juld3asny/g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753514239; a=rsa-sha256; cv=none; b=RbuDOhjvvm9s+TSLFFkoK2md7woxWSJVzqKAxZ/Sr+LbtjjG6l4sHkalIZrn0h8sm7WOQ0 SEoWyJcPLl0WDXgP53vqUcxYCAdtqj1GF+6ncWJy/lTQ05amZt1ZMWOhDPrF0qP7O904a2 qBifRXwrO88lyJ6hx7VeHl7kNxTCoBSRcgFZyDQmLShjIDNVzmOxFPyOslOZLCx2T02lVq 4mez4xOVaEBjeIAYgZEs1H8lhryQU4tr7WtTZ4ZyOufZPyw5m5++U7JcE/X0Sc+p8IrnaS 8nLOX6PjbgZ3dVJjSiFEDMWu2GhWMvuEsk9ec8XC7WgXE9XPh4zc7ad8Asu0PQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpwzf66GHz4P2; Sat, 26 Jul 2025 07:17:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56Q7HIq3055673; Sat, 26 Jul 2025 07:17:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56Q7HISu055670; Sat, 26 Jul 2025 07:17:18 GMT (envelope-from git) Date: Sat, 26 Jul 2025 07:17:18 GMT Message-Id: <202507260717.56Q7HISu055670@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: 8812941de64d - stable/13 - devd.conf(5): call hyperv_vfattach in a Hyper-V guest only List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 8812941de64d964ea0b169c8cca4fceccb4315c7 Auto-Submitted: auto-generated The branch stable/13 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=8812941de64d964ea0b169c8cca4fceccb4315c7 commit 8812941de64d964ea0b169c8cca4fceccb4315c7 Author: Eugene Grosbein AuthorDate: 2025-07-22 10:06:24 +0000 Commit: Eugene Grosbein CommitDate: 2025-07-26 07:15:56 +0000 devd.conf(5): call hyperv_vfattach in a Hyper-V guest only Limit calls to /usr/libexec/hyperv/hyperv_vfattach to Hyper-V guests. PR: 287873 MFC after: 3 days (cherry picked from commit d4a0e749cc66cd5d019d8fb8f43427109aef4c9f) --- sbin/devd/hyperv.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/devd/hyperv.conf b/sbin/devd/hyperv.conf index 13695a0c75b6..70108ac36e54 100644 --- a/sbin/devd/hyperv.conf +++ b/sbin/devd/hyperv.conf @@ -103,5 +103,6 @@ notify 10 { notify 10 { match "system" "ETHERNET"; match "type" "IFATTACH"; + match "vm_guest" "hv"; action "/usr/libexec/hyperv/hyperv_vfattach $subsystem 0"; }; From nobody Sat Jul 26 07:17:19 2025 X-Original-To: dev-commits-src-all@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 4bpwzh56XMz639th; Sat, 26 Jul 2025 07:17: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpwzh0Jf2z3NwS; Sat, 26 Jul 2025 07:17:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753514240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I5b5E3u8lfgl6QFS6HpAi5O4whYsX8nwpNtTkJSmWEI=; b=slesqGN6xeezd6JAdHIqAXCrvg7QIbhFA1cSSG+ahJ+x0GWtQHKOe/NGxSVbxzzQicMZYY 7mRT1szh9KrGWSG8+ZGBFLAa6e4AFBUagP52H7qdWsTd9a1rP/zt+lydPrQyhXCT61I2Ds j7aqoBan66VVRN+7ZvlYgyINbJbzdl97vmy7xB95N1v3t+VWrN2VKLrrGUy4L5zWXzHpBt YOv2Ok2IrDM1mYxhILEzJIQ2ZXLw/z1DNFTgJHT1y+rjgq4oHUS9BPFoLtd+/xzo1+HAym XgbqMn3IWoZ9Y976a+KQE6qUyMLsLWFH6EuUEX6CRJDPMOb+K9xWN1uQRbmL4w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753514240; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I5b5E3u8lfgl6QFS6HpAi5O4whYsX8nwpNtTkJSmWEI=; b=DgWPfjJyhB8ABjq0gaVJxSFSbrjTWhQn2v34WEUYbhW8FVsVQaq3cqs5/QqiP6klZ2IZS5 zZ+s40ewXFLxlL+LCuK1LCTONXTEejvsLE+jbjju5yasCDiWeGaq7VMhWKg5r/dCq0vLX+ 7wqFKXZX5s7rLYCTV+v3Pfi/nEeptn5/XSmYX6x7kmsGVBPZBy6xHaqWVwcBxPJ6z6IbfY 4EMP83AsGle1RpF7T+5KCczmvROjHMfJ+GWE8MkfNM/8CwGcmxeeV/ZWm2kM9kxscqNOqO mbWchnItWFKHw0JVH0iDf4Ct4f5AcBcWXB1roGZ1I45tuS/3jyDqrcZaMvvz3A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753514240; a=rsa-sha256; cv=none; b=HAUlSYVPa2/d7J8cWqxAupX789mtYJk+3WxJZB2vSx7nUsKvbI3WZXDhozUtpEEuSs+Etj 8buyBvB/pv5ngLAgFWQlC/hYSXlaxCemnq/MXfNb65fmnbXukE4lKvAx21yUCfIfn3UAm0 GnrTpifxUh15Qv0RZfj2OqRaLZLeVcL/JsDl6feaCUbPNW7zGL+d8pd7AlS/NOG98PAP42 MW1eSe+gPsZ4Wvhh1E1YEPeC6NS6lmoWi8dWBEsAHIqS6HiY/od+TOlMMYmP24esSHY2kC /ZpriypmryGqSXj3fq94Y5MWwsjo61yptOPmjG4wtXpFY01knbOPcfzsHkg5vQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpwzg6lDLz4mG; Sat, 26 Jul 2025 07:17:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56Q7HJ4C055713; Sat, 26 Jul 2025 07:17:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56Q7HJlx055710; Sat, 26 Jul 2025 07:17:19 GMT (envelope-from git) Date: Sat, 26 Jul 2025 07:17:19 GMT Message-Id: <202507260717.56Q7HJlx055710@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: 0111be0a4092 - stable/13 - devd: Add vm_guest variable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0111be0a409294763a1bfda21f4bff2b26545cb8 Auto-Submitted: auto-generated The branch stable/13 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=0111be0a409294763a1bfda21f4bff2b26545cb8 commit 0111be0a409294763a1bfda21f4bff2b26545cb8 Author: Warner Losh AuthorDate: 2025-07-19 05:31:50 +0000 Commit: Eugene Grosbein CommitDate: 2025-07-26 07:16:09 +0000 devd: Add vm_guest variable Fetch vm_guest on startup in case we're running under a hypervisor. Co-authored-by: eugen@ PR: 287873 Sponsored by: Netflix (cherry picked from commit bd4a4e46ceacd8dfc5a5469ec6edd8c92c53605a) --- sbin/devd/devd.cc | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc index c1b3e032d3e5..139bb912881d 100644 --- a/sbin/devd/devd.cc +++ b/sbin/devd/devd.cc @@ -154,6 +154,8 @@ static volatile sig_atomic_t romeo_must_die = 0; static const char *configfile = CF; +static char vm_guest[80]; + static void devdlog(int priority, const char* message, ...) __printflike(2, 3); static void event_loop(void); @@ -855,6 +857,8 @@ process_event(char *buffer) cfg.set_variable("timestamp", timestr); free(timestr); + cfg.set_variable("vm_guest", vm_guest); + // Match doesn't have a device, and the format is a little // different, so handle it separately. switch (type) { @@ -1289,6 +1293,7 @@ int main(int argc, char **argv) { int ch; + size_t len; check_devd_enabled(); while ((ch = getopt(argc, argv, "df:l:nq")) != -1) { @@ -1313,6 +1318,13 @@ main(int argc, char **argv) } } + len = sizeof(vm_guest); + if (sysctlbyname("kern.vm_guest", vm_guest, &len, NULL, 0) < 0) { + devdlog(LOG_ERR, + "sysctlnametomib(kern.vm_guest) failed: %d\n", + errno); + } + cfg.parse(); if (!no_daemon && daemonize_quick) { cfg.open_pidfile(); From nobody Sat Jul 26 07:17:20 2025 X-Original-To: dev-commits-src-all@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 4bpwzj5dr2z639lp; Sat, 26 Jul 2025 07:17: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bpwzj13zlz3Nsn; Sat, 26 Jul 2025 07:17:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753514241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CaShD/e/BYnPENVtZrnmxpaBnmSv7ZOL4JafzlROB/8=; b=nxhjPgCELVJZLdSWQgB+18fwNjeD20Y3vFpPGx3fqPf+o+hJShqA9WMLuPmtCRVp+ifSIU r1hjPzMpTSDdfSGgATIDwqiFXK5RT4eBFUSq0SfqwQNrCwB+xqpbioIauXn+WedGEDkOgx tZGA8Jl59DFRWEvk8BsO6xl0RdnIaKaOO+HmwLCa1AQ81/k+l04p9/8gW7I3k4ARFKVJwS S11gBouokzCKN5/Wp04VTf8j+fVHsu5TPldIZRevBh0hgXC+wvQyOdwAva0C4vVRIV6vM1 ggcmr1sXPai74mwTsQfKklJPFRjCUMnNHjqRTxl78hWjN5i9jSpPtDpv0hMWWQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753514241; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CaShD/e/BYnPENVtZrnmxpaBnmSv7ZOL4JafzlROB/8=; b=Jr+I1XOOsVnhzlcHPfBOdYBYXg2LU4EJ6rv3AaJTl4b8h8JJuLYQbQNUdOuqKOB68K59h8 TwP0OVnygP8sQlSNb8zToo5wJ4CvBRaNdZolnYcTtKjxbtwYBInt1Ml13Pj18VJcUn0jFq +VkcfDlKidJlhO2mC9hxbSL7dsaoPCAWOd5pRZ4buALtBTRJCVfLOUnUGmMhv56+HT2Iy1 HRnbbzbA5oHHtkIPrZ0vQ1I3qZV+0VqTQX7uJmSGLXS7GBOfrZypTNNnJCYZCPiargew5+ QG8EqMxnaj43na7JIgFcfDOGO2yDw//F0PggMI/jC6ESIO6v2c1+wgUFlhIh5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753514241; a=rsa-sha256; cv=none; b=Wac31SX4Hwu0SeH4Df1ZMtq02hk+QBCEDGVC19UjDT4UxAJix2KaPjgTLVhoGNqR56e2bm MBysNEMgjKKzUQ9ndtdSmja+EqNg7xpcwhLhF2ApHO873q74qNnMgcHYTd0vBAivlh/U0l BBLXOiD6YP8d9uZlxnPRPxXojwGjW5XHO1hkpABnQPa7bxjpUVpu+4T0d6DioGbUNqKzjc Ur0rC01TdZHCAvyvqeFw8FGJ4IE4XJvywFNTUaV72PIYUcnrmXEa5KhW4nG+HNot90jQi7 phaa4fMBpLOH4eV+CmPLk0Gg3z3YNITZSXPNvFpgRTxw+qnvSCh5KJPjIHIU4Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bpwzj0Z4Pz4rj; Sat, 26 Jul 2025 07:17:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56Q7HKBw055746; Sat, 26 Jul 2025 07:17:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56Q7HKuF055743; Sat, 26 Jul 2025 07:17:20 GMT (envelope-from git) Date: Sat, 26 Jul 2025 07:17:20 GMT Message-Id: <202507260717.56Q7HKuF055743@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: f12f5d1d6629 - stable/13 - devd(8): correct error logging List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: f12f5d1d6629ed17af1d096e5a906dc773df2064 Auto-Submitted: auto-generated The branch stable/13 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=f12f5d1d6629ed17af1d096e5a906dc773df2064 commit f12f5d1d6629ed17af1d096e5a906dc773df2064 Author: Eugene Grosbein AuthorDate: 2025-07-22 09:55:08 +0000 Commit: Eugene Grosbein CommitDate: 2025-07-26 07:16:47 +0000 devd(8): correct error logging Fix a mistake in a log message that leaked from my preliminary patch. PR: 287873 MFC after: 3 days X-MFC-with: bd4a4e46ceacd8dfc5a5469ec6edd8c92c53605a (cherry picked from commit 044febb24a26d92066b2849eb583f57e37acdbfd) --- sbin/devd/devd.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sbin/devd/devd.cc b/sbin/devd/devd.cc index 139bb912881d..d25e60a08cba 100644 --- a/sbin/devd/devd.cc +++ b/sbin/devd/devd.cc @@ -1321,8 +1321,7 @@ main(int argc, char **argv) len = sizeof(vm_guest); if (sysctlbyname("kern.vm_guest", vm_guest, &len, NULL, 0) < 0) { devdlog(LOG_ERR, - "sysctlnametomib(kern.vm_guest) failed: %d\n", - errno); + "sysctlbyname(kern.vm_guest) failed: %d\n", errno); } cfg.parse(); From nobody Sat Jul 26 10:00:37 2025 X-Original-To: dev-commits-src-all@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 4bq0c623Ghz63Jsy; Sat, 26 Jul 2025 10:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bq0c6061qz3j45; Sat, 26 Jul 2025 10:00:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753524038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R3DgYDKtld8ucbE1WmK7uo23mZyazw1lLstzAJcW6io=; b=Lg5SJfHSYFhxGQ2eb7y33lib9Eix1yD0md5LVvRpIM+HiKIV2xEfBBfP/C7vWlvpSsNMP7 2pPAgqnt5HiFsi5SZotJcamJDl5EMysSl1NGe+WqgA6U3P5LUq/PeN6MdoSKfyhP1D+KBj VxR5RMLHNXKN8bJ7r5QRG9uo1YpqeX4p/OEwvFQ5KwSeqpdE3QOGblMVWk3bj/xeORLIZ7 NkeRjk8WuSqBpuI9RIucki6fgYnkVgbzhHYJJVEej80EkLwXK8ozg1WBcXKGQvL0qRajFN At0xAU8AUYrSWpE8IsYgr48bLwgtcOcQuGCUDoK1N9wJzSKwD+xFekkId+EcPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753524038; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R3DgYDKtld8ucbE1WmK7uo23mZyazw1lLstzAJcW6io=; b=hgBt1VGgUGurF74s78jlXuOHraQEbY06uJTxRGl7ZynTHcHIktquKKdWtF3NkD4gQdzB+P bnaYLmvYYQOSXp0UaTQEp4sUfxvz7vTiPK1CkNiMP+dvTSXtEKjXE3xIUPlesBPuQuiafP ds4kbU9xjuvBVMo7d6bTmQGAtH/b+R63Yvsr55NXhoZPIPxiXooD/9YIdMmEsEsRZdky9Q QfbijDAmnIfKqCNElxE97iAI+FGqyDJh3jB3U4mKT43REfF2ulXxkTMDSNfGVRxuAXF/un p6il03//Quh0GMKxR3lKdj+VH8SsPWYCwM8aqO3627vzWXBgQyfpNPUIuty7DA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753524038; a=rsa-sha256; cv=none; b=VLLMN2rutYdB/HqOcpoKngzaKIUy1m9YcbyKR5Q5Ny4WH517o48EVTRggElSindgCOUWYZ 5iUUHhofu1jnE9l0kv7cL8YqB7hy+pCzxlVRDQr9KB//IL60pcDXYThA6dMUTtjaN58LRq Y4pRuN316XSlmKiNEqokfSrcj8OlgU6f3brcFulj9RJx2wE+7DYFaYj0c6NJ9dq2FNC6uK N/bRZw39JE2TeQyh7Hv5E9/aC1U7eBoHdtG9FKo5o/JG+SmSn8tvPugMzHSkRsYn/qlZ37 d2D7vJRBVI5/tKI5yvz0xyTyRNym/9ADtn13HFlD1htP0XyXnpQoyk25kc2gJw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bq0c56MB1z9Gn; Sat, 26 Jul 2025 10:00:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QA0ba7068036; Sat, 26 Jul 2025 10:00:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QA0bpe068033; Sat, 26 Jul 2025 10:00:37 GMT (envelope-from git) Date: Sat, 26 Jul 2025 10:00:37 GMT Message-Id: <202507261000.56QA0bpe068033@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: a3d4ae7cf351 - main - dma: Don't install dma.conf world-readable List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a3d4ae7cf351cc283a670d8400a89518a6b31d63 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a3d4ae7cf351cc283a670d8400a89518a6b31d63 commit a3d4ae7cf351cc283a670d8400a89518a6b31d63 Author: Dag-Erling Smørgrav AuthorDate: 2025-07-26 09:59:53 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-07-26 09:59:53 +0000 dma: Don't install dma.conf world-readable While here, install auth.conf into /etc as well. MFC after: 3 days PR: 288409 Reviewed by: ivy, bapt Differential Revision: https://reviews.freebsd.org/D51529 --- ObsoleteFiles.inc | 3 +++ libexec/dma/dmagent/Makefile | 6 ++++-- tools/build/mk/OptionalObsoleteFiles.inc | 2 +- 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 385e891049e7..10f99c5d6047 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20250726: This file is now installed in /etc/dma +OLD_FILES+=usr/share/examples/dma/auth.conf + # 20250725: libbsnmp bumped to version 7 OLD_LIBS+=usr/lib/libbsnmp.so.6 diff --git a/libexec/dma/dmagent/Makefile b/libexec/dma/dmagent/Makefile index 5f7deeea0b05..c8a3bd44a53c 100644 --- a/libexec/dma/dmagent/Makefile +++ b/libexec/dma/dmagent/Makefile @@ -17,12 +17,14 @@ SRCS= aliases_parse.y \ util.c MAN8= dma.8 MLINKS= dma.8 dma.conf.5 -CONFS= dma.conf +CONFSMODE= 0640 +CONFSGRP= mail +CONFS= auth.conf dma.conf CONFSDIR= ${CONFDIR}/dma CFLAGS+= -DOPENSSL_API_COMPAT=0x10100000L YFLAGS+= -i CLEANFILES= aliases_parse.i -FILES= auth.conf mailer.conf +FILES= mailer.conf FILESDIR= ${SHAREDIR}/examples/dma BINMODE= 2555 diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index 3183c5f0b45c..f7eb1e979d07 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -1473,12 +1473,12 @@ OLD_DIRS+=usr/share/dict .endif .if ${MK_DMAGENT} == no +OLD_FILES+=etc/dma/auth.conf OLD_FILES+=etc/dma/dma.conf OLD_DIRS+=etc/dma OLD_FILES+=usr/libexec/dma OLD_FILES+=usr/libexec/dma-mbox-create OLD_FILES+=usr/share/man/man8/dma.8.gz -OLD_FILES+=usr/share/examples/dma/auth.conf OLD_FILES+=usr/share/examples/dma/mailer.conf OLD_DIRS+=usr/share/examples/dma .endif From nobody Sat Jul 26 10:00:38 2025 X-Original-To: dev-commits-src-all@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 4bq0c80DDFz63JfH; Sat, 26 Jul 2025 10:00: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bq0c70w4Dz3jCH; Sat, 26 Jul 2025 10:00:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753524039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2/iqMEN28QAuB9U6VG6USFuItCQmeK5LOb2GE6irDEQ=; b=GU8jy4ItCdWodkjwitrbA0/RHDwDgJU3FaMQJyvYeYc1QCYYhEv8rv811havWqOPjUT7uw pPywjxAbHu1lzj6Gdb9MEgU1NSXLYjwPWhx5rHdVWCfAe8IJoVj3ngs7a9+dC+TO/fxnxx XbzA0xU3ZS402nv/7tpAKKTIuLMMI/gdIvkORKvTXLgdPU9TLje7m7xB61mv6sJLE3Ov+/ B6/JcAO86hbU1guIMN4JcyEwzfUA2U3GG9aDmh2FCQHHabp3qUGbLQVwuVXgSboGeq7qq9 FR8Jgb2epfXL4fYCaijpgQuBzneGdITTFLUsa7WMxIyBKuyLYpdMhJoQLf8jHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753524039; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2/iqMEN28QAuB9U6VG6USFuItCQmeK5LOb2GE6irDEQ=; b=fQzDtfvMJHhYB+OSL+rbmHqQcfnQrrL2D5uk9HODbgRrQ/HGI13okswVAiqLr9FAgzSP/n SGYQ4Ip7MkYN/r2ZaAQ7umbNRsv56vHdWImy5X/HxhEWFB9+STtqvOxKe4VlfhmY8EsI8/ EKEGLslSFG2G7DuXuQJaSYcb+oTmFxCdXym0sj5nw8+XtsQdP/Q8I1r8GVIvjOC4LSwRjA KGyNsp5vcOQiezYkpLUw+tOaDn6+nZHAE4udK7CjzjSIMTD5PeyImEW0bG8WNOsIpYlmvm Yh0/BVZKNBD1LrhszhIBaXsHd1NneZArhIUau6BX6+Ik8lfonyUUdIZgKoQ8Jw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753524039; a=rsa-sha256; cv=none; b=qLq/anzKFspvWxVE/ZUnzZiojQysqlkjSQm6NEI0I1BmsBsMJDI2WYUwKtRO5fM/t7I8VF kdSEFhO9VYwwpKXTq8PRkRFBgEgI5kwwN+vt4ReELIeJ8x/na0G4kVKzbMTZQvzOUqOyCi WiQ9BIA67AMkLShhgUbnO9js6LzQ3LxvQWm3kUXVn+yUrm4QxWOKIboe16qoUI2jf7JL+6 Zcfx7foAcOCHeNExxt9i6VwlTm1vBlY7qKAU9Y7FQgk0rOW6QGqRAivowCTRDlUSCY2pB1 HgAL+a14kD+0Y8mI3SH/7tLBSD61EW1JxvvlrEcpHRDpXw1C/7DAtUbnOt+u/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 4bq0c70BWjz8y5; Sat, 26 Jul 2025 10:00:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QA0cZa068079; Sat, 26 Jul 2025 10:00:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QA0cBr068075; Sat, 26 Jul 2025 10:00:38 GMT (envelope-from git) Date: Sat, 26 Jul 2025 10:00:38 GMT Message-Id: <202507261000.56QA0cBr068075@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 23401aeb15ce - main - Replace last few remaining MAN[1-8] with MAN List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 23401aeb15cec75fc215550b032aa898d2e62455 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=23401aeb15cec75fc215550b032aa898d2e62455 commit 23401aeb15cec75fc215550b032aa898d2e62455 Author: Dag-Erling Smørgrav AuthorDate: 2025-07-26 10:00:02 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-07-26 10:00:02 +0000 Replace last few remaining MAN[1-8] with MAN Reviewed by: ivy Differential Revision: https://reviews.freebsd.org/D51530 --- libexec/dma/dmagent/Makefile | 2 +- sbin/mount_fusefs/Makefile | 2 +- tools/tools/vt/mkkfont/Makefile | 2 +- usr.bin/bmake/Makefile | 2 -- usr.bin/fstat/Makefile | 2 +- usr.bin/grep/Makefile | 2 +- usr.bin/sdiff/Makefile | 2 +- usr.bin/vtfontcvt/Makefile | 2 +- usr.sbin/mfiutil/Makefile | 2 +- usr.sbin/spi/Makefile | 2 +- 10 files changed, 9 insertions(+), 11 deletions(-) diff --git a/libexec/dma/dmagent/Makefile b/libexec/dma/dmagent/Makefile index c8a3bd44a53c..f707cfa3264f 100644 --- a/libexec/dma/dmagent/Makefile +++ b/libexec/dma/dmagent/Makefile @@ -15,7 +15,7 @@ SRCS= aliases_parse.y \ net.c \ spool.c \ util.c -MAN8= dma.8 +MAN= dma.8 MLINKS= dma.8 dma.conf.5 CONFSMODE= 0640 CONFSGRP= mail diff --git a/sbin/mount_fusefs/Makefile b/sbin/mount_fusefs/Makefile index e683b35f0c8a..a237ba99eb6b 100644 --- a/sbin/mount_fusefs/Makefile +++ b/sbin/mount_fusefs/Makefile @@ -20,7 +20,7 @@ DEBUG_FLAGS+= -DFUSE4BSD_VERSION="\"${F4BVERS}\"" PACKAGE=runtime PROG= mount_fusefs -MAN8= mount_fusefs.8 +MAN= mount_fusefs.8 LIBADD= util .include diff --git a/tools/tools/vt/mkkfont/Makefile b/tools/tools/vt/mkkfont/Makefile index f9758be0ef15..1e8a9bcdafd7 100644 --- a/tools/tools/vt/mkkfont/Makefile +++ b/tools/tools/vt/mkkfont/Makefile @@ -1,4 +1,4 @@ PROG= mkkfont -MAN1= +MAN= .include diff --git a/usr.bin/bmake/Makefile b/usr.bin/bmake/Makefile index a8bcdfd9f859..bbceea3ae8c2 100644 --- a/usr.bin/bmake/Makefile +++ b/usr.bin/bmake/Makefile @@ -99,8 +99,6 @@ COPTS.filemon_ktrace.c+= -Wno-error=unused-parameter SUBDIR.${MK_TESTS}+= unit-tests .endif -MAN1= ${MAN} - .if ${MK_GEN_MAN:Uno} == "yes" # we use this to generate ${MAN} diff --git a/usr.bin/fstat/Makefile b/usr.bin/fstat/Makefile index fa51a92eb52f..f8617fd0c6a4 100644 --- a/usr.bin/fstat/Makefile +++ b/usr.bin/fstat/Makefile @@ -3,6 +3,6 @@ SRCS= fstat.c fuser.c main.c LINKS= ${BINDIR}/fstat ${BINDIR}/fuser LIBADD= procstat -MAN1= fuser.1 fstat.1 +MAN= fuser.1 fstat.1 .include diff --git a/usr.bin/grep/Makefile b/usr.bin/grep/Makefile index 2204758ece5a..c72b86656148 100644 --- a/usr.bin/grep/Makefile +++ b/usr.bin/grep/Makefile @@ -6,7 +6,7 @@ PACKAGE= runtime PROG= grep -MAN1= grep.1 zgrep.1 +MAN= grep.1 zgrep.1 SRCS= file.c grep.c queue.c util.c diff --git a/usr.bin/sdiff/Makefile b/usr.bin/sdiff/Makefile index 03587f373098..af9a037e9a58 100644 --- a/usr.bin/sdiff/Makefile +++ b/usr.bin/sdiff/Makefile @@ -3,7 +3,7 @@ PROG= sdiff SRCS= edit.c sdiff.c -MAN1= sdiff.1 +MAN= sdiff.1 HAS_TESTS= SUBDIR.${MK_TESTS}+= tests diff --git a/usr.bin/vtfontcvt/Makefile b/usr.bin/vtfontcvt/Makefile index de011660ca28..13e60c406b26 100644 --- a/usr.bin/vtfontcvt/Makefile +++ b/usr.bin/vtfontcvt/Makefile @@ -1,6 +1,6 @@ PROG= vtfontcvt SRCS= vtfontcvt.c lz4.c -MAN8= vtfontcvt.8 +MAN= vtfontcvt.8 # lz4 compression functionality .PATH: ${SRCTOP}/sys/cddl/contrib/opensolaris/common/lz4 diff --git a/usr.sbin/mfiutil/Makefile b/usr.sbin/mfiutil/Makefile index 85b66d4b6f49..49c0e688e8e2 100644 --- a/usr.sbin/mfiutil/Makefile +++ b/usr.sbin/mfiutil/Makefile @@ -4,7 +4,7 @@ LINKS= ${BINDIR}/mfiutil ${BINDIR}/mrsasutil SRCS= mfiutil.c mfi_bbu.c mfi_cmd.c mfi_config.c mfi_drive.c mfi_evt.c \ mfi_flash.c mfi_patrol.c mfi_show.c mfi_volume.c mfi_foreign.c \ mfi_properties.c -MAN8= mfiutil.8 +MAN= mfiutil.8 MLINKS= mfiutil.8 mrsasutil.8 CFLAGS.gcc+= -fno-builtin-strftime diff --git a/usr.sbin/spi/Makefile b/usr.sbin/spi/Makefile index 73f5af6fc3cc..fee967f6a234 100644 --- a/usr.sbin/spi/Makefile +++ b/usr.sbin/spi/Makefile @@ -2,6 +2,6 @@ PROG= spi -MAN8= spi.8 +MAN= spi.8 .include From nobody Sat Jul 26 11:12:33 2025 X-Original-To: dev-commits-src-all@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 4bq2C53238z63MQj; Sat, 26 Jul 2025 11:12: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bq2C529XYz4P10; Sat, 26 Jul 2025 11:12:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753528353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dQPwGwMvyHHMA5lBM0wFJ9TY0/XqooOlpA1te8Y9YP0=; b=cYrzj+k8AcLtnZPLhyC7vflVR1AnYrwp74cj4QeCWIOIBtB0KRM47Pzj3RYg412b3JoDQN nf+7kDbCIHjoxY4BE5sKQCH68yKGJeUvKe+ens8SXagRBagij7H9woze3+9y0s0c/hwQMx OBZW+eOoozsrjdAYklwoR/LK/da+IBWsr9UeJZPR3+9iV7mlxTGBg6j5K5mdEftgpDaEWA Q229tgt5A2SMtjoR+lwdWRSc2zDPgIQmz6EBx8aViFt6cij5ZRH3b5op/P5xiVMTfu4z+m oW7irTusvridv6/dCp5c/fFJTf5uN1socm+WaTyiTENuOi/sv7AJF5vTz9y4Og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753528353; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dQPwGwMvyHHMA5lBM0wFJ9TY0/XqooOlpA1te8Y9YP0=; b=UB4fUymbxlAZL6PoCG7FNOmzJkEPG/LZnXxciaxJyTH0p2yEGdeUHNQZF28CGOgFIs3WZJ 5PLNlKeRy9OTxOtVH202Qq6BP0jd99vF4c6yE1TVSkIq7lwBbv38vGu7WAamVBgJGlMmVf J7dQh7vJf9z3/JEC44PkHFAwss3ZE9Q/kGS+pRZjd7o/fDdM7AQFuSnHYugs9SzvBQthzi fisKzCM9ieoeJzIMSFWlok+t4lHgV8LAETUwxul0WTcK1iaVF0TcTYZGlBg55iXqLIOWJq K8OX2eMI6QZONiuq6XqhtT36QKRdYu/xuIh4b9euXhppvuhNaB73GmlLGXMD0g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753528353; a=rsa-sha256; cv=none; b=cB9Sr5WqSfoG69aEqjKLb2B9/wnqONgb4BJhcqwASiwFJjPbbjl6P5uW1ttMJIw2dHoqZG 9gc8wHRyvatvaEYiuDDoHefHltqxOOm26fbXHmfCe11tXJTbyBl+dnOvF2mQTCXs7ECwQO ZN1vDGYRNcRI4k2DXl+Tt3THgEjeeZD9gYK3a8l6RiZsqBSF0qtxavs6pGH8lVh3dufOJl C7yBn+kEtEbn06yCcWcrjuTqofUypbTPVlfh8zhDBr2PwYTrCDat6Iaw1SmtXyZd8x2SjK wL997Wz62Xc3n83PS96LV9IemBPji481/g2SR0lFAbx3lpyobJcemsFTTZ8l5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bq2C51G9FzCJH; Sat, 26 Jul 2025 11:12:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QBCXPX005635; Sat, 26 Jul 2025 11:12:33 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QBCXkM005632; Sat, 26 Jul 2025 11:12:33 GMT (envelope-from git) Date: Sat, 26 Jul 2025 11:12:33 GMT Message-Id: <202507261112.56QBCXkM005632@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Eugene Grosbein Subject: git: 4f8cb9f1daf8 - stable/13 - MFC: ice: unbreak build with update to 1.42.5-k List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: eugen X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 4f8cb9f1daf80f7e23d581a86bb47cd47717f095 Auto-Submitted: auto-generated The branch stable/13 has been updated by eugen: URL: https://cgit.FreeBSD.org/src/commit/?id=4f8cb9f1daf80f7e23d581a86bb47cd47717f095 commit 4f8cb9f1daf80f7e23d581a86bb47cd47717f095 Author: Eric Joyner AuthorDate: 2024-08-30 00:28:59 +0000 Commit: Eugene Grosbein CommitDate: 2025-07-26 11:11:17 +0000 MFC: ice: unbreak build with update to 1.42.5-k - Removes duplicate E825C printout - Fixes a package download issue with E830 - Updates mentions of E830-XXV to E830-L - Fix FW logging on load issue by limiting the setting of FW log masks and other global configuration to just the first PF of the controller - Update ice_hw_autogen.h with timesync registers (unused in this driver) - Fix possible overflow condition in NVM access function - Blocks RDMA load on E830 devices Signed-off-by: Eric Joyner Tested by: Jeffrey Pieper Relnotes: yes Sponsored by: Intel Corporation Differential Revision: https://reviews.freebsd.org/D46950 (cherry picked from commit 440addc642496f8d04fe17af9eb905ac4a5bdbd8) (cherry picked from commit 5f92347a9bc8f372eef46555e2ba3de65259f97d) --- sys/dev/ice/ice_ddp_common.c | 31 +++++++++++++++++--- sys/dev/ice/ice_ddp_common.h | 5 +++- sys/dev/ice/ice_devids.h | 12 ++++---- sys/dev/ice/ice_drv_info.h | 20 ++++++------- sys/dev/ice/ice_fw_logging.c | 69 +++++++++++++++++++++++--------------------- sys/dev/ice/ice_hw_autogen.h | 14 +++++++++ sys/dev/ice/ice_lib.c | 38 ------------------------ sys/dev/ice/ice_lib.h | 1 - sys/dev/ice/ice_nvm.c | 36 +++++++++++++++-------- sys/dev/ice/if_ice_iflib.c | 9 +++--- 10 files changed, 126 insertions(+), 109 deletions(-) diff --git a/sys/dev/ice/ice_ddp_common.c b/sys/dev/ice/ice_ddp_common.c index 87ecdad5e7bf..dfc50cc1f966 100644 --- a/sys/dev/ice/ice_ddp_common.c +++ b/sys/dev/ice/ice_ddp_common.c @@ -526,12 +526,13 @@ ice_download_pkg_sig_seg(struct ice_hw *hw, struct ice_sign_seg *seg) * @idx: segment index * @start: starting buffer * @count: buffer count + * @last_seg: last segment being downloaded * * Note: idx must reference a ICE segment */ static enum ice_ddp_state ice_download_pkg_config_seg(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr, - u32 idx, u32 start, u32 count) + u32 idx, u32 start, u32 count, bool last_seg) { struct ice_buf_table *bufs; enum ice_ddp_state state; @@ -549,7 +550,7 @@ ice_download_pkg_config_seg(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr, return ICE_DDP_PKG_ERR; state = ice_dwnld_cfg_bufs_no_lock(hw, bufs->buf_array, start, count, - true); + last_seg); return state; } @@ -568,9 +569,11 @@ ice_dwnld_sign_and_cfg_segs(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr, { enum ice_ddp_state state; struct ice_sign_seg *seg; + bool last_seg = true; u32 conf_idx; u32 start; u32 count; + u32 flags; seg = (struct ice_sign_seg *)ice_get_pkg_seg_by_idx(pkg_hdr, idx); if (!seg) { @@ -581,6 +584,10 @@ ice_dwnld_sign_and_cfg_segs(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr, conf_idx = LE32_TO_CPU(seg->signed_seg_idx); start = LE32_TO_CPU(seg->signed_buf_start); count = LE32_TO_CPU(seg->signed_buf_count); + flags = LE32_TO_CPU(seg->flags); + + if (flags & ICE_SIGN_SEG_FLAGS_VALID) + last_seg = !!(flags & ICE_SIGN_SEG_FLAGS_LAST); state = ice_download_pkg_sig_seg(hw, seg); if (state) @@ -595,7 +602,7 @@ ice_dwnld_sign_and_cfg_segs(struct ice_hw *hw, struct ice_pkg_hdr *pkg_hdr, } state = ice_download_pkg_config_seg(hw, pkg_hdr, conf_idx, start, - count); + count, last_seg); exit: return state; @@ -2321,6 +2328,22 @@ void ice_release_change_lock(struct ice_hw *hw) ice_release_res(hw, ICE_CHANGE_LOCK_RES_ID); } +/** + * ice_is_get_tx_sched_new_format + * @hw: pointer to the HW struct + * + * Determines if the new format for the Tx scheduler get api is supported + */ +static bool +ice_is_get_tx_sched_new_format(struct ice_hw *hw) +{ + if (ice_is_e830(hw)) + return true; + if (ice_is_e825c(hw)) + return true; + return false; +} + /** * ice_get_set_tx_topo - get or set tx topology * @hw: pointer to the HW struct @@ -2354,7 +2377,7 @@ ice_get_set_tx_topo(struct ice_hw *hw, u8 *buf, u16 buf_size, ice_fill_dflt_direct_cmd_desc(&desc, ice_aqc_opc_get_tx_topo); cmd->get_flags = ICE_AQC_TX_TOPO_GET_RAM; - if (!ice_is_e830(hw)) + if (!ice_is_get_tx_sched_new_format(hw)) desc.flags |= CPU_TO_LE16(ICE_AQ_FLAG_RD); } diff --git a/sys/dev/ice/ice_ddp_common.h b/sys/dev/ice/ice_ddp_common.h index b7dae1f526f0..a7b717c3e15e 100644 --- a/sys/dev/ice/ice_ddp_common.h +++ b/sys/dev/ice/ice_ddp_common.h @@ -204,7 +204,10 @@ struct ice_sign_seg { __le32 signed_seg_idx; __le32 signed_buf_start; __le32 signed_buf_count; -#define ICE_SIGN_SEG_RESERVED_COUNT 44 +#define ICE_SIGN_SEG_FLAGS_VALID 0x80000000 +#define ICE_SIGN_SEG_FLAGS_LAST 0x00000001 + __le32 flags; +#define ICE_SIGN_SEG_RESERVED_COUNT 40 u8 reserved[ICE_SIGN_SEG_RESERVED_COUNT]; struct ice_buf_table buf_tbl; }; diff --git a/sys/dev/ice/ice_devids.h b/sys/dev/ice/ice_devids.h index 396f59b9d6d9..9b142a1110b2 100644 --- a/sys/dev/ice/ice_devids.h +++ b/sys/dev/ice/ice_devids.h @@ -52,16 +52,16 @@ #define ICE_DEV_ID_E830_SFP 0x12D3 /* Intel(R) Ethernet Controller E830-C for backplane */ #define ICE_DEV_ID_E830C_BACKPLANE 0x12D5 -/* Intel(R) Ethernet Controller E830-XXV for backplane */ -#define ICE_DEV_ID_E830_XXV_BACKPLANE 0x12DC +/* Intel(R) Ethernet Controller E830-L for backplane */ +#define ICE_DEV_ID_E830_L_BACKPLANE 0x12DC /* Intel(R) Ethernet Controller E830-C for QSFP */ #define ICE_DEV_ID_E830C_QSFP 0x12D8 -/* Intel(R) Ethernet Controller E830-XXV for QSFP */ -#define ICE_DEV_ID_E830_XXV_QSFP 0x12DD +/* Intel(R) Ethernet Controller E830-L for QSFP */ +#define ICE_DEV_ID_E830_L_QSFP 0x12DD /* Intel(R) Ethernet Controller E830-C for SFP */ #define ICE_DEV_ID_E830C_SFP 0x12DA -/* Intel(R) Ethernet Controller E830-XXV for SFP */ -#define ICE_DEV_ID_E830_XXV_SFP 0x12DE +/* Intel(R) Ethernet Controller E830-L for SFP */ +#define ICE_DEV_ID_E830_L_SFP 0x12DE /* Intel(R) Ethernet Controller E810-C for backplane */ #define ICE_DEV_ID_E810C_BACKPLANE 0x1591 /* Intel(R) Ethernet Controller E810-C for QSFP */ diff --git a/sys/dev/ice/ice_drv_info.h b/sys/dev/ice/ice_drv_info.h index 6f4d5f05edd0..22e23ee53491 100644 --- a/sys/dev/ice/ice_drv_info.h +++ b/sys/dev/ice/ice_drv_info.h @@ -62,16 +62,16 @@ * @var ice_rc_version * @brief driver release candidate version number */ -const char ice_driver_version[] = "1.42.1-k"; +const char ice_driver_version[] = "1.42.5-k"; const uint8_t ice_major_version = 1; const uint8_t ice_minor_version = 42; -const uint8_t ice_patch_version = 1; +const uint8_t ice_patch_version = 5; const uint8_t ice_rc_version = 0; #define PVIDV(vendor, devid, name) \ - PVID(vendor, devid, name " - 1.42.1-k") + PVID(vendor, devid, name " - 1.42.5-k") #define PVIDV_OEM(vendor, devid, svid, sdevid, revid, name) \ - PVID_OEM(vendor, devid, svid, sdevid, revid, name " - 1.42.1-k") + PVID_OEM(vendor, devid, svid, sdevid, revid, name " - 1.42.5-k") /** * @var ice_vendor_info_array @@ -217,12 +217,12 @@ static const pci_vendor_info_t ice_vendor_info_array[] = { "Intel(R) Ethernet Connection E830-C for QSFP"), PVIDV(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E830C_SFP, "Intel(R) Ethernet Connection E830-C for SFP"), - PVIDV(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E830_XXV_BACKPLANE, - "Intel(R) Ethernet Connection E830-XXV for backplane"), - PVIDV(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E830_XXV_QSFP, - "Intel(R) Ethernet Connection E830-XXV for QSFP"), - PVIDV(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E830_XXV_SFP, - "Intel(R) Ethernet Connection E830-XXV for SFP"), + PVIDV(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E830_L_BACKPLANE, + "Intel(R) Ethernet Connection E830-L for backplane"), + PVIDV(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E830_L_QSFP, + "Intel(R) Ethernet Connection E830-L for QSFP"), + PVIDV(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E830_L_SFP, + "Intel(R) Ethernet Connection E830-L for SFP"), PVIDV(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E825C_BACKPLANE, "Intel(R) Ethernet Connection E825-C for backplane"), PVIDV(ICE_INTEL_VENDOR_ID, ICE_DEV_ID_E825C_QSFP, diff --git a/sys/dev/ice/ice_fw_logging.c b/sys/dev/ice/ice_fw_logging.c index 8e52e34b2752..0025a65d73fc 100644 --- a/sys/dev/ice/ice_fw_logging.c +++ b/sys/dev/ice/ice_fw_logging.c @@ -359,23 +359,6 @@ ice_add_fw_logging_tunables(struct ice_softc *sc, struct sysctl_oid *parent) "Firmware Logging"); fwlog_list = SYSCTL_CHILDREN(fwlog_node); - cfg->log_resolution = 10; - SYSCTL_ADD_PROC(ctx, fwlog_list, OID_AUTO, "log_resolution", - ICE_CTLFLAG_DEBUG | CTLTYPE_U8 | CTLFLAG_RWTUN, sc, - 0, ice_sysctl_fwlog_log_resolution, - "CU", ICE_SYSCTL_HELP_FWLOG_LOG_RESOLUTION); - - cfg->options |= ICE_FWLOG_OPTION_ARQ_ENA; - SYSCTL_ADD_PROC(ctx, fwlog_list, OID_AUTO, "arq_en", - ICE_CTLFLAG_DEBUG | CTLTYPE_U8 | CTLFLAG_RWTUN, sc, - ICE_FWLOG_OPTION_ARQ_ENA, ice_sysctl_fwlog_set_cfg_options, - "CU", ICE_SYSCTL_HELP_FWLOG_ARQ_ENA); - - SYSCTL_ADD_PROC(ctx, fwlog_list, OID_AUTO, "uart_en", - ICE_CTLFLAG_DEBUG | CTLTYPE_U8 | CTLFLAG_RWTUN, sc, - ICE_FWLOG_OPTION_UART_ENA, ice_sysctl_fwlog_set_cfg_options, - "CU", ICE_SYSCTL_HELP_FWLOG_UART_ENA); - SYSCTL_ADD_PROC(ctx, fwlog_list, OID_AUTO, "on_load", ICE_CTLFLAG_DEBUG | CTLTYPE_U8 | CTLFLAG_RWTUN, sc, ICE_FWLOG_OPTION_REGISTER_ON_INIT, ice_sysctl_fwlog_set_cfg_options, @@ -386,23 +369,43 @@ ice_add_fw_logging_tunables(struct ice_softc *sc, struct sysctl_oid *parent) 0, ice_sysctl_fwlog_register, "CU", ICE_SYSCTL_HELP_FWLOG_REGISTER); - module_node = SYSCTL_ADD_NODE(ctx, fwlog_list, OID_AUTO, "severity", - ICE_CTLFLAG_DEBUG | CTLFLAG_RD, NULL, - "Level of log output"); - - module_list = SYSCTL_CHILDREN(module_node); - - for (i = 0; i < ICE_AQC_FW_LOG_ID_MAX; i++) { - /* Setup some defaults */ - cfg->module_entries[i].module_id = i; - cfg->module_entries[i].log_level = ICE_FWLOG_LEVEL_NONE; - module = (enum ice_aqc_fw_logging_mod)i; + hw->pf_id = ice_get_pf_id(hw); + if (hw->pf_id == 0) { + module_node = SYSCTL_ADD_NODE(ctx, fwlog_list, OID_AUTO, "severity", + ICE_CTLFLAG_DEBUG | CTLFLAG_RD, NULL, + "Level of log output"); + + module_list = SYSCTL_CHILDREN(module_node); + + for (i = 0; i < ICE_AQC_FW_LOG_ID_MAX; i++) { + /* Setup some defaults */ + cfg->module_entries[i].module_id = i; + cfg->module_entries[i].log_level = ICE_FWLOG_LEVEL_NONE; + module = (enum ice_aqc_fw_logging_mod)i; + + SYSCTL_ADD_PROC(ctx, module_list, + OID_AUTO, ice_fw_module_str(module), + ICE_CTLFLAG_DEBUG | CTLTYPE_STRING | CTLFLAG_RWTUN, sc, + module, ice_sysctl_fwlog_module_log_severity, + "A", ICE_SYSCTL_HELP_FWLOG_MODULE_SEVERITY); + } - SYSCTL_ADD_PROC(ctx, module_list, - OID_AUTO, ice_fw_module_str(module), - ICE_CTLFLAG_DEBUG | CTLTYPE_STRING | CTLFLAG_RWTUN, sc, - module, ice_sysctl_fwlog_module_log_severity, - "A", ICE_SYSCTL_HELP_FWLOG_MODULE_SEVERITY); + cfg->log_resolution = 10; + SYSCTL_ADD_PROC(ctx, fwlog_list, OID_AUTO, "log_resolution", + ICE_CTLFLAG_DEBUG | CTLTYPE_U8 | CTLFLAG_RWTUN, sc, + 0, ice_sysctl_fwlog_log_resolution, + "CU", ICE_SYSCTL_HELP_FWLOG_LOG_RESOLUTION); + + cfg->options |= ICE_FWLOG_OPTION_ARQ_ENA; + SYSCTL_ADD_PROC(ctx, fwlog_list, OID_AUTO, "arq_en", + ICE_CTLFLAG_DEBUG | CTLTYPE_U8 | CTLFLAG_RWTUN, sc, + ICE_FWLOG_OPTION_ARQ_ENA, ice_sysctl_fwlog_set_cfg_options, + "CU", ICE_SYSCTL_HELP_FWLOG_ARQ_ENA); + + SYSCTL_ADD_PROC(ctx, fwlog_list, OID_AUTO, "uart_en", + ICE_CTLFLAG_DEBUG | CTLTYPE_U8 | CTLFLAG_RWTUN, sc, + ICE_FWLOG_OPTION_UART_ENA, ice_sysctl_fwlog_set_cfg_options, + "CU", ICE_SYSCTL_HELP_FWLOG_UART_ENA); } } diff --git a/sys/dev/ice/ice_hw_autogen.h b/sys/dev/ice/ice_hw_autogen.h index 47256263d66c..3f2778d91a4b 100644 --- a/sys/dev/ice/ice_hw_autogen.h +++ b/sys/dev/ice/ice_hw_autogen.h @@ -40,6 +40,20 @@ #define PRTMAC_CTL_RX_PAUSE_ENABLE_BY_MAC(hw) ((hw)->mac_type == ICE_MAC_E830 ? E830_PRTMAC_CTL_RX_PAUSE_ENABLE : E800_PRTMAC_HSEC_CTL_RX_PAUSE_ENABLE) #define PRTMAC_CTL_RX_PAUSE_ENABLE_RX_PAUSE_ENABLE_S_BY_MAC(hw) ((hw)->mac_type == ICE_MAC_E830 ? E830_PRTMAC_CTL_RX_PAUSE_ENABLE_RX_PAUSE_ENABLE_S : E800_PRTMAC_HSEC_CTL_RX_PAUSE_ENABLE_HSEC_CTL_RX_PAUSE_ENABLE_S) #define PRTMAC_CTL_RX_PAUSE_ENABLE_RX_PAUSE_ENABLE_M_BY_MAC(hw) ((hw)->mac_type == ICE_MAC_E830 ? E830_PRTMAC_CTL_RX_PAUSE_ENABLE_RX_PAUSE_ENABLE_M : E800_PRTMAC_HSEC_CTL_RX_PAUSE_ENABLE_HSEC_CTL_RX_PAUSE_ENABLE_M) +#define E830_GLTCLAN_TSYN_REG_RANGE_ENFORCE(_i) (0x000FD000 + ((_i) * 64)) /* _i=0...7 */ /* Reset Source: CORER */ +#define E830_GLTCLAN_TSYN_REG_RANGE_ENFORCE_MAX_INDEX 7 +#define E830_GLTCLAN_TSYN_REG_RANGE_ENFORCE_START_S 0 +#define E830_GLTCLAN_TSYN_REG_RANGE_ENFORCE_START_M MAKEMASK(0x3F, 0) +#define E830_GLTCLAN_TSYN_REG_RANGE_ENFORCE_END_S 6 +#define E830_GLTCLAN_TSYN_REG_RANGE_ENFORCE_END_M MAKEMASK(0x3F, 6) +#define E830_GLTCLAN_TSYN_REG_RANGE_ENFORCE_VM_VF_TYPE_S 12 +#define E830_GLTCLAN_TSYN_REG_RANGE_ENFORCE_VM_VF_TYPE_M MAKEMASK(0x3, 12) +#define E830_GLTCLAN_TSYN_REG_RANGE_ENFORCE_VM_VF_NUM_S 14 +#define E830_GLTCLAN_TSYN_REG_RANGE_ENFORCE_VM_VF_NUM_M MAKEMASK(0x3FF, 14) +#define E830_GLTCLAN_TSYN_REG_RANGE_ENFORCE_PF_NUM_S 24 +#define E830_GLTCLAN_TSYN_REG_RANGE_ENFORCE_PF_NUM_M MAKEMASK(0x7, 24) +#define E830_GLTCLAN_TSYN_REG_RANGE_ENFORCE_ENABLE_S 31 +#define E830_GLTCLAN_TSYN_REG_RANGE_ENFORCE_ENABLE_M BIT(31) #define GL_HIDA(_i) (0x00082000 + ((_i) * 4)) #define GL_HIBA(_i) (0x00081000 + ((_i) * 4)) #define GL_HICR 0x00082040 diff --git a/sys/dev/ice/ice_lib.c b/sys/dev/ice/ice_lib.c index 88600a05eeee..24dae96326a6 100644 --- a/sys/dev/ice/ice_lib.c +++ b/sys/dev/ice/ice_lib.c @@ -11875,44 +11875,6 @@ ice_sysctl_allow_no_fec_mod_in_auto(SYSCTL_HANDLER_ARGS) return (0); } -/** - * ice_print_dual_nac_info - Print NAC status/ID information - * @sc: device softc structure - * - * Prints out information about the NAC mode if the device is capable of - * being part of a system with multiple NACs. - * - * @pre Must be called after ice_init_hw() and ice_init_device_features() - * sometime during driver load. - */ -void -ice_print_dual_nac_info(struct ice_softc *sc) -{ - struct ice_hw *hw = &sc->hw; - device_t dev = sc->dev; - bool is_dual_nac, is_primary_nac; - u8 cpk_id; - - is_dual_nac = (hw->dev_caps.nac_topo.mode & ICE_NAC_TOPO_DUAL_M); - is_primary_nac = (hw->dev_caps.nac_topo.mode & ICE_NAC_TOPO_PRIMARY_M); - cpk_id = hw->dev_caps.nac_topo.id; - - if (ice_is_bit_set(sc->feat_cap, ICE_FEATURE_DUAL_NAC)) { - log(LOG_INFO, "%s: In %s NAC mode\n", - device_get_nameunit(dev), - is_dual_nac ? "Dual" : "Single"); - - if (is_dual_nac) { - ice_set_bit(ICE_FEATURE_DUAL_NAC, sc->feat_en); - log(LOG_INFO, - "%s: PF is configured in %s mode with IP instance ID %u\n", - device_get_nameunit(dev), - is_primary_nac ? "primary" : "secondary", - cpk_id); - } - } -} - /** * ice_sysctl_temperature - Retrieve NIC temp via AQ command * @oidp: sysctl oid structure diff --git a/sys/dev/ice/ice_lib.h b/sys/dev/ice/ice_lib.h index bbb2bad1c488..ca736746206d 100644 --- a/sys/dev/ice/ice_lib.h +++ b/sys/dev/ice/ice_lib.h @@ -1013,7 +1013,6 @@ void ice_init_health_events(struct ice_softc *sc); void ice_cfg_pba_num(struct ice_softc *sc); int ice_handle_debug_dump_ioctl(struct ice_softc *sc, struct ifdrv *ifd); u8 ice_dcb_get_tc_map(const struct ice_dcbx_cfg *dcbcfg); -void ice_print_dual_nac_info(struct ice_softc *sc); void ice_do_dcb_reconfig(struct ice_softc *sc, bool pending_mib); int ice_setup_vsi_mirroring(struct ice_vsi *vsi); diff --git a/sys/dev/ice/ice_nvm.c b/sys/dev/ice/ice_nvm.c index 9a41f30386c0..ff30adfe8fa7 100644 --- a/sys/dev/ice/ice_nvm.c +++ b/sys/dev/ice/ice_nvm.c @@ -711,6 +711,8 @@ int ice_read_sr_word(struct ice_hw *hw, u16 offset, u16 *data) return status; } +#define check_add_overflow __builtin_add_overflow + /** * ice_get_pfa_module_tlv - Reads sub module TLV from NVM PFA * @hw: pointer to hardware structure @@ -726,8 +728,7 @@ int ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len, u16 module_type) { - u16 pfa_len, pfa_ptr; - u32 next_tlv; + u16 pfa_len, pfa_ptr, next_tlv, max_tlv; int status; status = ice_read_sr_word(hw, ICE_SR_PFA_PTR, &pfa_ptr); @@ -740,11 +741,23 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len, ice_debug(hw, ICE_DBG_INIT, "Failed to read PFA length.\n"); return status; } - /* Starting with first TLV after PFA length, iterate through the list + + if (check_add_overflow(pfa_ptr, (u16)(pfa_len - 1), &max_tlv)) { + ice_debug(hw, ICE_DBG_INIT, "PFA starts at offset %u. PFA length of %u caused 16-bit arithmetic overflow.\n", + pfa_ptr, pfa_len); + return ICE_ERR_INVAL_SIZE; + } + + /* The Preserved Fields Area contains a sequence of TLVs which define + * its contents. The PFA length includes all of the TLVs, plus its + * initial length word itself, *and* one final word at the end of all + * of the TLVs. + * + * Starting with first TLV after PFA length, iterate through the list * of TLVs to find the requested one. */ next_tlv = pfa_ptr + 1; - while (next_tlv < ((u32)pfa_ptr + pfa_len)) { + while (next_tlv < max_tlv) { u16 tlv_sub_module_type; u16 tlv_len; @@ -761,10 +774,6 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len, ice_debug(hw, ICE_DBG_INIT, "Failed to read TLV length.\n"); break; } - if (tlv_len > pfa_len) { - ice_debug(hw, ICE_DBG_INIT, "Invalid TLV length.\n"); - return ICE_ERR_INVAL_SIZE; - } if (tlv_sub_module_type == module_type) { if (tlv_len) { *module_tlv = (u16)next_tlv; @@ -773,10 +782,13 @@ ice_get_pfa_module_tlv(struct ice_hw *hw, u16 *module_tlv, u16 *module_tlv_len, } return ICE_ERR_INVAL_SIZE; } - /* Check next TLV, i.e. current TLV pointer + length + 2 words - * (for current TLV's type and length) - */ - next_tlv = next_tlv + tlv_len + 2; + + if (check_add_overflow(next_tlv, (u16)2, &next_tlv) || + check_add_overflow(next_tlv, tlv_len, &next_tlv)) { + ice_debug(hw, ICE_DBG_INIT, "TLV of type %u and length 0x%04x caused 16-bit arithmetic overflow. The PFA starts at 0x%04x and has length of 0x%04x\n", + tlv_sub_module_type, tlv_len, pfa_ptr, pfa_len); + return ICE_ERR_INVAL_SIZE; + } } /* Module does not exist */ return ICE_ERR_DOES_NOT_EXIST; diff --git a/sys/dev/ice/if_ice_iflib.c b/sys/dev/ice/if_ice_iflib.c index 56bd56d8d2ea..72482d534eb5 100644 --- a/sys/dev/ice/if_ice_iflib.c +++ b/sys/dev/ice/if_ice_iflib.c @@ -546,8 +546,6 @@ reinit_hw: ice_init_device_features(sc); - ice_print_dual_nac_info(sc); - /* Keep flag set by default */ ice_set_state(&sc->state, ICE_STATE_LINK_ACTIVE_ON_DOWN); @@ -2612,7 +2610,9 @@ ice_rebuild(struct ice_softc *sc) } /* Re-enable FW logging. Keep going even if this fails */ - status = ice_fwlog_set(hw, &hw->fwlog_cfg); + status = ICE_SUCCESS; + if (hw->pf_id == 0) + status = ice_fwlog_set(hw, &hw->fwlog_cfg); if (!status) { /* * We should have the most updated cached copy of the @@ -2908,7 +2908,8 @@ ice_init_device_features(struct ice_softc *sc) /* Disable features due to hardware limitations... */ if (!hw->func_caps.common_cap.rss_table_size) ice_clear_bit(ICE_FEATURE_RSS, sc->feat_cap); - if (!hw->func_caps.common_cap.iwarp || !ice_enable_irdma) + if (!hw->func_caps.common_cap.iwarp || !ice_enable_irdma || + ice_is_e830(hw)) ice_clear_bit(ICE_FEATURE_RDMA, sc->feat_cap); if (!hw->func_caps.common_cap.dcb) ice_clear_bit(ICE_FEATURE_DCB, sc->feat_cap); From nobody Sat Jul 26 15:22:46 2025 X-Original-To: dev-commits-src-all@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 4bq7lp4sBcz626SJ; Sat, 26 Jul 2025 15:22: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bq7lp4G01z3G43; Sat, 26 Jul 2025 15:22:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753543366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xVQ+4VvK6GMYVMc0j+eYRSEhct4gvs1XBdXRpAtZgVA=; b=ISkI2yMDcBE36cDba8d/BMRYWx0MqIYk3ss0k5oVPYaiEV407kzP6RQEI4Eb5cpVx4E5NW NgEREgd24snxn9NKIvIuCPdHeadikW1LXFkbiOA/0Chh9b1ZjHOErf4DMzTYmtDNXmR/ha +s3pE16CniKdb99MTb+xWYPszfE2vzPYWbJMZin2nGlEuhj5IULmhFgh9tZnBTQA9du8iM 0Rk7sDC9E4824BQy9vbbbVJz8v7pJ6TgIqh6FzsPsf6LG3p+RI+lMXKjZuB90ZWl90RvOL mYC7Yeez1LSRAToryzutpcZIIiy0+5aN3rcAa/LRC2Mzd0T/eSJGD9uaBdw06Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753543366; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xVQ+4VvK6GMYVMc0j+eYRSEhct4gvs1XBdXRpAtZgVA=; b=pdNUCo8P8HvbfwgTx+tocsjwtfpzdKvtL/yKEJuaChVDTyJF1Lx3uP1aj8PGRsMCC8rDWt yOOvZq/7krJFpVtV4D/NpHjv94b8r8MGd7BCZgosmpHdk05DgiL61UkuzAgx+9ANnWmv7b VR8vi1p9uY4vr5cZp4cmL1TTuS76NBJ5EpPVJVZwI1gJFcUBJ+03tFX1Zxws+QHRbnCfTg ++StoGgO7ieOlEPRfJu7jsTedUCelrEbOKRHbrU+nv1K3w393LNz08xhwGk8HTfnmbFtyc qF1WpLZLZN1aG8KkE2pj34vo0VE++J49ZzoQlPRgSrMgXVaqXSrDU1JG4UIq8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753543366; a=rsa-sha256; cv=none; b=mITtJ7SNGJ5ezyZrieZzRonM47v/GP0X05gDh0MtxwnpZ4HLzkLqX7Yu5QHP+Hvvh91wjC HnUQ5DyPKj0jR9PR85Wdm/Xq7pbN1xLRgVEh1puLe0fyFJbfaoGPMy0Hqz5I6+h9VyO2dU m8HaPQpog+w6TXFxOH4Em2OM4MIJc0mIv8ho8PhUaOnCqCk+nvCUzX4661riTDWx5PF/I9 tNRBZvB3SaxO+RJ2UJHkF6hqGCK2bhci1y/LgQ+tYcJ/frF2TuHcNOcuKIQcmDleHmIDIW K9CFkm834W/Mjphnw7suabLM4TBxZ/5RzVeG71dcxCUPP9HQfInL1DB4aW2E/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bq7lp3mJpzby1; Sat, 26 Jul 2025 15:22:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QFMkwK074790; Sat, 26 Jul 2025 15:22:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QFMkCM074787; Sat, 26 Jul 2025 15:22:46 GMT (envelope-from git) Date: Sat, 26 Jul 2025 15:22:46 GMT Message-Id: <202507261522.56QFMkCM074787@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andriy Gapon Subject: git: 150834f8fa57 - main - sys/geom: use proper style for sizeof operator List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: avg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 150834f8fa57c1ee42e4dd5a42e7faf08ec5b2e5 Auto-Submitted: auto-generated The branch main has been updated by avg: URL: https://cgit.FreeBSD.org/src/commit/?id=150834f8fa57c1ee42e4dd5a42e7faf08ec5b2e5 commit 150834f8fa57c1ee42e4dd5a42e7faf08ec5b2e5 Author: Andriy Gapon AuthorDate: 2025-07-26 15:13:20 +0000 Commit: Andriy Gapon CommitDate: 2025-07-26 15:13:20 +0000 sys/geom: use proper style for sizeof operator No functional change is intended. Missing parentheses around sizeof operands have been added with a coccinnele patch: @disable paren@ expression E; @@ ( sizeof(E) | sizeof +( E +) ) Spaces between sizeof and a parenthesis have been removed with sed. Discussed with: imp MFC after: 2 weeks --- sys/geom/geom.h | 2 +- sys/geom/geom_ccd.c | 10 +++++----- sys/geom/geom_event.c | 2 +- sys/geom/geom_io.c | 2 +- sys/geom/geom_slice.c | 6 +++--- sys/geom/geom_subr.c | 18 +++++++++--------- sys/geom/multipath/g_multipath.c | 10 +++++----- sys/geom/virstor/g_virstor.c | 28 ++++++++++++++-------------- 8 files changed, 39 insertions(+), 39 deletions(-) diff --git a/sys/geom/geom.h b/sys/geom/geom.h index dcd6f793f9f7..908ce86f03a6 100644 --- a/sys/geom/geom.h +++ b/sys/geom/geom.h @@ -282,7 +282,7 @@ void g_detach(struct g_consumer *cp); void g_error_provider(struct g_provider *pp, int error); struct g_provider *g_provider_by_name(char const *arg); int g_getattr__(const char *attr, struct g_consumer *cp, void *var, int len); -#define g_getattr(a, c, v) g_getattr__((a), (c), (v), sizeof *(v)) +#define g_getattr(a, c, v) g_getattr__((a), (c), (v), sizeof(*(v))) int g_handleattr(struct bio *bp, const char *attribute, const void *val, int len); int g_handleattr_int(struct bio *bp, const char *attribute, int val); diff --git a/sys/geom/geom_ccd.c b/sys/geom/geom_ccd.c index 5700399ee5d1..2140d005160e 100644 --- a/sys/geom/geom_ccd.c +++ b/sys/geom/geom_ccd.c @@ -730,17 +730,17 @@ g_ccd_create(struct gctl_req *req, struct g_class *mp) int i, error; g_topology_assert(); - unit = gctl_get_paraml(req, "unit", sizeof (*unit)); + unit = gctl_get_paraml(req, "unit", sizeof(*unit)); if (unit == NULL) { gctl_error(req, "unit parameter not given"); return; } - ileave = gctl_get_paraml(req, "ileave", sizeof (*ileave)); + ileave = gctl_get_paraml(req, "ileave", sizeof(*ileave)); if (ileave == NULL) { gctl_error(req, "ileave parameter not given"); return; } - nprovider = gctl_get_paraml(req, "nprovider", sizeof (*nprovider)); + nprovider = gctl_get_paraml(req, "nprovider", sizeof(*nprovider)); if (nprovider == NULL) { gctl_error(req, "nprovider parameter not given"); return; @@ -769,7 +769,7 @@ g_ccd_create(struct gctl_req *req, struct g_class *mp) } gp = g_new_geomf(mp, "ccd%d", *unit); - sc = g_malloc(sizeof *sc, M_WAITOK | M_ZERO); + sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); gp->softc = sc; sc->sc_ndisks = *nprovider; @@ -872,7 +872,7 @@ g_ccd_list(struct gctl_req *req, struct g_class *mp) struct g_geom *gp; int i, unit, *up; - up = gctl_get_paraml(req, "unit", sizeof (*up)); + up = gctl_get_paraml(req, "unit", sizeof(*up)); if (up == NULL) { gctl_error(req, "unit parameter not given"); return; diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c index 0a76fd6c6f57..341233a6ef47 100644 --- a/sys/geom/geom_event.c +++ b/sys/geom/geom_event.c @@ -145,7 +145,7 @@ g_attr_changed(struct g_provider *pp, const char *attr, int flag) struct g_attrchanged_args *args; int error; - args = g_malloc(sizeof *args, flag); + args = g_malloc(sizeof(*args), flag); if (args == NULL) return (ENOMEM); args->pp = pp; diff --git a/sys/geom/geom_io.c b/sys/geom/geom_io.c index 8d6b9a926e1d..247a623bf1bf 100644 --- a/sys/geom/geom_io.c +++ b/sys/geom/geom_io.c @@ -278,7 +278,7 @@ g_io_init(void) g_bioq_init(&g_bio_run_down); g_bioq_init(&g_bio_run_up); - biozone = uma_zcreate("g_bio", sizeof (struct bio), + biozone = uma_zcreate("g_bio", sizeof(struct bio), NULL, NULL, NULL, NULL, 0, 0); diff --git a/sys/geom/geom_slice.c b/sys/geom/geom_slice.c index 8cfffc478849..0491b0069be4 100644 --- a/sys/geom/geom_slice.c +++ b/sys/geom/geom_slice.c @@ -57,7 +57,7 @@ g_slice_alloc(unsigned nslice, unsigned scsize) { struct g_slicer *gsp; - gsp = g_malloc(sizeof *gsp, M_WAITOK | M_ZERO); + gsp = g_malloc(sizeof(*gsp), M_WAITOK | M_ZERO); if (scsize > 0) gsp->softc = g_malloc(scsize, M_WAITOK | M_ZERO); else @@ -463,9 +463,9 @@ g_slice_conf_hot(struct g_geom *gp, u_int idx, off_t offset, off_t length, int r } gsl = gsp->hotspot; if(idx >= gsp->nhotspot) { - gsl2 = g_malloc((idx + 1) * sizeof *gsl2, M_WAITOK | M_ZERO); + gsl2 = g_malloc((idx + 1) * sizeof(*gsl2), M_WAITOK | M_ZERO); if (gsp->hotspot != NULL) - bcopy(gsp->hotspot, gsl2, gsp->nhotspot * sizeof *gsl2); + bcopy(gsp->hotspot, gsl2, gsp->nhotspot * sizeof(*gsl2)); gsp->hotspot = gsl2; if (gsp->hotspot != NULL) g_free(gsl); diff --git a/sys/geom/geom_subr.c b/sys/geom/geom_subr.c index aba4bf7c44c4..1429c84942ed 100644 --- a/sys/geom/geom_subr.c +++ b/sys/geom/geom_subr.c @@ -267,7 +267,7 @@ g_modevent(module_t mod, int type, void *data) switch (type) { case MOD_LOAD: g_trace(G_T_TOPOLOGY, "g_modevent(%s, LOAD)", mp->name); - hh = g_malloc(sizeof *hh, M_WAITOK | M_ZERO); + hh = g_malloc(sizeof(*hh), M_WAITOK | M_ZERO); hh->mp = mp; /* * Once the system is not cold, MOD_LOAD calls will be @@ -351,7 +351,7 @@ g_retaste(struct g_class *mp) if (mp->taste == NULL) return (EINVAL); - hh = g_malloc(sizeof *hh, M_WAITOK | M_ZERO); + hh = g_malloc(sizeof(*hh), M_WAITOK | M_ZERO); hh->mp = mp; if (cold) { @@ -381,7 +381,7 @@ g_new_geomf(struct g_class *mp, const char *fmt, ...) sbuf_vprintf(sb, fmt, ap); va_end(ap); sbuf_finish(sb); - gp = g_malloc(sizeof *gp + sbuf_len(sb) + 1, M_WAITOK | M_ZERO); + gp = g_malloc(sizeof(*gp) + sbuf_len(sb) + 1, M_WAITOK | M_ZERO); gp->name = (char *)(gp + 1); gp->class = mp; gp->rank = 1; @@ -527,7 +527,7 @@ g_new_consumer(struct g_geom *gp) ("g_new_consumer on geom(%s) (class %s) without orphan", gp->name, gp->class->name)); - cp = g_malloc(sizeof *cp, M_WAITOK | M_ZERO); + cp = g_malloc(sizeof(*cp), M_WAITOK | M_ZERO); cp->geom = gp; cp->stat = devstat_new_entry(cp, -1, 0, DEVSTAT_ALL_SUPPORTED, DEVSTAT_TYPE_DIRECT, DEVSTAT_PRIORITY_MAX); @@ -616,7 +616,7 @@ g_new_providerf(struct g_geom *gp, const char *fmt, ...) sbuf_vprintf(sb, fmt, ap); va_end(ap); sbuf_finish(sb); - pp = g_malloc(sizeof *pp + sbuf_len(sb) + 1, M_WAITOK | M_ZERO); + pp = g_malloc(sizeof(*pp) + sbuf_len(sb) + 1, M_WAITOK | M_ZERO); pp->name = (char *)(pp + 1); strcpy(pp->name, sbuf_data(sb)); sbuf_delete(sb); @@ -748,7 +748,7 @@ g_resize_provider(struct g_provider *pp, off_t size) if (size == pp->mediasize) return; - hh = g_malloc(sizeof *hh, M_WAITOK | M_ZERO); + hh = g_malloc(sizeof(*hh), M_WAITOK | M_ZERO); hh->pp = pp; hh->size = size; g_post_event(g_resize_provider_event, hh, M_WAITOK, NULL); @@ -1082,21 +1082,21 @@ int g_handleattr_int(struct bio *bp, const char *attribute, int val) { - return (g_handleattr(bp, attribute, &val, sizeof val)); + return (g_handleattr(bp, attribute, &val, sizeof(val))); } int g_handleattr_uint16_t(struct bio *bp, const char *attribute, uint16_t val) { - return (g_handleattr(bp, attribute, &val, sizeof val)); + return (g_handleattr(bp, attribute, &val, sizeof(val))); } int g_handleattr_off_t(struct bio *bp, const char *attribute, off_t val) { - return (g_handleattr(bp, attribute, &val, sizeof val)); + return (g_handleattr(bp, attribute, &val, sizeof(val))); } int diff --git a/sys/geom/multipath/g_multipath.c b/sys/geom/multipath/g_multipath.c index 23088c895541..a4935df7eaa1 100644 --- a/sys/geom/multipath/g_multipath.c +++ b/sys/geom/multipath/g_multipath.c @@ -321,7 +321,7 @@ g_multipath_resize(struct g_consumer *cp) if (sc->sc_uuid[0] != 0) { pp = cp->provider; strlcpy(md.md_magic, G_MULTIPATH_MAGIC, sizeof(md.md_magic)); - memcpy(md.md_uuid, sc->sc_uuid, sizeof (sc->sc_uuid)); + memcpy(md.md_uuid, sc->sc_uuid, sizeof(sc->sc_uuid)); strlcpy(md.md_name, sc->sc_name, sizeof(md.md_name)); md.md_version = G_MULTIPATH_VERSION; md.md_size = size; @@ -552,8 +552,8 @@ g_multipath_create(struct g_class *mp, struct g_multipath_metadata *md) gp = g_new_geomf(mp, "%s", md->md_name); sc = g_malloc(sizeof(*sc), M_WAITOK | M_ZERO); mtx_init(&sc->sc_mtx, "multipath", NULL, MTX_DEF); - memcpy(sc->sc_uuid, md->md_uuid, sizeof (sc->sc_uuid)); - memcpy(sc->sc_name, md->md_name, sizeof (sc->sc_name)); + memcpy(sc->sc_uuid, md->md_uuid, sizeof(sc->sc_uuid)); + memcpy(sc->sc_name, md->md_name, sizeof(sc->sc_name)); sc->sc_active_active = md->md_active_active; sc->sc_size = md->md_size; gp->softc = sc; @@ -906,7 +906,7 @@ g_multipath_taste(struct g_class *mp, struct g_provider *pp, int flags __unused) char buf[16]; u_long rand = random(); - snprintf(buf, sizeof (buf), "%s-%lu", md.md_name, rand); + snprintf(buf, sizeof(buf), "%s-%lu", md.md_name, rand); printf("GEOM_MULTIPATH: geom %s/%s exists already\n", sc->sc_name, sc->sc_uuid); printf("GEOM_MULTIPATH: %s will be (temporarily) %s\n", @@ -1200,7 +1200,7 @@ g_multipath_ctl_configure(struct gctl_req *req, struct g_class *mp) cp = sc->sc_active; pp = cp->provider; strlcpy(md.md_magic, G_MULTIPATH_MAGIC, sizeof(md.md_magic)); - memcpy(md.md_uuid, sc->sc_uuid, sizeof (sc->sc_uuid)); + memcpy(md.md_uuid, sc->sc_uuid, sizeof(sc->sc_uuid)); strlcpy(md.md_name, name, sizeof(md.md_name)); md.md_version = G_MULTIPATH_VERSION; md.md_size = pp->mediasize; diff --git a/sys/geom/virstor/g_virstor.c b/sys/geom/virstor/g_virstor.c index 73bd9f73055a..c7d737493f11 100644 --- a/sys/geom/virstor/g_virstor.c +++ b/sys/geom/virstor/g_virstor.c @@ -202,7 +202,7 @@ virstor_ctl_stop(struct gctl_req *req, struct g_class *cp) int *force, *nargs; int i; - nargs = gctl_get_paraml(req, "nargs", sizeof *nargs); + nargs = gctl_get_paraml(req, "nargs", sizeof(*nargs)); if (nargs == NULL) { gctl_error(req, "Error fetching argument '%s'", "nargs"); return; @@ -211,7 +211,7 @@ virstor_ctl_stop(struct gctl_req *req, struct g_class *cp) gctl_error(req, "Invalid number of arguments"); return; } - force = gctl_get_paraml(req, "force", sizeof *force); + force = gctl_get_paraml(req, "force", sizeof(*force)); if (force == NULL) { gctl_error(req, "Error fetching argument '%s'", "force"); return; @@ -315,7 +315,7 @@ virstor_ctl_add(struct gctl_req *req, struct g_class *cp) u_int nc; u_int j; - snprintf(aname, sizeof aname, "arg%d", i); + snprintf(aname, sizeof(aname), "arg%d", i); pp = gctl_get_provider(req, aname); if (pp == NULL) { /* This is the most common error so be verbose about it */ @@ -487,12 +487,12 @@ fill_metadata(struct g_virstor_softc *sc, struct g_virstor_metadata *md, { struct g_virstor_component *c; - bzero(md, sizeof *md); + bzero(md, sizeof(*md)); c = &sc->components[nc]; - strncpy(md->md_magic, G_VIRSTOR_MAGIC, sizeof md->md_magic); + strncpy(md->md_magic, G_VIRSTOR_MAGIC, sizeof(md->md_magic)); md->md_version = G_VIRSTOR_VERSION; - strncpy(md->md_name, sc->geom->name, sizeof md->md_name); + strncpy(md->md_name, sc->geom->name, sizeof(md->md_name)); md->md_id = sc->id; md->md_virsize = sc->virsize; md->md_chunk_size = sc->chunk_size; @@ -500,7 +500,7 @@ fill_metadata(struct g_virstor_softc *sc, struct g_virstor_metadata *md, if (hardcode) { strncpy(md->provider, c->gcons->provider->name, - sizeof md->provider); + sizeof(md->provider)); } md->no = nc; md->provsize = c->gcons->provider->mediasize; @@ -959,7 +959,7 @@ virstor_geom_destroy(struct g_virstor_softc *sc, boolean_t force, free(sc->map, M_GVIRSTOR); free(sc->components, M_GVIRSTOR); - bzero(sc, sizeof *sc); + bzero(sc, sizeof(*sc)); free(sc, M_GVIRSTOR); pp = LIST_FIRST(&gp->provider); /* We only offer one provider */ @@ -1213,7 +1213,7 @@ virstor_check_and_run(struct g_virstor_softc *sc) sc->provider->name, sc->chunk_count * (off_t)sc->chunk_size); } - sc->map_size = sc->chunk_count * sizeof *(sc->map); + sc->map_size = sc->chunk_count * sizeof(*(sc->map)); /* The following allocation is in order of 4MB - 8MB */ sc->map = malloc(sc->map_size, M_GVIRSTOR, M_WAITOK); KASSERT(sc->map != NULL, ("%s: Memory allocation error (%zu bytes) for %s", @@ -1267,7 +1267,7 @@ virstor_check_and_run(struct g_virstor_softc *sc) bcopy(mapbuf, &sc->map[n], bs); off += bs; count += bs; - n += bs / sizeof *(sc->map); + n += bs / sizeof(*(sc->map)); g_free(mapbuf); } g_access(sc->components[0].gcons, -1, 0, 0); @@ -1306,8 +1306,8 @@ virstor_check_and_run(struct g_virstor_softc *sc) sc->components[index].chunk_next); } - sc->me_per_sector = sc->sectorsize / sizeof *(sc->map); - if (sc->sectorsize % sizeof *(sc->map) != 0) { + sc->me_per_sector = sc->sectorsize / sizeof(*(sc->map)); + if (sc->sectorsize % sizeof(*(sc->map)) != 0) { LOG_MSG(LVL_ERROR, "%s: Map entries don't fit exactly in a sector (%s)", __func__, sc->geom->name); @@ -1653,7 +1653,7 @@ g_virstor_start(struct bio *b) * XXX: this will prevent the fs from * being umounted! */ struct g_virstor_bio_q *biq; - biq = malloc(sizeof *biq, M_GVIRSTOR, + biq = malloc(sizeof(*biq), M_GVIRSTOR, M_NOWAIT); if (biq == NULL) { bioq_dismantle(&bq); @@ -1703,7 +1703,7 @@ g_virstor_start(struct bio *b) * map array. * sc_offset will end up pointing to the drive * sector. */ - s_offset = chunk_index * sizeof *me; + s_offset = chunk_index * sizeof(*me); s_offset = rounddown(s_offset, sc->sectorsize); /* data_me points to map entry sector From nobody Sat Jul 26 16:45:48 2025 X-Original-To: dev-commits-src-all@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 4bq9bc4K9gz62Bg5; Sat, 26 Jul 2025 16:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bq9bc3lp1z3Lyg; Sat, 26 Jul 2025 16:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753548348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9ohQ+qP0kr5e6eCgjMwfwfAK2mcaRKs22LJTn38JS1E=; b=LJiOm+wEE7wAznSPHPcAusliYdN4Pnqx4wdokwWWJh9ISZAw3eg5lxTx3Xvl2aKgK2oEWE io41wUgm8Dsri5C+rpbRdAjtuc+zP0eXhc9L7gbz7ShUHGBjkP40Po7DJOM9/H0T7xyHEH E7Ll2uPL3kZcuDMflsPLisF2kJHRKjR0MloAz6ZXJ4IkCE9Aij/ytjIsBr1+ioKUj0JtVV ZYf+rgMJsgAVOq99eOByJr2MTjQowpNnuBq7c4l2MCIUrGGhYvQ1ZYpF839bqIUJH+Ksj3 9VNlR5FzyH3rT0t60oCViz7cEyLymXjTabSIXWeOxPZr+o3ogTTU4GqZQ0AuXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753548348; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9ohQ+qP0kr5e6eCgjMwfwfAK2mcaRKs22LJTn38JS1E=; b=JxxAgecpasP7TcRGs5UIQ5kObcYVVFCaebqcB/n+Mg8eINILJsgtKYWTBc3rpWD7s3UxIw EZVU7TVVmgVRiXTpSeExc6k+SLFLLpZ2XUkfbdLTO9z6zoZvUvZiz0xn/+e+Qyx9Pt1sWw hm7yTccvKnlASuUWzvRbdVvRfsHOxAQZt+OLZhjQhfPF1zIXyFkX6hRuXV7KxJ7p7S+2Qs 77/IKu/UcdmLt5dYB2DgwH4S7RYG4018LbF4CLWDFhtQoDsx8noUV3uWIcpCkhpdaFrY7I M8lqkp203xnyZD2lnfANXv2IakwI1EDwLhtV7Nd3KqZyv5m9/ortx/ZMMNNMAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753548348; a=rsa-sha256; cv=none; b=B8YX8STHZDh9v9/BpLDmrLL0kdDrcbOzvOqk5VvMoMaClM2kkTOKaXuE6MuRXV8Fh1S6pw GJQk+c2LV6GFGaiHF1cmLHHJX+H2Y2y6O6SC8iaX/dwCiEPjQqMpSAmF+3Xjq02SJUG8A6 l/u2z4r5PB8fjyidm2wFpCdRqi0LNQDRr+sSJAGHNotKqIfKycYytWxT1XZVU+Ft9J2b/D drEc7v6G7eyxgrTgM9tVnqX2+SKE5GFFPwAdX7cRQ76Owryqm+XKAYDERJhEb9Pn3p33z5 c9unCrGDddnZ4FYnq2ipGu0KP8Cfq3bAckyUeLcIq35FrJ1uatpOgQ4CsVVdqw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bq9bc3LhqzfBh; Sat, 26 Jul 2025 16:45:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QGjmuE026427; Sat, 26 Jul 2025 16:45:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QGjmcm026424; Sat, 26 Jul 2025 16:45:48 GMT (envelope-from git) Date: Sat, 26 Jul 2025 16:45:48 GMT Message-Id: <202507261645.56QGjmcm026424@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: a7fa987abe1f - main - xargs: Limit -n to {ARG_MAX} List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a7fa987abe1fb0b25a7dd83dc81f14f64a82efc9 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a7fa987abe1fb0b25a7dd83dc81f14f64a82efc9 commit a7fa987abe1fb0b25a7dd83dc81f14f64a82efc9 Author: Dag-Erling Smørgrav AuthorDate: 2025-07-26 16:44:35 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-07-26 16:44:35 +0000 xargs: Limit -n to {ARG_MAX} Since it's not possible to pass more than {ARG_MAX} bytes on the command line, it's also not possible to pass more than {ARG_MAX} individual arguments. Therefore, {ARG_MAX} is a reasonable upper bound for the -n option. This resolves both the arithmetic overflow issue and the CI OOM issue, so we can safely re-enable the test. Fixes: eab91d008165 Fixes: 2682a1552724 MFC after: 1 week Reviewed by: jlduran, emaste Differential Revision: https://reviews.freebsd.org/D51536 --- ObsoleteFiles.inc | 3 +++ usr.bin/xargs/tests/Makefile | 2 +- .../xargs/tests/{regress.n2147483647.out => regress.nargmax.out} | 0 usr.bin/xargs/tests/regress.sh | 8 ++++---- usr.bin/xargs/xargs.c | 2 +- 5 files changed, 9 insertions(+), 6 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 10f99c5d6047..00f889804013 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,9 @@ # xargs -n1 | sort | uniq -d; # done +# 20250726: Test case renamed +OLD_FILES+=usr/tests/usr.bin/xargs/regress.n2147483647.out + # 20250726: This file is now installed in /etc/dma OLD_FILES+=usr/share/examples/dma/auth.conf diff --git a/usr.bin/xargs/tests/Makefile b/usr.bin/xargs/tests/Makefile index b1e6782069de..1a9265b88b4e 100644 --- a/usr.bin/xargs/tests/Makefile +++ b/usr.bin/xargs/tests/Makefile @@ -17,7 +17,7 @@ ${PACKAGE}FILES+= regress.R-1.out ${PACKAGE}FILES+= regress.in ${PACKAGE}FILES+= regress.n1.out ${PACKAGE}FILES+= regress.n2.out -${PACKAGE}FILES+= regress.n2147483647.out +${PACKAGE}FILES+= regress.nargmax.out ${PACKAGE}FILES+= regress.n2P0.out ${PACKAGE}FILES+= regress.n3.out ${PACKAGE}FILES+= regress.normal.out diff --git a/usr.bin/xargs/tests/regress.n2147483647.out b/usr.bin/xargs/tests/regress.nargmax.out similarity index 100% rename from usr.bin/xargs/tests/regress.n2147483647.out rename to usr.bin/xargs/tests/regress.nargmax.out diff --git a/usr.bin/xargs/tests/regress.sh b/usr.bin/xargs/tests/regress.sh index 9b4839d2a8ec..e65a5a703505 100644 --- a/usr.bin/xargs/tests/regress.sh +++ b/usr.bin/xargs/tests/regress.sh @@ -1,5 +1,5 @@ -echo 1..21 +echo 1..23 REGRESSION_START($1) @@ -12,9 +12,8 @@ REGRESSION_TEST(`R', `xargs -I% -R1 echo The % % % %% % % <${SRCDIR}/regress.in' REGRESSION_TEST(`R-1', `xargs -I% -R-1 echo The % % % %% % % <${SRCDIR}/regress.in') REGRESSION_TEST(`n1', `xargs -n1 echo <${SRCDIR}/regress.in') REGRESSION_TEST(`n2', `xargs -n2 echo <${SRCDIR}/regress.in') -# This test may consume a large amount of memory, making it unsuited to CI -# environments. Disable it for now. -#REGRESSION_TEST(`n2147483647', `xargs -n2147483647 <${SRCDIR}/regress.in') +argmax=$(sysctl -n kern.argmax) +REGRESSION_TEST(`nargmax', `xargs -n$argmax <${SRCDIR}/regress.in') REGRESSION_TEST(`n2P0',`xargs -n2 -P0 echo <${SRCDIR}/regress.in | sort') REGRESSION_TEST(`n3', `xargs -n3 echo <${SRCDIR}/regress.in') REGRESSION_TEST(`0', `xargs -0 -n1 echo <${SRCDIR}/regress.0.in') @@ -28,5 +27,6 @@ REGRESSION_TEST_FREEFORM(`parallel1', `echo /var/empty /var/empty | REGRESSION_TEST_FREEFORM(`parallel2', `echo /var/empty /var/empty/nodir | xargs -n1 -P2 test -d; [ $? = 1 ]') REGRESSION_TEST_FREEFORM(`parallel3', `echo /var/empty/nodir /var/empty | xargs -n1 -P2 test -d; [ $? = 1 ]') REGRESSION_TEST_FREEFORM(`parallel4', `echo /var/empty/nodir /var/empty/nodir | xargs -n1 -P2 test -d; [ $? = 1 ]') +REGRESSION_TEST_FREEFORM(`ntoobig', `seq 42 | xargs -n$((argmax+1)); [ $? = 1 ]') REGRESSION_END() diff --git a/usr.bin/xargs/xargs.c b/usr.bin/xargs/xargs.c index 237beff26504..2a7f026e5066 100644 --- a/usr.bin/xargs/xargs.c +++ b/usr.bin/xargs/xargs.c @@ -166,7 +166,7 @@ main(int argc, char *argv[]) break; case 'n': nflag = 1; - nargs = (int)strtonum(optarg, 1, INT_MAX, &errstr); + nargs = (int)strtonum(optarg, 1, arg_max, &errstr); if (errstr) errx(1, "-%c %s: %s", ch, optarg, errstr); break; From nobody Sat Jul 26 16:45:49 2025 X-Original-To: dev-commits-src-all@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 4bq9bf1RVZz62BX9; Sat, 26 Jul 2025 16:45:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bq9bd5HQLz3Lyk; Sat, 26 Jul 2025 16:45:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753548349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KwKmpWV0g7coXlXaLaX5cApf1PjW4hMvitqZDt4WQCg=; b=rFOiM5mjEKe3SL/6jvMb+DeV8lEPa4jQjDsmics1/v2coiGcyMlUz/+IWCt7U7I1FjXdrM LkJnXDLOIc8SPKNAZVu/uUP/32bn2Jb+9sZW5vRVexsx8a2JKap7y1VmyjeyY8xe/uJY7b TH9L9QqTxllnvBO710a53Q7IkuxYTlzk0mjxzU8ng0CwLedBJMRf1Qr1CwsAmA7H+3O9jn /EUGO7KL2cdxmr3XuqxJV8yT6koLIYQLKsGAj6/nFmr2crPnzTe/b7QyLNuklUXR2pRMvz TjqZHquLZfJdSQmutKKhIO4JMSGgjSw92ZpKZiBNIneu1nq+tfv2hKEiHRGKng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753548349; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KwKmpWV0g7coXlXaLaX5cApf1PjW4hMvitqZDt4WQCg=; b=FYhV7K31saHMQ9Tjez0PSYAacjv5kTv5de77sCuHdcw2F3PSTvpok9amHZK47VtbqxwAMO rgC0Cpl3uHvuQv9JQXvxzb+9vVyv+qPF6MlPA2Jq9z8Qd27VxAdtElifGfBatwKb7i6Qup 5ml7XHRso1dEQ2pVTUDXf1dJajrmhcUt7fTmeUMi7V55r4mSUq4bFvtNZsPboyZW2sg6eC nFeu5wrg71dTaCXi+JE5mX5zaGbV377tzXBWwgeefG6C0Ss/xSQNnvx1nGWIyYF78U26BP bB8szoNkuvQuMe+7RahKStCof1ayXO3A/seI/gGAyfVF6zvm3Alm5fiHkqD45g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753548349; a=rsa-sha256; cv=none; b=yJ7kzhr1Fk5KFfIRtNMQNSv+E+Ol6zFyjhOzkSRu1kwBKK4do4awnbAlPO+PakzYU4+DgB AMn/SCnB1fGhcR/mSX1I9GLPdIbyUztttzXpy2cfqolOW0HK6j7aA7+HEzgHpYIHD3gEvf 6KWmAM/nEfwgNSrC2xVzOZkgx6CzmE9H55gCoJ+kd9z3iRG/mFVaEcgcbnvSRPYR8BIixE vN2js/qocXDrbKLeSIbpyF54poOJCl1yP+e2Ob0T82BVLYYyUhslBhHjJDJ9oZIcpka8hh hbXgEiB6NAyHOaJrJd9MOUZalZSmLBhC2p0Si2rWyS6ySWYQ2CX+qVtg9H/sbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bq9bd4jjBzfHN; Sat, 26 Jul 2025 16:45:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QGjnSL026465; Sat, 26 Jul 2025 16:45:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QGjnpD026462; Sat, 26 Jul 2025 16:45:49 GMT (envelope-from git) Date: Sat, 26 Jul 2025 16:45:49 GMT Message-Id: <202507261645.56QGjnpD026462@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: b26f93a46503 - main - xargs: Convert tests to ATF List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b26f93a4650339ceb319fe772faaca7389110113 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b26f93a4650339ceb319fe772faaca7389110113 commit b26f93a4650339ceb319fe772faaca7389110113 Author: Dag-Erling Smørgrav AuthorDate: 2025-07-26 16:44:43 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-07-26 16:44:43 +0000 xargs: Convert tests to ATF Also add license and copyright statement, with permission from the original author. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D51537 --- ObsoleteFiles.inc | 4 +- usr.bin/xargs/tests/Makefile | 3 +- usr.bin/xargs/tests/legacy_test.sh | 5 - usr.bin/xargs/tests/regress.sh | 32 ------ usr.bin/xargs/tests/xargs_test.sh | 193 +++++++++++++++++++++++++++++++++++++ 5 files changed, 197 insertions(+), 40 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 00f889804013..8fbba3964832 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,8 +51,10 @@ # xargs -n1 | sort | uniq -d; # done -# 20250726: Test case renamed +# 20250726: xargs tests rewritten +OLD_FILES+=usr/tests/usr.bin/xargs/legacy_test OLD_FILES+=usr/tests/usr.bin/xargs/regress.n2147483647.out +OLD_FILES+=usr/tests/usr.bin/xargs/regress.sh # 20250726: This file is now installed in /etc/dma OLD_FILES+=usr/share/examples/dma/auth.conf diff --git a/usr.bin/xargs/tests/Makefile b/usr.bin/xargs/tests/Makefile index 1a9265b88b4e..9fa8ff11fac2 100644 --- a/usr.bin/xargs/tests/Makefile +++ b/usr.bin/xargs/tests/Makefile @@ -1,6 +1,6 @@ PACKAGE= tests -TAP_TESTS_SH= legacy_test +ATF_TESTS_SH= xargs_test ${PACKAGE}FILES+= regress.0.in ${PACKAGE}FILES+= regress.0.out @@ -23,6 +23,5 @@ ${PACKAGE}FILES+= regress.n3.out ${PACKAGE}FILES+= regress.normal.out ${PACKAGE}FILES+= regress.quotes.in ${PACKAGE}FILES+= regress.quotes.out -${PACKAGE}FILES+= regress.sh .include diff --git a/usr.bin/xargs/tests/legacy_test.sh b/usr.bin/xargs/tests/legacy_test.sh deleted file mode 100644 index 3c7842d07bf0..000000000000 --- a/usr.bin/xargs/tests/legacy_test.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -SRCDIR="$(dirname "${0}")"; export SRCDIR - -m4 "${SRCDIR}/../regress.m4" "${SRCDIR}/regress.sh" | sh diff --git a/usr.bin/xargs/tests/regress.sh b/usr.bin/xargs/tests/regress.sh deleted file mode 100644 index e65a5a703505..000000000000 --- a/usr.bin/xargs/tests/regress.sh +++ /dev/null @@ -1,32 +0,0 @@ - -echo 1..23 - -REGRESSION_START($1) - -REGRESSION_TEST(`normal', `xargs echo The <${SRCDIR}/regress.in') -REGRESSION_TEST(`I', `xargs -I% echo The % % % %% % % <${SRCDIR}/regress.in') -REGRESSION_TEST(`J', `xargs -J% echo The % again. <${SRCDIR}/regress.in') -REGRESSION_TEST(`L', `xargs -L3 echo <${SRCDIR}/regress.in') -REGRESSION_TEST(`P1', `xargs -P1 echo <${SRCDIR}/regress.in') -REGRESSION_TEST(`R', `xargs -I% -R1 echo The % % % %% % % <${SRCDIR}/regress.in') -REGRESSION_TEST(`R-1', `xargs -I% -R-1 echo The % % % %% % % <${SRCDIR}/regress.in') -REGRESSION_TEST(`n1', `xargs -n1 echo <${SRCDIR}/regress.in') -REGRESSION_TEST(`n2', `xargs -n2 echo <${SRCDIR}/regress.in') -argmax=$(sysctl -n kern.argmax) -REGRESSION_TEST(`nargmax', `xargs -n$argmax <${SRCDIR}/regress.in') -REGRESSION_TEST(`n2P0',`xargs -n2 -P0 echo <${SRCDIR}/regress.in | sort') -REGRESSION_TEST(`n3', `xargs -n3 echo <${SRCDIR}/regress.in') -REGRESSION_TEST(`0', `xargs -0 -n1 echo <${SRCDIR}/regress.0.in') -REGRESSION_TEST(`0I', `xargs -0 -I% echo The % %% % <${SRCDIR}/regress.0.in') -REGRESSION_TEST(`0J', `xargs -0 -J% echo The % again. <${SRCDIR}/regress.0.in') -REGRESSION_TEST(`0L', `xargs -0 -L2 echo <${SRCDIR}/regress.0.in') -REGRESSION_TEST(`0P1', `xargs -0 -P1 echo <${SRCDIR}/regress.0.in') -REGRESSION_TEST(`quotes', `xargs -n1 echo <${SRCDIR}/regress.quotes.in') - -REGRESSION_TEST_FREEFORM(`parallel1', `echo /var/empty /var/empty | xargs -n1 -P2 test -d; [ $? = 0 ]') -REGRESSION_TEST_FREEFORM(`parallel2', `echo /var/empty /var/empty/nodir | xargs -n1 -P2 test -d; [ $? = 1 ]') -REGRESSION_TEST_FREEFORM(`parallel3', `echo /var/empty/nodir /var/empty | xargs -n1 -P2 test -d; [ $? = 1 ]') -REGRESSION_TEST_FREEFORM(`parallel4', `echo /var/empty/nodir /var/empty/nodir | xargs -n1 -P2 test -d; [ $? = 1 ]') -REGRESSION_TEST_FREEFORM(`ntoobig', `seq 42 | xargs -n$((argmax+1)); [ $? = 1 ]') - -REGRESSION_END() diff --git a/usr.bin/xargs/tests/xargs_test.sh b/usr.bin/xargs/tests/xargs_test.sh new file mode 100755 index 000000000000..12c9407a7e45 --- /dev/null +++ b/usr.bin/xargs/tests/xargs_test.sh @@ -0,0 +1,193 @@ +# +# Copyright (c) 2002 Juli Mallett +# Copyright (c) 2025 Dag-Erling Smørgrav +# +# SPDX-License-Identifier: BSD-2-Clause +# + +SRCDIR=$(atf_get_srcdir) + +atf_test_case xargs_normal +xargs_normal_body() +{ + atf_check -o file:${SRCDIR}/regress.normal.out \ + xargs echo The <${SRCDIR}/regress.in +} + +atf_test_case xargs_I +xargs_I_body() +{ + atf_check -o file:${SRCDIR}/regress.I.out \ + xargs -I% echo The % % % %% % % <${SRCDIR}/regress.in +} + +atf_test_case xargs_J +xargs_J_body() +{ + atf_check -o file:${SRCDIR}/regress.J.out \ + xargs -J% echo The % again. <${SRCDIR}/regress.in +} + +atf_test_case xargs_L +xargs_L_body() +{ + atf_check -o file:${SRCDIR}/regress.L.out \ + xargs -L3 echo <${SRCDIR}/regress.in +} + +atf_test_case xargs_P1 +xargs_P1_body() +{ + atf_check -o file:${SRCDIR}/regress.P1.out \ + xargs -P1 echo <${SRCDIR}/regress.in +} + +atf_test_case xargs_R +xargs_R_body() +{ + atf_check -o file:${SRCDIR}/regress.R.out \ + xargs -I% -R1 echo The % % % %% % % <${SRCDIR}/regress.in +} + +atf_test_case xargs_R_1 +xargs_R_1_body() +{ + atf_check -o file:${SRCDIR}/regress.R-1.out \ + xargs -I% -R-1 echo The % % % %% % % <${SRCDIR}/regress.in +} + +atf_test_case xargs_n1 +xargs_n1_body() +{ + atf_check -o file:${SRCDIR}/regress.n1.out \ + xargs -n1 echo <${SRCDIR}/regress.in +} + +atf_test_case xargs_n2 +xargs_n2_body() +{ + atf_check -o file:${SRCDIR}/regress.n2.out \ + xargs -n2 echo <${SRCDIR}/regress.in +} + +atf_test_case xargs_nargmax +xargs_nargmax_body() +{ + argmax=$(sysctl -n kern.argmax) + atf_check -o file:${SRCDIR}/regress.nargmax.out \ + xargs -n$((argmax)) <${SRCDIR}/regress.in + atf_check -s exit:1 -e match:"too large" \ + xargs -n$((argmax+1)) <${SRCDIR}/regress.in +} + +atf_test_case xargs_n2P0 +xargs_n2P0_body() +{ + atf_check -o save:regress.out \ + xargs -n2 -P0 echo <${SRCDIR}/regress.in + atf_check -o file:${SRCDIR}/regress.n2P0.out \ + sort regress.out +} + +atf_test_case xargs_n3 +xargs_n3_body() +{ + atf_check -o file:${SRCDIR}/regress.n3.out \ + xargs -n3 echo <${SRCDIR}/regress.in +} + +atf_test_case xargs_0 +xargs_0_body() +{ + atf_check -o file:${SRCDIR}/regress.0.out \ + xargs -0 -n1 echo <${SRCDIR}/regress.0.in +} + +atf_test_case xargs_0I +xargs_0I_body() +{ + atf_check -o file:${SRCDIR}/regress.0I.out \ + xargs -0 -I% echo The % %% % <${SRCDIR}/regress.0.in +} + +atf_test_case xargs_0J +xargs_0J_body() +{ + atf_check -o file:${SRCDIR}/regress.0J.out \ + xargs -0 -J% echo The % again. <${SRCDIR}/regress.0.in +} + +atf_test_case xargs_0L +xargs_0L_body() +{ + atf_check -o file:${SRCDIR}/regress.0L.out \ + xargs -0 -L2 echo <${SRCDIR}/regress.0.in +} + +atf_test_case xargs_0P1 +xargs_0P1_body() +{ + atf_check -o file:${SRCDIR}/regress.0P1.out \ + xargs -0 -P1 echo <${SRCDIR}/regress.0.in +} + +atf_test_case xargs_quotes +xargs_quotes_body() +{ + atf_check -o file:${SRCDIR}/regress.quotes.out \ + xargs -n1 echo <${SRCDIR}/regress.quotes.in +} + +atf_test_case xargs_parallel1 +xargs_parallel1_body() +{ + echo /var/empty /var/empty >input + atf_check xargs -n1 -P2 test -d input + atf_check -s exit:1 xargs -n1 -P2 test -d input + atf_check -s exit:1 xargs -n1 -P2 test -d input + atf_check -s exit:1 xargs -n1 -P2 test -d To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: ea60d917e5b1 - main - linprocfs: Continue on error when reading process limits List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: ea60d917e5b1943c8638af056dbcdbb3646207f1 Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=ea60d917e5b1943c8638af056dbcdbb3646207f1 commit ea60d917e5b1943c8638af056dbcdbb3646207f1 Author: Ricardo Branco AuthorDate: 2025-02-06 21:46:19 +0000 Commit: Warner Losh CommitDate: 2025-07-26 17:12:38 +0000 linprocfs: Continue on error when reading process limits The process limits may be unavailable due to capsicum. Like other areas of the system, report what we can w/o error. This is what Linux does. PR: 283726 Reviewed by: imp, dchagin Pull Request: https://github.com/freebsd/freebsd-src/pull/1592 --- sys/compat/linprocfs/linprocfs.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/compat/linprocfs/linprocfs.c b/sys/compat/linprocfs/linprocfs.c index cfb054235489..1c6d64d6b8bc 100644 --- a/sys/compat/linprocfs/linprocfs.c +++ b/sys/compat/linprocfs/linprocfs.c @@ -1911,7 +1911,7 @@ linprocfs_doproclimits(PFS_FILL_ARGS) "kern.sigqueue.max_pending_per_proc", &res, &size, 0, 0, 0, 0); if (error != 0) - goto out; + continue; rl.rlim_cur = res; rl.rlim_max = res; break; @@ -1919,7 +1919,7 @@ linprocfs_doproclimits(PFS_FILL_ARGS) error = kernel_sysctlbyname(td, "kern.ipc.msgmnb", &res, &size, 0, 0, 0, 0); if (error != 0) - goto out; + continue; rl.rlim_cur = res; rl.rlim_max = res; break; @@ -1941,9 +1941,9 @@ linprocfs_doproclimits(PFS_FILL_ARGS) li->desc, (unsigned long long)rl.rlim_cur, (unsigned long long)rl.rlim_max, li->unit); } -out: + lim_free(limp); - return (error); + return (0); } /* From nobody Sat Jul 26 17:12:44 2025 X-Original-To: dev-commits-src-all@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 4bqBBh4HTsz62DKr; Sat, 26 Jul 2025 17:12: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqBBh2kt2z3Pfs; Sat, 26 Jul 2025 17:12:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753549964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FFslMMUXrTDs8Yvo8XyS7fuFkUybrzo4CjFlQYAFwUs=; b=ynJF9xQPuTWE4GVXBhGqvUV7iMpKzf7FvqgaLze+fIoERDLt+d2Y/SwqIW9uv7GnvsoeKs pkNX4LYPDFHr5gCQWQyVaYahn5yqe8exn9tIpog+6LBrVNDca9NOEBSHTmjCTZlHI9FDkB xt+SJBWeSdwvFhcIvZ5WwMyj2SoWWbeS9xJ6SPYebJr2yefg/paVS9Uq4NS0YW+lfsvs+1 JzCv+Lh+Fz2PWRMbRK8FI0Ltx5KiFzbbLj1Sv8dN3oWaGpNz42UaQZVbIQMXDKi2zsw00x NQnR6nlHhUvEORRPETXnNqRcUT8mpmLG0SYjeTz5iS7DInFtM0sxXCmH+L/koA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753549964; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FFslMMUXrTDs8Yvo8XyS7fuFkUybrzo4CjFlQYAFwUs=; b=B1VPu4a4WGXV+pWSQEXRNJ8kPfmfZwYHD30+crBowiuR1RYrxiL8O/i93W0WOk4OjdUDup RNA1WxZQ1YoO6+z00yH7MmqYdEgVtxDnKT6pHqSH0r2WBFLYPWnTYHAi73EibxUne7qJnF 3AGRiKmx6r0zn8oG0vX1wNMROy6C/ScyRztqNosiuVqnTZbvJcCIbONJlhuBeWs4Jsz1oR Ld8823JPe/3HFeSLKlfKySa3uCYD2Lyn/dffxGpj98Qg8xrGzJSS0hBf0oB+aw9ZtND7gI DzoBIIb2Q6iLGxW7cQMsg5JrgjolVT9AeHFPZBQxHnP2oCqK5rz5GLja/3+HYg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753549964; a=rsa-sha256; cv=none; b=lYuXVNKDaphwQ3ZU3id2Db1U+MEx0r2R90sicehvcTO2uDaIXV03ZT5vKK8fqVTX0XG5xZ A5+JqDEnXfTc0hyErQVtHEbV2J287xJMwLYZxldz7+FkKacieM1GOjyDos8JWMMz+F6vCR MVeRno/hmGKheDgvx6CQnI3soMHLnKJhynTcxX46jhpqcAOE8VMB5UnGs2uvdqpwWQteXn kPk8dpeK+MWXXlFJ4tyo1DvxyNv+F8gWb4R0kZ8tyAMdAzs8YR7R2XIslH8QuYQasksgSl kIdWjw35ITQfYmu6Sn7ygJJbdrof3zcti8uYquhtBCTexjjq5gzIONLxBPKYxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqBBh2GgFzfn8; Sat, 26 Jul 2025 17:12:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QHCiwq082741; Sat, 26 Jul 2025 17:12:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QHCi97082738; Sat, 26 Jul 2025 17:12:44 GMT (envelope-from git) Date: Sat, 26 Jul 2025 17:12:44 GMT Message-Id: <202507261712.56QHCi97082738@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Warner Losh Subject: git: a52d0d76fa3e - main - find: Document possible formats List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: a52d0d76fa3e47d5d64b4620280f26979afe15fc Auto-Submitted: auto-generated The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=a52d0d76fa3e47d5d64b4620280f26979afe15fc commit a52d0d76fa3e47d5d64b4620280f26979afe15fc Author: Warner Losh AuthorDate: 2025-07-26 17:11:10 +0000 Commit: Warner Losh CommitDate: 2025-07-26 17:12:38 +0000 find: Document possible formats Accidentlaly committed with XXX write this. So write which formats -printf supports. Sponsored by: Netflix --- usr.bin/find/find.1 | 76 +++++++++++++++++++++++++++++++++++++++++++++++++-- usr.bin/find/printf.c | 6 ++++ 2 files changed, 80 insertions(+), 2 deletions(-) diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1 index 3012ae472015..e5ca81e69bdc 100644 --- a/usr.bin/find/find.1 +++ b/usr.bin/find/find.1 @@ -28,7 +28,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 23, 2024 +.Dd July 26, 2025 .Dt FIND 1 .Os .Sh NAME @@ -1096,7 +1096,79 @@ as zero; It is not yet implemented. .It Format: One or two characters, described below, which indicates the information to display. -XXX need to write this. +.Bl -tag -width Ds +.It p +Path to file +.It f +Filename without directories. +.It h +Path relative to the starting point, or '.' if that's empty for some reason. +.It P +Unimplemented -- File with command line arg. +.It H +Unimplemented -- Command line arg. +.It g +gid in human readable form. +.It G +gid as a number. +.It h +uid in human readable form. +.It U +uid as a number. +.It m +File permission mode in octal. +.It M +File mode in +.Xr ls 1 +standard form. +.It k +File size in KiB (units of 1024 bytes). +.It b +File size in blocks (Always 512 byte units, even if underlying storage +size differs). +.It s +Size in bytes of the file. +.It S +Sparseness of the file. +The blocks the file occupies times 512 divided by the file size. +.It d +Depth in the tree +.It D +Device number for the file. +.It F +Unimplemented -- Filesystem type where the file resides. +.It l +Object of the symbolic link. +.It i +Inode of the file. +.It n +Number of hard links. +.It y +Unimplemented -- Type of the file +.It Y +Unimplemented -- Type of the file with loop detection +.It a +Access time of the file. +.It A +Access time of the file in strftime format. +Takes an additional argument. +.It b +Birth time of a file. +.It B +Birth time of the file in strftime format. +Takes an additional argument. +.It c +Creation time of the file. +.It C +Creation time of the file in strftime format. +Takes an additional argument. +.It t +Modification time of the file. +.It T +Modification time of the file in strftime format. +Takes an additional argument. +.El +Any format not listed is not supported, though the error changes. .El .El .Sh ENVIRONMENT diff --git a/usr.bin/find/printf.c b/usr.bin/find/printf.c index 671d1d1dbb9a..532c17bfb80b 100644 --- a/usr.bin/find/printf.c +++ b/usr.bin/find/printf.c @@ -269,6 +269,12 @@ do_printf(PLAN *plan, FTSENT *entry, FILE *fout) case 'A': /* access time with next char strftime format */ fp_strftime(fp, sb->st_atime, *fmt++); break; + case 'b': /* birth time */ +#ifdef HAVE_STRUCT_STAT_ST_BIRTHTIME + fp_ctime(fp, sb->st_birthtime); +#else + fp_ctime(fp, 0); +#endif case 'B': /* birth time with next char strftime format */ #ifdef HAVE_STRUCT_STAT_ST_BIRTHTIME if (sb->st_birthtime != 0) From nobody Sat Jul 26 18:42:30 2025 X-Original-To: dev-commits-src-all@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 4bqDBG4vGfz62KZc; Sat, 26 Jul 2025 18:42: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqDBG3FvFz3YRY; Sat, 26 Jul 2025 18:42:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753555350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RfvLh7yCENha7DiQ2No8w27uQHG3rp9Fi6fTGKm0dUs=; b=w+i8+EZF86/dW/j4zGxG7EokicW684NQXpOCLOZgk7XVe03MjtJYM3BDkv6VReGbyEEbxE 3+FBa+5wtOfCdcb6nYyNE9EGzguly5s5ookjLmABZd0tGI7O7eg04Uxrcz9yBcpZVNOJiQ /RhHjVIQYZLXzmde0srcEwxxu9n87T/8ZIZxHNDL2/9AEPgY9LHYLWIGI07W/nAUrOgPdt B7mz3xI1KTG+IWy8yAiB9YKHOw9Yv6ysjG0FzmJN+P8taDPAATAFGNN0dzU4eAcEh6NbNM LSLsgxA76fHCvruYZYjrO8r/pJOqpsyfH9NEySOetwAanECDcLSGW1xF6GRSzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753555350; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RfvLh7yCENha7DiQ2No8w27uQHG3rp9Fi6fTGKm0dUs=; b=J5C15n40jdlapa7k6dOeNa2efvbTdKb102esBwvvBEar4I6PHPn+iTgMJW/EEnZLPVBIbi DLDHlp6Xw0rO3nM7lL6H4oebeK+rYtJeMeTo861O5pU1k+eCmwE6vaGbe18PUpv3C5LtqP yPjSdbSNYSOYTzv5F1HuGAmERBKcMjdJT8ZlpjQ19/25jDP4bnvKYZtuNEsz3v/gQYI3YO MkCE+zPdyLUQJ8htX+erYGMXBH1z7iDrMzc4EO7d5j8O1lyN+VatPqdf9KjqQOcDKLNk9T hX7Ude25LJ3PeoQML1e64BzzaltrncuIaT+A8pevTldNMPggTvzaLoZgEamcMA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753555350; a=rsa-sha256; cv=none; b=lCXE4sRWNpc3rgtKnCIvN+zbNmYG2mwCMnZx3f3YpJeYeSybIXOtsAf4zHqeSnJ1Dip2mY TpZM7iGPQj/LpShL3RMXb7/TGkrV5vhmQaO7RvflxSUR+LLrrSkDThZZxuEO2lfXDmBqGd E4e97Gx8PnfAsmFxtKOFmixu4Xl1u1v1Alv+gS9kC/dxv8rf77I+10BeSP8tGS1JQvNlu+ 8VYYH/1Up00xWZLRYmzWDUv1syvkS+gcbtGS21UtVzyGQKUTt63IwgBgYIrtGV7yk6qk2/ iugYO11v4vaisQ+NrnbhdRKz17+WIpND6lbHtJe9R2BkstnaXopTFmVLA4b6NA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqDBG2qHszhm2; Sat, 26 Jul 2025 18:42:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QIgUcf051071; Sat, 26 Jul 2025 18:42:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QIgUhE051068; Sat, 26 Jul 2025 18:42:30 GMT (envelope-from git) Date: Sat, 26 Jul 2025 18:42:30 GMT Message-Id: <202507261842.56QIgUhE051068@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: ad1f7c1288d1 - main - find: Remove duplicate case List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad1f7c1288d1c12e8e2199c9a0b20ad309768455 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=ad1f7c1288d1c12e8e2199c9a0b20ad309768455 commit ad1f7c1288d1c12e8e2199c9a0b20ad309768455 Author: Dag-Erling Smørgrav AuthorDate: 2025-07-26 18:41:23 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-07-26 18:41:23 +0000 find: Remove duplicate case Fixes: a52d0d76fa3e --- usr.bin/find/find.1 | 2 -- usr.bin/find/printf.c | 6 ------ 2 files changed, 8 deletions(-) diff --git a/usr.bin/find/find.1 b/usr.bin/find/find.1 index e5ca81e69bdc..b16c4bcc95a2 100644 --- a/usr.bin/find/find.1 +++ b/usr.bin/find/find.1 @@ -1152,8 +1152,6 @@ Access time of the file. .It A Access time of the file in strftime format. Takes an additional argument. -.It b -Birth time of a file. .It B Birth time of the file in strftime format. Takes an additional argument. diff --git a/usr.bin/find/printf.c b/usr.bin/find/printf.c index 532c17bfb80b..671d1d1dbb9a 100644 --- a/usr.bin/find/printf.c +++ b/usr.bin/find/printf.c @@ -269,12 +269,6 @@ do_printf(PLAN *plan, FTSENT *entry, FILE *fout) case 'A': /* access time with next char strftime format */ fp_strftime(fp, sb->st_atime, *fmt++); break; - case 'b': /* birth time */ -#ifdef HAVE_STRUCT_STAT_ST_BIRTHTIME - fp_ctime(fp, sb->st_birthtime); -#else - fp_ctime(fp, 0); -#endif case 'B': /* birth time with next char strftime format */ #ifdef HAVE_STRUCT_STAT_ST_BIRTHTIME if (sb->st_birthtime != 0) From nobody Sat Jul 26 19:20:02 2025 X-Original-To: dev-commits-src-all@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 4bqF1Z6tRLz62MXc; Sat, 26 Jul 2025 19:20: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqF1Z6DKZz3dp6; Sat, 26 Jul 2025 19:20:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753557602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JqmHy+bJDzfevzPGgytpI9znUb9eCcsZmE0OK4s/uVs=; b=NQMd2qJGF6MyxXe2RpBXcLlGYl9Tx9/JqDjmw9jDT69cSUNMhlYv1xaapkl5sGsShXsQhH 13cLeolUMG7E/m3Sd3TuDvPiDf7tWJcX5aXKOKD6kwzpbPccZ/7+vmfPl9Z64y393Jf3YC 2TRZi9Zc1aaXw9zLGi4/i2bArMwwgCdIW0fyy/O5rGoPZ0jvjD0m3ZbysluXLe1vVIM0oE cVlXQeLkAn+Leuhch44zuqqkmAumXR5S1obd/+1IH1jbwUy0z2Cin6qBKU+w7EN65zkX6d JVTaQ4A+Qei8ZlORw1ameJpkZVcxjM2daksPjmGQ7bz3TkG2pViMF7s5SRY0zQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753557602; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JqmHy+bJDzfevzPGgytpI9znUb9eCcsZmE0OK4s/uVs=; b=nT4lJdC5f3HZzvAfZE8BVj1DrbB8QJdLz/XnHExSwTzo2fDQsNdiKS9d3uhXEaLrRDWxwW OiYZEJB7mr38HYvLTu/1cEZhW1PpoT4ypasEdkOkIoB+dSiEWglymy4FjHidJmng8MGMts /DrISPHJj3Lw+jd+PgskrYOFZpYLx2WATPAYDFauxZjHG1Un7JFzFp0OzoGgH95OL/tfE+ qgltYqgacRzIsLwVPYAtdxowi7VzTcvvrrWGKhrtIrH5M9GfqqVdx1ZTIK/qAIy1q1eisz FZzoLmSAyNcpjpc3vZbXJUCE6gmdgT/eSREPubB1w1kkXfBDEExmkjnxSN/jzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753557602; a=rsa-sha256; cv=none; b=OV1c+NIs0iZGU29UueUxGoWsrUsvfHUrVTMzq494In+e08oBYMbL1IX2jDroxXufnyJue6 DwNq379PjZfcYGc2t48p028lKVpd5O+ugkaIEKAMk1iCpnhtg64WizHAtzSu9pBp+Ecnnl PC9A5EE5ObL3V+WDRcuFCUF/mUaahhkVuAvjjcMm70NDVcTrZf68F9KsGXR2gM6EuzlhU3 S6FGJMTPa2JcJLjri3ZRwggCdXDksD6Nskp6PZHq1oL+5TBli2h8Bz2Uv1vmOikGEr6tJW nMHqzJuGkS64j5rnctbdsLh+tyleeeq64QCL8msKdDGM+MtWG/xp5XZfWKhiMA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqF1Z5h69zhnH; Sat, 26 Jul 2025 19:20:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QJK2oo013189; Sat, 26 Jul 2025 19:20:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QJK22G013184; Sat, 26 Jul 2025 19:20:02 GMT (envelope-from git) Date: Sat, 26 Jul 2025 19:20:02 GMT Message-Id: <202507261920.56QJK22G013184@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: f261b63307fc - main - amdsmu: Initial work on a driver for the AMD SMU List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f261b63307fca34f27e4d12384d19cb543b4867a Auto-Submitted: auto-generated The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=f261b63307fca34f27e4d12384d19cb543b4867a commit f261b63307fca34f27e4d12384d19cb543b4867a Author: Aymeric Wibo AuthorDate: 2025-06-14 15:31:22 +0000 Commit: Aymeric Wibo CommitDate: 2025-07-26 19:17:06 +0000 amdsmu: Initial work on a driver for the AMD SMU Start work on a driver for the AMD SMU (system management unit), which will eventually be used for getting S0ix statistics (e.g. how long the CPU has spent in the deepest - S0i3 - sleep state during the last sleep) as well as letting PMFW (power management firmware, running on the SMU) know when we intend to enter and exit sleep. It is what's responsible for actually turning off the VDD line to the CPU. With this commit, amdsmu is just able to get the SMU's firmware version on AMD Rembrandt, Phoenix, and Strix Point CPUs. This is the equivalent to amd-pmc on Linux. Reviewed by: cem, kib, mckusick Approved by: kib, mckusick Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48683 --- sys/conf/files.x86 | 1 + sys/dev/amdsmu/amdsmu.c | 221 ++++++++++++++++++++++++++++++++++++++++++++ sys/dev/amdsmu/amdsmu.h | 50 ++++++++++ sys/dev/amdsmu/amdsmu_reg.h | 53 +++++++++++ sys/modules/Makefile | 2 + sys/modules/amdsmu/Makefile | 14 +++ 6 files changed, 341 insertions(+) diff --git a/sys/conf/files.x86 b/sys/conf/files.x86 index df206b314b38..9976e9cfec5d 100644 --- a/sys/conf/files.x86 +++ b/sys/conf/files.x86 @@ -62,6 +62,7 @@ dev/acpi_support/acpi_wmi_if.m standard dev/agp/agp_amd64.c optional agp dev/agp/agp_i810.c optional agp dev/agp/agp_via.c optional agp +dev/amdsmu/amdsmu.c optional amdsmu pci dev/amdsbwd/amdsbwd.c optional amdsbwd dev/amdsmn/amdsmn.c optional amdsmn | amdtemp dev/amdtemp/amdtemp.c optional amdtemp diff --git a/sys/dev/amdsmu/amdsmu.c b/sys/dev/amdsmu/amdsmu.c new file mode 100644 index 000000000000..84e6c749cca7 --- /dev/null +++ b/sys/dev/amdsmu/amdsmu.c @@ -0,0 +1,221 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 The FreeBSD Foundation + * + * This software was developed by Aymeric Wibo + * under sponsorship from the FreeBSD Foundation. + */ + +#include +#include +#include +#include +#include + +#include +#include + +static bool +amdsmu_match(device_t dev, const struct amdsmu_product **product_out) +{ + const uint16_t vendorid = pci_get_vendor(dev); + const uint16_t deviceid = pci_get_device(dev); + + for (size_t i = 0; i < nitems(amdsmu_products); i++) { + const struct amdsmu_product *prod = &amdsmu_products[i]; + + if (vendorid == prod->amdsmu_vendorid && + deviceid == prod->amdsmu_deviceid) { + if (product_out != NULL) + *product_out = prod; + return (true); + } + } + return (false); +} + +static void +amdsmu_identify(driver_t *driver, device_t parent) +{ + if (device_find_child(parent, "amdsmu", -1) != NULL) + return; + + if (amdsmu_match(parent, NULL)) { + if (device_add_child(parent, "amdsmu", -1) == NULL) + device_printf(parent, "add amdsmu child failed\n"); + } +} + +static int +amdsmu_probe(device_t dev) +{ + if (resource_disabled("amdsmu", 0)) + return (ENXIO); + if (!amdsmu_match(device_get_parent(dev), NULL)) + return (ENXIO); + device_set_descf(dev, "AMD System Management Unit"); + + return (BUS_PROBE_GENERIC); +} + +static enum amdsmu_res +amdsmu_wait_res(device_t dev) +{ + struct amdsmu_softc *sc = device_get_softc(dev); + enum amdsmu_res res; + + /* + * The SMU has a response ready for us when the response register is + * set. Otherwise, we must wait. + */ + for (size_t i = 0; i < SMU_RES_READ_MAX; i++) { + res = amdsmu_read4(sc, SMU_REG_RESPONSE); + if (res != SMU_RES_WAIT) + return (res); + pause_sbt("amdsmu", ustosbt(SMU_RES_READ_PERIOD_US), 0, + C_HARDCLOCK); + } + device_printf(dev, "timed out waiting for response from SMU\n"); + return (SMU_RES_WAIT); +} + +static int +amdsmu_cmd(device_t dev, enum amdsmu_msg msg, uint32_t arg, uint32_t *ret) +{ + struct amdsmu_softc *sc = device_get_softc(dev); + enum amdsmu_res res; + + /* Wait for SMU to be ready. */ + if (amdsmu_wait_res(dev) == SMU_RES_WAIT) + return (ETIMEDOUT); + + /* Clear previous response. */ + amdsmu_write4(sc, SMU_REG_RESPONSE, SMU_RES_WAIT); + + /* Write out command to registers. */ + amdsmu_write4(sc, SMU_REG_MESSAGE, msg); + amdsmu_write4(sc, SMU_REG_ARGUMENT, arg); + + /* Wait for SMU response and handle it. */ + res = amdsmu_wait_res(dev); + + switch (res) { + case SMU_RES_WAIT: + return (ETIMEDOUT); + case SMU_RES_OK: + if (ret != NULL) + *ret = amdsmu_read4(sc, SMU_REG_ARGUMENT); + return (0); + case SMU_RES_REJECT_BUSY: + device_printf(dev, "SMU is busy\n"); + return (EBUSY); + case SMU_RES_REJECT_PREREQ: + case SMU_RES_UNKNOWN: + case SMU_RES_FAILED: + device_printf(dev, "SMU error: %02x\n", res); + return (EIO); + } + + return (EINVAL); +} + +static void +amdsmu_print_vers(device_t dev) +{ + uint32_t smu_vers; + uint8_t smu_program; + uint8_t smu_maj, smu_min, smu_rev; + + if (amdsmu_cmd(dev, SMU_MSG_GETSMUVERSION, 0, &smu_vers) != 0) { + device_printf(dev, "failed to get SMU version\n"); + return; + } + smu_program = (smu_vers >> 24) & 0xFF; + smu_maj = (smu_vers >> 16) & 0xFF; + smu_min = (smu_vers >> 8) & 0xFF; + smu_rev = smu_vers & 0xFF; + device_printf(dev, "SMU version: %d.%d.%d (program %d)\n", + smu_maj, smu_min, smu_rev, smu_program); +} + +static int +amdsmu_attach(device_t dev) +{ + struct amdsmu_softc *sc = device_get_softc(dev); + uint32_t physbase_addr_lo, physbase_addr_hi; + uint64_t physbase_addr; + int rid = 0; + + /* + * Find physical base address for SMU. + * XXX I am a little confused about the masks here. I'm just copying + * what Linux does in the amd-pmc driver to get the base address. + */ + pci_write_config(dev, SMU_INDEX_ADDRESS, SMU_PHYSBASE_ADDR_LO, 4); + physbase_addr_lo = pci_read_config(dev, SMU_INDEX_DATA, 4) & 0xFFF00000; + + pci_write_config(dev, SMU_INDEX_ADDRESS, SMU_PHYSBASE_ADDR_HI, 4); + physbase_addr_hi = pci_read_config(dev, SMU_INDEX_DATA, 4) & 0x0000FFFF; + + physbase_addr = (uint64_t)physbase_addr_hi << 32 | physbase_addr_lo; + + /* Map memory for SMU and its registers. */ + sc->res = bus_alloc_resource_any(dev, SYS_RES_MEMORY, &rid, RF_ACTIVE); + if (sc->res == NULL) { + device_printf(dev, "could not allocate resource\n"); + return (ENXIO); + } + + sc->bus_tag = rman_get_bustag(sc->res); + + if (bus_space_map(sc->bus_tag, physbase_addr, + SMU_MEM_SIZE, 0, &sc->smu_space) != 0) { + device_printf(dev, "could not map bus space for SMU\n"); + bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->res); + return (ENXIO); + } + if (bus_space_map(sc->bus_tag, physbase_addr + SMU_REG_SPACE_OFF, + SMU_MEM_SIZE, 0, &sc->reg_space) != 0) { + device_printf(dev, "could not map bus space for SMU regs\n"); + bus_space_unmap(sc->bus_tag, sc->smu_space, SMU_MEM_SIZE); + bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->res); + return (ENXIO); + } + + amdsmu_print_vers(dev); + return (0); +} + +static int +amdsmu_detach(device_t dev) +{ + struct amdsmu_softc *sc = device_get_softc(dev); + int rid = 0; + + bus_space_unmap(sc->bus_tag, sc->smu_space, SMU_MEM_SIZE); + bus_space_unmap(sc->bus_tag, sc->reg_space, SMU_MEM_SIZE); + + bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->res); + return (0); +} + +static device_method_t amdsmu_methods[] = { + DEVMETHOD(device_identify, amdsmu_identify), + DEVMETHOD(device_probe, amdsmu_probe), + DEVMETHOD(device_attach, amdsmu_attach), + DEVMETHOD(device_detach, amdsmu_detach), + DEVMETHOD_END +}; + +static driver_t amdsmu_driver = { + "amdsmu", + amdsmu_methods, + sizeof(struct amdsmu_softc), +}; + +DRIVER_MODULE(amdsmu, hostb, amdsmu_driver, NULL, NULL); +MODULE_VERSION(amdsmu, 1); +MODULE_DEPEND(amdsmu, amdsmn, 1, 1, 1); +MODULE_PNP_INFO("U16:vendor;U16:device", pci, amdsmu, amdsmu_products, + nitems(amdsmu_products)); diff --git a/sys/dev/amdsmu/amdsmu.h b/sys/dev/amdsmu/amdsmu.h new file mode 100644 index 000000000000..5e76c8e93062 --- /dev/null +++ b/sys/dev/amdsmu/amdsmu.h @@ -0,0 +1,50 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 The FreeBSD Foundation + * + * This software was developed by Aymeric Wibo + * under sponsorship from the FreeBSD Foundation. + */ +#ifndef _AMDSMU_H_ +#define _AMDSMU_H_ + +#include +#include +#include + +#include + +#define SMU_RES_READ_PERIOD_US 50 +#define SMU_RES_READ_MAX 20000 + +static const struct amdsmu_product { + uint16_t amdsmu_vendorid; + uint16_t amdsmu_deviceid; +} amdsmu_products[] = { + { CPU_VENDOR_AMD, PCI_DEVICEID_AMD_REMBRANDT_ROOT }, + { CPU_VENDOR_AMD, PCI_DEVICEID_AMD_PHOENIX_ROOT }, + { CPU_VENDOR_AMD, PCI_DEVICEID_AMD_STRIX_POINT_ROOT }, +}; + +struct amdsmu_softc { + struct resource *res; + bus_space_tag_t bus_tag; + + bus_space_handle_t smu_space; + bus_space_handle_t reg_space; +}; + +static inline uint32_t +amdsmu_read4(const struct amdsmu_softc *sc, bus_size_t reg) +{ + return (bus_space_read_4(sc->bus_tag, sc->reg_space, reg)); +} + +static inline void +amdsmu_write4(const struct amdsmu_softc *sc, bus_size_t reg, uint32_t val) +{ + bus_space_write_4(sc->bus_tag, sc->reg_space, reg, val); +} + +#endif /* _AMDSMU_H_ */ diff --git a/sys/dev/amdsmu/amdsmu_reg.h b/sys/dev/amdsmu/amdsmu_reg.h new file mode 100644 index 000000000000..5e73cea19028 --- /dev/null +++ b/sys/dev/amdsmu/amdsmu_reg.h @@ -0,0 +1,53 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2025 The FreeBSD Foundation + * + * This software was developed by Aymeric Wibo + * under sponsorship from the FreeBSD Foundation. + */ +#ifndef _AMDSMU_REG_H_ +#define _AMDSMU_REG_H_ + +/* + * TODO These are in common with amdtemp; should we find a way to factor these + * out? Also, there are way more of these. I couldn't find a centralized place + * which lists them though. + */ +#define PCI_DEVICEID_AMD_REMBRANDT_ROOT 0x14B5 +#define PCI_DEVICEID_AMD_PHOENIX_ROOT 0x14E8 +#define PCI_DEVICEID_AMD_STRIX_POINT_ROOT 0x14A4 + +#define SMU_INDEX_ADDRESS 0xB8 +#define SMU_INDEX_DATA 0xBC + +#define SMU_PHYSBASE_ADDR_LO 0x13B102E8 +#define SMU_PHYSBASE_ADDR_HI 0x13B102EC + +#define SMU_MEM_SIZE 0x1000 +#define SMU_REG_SPACE_OFF 0x10000 + +#define SMU_REG_MESSAGE 0x538 +#define SMU_REG_RESPONSE 0x980 +#define SMU_REG_ARGUMENT 0x9BC + +enum amdsmu_res { + SMU_RES_WAIT = 0x00, + SMU_RES_OK = 0x01, + SMU_RES_REJECT_BUSY = 0xFC, + SMU_RES_REJECT_PREREQ = 0xFD, + SMU_RES_UNKNOWN = 0xFE, + SMU_RES_FAILED = 0xFF, +}; + +enum amdsmu_msg { + SMU_MSG_GETSMUVERSION = 0x02, + SMU_MSG_LOG_GETDRAM_ADDR_HI = 0x04, + SMU_MSG_LOG_GETDRAM_ADDR_LO = 0x05, + SMU_MSG_LOG_START = 0x06, + SMU_MSG_LOG_RESET = 0x07, + SMU_MSG_LOG_DUMP_DATA = 0x08, + SMU_MSG_GET_SUP_CONSTRAINTS = 0x09, +}; + +#endif /* _AMDSMU_REG_H_ */ diff --git a/sys/modules/Makefile b/sys/modules/Makefile index 7cb6e2124326..99c9ec9dcd01 100644 --- a/sys/modules/Makefile +++ b/sys/modules/Makefile @@ -34,6 +34,7 @@ SUBDIR= \ alq \ ${_amd_ecc_inject} \ ${_amdgpio} \ + ${_amdsmu} \ ${_amdsbwd} \ ${_amdsmn} \ ${_amdtemp} \ @@ -772,6 +773,7 @@ _acpi= acpi _aesni= aesni .endif _amd_ecc_inject=amd_ecc_inject +_amdsmu= amdsmu _amdsbwd= amdsbwd _amdsmn= amdsmn _amdtemp= amdtemp diff --git a/sys/modules/amdsmu/Makefile b/sys/modules/amdsmu/Makefile new file mode 100644 index 000000000000..752f57173d61 --- /dev/null +++ b/sys/modules/amdsmu/Makefile @@ -0,0 +1,14 @@ +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright (c) 2025 The FreeBSD Foundation +# +# This software was developed by Aymeric Wibo +# under sponsorship from the FreeBSD Foundation. + +.PATH: ${SRCTOP}/sys/dev/amdsmu + +KMOD= amdsmu +SRCS= amdsmu.c +SRCS+= bus_if.h device_if.h pci_if.h + +.include From nobody Sat Jul 26 20:07:14 2025 X-Original-To: dev-commits-src-all@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 4bqG430zC2z62QW6; Sat, 26 Jul 2025 20:07: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqG4224VPz3jfS; Sat, 26 Jul 2025 20:07:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753560434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qJRofAVCoh62h4C3WJckayW/OzsDxwA252p6j7jH6kg=; b=xBJjfQhbbFpVJCPEDrV6kcT1/oyhLfs644MoT0AISrWfAGjzQylJDNk9NotvG0QkEPPgBq 3AsTLYeQTy0/asbkazpKV8P9pI+dPVmoAv6jDjmG5oF3nDElW4UTH2CtjVDzG8pgJdJiHJ nah6BnpfqakRI27KvbWjobuA3fsTweUtGFycxHIVzxHcre0RpeuPOqO9MXbDYZrO478k3x pHeVKUrAm67oDuxJngbsPDqu3rXuSQW+pGwo93laUvAJr1+DmPp5SQSxRqJFEvy6eOQKbi R/KY7mscJLdUYE2KPwkXVpamAQxA8l22nqeGTofVigOO5wzFAS33fwnBDexe7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753560434; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qJRofAVCoh62h4C3WJckayW/OzsDxwA252p6j7jH6kg=; b=Bp9xx56d90iKgz8Y1huK4Nz9VZQdWmlkL6Jqcv4zWhywdihcmTJRR+jAMivX02X1aBgXou AU5FO71jNo5iOsD+v7Wu0PB0/4fMuf/d7FSOL15h1EE8IBM2NVGQJGYzfBfAgSSVMMnDEu +ZtYgX5VNQ5nMUAhx6GEnG/DfUN0xEBgYEen6j2dOAOxrZDbsebgepcNlHuTYd9DNidTxH 5/asC8MRK5zAirZnlLQpaBNsPPJ3Rz3TNkrykYAwtOYYj723w2en1SbkrZUbLrJJ5m3x+g t1SV3i49ImH1ixrqsvHIgm+Via1k1GWHHyRdokofJyMB/MqkE3moWetPEAwjmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753560434; a=rsa-sha256; cv=none; b=iUVcVKDV0VhQsEPApuR+D7gtq6wRAu0EYUMhWzKUR3+r8tXTCiyL+9MzcHbJN2U35sN4up IOmEd1k++uddJMk5HVy8AKa/muDLRdh9Llq67pDmyEWxZDQhzxIY/eQBOh0Kc4tpMI/7ZC L2shQ7sxK/mPZZJk8Dc1M/juZ8n6c5uv/GP2wEhXUO7BImkS2RhvByWHdU0W8rpHz7dhu1 XW/KvT9JcnrNZj7IAHdzAapuc7UdieXW9yMU/3OVFa8+OwLRXjRHbAoh2p2oP1c1blF1TS zew+lqRsvl68CfkjbfLY8RQbKTLC6520zrbYGgi/cCL+BBmWLI3/WyffoCT+cA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqG420rngzkwQ; Sat, 26 Jul 2025 20:07:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QK7EJs004329; Sat, 26 Jul 2025 20:07:14 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QK7EFH004326; Sat, 26 Jul 2025 20:07:14 GMT (envelope-from git) Date: Sat, 26 Jul 2025 20:07:14 GMT Message-Id: <202507262007.56QK7EFH004326@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: ebc6ff8db176 - main - bsdinstall: Improve message for existing FreeBSD EFI entry List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: ebc6ff8db17683b566d49fe89a43a668d3d67915 Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=ebc6ff8db17683b566d49fe89a43a668d3d67915 commit ebc6ff8db17683b566d49fe89a43a668d3d67915 Author: Ed Maste AuthorDate: 2025-07-25 14:25:18 +0000 Commit: Ed Maste CommitDate: 2025-07-26 20:06:22 +0000 bsdinstall: Improve message for existing FreeBSD EFI entry When reinstalling FreeBSD bsdinstall reported "There are multiple FreeBSD EFI boot entries." This sounds like something went wrong in the past. Clarify that there may be only one existing entry, which is not surprising for a reinstall. Reviewed by: manu, ziaee Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51527 --- usr.sbin/bsdinstall/scripts/bootconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bsdinstall/scripts/bootconfig b/usr.sbin/bsdinstall/scripts/bootconfig index 9b330801e409..41243ad14b9b 100755 --- a/usr.sbin/bsdinstall/scripts/bootconfig +++ b/usr.sbin/bsdinstall/scripts/bootconfig @@ -74,7 +74,7 @@ update_uefi_bootentry() fi $DIALOG --backtitle "$OSNAME Installer" --title 'Boot Configuration' \ - --yesno "There are multiple \"$OSNAME\" EFI boot entries. Would you like to remove them all and add a new one?" 0 0 + --yesno "One or more \"$OSNAME\" EFI boot manager entries already exist. Would you like to remove them all and add a new one?" 0 0 if [ $? -eq $DIALOG_OK ]; then for entry in $(efibootmgr | awk "\$NF == \"$EFI_LABEL_NAME\" { sub(/.*Boot/,\"\", \$1); sub(/\*/,\"\", \$1); print \$1 }"); do efibootmgr -B -b ${entry} From nobody Sat Jul 26 20:41:51 2025 X-Original-To: dev-commits-src-all@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 4bqGqz4nD6z62Rfy; Sat, 26 Jul 2025 20:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqGqz3vXnz3lnj; Sat, 26 Jul 2025 20:41:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753562511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jEWb7U14w9snMlCq+WoMqDHae4ytU1/ClUiom8NvvzE=; b=K7lB0uM9Y8twzfGsMMkeE89tYlrPCakIi2QhwjbZaKPB2reGlDZQOf9olkjT1Sa0tYZmvz 3LwN+Ts8GZKGN2OtuwQPy8BlSLbPlc8YgndqVSHiccDJXuAU+FO/moYwafaBCTGf1Z1tBW fRQsfpY1tSAN4Tt1ZCV5yyJwlsg7duN22iFJ1+FlPNJYt6LU2NClPwuId6FUQEWoENurp3 qeunYPc4/MSGdnD40FdV1B3R+ukjpVmsQkQW3B3yQgSYMD4DIWMqYr5tUkzE1TBpeWnUZ6 Fe1iF54AqiTV4tA7aDxMhP5GyroJLxfV3EYBKlRevWSVsbXwUfZLhuIpg2jkLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753562511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jEWb7U14w9snMlCq+WoMqDHae4ytU1/ClUiom8NvvzE=; b=Bqu0HcEvSJXJUHhK7x0nWEIqea+x17dJ457aih+tZqu+ZWvTT9s16VXMQxMQ4ahrNK3sjP 9SCc3L/fV5FxHDWAjhYDzMIp6HAxyeEupQxNBrvDEhEphReJVunjllOSi2oEbk1TUKe2MZ bKYeLhdsDYM5FREYU6aIYOuMYM3Vp+hcbifoqcPQSgRX+yKqCfcmil4UtBKcxS6hwwwyvB jYCTZSBpPXZLPKN9XpLTHwpD0/A8laFe8cMwrMmGYEY7Q4DmneKxvk/MDqAX13EVrHE6Fh kSKpwC25XrHDV40+9sO+awdwFVJv2ItLWNNGLxgom3J5OOlYaSGROsSfFuOVjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753562511; a=rsa-sha256; cv=none; b=GKGLmOlLgYJxLDHO1O63DnsQ9vPRkHL0lOHoUuqw8uXOcHV/aFC0Uko+MMCgn9wM3ybu15 bIr0nhwJI+o9kzsninijlN2Xmxk24upBASFrQmRYgCqL231/TBMaRn5PWUF+8QcpPE6loj RZxBwOYr0vsMcowayu0u6b88xEUIJfSHSRq/PrtDalu/unNmmzr3UuTmLuOCXdqWqvODoi t1EZJxZKXN9m9Om3tfOnULr7+AWh1RYzWJ/zrYhCHjZHZikFsEc6qr2bnuUZEPGS7ukgh0 4Xl3dZ0XhGj4EG2Gj3JkjG8z19lRw1/qHY2hiPq0k8vdVtkXIdnvh4/qUvh5qQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqGqz3W3DzlXj; Sat, 26 Jul 2025 20:41:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QKfpu8075749; Sat, 26 Jul 2025 20:41:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QKfpU3075746; Sat, 26 Jul 2025 20:41:51 GMT (envelope-from git) Date: Sat, 26 Jul 2025 20:41:51 GMT Message-Id: <202507262041.56QKfpU3075746@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Andrew Gallatin Subject: git: 83a352bcac0a - stable/14 - lagg: Fix if_hw_tsomax_update() not being called List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: gallatin X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 83a352bcac0a72feb04e441b5a54ad7f63f9922a Auto-Submitted: auto-generated The branch stable/14 has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=83a352bcac0a72feb04e441b5a54ad7f63f9922a commit 83a352bcac0a72feb04e441b5a54ad7f63f9922a Author: Andrew Gallatin AuthorDate: 2025-07-12 22:35:29 +0000 Commit: Andrew Gallatin CommitDate: 2025-07-26 20:07:37 +0000 lagg: Fix if_hw_tsomax_update() not being called In a mixed lagg, its likely that ifcaps or hwassist may not match between members. If this is true, the logical OR will be short-circuited and if_hw_tsomax_update() will not be called. Fix this by calling it inside the body of the if as well Sponsored by: Netflix (cherry picked from commit 78bdaa57cfbac759a6d79ecad2fae570e294a4b3) --- sys/net/if_lagg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net/if_lagg.c b/sys/net/if_lagg.c index f226ce11ca37..b7b41ee22434 100644 --- a/sys/net/if_lagg.c +++ b/sys/net/if_lagg.c @@ -714,6 +714,7 @@ lagg_capabilities(struct lagg_softc *sc) sc->sc_ifp->if_capenable = ena; sc->sc_ifp->if_capenable2 = ena2; sc->sc_ifp->if_hwassist = hwa; + (void)if_hw_tsomax_update(sc->sc_ifp, &hw_tsomax); getmicrotime(&sc->sc_ifp->if_lastchange); if (sc->sc_ifflags & IFF_DEBUG) From nobody Sat Jul 26 21:25:31 2025 X-Original-To: dev-commits-src-all@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 4bqHpN0BsMz62VGx; Sat, 26 Jul 2025 21:25: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqHpM6dpcz3r6D; Sat, 26 Jul 2025 21:25:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753565131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tTYeHzlqMf3W7Ocf2W2Rav3MHtZFF1oQeWnK3YxJ2iE=; b=j+JAcpoNvZ0TtXZzSd60rROcOTjqy9K/6UHEg5GqFUk594AzUtn5mdQZZwvWLitqoQ8lkd 8gp4VuuqOLtjMgofKyq4+rA81ZBLZT5juVvbGcZvIK9LPoiukVwT6zhhuWfEd6qTQPnn8Q VIrZgeLwuCQJunaiboqi/3UBUTgeXdXbZcXJMFvAseHXaqOLxWJ3BPYm0PeyWydF44O0lv LPW0FmDu49/giMalalkwLds24O/YM4MlJxofzJcDMedAYoYt22BlksFtAmwEzjFmUNmVyW VYXjpg0hKWtUNmZ2v6GGNm+Cef7K429E2Ossr8P/pe3yLrTCe5bZdz0mPpqP8Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753565131; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tTYeHzlqMf3W7Ocf2W2Rav3MHtZFF1oQeWnK3YxJ2iE=; b=rrDOnSQWFADDVsv0Zo+02W6Sxudz7P/EHkZKGo5rLdGhkz0DJ0oELF2Cx28JnsRtT0kxpu yuJvdIU5TovNqp4hJVh3xQgYP5JeXQeG0J64gFxKBdg9aOldjKcHzR8cm+0DfAfWj0+uL8 xAIqjsGYgr4DUnCCPsTF9MDJSnUZyznlrYgJTr7WgIPECHLzKLWfxHurS2xeyUtF8/23/6 3DSghih9sPmTzeUAEUivhj4FWo/nqZADv+/OdqS8T9yNin4fh++K86G64b29XJmSgL7aAq VgvRFRkuXzGZ0zdMdYhI481b6g395CUBgnQNvhaom0YlnYzHUsVXJbZ8l1XzAQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753565131; a=rsa-sha256; cv=none; b=lx7TMllOhkXVmd3B8bPI6kuI28Iz5/KLDiY9By+LQXU7//keedy/6X5f2paao+Lxck3mGf mIIJQ4/yy8WF5WZEg686mVCA4CF0cGk+Je1frnDYeB9u+seHyGFiuBpK4gFx/tngPzL0Qy 5VqXoPjXbCqBjwtgi5uhE6RNwnpXKDU40yFmGguQJba+5lpRAnMgwZ1USxddHEm1prtfLW f1Jdv1007CHHx8kQtPfurpCF4HsVr4Pq8ISTg68rTuk4mk1xq4Pl63dCBkZl91YQveBxoA cckxObDQgDwul1U6DJDSBMG+GaqvyonAtLuu7h3KEZuMwrlvH6bWzKJEzMzomA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqHpM6DcCzmvj; Sat, 26 Jul 2025 21:25:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QLPVC0052025; Sat, 26 Jul 2025 21:25:31 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QLPVfZ052022; Sat, 26 Jul 2025 21:25:31 GMT (envelope-from git) Date: Sat, 26 Jul 2025 21:25:31 GMT Message-Id: <202507262125.56QLPVfZ052022@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 122b2a3530f8 - main - getsockopt.2: Add SO_SPLICE source socket read and socket close behavior List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 122b2a3530f8baab56d196b51724cc3ddd38abd2 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=122b2a3530f8baab56d196b51724cc3ddd38abd2 commit 122b2a3530f8baab56d196b51724cc3ddd38abd2 Author: Kevin Bowling AuthorDate: 2025-07-26 21:18:47 +0000 Commit: Kevin Bowling CommitDate: 2025-07-26 21:18:47 +0000 getsockopt.2: Add SO_SPLICE source socket read and socket close behavior Add select(2), poll(2), or kqueue(2) source socket semantics and close behavior. Reported by: Udip Pant Reviewed by: manpages (ziaee), markj Obtained from: OpenBSD MFC after: 3 days Sponsored by: Netflix Differential Revision: https://reviews.freebsd.org/D51547 --- lib/libsys/getsockopt.2 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/libsys/getsockopt.2 b/lib/libsys/getsockopt.2 index 8839b61597a2..3867824681d7 100644 --- a/lib/libsys/getsockopt.2 +++ b/lib/libsys/getsockopt.2 @@ -593,6 +593,15 @@ specified amount of time has elapsed since the initial call to If .Fa sp_fd is -1, the socket will be unspliced immediately. +A successful +.Xr select 2 , +.Xr poll 2 , +or +.Xr kqueue 2 +operation testing the ability to read from the source socket indicates +that the splicing has terminated and at least one byte is available for +reading. +When one of the sockets gets closed, splicing ends. .Pp When passed to .Fn getsockopt , From nobody Sat Jul 26 21:30:29 2025 X-Original-To: dev-commits-src-all@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 4bqHw56w4fz62VxB; Sat, 26 Jul 2025 21:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqHw56G9bz3rf3; Sat, 26 Jul 2025 21:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753565429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jmREM31lMyLMpbuBPVWqevRiEE6SA30506sH+CncPu4=; b=bTZ+P3CN0+p6xYBmxHNNN70cbgtn3aTHrxVAFfpLEGevP7FDQGro3Xp5gyd2WbL2sIy2hh 61jAXXWpnsCHZTWmtZewKDz+j7qjytYZAsZOgCQhAO68ko5aYhHatq5p0cIgT0RZViRGSC Rc0gAV1uLGeOC7A2Uru81b4qDpawALbuz/uRF28Bc649SgoBFk46Uge8ipnQW1HI6J+zXh l/gdOrJA3SE+TI1z737T2Fg9ZiGTfQuon6KrDr9z8xmvOq8enQZR2iRx4gIdKMeSS2kTlm jNh3170tHbdawWMCbQl8nQsHUcERxdEHfJ6SkWKkspOML3he4E66TQLZAKc7pw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753565429; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jmREM31lMyLMpbuBPVWqevRiEE6SA30506sH+CncPu4=; b=c3XVkgUbqp+eM8R5zxVxg1zeuxJcBapj8fL4d1O1WBvMZj84cWWv6pD+s9LbTx/UNNod+d W1Wxg9ysxMpR+6tnV3s4JRPc0iiuz+TqnOw5g/OfZzFITVusnzWz/B8zsP/lSxl5oR5ocl xKg3kn/Dz12XV4fs1cOCrXEgqle3XqGrPOiC1SqI/SG3q9liJbI7fb1dVMvbhWVrnG3d74 X6sa9QwiFjfejegM+tBgVSGLwlr+aJcGdq8K9vaPSxDXahpUwM7Trkp82qvZNIgfIXY+2L NFPZcyG8MscWTQ48xh0gH0NdYBLbZtI5C0/IiMPjNbuhFkE7Hzvz0tKoGEqj0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753565429; a=rsa-sha256; cv=none; b=Y8xRnl3um5CS7Cd5IqqymU8TQ3VdPajEcL2th06uSd0o2bv7fPnVI5OlFsPjJBMQSooeap JRktH0iag9PPlamBbjymqVMVaDVO1zN+nS5D9mSs3wvmLwjs91HFgRwxZhkrlHZ81ojTbd 0gROevbEHdn+1/TXsizG/6EW6pvKD9xh91zy+cSlQYPQcG3MIbUrzbDED0D5eNF0eUOmRT TZcVIdhs31AYOUOITAfqmybQ5WO0bKHnH/jQ4zjUUk9LmCuyhG3+eQ1t9Sde84y1DAnFu/ LW6e9/1i2IdeGzwlJv23/tQF6O4g+bZAE9Eime3wG1uuwrCG8t6/JKCGiwdg6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqHw55bfwzn5h; Sat, 26 Jul 2025 21:30:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QLUTkU062245; Sat, 26 Jul 2025 21:30:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QLUT1L062242; Sat, 26 Jul 2025 21:30:29 GMT (envelope-from git) Date: Sat, 26 Jul 2025 21:30:29 GMT Message-Id: <202507262130.56QLUT1L062242@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 8df080625bd3 - main - unistd.h: Add new Solaris compatible pathconf names List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8df080625bd3aa573194a65a9167614ca83ba57e Auto-Submitted: auto-generated The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=8df080625bd3aa573194a65a9167614ca83ba57e commit 8df080625bd3aa573194a65a9167614ca83ba57e Author: Rick Macklem AuthorDate: 2025-07-26 21:26:31 +0000 Commit: Rick Macklem CommitDate: 2025-07-26 21:28:04 +0000 unistd.h: Add new Solaris compatible pathconf names Solaris software can use _PC_XATTR_ENABLED and _PC_XATTR_EXISTS, which are semantically the same as _PC_NAMEDATTR_ENABLED and _PC_HAS_NAMEDATTR. Add these pathconf names to unistd.h for Solaris compatibility. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D51546 Fixes: 2ec2ba7e232d ("vfs: Add VFS/syscall support for Solaris style extended attributes") --- sys/sys/unistd.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/sys/unistd.h b/sys/sys/unistd.h index c291c1dc2b95..85ed93fd359d 100644 --- a/sys/sys/unistd.h +++ b/sys/sys/unistd.h @@ -156,6 +156,8 @@ #define _PC_DEALLOC_PRESENT 65 #define _PC_NAMEDATTR_ENABLED 66 #define _PC_HAS_NAMEDATTR 67 +#define _PC_XATTR_ENABLED _PC_NAMEDATTR_ENABLED /* Solaris Compatible */ +#define _PC_XATTR_EXISTS _PC_HAS_NAMEDATTR /* Solaris Compatible */ #define _PC_HAS_HIDDENSYSTEM 68 #endif From nobody Sat Jul 26 21:31:49 2025 X-Original-To: dev-commits-src-all@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 4bqHxf0jPSz62Vp1; Sat, 26 Jul 2025 21:31:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqHxd6z37z3rtn; Sat, 26 Jul 2025 21:31:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753565510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gFKMAjJAyoDqXdVfeRLeIS/znKpv+DgKSW1WeIF5Pp8=; b=EzyBRCTnW0KDFICvjgoiF8DnIuPXHqn15ZbhB6qvRnYM2tiY4fyLhFQmzIAres/IzZk4X6 NPXL4uPi9rcn0q+IFhQ52PCjqjK7jp5bMAGfKDjf1mHfo87cavmTj5xfhooaRxmaRw37XO N84zHDCNeUS5PCA/3pCsFbDm4PvtAobjBLyWGGqs0Ye3a75XmW8athluAw8KIDSkLxuCzX XvepP+iX2Zm4I3wx03di6x0TB39EChTwdhnA8jIxt+T7PHrTr6pkK3YtSRupsN2c236jKl q83NPPJuyYtK3gjycMLXtVaDS/q2H/+ZEBm3WuiavK4Zlwks0fOqOQyCtHZkKQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753565510; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gFKMAjJAyoDqXdVfeRLeIS/znKpv+DgKSW1WeIF5Pp8=; b=xFTzQgvy4PRmqW8KHv83RXT+fcgEpkFKOzRYCHNZ8uXrD0a2mTy9zJ7XhPgEBa7SyCFMgX AnoFSBfBqv5iMEUEPlwwgzq84Vxi6wdkXSCtVf68xfzN7zoUpZ0RXHmqZLTg4YBwYWPe2j pvWWmj/CXC5UrZcynbzLZg0ZMAuioNI51FwH7qW3d08jDCPEoPkxbYHEMm2hGvtglpvPKm rx+Qb2kVgdT/OX7LQUJAxv0IOvWTuzLkYRIIQwoi+UJgyip8EgwbM9ToVvp8+B1zb5bNzR t1WRPTGcRow5JMMypBwMZYjctWwKy/tauMCU+jE2zuAfcSdCj3HP9NCJOTatvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753565510; a=rsa-sha256; cv=none; b=iuZqji2Av+C4YK1ZkDRkpGO68ZWjc/+PhRYlkGUL1Qqj5io8KXN7ON6h2B/ict/cm09Az3 8zU6tJM02zHomZlm/JxF0QPIOsiQcElzl0FJUlPGFLKe/3q5pcnQAOVGvyb5Hzb1e96t3K y/RJAFv3SBz1Jgr8mV9gHvJk+qMvYcXz7pf0zW8k9g6BYVr4GLfPohkBhXSqPITQbTWETU CgxI/vWAGhwyfj4Vna1LU516s0USD+Yn8NoZiHOT17ivXqvAFl+jg+WiWHNDwdGdaRPv8c jLk+hDOCkh/JvGspTmMleYCq00s1HrRFW3hV/FY1QmnJ8HZLUOZtcpnI6mRffA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqHxd5yv3zmrS; Sat, 26 Jul 2025 21:31:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QLVnAU065722; Sat, 26 Jul 2025 21:31:49 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QLVnbB065719; Sat, 26 Jul 2025 21:31:49 GMT (envelope-from git) Date: Sat, 26 Jul 2025 21:31:49 GMT Message-Id: <202507262131.56QLVnbB065719@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 6b49d1194899 - main - kern: allow kern_shm_open2 of an anonymous preconstructed shmfd List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 6b49d119489944abbef87b5892c21f65e7a7055e Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=6b49d119489944abbef87b5892c21f65e7a7055e commit 6b49d119489944abbef87b5892c21f65e7a7055e Author: Kyle Evans AuthorDate: 2025-07-14 23:28:35 +0000 Commit: Kyle Evans CommitDate: 2025-07-26 21:31:40 +0000 kern: allow kern_shm_open2 of an anonymous preconstructed shmfd The motivation here is for future changes to the coredump code to be able to build up a coredump into a shmfd instead of a vnode, which then gets tapped out to userland via a character device. This also opens up the possibility that it's useful for the kernel to be able to construct a shmfd and pass it out to a process that shouldn't need to write to it. Reviewed by: emaste, kib, markj Differential Revision: https://reviews.freebsd.org/D51336 --- sys/compat/linux/linux_file.c | 2 +- sys/kern/uipc_shm.c | 50 +++++++++++++++++++++++++++++-------------- sys/sys/syscallsubr.h | 3 ++- 3 files changed, 37 insertions(+), 18 deletions(-) diff --git a/sys/compat/linux/linux_file.c b/sys/compat/linux/linux_file.c index 86834a7ecea8..a4be5313aa96 100644 --- a/sys/compat/linux/linux_file.c +++ b/sys/compat/linux/linux_file.c @@ -1792,7 +1792,7 @@ linux_memfd_create(struct thread *td, struct linux_memfd_create_args *args) if ((flags & MFD_ALLOW_SEALING) != 0) shmflags |= SHM_ALLOW_SEALING; return (kern_shm_open2(td, SHM_ANON, oflags, 0, shmflags, NULL, - memfd_name)); + memfd_name, NULL)); } int diff --git a/sys/kern/uipc_shm.c b/sys/kern/uipc_shm.c index 6f83b875a6b6..85fe48ddd466 100644 --- a/sys/kern/uipc_shm.c +++ b/sys/kern/uipc_shm.c @@ -1134,10 +1134,10 @@ shm_doremove(struct shm_mapping *map) int kern_shm_open2(struct thread *td, const char *userpath, int flags, mode_t mode, - int shmflags, struct filecaps *fcaps, const char *name __unused) + int shmflags, struct filecaps *fcaps, const char *name __unused, + struct shmfd *shmfd) { struct pwddesc *pdp; - struct shmfd *shmfd; struct file *fp; char *path; void *rl_cookie; @@ -1214,23 +1214,41 @@ kern_shm_open2(struct thread *td, const char *userpath, int flags, mode_t mode, if (error != 0) goto outnofp; - /* A SHM_ANON path pointer creates an anonymous object. */ + /* + * A SHM_ANON path pointer creates an anonymous object. We allow other + * parts of the kernel to pre-populate a shmfd and then materialize an + * fd for it here as a means to pass data back up to userland. This + * doesn't really make sense for named shm objects, but it makes plenty + * of sense for anonymous objects. + */ if (userpath == SHM_ANON) { - /* A read-only anonymous object is pointless. */ - if ((flags & O_ACCMODE) == O_RDONLY) { - error = EINVAL; - goto out; - } - shmfd = shm_alloc(td->td_ucred, cmode, largepage); - if (shmfd == NULL) { - error = ENOMEM; - goto out; + if (shmfd != NULL) { + shm_hold(shmfd); + } else { + /* + * A read-only anonymous object is pointless, unless it + * was pre-populated by the kernel with the expectation + * that a shmfd would later be created for userland to + * access it through. + */ + if ((flags & O_ACCMODE) == O_RDONLY) { + error = EINVAL; + goto out; + } + shmfd = shm_alloc(td->td_ucred, cmode, largepage); + if (shmfd == NULL) { + error = ENOMEM; + goto out; + } + + shmfd->shm_seals = initial_seals; + shmfd->shm_flags = shmflags; } - shmfd->shm_seals = initial_seals; - shmfd->shm_flags = shmflags; } else { fnv = fnv_32_str(path, FNV1_32_INIT); sx_xlock(&shm_dict_lock); + + MPASS(shmfd == NULL); shmfd = shm_lookup(path, fnv); if (shmfd == NULL) { /* Object does not yet exist, create it if requested. */ @@ -2173,7 +2191,7 @@ kern_shm_open(struct thread *td, const char *path, int flags, mode_t mode, struct filecaps *caps) { - return (kern_shm_open2(td, path, flags, mode, 0, caps, NULL)); + return (kern_shm_open2(td, path, flags, mode, 0, caps, NULL, NULL)); } /* @@ -2191,7 +2209,7 @@ sys_shm_open2(struct thread *td, struct shm_open2_args *uap) { return (kern_shm_open2(td, uap->path, uap->flags, uap->mode, - uap->shmflags, NULL, uap->name)); + uap->shmflags, NULL, uap->name, NULL)); } int diff --git a/sys/sys/syscallsubr.h b/sys/sys/syscallsubr.h index fd183ffbc7a4..8237165b84ce 100644 --- a/sys/sys/syscallsubr.h +++ b/sys/sys/syscallsubr.h @@ -60,6 +60,7 @@ struct rusage; struct sched_param; struct sembuf; union semun; +struct shmfd; struct sockaddr; struct spacectl_range; struct stat; @@ -337,7 +338,7 @@ int kern_shm_open(struct thread *td, const char *userpath, int flags, mode_t mode, struct filecaps *fcaps); int kern_shm_open2(struct thread *td, const char *path, int flags, mode_t mode, int shmflags, struct filecaps *fcaps, - const char *name); + const char *name, struct shmfd *shmfd); int kern_shmat(struct thread *td, int shmid, const void *shmaddr, int shmflg); int kern_shmctl(struct thread *td, int shmid, int cmd, void *buf, From nobody Sat Jul 26 21:31:50 2025 X-Original-To: dev-commits-src-all@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 4bqHxg2476z62VQb; Sat, 26 Jul 2025 21:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqHxg01K5z3sLB; Sat, 26 Jul 2025 21:31:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753565511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6jFyK5DOpcyWgy1oqedugO7wp58TEtetWPh2q/icr+k=; b=Ph2OuzIY5GlI0nJgn8veURwR+VYaxw4vukBRpWhFTgjkVEEfuVt2A53VyfPu31wYbRSnxS j0wp9EB8xtYLwKRzLL2LsLWV0J5v7s/ENJDCd6mOXUTTA2wNVEwxLoCquEZBrUORGr0Lo+ wn5csyUXjhBbQf/cuYo9eXv/V1uqjVcrue6GRq+Ll76iX1XLmc0gatGDXCwTbEy38d0t+R E5XHBmzKtAYWbjz6tJnq9lUCfAq1dQDl0in9tzYBLOIgY1JDMyRMXgLGzfX790MdYOK8qF SqTBhdpMH8UWwB7YwLpCE8J7VsTRSXjuyyuYjNButh8ysJ1/BgAykCeQyeigQg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753565511; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=6jFyK5DOpcyWgy1oqedugO7wp58TEtetWPh2q/icr+k=; b=OKwGstSbrBopcgYodCZ/axNMWfDoEhQK8IcvGSvWERdaHIm1WgAXO0Rct0X9Qs/YiGeQwp OEzEL/bU5DcawGxnsnEsGengaluRLTnxt7pxwP9d1Tv6n27A53am/HvWgulq6+A0OS9R6v V8GvLCHQoXAedlacGohOvWRq4K+2SMa6Q/ZJRVTs7fSXAsN43JJqcMfVx3PSWNeT+Dlk4K 5N9SpIKwtS150yno4gSlc28FJgzSbHCiTOpQhCCp/Vp+4QwWb3u25rKzmL7xDSxIr8r7MH Ih0kqLIO1QJ+qO2qozYE4/mUcVGS5D6h8Sjmxkq4nyJe63UlztRh6Bl2lctMVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753565511; a=rsa-sha256; cv=none; b=mKkxexbR/yA3K/VmlX7LRjaCcJQ2V1hGv0IagPjGlyKD565+5nDbXDuru0TQUW/8JII041 d5B3ZPVYXuE56uyu0I37N+Isw9epXcfWhPpuXecqIWI4wWDEAdTdLJ/wkzlCFPxnqt5tFX CadH9IhC0WdHRSW51IgcemxuPfNmyVuubpkM0ATRr62jAWjUt+tBl7ARQvfU2eCQysehrR TQQq3l9uYVGBes9QryITAudQPhV6k3SVxQmWgRklyT9W7+y6RANkkiE/5VKmw2GuNzOAPn KRfHI+ttkifak6dJIgCrxTThEcK2dBctPkUDTww+zBfvZ0karlFEPEOEG7qxbQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqHxf6knZzn68; Sat, 26 Jul 2025 21:31:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QLVoYU065756; Sat, 26 Jul 2025 21:31:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QLVoCN065753; Sat, 26 Jul 2025 21:31:50 GMT (envelope-from git) Date: Sat, 26 Jul 2025 21:31:50 GMT Message-Id: <202507262131.56QLVoCN065753@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 8eb37cd06b34 - main - kern: factor out the 'writing' bits of user process coredumping List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 8eb37cd06b345e7187e4b65484a1194ed7e300f8 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=8eb37cd06b345e7187e4b65484a1194ed7e300f8 commit 8eb37cd06b345e7187e4b65484a1194ed7e300f8 Author: Kyle Evans AuthorDate: 2025-07-15 20:14:55 +0000 Commit: Kyle Evans CommitDate: 2025-07-26 21:31:41 +0000 kern: factor out the 'writing' bits of user process coredumping Instead of assuming we have a vnode to dump to, pull out the bits that describe how to write acoredump into a struct coredump_writer; the ctx in that is expected to be opaque, but used by write/extend functions. This should not be a functional change- we change two callers to use the classic vnode write/extend interface. This opens us up to other possible targets for coredumps, such as a shmfd. Reviewed by: markj (earlier version), kib Differential Revision: https://reviews.freebsd.org/D51337 --- sys/kern/imgact_elf.c | 11 ++++++++--- sys/kern/kern_exec.c | 50 ++++++++++++++++++++++++++++++++++++++------------ sys/kern/kern_sig.c | 23 +++++++++++++++++++++-- sys/sys/exec.h | 32 ++++++++++++++++++++++++++++++-- sys/sys/imgact_elf.h | 3 ++- sys/sys/sysent.h | 4 +++- 6 files changed, 102 insertions(+), 21 deletions(-) diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index b7ffbe68b483..a7d3e22e6279 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -1595,7 +1595,7 @@ core_compressed_write(void *base, size_t len, off_t offset, void *arg) } int -__elfN(coredump)(struct thread *td, struct vnode *vp, off_t limit, int flags) +__elfN(coredump)(struct thread *td, struct coredump_writer *cdw, off_t limit, int flags) { struct ucred *cred = td->td_ucred; int compm, error = 0; @@ -1625,9 +1625,8 @@ __elfN(coredump)(struct thread *td, struct vnode *vp, off_t limit, int flags) /* Set up core dump parameters. */ params.offset = 0; params.active_cred = cred; - params.file_cred = NOCRED; params.td = td; - params.vp = vp; + params.cdw = cdw; params.comp = NULL; #ifdef RACCT @@ -1662,6 +1661,12 @@ __elfN(coredump)(struct thread *td, struct vnode *vp, off_t limit, int flags) tmpbuf = malloc(CORE_BUF_SIZE, M_TEMP, M_WAITOK | M_ZERO); } + if (cdw->init_fn != NULL) { + error = (*cdw->init_fn)(cdw, ¶ms); + if (error != 0) + goto done; + } + /* * Allocate memory for building the header, fill it up, * and write it out following the notes. diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 03268365891e..a0a22ee8539b 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -1998,14 +1998,48 @@ compress_chunk(struct coredump_params *cp, char *base, char *buf, size_t len) return (error); } +int +core_vn_write(const struct coredump_writer *cdw, const void *base, size_t len, + off_t offset, enum uio_seg seg, struct ucred *cred, size_t *resid, + struct thread *td) +{ + struct coredump_vnode_ctx *ctx = cdw->ctx; + + return (vn_rdwr_inchunks(UIO_WRITE, ctx->vp, __DECONST(void *, base), + len, offset, seg, IO_UNIT | IO_DIRECT | IO_RANGELOCKED, + cred, ctx->fcred, resid, td)); +} + int core_write(struct coredump_params *cp, const void *base, size_t len, off_t offset, enum uio_seg seg, size_t *resid) { + return ((*cp->cdw->write_fn)(cp->cdw, base, len, offset, seg, + cp->active_cred, resid, cp->td)); +} - return (vn_rdwr_inchunks(UIO_WRITE, cp->vp, __DECONST(void *, base), - len, offset, seg, IO_UNIT | IO_DIRECT | IO_RANGELOCKED, - cp->active_cred, cp->file_cred, resid, cp->td)); +int +core_vn_extend(const struct coredump_writer *cdw, off_t newsz, + struct ucred *cred) +{ + struct coredump_vnode_ctx *ctx = cdw->ctx; + struct mount *mp; + int error; + + error = vn_start_write(ctx->vp, &mp, V_WAIT); + if (error != 0) + return (error); + vn_lock(ctx->vp, LK_EXCLUSIVE | LK_RETRY); + error = vn_truncate_locked(ctx->vp, newsz, false, cred); + VOP_UNLOCK(ctx->vp); + vn_finished_write(mp); + return (error); +} + +static int +core_extend(struct coredump_params *cp, off_t newsz) +{ + return ((*cp->cdw->extend_fn)(cp->cdw, newsz, cp->td->td_ucred)); } int @@ -2013,7 +2047,6 @@ core_output(char *base, size_t len, off_t offset, struct coredump_params *cp, void *tmpbuf) { vm_map_t map; - struct mount *mp; size_t resid, runlen; int error; bool success; @@ -2068,14 +2101,7 @@ core_output(char *base, size_t len, off_t offset, struct coredump_params *cp, } } if (!success) { - error = vn_start_write(cp->vp, &mp, V_WAIT); - if (error != 0) - break; - vn_lock(cp->vp, LK_EXCLUSIVE | LK_RETRY); - error = vn_truncate_locked(cp->vp, offset + runlen, - false, cp->td->td_ucred); - VOP_UNLOCK(cp->vp); - vn_finished_write(mp); + error = core_extend(cp, offset + runlen); if (error != 0) break; } diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index 5d51aa675cb7..e96f72d56e18 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -49,6 +49,7 @@ #include #include #include +#include #include #include #include @@ -2665,6 +2666,8 @@ static void ptrace_coredumpreq(struct thread *td, struct proc *p, struct thr_coredump_req *tcq) { + struct coredump_vnode_ctx wctx; + struct coredump_writer cdw; void *rl_cookie; if (p->p_sysent->sv_coredump == NULL) { @@ -2672,8 +2675,15 @@ ptrace_coredumpreq(struct thread *td, struct proc *p, return; } + wctx.vp = tcq->tc_vp; + wctx.fcred = NOCRED; + + cdw.ctx = &wctx; + cdw.write_fn = core_vn_write; + cdw.extend_fn = core_vn_extend; + rl_cookie = vn_rangelock_wlock(tcq->tc_vp, 0, OFF_MAX); - tcq->tc_error = p->p_sysent->sv_coredump(td, tcq->tc_vp, + tcq->tc_error = p->p_sysent->sv_coredump(td, &cdw, tcq->tc_limit, tcq->tc_flags); vn_rangelock_unlock(tcq->tc_vp, rl_cookie); } @@ -4135,6 +4145,8 @@ coredump(struct thread *td) struct proc *p = td->td_proc; struct ucred *cred = td->td_ucred; struct vnode *vp; + struct coredump_vnode_ctx wctx; + struct coredump_writer cdw; struct flock lf; struct vattr vattr; size_t fullpathsize; @@ -4212,8 +4224,15 @@ coredump(struct thread *td) p->p_acflag |= ACORE; PROC_UNLOCK(p); + wctx.vp = vp; + wctx.fcred = NOCRED; + + cdw.ctx = &wctx; + cdw.write_fn = core_vn_write; + cdw.extend_fn = core_vn_extend; + if (p->p_sysent->sv_coredump != NULL) { - error = p->p_sysent->sv_coredump(td, vp, limit, 0); + error = p->p_sysent->sv_coredump(td, &cdw, limit, 0); } else { error = ENOSYS; } diff --git a/sys/sys/exec.h b/sys/sys/exec.h index 4bf114a7c698..fed93949dae5 100644 --- a/sys/sys/exec.h +++ b/sys/sys/exec.h @@ -37,6 +37,8 @@ #ifndef _SYS_EXEC_H_ #define _SYS_EXEC_H_ +#include + /* * Before ps_args existed, the following structure, found at the top of * the user stack of each user process, was used by ps(1) to locate @@ -58,12 +60,38 @@ struct ps_strings { }; /* Coredump output parameters. */ +struct coredump_params; +struct coredump_writer; +struct thread; +struct ucred; + +typedef int coredump_init_fn(const struct coredump_writer *, + const struct coredump_params *); +typedef int coredump_write_fn(const struct coredump_writer *, const void *, size_t, + off_t, enum uio_seg, struct ucred *, size_t *, struct thread *); +typedef int coredump_extend_fn(const struct coredump_writer *, off_t, + struct ucred *); + +struct coredump_vnode_ctx { + struct vnode *vp; + struct ucred *fcred; +}; + +coredump_write_fn core_vn_write; +coredump_extend_fn core_vn_extend; + +struct coredump_writer { + void *ctx; + coredump_init_fn *init_fn; + coredump_write_fn *write_fn; + coredump_extend_fn *extend_fn; +}; + struct coredump_params { off_t offset; struct ucred *active_cred; - struct ucred *file_cred; struct thread *td; - struct vnode *vp; + const struct coredump_writer *cdw; struct compressor *comp; }; diff --git a/sys/sys/imgact_elf.h b/sys/sys/imgact_elf.h index c9444e5aec41..2845a9dbc1e2 100644 --- a/sys/sys/imgact_elf.h +++ b/sys/sys/imgact_elf.h @@ -45,6 +45,7 @@ {(pos)->a_type = (id); (pos)->a_un.a_ptr = (ptr); (pos)++;} #endif +struct coredump_writer; struct image_params; struct thread; struct vnode; @@ -114,7 +115,7 @@ bool __elfN(brand_inuse)(Elf_Brandinfo *entry); int __elfN(insert_brand_entry)(Elf_Brandinfo *entry); int __elfN(remove_brand_entry)(Elf_Brandinfo *entry); int __elfN(freebsd_fixup)(uintptr_t *, struct image_params *); -int __elfN(coredump)(struct thread *, struct vnode *, off_t, int); +int __elfN(coredump)(struct thread *, struct coredump_writer *, off_t, int); size_t __elfN(populate_note)(int, void *, void *, size_t, void **); int __elfN(freebsd_copyout_auxargs)(struct image_params *, uintptr_t); void __elfN(puthdr)(struct thread *, void *, size_t, int, size_t, int); diff --git a/sys/sys/sysent.h b/sys/sys/sysent.h index 4ddfc8516053..1714fa5a7416 100644 --- a/sys/sys/sysent.h +++ b/sys/sys/sysent.h @@ -90,6 +90,7 @@ struct sysent { /* system call table */ #define SY_THR_STATIC_KLD SY_THR_STATIC #endif +struct coredump_writer; struct image_params; struct proc; struct __sigset; @@ -108,7 +109,8 @@ struct sysentvec { int *sv_szsigcode; /* size of sigtramp code */ int sv_sigcodeoff; char *sv_name; /* name of binary type */ - int (*sv_coredump)(struct thread *, struct vnode *, off_t, int); + int (*sv_coredump)(struct thread *, struct coredump_writer *, + off_t, int); /* function to dump core, or NULL */ int sv_elf_core_osabi; const char *sv_elf_core_abi_vendor; From nobody Sat Jul 26 21:31:51 2025 X-Original-To: dev-commits-src-all@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 4bqHxh2T1Xz62Vp7; Sat, 26 Jul 2025 21:31:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqHxh0mP6z3sLC; Sat, 26 Jul 2025 21:31:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753565512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a6NXu2hIdeXCJU1cu29SrqHZATcyMpJR4uu7x6SsGTo=; b=ZEyN3iBwdA/TGQhkuFrq7jX9l1CW2/QJAr03lfoIXocdVLiwtELdz0y24pzubZmiWJs94a znpmj/+jA93FXYNILDLyn/j5qK1IN8Z2u88WZpWDjfdZ83oDHFL/izLfNLq16gj2UQj7A2 peL9F0Ou8HUaibcEwVfPTtPbWv33xOTomXERp0vVhrO5Q8y31SY/fQ80OwqDVzt94yZS57 KqjY/kWsGD45tBUTE4wVSaKnkxd7hRPyYAfxlNeig6lU1Bn8kzw82mxK0UtLWT5Qp24lhV ngcZCCKdStNhN11nZlF01kEmsQsGInRX9rwBAsVw5d4LpgWa108VjtfX7oyFHA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753565512; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=a6NXu2hIdeXCJU1cu29SrqHZATcyMpJR4uu7x6SsGTo=; b=pOPa8QgV2F/oVwWIJgdXsmeHBj7yoIepsGTzwMiBLWBROVIFvp0N1YOPbj3UEIvfEzPmOi KQLJr8qrnXp4m1juH1uEgBBN0ulPb8w211QCYfwrlwH5vqQDXT1waPIjqyxukT+tX1T5NQ vuBHIlhoJgei+mZ8f1h1/eJgnlpDNEiss7koqMZyAzQ1GI+MrMTGaVg9+ksUTRqBNukmu9 TxJhEDKAEXlwu2sq3oLY9cr41i3+yoNQyx+/vdPqQyv51ouVizLwTyK83FKYrCY6elOhuY JHmME+MdYFJpkZg4QbhS9l0iDGGY4B2mRNtXQrId31vJyNDYs5m42gKX6lf4yQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753565512; a=rsa-sha256; cv=none; b=Ry7OL0K+xggoL97E1iFVPxyTn2LToh2TPc6uMhc5Y/ooLP8DxugAZmxEvmPe/3M5STXbZ5 RW4YRLEVGv7MbGTEfVZQVmUZ4vx+nr8rkiCjt1aJZcD3QpsaLhX8MFYlHVTwOZrNmg2X5I pHRBtq9sW8PKAqsYGBcLS3gIbEv6l++jDMgA9VeehOcUwXMs5iHJQwOw+wMvwdV9UPP9LH HoN3BDuXgcJ2HStJ7x+RX/JAvyQfHxZMVpOZvel8M1jMQ9Mwv+BGv/TGFMaQqiFukHQkPm OpcrNEYU9ewxElrtmhKYzgJbrVEyFfyA5/BUN8OcZOHerkD5dyWuT7S9wZ41SQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqHxh083RznGv; Sat, 26 Jul 2025 21:31:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QLVpc8065798; Sat, 26 Jul 2025 21:31:51 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QLVpS7065795; Sat, 26 Jul 2025 21:31:51 GMT (envelope-from git) Date: Sat, 26 Jul 2025 21:31:51 GMT Message-Id: <202507262131.56QLVpS7065795@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: d5bc81e6c76b - main - kern: move the vnode user coredumper out into its own file List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: d5bc81e6c76ba6fcf4c7a813e3b9731a7889d64e Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=d5bc81e6c76ba6fcf4c7a813e3b9731a7889d64e commit d5bc81e6c76ba6fcf4c7a813e3b9731a7889d64e Author: Kyle Evans AuthorDate: 2025-07-16 15:43:22 +0000 Commit: Kyle Evans CommitDate: 2025-07-26 21:31:41 +0000 kern: move the vnode user coredumper out into its own file This more cleanly contains the bits that are specifically relevant to dumping coredumps out to a vnode, which will make future changes a bit easier to review. This also makes the scope of the relevant sysctls easier to reason about in the process, as they're not visible outside of the vnode dumper file -- this will mostly become relevant when we allow pluggable dumpers. While we're here, move all of the coredump-related stuff out into its own kern_ucoredump.c and sys/ucoredump.h. We have enough that it's useful to separate it out and de-clutter kern_sig.c and sys/exec.h a bit. Reviewed by: kib, markj (both earlier version) Differential Revision: https://reviews.freebsd.org/D51349 --- share/man/man5/core.5 | 8 +- sys/conf/files | 2 + sys/kern/coredump_vnode.c | 553 +++++++++++++++++++++++++++++++++++++++++++ sys/kern/imgact_elf.c | 4 +- sys/kern/kern_exec.c | 31 +-- sys/kern/kern_sig.c | 591 +--------------------------------------------- sys/kern/kern_ucoredump.c | 212 +++++++++++++++++ sys/sys/exec.h | 48 ---- sys/sys/signalvar.h | 1 + sys/sys/ucoredump.h | 68 ++++++ 10 files changed, 851 insertions(+), 667 deletions(-) diff --git a/share/man/man5/core.5 b/share/man/man5/core.5 index 8efc8c970014..aa6e3c67097d 100644 --- a/share/man/man5/core.5 +++ b/share/man/man5/core.5 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 12, 2023 +.Dd July 17, 2025 .Dt CORE 5 .Os .Sh NAME @@ -116,11 +116,13 @@ variable .Va kern.sugid_coredump to 1. .Pp -Corefiles can be compressed by the kernel if the following item -is included in the kernel configuration file: +Corefiles can be compressed by the kernel if one of the following items +are included in the kernel configuration file: .Bl -tag -width "1234567890" -compact -offset "12345" .It options GZIO +.It options +ZSTDIO .El .Pp The following sysctl control core file compression: diff --git a/sys/conf/files b/sys/conf/files index dd0d390962f2..b7c19fae0b8e 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -3768,6 +3768,7 @@ gnu/gcov/gcov_subr.c optional gcov kern/bus_if.m standard kern/clock_if.m standard +kern/coredump_vnode.c standard kern/cpufreq_if.m standard kern/device_if.m standard kern/imgact_binmisc.c optional imgact_binmisc @@ -3856,6 +3857,7 @@ kern/kern_time.c standard kern/kern_timeout.c standard kern/kern_tslog.c optional tslog kern/kern_ubsan.c optional kubsan +kern/kern_ucoredump.c standard kern/kern_umtx.c standard kern/kern_uuid.c standard kern/kern_vnodedumper.c standard diff --git a/sys/kern/coredump_vnode.c b/sys/kern/coredump_vnode.c new file mode 100644 index 000000000000..675503476a4e --- /dev/null +++ b/sys/kern/coredump_vnode.c @@ -0,0 +1,553 @@ +/* + * SPDX-License-Identifier: BSD-3-Clause AND BSD-2-Clause + * + * Copyright (c) 1982, 1986, 1989, 1991, 1993 + * The Regents of the University of California. All rights reserved. + * (c) UNIX System Laboratories, Inc. + * All or some portions of this file are derived from material licensed + * to the University of California by American Telephone and Telegraph + * Co. or Unix System Laboratories, Inc. and are reproduced herein with + * the permission of UNIX System Laboratories, Inc. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * - kern_sig.c + */ +/* + * Copyright (c) 1993, David Greenman + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * -kern_exec.c + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#define GZIP_SUFFIX ".gz" +#define ZSTD_SUFFIX ".zst" + +#define MAX_NUM_CORE_FILES 100000 +#ifndef NUM_CORE_FILES +#define NUM_CORE_FILES 5 +#endif + +_Static_assert(NUM_CORE_FILES >= 0 && NUM_CORE_FILES <= MAX_NUM_CORE_FILES, + "NUM_CORE_FILES is out of range (0 to " __STRING(MAX_NUM_CORE_FILES) ")"); +static int num_cores = NUM_CORE_FILES; + +static int capmode_coredump; +SYSCTL_INT(_kern, OID_AUTO, capmode_coredump, CTLFLAG_RWTUN, + &capmode_coredump, 0, "Allow processes in capability mode to dump core"); + +static int set_core_nodump_flag = 0; +SYSCTL_INT(_kern, OID_AUTO, nodump_coredump, CTLFLAG_RW, &set_core_nodump_flag, + 0, "Enable setting the NODUMP flag on coredump files"); + +static int coredump_devctl = 0; +SYSCTL_INT(_kern, OID_AUTO, coredump_devctl, CTLFLAG_RW, &coredump_devctl, + 0, "Generate a devctl notification when processes coredump"); + +/* + * corefilename[] is protected by the allproc_lock. + */ +static char corefilename[MAXPATHLEN] = { "%N.core" }; +TUNABLE_STR("kern.corefile", corefilename, sizeof(corefilename)); + +static int +sysctl_kern_corefile(SYSCTL_HANDLER_ARGS) +{ + int error; + + sx_xlock(&allproc_lock); + error = sysctl_handle_string(oidp, corefilename, sizeof(corefilename), + req); + sx_xunlock(&allproc_lock); + + return (error); +} +SYSCTL_PROC(_kern, OID_AUTO, corefile, CTLTYPE_STRING | CTLFLAG_RW | + CTLFLAG_MPSAFE, 0, 0, sysctl_kern_corefile, "A", + "Process corefile name format string"); + +static int +sysctl_debug_num_cores_check (SYSCTL_HANDLER_ARGS) +{ + int error; + int new_val; + + new_val = num_cores; + error = sysctl_handle_int(oidp, &new_val, 0, req); + if (error != 0 || req->newptr == NULL) + return (error); + if (new_val > MAX_NUM_CORE_FILES) + new_val = MAX_NUM_CORE_FILES; + if (new_val < 0) + new_val = 0; + num_cores = new_val; + return (0); +} +SYSCTL_PROC(_debug, OID_AUTO, ncores, + CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, sizeof(int), + sysctl_debug_num_cores_check, "I", + "Maximum number of generated process corefiles while using index format"); + +static void +vnode_close_locked(struct thread *td, struct vnode *vp) +{ + + VOP_UNLOCK(vp); + vn_close(vp, FWRITE, td->td_ucred, td); +} + +int +core_vn_write(const struct coredump_writer *cdw, const void *base, size_t len, + off_t offset, enum uio_seg seg, struct ucred *cred, size_t *resid, + struct thread *td) +{ + struct coredump_vnode_ctx *ctx = cdw->ctx; + + return (vn_rdwr_inchunks(UIO_WRITE, ctx->vp, __DECONST(void *, base), + len, offset, seg, IO_UNIT | IO_DIRECT | IO_RANGELOCKED, + cred, ctx->fcred, resid, td)); +} + +int +core_vn_extend(const struct coredump_writer *cdw, off_t newsz, + struct ucred *cred) +{ + struct coredump_vnode_ctx *ctx = cdw->ctx; + struct mount *mp; + int error; + + error = vn_start_write(ctx->vp, &mp, V_WAIT); + if (error != 0) + return (error); + vn_lock(ctx->vp, LK_EXCLUSIVE | LK_RETRY); + error = vn_truncate_locked(ctx->vp, newsz, false, cred); + VOP_UNLOCK(ctx->vp); + vn_finished_write(mp); + return (error); +} + +/* + * If the core format has a %I in it, then we need to check + * for existing corefiles before defining a name. + * To do this we iterate over 0..ncores to find a + * non-existing core file name to use. If all core files are + * already used we choose the oldest one. + */ +static int +corefile_open_last(struct thread *td, char *name, int indexpos, + int indexlen, int ncores, struct vnode **vpp) +{ + struct vnode *oldvp, *nextvp, *vp; + struct vattr vattr; + struct nameidata nd; + int error, i, flags, oflags, cmode; + char ch; + struct timespec lasttime; + + nextvp = oldvp = NULL; + cmode = S_IRUSR | S_IWUSR; + oflags = VN_OPEN_NOAUDIT | VN_OPEN_NAMECACHE | + (capmode_coredump ? VN_OPEN_NOCAPCHECK : 0); + + for (i = 0; i < ncores; i++) { + flags = O_CREAT | FWRITE | O_NOFOLLOW; + + ch = name[indexpos + indexlen]; + (void)snprintf(name + indexpos, indexlen + 1, "%.*u", indexlen, + i); + name[indexpos + indexlen] = ch; + + NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name); + error = vn_open_cred(&nd, &flags, cmode, oflags, td->td_ucred, + NULL); + if (error != 0) + break; + + vp = nd.ni_vp; + NDFREE_PNBUF(&nd); + if ((flags & O_CREAT) == O_CREAT) { + nextvp = vp; + break; + } + + error = VOP_GETATTR(vp, &vattr, td->td_ucred); + if (error != 0) { + vnode_close_locked(td, vp); + break; + } + + if (oldvp == NULL || + lasttime.tv_sec > vattr.va_mtime.tv_sec || + (lasttime.tv_sec == vattr.va_mtime.tv_sec && + lasttime.tv_nsec >= vattr.va_mtime.tv_nsec)) { + if (oldvp != NULL) + vn_close(oldvp, FWRITE, td->td_ucred, td); + oldvp = vp; + VOP_UNLOCK(oldvp); + lasttime = vattr.va_mtime; + } else { + vnode_close_locked(td, vp); + } + } + + if (oldvp != NULL) { + if (nextvp == NULL) { + if ((td->td_proc->p_flag & P_SUGID) != 0) { + error = EFAULT; + vn_close(oldvp, FWRITE, td->td_ucred, td); + } else { + nextvp = oldvp; + error = vn_lock(nextvp, LK_EXCLUSIVE); + if (error != 0) { + vn_close(nextvp, FWRITE, td->td_ucred, + td); + nextvp = NULL; + } + } + } else { + vn_close(oldvp, FWRITE, td->td_ucred, td); + } + } + if (error != 0) { + if (nextvp != NULL) + vnode_close_locked(td, oldvp); + } else { + *vpp = nextvp; + } + + return (error); +} + +/* + * corefile_open(comm, uid, pid, td, compress, vpp, namep) + * Expand the name described in corefilename, using name, uid, and pid + * and open/create core file. + * corefilename is a printf-like string, with three format specifiers: + * %N name of process ("name") + * %P process id (pid) + * %U user id (uid) + * For example, "%N.core" is the default; they can be disabled completely + * by using "/dev/null", or all core files can be stored in "/cores/%U/%N-%P". + * This is controlled by the sysctl variable kern.corefile (see above). + */ +static int +corefile_open(const char *comm, uid_t uid, pid_t pid, struct thread *td, + int compress, int signum, struct vnode **vpp, char **namep) +{ + struct sbuf sb; + struct nameidata nd; + const char *format; + char *hostname, *name; + int cmode, error, flags, i, indexpos, indexlen, oflags, ncores; + + hostname = NULL; + format = corefilename; + name = malloc(MAXPATHLEN, M_TEMP, M_WAITOK | M_ZERO); + indexlen = 0; + indexpos = -1; + ncores = num_cores; + (void)sbuf_new(&sb, name, MAXPATHLEN, SBUF_FIXEDLEN); + sx_slock(&allproc_lock); + for (i = 0; format[i] != '\0'; i++) { + switch (format[i]) { + case '%': /* Format character */ + i++; + switch (format[i]) { + case '%': + sbuf_putc(&sb, '%'); + break; + case 'H': /* hostname */ + if (hostname == NULL) { + hostname = malloc(MAXHOSTNAMELEN, + M_TEMP, M_WAITOK); + } + getcredhostname(td->td_ucred, hostname, + MAXHOSTNAMELEN); + sbuf_cat(&sb, hostname); + break; + case 'I': /* autoincrementing index */ + if (indexpos != -1) { + sbuf_printf(&sb, "%%I"); + break; + } + + indexpos = sbuf_len(&sb); + sbuf_printf(&sb, "%u", ncores - 1); + indexlen = sbuf_len(&sb) - indexpos; + break; + case 'N': /* process name */ + sbuf_printf(&sb, "%s", comm); + break; + case 'P': /* process id */ + sbuf_printf(&sb, "%u", pid); + break; + case 'S': /* signal number */ + sbuf_printf(&sb, "%i", signum); + break; + case 'U': /* user id */ + sbuf_printf(&sb, "%u", uid); + break; + default: + log(LOG_ERR, + "Unknown format character %c in " + "corename `%s'\n", format[i], format); + break; + } + break; + default: + sbuf_putc(&sb, format[i]); + break; + } + } + sx_sunlock(&allproc_lock); + free(hostname, M_TEMP); + if (compress == COMPRESS_GZIP) + sbuf_cat(&sb, GZIP_SUFFIX); + else if (compress == COMPRESS_ZSTD) + sbuf_cat(&sb, ZSTD_SUFFIX); + if (sbuf_error(&sb) != 0) { + log(LOG_ERR, "pid %ld (%s), uid (%lu): corename is too " + "long\n", (long)pid, comm, (u_long)uid); + sbuf_delete(&sb); + free(name, M_TEMP); + return (ENOMEM); + } + sbuf_finish(&sb); + sbuf_delete(&sb); + + if (indexpos != -1) { + error = corefile_open_last(td, name, indexpos, indexlen, ncores, + vpp); + if (error != 0) { + log(LOG_ERR, + "pid %d (%s), uid (%u): Path `%s' failed " + "on initial open test, error = %d\n", + pid, comm, uid, name, error); + } + } else { + cmode = S_IRUSR | S_IWUSR; + oflags = VN_OPEN_NOAUDIT | VN_OPEN_NAMECACHE | + (capmode_coredump ? VN_OPEN_NOCAPCHECK : 0); + flags = O_CREAT | FWRITE | O_NOFOLLOW; + if ((td->td_proc->p_flag & P_SUGID) != 0) + flags |= O_EXCL; + + NDINIT(&nd, LOOKUP, NOFOLLOW, UIO_SYSSPACE, name); + error = vn_open_cred(&nd, &flags, cmode, oflags, td->td_ucred, + NULL); + if (error == 0) { + *vpp = nd.ni_vp; + NDFREE_PNBUF(&nd); + } + } + + if (error != 0) { +#ifdef AUDIT + audit_proc_coredump(td, name, error); +#endif + free(name, M_TEMP); + return (error); + } + *namep = name; + return (0); +} + +/* + * The vnode dumper is the traditional coredump handler. Our policy and limits + * are generally checked already, so it creates the coredump name and passes on + * a vnode and a size limit to the process-specific coredump routine if there is + * one. If there _is not_ one, it returns ENOSYS; otherwise it returns the + * error from the process-specific routine. + */ +int +coredump_vnode(struct thread *td, off_t limit) +{ + struct proc *p = td->td_proc; + struct ucred *cred = td->td_ucred; + struct vnode *vp; + struct coredump_vnode_ctx wctx; + struct coredump_writer cdw = { }; + struct flock lf; + struct vattr vattr; + size_t fullpathsize; + int error, error1, jid, locked, ppid, sig; + char *name; /* name of corefile */ + void *rl_cookie; + char *fullpath, *freepath = NULL; + struct sbuf *sb; + + PROC_LOCK_ASSERT(p, MA_OWNED); + + ppid = p->p_oppid; + sig = p->p_sig; + jid = p->p_ucred->cr_prison->pr_id; + PROC_UNLOCK(p); + + error = corefile_open(p->p_comm, cred->cr_uid, p->p_pid, td, + compress_user_cores, sig, &vp, &name); + if (error != 0) + return (error); + + /* + * Don't dump to non-regular files or files with links. + * Do not dump into system files. Effective user must own the corefile. + */ + if (vp->v_type != VREG || VOP_GETATTR(vp, &vattr, cred) != 0 || + vattr.va_nlink != 1 || (vp->v_vflag & VV_SYSTEM) != 0 || + vattr.va_uid != cred->cr_uid) { + VOP_UNLOCK(vp); + error = EFAULT; + goto out; + } + + VOP_UNLOCK(vp); + + /* Postpone other writers, including core dumps of other processes. */ + rl_cookie = vn_rangelock_wlock(vp, 0, OFF_MAX); + + lf.l_whence = SEEK_SET; + lf.l_start = 0; + lf.l_len = 0; + lf.l_type = F_WRLCK; + locked = (VOP_ADVLOCK(vp, (caddr_t)p, F_SETLK, &lf, F_FLOCK) == 0); + + VATTR_NULL(&vattr); + vattr.va_size = 0; + if (set_core_nodump_flag) + vattr.va_flags = UF_NODUMP; + vn_lock(vp, LK_EXCLUSIVE | LK_RETRY); + VOP_SETATTR(vp, &vattr, cred); + VOP_UNLOCK(vp); + PROC_LOCK(p); + p->p_acflag |= ACORE; + PROC_UNLOCK(p); + + wctx.vp = vp; + wctx.fcred = NOCRED; + + cdw.ctx = &wctx; + cdw.write_fn = core_vn_write; + cdw.extend_fn = core_vn_extend; + + if (p->p_sysent->sv_coredump != NULL) { + error = p->p_sysent->sv_coredump(td, &cdw, limit, 0); + } else { + error = ENOSYS; + } + + if (locked) { + lf.l_type = F_UNLCK; + VOP_ADVLOCK(vp, (caddr_t)p, F_UNLCK, &lf, F_FLOCK); + } + vn_rangelock_unlock(vp, rl_cookie); + + /* + * Notify the userland helper that a process triggered a core dump. + * This allows the helper to run an automated debugging session. + */ + if (error != 0 || coredump_devctl == 0) + goto out; + sb = sbuf_new_auto(); + if (vn_fullpath_global(p->p_textvp, &fullpath, &freepath) != 0) + goto out2; + sbuf_cat(sb, "comm=\""); + devctl_safe_quote_sb(sb, fullpath); + free(freepath, M_TEMP); + sbuf_cat(sb, "\" core=\""); + + /* + * We can't lookup core file vp directly. When we're replacing a core, and + * other random times, we flush the name cache, so it will fail. Instead, + * if the path of the core is relative, add the current dir in front if it. + */ + if (name[0] != '/') { + fullpathsize = MAXPATHLEN; + freepath = malloc(fullpathsize, M_TEMP, M_WAITOK); + if (vn_getcwd(freepath, &fullpath, &fullpathsize) != 0) { + free(freepath, M_TEMP); + goto out2; + } + devctl_safe_quote_sb(sb, fullpath); + free(freepath, M_TEMP); + sbuf_putc(sb, '/'); + } + devctl_safe_quote_sb(sb, name); + sbuf_putc(sb, '"'); + + sbuf_printf(sb, " jid=%d pid=%d ppid=%d signo=%d", + jid, p->p_pid, ppid, sig); + if (sbuf_finish(sb) == 0) + devctl_notify("kernel", "signal", "coredump", sbuf_data(sb)); +out2: + sbuf_delete(sb); +out: + error1 = vn_close(vp, FWRITE, cred, td); + if (error == 0) + error = error1; +#ifdef AUDIT + audit_proc_coredump(td, name, error); +#endif + free(name, M_TEMP); + return (error); +} diff --git a/sys/kern/imgact_elf.c b/sys/kern/imgact_elf.c index a7d3e22e6279..2690ad3b2679 100644 --- a/sys/kern/imgact_elf.c +++ b/sys/kern/imgact_elf.c @@ -64,6 +64,7 @@ #include #include #include +#include #include #include #include @@ -1562,9 +1563,6 @@ struct note_info { TAILQ_HEAD(note_info_list, note_info); -extern int compress_user_cores; -extern int compress_user_cores_level; - static void cb_put_phdr(vm_map_entry_t, void *); static void cb_size_segment(vm_map_entry_t, void *); static void each_dumpable_segment(struct thread *, segment_callback, void *, diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index a0a22ee8539b..5cd4d39d7236 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -70,6 +70,7 @@ #include #include #include +#include #include #include #include @@ -1998,18 +1999,6 @@ compress_chunk(struct coredump_params *cp, char *base, char *buf, size_t len) return (error); } -int -core_vn_write(const struct coredump_writer *cdw, const void *base, size_t len, - off_t offset, enum uio_seg seg, struct ucred *cred, size_t *resid, - struct thread *td) -{ - struct coredump_vnode_ctx *ctx = cdw->ctx; - - return (vn_rdwr_inchunks(UIO_WRITE, ctx->vp, __DECONST(void *, base), - len, offset, seg, IO_UNIT | IO_DIRECT | IO_RANGELOCKED, - cred, ctx->fcred, resid, td)); -} - int core_write(struct coredump_params *cp, const void *base, size_t len, off_t offset, enum uio_seg seg, size_t *resid) @@ -2018,24 +2007,6 @@ core_write(struct coredump_params *cp, const void *base, size_t len, cp->active_cred, resid, cp->td)); } -int -core_vn_extend(const struct coredump_writer *cdw, off_t newsz, - struct ucred *cred) -{ - struct coredump_vnode_ctx *ctx = cdw->ctx; - struct mount *mp; - int error; - - error = vn_start_write(ctx->vp, &mp, V_WAIT); - if (error != 0) - return (error); - vn_lock(ctx->vp, LK_EXCLUSIVE | LK_RETRY); - error = vn_truncate_locked(ctx->vp, newsz, false, cred); - VOP_UNLOCK(ctx->vp); - vn_finished_write(mp); - return (error); -} - static int core_extend(struct coredump_params *cp, off_t newsz) { diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index e96f72d56e18..da0efac0598d 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -81,6 +80,7 @@ #include #include #include +#include #include #include #include @@ -102,7 +102,6 @@ SDT_PROBE_DEFINE2(proc, , , signal__clear, SDT_PROBE_DEFINE3(proc, , , signal__discard, "struct thread *", "struct proc *", "int"); -static int coredump(struct thread *); static int killpg1(struct thread *td, int sig, int pgid, int all, ksiginfo_t *ksi); static int issignal(struct thread *td); @@ -127,11 +126,6 @@ const struct filterops sig_filtops = { .f_event = filt_signal, }; -static int kern_logsigexit = 1; -SYSCTL_INT(_kern, KERN_LOGSIGEXIT, logsigexit, CTLFLAG_RW, - &kern_logsigexit, 0, - "Log processes quitting on abnormal signals to syslog(3)"); - static int kern_forcesigexit = 1; SYSCTL_INT(_kern, OID_AUTO, forcesigexit, CTLFLAG_RW, &kern_forcesigexit, 0, "Force trap signal to be handled"); @@ -194,26 +188,6 @@ SYSINIT(signal, SI_SUB_P1003_1B, SI_ORDER_FIRST+3, sigqueue_start, NULL); (cr1)->cr_ruid == (cr2)->cr_uid || \ (cr1)->cr_uid == (cr2)->cr_uid) -static int sugid_coredump; -SYSCTL_INT(_kern, OID_AUTO, sugid_coredump, CTLFLAG_RWTUN, - &sugid_coredump, 0, "Allow setuid and setgid processes to dump core"); - -static int capmode_coredump; -SYSCTL_INT(_kern, OID_AUTO, capmode_coredump, CTLFLAG_RWTUN, - &capmode_coredump, 0, "Allow processes in capability mode to dump core"); - -static int do_coredump = 1; -SYSCTL_INT(_kern, OID_AUTO, coredump, CTLFLAG_RW, - &do_coredump, 0, "Enable/Disable coredumps"); - -static int set_core_nodump_flag = 0; -SYSCTL_INT(_kern, OID_AUTO, nodump_coredump, CTLFLAG_RW, &set_core_nodump_flag, - 0, "Enable setting the NODUMP flag on coredump files"); - -static int coredump_devctl = 0; -SYSCTL_INT(_kern, OID_AUTO, coredump_devctl, CTLFLAG_RW, &coredump_devctl, - 0, "Generate a devctl notification when processes coredump"); - /* * Signal properties and actions. * The array below categorizes the signals and their default actions @@ -785,6 +759,13 @@ sigprop(int sig) return (0); } +bool +sig_do_core(int sig) +{ + + return ((sigprop(sig) & SIGPROP_CORE) != 0); +} + static bool sigact_flag_test(const struct sigaction *act, int flag) { @@ -3644,82 +3625,6 @@ killproc(struct proc *p, const char *why) kern_psignal(p, SIGKILL); } -/* - * Force the current process to exit with the specified signal, dumping core - * if appropriate. We bypass the normal tests for masked and caught signals, - * allowing unrecoverable failures to terminate the process without changing - * signal state. Mark the accounting record with the signal termination. - * If dumping core, save the signal number for the debugger. Calls exit and - * does not return. - */ -void -sigexit(struct thread *td, int sig) -{ - struct proc *p = td->td_proc; - const char *coreinfo; - int rv; - bool logexit; - - PROC_LOCK_ASSERT(p, MA_OWNED); - proc_set_p2_wexit(p); - - p->p_acflag |= AXSIG; - if ((p->p_flag2 & P2_LOGSIGEXIT_CTL) == 0) - logexit = kern_logsigexit != 0; - else - logexit = (p->p_flag2 & P2_LOGSIGEXIT_ENABLE) != 0; - - /* - * We must be single-threading to generate a core dump. This - * ensures that the registers in the core file are up-to-date. - * Also, the ELF dump handler assumes that the thread list doesn't - * change out from under it. - * - * XXX If another thread attempts to single-thread before us - * (e.g. via fork()), we won't get a dump at all. - */ - if ((sigprop(sig) & SIGPROP_CORE) && - thread_single(p, SINGLE_NO_EXIT) == 0) { - p->p_sig = sig; - /* - * Log signals which would cause core dumps - * (Log as LOG_INFO to appease those who don't want - * these messages.) - * XXX : Todo, as well as euid, write out ruid too - * Note that coredump() drops proc lock. - */ - rv = coredump(td); - switch (rv) { - case 0: - sig |= WCOREFLAG; - coreinfo = " (core dumped)"; - break; - case EFAULT: - coreinfo = " (no core dump - bad address)"; - break; - case EINVAL: - coreinfo = " (no core dump - invalid argument)"; - break; - case EFBIG: - coreinfo = " (no core dump - too large)"; - break; - default: - coreinfo = " (no core dump - other error)"; - break; - } - if (logexit) - log(LOG_INFO, - "pid %d (%s), jid %d, uid %d: exited on " - "signal %d%s\n", p->p_pid, p->p_comm, - p->p_ucred->cr_prison->pr_id, - td->td_ucred->cr_uid, - sig &~ WCOREFLAG, coreinfo); - } else - PROC_UNLOCK(p); - exit1(td, 0, sig); - /* NOTREACHED */ -} - /* * Send queued SIGCHLD to parent when child process's state * is changed. @@ -3813,486 +3718,6 @@ childproc_exited(struct proc *p) sigparent(p, reason, status); } -#define MAX_NUM_CORE_FILES 100000 -#ifndef NUM_CORE_FILES -#define NUM_CORE_FILES 5 -#endif -CTASSERT(NUM_CORE_FILES >= 0 && NUM_CORE_FILES <= MAX_NUM_CORE_FILES); -static int num_cores = NUM_CORE_FILES; - -static int -sysctl_debug_num_cores_check (SYSCTL_HANDLER_ARGS) -{ - int error; - int new_val; - - new_val = num_cores; - error = sysctl_handle_int(oidp, &new_val, 0, req); - if (error != 0 || req->newptr == NULL) - return (error); - if (new_val > MAX_NUM_CORE_FILES) - new_val = MAX_NUM_CORE_FILES; - if (new_val < 0) - new_val = 0; - num_cores = new_val; - return (0); -} -SYSCTL_PROC(_debug, OID_AUTO, ncores, - CTLTYPE_INT | CTLFLAG_RW | CTLFLAG_MPSAFE, 0, sizeof(int), - sysctl_debug_num_cores_check, "I", - "Maximum number of generated process corefiles while using index format"); - -#define GZIP_SUFFIX ".gz" -#define ZSTD_SUFFIX ".zst" - -int compress_user_cores = 0; - -static int -sysctl_compress_user_cores(SYSCTL_HANDLER_ARGS) -{ - int error, val; - - val = compress_user_cores; - error = sysctl_handle_int(oidp, &val, 0, req); - if (error != 0 || req->newptr == NULL) - return (error); - if (val != 0 && !compressor_avail(val)) - return (EINVAL); - compress_user_cores = val; - return (error); -} -SYSCTL_PROC(_kern, OID_AUTO, compress_user_cores, - CTLTYPE_INT | CTLFLAG_RWTUN | CTLFLAG_NEEDGIANT, 0, sizeof(int), - sysctl_compress_user_cores, "I", - "Enable compression of user corefiles (" - __XSTRING(COMPRESS_GZIP) " = gzip, " - __XSTRING(COMPRESS_ZSTD) " = zstd)"); - -int compress_user_cores_level = 6; -SYSCTL_INT(_kern, OID_AUTO, compress_user_cores_level, CTLFLAG_RWTUN, - &compress_user_cores_level, 0, - "Corefile compression level"); - -/* - * Protect the access to corefilename[] by allproc_lock. - */ -#define corefilename_lock allproc_lock - -static char corefilename[MAXPATHLEN] = {"%N.core"}; -TUNABLE_STR("kern.corefile", corefilename, sizeof(corefilename)); - -static int -sysctl_kern_corefile(SYSCTL_HANDLER_ARGS) -{ - int error; - - sx_xlock(&corefilename_lock); - error = sysctl_handle_string(oidp, corefilename, sizeof(corefilename), - req); - sx_xunlock(&corefilename_lock); - - return (error); -} -SYSCTL_PROC(_kern, OID_AUTO, corefile, CTLTYPE_STRING | CTLFLAG_RW | - CTLFLAG_MPSAFE, 0, 0, sysctl_kern_corefile, "A", - "Process corefile name format string"); - -static void -vnode_close_locked(struct thread *td, struct vnode *vp) -{ - - VOP_UNLOCK(vp); - vn_close(vp, FWRITE, td->td_ucred, td); -} - -/* *** 767 LINES SKIPPED *** From nobody Sat Jul 26 21:31:53 2025 X-Original-To: dev-commits-src-all@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 4bqHxj4Ld7z62VlZ; Sat, 26 Jul 2025 21:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqHxj1VdTz3sB0; Sat, 26 Jul 2025 21:31:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753565513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PVtIrsGWqlj6d2Zu1azEuh7wEBcH8qGRGZ1ABe9C8ic=; b=UBeUZEXa7gr1USn06WIlkor9hc6gtkUvVEcgIuFVIGmzoJDFTRGpp4ZooSChlbsTUdDa+m bf3I4DrlWImkjlkeW4kaVQa3ka8ePThrGZxPyP22G1AG2Y71Rr37XB/ixI4FmToN2EOUIn KsrSUFX73uWR+4PPI6eiAngDiKQ3ryQrmbeoBlcMaqQGB7rsfoWjRMciCYocImhZ0lAFt9 fVerkG55hoNzRM+pjYjNOrGd7uUxYVB2zjzwe9jneiYMtxScSUjz9W1x+t1oNpDWhLVagf mGocWUgmqBr6ihMYgOHl/Rr9lsz02qE70autUCI2jqsZU7b1dx1wCOevq4GLzw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753565513; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PVtIrsGWqlj6d2Zu1azEuh7wEBcH8qGRGZ1ABe9C8ic=; b=yfVubUlNi30IuVKKNrkK8qy+jEmx3TP9Axs0piH4W4Hm5zU8Hmbz5aViEzlFMhP26J4NKr XfmupgmoJnHkDH85Oehvd9SKgvRxTRYpYt0T4+gjHkmKuUlrU+edIyUsnGN0yUejxnnLBV +Td738Us0fXV8oSKR6/z6lfkYPo6z16HlbFcAOMHyhFlRxHSfgfPlAqV1hqpZBwZoAkkvn Z1eEngq9NdAQkRkox/11YXGNIMBpcuXrpbxlDk/YHcxS/mEfGdsK1nUw6Ay2cG+nIinYfq ZMugLxl7P0Q2nLpMQu5sLc4dJcKdKvVSWa0YKu2uYQCb6DtrqneCd4PeYnCjcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753565513; a=rsa-sha256; cv=none; b=omPUYHzqUtb2vIwgEdZ9T0XyJvoEXK4eLYihFxC5P4YgUQdlGSd27Tew6xXu5kcI8zXlxu td4WCAUyfnqf+Gjkh/od+VniGmeRkXfNbDJCMxAWfv8Stj1ElP1B39gUikYEb62HfJoNz/ 53fMQ4dQ+Y1im3DWu/u9j9GYynsSfgGmtFBen5MH4BRjqNhNeNxYXEytOyO3CfNnrVRVIT SnTqx5xFg1LA8lrCVqvqdmrz+bXRUdg2kOjhxO0LPY+ePMRlO+JC3bf8sC0og44ycps5dT T2J619QmHXgkZBwR6A3yTK9FbMSWUvGt+EZ6XX1PwVaQfz4ZfejFj8F0C5cWZQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqHxj0rpgzmrT; Sat, 26 Jul 2025 21:31:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QLVrN9065833; Sat, 26 Jul 2025 21:31:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QLVrF2065830; Sat, 26 Jul 2025 21:31:53 GMT (envelope-from git) Date: Sat, 26 Jul 2025 21:31:53 GMT Message-Id: <202507262131.56QLVrF2065830@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: ce51f79913aa - main - kern: abstract away the vnode coredumper to allow pluggable dumpers List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: ce51f79913aa28a32217a424845a2649019535af Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=ce51f79913aa28a32217a424845a2649019535af commit ce51f79913aa28a32217a424845a2649019535af Author: Kyle Evans AuthorDate: 2025-07-15 21:38:30 +0000 Commit: Kyle Evans CommitDate: 2025-07-26 21:31:41 +0000 kern: abstract away the vnode coredumper to allow pluggable dumpers The default and only stock coredumper will continue to be the traditional vnode dumper, which will dump to a vnode and issue a devctl notification. With this change, one can write a kmod that injects custom handling of user coredumps that offers richer behavior, particularly in case one wants to add more metadata than we can tap out via devd. The main motivation here is to pave the way for my usercore daemon to be able to reroute coredumps before they ever touch the disk. In some cases they may be discarded and we can avoid the overhead of writing anything, in others they allow us to capture coredumps that would be written into an area that's transient in nature (e.g., kyua test work directories) without having to do more tricks to keep those alive. My WIP kmod writes the coredump into a shmfd instead of a vnode, then installs that into ucored(8) with every read(2) of /dev/ucore. This also allows me to capture more metadata reliably before the process and jail disappear. Reviewed by: kib (earlier version), markj Differential Revision: https://reviews.freebsd.org/D51338 --- share/man/man5/core.5 | 40 ++++----- share/man/man9/Makefile | 2 + share/man/man9/coredumper_register.9 | 168 +++++++++++++++++++++++++++++++++++ sys/kern/coredump_vnode.c | 11 ++- sys/kern/kern_exec.c | 2 +- sys/kern/kern_ucoredump.c | 80 ++++++++++++++++- sys/sys/ucoredump.h | 33 ++++++- 7 files changed, 311 insertions(+), 25 deletions(-) diff --git a/share/man/man5/core.5 b/share/man/man5/core.5 index aa6e3c67097d..628fdb7920bb 100644 --- a/share/man/man5/core.5 +++ b/share/man/man5/core.5 @@ -48,26 +48,6 @@ a system crash. (In this event, the decision to save the core file is arbitrary, see .Xr savecore 8 . ) .Pp -The maximum size of a core file is limited by the -.Dv RLIMIT_CORE -.Xr setrlimit 2 -limit. -Files which would be larger than the limit are not created. -.Pp -With a large limit, a process that had mapped a very large, -and perhaps sparsely populated, virtual memory region, could take -a very long time to create core dumps. -The system ignores all signals sent to a process writing a core file, except -.Dv SIGKILL -which terminates the writing and causes immediate exit of the process. -The behavior of -.Dv SIGKILL -can be disabled by setting tunable -.Xr sysctl 8 -variable -.Va kern.core_dump_can_intr -to zero. -.Pp The name of the file is controlled via the .Xr sysctl 8 variable @@ -107,6 +87,26 @@ yielding the traditional .Fx behaviour. .Pp +The maximum size of a core file is limited by the +.Dv RLIMIT_CORE +.Xr setrlimit 2 +limit. +Files which would be larger than the limit are not created. +.Pp +With a large limit, a process that had mapped a very large, +and perhaps sparsely populated, virtual memory region, could take +a very long time to create core dumps. +The system ignores all signals sent to a process writing a core file, except +.Dv SIGKILL +which terminates the writing and causes immediate exit of the process. +The behavior of +.Dv SIGKILL +can be disabled by setting tunable +.Xr sysctl 8 +variable +.Va kern.core_dump_can_intr +to zero. +.Pp By default, a process that changes user or group credentials whether real or effective will not create a corefile. This behaviour can be diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index b73e47b3ef4d..5bcde3030ebc 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -69,6 +69,7 @@ MAN= accept_filter.9 \ config_intrhook.9 \ contigmalloc.9 \ copy.9 \ + coredumper_register.9 \ counter.9 \ cpu_machdep.9 \ cpuset.9 \ @@ -905,6 +906,7 @@ MLINKS+=copy.9 copyin.9 \ copy.9 copyout.9 \ copy.9 copyout_nofault.9 \ copy.9 copystr.9 +MLINKS+=coredumper_register.9 coredumper_unregister.9 MLINKS+=counter.9 counter_u64_alloc.9 \ counter.9 counter_u64_free.9 \ counter.9 counter_u64_add.9 \ diff --git a/share/man/man9/coredumper_register.9 b/share/man/man9/coredumper_register.9 new file mode 100644 index 000000000000..44f94166f378 --- /dev/null +++ b/share/man/man9/coredumper_register.9 @@ -0,0 +1,168 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" +.\" Copyright (c) 2025 Kyle Evans +.\" +.Dd July 23, 2025 +.Dt COREDUMPER_REGISTER 9 +.Os +.Sh NAME +.Nm coredumper_register , +.Nm coredumper_unregister +.Nd loadable user coredumper support +.Sh SYNOPSIS +.In sys/ucoredump.h +.Ft void +.Fn coredumper_register "struct coredumper *cd" +.Ft void +.Fn coredumper_unregister "struct coredumper *cd" +.Pp +.Ft int +.Fn coredumper_probe_fn "struct thread *td" +.Ft int +.Fn coredumper_handle_fn "struct thread *td" "off_t limit" +.Bd -literal +/* Incomplete, but the useful members are depicted here. */ +struct coredumper { + const char *cd_name; + coredumper_probe_fn *cd_probe; + coredumper_handle_fn *cd_handle; +}; +.Ed +.Pp +.Ft int +.Fn coredump_init_fn "const struct coredump_writer *" "const struct coredump_params *" +"int" +.Ft int +.Fn coredump_write_fn "const struct coredump_writer *" "const void *" "size_t" \ +"off_t" "enum uio_seg" "struct ucred *" "size_t *" "struct thread *" +.Ft int +.Fn coredump_extend_fn "const struct coredump_writer *" "off_t" "struct ucred *" +.Bd -literal +struct coredump_writer { + void *ctx; + coredump_init_fn *init_fn; + coredump_write_fn *write_fn; + coredump_extend_fn *extend_fn; +}; +.Ed +.Sh DESCRIPTION +The +.Nm +mechanism provides a path for kernel modules to register a new user process core +dumper. +The expected use of +.Nm +is for a module to define the fields of the struct coredumper listed above, then +call +.Fn coredumper_register +at +.Dv MOD_LOAD +time. +A corresponding +.Fn coredumper_unregister +should be called at +.Dv MOD_UNLOAD +time. +Note that +.Fn coredumper_unregister +will block until the specified coredumper is no longer processing coredumps. +.Pp +When a user process is preparing to start dumping core, the kernel will execute +the +.Fn cd_probe +function for each coredumper currently registered. +The +.Fn cd_probe +function is expected to return either -1 if it would decline to dump the +process, or a priority level greater than 0. +The coredumper with the highest priority will handle the coredump. +The following default priorities are defined: +.Bl -tag -width indent +.It Dv COREDUMPER_NOMATCH +This dumper declines dumping the process. +.It Dv COREDUMPER_GENERIC +This dumper will dump the process at the lowest priority. +This priority is not recommended, as the default vnode dumper will bid at +.Dv COREDUMPER_GENERIC +as well. +.It Dv COREDUMPER_SPECIAL +This dumper provides special behavior, and will dump the process at a higher +priority. +.It Dv COREDUMPER_HIGHPRIORITY +This dumper would prefer to handle this coredump. +This may be used by, for instance, a custom or vendor-specific coredump +mechanism that wishes to preempt others. +.El +.Pp +Note that this system has been designed such that the +.Fn cd_probe +function can examine the process in question and make an informed decision. +Different processes being dumped could probe at different priorities in the +same coredumper. +.Pp +Once the highest priority coredumper has been selected, the +.Fn cd_handle +function will be invoked. +The +.Fn cd_handle +will receive both the thread and the +.Dv RLIMIT_CORE +.Xr setrlimit 2 +.Fa limit . +The proc lock will be held on entry, and should be unlocked before the handler +returns. +The +.Fa limit +is typically passed to the +.Fn sv_coredump +that belongs to the process's +.Va p_sysent . +.Pp +The +.Fn cd_handle +function should return either 0 if the dump was successful, or an appropriate +.Xr errno 2 +otherwise. +.Ss Customized Coredump Writers +Custom coredumpers can define their own +.Dv coredump_writer +to pass to +.Fn sv_coredump . +.Pp +The +.Va ctx +member is opaque and only to be used by the coredumper itself. +.Pp +The +.Va init_fn +function, if it's provided, will be called by the +.Fn sv_coredump +implementation before any data is to be written. +This allows the writer implementation to record any coredump parameters that it +might need to capture, or setup the object to be written to. +.Pp +The +.Va write_fn +function will be called by the +.Fn sv_coredump +implementation to write out data. +The +.Va extend_fn +function will be called to enlarge the coredump, in the sense that a hole is +created in any difference between the current size and the new size. +For convenience, the +.Fn core_vn_write +and +.Fn core_vn_extend +functions used by the vnode coredumper are exposed in +.In sys/ucordumper.h , +and the +.Dv coredump_vnode_ctx +defined there should be populated with the vnode to write to. +.Sh SEE ALSO +.Xr setrlimit 2 , +.Xr core 5 +.Sh AUTHORS +This manual page was written by +.An Kyle Evans Aq Mt kevans@FreeBSD.org . diff --git a/sys/kern/coredump_vnode.c b/sys/kern/coredump_vnode.c index 675503476a4e..8b857e9aa4a2 100644 --- a/sys/kern/coredump_vnode.c +++ b/sys/kern/coredump_vnode.c @@ -89,6 +89,15 @@ #define NUM_CORE_FILES 5 #endif +static coredumper_handle_fn coredump_vnode; +static struct coredumper vnode_coredumper = { + .cd_name = "vnode_coredumper", + .cd_handle = coredump_vnode, +}; + +SYSINIT(vnode_coredumper_register, SI_SUB_EXEC, SI_ORDER_ANY, + coredumper_register, &vnode_coredumper); + _Static_assert(NUM_CORE_FILES >= 0 && NUM_CORE_FILES <= MAX_NUM_CORE_FILES, "NUM_CORE_FILES is out of range (0 to " __STRING(MAX_NUM_CORE_FILES) ")"); static int num_cores = NUM_CORE_FILES; @@ -420,7 +429,7 @@ corefile_open(const char *comm, uid_t uid, pid_t pid, struct thread *td, * one. If there _is not_ one, it returns ENOSYS; otherwise it returns the * error from the process-specific routine. */ -int +static int coredump_vnode(struct thread *td, off_t limit) { struct proc *p = td->td_proc; diff --git a/sys/kern/kern_exec.c b/sys/kern/kern_exec.c index 5cd4d39d7236..0fc2d0e7f1bc 100644 --- a/sys/kern/kern_exec.c +++ b/sys/kern/kern_exec.c @@ -2010,7 +2010,7 @@ core_write(struct coredump_params *cp, const void *base, size_t len, static int core_extend(struct coredump_params *cp, off_t newsz) { - return ((*cp->cdw->extend_fn)(cp->cdw, newsz, cp->td->td_ucred)); + return ((*cp->cdw->extend_fn)(cp->cdw, newsz, cp->active_cred)); } int diff --git a/sys/kern/kern_ucoredump.c b/sys/kern/kern_ucoredump.c index 4192928be614..a2412bf06441 100644 --- a/sys/kern/kern_ucoredump.c +++ b/sys/kern/kern_ucoredump.c @@ -38,12 +38,14 @@ #include #include #include +#include #include #include #include #include #include #include +#include #include #include #include @@ -53,6 +55,11 @@ static int coredump(struct thread *td); int compress_user_cores = 0; +static SLIST_HEAD(, coredumper) coredumpers = + SLIST_HEAD_INITIALIZER(coredumpers); +static struct rmlock coredump_rmlock; +RM_SYSINIT(coredump_lock, &coredump_rmlock, "coredump_lock"); + static int kern_logsigexit = 1; SYSCTL_INT(_kern, KERN_LOGSIGEXIT, logsigexit, CTLFLAG_RW, &kern_logsigexit, 0, @@ -92,6 +99,30 @@ SYSCTL_INT(_kern, OID_AUTO, compress_user_cores_level, CTLFLAG_RWTUN, &compress_user_cores_level, 0, "Corefile compression level"); +void +coredumper_register(struct coredumper *cd) +{ + + blockcount_init(&cd->cd_refcount); + rm_wlock(&coredump_rmlock); + SLIST_INSERT_HEAD(&coredumpers, cd, cd_entry); + rm_wunlock(&coredump_rmlock); +} + +void +coredumper_unregister(struct coredumper *cd) +{ + + rm_wlock(&coredump_rmlock); + SLIST_REMOVE(&coredumpers, cd, coredumper, cd_entry); + rm_wunlock(&coredump_rmlock); + + /* + * Wait for any in-process coredumps to finish before returning. + */ + blockcount_wait(&cd->cd_refcount, NULL, "dumpwait", 0); +} + /* * Force the current process to exit with the specified signal, dumping core * if appropriate. We bypass the normal tests for masked and caught signals, @@ -178,9 +209,11 @@ sigexit(struct thread *td, int sig) static int coredump(struct thread *td) { + struct coredumper *iter, *chosen; struct proc *p = td->td_proc; + struct rm_priotracker tracker; off_t limit; - int error; + int error, priority; PROC_LOCK_ASSERT(p, MA_OWNED); MPASS((p->p_flag & P_HADTHREADS) == 0 || p->p_singlethread == td); @@ -205,8 +238,51 @@ coredump(struct thread *td) return (EFBIG); } - error = coredump_vnode(td, limit); + rm_rlock(&coredump_rmlock, &tracker); + priority = -1; + chosen = NULL; + SLIST_FOREACH(iter, &coredumpers, cd_entry) { + if (iter->cd_probe == NULL) { + /* + * If we haven't found anything of a higher priority + * yet, we'll call this a GENERIC. Ideally, we want + * coredumper modules to include a probe function. + */ + if (priority < 0) { + priority = COREDUMPER_GENERIC; + chosen = iter; + } + + continue; + } + + error = (*iter->cd_probe)(td); + if (error < 0) + continue; + + /* + * Higher priority than previous options. + */ + if (error > priority) { + priority = error; + chosen = iter; + } + } + + /* + * Acquire our refcount before we drop the lock so that + * coredumper_unregister() can safely assume that the refcount will only + * go down once it's dropped the rmlock. + */ + blockcount_acquire(&chosen->cd_refcount, 1); + rm_runlock(&coredump_rmlock, &tracker); + + /* Currently, we always have the vnode dumper built in. */ + MPASS(chosen != NULL); + error = ((*chosen->cd_handle)(td, limit)); PROC_LOCK_ASSERT(p, MA_NOTOWNED); + blockcount_release(&chosen->cd_refcount, 1); + return (error); } diff --git a/sys/sys/ucoredump.h b/sys/sys/ucoredump.h index b543c130b9dc..0a51ee7f50c8 100644 --- a/sys/sys/ucoredump.h +++ b/sys/sys/ucoredump.h @@ -13,6 +13,8 @@ #ifdef _KERNEL #include +#include +#include /* Coredump output parameters. */ struct coredump_params; @@ -34,7 +36,6 @@ struct coredump_vnode_ctx { coredump_write_fn core_vn_write; coredump_extend_fn core_vn_extend; -int coredump_vnode(struct thread *, off_t); struct coredump_writer { void *ctx; @@ -64,5 +65,35 @@ extern int coredump_pack_vmmapinfo; extern int compress_user_cores; extern int compress_user_cores_level; +typedef int coredumper_probe_fn(struct thread *); + +/* + * Some arbitrary values for coredumper probes to return. The highest priority + * we can find wins. It's somewhat expected that a coredumper may want to bid + * differently based on the process in question. Note that probe functions will + * be called with the proc lock held, so they must not sleep. + */ +#define COREDUMPER_NOMATCH (-1) /* Decline to touch it */ +#define COREDUMPER_GENERIC (0) /* I handle coredumps */ +#define COREDUMPER_SPECIAL (50) /* Special handler */ +#define COREDUMPER_HIGH_PRIORITY (100) /* High-priority handler */ + +/* + * The handle functions will be called with the proc lock held, and should + * return with the proc lock dropped. + */ +typedef int coredumper_handle_fn(struct thread *, off_t); + +struct coredumper { + SLIST_ENTRY(coredumper) cd_entry; + const char *cd_name; + coredumper_probe_fn *cd_probe; + coredumper_handle_fn *cd_handle; + blockcount_t cd_refcount; +}; + +void coredumper_register(struct coredumper *); +void coredumper_unregister(struct coredumper *); + #endif /* _KERNEL */ #endif /* _SYS_UCOREDUMP_H_ */ From nobody Sat Jul 26 21:31:54 2025 X-Original-To: dev-commits-src-all@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 4bqHxl646Fz62VxW; Sat, 26 Jul 2025 21:31: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqHxk2Mtwz3sLX; Sat, 26 Jul 2025 21:31:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753565514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L0uGI6zWjdBSHbW29T9wNIkSMGDB82+Qnyq0AmrIEIM=; b=Iwj4ZYPzDZnczxafWmgtoi/YM3+dq5NlD0xLN3GDGtcjpqt34m3Xw3C9bqa2Lj7MuEMcxm fCoDuIDQoh3eZVtMMmil7Ore6RiF1WXtEL9uQ7Ab32xB+AG2unzonXGzMLWGWzBDRMDzes LrqJPRFsS7jR83T0jtQfCYXfnMk0X0Zxw/6DAqmli5khEUU9iWHVP3EZCByYUXteW9/1z8 pISEiiwStKBAWivq/thiphQB4qSjneZkoiV/Ot4zgHuu6E2hyUopje+xC00+jpDIehCUfj hIZQ0AFYa/Wvbd9a0MnRqYafWWZvRXqZ9/GYy2ryEfLpD9nAsXWnzASxxiWNuw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753565514; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=L0uGI6zWjdBSHbW29T9wNIkSMGDB82+Qnyq0AmrIEIM=; b=yfuFTz5mdGU8HlVX+uZ3lIuzgSWcuRn6g9ObiVB38TtvWJC0CrZbhHaJ5MS5cSIit+KvJb Z+qx1HTgloc9PkyfJfaw2qayla0yY3kwLkcO66Y2m+HyJT7qWjPRQk0Uc2mx3rwbfnk9Au sjiyjg2mpiY0S2ZDxg2RXXrfpz0z8d0aYh1JyLObr6XvKFfJXI573rK1ak529RAfXwRqIQ erJhWMp7sh0KG1iq0qifUGXtDioGwThngsSLYYRYctODeQkcjTuEUpkh4vnzCF/yEqdkyS skT2BfgLffoOGBztNUXN5xQzkScYzfjZAUIF7dv4/osvja7/o9+4Jo2zsKHnMQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753565514; a=rsa-sha256; cv=none; b=xUNJraeG7VSbSIc0ZyjHcysHH4ZxCJoaRHTxc1e4W5gV9oLAfSm3JiSHF5a94pJBXSqGeI uxPmQERmj8GegTm3HKbHq84m3QlNuqOEyucn8u5rgJz47T66DqWPEu+/RAPpRWvDck0qPw FcH25roTu7A3J/b7BK+CRb3zEug2p7U77rIIeMliPn6+jP3XKw3vIcP338CAtSZQAJnUJJ dGq/TxqRSOsYL2o42aQRkZA5k3loCnF/S82pOEffiTx36GFCTVs1q6Q/oSCZuhKOy8msae KHfJFWwzEYCCtY4RGlMZgbrtHbc9jl//1cV7+tDQwpgp5sVpXJU+iIog9o2LSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqHxk1p7VzmZD; Sat, 26 Jul 2025 21:31:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QLVsPK065868; Sat, 26 Jul 2025 21:31:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QLVsZn065865; Sat, 26 Jul 2025 21:31:54 GMT (envelope-from git) Date: Sat, 26 Jul 2025 21:31:54 GMT Message-Id: <202507262131.56QLVsZn065865@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 3ce3b342db7e - main - kern: add some better error messages for coredump() failures List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 3ce3b342db7e5c987e5eee039f7b290a3919ca37 Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=3ce3b342db7e5c987e5eee039f7b290a3919ca37 commit 3ce3b342db7e5c987e5eee039f7b290a3919ca37 Author: Kyle Evans AuthorDate: 2025-07-22 16:49:52 +0000 Commit: Kyle Evans CommitDate: 2025-07-26 21:31:42 +0000 kern: add some better error messages for coredump() failures After debugging with a user on discord why their process is not generating coredumps, it became clear that we can use better error messages -- particularly to distinguish between the different EFAULT cases. For those that are denied by system policies, include some more specific pointers to the relevant knob. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D51465 --- sys/kern/kern_ucoredump.c | 57 ++++++++++++++++++++++++++++------------------- 1 file changed, 34 insertions(+), 23 deletions(-) diff --git a/sys/kern/kern_ucoredump.c b/sys/kern/kern_ucoredump.c index a2412bf06441..d425596b5f24 100644 --- a/sys/kern/kern_ucoredump.c +++ b/sys/kern/kern_ucoredump.c @@ -51,7 +51,7 @@ #include #include -static int coredump(struct thread *td); +static int coredump(struct thread *td, const char **); int compress_user_cores = 0; @@ -135,7 +135,6 @@ void sigexit(struct thread *td, int sig) { struct proc *p = td->td_proc; - const char *coreinfo; int rv; bool logexit; @@ -158,6 +157,8 @@ sigexit(struct thread *td, int sig) * (e.g. via fork()), we won't get a dump at all. */ if (sig_do_core(sig) && thread_single(p, SINGLE_NO_EXIT) == 0) { + const char *err = NULL; + p->p_sig = sig; /* * Log signals which would cause core dumps @@ -166,32 +167,34 @@ sigexit(struct thread *td, int sig) * XXX : Todo, as well as euid, write out ruid too * Note that coredump() drops proc lock. */ - rv = coredump(td); - switch (rv) { - case 0: + rv = coredump(td, &err); + if (rv == 0) { + MPASS(err == NULL); sig |= WCOREFLAG; - coreinfo = " (core dumped)"; - break; - case EFAULT: - coreinfo = " (no core dump - bad address)"; - break; - case EINVAL: - coreinfo = " (no core dump - invalid argument)"; - break; - case EFBIG: - coreinfo = " (no core dump - too large)"; - break; - default: - coreinfo = " (no core dump - other error)"; - break; + } else if (err == NULL) { + switch (rv) { + case EFAULT: + err = "bad address"; + break; + case EINVAL: + err = "invalild argument"; + break; + case EFBIG: + err = "too large"; + break; + default: + err = "other error"; + break; + } } if (logexit) log(LOG_INFO, "pid %d (%s), jid %d, uid %d: exited on " - "signal %d%s\n", p->p_pid, p->p_comm, + "signal %d (%s%s)\n", p->p_pid, p->p_comm, p->p_ucred->cr_prison->pr_id, - td->td_ucred->cr_uid, - sig &~ WCOREFLAG, coreinfo); + td->td_ucred->cr_uid, sig &~ WCOREFLAG, + err != NULL ? "no core dump - " : "core dumped", + err != NULL ? err : ""); } else PROC_UNLOCK(p); exit1(td, 0, sig); @@ -207,7 +210,7 @@ sigexit(struct thread *td, int sig) * ENOSYS; otherwise it returns the error from the process-specific routine. */ static int -coredump(struct thread *td) +coredump(struct thread *td, const char **errmsg) { struct coredumper *iter, *chosen; struct proc *p = td->td_proc; @@ -221,6 +224,13 @@ coredump(struct thread *td) if (!do_coredump || (!sugid_coredump && (p->p_flag & P_SUGID) != 0) || (p->p_flag2 & P2_NOTRACE) != 0) { PROC_UNLOCK(p); + + if (!do_coredump) + *errmsg = "denied by kern.coredump"; + else if ((p->p_flag2 & P2_NOTRACE) != 0) + *errmsg = "process has trace disabled"; + else + *errmsg = "sugid process denied by kern.sugid_coredump"; return (EFAULT); } @@ -235,6 +245,7 @@ coredump(struct thread *td) limit = (off_t)lim_cur(td, RLIMIT_CORE); if (limit == 0 || racct_get_available(p, RACCT_CORE) == 0) { PROC_UNLOCK(p); + *errmsg = "coredumpsize limit is 0"; return (EFBIG); } From nobody Sat Jul 26 21:41:24 2025 X-Original-To: dev-commits-src-all@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 4bqJ8j3gbJz62m5h; Sat, 26 Jul 2025 21:41: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqJ8j0mgnz3vPT; Sat, 26 Jul 2025 21:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753566085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Au2TygojzApYHrQDwtyH4g/BMDwj7fjk1U/QnYfyzBU=; b=i+hJbjBufTUWU8EdcpBMn0m8RYcy+/AHB68BiWUeIfzpnisWuKvTFEGOS/HLJcsP4AF1TR dAQJDdB7A95Pn9NWcBk9T3PTb8An4hZHF8VYrh3cd7GnzF3nguTmhepuEVvehGL+YYcWBT lD9sd+ZTcY5o0kZyH1fc2+Zx5DqTg7wgVaUJAnyqhWKpfIfJu5Tj1uhZTBodyaJi3/V5Bc VZwZp13diX0jqBZYSf1V+xBE4b2mbYjT7ogeojLTWHp5WCXb0jKEAd3v39oWODF8oaK5Tq ZOIT8JRyXs2l4G2rgE9UrfLEwgVc9XkFCX96PnSnoqxSYXNyZKqM2+k9HvG0tA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753566085; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Au2TygojzApYHrQDwtyH4g/BMDwj7fjk1U/QnYfyzBU=; b=SSujTYlYn6dsuXllwrzR+leD0iP35KWqlItX+v3VHQcCvAXV5dpln7+6JHo86Tj2GIln0r MdwI10LRZuSxNiLuvoIYau9vymLSoHa7FPdKj/r1v+eJKefJzGRxngsNn8WeMHUT7zBojC 1WRdF/isnuZaT18ZrQ8wWRrZKhRZwyHSFsup7wzG3Xvip994LojT4h6NBKNJiATo90ww46 4R76TcEITGn9ULIw9nQpLgDh/+11kRV3QwEJZBZWQRvDpJ089DUi8gqEPChWdibcUdXJkA UKHQOWyx6c2GkEh7uFUm3P+Sfcjo/w69JJWnmV5NOeJ4lARu09Z1eWWPlVPQjQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753566085; a=rsa-sha256; cv=none; b=NOK4qUX62+u4rUB+Hc0sYaeNOa0o2tHgQ4cTMv3cYMaIlhBZXwOi3pZQzNW1gIclP18AGg yqSHKefSqaGO9b0/VkwGy3N1J3PXPaAHduXQv+k3V+U1SUGLykItJhxpfkfGrLXlFJ9RE5 uTeIaR7nPyk5wU4cNdpxjb2VKG4Tf0h3kstlMqDGJuiMwzK5dcYRw/iAdo0HJeYlwNWO8u pqt07/SdHwbqcqfDXInNwFHoSq0yTgr4nxrPSEvt8ZcUsYCQ6K+tu1q4g6gjpEKMw6ZYN1 ydsPOpB+qXWnBBdkJob1F4z+h4omwGKswbIbM5H3kfRhskeVCiNyr6xn2aY+gw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqJ8j07Q4znHT; Sat, 26 Jul 2025 21:41:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QLfORp081693; Sat, 26 Jul 2025 21:41:24 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QLfOTv081690; Sat, 26 Jul 2025 21:41:24 GMT (envelope-from git) Date: Sat, 26 Jul 2025 21:41:24 GMT Message-Id: <202507262141.56QLfOTv081690@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: de91e7f0c6cb - main - share: man: fix coredumper_register(9)'s init_fn List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: de91e7f0c6cb576b4a2bda34d1e349ab621ad57d Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=de91e7f0c6cb576b4a2bda34d1e349ab621ad57d commit de91e7f0c6cb576b4a2bda34d1e349ab621ad57d Author: Kyle Evans AuthorDate: 2025-07-26 21:39:56 +0000 Commit: Kyle Evans CommitDate: 2025-07-26 21:40:50 +0000 share: man: fix coredumper_register(9)'s init_fn A last-minute change tweaked the prototype because we can just fetch the compression format from the compressor, but I missed updating the manpage to match it. Fixes: ce51f79913aa28 ("kern: abstract away the vnode coredumper [..]") --- share/man/man9/coredumper_register.9 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man9/coredumper_register.9 b/share/man/man9/coredumper_register.9 index 44f94166f378..f4c9eb4a1bf6 100644 --- a/share/man/man9/coredumper_register.9 +++ b/share/man/man9/coredumper_register.9 @@ -31,8 +31,8 @@ struct coredumper { .Ed .Pp .Ft int -.Fn coredump_init_fn "const struct coredump_writer *" "const struct coredump_params *" -"int" +.Fn coredump_init_fn "const struct coredump_writer *" \ +"const struct coredump_params *" .Ft int .Fn coredump_write_fn "const struct coredump_writer *" "const void *" "size_t" \ "off_t" "enum uio_seg" "struct ucred *" "size_t *" "struct thread *" From nobody Sat Jul 26 21:58:57 2025 X-Original-To: dev-commits-src-all@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 4bqJXx557Lz62msf; Sat, 26 Jul 2025 21:58:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqJXx41H1z40YS; Sat, 26 Jul 2025 21:58:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753567137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dw+G/c92FDEuQ7t/JUbpE3apH24F0XSxSL6hIbYe91o=; b=QeSbr2/97cLPn40QrkQm88/KS7E2Il1D3DJQTcKKtm30X8bcD2GNljusW/PbTrL8KV25CT AXUgbWEMBu37FEnJEsGbZJFXfdwqjwz6W/aGT9OW9bsxeKJosIfMjSSWlLGx2T+5JcjQv2 FW5Hh6RC8Cl+xVCZTEzaYYXZDhKKKusg9HhWmxBZGAjC/w96g0V2jF5UBZdVABw43n0zE9 LSsQqBtGrNbsdj+Q8+bWt0P54vUynwM4nGrj/sZaeNXg5+M98SSmI7NF/V82inEE6Mz08h 6vlwlwFScwKC3h1RkXlTSkEkeasTXh3fwvEzhepU2BAWgkox7ycY++Xxi7Q5Bg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753567137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Dw+G/c92FDEuQ7t/JUbpE3apH24F0XSxSL6hIbYe91o=; b=o1A4Y09YrVHKwYbTKsZz9r8itx+tJKe6cKvlvR6+Wr3s8QEKRTkBWHInYQDgwp0zPNcg1B oX0bk9iNo61Zi6aLDY5iTFT1gnb1zUBnlW7EyZ4Sv9CIKooSRrbK2WsZ8pxTI6L46Vfcfv eDGTO4dOmPhmoZirqdfNxzXxBrXtRLucP8XnCEUvrW4HEne4dVOGE7se40fW32Z2w45T39 RKyN4uRgzB0t/tCQuBIXEvAlEsNicR+wPAzCAvKDhGIdCifMMK9AdL4RxrUhCxb8Rp7mE9 8aOPX/5Fc4fu4oGV8QhfSaaeSolZpeI/h5+hwuod/k34K8wzIutElOxoxZXt4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753567137; a=rsa-sha256; cv=none; b=R+JRbM4b+cudJF3lLy1MB5JvHz+0wyXxMmfKVRIqZeoLbvBRUQWS4kj7Ao/s25rEgTpSVn XDv5x4LEVKFJAU3FeNX19iZ6lrVl1aoNWaZ798fzFi6CFw9GKobFNnSoeSRA83vkC/YsNG z4GdSPPMqurpprWm0sc/HROq5mdz+L1ADDp5GXeTUybATup0gj0GjG5nCxdfQY2gVZ5wZh ker44PPlMYjLRgDeH9R/pu5Qn4HpIXKw0V7bDm7Xc1VftuuPVUcpW+l1LUxmZ/pLB3Kxk1 AP0z9RqYxUVH2itRYDcSwIEOXqVJ7Q4+tMJ5y3RAzNbC6Sr6deIKc8B/i68BdQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqJXx3bNjznqC; Sat, 26 Jul 2025 21:58:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QLwvFQ010003; Sat, 26 Jul 2025 21:58:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QLwv2V010000; Sat, 26 Jul 2025 21:58:57 GMT (envelope-from git) Date: Sat, 26 Jul 2025 21:58:57 GMT Message-Id: <202507262158.56QLwv2V010000@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 1b7f9c586d25 - main - UPDATING: Belatedly document commit fa02551dc8a0 List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 1b7f9c586d2599081ca3bf79aefaf477ad115995 Auto-Submitted: auto-generated The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=1b7f9c586d2599081ca3bf79aefaf477ad115995 commit 1b7f9c586d2599081ca3bf79aefaf477ad115995 Author: Mark Johnston AuthorDate: 2025-07-26 21:58:07 +0000 Commit: Mark Johnston CommitDate: 2025-07-26 21:58:07 +0000 UPDATING: Belatedly document commit fa02551dc8a0 Reported by: Ian Freislich --- UPDATING | 3 +++ 1 file changed, 3 insertions(+) diff --git a/UPDATING b/UPDATING index a2843aa95127..8360ab14ada0 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,9 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20250726: + amd64 kernel configurations must contain "options SMP". + 20250725: gssd(8) has been moved to a new package, FreeBSD-gssd. If you use pkgbase and you need gssd, you should install this package. From nobody Sat Jul 26 22:30:16 2025 X-Original-To: dev-commits-src-all@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 4bqKF425Xwz62nyx; Sat, 26 Jul 2025 22:30: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqKF41TQSz45kd; Sat, 26 Jul 2025 22:30:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753569016; h=from:from:reply-to:subject:subject: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/j5ys9u8QKMa2xlHFMpbBeNGxpLQPfE7GNMaYJa8vU=; b=AFy4o3Rr7MfTqF69Ss9y61XrMyVR/NblDzCIQxd1kwQNX31fTDOz5ftWSonGnalyN7KMDH kdnWzPHUnD9DgqLvxu15atXHk5090qxDMaujY4oq8YkUpAMi9xadAY1w9f3lFOZhWc4Tbj o31WnXY1FDds9GVzpTjX39fyv1KaMVmtsjSVtTgzlPiWEuxN6rf6lPLdBNA7Nha3B1TIb7 G4/G39SzUlxt+BlMSdIFXVoIWX8Q1TX8ywh7P8fTIkw0K2orD7fQJw8hpR8AKqI1W9ZtV1 Kyr/eN32jKrHMOTaORxpx5/r4hs38aFzQTZFkEDxUDUaNg85ZB0o5XlFJnpY3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753569016; h=from:from:reply-to:subject:subject: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/j5ys9u8QKMa2xlHFMpbBeNGxpLQPfE7GNMaYJa8vU=; b=sIUGE8raHxguRZwMzNWQkDgeOcuwleRkf7WjWwSpmGky5MQHLv0YtiGXypjgjbbQDwVBBw q7Gn+gWN47Ap2/F/4293hlCMLsdBclX72AnDJtzrHOBuvkmxU2nEznB5oG4ZcsXhh6lq7p hTHrvJr1FoEl/G2nivhUp+psyMwWw0cDBZ8O9w4mUAar3tAZK5dkw2tj6TugdB15zBJ8cs ej2BhoJr5UAHw+PiT8Fgjr1e3+cPGPXpPQ9p8jl/HZJq5OsuaJmsqVdHNMIFS3hlWiKVsI nmPqCwMxAv5x8GtPCnRz6I5yyxYSQiUoe45zYkPTMre45s6z74vgke53U0dTUw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753569016; a=rsa-sha256; cv=none; b=U0eRzhWJkp8Yekic+ONBRWJQ34KfTsvQ/rs+5CfkTW2IeyvdWmwWnoNFAL212c4UM2vD5G 1jazRElfCToyeDNidMy5vJYJ+KB+kDN9adZUJjs1CJ8Nr90NN8KnlhOLmx2bzrxQsF41gC FHKTSCAvMpM+gFcIzYO7f+78Xl/4vYXFT114LtaNSZ0fz68cQQyvpS6xecjP1/WSpEHRrR aJFtlGRxQ5zmR73zbPgmATcJ1/I13q7xsL6J0hlFjsJOcitDgAkepxhzeS6Fm1T5SwXgnH vRtZs4RP9DocNyqzEPZ419BeciiYIjm5IwkinACR9HG1WvsmHYNJ9RsyeyKC2g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqKF40xvyzp8C; Sat, 26 Jul 2025 22:30:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QMUGs0075046; Sat, 26 Jul 2025 22:30:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QMUGAX075037; Sat, 26 Jul 2025 22:30:16 GMT (envelope-from git) Date: Sat, 26 Jul 2025 22:30:16 GMT Message-Id: <202507262230.56QMUGAX075037@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: e4e44f69f963 - main - amdsmu: Expose sysctls for metrics about last sleep List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e4e44f69f963dad9e25d589c18b3e9a279e49249 Auto-Submitted: auto-generated The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=e4e44f69f963dad9e25d589c18b3e9a279e49249 commit e4e44f69f963dad9e25d589c18b3e9a279e49249 Author: Aymeric Wibo AuthorDate: 2025-06-14 15:33:05 +0000 Commit: Aymeric Wibo CommitDate: 2025-07-26 22:26:46 +0000 amdsmu: Expose sysctls for metrics about last sleep Get "log" address with the `SMU_MSG_LOG_GETDRAM_ADDR_HI/LO` SMU commands. From this, we dump & read metrics about residency in various sleep states (none, S0i2, and S0i3), as well as active durations for the IP blocks on the CPU during the last sleep. All these metrics are exposed under the `dev.amdsmu.0.metrics` node. This is useful for debugging sleep as the residency registers in the `_LPI` object are not populated on some systems (e.g. AMD Phoenix). A `dev.amdsmu.0.ip_blocks.XXX` node is also created for each IP block, with children for the current active state and time spent active during the last sleep. Differential Revision: https://reviews.freebsd.org/D48714 Reviewed by: cem, kib, mckusick Approved by: kib, mckusick Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D48714 --- sys/dev/amdsmu/amdsmu.c | 264 +++++++++++++++++++++++++++++++++++++++++--- sys/dev/amdsmu/amdsmu.h | 46 +++++++- sys/dev/amdsmu/amdsmu_reg.h | 30 +++++ 3 files changed, 322 insertions(+), 18 deletions(-) diff --git a/sys/dev/amdsmu/amdsmu.c b/sys/dev/amdsmu/amdsmu.c index 84e6c749cca7..d46b0fc4f5ec 100644 --- a/sys/dev/amdsmu/amdsmu.c +++ b/sys/dev/amdsmu/amdsmu.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #include @@ -120,32 +121,175 @@ amdsmu_cmd(device_t dev, enum amdsmu_msg msg, uint32_t arg, uint32_t *ret) return (EINVAL); } -static void -amdsmu_print_vers(device_t dev) +static int +amdsmu_get_vers(device_t dev) { + int err; uint32_t smu_vers; - uint8_t smu_program; - uint8_t smu_maj, smu_min, smu_rev; + struct amdsmu_softc *sc = device_get_softc(dev); - if (amdsmu_cmd(dev, SMU_MSG_GETSMUVERSION, 0, &smu_vers) != 0) { + err = amdsmu_cmd(dev, SMU_MSG_GETSMUVERSION, 0, &smu_vers); + if (err != 0) { device_printf(dev, "failed to get SMU version\n"); - return; + return (err); } - smu_program = (smu_vers >> 24) & 0xFF; - smu_maj = (smu_vers >> 16) & 0xFF; - smu_min = (smu_vers >> 8) & 0xFF; - smu_rev = smu_vers & 0xFF; + sc->smu_program = (smu_vers >> 24) & 0xFF; + sc->smu_maj = (smu_vers >> 16) & 0xFF; + sc->smu_min = (smu_vers >> 8) & 0xFF; + sc->smu_rev = smu_vers & 0xFF; device_printf(dev, "SMU version: %d.%d.%d (program %d)\n", - smu_maj, smu_min, smu_rev, smu_program); + sc->smu_maj, sc->smu_min, sc->smu_rev, sc->smu_program); + + return (0); +} + +static int +amdsmu_get_ip_blocks(device_t dev) +{ + struct amdsmu_softc *sc = device_get_softc(dev); + const uint16_t deviceid = pci_get_device(dev); + int err; + struct amdsmu_metrics *m = &sc->metrics; + bool active; + char sysctl_descr[32]; + + /* Get IP block count. */ + switch (deviceid) { + case PCI_DEVICEID_AMD_REMBRANDT_ROOT: + sc->ip_block_count = 12; + break; + case PCI_DEVICEID_AMD_PHOENIX_ROOT: + sc->ip_block_count = 21; + break; + /* TODO How many IP blocks does Strix Point (and the others) have? */ + case PCI_DEVICEID_AMD_STRIX_POINT_ROOT: + default: + sc->ip_block_count = nitems(amdsmu_ip_blocks_names); + } + KASSERT(sc->ip_block_count <= nitems(amdsmu_ip_blocks_names), + ("too many IP blocks for array")); + + /* Get and print out IP blocks. */ + err = amdsmu_cmd(dev, SMU_MSG_GET_SUP_CONSTRAINTS, 0, + &sc->active_ip_blocks); + if (err != 0) { + device_printf(dev, "failed to get IP blocks\n"); + return (err); + } + device_printf(dev, "Active IP blocks: "); + for (size_t i = 0; i < sc->ip_block_count; i++) { + active = (sc->active_ip_blocks & (1 << i)) != 0; + sc->ip_blocks_active[i] = active; + if (!active) + continue; + printf("%s%s", amdsmu_ip_blocks_names[i], + i + 1 < sc->ip_block_count ? " " : "\n"); + } + + /* Create a sysctl node for IP blocks. */ + sc->ip_blocks_sysctlnode = SYSCTL_ADD_NODE(sc->sysctlctx, + SYSCTL_CHILDREN(sc->sysctlnode), OID_AUTO, "ip_blocks", + CTLFLAG_RD, NULL, "SMU metrics"); + if (sc->ip_blocks_sysctlnode == NULL) { + device_printf(dev, "could not add sysctl node for IP blocks\n"); + return (ENOMEM); + } + + /* Create a sysctl node for each IP block. */ + for (size_t i = 0; i < sc->ip_block_count; i++) { + /* Create the sysctl node itself for the IP block. */ + snprintf(sysctl_descr, sizeof sysctl_descr, + "Metrics about the %s AMD IP block", + amdsmu_ip_blocks_names[i]); + sc->ip_block_sysctlnodes[i] = SYSCTL_ADD_NODE(sc->sysctlctx, + SYSCTL_CHILDREN(sc->ip_blocks_sysctlnode), OID_AUTO, + amdsmu_ip_blocks_names[i], CTLFLAG_RD, NULL, sysctl_descr); + if (sc->ip_block_sysctlnodes[i] == NULL) { + device_printf(dev, + "could not add sysctl node for \"%s\"\n", sysctl_descr); + continue; + } + /* + * Create sysctls for if the IP block is currently active, last + * active time, and total active time. + */ + SYSCTL_ADD_BOOL(sc->sysctlctx, + SYSCTL_CHILDREN(sc->ip_block_sysctlnodes[i]), OID_AUTO, + "active", CTLFLAG_RD, &sc->ip_blocks_active[i], 0, + "IP block is currently active"); + SYSCTL_ADD_U64(sc->sysctlctx, + SYSCTL_CHILDREN(sc->ip_block_sysctlnodes[i]), OID_AUTO, + "last_time", CTLFLAG_RD, &m->ip_block_last_active_time[i], + 0, "How long the IP block was active for during the last" + " sleep (us)"); +#ifdef IP_BLOCK_TOTAL_ACTIVE_TIME + SYSCTL_ADD_U64(sc->sysctlctx, + SYSCTL_CHILDREN(sc->ip_block_sysctlnodes[i]), OID_AUTO, + "total_time", CTLFLAG_RD, &m->ip_block_total_active_time[i], + 0, "How long the IP block was active for during sleep in" + " total (us)"); +#endif + } + return (0); +} + +static int +amdsmu_init_metrics(device_t dev) +{ + struct amdsmu_softc *sc = device_get_softc(dev); + int err; + uint32_t metrics_addr_lo, metrics_addr_hi; + uint64_t metrics_addr; + + /* Get physical address of logging buffer. */ + err = amdsmu_cmd(dev, SMU_MSG_LOG_GETDRAM_ADDR_LO, 0, &metrics_addr_lo); + if (err != 0) + return (err); + err = amdsmu_cmd(dev, SMU_MSG_LOG_GETDRAM_ADDR_HI, 0, &metrics_addr_hi); + if (err != 0) + return (err); + metrics_addr = ((uint64_t) metrics_addr_hi << 32) | metrics_addr_lo; + + /* Map memory of logging buffer. */ + err = bus_space_map(sc->bus_tag, metrics_addr, + sizeof(struct amdsmu_metrics), 0, &sc->metrics_space); + if (err != 0) { + device_printf(dev, "could not map bus space for SMU metrics\n"); + return (err); + } + + /* Start logging for metrics. */ + amdsmu_cmd(dev, SMU_MSG_LOG_RESET, 0, NULL); + amdsmu_cmd(dev, SMU_MSG_LOG_START, 0, NULL); + return (0); +} + +static int +amdsmu_dump_metrics(device_t dev) +{ + struct amdsmu_softc *sc = device_get_softc(dev); + int err; + + err = amdsmu_cmd(dev, SMU_MSG_LOG_DUMP_DATA, 0, NULL); + if (err != 0) { + device_printf(dev, "failed to dump metrics\n"); + return (err); + } + bus_space_read_region_4(sc->bus_tag, sc->metrics_space, 0, + (uint32_t *)&sc->metrics, sizeof(sc->metrics) / sizeof(uint32_t)); + + return (0); } static int amdsmu_attach(device_t dev) { struct amdsmu_softc *sc = device_get_softc(dev); + int err; uint32_t physbase_addr_lo, physbase_addr_hi; uint64_t physbase_addr; int rid = 0; + struct sysctl_oid *node; /* * Find physical base address for SMU. @@ -172,19 +316,105 @@ amdsmu_attach(device_t dev) if (bus_space_map(sc->bus_tag, physbase_addr, SMU_MEM_SIZE, 0, &sc->smu_space) != 0) { device_printf(dev, "could not map bus space for SMU\n"); - bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->res); - return (ENXIO); + err = ENXIO; + goto err_smu_space; } if (bus_space_map(sc->bus_tag, physbase_addr + SMU_REG_SPACE_OFF, SMU_MEM_SIZE, 0, &sc->reg_space) != 0) { device_printf(dev, "could not map bus space for SMU regs\n"); - bus_space_unmap(sc->bus_tag, sc->smu_space, SMU_MEM_SIZE); - bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->res); - return (ENXIO); + err = ENXIO; + goto err_reg_space; } - amdsmu_print_vers(dev); + /* sysctl stuff. */ + sc->sysctlctx = device_get_sysctl_ctx(dev); + sc->sysctlnode = device_get_sysctl_tree(dev); + + /* Get version & add sysctls. */ + if ((err = amdsmu_get_vers(dev)) != 0) + goto err_dump; + + SYSCTL_ADD_U8(sc->sysctlctx, SYSCTL_CHILDREN(sc->sysctlnode), OID_AUTO, + "program", CTLFLAG_RD, &sc->smu_program, 0, "SMU program number"); + SYSCTL_ADD_U8(sc->sysctlctx, SYSCTL_CHILDREN(sc->sysctlnode), OID_AUTO, + "version_major", CTLFLAG_RD, &sc->smu_maj, 0, + "SMU firmware major version number"); + SYSCTL_ADD_U8(sc->sysctlctx, SYSCTL_CHILDREN(sc->sysctlnode), OID_AUTO, + "version_minor", CTLFLAG_RD, &sc->smu_min, 0, + "SMU firmware minor version number"); + SYSCTL_ADD_U8(sc->sysctlctx, SYSCTL_CHILDREN(sc->sysctlnode), OID_AUTO, + "version_revision", CTLFLAG_RD, &sc->smu_rev, 0, + "SMU firmware revision number"); + + /* Set up for getting metrics & add sysctls. */ + if ((err = amdsmu_init_metrics(dev)) != 0) + goto err_dump; + if ((err = amdsmu_dump_metrics(dev)) != 0) + goto err_dump; + + node = SYSCTL_ADD_NODE(sc->sysctlctx, SYSCTL_CHILDREN(sc->sysctlnode), + OID_AUTO, "metrics", CTLFLAG_RD, NULL, "SMU metrics"); + if (node == NULL) { + device_printf(dev, "could not add sysctl node for metrics\n"); + err = ENOMEM; + goto err_dump; + } + + SYSCTL_ADD_U32(sc->sysctlctx, SYSCTL_CHILDREN(node), OID_AUTO, + "table_version", CTLFLAG_RD, &sc->metrics.table_version, 0, + "SMU metrics table version"); + SYSCTL_ADD_U32(sc->sysctlctx, SYSCTL_CHILDREN(node), OID_AUTO, + "hint_count", CTLFLAG_RD, &sc->metrics.hint_count, 0, + "How many times the sleep hint was set"); + SYSCTL_ADD_U32(sc->sysctlctx, SYSCTL_CHILDREN(node), OID_AUTO, + "s0i3_last_entry_status", CTLFLAG_RD, + &sc->metrics.s0i3_last_entry_status, 0, + "1 if last S0i3 entry was successful"); + SYSCTL_ADD_U32(sc->sysctlctx, SYSCTL_CHILDREN(node), OID_AUTO, + "time_last_in_s0i2", CTLFLAG_RD, &sc->metrics.time_last_in_s0i2, 0, + "Time spent in S0i2 during last sleep (us)"); + SYSCTL_ADD_U64(sc->sysctlctx, SYSCTL_CHILDREN(node), OID_AUTO, + "time_last_entering_s0i3", CTLFLAG_RD, + &sc->metrics.time_last_entering_s0i3, 0, + "Time spent entering S0i3 during last sleep (us)"); + SYSCTL_ADD_U64(sc->sysctlctx, SYSCTL_CHILDREN(node), OID_AUTO, + "total_time_entering_s0i3", CTLFLAG_RD, + &sc->metrics.total_time_entering_s0i3, 0, + "Total time spent entering S0i3 (us)"); + SYSCTL_ADD_U64(sc->sysctlctx, SYSCTL_CHILDREN(node), OID_AUTO, + "time_last_resuming", CTLFLAG_RD, &sc->metrics.time_last_resuming, + 0, "Time spent resuming from last sleep (us)"); + SYSCTL_ADD_U64(sc->sysctlctx, SYSCTL_CHILDREN(node), OID_AUTO, + "total_time_resuming", CTLFLAG_RD, &sc->metrics.total_time_resuming, + 0, "Total time spent resuming from sleep (us)"); + SYSCTL_ADD_U64(sc->sysctlctx, SYSCTL_CHILDREN(node), OID_AUTO, + "time_last_in_s0i3", CTLFLAG_RD, &sc->metrics.time_last_in_s0i3, 0, + "Time spent in S0i3 during last sleep (us)"); + SYSCTL_ADD_U64(sc->sysctlctx, SYSCTL_CHILDREN(node), OID_AUTO, + "total_time_in_s0i3", CTLFLAG_RD, &sc->metrics.total_time_in_s0i3, + 0, "Total time spent in S0i3 (us)"); + SYSCTL_ADD_U64(sc->sysctlctx, SYSCTL_CHILDREN(node), OID_AUTO, + "time_last_in_sw_drips", CTLFLAG_RD, + &sc->metrics.time_last_in_sw_drips, 0, + "Time spent in awake during last sleep (us)"); + SYSCTL_ADD_U64(sc->sysctlctx, SYSCTL_CHILDREN(node), OID_AUTO, + "total_time_in_sw_drips", CTLFLAG_RD, + &sc->metrics.total_time_in_sw_drips, 0, + "Total time spent awake (us)"); + + /* Get IP blocks & add sysctls. */ + err = amdsmu_get_ip_blocks(dev); + if (err != 0) + goto err_dump; + return (0); +err_dump: + bus_space_unmap(sc->bus_tag, sc->reg_space, SMU_MEM_SIZE); +err_reg_space: + bus_space_unmap(sc->bus_tag, sc->smu_space, SMU_MEM_SIZE); +err_smu_space: + bus_release_resource(dev, SYS_RES_MEMORY, rid, sc->res); + return (err); } static int diff --git a/sys/dev/amdsmu/amdsmu.h b/sys/dev/amdsmu/amdsmu.h index 5e76c8e93062..0ec15d003984 100644 --- a/sys/dev/amdsmu/amdsmu.h +++ b/sys/dev/amdsmu/amdsmu.h @@ -9,7 +9,9 @@ #ifndef _AMDSMU_H_ #define _AMDSMU_H_ -#include +#include +#include +#include #include #include @@ -27,12 +29,54 @@ static const struct amdsmu_product { { CPU_VENDOR_AMD, PCI_DEVICEID_AMD_STRIX_POINT_ROOT }, }; +static const char *const amdsmu_ip_blocks_names[] = { + "DISPLAY", + "CPU", + "GFX", + "VDD", + "ACP", + "VCN", + "ISP", + "NBIO", + "DF", + "USB3_0", + "USB3_1", + "LAPIC", + "USB3_2", + "USB3_3", + "USB3_4", + "USB4_0", + "USB4_1", + "MPM", + "JPEG", + "IPU", + "UMSCH", + "VPE", +}; + +CTASSERT(nitems(amdsmu_ip_blocks_names) <= 32); + struct amdsmu_softc { + struct sysctl_ctx_list *sysctlctx; + struct sysctl_oid *sysctlnode; + struct resource *res; bus_space_tag_t bus_tag; bus_space_handle_t smu_space; bus_space_handle_t reg_space; + + uint8_t smu_program; + uint8_t smu_maj, smu_min, smu_rev; + + uint32_t active_ip_blocks; + struct sysctl_oid *ip_blocks_sysctlnode; + size_t ip_block_count; + struct sysctl_oid *ip_block_sysctlnodes[nitems(amdsmu_ip_blocks_names)]; + bool ip_blocks_active[nitems(amdsmu_ip_blocks_names)]; + + bus_space_handle_t metrics_space; + struct amdsmu_metrics metrics; }; static inline uint32_t diff --git a/sys/dev/amdsmu/amdsmu_reg.h b/sys/dev/amdsmu/amdsmu_reg.h index 5e73cea19028..721c5ac17bd3 100644 --- a/sys/dev/amdsmu/amdsmu_reg.h +++ b/sys/dev/amdsmu/amdsmu_reg.h @@ -9,6 +9,8 @@ #ifndef _AMDSMU_REG_H_ #define _AMDSMU_REG_H_ +#include + /* * TODO These are in common with amdtemp; should we find a way to factor these * out? Also, there are way more of these. I couldn't find a centralized place @@ -50,4 +52,32 @@ enum amdsmu_msg { SMU_MSG_GET_SUP_CONSTRAINTS = 0x09, }; +/* XXX Copied from Linux struct smu_metrics. */ +struct amdsmu_metrics { + uint32_t table_version; + uint32_t hint_count; + uint32_t s0i3_last_entry_status; + uint32_t time_last_in_s0i2; + uint64_t time_last_entering_s0i3; + uint64_t total_time_entering_s0i3; + uint64_t time_last_resuming; + uint64_t total_time_resuming; + uint64_t time_last_in_s0i3; + uint64_t total_time_in_s0i3; + uint64_t time_last_in_sw_drips; + uint64_t total_time_in_sw_drips; + /* + * This is how long each IP block was active for (us), i.e., blocking + * entry to S0i3. In Linux, these are called "timecondition_notmet_*". + * + * XXX Total active time for IP blocks seems to be buggy and reporting + * garbage (at least on Phoenix), so it's disabled for now. The last + * active time for the USB4_0 IP block also seems to be buggy. + */ + uint64_t ip_block_last_active_time[32]; +#ifdef IP_BLOCK_TOTAL_ACTIVE_TIME + uint64_t ip_block_total_active_time[32]; +#endif +} __attribute__((packed)); + #endif /* _AMDSMU_REG_H_ */ From nobody Sat Jul 26 22:43:48 2025 X-Original-To: dev-commits-src-all@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 4bqKXh5TbVz62q0x; Sat, 26 Jul 2025 22:43: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqKXh4sc1z46k7; Sat, 26 Jul 2025 22:43:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753569828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rLRqpl9C7hgOmfZjCTjJDtQGpTjLxFklptBc0Ii8egY=; b=ndKmMZpAF41lc4sX2SXfWFFjgr2B95lkNAc1wQsd1mXSETklpuZQQAvSckLHGfEClQ6HFP gtSfIvRyBgZMboSi3hiV3U9x5/vj3ADKe//XyZqkccQkpG11fZdWB0G8zmUggkegqa0424 p3VAyIN2Kpj+3fnT6n/w5T+tHJvtYRbrrgZ6GJc6f3NWGWTs0eeBfpbLEt7M4SArkiopGd 5ORC8OcA/Qdw/m9mugSN/n21QoC4UJUnGPlP0CCmw0dFaGBqxhHrao8vOBeDpkspmowHlY OrwYs0A36f3GwyvV7LsetxJswh8bAjXA27s/9Z9PkikPzENYGIAhsx6tENjtEw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753569828; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rLRqpl9C7hgOmfZjCTjJDtQGpTjLxFklptBc0Ii8egY=; b=IlT92N8a/onCGxBDuHVObbDYDizOD4cciWiwC/8rVTqAt9bEC2vcQ62gZ5JvgvxHskJnF1 qJywUMW6W8C3BwgGO3HyAdiAwIDC9zvGTBRN4UuxWNoOTNgCC/JWNvW+0Taj/e9nSlh9Am qWQujc6okz4cVq71WMzpMxQxeaSWhgLApetA4nk2/kujec5pTy6RGcGjpMN1D9yzcicmzy n4dM/9dDs0c1BU4car54V3dx307mjEgEaBXkjJsZp1F/HkRWjy1dNahoLcgxjbYIL88CAY FhHe7Ks82KKSneK/Gcy9KulRExotuuMWytDQ8lCBzwdTQHJ3Ca2/uZE5zIecsw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753569828; a=rsa-sha256; cv=none; b=DEfwaxZ0hQXP+AujKvqv1TIw4O3JEWVTxci1KQMUueSHAGBcDm9L2CRVpZNFM2kb51Snv1 a8w5lxzU7amiQ5484X6nyM9Llf39T/qDjRHp9ct2jyRqgp/+hFuX52KBX6czSaEoR8/Gk/ f1Wg0Aiy0ZANeGIWMv+UEtgKiTkbz3FlPdyaA2nzRNlZhlBL991W9GDt7CuXzKCRoWgzF5 gCNF/L+vCfwWgIvonL8aBQJpimSUIYMkal79z3d38DAy83JF8GaoXLYGv12ek2mVkUDloI bzbHHIQHRbSRjqiimXqvqi6Bl9TVW0f6vk1BHis3u2zSnI5XK8Ln5obcYX9EAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqKXh4NHkzq92; Sat, 26 Jul 2025 22:43:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QMhmou002032; Sat, 26 Jul 2025 22:43:48 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QMhmuI002029; Sat, 26 Jul 2025 22:43:48 GMT (envelope-from git) Date: Sat, 26 Jul 2025 22:43:48 GMT Message-Id: <202507262243.56QMhmuI002029@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Romain =?utf-8?Q?Tarti=C3=A8re?= Subject: git: 202f8bde836d - main - vm_page: Fix loading bad memory addresses from file List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: romain X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 202f8bde836dc86627be2b5b98174d9a0fb2eaba Auto-Submitted: auto-generated The branch main has been updated by romain: URL: https://cgit.FreeBSD.org/src/commit/?id=202f8bde836dc86627be2b5b98174d9a0fb2eaba commit 202f8bde836dc86627be2b5b98174d9a0fb2eaba Author: Romain Tartière AuthorDate: 2025-07-25 18:31:57 +0000 Commit: Romain Tartière CommitDate: 2025-07-26 22:43:27 +0000 vm_page: Fix loading bad memory addresses from file When loading bad memory addresses from a file, we are passed an end pointer that points on the first byte after the buffer. We want the buffer to be null-terminated (by changing the last byte to \0 if it is reasonable to do so), so adjust the end pointer to be on that byte. Approved by: kib, markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D51433 --- sys/vm/vm_page.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/vm/vm_page.c b/sys/vm/vm_page.c index bbae55895c2c..b239a6ffb4ce 100644 --- a/sys/vm/vm_page.c +++ b/sys/vm/vm_page.c @@ -396,7 +396,7 @@ vm_page_blacklist_load(char **list, char **end) } *list = ptr; if (ptr != NULL) - *end = ptr + len; + *end = ptr + len - 1; else *end = NULL; return; From nobody Sat Jul 26 22:51:54 2025 X-Original-To: dev-commits-src-all@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 4bqKk23XJ9z62qJ1; Sat, 26 Jul 2025 22:51:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqKk229kVz47NX; Sat, 26 Jul 2025 22:51:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753570314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xsMZoWF61bzRonGBKE8XqC+Os6ztZHh1I5GjExWsvwc=; b=Vlb4KNN6foZ/zo5DQ9i5TJAHjZ1lmkx+ZqKjVIYOjp49BuK+jzz4gqO69xAILoJEz4u58u /0nRa/lRk+3QALA/10q59V2fUpf6uSmG0uexEHER+v0ftAUvqOb7Ob36P9IEOCFynjgQYt Qy6jQBt5Dqn72Z6Yvp4MJj4Sg4jOIDDL5Qbg1sAVL9hSVnudQV3EKcx5OWo9Z/jX3xdTKT Lj/XEu+mHKnpQdSOasZC3IR58+Rh1qBJANvM+nEQ00MjVf75DL8DOsEHktYQK8SP/7YYUF Qd41VPiYItevrwwcBzsPPbXuC37bMbS+o56Rlf4EpHsbTOsTqFoRMT2uI03Ilw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753570314; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xsMZoWF61bzRonGBKE8XqC+Os6ztZHh1I5GjExWsvwc=; b=v9oLLq1R2c5u2RTk3iNsGHumn0eQRj6WZPGQD0+OfGiXZcTp1A97AI8b7YdBhDShEzm+xs RpbH/SpSxm23EkBkmKg1WZGTIlulRfSJ122ZTVBDPb3KyNc0Z3Due28XL7WfvwKkWKXXvT tuV78xKgWvQ1sp3N3IQhJapWtv2/TVBX64vxt/bYbHVZO9bt+nhekb2MJOvC0H5nhLAHxC gWS6QIsCyALGJOf0JW+plM2A80e+yv6dl8YN0lMXde3Nk/PRkNrLCEu4jlf+LTCytfhfAJ CdR0obQvXtxxQYV+g7NFuvk+Iwr2DrAI0k+4w3oIbgvVG1Mo2V4AQ4/HIx1Nlg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753570314; a=rsa-sha256; cv=none; b=vQJQBZkE3A4x+qtPNu+Qnr+eIQl/0EYNyFRB4IPqXbKPb38JkJprecaZ54ikHIL7PuhrbE w01Nac13ziI0nohC+kaBKwqMh0xCyA3rCtEBbbu1BPWGUKGVs8sJY6UPKEXJV0SpzJ5G9n ge/Mgk+Uc1KXPCpfqFkF8Y88sheyhlodMG8vS0Fnb7Ehe9DfndFn3U547WL3wSpd1VcuXd PmwB+np2N5Sjk4T87nAQJRl07+bBEIYuTrWe0Ne7QQPKnkosjS8Y4H/NWHmH4kR30Ie+IZ AfTnWSsHB/VHn9O82VnS22IRkSyYim6JCLJPCWvx4nkAIjUkSVC+4762utHuNg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqKk21lcRzq50; Sat, 26 Jul 2025 22:51:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QMpsYo019794; Sat, 26 Jul 2025 22:51:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QMpsY5019791; Sat, 26 Jul 2025 22:51:54 GMT (envelope-from git) Date: Sat, 26 Jul 2025 22:51:54 GMT Message-Id: <202507262251.56QMpsY5019791@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 7507d6ca0e75 - main - vmm: Clean up legacy create/destroy interface List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 7507d6ca0e754b2bb9354b54b3a20f73cfe1f06a Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=7507d6ca0e754b2bb9354b54b3a20f73cfe1f06a commit 7507d6ca0e754b2bb9354b54b3a20f73cfe1f06a Author: Ed Maste AuthorDate: 2025-07-26 22:51:06 +0000 Commit: Ed Maste CommitDate: 2025-07-26 22:51:37 +0000 vmm: Clean up legacy create/destroy interface Add sysctl descriptions, and remove surprising default text. PR: 288437 Reviewed by: jhb, markj Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51533 --- sys/dev/vmm/vmm_dev.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/dev/vmm/vmm_dev.c b/sys/dev/vmm/vmm_dev.c index 819debadd1ac..2e2ae0a162d8 100644 --- a/sys/dev/vmm/vmm_dev.c +++ b/sys/dev/vmm/vmm_dev.c @@ -820,7 +820,6 @@ sysctl_vmm_destroy(SYSCTL_HANDLER_ARGS) buflen = VM_MAX_NAMELEN + 1; buf = malloc(buflen, M_VMMDEV, M_WAITOK | M_ZERO); - strlcpy(buf, "beavis", buflen); error = sysctl_handle_string(oidp, buf, buflen, req); if (error == 0 && req->newptr != NULL) error = vmmdev_lookup_and_destroy(buf, req->td->td_ucred); @@ -830,7 +829,7 @@ sysctl_vmm_destroy(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_hw_vmm, OID_AUTO, destroy, CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, NULL, 0, sysctl_vmm_destroy, "A", - NULL); + "Destroy a vmm(4) instance (legacy interface)"); static struct cdevsw vmmdevsw = { .d_name = "vmmdev", @@ -909,7 +908,6 @@ sysctl_vmm_create(SYSCTL_HANDLER_ARGS) buflen = VM_MAX_NAMELEN + 1; buf = malloc(buflen, M_VMMDEV, M_WAITOK | M_ZERO); - strlcpy(buf, "beavis", buflen); error = sysctl_handle_string(oidp, buf, buflen, req); if (error == 0 && req->newptr != NULL) error = vmmdev_create(buf, req->td->td_ucred); @@ -919,7 +917,7 @@ sysctl_vmm_create(SYSCTL_HANDLER_ARGS) SYSCTL_PROC(_hw_vmm, OID_AUTO, create, CTLTYPE_STRING | CTLFLAG_RW | CTLFLAG_PRISON | CTLFLAG_MPSAFE, NULL, 0, sysctl_vmm_create, "A", - NULL); + "Create a vmm(4) instance (legacy interface)"); static int vmmctl_open(struct cdev *cdev, int flags, int fmt, struct thread *td) From nobody Sat Jul 26 23:11:11 2025 X-Original-To: dev-commits-src-all@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 4bqL8H6LDjz62rKB; Sat, 26 Jul 2025 23: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqL8H5VJSz3CMF; Sat, 26 Jul 2025 23: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=1753571471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uy+yC9NGN7Q7NrG/ESzq3zy181BjhDwltQnYpsbe0Kw=; b=h9issxu0FhcWx6wKvDZYHGbd8ka6Y7oeMC/0vGiItoGwT+QwDlpuU+gNAmhbk5LcVPHYe7 0CqPFZR4XnZ00OllZ1K5WNPxehgSLtSFMEKp9bwPVT47aCT8vWW/ccL2GIkX+TwWLHsDxA coZNtVfnyHooFu4uor5Oqhn6TO0tCK/DJhnT6Lih7Cn3YzsETlxQIdLEM3/VwKmIHo0fVe EC+I1nPz9TfDBau0iWaaI2SxjP4pAl5C/51wcX8XUyfs2DII+emb8lode4O1QYlMRbkM/x 4Zpbdx4n/dmFvN6n6+fiY4RWnqkbVPuU6SjXdgRo6WuGXtC9+G41cyi0PF+Qtw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753571471; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uy+yC9NGN7Q7NrG/ESzq3zy181BjhDwltQnYpsbe0Kw=; b=wttlI6oeOHuP/XwncBWJGq31EwgAv6F7pKPQ4hKwq3HJSlH95ue+1/4XD8zrYKz9vIwgPZ jOM8SbBlY999U0QXaj/DBC/Eek3syh5kQNLa45mOL2GF9ujbAaciNPm7bAHjSLXa8zK758 WmO21fXhcUITrHAfJwVQqifet3M42p8J39xnEK12/qS+lTMInc5yZc/YgftPxLjKRatwxo gP+sZEeCysqE4fEGpA8KOn7t2Ce0a1krUBb0tl8steN4qTfMQ8JjpUBeL4T9BjSke0glZb yXBNRLR18mK9d/ofcTW/Jayb5xG9PMpebeJVvEyx8CUAsD4GTmV7F27SdAC5rw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753571471; a=rsa-sha256; cv=none; b=heyD4JNQDImpVqHOtKiuitLZy0OrRfeMcV7tGzy/Zvvqcgx8uSxUgXrOZIqFW78IVJ0I0L BQc84dDBnyEaRcObXm9Ms7ylGRYevbnC8fg9NactOZwV98qcn9Z/we5eVWk8CLtial2xyn xtDoPTrssH4nOY2+mgmp4qE5BxX48kmoXJ3MnzDdD0YL48WfBZ3EYuWOsTmopVwnqwRGWV rnDg9OU2zYEuBKYDwsG8+QsspJMO+Vo71Zb3aVtCvFTpI/EzUJUsfFXeNU6Q+BnLddA1eT GIoDo6dZdMDtFe6jrVhKbHXY0g4H8ucVsj15w0qCTZamCcrJ+fxbqJr1+jU/hw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqL8H53mXzqnJ; Sat, 26 Jul 2025 23:11:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56QNBBbR052342; Sat, 26 Jul 2025 23:11:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56QNBB3g052339; Sat, 26 Jul 2025 23:11:11 GMT (envelope-from git) Date: Sat, 26 Jul 2025 23:11:11 GMT Message-Id: <202507262311.56QNBB3g052339@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Chuck Tuffli Subject: git: 92dfc3fbcd79 - main - bhyve: Report SVM as disabled on AMD List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: chuck X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 92dfc3fbcd79422a4586590edabe483f361b7e0e Auto-Submitted: auto-generated The branch main has been updated by chuck: URL: https://cgit.FreeBSD.org/src/commit/?id=92dfc3fbcd79422a4586590edabe483f361b7e0e commit 92dfc3fbcd79422a4586590edabe483f361b7e0e Author: Chuck Tuffli AuthorDate: 2025-07-26 22:09:59 +0000 Commit: Chuck Tuffli CommitDate: 2025-07-26 23:01:42 +0000 bhyve: Report SVM as disabled on AMD bhyve with a Windows 2025 guest will hang/freeze with the message rdmsr to register 0xc0010114 on a system with an AMD Ryzen 5. Evidently, recent versions of Windows ignore the CPUID bits and still read this MSR. Fix is to report Secure Virtual Machine (SVM) mode as disabled in the VM CR. PR: 288308 Reported by: demik+freebsd@lostwave.net Tested by: demik+freebsd@lostwave.net Obtained from: Illumos MFC after: 1 week Reviewed by: avg, markj, jhb Differential Revision: https://reviews.freebsd.org/D51480 --- usr.sbin/bhyve/amd64/xmsr.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/usr.sbin/bhyve/amd64/xmsr.c b/usr.sbin/bhyve/amd64/xmsr.c index cd80e4ef782e..7c174728f4fa 100644 --- a/usr.sbin/bhyve/amd64/xmsr.c +++ b/usr.sbin/bhyve/amd64/xmsr.c @@ -204,6 +204,15 @@ emulate_rdmsr(struct vcpu *vcpu __unused, uint32_t num, uint64_t *val) *val = 1; break; + case MSR_VM_CR: + /* + * We currently don't support nested virt. + * Windows seems to ignore the cpuid bits and reads this + * MSR anyways. + */ + *val = VM_CR_SVMDIS; + break; + default: error = -1; break; From nobody Sun Jul 27 08:21:44 2025 X-Original-To: dev-commits-src-all@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 4bqZMX6w4jz627Kr; Sun, 27 Jul 2025 08:21: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqZMX5cPGz3w6b; Sun, 27 Jul 2025 08:21:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753604504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o7WyYSiwy8q/P1M8aQG3YkzfxkLTWP/jhXLkfJqIusQ=; b=vgAOhu+Cbo0Cng+OyaV8EeDCJcdVMlvQX0trFA5skNxVeO2FKbqhDz1yh8UCVxGvAZhXmR ne3VfxpibSPrBq2Yb+tr0LgCfNt0B4Yerpor1qaDmraopzcZNB03k7OKa49r9TNcAuYxhY kDmowTZ2iThWXcU27pOGrwDv9nmmd3LUUI61gJ2i1pXWIgh+/8rHY7mlUUYTu0PW7rROQd AS/Adxg2UNovTizXzZYYOQdjZyz+2KPbFb1vOh7zFvEu4Q1O9lfM1r3QbcQ39O0ee9swm8 kV2mHhGRN2cD60ptKDW3iZ7cva9Sdun+aYjVufjhqDhKkKuc6fUHmwiQUTm2Ew== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753604504; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o7WyYSiwy8q/P1M8aQG3YkzfxkLTWP/jhXLkfJqIusQ=; b=hiM6P9rtEbu/39YXlPKFDtBTATHxVZmTFXbbrOVn2dLEbPBzF8lrBz8Zx8SjiJzpNLDeqR KzdTB+dn2WEiTMXgkhwLu1yt7Wc39hA3ff4sE26ZWqhINz6zEn/rXqeys4m3JkcKnlcjio GAsH9gJSTx90vceYEl5DwZGyTWIJYan4lP5H9+0p7p/XqAqJvfAPbJdqUSJr2FkoBsmHZV A2DfINA6LNmQ5sd8KPttzZSipd9Lo3y0KofQpJsZXMkwgNKXNe5fShfH1m56S61tWfdMl9 7sXHSn9TX5XOOKQy4H3Qu4QuCjlj9ve4U/ljQOyXklotRvcvxEm7bpnNykRCcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753604504; a=rsa-sha256; cv=none; b=MnQzhqy/DI0PMkPGifTXNJVKV4crCpMPwioCdKyu2VEu/Y2moZv+G+1qO+nIJ2CgX1fd4P K0esCYmhvr1NhqiZiWPVn6ZGTiiEeLDDQ49sI8e+kps0BHFtLgdZBVhglFglqoffHWeuRr Sg6CRkweYu46ujze/gY0TXLi0jN1Ifti2A7WkBvy0/Ox74PsOx6XwxZgAr6JOjboe5id7K pm8vb6xu8tjZ7IILfziTk2Ckh2I7Kko9ALaLY7uqxbeLosehvznbNf4Pi47t4vMDL+WO3+ mxOY5NPC3wQVs98U0iZk948C6ZAMNTeCvSa1dt776fxnO2L4jXwpKPJ5eRoyEQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqZMX4xyCz16rr; Sun, 27 Jul 2025 08:21:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56R8LiOS091973; Sun, 27 Jul 2025 08:21:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56R8LiUL091970; Sun, 27 Jul 2025 08:21:44 GMT (envelope-from git) Date: Sun, 27 Jul 2025 08:21:44 GMT Message-Id: <202507270821.56R8LiUL091970@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kevin Bowling Subject: git: 9b3055d0d4bc - main - src.opts.mk: Default LLVM_ASSERTIONS off List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kbowling X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9b3055d0d4bcbe665d3c622c761adcc7d0a5b1c9 Auto-Submitted: auto-generated The branch main has been updated by kbowling: URL: https://cgit.FreeBSD.org/src/commit/?id=9b3055d0d4bcbe665d3c622c761adcc7d0a5b1c9 commit 9b3055d0d4bcbe665d3c622c761adcc7d0a5b1c9 Author: Kevin Bowling AuthorDate: 2025-07-27 08:00:39 +0000 Commit: Kevin Bowling CommitDate: 2025-07-27 08:00:39 +0000 src.opts.mk: Default LLVM_ASSERTIONS off This noticeably slows down the compiler execution and with the move to pkgbase is one of the remaining differences that cannot be administratively controlled; pkg kernels and malloc.conf(5) will allow quickly testing a snapshot in a configuration closer to stable and release branches. dim@ notes that you need to set WITH_LLVM_ASSERTIONS in src.conf(5) if you want to report an issue with LLVM. Enabling WITH_LLVM_ASSERTIONS is also a consideration for CI and pkg builders especially tracking main. Approved by: dim, kevans Differential Revision: https://reviews.freebsd.org/D50388 --- UPDATING | 5 +++++ share/man/man5/src.conf.5 | 7 ++++--- share/mk/src.opts.mk | 2 +- tools/build/options/WITH_LLVM_ASSERTIONS | 1 + 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/UPDATING b/UPDATING index 8360ab14ada0..611bb62eefcc 100644 --- a/UPDATING +++ b/UPDATING @@ -27,6 +27,11 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 15.x IS SLOW: world, or to merely disable the most expensive debugging functionality at runtime, run "ln -s 'abort:false,junk:false' /etc/malloc.conf".) +20250727: + LLVM's debugging assertions are now disabled in main by default. + The WITH_LLVM_ASSERTIONS src.conf(5) knob should be used to + enable it when working on LLVM or requesting help with it. + 20250726: amd64 kernel configurations must contain "options SMP". diff --git a/share/man/man5/src.conf.5 b/share/man/man5/src.conf.5 index a3db00aed42f..f93d3f9fc69f 100644 --- a/share/man/man5/src.conf.5 +++ b/share/man/man5/src.conf.5 @@ -1,5 +1,5 @@ .\" DO NOT EDIT-- this file is @generated by tools/build/options/makeman. -.Dd July 14, 2025 +.Dd July 27, 2025 .Dt SRC.CONF 5 .Os .Sh NAME @@ -940,8 +940,9 @@ amd64/amd64, arm64/aarch64, i386/i386, powerpc/powerpc64 and powerpc/powerpc64le Do not build the LLD linker during the bootstrap phase of the build. To be able to build the system an alternate linker must be provided via XLD. -.It Va WITHOUT_LLVM_ASSERTIONS -Disable debugging assertions in LLVM. +.It Va WITH_LLVM_ASSERTIONS +Enable debugging assertions in LLVM. +Use when working on or requesting help with LLVM components. .It Va WITHOUT_LLVM_BINUTILS Install ELF Tool Chain's binary utilities instead of LLVM's. This includes diff --git a/share/mk/src.opts.mk b/share/mk/src.opts.mk index ef43d3c939b2..77923ae7b6d1 100644 --- a/share/mk/src.opts.mk +++ b/share/mk/src.opts.mk @@ -123,7 +123,6 @@ __DEFAULT_YES_OPTIONS = \ LEGACY_CONSOLE \ LLD \ LLD_BOOTSTRAP \ - LLVM_ASSERTIONS \ LLVM_BINUTILS \ LLVM_COV \ LLVM_CXXFILT \ @@ -210,6 +209,7 @@ __DEFAULT_NO_OPTIONS = \ HESIOD \ LOADER_VERBOSE \ LOADER_VERIEXEC_PASS_MANIFEST \ + LLVM_ASSERTIONS \ LLVM_FULL_DEBUGINFO \ MALLOC_PRODUCTION \ OFED_EXTRA \ diff --git a/tools/build/options/WITH_LLVM_ASSERTIONS b/tools/build/options/WITH_LLVM_ASSERTIONS index 0e7fbfbda0a3..6af75221a206 100644 --- a/tools/build/options/WITH_LLVM_ASSERTIONS +++ b/tools/build/options/WITH_LLVM_ASSERTIONS @@ -1 +1,2 @@ Enable debugging assertions in LLVM. +Use when working on or requesting help with LLVM components. From nobody Sun Jul 27 12:59:53 2025 X-Original-To: dev-commits-src-all@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 4bqhXV16K9z62Px4; Sun, 27 Jul 2025 12:59:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqhXV070nz3FfX; Sun, 27 Jul 2025 12:59:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753621194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=abS1eyby8nJmw16yalNQC9es3kLbgqdyYtClLLXcQxI=; b=HBQpTA7F7qxVM5zYRJSeaC4mWDBwqAl34vt1JcJvraLXAtnl4hDDtgJ5wGAshM616zt7c6 zTYwVIdq7WnCCGVGuGISBXjvXv1xjlCDddZFllCO5fVzmqjs0fl3Jog+U9Dfqr4q+By2Cd zkbn8ig4Kk+MjdLx3goLlTKJP8g8NnddSQ0PgrFnzL/TRu6VddQSlISjtqd/gBi1z7KaTm rqYs0+dY1djWZSt8Ql8KqceQD0/tzv5bhF0/KtwfYDAWWsodccdzkXpuM9p+DAlK603Vqs O8nrGsAR61S6zHXAAv2uEJ17SCwV8SHoNQvr+hJd7q+aLH4sunX1sgdiITdG4g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753621194; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=abS1eyby8nJmw16yalNQC9es3kLbgqdyYtClLLXcQxI=; b=BWk0JEcHSew6EnchyzJLVpZDoPfGttHyuGJDWzDimQU91xy5audGjn4rs+pC+ixoAJ4zKC vfdt0lFTqUbi5ZrUI6rvsHMg9LjuQNsVKEMM5H9uqZ+jWwJI1FBpaMDrL06fq+OrDCETiV /ZwXhfI3Z1BU7kFrPjnl2DSN7Bb/3FqPTFOelLGGKzrQm91aoi1fsGNgr3Llv8UCRXtZLw MRnTjTBEvugWIaC3eq4YvLSQO4gC8XyUwaMJFws1hqEGsRdqX9MrBNDMf9RGgPB+caOU8U qipHrLsvcNAfl6eFtxCUQN+CLH0oV/v7ruSeELs9IiwjtBck+drO1GWSHv8UxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753621194; a=rsa-sha256; cv=none; b=aSwIkmVPRfN/nspunTfolTypiPT/8LkHrQklhWlZKnBMxpKqNpFTdr51IjOK4tTpjwjc+i 7LgERtuEffyKabnKcuAIp6rpMYmegD5CWY/GpgZhn9+SCbBPTinQqJ0UAE9F72tmbuqqH5 PcL1YSmx/Z+dkpihvGzZe5fR4QgG5WM6wc2afJXaxjwmmPM9ukxrlRTOXqbDxDzchPAnYp JTZgfJmKEUSpp0EzqPNvA6yUz6mp01RL13KpnjVx+yRwzMAZZdbe4ltGdP2g1eyUpUp9Ui 4maR6Jc+eULnq+M6kitUp73M+l6FSHaF6u6GCtIUItenAJeJJfiz/oDW8a8MBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqhXT6q4xz1Fhc; Sun, 27 Jul 2025 12:59:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56RCxrFB003892; Sun, 27 Jul 2025 12:59:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56RCxrAQ003889; Sun, 27 Jul 2025 12:59:53 GMT (envelope-from git) Date: Sun, 27 Jul 2025 12:59:53 GMT Message-Id: <202507271259.56RCxrAQ003889@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: dd0ec030f8fd - main - krb5: Bump DSO version for version map creation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cy X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: dd0ec030f8fddfd109b860ae8df2b29fa0c60f23 Auto-Submitted: auto-generated The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=dd0ec030f8fddfd109b860ae8df2b29fa0c60f23 commit dd0ec030f8fddfd109b860ae8df2b29fa0c60f23 Author: Cy Schubert AuthorDate: 2025-07-25 11:43:25 +0000 Commit: Cy Schubert CommitDate: 2025-07-27 12:59:34 +0000 krb5: Bump DSO version for version map creation Differential Revision: https://reviews.freebsd.org/D51520 --- ObsoleteFiles.inc | 26 +++++++++++++++++ krb5/lib/Makefile.inc | 2 +- krb5/plugins/Makefile.inc | 2 +- krb5/util/Makefile.inc | 2 +- sys/sys/param.h | 2 +- tools/build/mk/OptionalObsoleteFiles.inc | 48 ++++++++++++++++---------------- 6 files changed, 54 insertions(+), 28 deletions(-) diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc index 8fbba3964832..f1e230f91e95 100644 --- a/ObsoleteFiles.inc +++ b/ObsoleteFiles.inc @@ -51,6 +51,32 @@ # xargs -n1 | sort | uniq -d; # done +# 20250726: MIT KRB5 DSO bump +OLD_LIBS+=usr/lib/libcom_err.so.121 +OLD_LIBS+=usr/lib/libgssapi_krb5.so.121 +OLD_LIBS+=usr/lib/libgssrpc.so.121 +OLD_LIBS+=usr/lib/libk5crypto.so.121 +OLD_LIBS+=usr/lib/libkadm5clnt_mit.so.121 +OLD_LIBS+=usr/lib/libkadm5srv_mit.so.121 +OLD_LIBS+=usr/lib/libkdb5.so.121 +OLD_LIBS+=usr/lib/libkrad.so.121 +OLD_LIBS+=usr/lib/libkrb5.so.121 +OLD_LIBS+=usr/lib/libkrb5profile.so.121 +OLD_LIBS+=usr/lib/libkrb5support.so.121 +OLD_LIBS+=usr/lib/libverto.so.121 +OLD_LIBS+=usr/lib/libcom_err.so.121 +OLD_LIBS+=usr/lib/libgssapi_krb5.so.121 +OLD_LIBS+=usr/lib/libgssrpc.so.121 +OLD_LIBS+=usr/lib/libk5crypto.so.121 +OLD_LIBS+=usr/lib/libkadm5clnt_mit.so.121 +OLD_LIBS+=usr/lib/libkadm5srv_mit.so.121 +OLD_LIBS+=usr/lib/libkdb5.so.121 +OLD_LIBS+=usr/lib/libkrad.so.121 +OLD_LIBS+=usr/lib/libkrb5.so.121 +OLD_LIBS+=usr/lib/libkrb5profile.so.121 +OLD_LIBS+=usr/lib/libkrb5support.so.121 +OLD_LIBS+=usr/lib/libverto.so.121 + # 20250726: xargs tests rewritten OLD_FILES+=usr/tests/usr.bin/xargs/legacy_test OLD_FILES+=usr/tests/usr.bin/xargs/regress.n2147483647.out diff --git a/krb5/lib/Makefile.inc b/krb5/lib/Makefile.inc index 6d86e7a35146..b6e5f6275039 100644 --- a/krb5/lib/Makefile.inc +++ b/krb5/lib/Makefile.inc @@ -15,4 +15,4 @@ KRB5_KRB5LIBDIR= ${KRB5_SRCLIBDIR}/krb5 KRB5_K5CRYPTODIR= ${KRB5_SRCLIBDIR}/crypto SHLIBDIR?= /usr/lib -SHLIB_MAJOR?= 121 +SHLIB_MAJOR?= 122 diff --git a/krb5/plugins/Makefile.inc b/krb5/plugins/Makefile.inc index e888f79acd49..d98ed1d3887b 100644 --- a/krb5/plugins/Makefile.inc +++ b/krb5/plugins/Makefile.inc @@ -12,6 +12,6 @@ MK_INSTALLLIB= no SHLIB_NAME?= ${LIB}.so.${SHLIB_MAJOR} PLUGINSDIR= ${LIBDIR_BASE}/krb5/plugins SHLIBDIR= ${LIBDIR} -SHLIB_MAJOR= 121 +SHLIB_MAJOR= 122 .include "../Makefile.inc" diff --git a/krb5/util/Makefile.inc b/krb5/util/Makefile.inc index 858c1eb48dd9..95b93a793d77 100644 --- a/krb5/util/Makefile.inc +++ b/krb5/util/Makefile.inc @@ -10,4 +10,4 @@ .include "../Makefile.inc" SHLIBDIR?= /usr/lib -SHLIB_MAJOR?= 121 +SHLIB_MAJOR?= 122 diff --git a/sys/sys/param.h b/sys/sys/param.h index f941f021a423..33d61e8a1619 100644 --- a/sys/sys/param.h +++ b/sys/sys/param.h @@ -74,7 +74,7 @@ * cannot include sys/param.h and should only be updated here. */ #undef __FreeBSD_version -#define __FreeBSD_version 1500054 +#define __FreeBSD_version 1500055 /* * __FreeBSD_kernel__ indicates that this system uses the kernel of FreeBSD, diff --git a/tools/build/mk/OptionalObsoleteFiles.inc b/tools/build/mk/OptionalObsoleteFiles.inc index f7eb1e979d07..da7f57eec2d5 100644 --- a/tools/build/mk/OptionalObsoleteFiles.inc +++ b/tools/build/mk/OptionalObsoleteFiles.inc @@ -3713,33 +3713,33 @@ OLD_FILES+=usr/lib/krb5/plugins/preauth/test.so OLD_FILES+=usr/lib/krb5/plugins/tls/k5tls.so OLD_FILES+=usr/lib/libcom_err.a OLD_LIBS+=usr/lib/libcom_err.so -OLD_LIBS+=usr/lib/libcom_err.so.121 +OLD_LIBS+=usr/lib/libcom_err.so.122 OLD_FILES+=usr/lib/libgssapi_krb5.so -OLD_LIBS+=usr/lib/libgssapi_krb5.so.121 +OLD_LIBS+=usr/lib/libgssapi_krb5.so.122 OLD_FILES+=usr/lib/libgssrpc.so -OLD_LIBS+=usr/lib/libgssrpc.so.121 +OLD_LIBS+=usr/lib/libgssrpc.so.122 OLD_FILES+=usr/lib/libk5crypto.so -OLD_LIBS+=usr/lib/libk5crypto.so.121 +OLD_LIBS+=usr/lib/libk5crypto.so.122 OLD_FILES+=usr/lib/libkadm5clnt.so OLD_FILES+=usr/lib/libkadm5clnt_mit.so -OLD_LIBS+=usr/lib/libkadm5clnt_mit.so.121 +OLD_LIBS+=usr/lib/libkadm5clnt_mit.so.122 OLD_FILES+=usr/lib/libkadm5srv.so OLD_FILES+=usr/lib/libkadm5srv_mit.so -OLD_LIBS+=usr/lib/libkadm5srv_mit.so.121 +OLD_LIBS+=usr/lib/libkadm5srv_mit.so.122 OLD_FILES+=usr/lib/libkdb5.so -OLD_LIBS+=usr/lib/libkdb5.so.121 +OLD_LIBS+=usr/lib/libkdb5.so.122 OLD_FILES+=usr/lib/libkrad.so -OLD_LIBS+=usr/lib/libkrad.so.121 +OLD_LIBS+=usr/lib/libkrad.so.122 OLD_FILES+=usr/lib/libkrb5.so -OLD_LIBS+=usr/lib/libkrb5.so.121 +OLD_LIBS+=usr/lib/libkrb5.so.122 OLD_FILES+=usr/lib/libkrb5profile.a OLD_FILES+=usr/lib/libkrb5profile.so -OLD_LIBS+=usr/lib/libkrb5profile.so.121 +OLD_LIBS+=usr/lib/libkrb5profile.so.122 OLD_FILES+=usr/lib/libkrb5support.a OLD_FILES+=usr/lib/libkrb5support.so -OLD_LIBS+=usr/lib/libkrb5support.so.121 +OLD_LIBS+=usr/lib/libkrb5support.so.122 OLD_FILES+=usr/lib/libverto.so -OLD_LIBS+=usr/lib/libverto.so.121 +OLD_LIBS+=usr/lib/libverto.so.122 OLD_FILES+=usr/libdata/pkgconfig/gssrpc.pc OLD_FILES+=usr/libdata/pkgconfig/kadm-client.pc OLD_FILES+=usr/libdata/pkgconfig/kadm-server.pc @@ -5770,36 +5770,36 @@ OLD_FILES+=usr/lib/krb5/plugins/preauth/pkinit.so OLD_FILES+=usr/lib/krb5/plugins/preauth/spake.so OLD_FILES+=usr/lib/krb5/plugins/preauth/test.so OLD_FILES+=usr/lib/krb5/plugins/tls/k5tls.so -OLD_LIBS+=usr/lib/libcom_err.so.121 -OLD_LIBS+=usr/lib/libgssapi_krb5.so.121 +OLD_LIBS+=usr/lib/libcom_err.so.122 +OLD_LIBS+=usr/lib/libgssapi_krb5.so.122 OLD_FILES+=usr/lib/libgssrpc.a OLD_FILES+=usr/lib/libgssrpc.so -OLD_LIBS+=usr/lib/libgssrpc.so.121 +OLD_LIBS+=usr/lib/libgssrpc.so.122 OLD_FILES+=usr/lib/libk5crypto.a OLD_FILES+=usr/lib/libk5crypto.so -OLD_LIBS+=usr/lib/libk5crypto.so.121 +OLD_LIBS+=usr/lib/libk5crypto.so.122 OLD_FILES+=usr/lib/libkadm5clnt_mit.a OLD_FILES+=usr/lib/libkadm5clnt_mit.so -OLD_LIBS+=usr/lib/libkadm5clnt_mit.so.121 +OLD_LIBS+=usr/lib/libkadm5clnt_mit.so.122 OLD_FILES+=usr/lib/libkadm5srv_mit.a OLD_FILES+=usr/lib/libkadm5srv_mit.so -OLD_LIBS+=usr/lib/libkadm5srv_mit.so.121 +OLD_LIBS+=usr/lib/libkadm5srv_mit.so.122 OLD_FILES+=usr/lib/libkdb5.a OLD_FILES+=usr/lib/libkdb5.so -OLD_LIBS+=usr/lib/libkdb5.so.121 +OLD_LIBS+=usr/lib/libkdb5.so.122 OLD_FILES+=usr/lib/libkrad.so OLD_FILES+=usr/lib/libkrad.a -OLD_LIBS+=usr/lib/libkrad.so.121 -OLD_LIBS+=usr/lib/libkrb5.so.121 +OLD_LIBS+=usr/lib/libkrad.so.122 +OLD_LIBS+=usr/lib/libkrb5.so.122 OLD_FILES+=usr/lib/libkrb5profile.a OLD_FILES+=usr/lib/libkrb5profile.so -OLD_LIBS+=usr/lib/libkrb5profile.so.121 +OLD_LIBS+=usr/lib/libkrb5profile.so.122 OLD_FILES+=usr/lib/libkrb5support.a OLD_FILES+=usr/lib/libkrb5support.so -OLD_LIBS+=usr/lib/libkrb5support.so.121 +OLD_LIBS+=usr/lib/libkrb5support.so.122 OLD_FILES+=usr/lib/libverto.a OLD_FILES+=usr/lib/libverto.so -OLD_LIBS+=usr/lib/libverto.so.121 +OLD_LIBS+=usr/lib/libverto.so.122 OLD_FILES+=usr/libdata/pkgconfig/gssrpc.pc OLD_FILES+=usr/libdata/pkgconfig/kadm-client.pc OLD_FILES+=usr/libdata/pkgconfig/kadm-server.pc From nobody Sun Jul 27 13:07:50 2025 X-Original-To: dev-commits-src-all@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 4bqhjf3tTLz62QVm; Sun, 27 Jul 2025 13: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqhjf38Yfz3GcT; Sun, 27 Jul 2025 13: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=1753621670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qB094kgCNNX0iQA7mXuIthd1hGcHyziYsbpjopN+dD0=; b=k9D83ILoCDm9lCTZ9fuhi5hy8M0OLSneFo21PfDyO+i8wfNoLo30LR9MO0MNMNkOeC0tte fxL5JAq84rXV+5iVV3aLWjIK7iVfBdSeupyzYkOquHjBUiBU0hEPeuHX/Ar4PVk7AhKlKT WHA9IT7E/1EFs48aLEdOoqDLH1VJbAfVYle6Ao29KoUwvx4zgsBcSzEb5BD/lpirBNHYFD Hh2iGkSkmlAXLrm9rEB5x4eKxvKV4naILf+A8V5Wixg3ZkH1IxLmdkQJespdE5VQFY/2BL wcjD3vK5zCdIY5ircqiChVuU+Kh4PDBq+PX7m1+aNnBqVNfWvXUriRQWWSxXSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753621670; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qB094kgCNNX0iQA7mXuIthd1hGcHyziYsbpjopN+dD0=; b=Hiocwc+it6OtpcfDjlPZOCfLvxxgNE/VlMpO60Thpg3AZt3TKp293HIzSYlBy3ixBHbGKc XdG9snj0T67ZJie4d0hROoiWRafV5Tt/bODDqiXuCSIOMNO3VXaUfjISNOmLOqKkpwC4wk 1jOmkp03eNjaxgV0lvOFjsx8F8Lj1mwzy44fVCw4UnwcZyfTpswmgQbFVXgMJxo5sUVpsg TcJX+JB/l/f22yoF+XAUcrtn/nGlAWvSRjTuSNV69R/T0yElWcdXpP2yMQmN7GTUj/8xD/ ysppGrZwyUP5l+x904jw5pWShWyN1IJeN55HrVy7Y/591dTRIekJsF08RmaxMg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753621670; a=rsa-sha256; cv=none; b=jcgAY+Zgf8r9lpLW8rSn9NOQt8sW+FSX+SSj4ZtukjzMbzCjLq4trUSLYzi73e/y10zzjY BaDVvyS/44Qu0FSm20ZLy6M/lUdT9bkLJcSgzYsqCfmelQKSw83eggfo8iuY5GPZirlJXp y3Q4V/zPPPJiqqjuTyu5wVrX9N5UDAKGNqvnCEnzo0bMXmz0CMiLDt6ywuFHk+ZeOcBdky EJJAkSoIcXYUrDWVSYkFTBNlLZN98QvwBCtaeBPUFSMhPL/79p5JIsfkco/fQNXc5FVcJA z8bFe72ersIGl90CqBvoaqY6JXXBQj9YD5agDn6Wmkqil+yqauFDLXp4O0/C7A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqhjf2ltNz1G67; Sun, 27 Jul 2025 13:07:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56RD7o0M023150; Sun, 27 Jul 2025 13:07:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56RD7oAk023147; Sun, 27 Jul 2025 13:07:50 GMT (envelope-from git) Date: Sun, 27 Jul 2025 13:07:50 GMT Message-Id: <202507271307.56RD7oAk023147@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Tuexen Subject: git: 438cbb622c22 - main - sctp: whitespace cleanup List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: tuexen X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 438cbb622c22c9cb7550cfdf1aa55b503688a0a5 Auto-Submitted: auto-generated The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=438cbb622c22c9cb7550cfdf1aa55b503688a0a5 commit 438cbb622c22c9cb7550cfdf1aa55b503688a0a5 Author: Michael Tuexen AuthorDate: 2025-07-27 10:49:45 +0000 Commit: Michael Tuexen CommitDate: 2025-07-27 10:49:45 +0000 sctp: whitespace cleanup MFC after: 1 week --- sys/netinet/sctp_timer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/netinet/sctp_timer.c b/sys/netinet/sctp_timer.c index 66af716eea52..7d8cb965ab09 100644 --- a/sys/netinet/sctp_timer.c +++ b/sys/netinet/sctp_timer.c @@ -35,7 +35,6 @@ #define _IP_VHL #include #include - #include #include #include From nobody Sun Jul 27 13:22:09 2025 X-Original-To: dev-commits-src-all@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 4bqj294G1Qz62Qjt; Sun, 27 Jul 2025 13:22: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqj291TG4z3HdT; Sun, 27 Jul 2025 13:22:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753622529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zJPjvmGuegVFybd8ogSaaZWi4UoTrEujUKQyspY1edk=; b=QqB4qyM/aWiZNTogqV7YBV0J+PPbonvDzEr8vcK6vYMzX4/+MZSsaLb+FKdsWNHVNtH5kA 2FzJ/OcuzBZPk/boqEhrtIf+/6mzfvFSsgwUi/HJplUASJc5XM9v546qXzTLXIJzsb1Jss ngQQ8D0/WmFwjDLyptXUNCeSyT2jj1CHa+6GriPZqEsJP9QkBZiPAvnqZvN+LrPRKZT0s0 PBS/OPmo0VzSI/kFd/Q3gwwJ0denNKK0+cu91GZJqdlMfSr+eoKn9jptCwmn4Ywag7OulZ O0Z7As02us/XoG7m7ncbPwDtTkaowKCLIcnEuwr4SwrJEgKTANYGjNTjZxQCyQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753622529; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zJPjvmGuegVFybd8ogSaaZWi4UoTrEujUKQyspY1edk=; b=BC3hkys7hO/H9xE0xnpQ5e1DK+IVEOHDB5GWxE34qXEqQoKWYDMImsGd5n5aNOJKofusEF UNQ62kWWK/8HsV8FinGZFUTwzDa1xdx7zH8TmB49dxnTiNT8FekavZNrkOsS3hk/i9akWe kGDMUJSfo00ePlpxoa7VgYKAO1mhXqjGkX3XHtXt5MdSzXKw8eg1uPSZyZRiuDTVd+5Kn+ Ky3WaYp/Yf0Fhe/aOjMIf0cAYJkBnSV5CXDzwn18iY0o8od7vDha3mlz7ufhat4PBbH6E4 1Uzq2NBNeyKMwLI7oK+vbfzjS5Tf7z3KV9DjQBNiyKoTaM1IxxAYSPN8Wm9TzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753622529; a=rsa-sha256; cv=none; b=N+Df37HEGLWaCy4Cm+1o78PmikL3kd83XqvpWyZbnqDZke78YaLGdvGT9yn3Gg9AXtf58n 16Wehy573F8n6AbqkaDVs9CAuAN8KjYEY0LGdoNiOegWQ2uyyN0T7rc+EmETmnyUyFqrdU B+8BKy+1WrYlV4EUd1j45pd+o4Yx0rqUv3aWLY+SK9K2fyLe9OwevV9jKENY7bv5V1kU03 LRpphIjXB6eHTrUfJnFC0F9CZN3ldDbUKYCEvgTbXWg/2VqeQnoYPkmjBJpPlnZhNFkZmk U5sJ08n+OUxH1xhlER3zDvEAngI+zkyZgJIhhsr0xyviS1GG5Aue24lJ+7ljhA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqj290yShz1GD3; Sun, 27 Jul 2025 13:22:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56RDM95t057531; Sun, 27 Jul 2025 13:22:09 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56RDM9JB057528; Sun, 27 Jul 2025 13:22:09 GMT (envelope-from git) Date: Sun, 27 Jul 2025 13:22:09 GMT Message-Id: <202507271322.56RDM9JB057528@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: f2de5a6dd7bb - main - amdsmu: Read and dump idlemask List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: obiwac X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f2de5a6dd7bb32f09d5ad290307c2533d3071fee Auto-Submitted: auto-generated The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=f2de5a6dd7bb32f09d5ad290307c2533d3071fee commit f2de5a6dd7bb32f09d5ad290307c2533d3071fee Author: Aymeric Wibo AuthorDate: 2025-06-19 04:17:09 +0000 Commit: Aymeric Wibo CommitDate: 2025-07-27 13:17:51 +0000 amdsmu: Read and dump idlemask Read and dump the SMU's idlemask value in `dev.amdsmu.0.idlemask` sysctl. The idlemask is used internally by AMD and its value is not documented anywhere. This patch exposes it mainly to help AMD diagnose issues with S0i3 entry on FreeBSD. Reviewed by: cem, emaste, kib, mckusick (mentor) Approved by: emaste, kib, mckusick (mentor) Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51487 --- sys/dev/amdsmu/amdsmu.c | 15 +++++++++++++++ sys/dev/amdsmu/amdsmu.h | 1 + sys/dev/amdsmu/amdsmu_reg.h | 1 + 3 files changed, 17 insertions(+) diff --git a/sys/dev/amdsmu/amdsmu.c b/sys/dev/amdsmu/amdsmu.c index d46b0fc4f5ec..416f875c6176 100644 --- a/sys/dev/amdsmu/amdsmu.c +++ b/sys/dev/amdsmu/amdsmu.c @@ -281,6 +281,14 @@ amdsmu_dump_metrics(device_t dev) return (0); } +static void +amdsmu_fetch_idlemask(device_t dev) +{ + struct amdsmu_softc *sc = device_get_softc(dev); + + sc->idlemask = amdsmu_read4(sc, SMU_REG_IDLEMASK); +} + static int amdsmu_attach(device_t dev) { @@ -407,6 +415,13 @@ amdsmu_attach(device_t dev) if (err != 0) goto err_dump; + /* Get idlemask & add sysctl. */ + amdsmu_fetch_idlemask(dev); + SYSCTL_ADD_U32(sc->sysctlctx, SYSCTL_CHILDREN(sc->sysctlnode), OID_AUTO, + "idlemask", CTLFLAG_RD, &sc->idlemask, 0, "SMU idlemask. This " + "value is not documented - only used to help AMD internally debug " + "issues"); + return (0); err_dump: bus_space_unmap(sc->bus_tag, sc->reg_space, SMU_MEM_SIZE); diff --git a/sys/dev/amdsmu/amdsmu.h b/sys/dev/amdsmu/amdsmu.h index 0ec15d003984..025887f7fe5a 100644 --- a/sys/dev/amdsmu/amdsmu.h +++ b/sys/dev/amdsmu/amdsmu.h @@ -77,6 +77,7 @@ struct amdsmu_softc { bus_space_handle_t metrics_space; struct amdsmu_metrics metrics; + uint32_t idlemask; }; static inline uint32_t diff --git a/sys/dev/amdsmu/amdsmu_reg.h b/sys/dev/amdsmu/amdsmu_reg.h index 721c5ac17bd3..e685b34e6883 100644 --- a/sys/dev/amdsmu/amdsmu_reg.h +++ b/sys/dev/amdsmu/amdsmu_reg.h @@ -32,6 +32,7 @@ #define SMU_REG_MESSAGE 0x538 #define SMU_REG_RESPONSE 0x980 #define SMU_REG_ARGUMENT 0x9BC +#define SMU_REG_IDLEMASK 0xD14 enum amdsmu_res { SMU_RES_WAIT = 0x00, From nobody Sun Jul 27 16:01:10 2025 X-Original-To: dev-commits-src-all@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 4bqmYg07hkz62qn9; Sun, 27 Jul 2025 16:01: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqmYf6KQJz3Wbb; Sun, 27 Jul 2025 16:01:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753632070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WmhmgmwiVZMVfUuNfsdIqS5rpj34FMmVKzrmb1M2BAw=; b=caKUNSiCz+I05hmOD1He2ByXOlm8T9khuNmMA0nU6CtGCpujBPBa+1KX+WZ5iDlDVt36fC cMXeamgPm9QT6TqHFUmPsYMIuhrbN8Sij8hS6mhxYIMYd9Z9Lkn3EKlc6XIBsEWrC2+tLe M6wHaaZM4kQQy7UUnrhSB5EAwOFr2AMc1agg/SiPwfhBoDDVQv8yZK3Wn9ib9/5yQqzGdx ApR1JcZ6r539QXu68fIMAnQ1Tzou4T9eFPk92/WUwYEDWXpBpcNZuXukrBi1VXntQYX6N9 uhIvIw+RMfM2ZBvy8u0lsWamqNrltJ26BkAXvl2olyxR4Vhar1qfR19at+RUwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753632070; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=WmhmgmwiVZMVfUuNfsdIqS5rpj34FMmVKzrmb1M2BAw=; b=c3+pZUuebR67hqNByahuKE6addlKGZk2IIf5NxohKjtgrhnC+wt7NxEZ2rP13cFKdBs9nl tljChZCsKjgxIyv92hFceQBZuWty/LFmSJBK6QoiIYxqA97lgTLzvhhucIS8fV6yOgBDfc On0NFsD+i6DOKjdgdjEqAWWYQKFyVa8FsKC33fg9kotnvITbwyMrMkbEbXQ2Lt8DljYpMn qiOp8jhp3Hk/f9RnODUK5vTPIxdt9anyRDAHPuKw0N54pSHNivLFAukjFLZTEwX/gqltWl rZnN6XT6GKOlZTozIhbhlGbSsY1m8y3wRh3MjJ3RocEvXb05hYJm1epuwLWwQQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753632070; a=rsa-sha256; cv=none; b=yRkCs9DPGdyH9LiKFJekYryT+N7FlR272jlqJWMN28DdTas7AeAK3wkcpIYmqgxgMmQZXk TUdPTXRoH+evM3RYhb5MWNT1IalP5R3rUde6linPye095kXMDaXGKPQiwkSDhsrPnv1aCK k46LpkSDqWAQK/F/WLBDxumOmSe63pWrt/rfSW20Jbiiz0rGV8tFrEtzmvKarBLpmnaUq7 K6WbBSMH3Nr9XWeyBrxjP1AnTAcH7UzKAorMIOnXBjoR+veKOfw6A3F2CQMjGDSwO77vvR lPEFQr6uaZcS47B07UNf9MN+KzXE5h0TAReBHDoP/f9CKuXemL7A/s6pGdYqhA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqmYf5n4Gz1LGG; Sun, 27 Jul 2025 16:01:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56RG1Ajr055807; Sun, 27 Jul 2025 16:01:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56RG1AUM055804; Sun, 27 Jul 2025 16:01:10 GMT (envelope-from git) Date: Sun, 27 Jul 2025 16:01:10 GMT Message-Id: <202507271601.56RG1AUM055804@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 0fde36fe04b2 - main - pom: Cache tzdata before entering capability mode List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 0fde36fe04b2b656a2215f7dad07a52884e8dcfd Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0fde36fe04b2b656a2215f7dad07a52884e8dcfd commit 0fde36fe04b2b656a2215f7dad07a52884e8dcfd Author: Ed Maste AuthorDate: 2025-07-25 12:13:39 +0000 Commit: Ed Maste CommitDate: 2025-07-27 16:00:53 +0000 pom: Cache tzdata before entering capability mode Pom uses localtime() so needs tzdata available. PR: 278574 Reported by: Tatsuki Makino Reviewed by: ivy Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51521 --- usr.bin/pom/pom.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/pom/pom.c b/usr.bin/pom/pom.c index db0033373b47..bcfbcadc8238 100644 --- a/usr.bin/pom/pom.c +++ b/usr.bin/pom/pom.c @@ -83,6 +83,7 @@ main(int argc, char **argv) err(1, "unable to limit capabitilities for stdio"); caph_cache_catpages(); + caph_cache_tzdata(); if (caph_enter() < 0) err(1, "unable to enter capability mode"); From nobody Sun Jul 27 16:32:15 2025 X-Original-To: dev-commits-src-all@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 4bqnFW2NGjz62ss9; Sun, 27 Jul 2025 16:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqnFW1c7qz3Zmg; Sun, 27 Jul 2025 16:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753633935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i2PSWov2LClBAM38AewPwJ6FKVXmqkWjtQM3emPSNvk=; b=gBlUeE5NJ2auZV2ORJ269VjT3GTTdh93OOWvyEL2pZMqZ585QrQTwJYj3VxBAFURSh2QVU +rwk3XXpSg3yP/lAb5sTb59wtwEo6AkTqOXLNuXbe0uJUCbfTCKWhRQhqjquHrtNUA0mdc v/cL5IKQjdki0jJtvHPpZ0Kz4Y0jnu2n1MdyOGIpYj1CTHPkrTTn8AMeBFU8J2ydeE9qLl 99MeMS5bAwc/apf5OIXWadvoAD1b8VEiFGg+3llQ36wyzy8x87qxZHCKQiu8IFRmq4z8nf 639LUfjhAAhXPgaDEake0qdrr+xCI5Nj72RokyM+CyoTVrU2SVT4B6WgfcpnQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753633935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=i2PSWov2LClBAM38AewPwJ6FKVXmqkWjtQM3emPSNvk=; b=SM5CluVMXLf0Ixoe13lF1kQEXB4fr4iv2xs4Idk+0KOGGVi2AGsiZSPO1QeVllKdQH7dCf B8sAF7+VyjneBSbn72NQwECjmwgu7M0gNrIIN6pcPqKeJO+IJ5SfD0FH8qfNSi2kDj2glk s3un1SnUQmwYTQ6oKO5T2ghJlUEVuouujSNtXLwhslvygHCjxbsYNj9FW+NbDmmXRycy6T QTHlCoQ46toNsoUSBMYpWGVNiJUonDDvNc4Cfl3mT/irNTyzfdGFbGqXZGL/OwLRbZvV1/ ffVTRUlSXw1bIL3eXRPd3CUZx6jRC8FmJBO44YuwHNQHlghnh4jTYcUY3oecwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753633935; a=rsa-sha256; cv=none; b=A4r5OGww0pJSmSXwMFp/jP5nIn8L+aREH7KHBwmKc0OwFE8mwM0XQDtQC08N3DgXSFMQZB cMx3tv8TBGnWi7PGDwKJAki6QetZDaCW8AyjPu4+OpXwpWiUnWY3NM2YKexINt4p/gZUrI NkV93syftc7J7UkFd8DxN8TvP8jBSy2WGT7cH23O1d2EeIJ5dW8WcNZrUPYhELpUNuCHcX Cz+oRsMC9v/yVZhfY+ZVZn+6xMJ4TP/nn9fDdHlTNi9YQA5IpAr0yWzyvBv0eC9bQwLE7k 1szNF7A43hQjnVRIVkoet86nric6tQHvlT0uwTlhPBUR4tOlav35pPoxJm08cw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqnFW0zcYz1Lwy; Sun, 27 Jul 2025 16:32:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56RGWF6q015640; Sun, 27 Jul 2025 16:32:15 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56RGWFXO015637; Sun, 27 Jul 2025 16:32:15 GMT (envelope-from git) Date: Sun, 27 Jul 2025 16:32:15 GMT Message-Id: <202507271632.56RGWFXO015637@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: aae23170c8b5 - main - libutil: Move cpuset(1) domain policy parsing code into libutil List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: aae23170c8b5ac320dbf9c5f6cec05bea0b4b62f Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=aae23170c8b5ac320dbf9c5f6cec05bea0b4b62f commit aae23170c8b5ac320dbf9c5f6cec05bea0b4b62f Author: Bojan Novković AuthorDate: 2024-09-08 15:51:46 +0000 Commit: Bojan Novković CommitDate: 2025-07-27 16:31:48 +0000 libutil: Move cpuset(1) domain policy parsing code into libutil cpuset(1) implements a domainset(9) policy parser that is used to translate a : string into a domainset_t mask and a valid domainset policy. This change moves the domainset parsing code into a new cpuset.c function - 'domainset_parselist'. The existing cpuset.c code was refactored into a generalized list parsing function which is now used to parse both CPU sets and domain sets. This is the same approach used in cpuset(1). Reviewed by: markj, ziaee (manpages) Differential Revision: https://reviews.freebsd.org/D46607 --- bin/cpuset/Makefile | 2 +- bin/cpuset/cpuset.c | 153 +------------------------------------------------- lib/libutil/Makefile | 1 + lib/libutil/cpuset.3 | 51 ++++++++++++++--- lib/libutil/cpuset.c | 98 ++++++++++++++++++++++++++++---- lib/libutil/libutil.h | 8 ++- 6 files changed, 140 insertions(+), 173 deletions(-) diff --git a/bin/cpuset/Makefile b/bin/cpuset/Makefile index d6f58db62901..639dd9812171 100644 --- a/bin/cpuset/Makefile +++ b/bin/cpuset/Makefile @@ -1,6 +1,6 @@ PROG= cpuset -LIBADD= jail +LIBADD= jail util SYMLINKS+= ../..${BINDIR}/cpuset /usr/bin/cpuset diff --git a/bin/cpuset/cpuset.c b/bin/cpuset/cpuset.c index 82ffcaeec252..7416e100a3c6 100644 --- a/bin/cpuset/cpuset.c +++ b/bin/cpuset/cpuset.c @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -69,154 +70,6 @@ static cpuwhich_t which; static void usage(void) __dead2; -struct numa_policy { - const char *name; - int policy; -}; - -static struct numa_policy policies[] = { - { "round-robin", DOMAINSET_POLICY_ROUNDROBIN }, - { "rr", DOMAINSET_POLICY_ROUNDROBIN }, - { "first-touch", DOMAINSET_POLICY_FIRSTTOUCH }, - { "ft", DOMAINSET_POLICY_FIRSTTOUCH }, - { "prefer", DOMAINSET_POLICY_PREFER }, - { "interleave", DOMAINSET_POLICY_INTERLEAVE}, - { "il", DOMAINSET_POLICY_INTERLEAVE}, - { NULL, DOMAINSET_POLICY_INVALID } -}; - -static void printset(struct bitset *mask, int size); - -static void -parselist(char *list, struct bitset *mask, int size) -{ - enum { NONE, NUM, DASH } state; - int lastnum; - int curnum; - char *l; - - state = NONE; - curnum = lastnum = 0; - for (l = list; *l != '\0';) { - if (isdigit(*l)) { - curnum = atoi(l); - if (curnum >= size) - errx(EXIT_FAILURE, - "List entry %d exceeds maximum of %d", - curnum, size - 1); - while (isdigit(*l)) - l++; - switch (state) { - case NONE: - lastnum = curnum; - state = NUM; - break; - case DASH: - for (; lastnum <= curnum; lastnum++) - BIT_SET(size, lastnum, mask); - state = NONE; - break; - case NUM: - default: - goto parserr; - } - continue; - } - switch (*l) { - case ',': - switch (state) { - case NONE: - break; - case NUM: - BIT_SET(size, curnum, mask); - state = NONE; - break; - case DASH: - goto parserr; - break; - } - break; - case '-': - if (state != NUM) - goto parserr; - state = DASH; - break; - default: - goto parserr; - } - l++; - } - switch (state) { - case NONE: - break; - case NUM: - BIT_SET(size, curnum, mask); - break; - case DASH: - goto parserr; - } - return; -parserr: - errx(EXIT_FAILURE, "Malformed list %s", list); -} - -static void -parsecpulist(char *list, cpuset_t *mask) -{ - - if (strcasecmp(list, "all") == 0) { - if (cpuset_getaffinity(CPU_LEVEL_ROOT, CPU_WHICH_PID, -1, - sizeof(*mask), mask) != 0) - err(EXIT_FAILURE, "getaffinity"); - return; - } - parselist(list, (struct bitset *)mask, CPU_SETSIZE); -} - -/* - * permissively parse policy:domain list - * allow: - * round-robin:0-4 explicit - * round-robin:all explicit root domains - * 0-4 implicit root policy - * round-robin implicit root domains - * all explicit root domains and implicit policy - */ -static void -parsedomainlist(char *list, domainset_t *mask, int *policyp) -{ - domainset_t rootmask; - struct numa_policy *policy; - char *l; - int p; - - /* - * Use the rootset's policy as the default for unspecified policies. - */ - if (cpuset_getdomain(CPU_LEVEL_ROOT, CPU_WHICH_PID, -1, - sizeof(rootmask), &rootmask, &p) != 0) - err(EXIT_FAILURE, "getdomain"); - - l = list; - for (policy = &policies[0]; policy->name != NULL; policy++) { - if (strncasecmp(l, policy->name, strlen(policy->name)) == 0) { - p = policy->policy; - l += strlen(policy->name); - if (*l != ':' && *l != '\0') - errx(EXIT_FAILURE, "Malformed list %s", list); - if (*l == ':') - l++; - break; - } - } - *policyp = p; - if (strcasecmp(l, "all") == 0 || *l == '\0') { - DOMAINSET_COPY(&rootmask, mask); - return; - } - parselist(l, (struct bitset *)mask, DOMAINSET_SETSIZE); -} - static void printset(struct bitset *mask, int size) { @@ -327,11 +180,11 @@ main(int argc, char *argv[]) break; case 'l': lflag = 1; - parsecpulist(optarg, &mask); + cpuset_parselist(optarg, &mask); break; case 'n': nflag = 1; - parsedomainlist(optarg, &domains, &policy); + domainset_parselist(optarg, &domains, &policy); break; case 'p': pflag = 1; diff --git a/lib/libutil/Makefile b/lib/libutil/Makefile index 0639745d08fc..2d92c5ba1916 100644 --- a/lib/libutil/Makefile +++ b/lib/libutil/Makefile @@ -38,6 +38,7 @@ MAN+= cpuset.3 expand_number.3 flopen.3 fparseln.3 ftime.3 getlocalbase.3 \ property.3 pty.3 quotafile.3 realhostname.3 realhostname_sa.3 \ _secure_path.3 trimdomain.3 uucplock.3 pw_util.3 MAN+= login.conf.5 +MLINKS+=cpuset.3 domainset_parselist.3 MLINKS+=flopen.3 flopenat.3 MLINKS+=kld.3 kld_isloaded.3 kld.3 kld_load.3 MLINKS+=login_auth.3 auth_cat.3 login_auth.3 auth_checknologin.3 diff --git a/lib/libutil/cpuset.3 b/lib/libutil/cpuset.3 index be29d5309ef0..47dffd209ee6 100644 --- a/lib/libutil/cpuset.3 +++ b/lib/libutil/cpuset.3 @@ -22,21 +22,22 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 31, 2017 +.Dd June 24, 2025 .Dt CPUSET 3 .Os .Sh NAME -.Nm cpuset_parselist -.Nd utility functions for -.Xr cpuset 2 -handling +.Nm cpuset_parselist , +.Nm domainset_parselist +.Nd utility functions for cpuset(2) handling .Sh LIBRARY .Lb libutil .Sh SYNOPSIS .In sys/cpuset.h .In libutil.h .Ft int -.Fn cpuset_parselist "const char *cpu-list" "cpuset_t *mask" +.Fn cpuset_parselist "const char *cpu_list" "cpuset_t *mask" +.Ft int +.Fn domainset_parselist "const char *domain_policy" "domainset_t *domain_mask" "int *policyp" .Sh DESCRIPTION The .Fn cpuset_parselist @@ -52,6 +53,27 @@ numbers. A special list of .Dq all may be specified in which case the list includes all CPUs from the root set. +.Pp +The +.Fn domainset_parselist +function parses a +.Xr domainset 9 +memory domain allocation policy +specified by +.Va domain_policy +filling the +.Va domain_mask +and the +.Va policyp . +A valid +.Va domain_policy +is formatted as +.Ar policy:domain-list . +See the +.Ar -n +flag in +.Xr cpuset 1 +for a list of valid domain policies. .Sh RETURN VALUES Return values can be the following .Bl -tag -width Er @@ -60,19 +82,30 @@ The parsing was successful .It Dv CPUSET_PARSE_ERROR The .Va cpu-list +or +.Va domain-policy format is invalid .It Dv CPUSET_PARSE_GETAFFINITY The .Xr cpuset_getaffinity 2 call has failed .It Dv CPUSET_PARSE_INVALID_CPU -The number of supported CPUs has been exceeded. +The number of supported CPUs or NUMA domains has been exceeded. The maximum number being -.Va CPU_SETSIZE . +.Va CPU_SETSIZE +and +.Va DOMAINSET_SETSIZE +respectively. +.It Dv CPUSET_PARSE_GETDOMAIN +The +.Xr cpuset_getdomain 2 +call has failed .El .Sh SEE ALSO .Xr cpuset 1 , .Xr cpuset 2 , -.Xr cpuset 9 +.Xr numa 4 , +.Xr cpuset 9 , +.Xr domainset 9 .Sh AUTHORS .An Jeffrey Roberson Aq Mt jeff@FreeBSD.org diff --git a/lib/libutil/cpuset.c b/lib/libutil/cpuset.c index 3c374bfa6cac..d4840af7e175 100644 --- a/lib/libutil/cpuset.c +++ b/lib/libutil/cpuset.c @@ -27,34 +27,48 @@ * SUCH DAMAGE. */ +#include +#define _WANT_FREEBSD_BITSET + #include #include +#include #include #include #include #include -int -cpuset_parselist(const char *list, cpuset_t *mask) +struct numa_policy { + const char *name; + int policy; +}; + +static const struct numa_policy policies[] = { + { "round-robin", DOMAINSET_POLICY_ROUNDROBIN }, + { "rr", DOMAINSET_POLICY_ROUNDROBIN }, + { "first-touch", DOMAINSET_POLICY_FIRSTTOUCH }, + { "ft", DOMAINSET_POLICY_FIRSTTOUCH }, + { "prefer", DOMAINSET_POLICY_PREFER }, + { "interleave", DOMAINSET_POLICY_INTERLEAVE}, + { "il", DOMAINSET_POLICY_INTERLEAVE}, + { NULL, DOMAINSET_POLICY_INVALID } +}; + +static int +parselist(const char *list, struct bitset *mask, int size) { enum { NONE, NUM, DASH } state; int lastnum; int curnum; const char *l; - if (strcasecmp(list, "all") == 0) { - if (cpuset_getaffinity(CPU_LEVEL_ROOT, CPU_WHICH_PID, -1, - sizeof(*mask), mask) != 0) - return (CPUSET_PARSE_GETAFFINITY); - return (CPUSET_PARSE_OK); - } state = NONE; curnum = lastnum = 0; for (l = list; *l != '\0';) { if (isdigit(*l)) { curnum = atoi(l); - if (curnum > CPU_SETSIZE) + if (curnum >= size) return (CPUSET_PARSE_INVALID_CPU); while (isdigit(*l)) l++; @@ -65,7 +79,7 @@ cpuset_parselist(const char *list, cpuset_t *mask) break; case DASH: for (; lastnum <= curnum; lastnum++) - CPU_SET(lastnum, mask); + BIT_SET(size, lastnum, mask); state = NONE; break; case NUM: @@ -80,7 +94,7 @@ cpuset_parselist(const char *list, cpuset_t *mask) case NONE: break; case NUM: - CPU_SET(curnum, mask); + BIT_SET(size, curnum, mask); state = NONE; break; case DASH: @@ -102,7 +116,7 @@ cpuset_parselist(const char *list, cpuset_t *mask) case NONE: break; case NUM: - CPU_SET(curnum, mask); + BIT_SET(size, curnum, mask); break; case DASH: goto parserr; @@ -111,3 +125,63 @@ cpuset_parselist(const char *list, cpuset_t *mask) parserr: return (CPUSET_PARSE_ERROR); } + +/* + * permissively parse policy:domain list + * allow: + * round-robin:0-4 explicit + * round-robin:all explicit root domains + * 0-4 implicit root policy + * round-robin implicit root domains + * all explicit root domains and implicit policy + */ +int +domainset_parselist(const char *list, domainset_t *mask, int *policyp) +{ + domainset_t rootmask; + const struct numa_policy *policy; + const char *l; + int p; + + /* + * Use the rootset's policy as the default for unspecified policies. + */ + if (cpuset_getdomain(CPU_LEVEL_ROOT, CPU_WHICH_PID, -1, + sizeof(rootmask), &rootmask, &p) != 0) + return (CPUSET_PARSE_GETDOMAIN); + + if (list == NULL || strcasecmp(list, "all") == 0 || *list == '\0') { + *policyp = p; + DOMAINSET_COPY(&rootmask, mask); + return (CPUSET_PARSE_OK); + } + + l = list; + for (policy = &policies[0]; policy->name != NULL; policy++) { + if (strncasecmp(l, policy->name, strlen(policy->name)) == 0) { + p = policy->policy; + l += strlen(policy->name); + if (*l != ':' && *l != '\0') + return (CPUSET_PARSE_ERROR); + if (*l == ':') + l++; + break; + } + } + *policyp = p; + + return (parselist(l, (struct bitset *)mask, DOMAINSET_SETSIZE)); +} + +int +cpuset_parselist(const char *list, cpuset_t *mask) +{ + if (strcasecmp(list, "all") == 0) { + if (cpuset_getaffinity(CPU_LEVEL_ROOT, CPU_WHICH_PID, -1, + sizeof(*mask), mask) != 0) + return (CPUSET_PARSE_GETAFFINITY); + return (CPUSET_PARSE_OK); + } + + return (parselist(list, (struct bitset *)mask, CPU_SETSIZE)); +} diff --git a/lib/libutil/libutil.h b/lib/libutil/libutil.h index 919855184caf..7d8bfdf67fac 100644 --- a/lib/libutil/libutil.h +++ b/lib/libutil/libutil.h @@ -213,7 +213,13 @@ int cpuset_parselist(const char *list, cpuset_t *mask); #define CPUSET_PARSE_OK 0 #define CPUSET_PARSE_GETAFFINITY -1 #define CPUSET_PARSE_ERROR -2 -#define CPUSET_PARSE_INVALID_CPU -3 +#define CPUSET_PARSE_OUT_OF_RANGE -3 +#define CPUSET_PARSE_GETDOMAIN -4 +#define CPUSET_PARSE_INVALID_CPU CPUSET_PARSE_OUT_OF_RANGE /* backwards compat */ +#endif + +#ifdef _SYS_DOMAINSET_H_ +int domainset_parselist(const char *list, domainset_t *mask, int *policyp); #endif __END_DECLS From nobody Sun Jul 27 16:32:16 2025 X-Original-To: dev-commits-src-all@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 4bqnFX5JLwz62slt; Sun, 27 Jul 2025 16:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqnFX3PZKz3Zrw; Sun, 27 Jul 2025 16:32:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753633936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GVMZyLKoQzbjVazQ7x3SxYF0lyxX9PwICq5LapCRryg=; b=hldksjXMGrpDuSvuquqi/k8wkTfLf6n+ybOB/R2L9BDTMRTS+DfkK7b5rHYnz2kARE2Rqb ZPL9RDTzJ6yqYhpI3fbc6rgwgt3EzVRFDoMFV5GCXI/ikptsZcfE3BTypKCkrKzdjDNCXd KWeXCSuCzCmcXLZUVBHmYnnAaNOHpIb0Y4ACSnMiVUzBmrGb4oOTwUQPyTl4mjf8CUYKLG KXA2Zx8g4pLSGUp/82Ez/s8d35sHkmxblhIbp6yIVuZuxPsFzQLOy7aeZcm0S1g7aYT3oW OYr58pv3M0R8Ch2jIBiW+iMJuxQKQnLZ9ntHTPcuLqFw5blNBS9aKCMl8+zRqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753633936; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GVMZyLKoQzbjVazQ7x3SxYF0lyxX9PwICq5LapCRryg=; b=Blq8Ewb+khOY+r0B08VA6Kk4oWce8L7nGahlIUJQnl2BKy1Ku+YnogCfO5WCK25Hz7FY4F r8hS8cR3IZUOFs8m0atVvfvAf6XocKTNatP4k2dMDefzEyau4FiQQd/8Ib4LBb72dLvygR aGN0cJL8cNN93F//6odnl/sTIS/ESZKhRj6rlKhtubj3Zm5jikKl3cSjnYwdIUdC4vU/jR fGRwwII0rblC/iQZDGJagdSz37zIXbuJrTMe2nSr5dXyRsiLs4Uqc9uJfB2VPDzTE8mAo3 9GSGP/f2bamG+Yie4701QZ5kOXPzQ0yO/zLjy7sxPPCoOO/w1L/CiXTRzpDuGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753633936; a=rsa-sha256; cv=none; b=L5uLKl2++QdfudEwAuzfcbfesUsJpnyNVtERQq51DFq4G89vxhrbkLe0vmmhhgrGgUFapq laEZ487K0d/BoqGp1UR0HLD0HzXdv+ybVkOQDSRg6dzFCMT4GYojo0rJ539wGgdxTk975q kL+l70tvqfVYZGqcI07766dnoc0nA1+Wn+uKyl7a0loaKpheuufhhyFjVzhpS8vT7ZBwcU MUJqRNMTI0AW8pvqVOHQgF5TFikRQ7fhhr3EptQQ5DkJNQ5Xi5Q+SoXucu28LAYWU0MwFs 2XqM5MmdS80km1jNgGe6xkRfyJSUpUbKK/QIT/qciTSaV90+yN4yKqXzkEB+NQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqnFX2GRHz1Lkt; Sun, 27 Jul 2025 16:32:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56RGWG0o015675; Sun, 27 Jul 2025 16:32:16 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56RGWGIG015672; Sun, 27 Jul 2025 16:32:16 GMT (envelope-from git) Date: Sun, 27 Jul 2025 16:32:16 GMT Message-Id: <202507271632.56RGWGIG015672@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: cf571e08503d - main - domainset(9): Split domainset validation logic into a separate function List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cf571e08503d7401d6eb7cae077058ebf02da116 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=cf571e08503d7401d6eb7cae077058ebf02da116 commit cf571e08503d7401d6eb7cae077058ebf02da116 Author: Bojan Novković AuthorDate: 2024-09-08 16:10:53 +0000 Commit: Bojan Novković CommitDate: 2025-07-27 16:31:48 +0000 domainset(9): Split domainset validation logic into a separate function This change splits the validation and 'struct domainset'-filling logic from kern_cpuset_setdomain into a separate function - domainset_populate. This function's main use is to validate user-provided domainset(9) policies and populate a struct domainset before handing it off to domainset_create. No functional change intended. Differential Revision: https://reviews.freebsd.org/D46608 Reviewed by: markj --- share/man/man9/domainset.9 | 16 +++++++- sys/kern/kern_cpuset.c | 98 +++++++++++++++++++++++++--------------------- sys/sys/domainset.h | 14 +++++++ 3 files changed, 83 insertions(+), 45 deletions(-) diff --git a/share/man/man9/domainset.9 b/share/man/man9/domainset.9 index 816ce29f04f7..702c9f83a88b 100644 --- a/share/man/man9/domainset.9 +++ b/share/man/man9/domainset.9 @@ -22,7 +22,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE .\" POSSIBILITY OF SUCH DAMAGE. .\" -.Dd April 14, 2021 +.Dd June 24, 2025 .Dt DOMAINSET 9 .Os .Sh NAME @@ -54,6 +54,8 @@ struct domainset { .Ft struct domainset * .Fn domainset_create "const struct domainset *key" .Ft int +.Fn domainset_populate "struct domainset *domain" "domainset_t *mask" "int policy" "size_t mask_size" +.Ft int .Fn sysctl_handle_domainset "SYSCTL_HANDLER_ARGS" .Sh DESCRIPTION The @@ -137,6 +139,7 @@ These policies should be used in preference to to avoid blocking indefinitely on a .Dv M_WAITOK request. +.Pp The .Fn domainset_create function takes a partially filled in domainset as a key and returns a @@ -148,6 +151,17 @@ is an immutable type that is shared among all matching keys and must not be modified after return. .Pp The +.Fn domainset_populate +function fills a +.Vt domainset +struct using a domain mask and policy. +It is used for validating and +translating a domain mask and policy into a +.Vt domainset +struct when creating a custom domainset using +.Vt domainset_create . +.Pp +The .Fn sysctl_handle_domainset function is provided as a convenience for modifying or viewing domainsets that are not accessible via diff --git a/sys/kern/kern_cpuset.c b/sys/kern/kern_cpuset.c index 5d9e2f2f326b..d7eb82d5f259 100644 --- a/sys/kern/kern_cpuset.c +++ b/sys/kern/kern_cpuset.c @@ -530,7 +530,7 @@ _domainset_create(struct domainset *domain, struct domainlist *freelist) * remove them and update the domainset accordingly. If only empty * domains are present, we must return failure. */ -static bool +bool domainset_empty_vm(struct domainset *domain) { domainset_t empty; @@ -2409,82 +2409,92 @@ sys_cpuset_setdomain(struct thread *td, struct cpuset_setdomain_args *uap) } int -kern_cpuset_setdomain(struct thread *td, cpulevel_t level, cpuwhich_t which, - id_t id, size_t domainsetsize, const domainset_t *maskp, int policy, - const struct cpuset_copy_cb *cb) +domainset_populate(struct domainset *domain, const domainset_t *mask, int policy, + size_t mask_size) { - struct cpuset *nset; - struct cpuset *set; - struct thread *ttd; - struct proc *p; - struct domainset domain; - domainset_t *mask; - int error; - if (domainsetsize < sizeof(domainset_t) || - domainsetsize > DOMAINSET_MAXSIZE / NBBY) - return (ERANGE); if (policy <= DOMAINSET_POLICY_INVALID || - policy > DOMAINSET_POLICY_MAX) + policy > DOMAINSET_POLICY_MAX) { return (EINVAL); - error = cpuset_check_capabilities(td, level, which, id); - if (error != 0) - return (error); - memset(&domain, 0, sizeof(domain)); - mask = malloc(domainsetsize, M_TEMP, M_WAITOK | M_ZERO); - error = cb->cpuset_copyin(maskp, mask, domainsetsize); - if (error) - goto out; + } + /* * Verify that no high bits are set. */ - if (domainsetsize > sizeof(domainset_t)) { - char *end; - char *cp; + if (mask_size > sizeof(domainset_t)) { + const char *end; + const char *cp; - end = cp = (char *)&mask->__bits; - end += domainsetsize; + end = cp = (const char *)&mask->__bits; + end += mask_size; cp += sizeof(domainset_t); - while (cp != end) + while (cp != end) { if (*cp++ != 0) { - error = EINVAL; - goto out; + return (EINVAL); } + } } if (DOMAINSET_EMPTY(mask)) { - error = EDEADLK; - goto out; + return (EDEADLK); } - DOMAINSET_COPY(mask, &domain.ds_mask); - domain.ds_policy = policy; + DOMAINSET_COPY(mask, &domain->ds_mask); + domain->ds_policy = policy; /* * Sanitize the provided mask. */ - if (!DOMAINSET_SUBSET(&all_domains, &domain.ds_mask)) { - error = EINVAL; - goto out; + if (!DOMAINSET_SUBSET(&all_domains, &domain->ds_mask)) { + return (EINVAL); } /* Translate preferred policy into a mask and fallback. */ if (policy == DOMAINSET_POLICY_PREFER) { /* Only support a single preferred domain. */ - if (DOMAINSET_COUNT(&domain.ds_mask) != 1) { - error = EINVAL; - goto out; + if (DOMAINSET_COUNT(&domain->ds_mask) != 1) { + return (EINVAL); } - domain.ds_prefer = DOMAINSET_FFS(&domain.ds_mask) - 1; + domain->ds_prefer = DOMAINSET_FFS(&domain->ds_mask) - 1; /* This will be constrained by domainset_shadow(). */ - DOMAINSET_COPY(&all_domains, &domain.ds_mask); + DOMAINSET_COPY(&all_domains, &domain->ds_mask); } + return (0); +} + +int +kern_cpuset_setdomain(struct thread *td, cpulevel_t level, cpuwhich_t which, + id_t id, size_t domainsetsize, const domainset_t *maskp, int policy, + const struct cpuset_copy_cb *cb) +{ + struct cpuset *nset; + struct cpuset *set; + struct thread *ttd; + struct proc *p; + struct domainset domain; + domainset_t *mask; + int error; + + error = cpuset_check_capabilities(td, level, which, id); + if (error != 0) + return (error); + if (domainsetsize < sizeof(domainset_t) || + domainsetsize > DOMAINSET_MAXSIZE / NBBY) + return (ERANGE); + memset(&domain, 0, sizeof(domain)); + mask = malloc(domainsetsize, M_TEMP, M_WAITOK | M_ZERO); + error = cb->cpuset_copyin(maskp, mask, domainsetsize); + if (error) + goto out; + error = domainset_populate(&domain, mask, policy, domainsetsize); + if (error) + goto out; + /* * When given an impossible policy, fall back to interleaving * across all domains. */ if (domainset_empty_vm(&domain)) domainset_copy(domainset2, &domain); - switch (level) { case CPU_LEVEL_ROOT: case CPU_LEVEL_CPUSET: diff --git a/sys/sys/domainset.h b/sys/sys/domainset.h index f98b175e9bc8..f3dc92ec6383 100644 --- a/sys/sys/domainset.h +++ b/sys/sys/domainset.h @@ -113,6 +113,20 @@ void domainset_zero(void); * returned value will not match the key pointer. */ struct domainset *domainset_create(const struct domainset *); + +/* + * Remove empty domains from a given domainset. + * Returns 'false' if the domainset consists entirely of empty domains. + */ +bool domainset_empty_vm(struct domainset *domain); + +/* + * Validate and populate a domainset structure according to the specified + * policy and mask. + */ +int domainset_populate(struct domainset *domain, const domainset_t *mask, int policy, + size_t mask_size); + #ifdef _SYS_SYSCTL_H_ int sysctl_handle_domainset(SYSCTL_HANDLER_ARGS); #endif From nobody Sun Jul 27 16:32:17 2025 X-Original-To: dev-commits-src-all@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 4bqnFY4vkDz62ssB; Sun, 27 Jul 2025 16:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqnFY3WZlz3Zqd; Sun, 27 Jul 2025 16:32:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753633937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dDZpQU8L5jbD1vssV6G7ORUCbd8UfyIdGjHpgdVP8z4=; b=J5/Vu3AjUU7KYAL/oj9bWdTnrZlF94zX6A83RyGDeDbkw0T6DABj5Px1d78UcTpOuglRfq +0V5bvntilb0gqSUhgY/W+IoJF0irEdCwHSKKuEf9C+3TUognUughfaLvYl241iKAL0wXr YNkQJatkxJpzXa20jmJ2cbgphFfxgv3ulQyvg6I9LQ2mY5PRfikIQVxrTDwrvUZHOmz7/s ZpKIPyZSYJIc7tRCiBC3HAx0bdc7PECFdhYcCa1eclmXa5GtSy4Qul1O8mvKtHQcDOnL5O lsNohY8RsUqDBMJu3jYcfdfQwE+07+T2064ikfwCb/QAYTVk2ke5lRIccvivpw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753633937; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dDZpQU8L5jbD1vssV6G7ORUCbd8UfyIdGjHpgdVP8z4=; b=lLhpfEcLH0M/B97o7mKgW/EZ6Q9BrTVnWQ4dxbGY0NX/uMm8Kp74wunh4dEPU1O/hBaXGl oV4khn2/ih3QuqjQAM5yP2l8+vNLNt079uzIcTUHjgs1LzW3nJWxyu8vf7a9Kk1qssGIZq SDnMzicQY65H+OSiutG4v/fAZuxoYswkLK8RI/vwdahcX9/KyR5Pu4Q2VGN6hgM0NHqTZC yUxHaqdZVoA3I0DzIQRDymVlqoML+IXpTgsCAfCMUZPqPK6WlYeB6MDlE0FUImjVVsfzzo kUAS0NuLr0sfKIb6RrgLav3FAxtnKGkrQD8POQ9N7mXdxrTtMyNvQGtlzYlAWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753633937; a=rsa-sha256; cv=none; b=MGQVl9buGvU2HIzqfjugHD7O5wh3ri6+rDhlgnYvMl0AMcprxVoXhpuDuWh7WO6DwWxOOG eExTo5u+HnoVQgkDyIZhGFOJsDkKqg2k24wEoFmyHbDNbe6j4q636z0JkwdLKHKWVCOhiD tbKsSEADJR9U0zuQJkajvl+UwurYQBZPP0GaAzWnYMITC9DOUTEXPKVJ/IuGBguCAL58vs eTT9wAHOCfnK58SQ2Mlvlo1neWT8t3vWCFbbaEWW21J8QKuTEivukAv2hhk/wTyevdESlN 9rZqCUkcU/13iA6/3xpMjAn+Z9B31qk78eFx1LQwUNprqx9+wp2i7TOMEKHZsg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqnFY2rxdz1Lx0; Sun, 27 Jul 2025 16:32:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56RGWHmF015712; Sun, 27 Jul 2025 16:32:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56RGWHRn015709; Sun, 27 Jul 2025 16:32:17 GMT (envelope-from git) Date: Sun, 27 Jul 2025 16:32:17 GMT Message-Id: <202507271632.56RGWHRn015709@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: a4197ea47777 - main - vmm: Add support for guest NUMA emulation List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a4197ea477771d525c2970d0c42acab727e43f16 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=a4197ea477771d525c2970d0c42acab727e43f16 commit a4197ea477771d525c2970d0c42acab727e43f16 Author: Bojan Novković AuthorDate: 2024-09-08 16:04:33 +0000 Commit: Bojan Novković CommitDate: 2025-07-27 16:31:48 +0000 vmm: Add support for guest NUMA emulation This change adds the necessary kernelspace bits required for supporting NUMA domains in bhyve VMs. The layout of system memory segments and how they're created has been reworked. Each guest NUMA domain will now have its own memory segment. Furthermore, this change allows users to tweak the domain's backing vm_object domainset(9) policy. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D44565 --- lib/libvmmapi/Makefile | 2 +- lib/libvmmapi/vmmapi.h | 14 +---- sys/amd64/include/vmm_dev.h | 7 ++- sys/arm64/include/vmm_dev.h | 5 ++ sys/dev/vmm/vmm_dev.c | 129 ++++++++++++++++++++++++++++++++++++++------ sys/dev/vmm/vmm_mem.c | 15 +++++- sys/dev/vmm/vmm_mem.h | 27 ++++++++-- sys/riscv/include/vmm_dev.h | 5 ++ 8 files changed, 168 insertions(+), 36 deletions(-) diff --git a/lib/libvmmapi/Makefile b/lib/libvmmapi/Makefile index 1866c8fa5e7c..6dd0deeaa9c0 100644 --- a/lib/libvmmapi/Makefile +++ b/lib/libvmmapi/Makefile @@ -1,6 +1,6 @@ PACKAGE=lib${LIB} LIB= vmmapi -SHLIB_MAJOR= 6 +SHLIB_MAJOR= 7 SRCS= vmmapi.c INCS= vmmapi.h diff --git a/lib/libvmmapi/vmmapi.h b/lib/libvmmapi/vmmapi.h index 440064ad13cb..2072c0105e37 100644 --- a/lib/libvmmapi/vmmapi.h +++ b/lib/libvmmapi/vmmapi.h @@ -40,7 +40,7 @@ * API version for out-of-tree consumers like grub-bhyve for making compile * time decisions. */ -#define VMMAPI_VERSION 0200 /* 2 digit major followed by 2 digit minor */ +#define VMMAPI_VERSION 0300 /* 2 digit major followed by 2 digit minor */ struct iovec; struct vcpu; @@ -64,18 +64,6 @@ enum vm_mmap_style { #define VM_MEM_F_INCORE 0x01 /* include guest memory in core file */ #define VM_MEM_F_WIRED 0x02 /* guest memory is wired */ -/* - * Identifiers for memory segments: - * - vm_setup_memory() uses VM_SYSMEM for the system memory segment. - * - the remaining identifiers can be used to create devmem segments. - */ -enum { - VM_SYSMEM, - VM_BOOTROM, - VM_FRAMEBUFFER, - VM_PCIROM, -}; - __BEGIN_DECLS /* * Get the length and name of the memory segment identified by 'segid'. diff --git a/sys/amd64/include/vmm_dev.h b/sys/amd64/include/vmm_dev.h index 1f86538ce5f3..441330fd57b8 100644 --- a/sys/amd64/include/vmm_dev.h +++ b/sys/amd64/include/vmm_dev.h @@ -29,6 +29,8 @@ #ifndef _VMM_DEV_H_ #define _VMM_DEV_H_ +#include + #include #include @@ -52,7 +54,10 @@ struct vm_munmap { struct vm_memseg { int segid; size_t len; - char name[VM_MAX_SUFFIXLEN + 1]; + char name[VM_MAX_SUFFIXLEN + 1]; + domainset_t *ds_mask; + size_t ds_mask_size; + int ds_policy; }; struct vm_register { diff --git a/sys/arm64/include/vmm_dev.h b/sys/arm64/include/vmm_dev.h index 938bea47c7f8..219f1116c728 100644 --- a/sys/arm64/include/vmm_dev.h +++ b/sys/arm64/include/vmm_dev.h @@ -27,6 +27,8 @@ #ifndef _VMM_DEV_H_ #define _VMM_DEV_H_ +#include + #include struct vm_memmap { @@ -49,6 +51,9 @@ struct vm_memseg { int segid; size_t len; char name[VM_MAX_SUFFIXLEN + 1]; + domainset_t *ds_mask; + size_t ds_mask_size; + int ds_policy; }; struct vm_register { diff --git a/sys/dev/vmm/vmm_dev.c b/sys/dev/vmm/vmm_dev.c index 2e2ae0a162d8..9f2b009d02ec 100644 --- a/sys/dev/vmm/vmm_dev.c +++ b/sys/dev/vmm/vmm_dev.c @@ -30,7 +30,8 @@ #include #include -#if defined(__amd64__) && defined(COMPAT_FREEBSD12) +#ifdef __amd64__ +#ifdef COMPAT_FREEBSD12 struct vm_memseg_12 { int segid; size_t len; @@ -42,7 +43,22 @@ _Static_assert(sizeof(struct vm_memseg_12) == 80, "COMPAT_FREEBSD12 ABI"); _IOW('v', IOCNUM_ALLOC_MEMSEG, struct vm_memseg_12) #define VM_GET_MEMSEG_12 \ _IOWR('v', IOCNUM_GET_MEMSEG, struct vm_memseg_12) -#endif +#endif /* COMPAT_FREEBSD12 */ +#ifdef COMPAT_FREEBSD14 +struct vm_memseg_14 { + int segid; + size_t len; + char name[VM_MAX_SUFFIXLEN + 1]; +}; +_Static_assert(sizeof(struct vm_memseg_14) == (VM_MAX_SUFFIXLEN + 1 + 16), + "COMPAT_FREEBSD14 ABI"); + +#define VM_ALLOC_MEMSEG_14 \ + _IOW('v', IOCNUM_ALLOC_MEMSEG, struct vm_memseg_14) +#define VM_GET_MEMSEG_14 \ + _IOWR('v', IOCNUM_GET_MEMSEG, struct vm_memseg_14) +#endif /* COMPAT_FREEBSD14 */ +#endif /* __amd64__ */ struct devmem_softc { int segid; @@ -257,7 +273,8 @@ get_memseg(struct vmmdev_softc *sc, struct vm_memseg *mseg, size_t len) } static int -alloc_memseg(struct vmmdev_softc *sc, struct vm_memseg *mseg, size_t len) +alloc_memseg(struct vmmdev_softc *sc, struct vm_memseg *mseg, size_t len, + struct domainset *domainset) { char *name; int error; @@ -278,8 +295,7 @@ alloc_memseg(struct vmmdev_softc *sc, struct vm_memseg *mseg, size_t len) if (error) goto done; } - - error = vm_alloc_memseg(sc->vm, mseg->segid, mseg->len, sysmem); + error = vm_alloc_memseg(sc->vm, mseg->segid, mseg->len, sysmem, domainset); if (error) goto done; @@ -295,6 +311,20 @@ done: return (error); } +#if defined(__amd64__) && \ + (defined(COMPAT_FREEBSD14) || defined(COMPAT_FREEBSD12)) +/* + * Translate pre-15.0 memory segment identifiers into their 15.0 counterparts. + */ +static void +adjust_segid(struct vm_memseg *mseg) +{ + if (mseg->segid != VM_SYSMEM) { + mseg->segid += (VM_BOOTROM - 1); + } +} +#endif + static int vm_get_register_set(struct vcpu *vcpu, unsigned int count, int *regnum, uint64_t *regval) @@ -353,10 +383,16 @@ static const struct vmmdev_ioctl vmmdev_ioctls[] = { VMMDEV_IOCTL(VM_STATS, VMMDEV_IOCTL_LOCK_ONE_VCPU), VMMDEV_IOCTL(VM_STAT_DESC, 0), -#if defined(__amd64__) && defined(COMPAT_FREEBSD12) +#ifdef __amd64__ +#ifdef COMPAT_FREEBSD12 VMMDEV_IOCTL(VM_ALLOC_MEMSEG_12, VMMDEV_IOCTL_XLOCK_MEMSEGS | VMMDEV_IOCTL_LOCK_ALL_VCPUS), #endif +#ifdef COMPAT_FREEBSD14 + VMMDEV_IOCTL(VM_ALLOC_MEMSEG_14, + VMMDEV_IOCTL_XLOCK_MEMSEGS | VMMDEV_IOCTL_LOCK_ALL_VCPUS), +#endif +#endif /* __amd64__ */ VMMDEV_IOCTL(VM_ALLOC_MEMSEG, VMMDEV_IOCTL_XLOCK_MEMSEGS | VMMDEV_IOCTL_LOCK_ALL_VCPUS), VMMDEV_IOCTL(VM_MMAP_MEMSEG, @@ -366,9 +402,14 @@ static const struct vmmdev_ioctl vmmdev_ioctls[] = { VMMDEV_IOCTL(VM_REINIT, VMMDEV_IOCTL_XLOCK_MEMSEGS | VMMDEV_IOCTL_LOCK_ALL_VCPUS), -#if defined(__amd64__) && defined(COMPAT_FREEBSD12) +#ifdef __amd64__ +#if defined(COMPAT_FREEBSD12) VMMDEV_IOCTL(VM_GET_MEMSEG_12, VMMDEV_IOCTL_SLOCK_MEMSEGS), #endif +#ifdef COMPAT_FREEBSD14 + VMMDEV_IOCTL(VM_GET_MEMSEG_14, VMMDEV_IOCTL_SLOCK_MEMSEGS), +#endif +#endif /* __amd64__ */ VMMDEV_IOCTL(VM_GET_MEMSEG, VMMDEV_IOCTL_SLOCK_MEMSEGS), VMMDEV_IOCTL(VM_MMAP_GETNEXT, VMMDEV_IOCTL_SLOCK_MEMSEGS), @@ -388,6 +429,7 @@ vmmdev_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, struct vmmdev_softc *sc; struct vcpu *vcpu; const struct vmmdev_ioctl *ioctl; + struct vm_memseg *mseg; int error, vcpuid; sc = vmmdev_lookup2(cdev); @@ -499,20 +541,77 @@ vmmdev_ioctl(struct cdev *cdev, u_long cmd, caddr_t data, int fflag, error = vm_munmap_memseg(sc->vm, mu->gpa, mu->len); break; } -#if defined(__amd64__) && defined(COMPAT_FREEBSD12) +#ifdef __amd64__ +#ifdef COMPAT_FREEBSD12 case VM_ALLOC_MEMSEG_12: - error = alloc_memseg(sc, (struct vm_memseg *)data, - sizeof(((struct vm_memseg_12 *)0)->name)); + mseg = (struct vm_memseg *)data; + + adjust_segid(mseg); + error = alloc_memseg(sc, mseg, + sizeof(((struct vm_memseg_12 *)0)->name), NULL); break; case VM_GET_MEMSEG_12: - error = get_memseg(sc, (struct vm_memseg *)data, + mseg = (struct vm_memseg *)data; + + adjust_segid(mseg); + error = get_memseg(sc, mseg, sizeof(((struct vm_memseg_12 *)0)->name)); break; -#endif - case VM_ALLOC_MEMSEG: - error = alloc_memseg(sc, (struct vm_memseg *)data, - sizeof(((struct vm_memseg *)0)->name)); +#endif /* COMPAT_FREEBSD12 */ +#ifdef COMPAT_FREEBSD14 + case VM_ALLOC_MEMSEG_14: + mseg = (struct vm_memseg *)data; + + adjust_segid(mseg); + error = alloc_memseg(sc, mseg, + sizeof(((struct vm_memseg_14 *)0)->name), NULL); + break; + case VM_GET_MEMSEG_14: + mseg = (struct vm_memseg *)data; + + adjust_segid(mseg); + error = get_memseg(sc, mseg, + sizeof(((struct vm_memseg_14 *)0)->name)); + break; +#endif /* COMPAT_FREEBSD14 */ +#endif /* __amd64__ */ + case VM_ALLOC_MEMSEG: { + domainset_t *mask; + struct domainset *domainset, domain; + + domainset = NULL; + mseg = (struct vm_memseg *)data; + if (mseg->ds_policy != DOMAINSET_POLICY_INVALID && mseg->ds_mask != NULL) { + if (mseg->ds_mask_size < sizeof(domainset_t) || + mseg->ds_mask_size > DOMAINSET_MAXSIZE / NBBY) { + error = ERANGE; + break; + } + memset(&domain, 0, sizeof(domain)); + mask = malloc(mseg->ds_mask_size, M_VMMDEV, M_WAITOK); + error = copyin(mseg->ds_mask, mask, mseg->ds_mask_size); + if (error) { + free(mask, M_VMMDEV); + break; + } + error = domainset_populate(&domain, mask, mseg->ds_policy, + mseg->ds_mask_size); + if (error) { + free(mask, M_VMMDEV); + break; + } + domainset = domainset_create(&domain); + if (domainset == NULL) { + error = EINVAL; + free(mask, M_VMMDEV); + break; + } + free(mask, M_VMMDEV); + } + error = alloc_memseg(sc, mseg, sizeof(mseg->name), domainset); + break; + } case VM_GET_MEMSEG: error = get_memseg(sc, (struct vm_memseg *)data, sizeof(((struct vm_memseg *)0)->name)); diff --git a/sys/dev/vmm/vmm_mem.c b/sys/dev/vmm/vmm_mem.c index c61ae2d44b96..be59e37de33d 100644 --- a/sys/dev/vmm/vmm_mem.c +++ b/sys/dev/vmm/vmm_mem.c @@ -7,6 +7,7 @@ #include #include +#include #include #include @@ -156,10 +157,11 @@ vm_mem_allocated(struct vcpu *vcpu, vm_paddr_t gpa) } int -vm_alloc_memseg(struct vm *vm, int ident, size_t len, bool sysmem) +vm_alloc_memseg(struct vm *vm, int ident, size_t len, bool sysmem, + struct domainset *obj_domainset) { - struct vm_mem *mem; struct vm_mem_seg *seg; + struct vm_mem *mem; vm_object_t obj; mem = vm_mem(vm); @@ -179,13 +181,22 @@ vm_alloc_memseg(struct vm *vm, int ident, size_t len, bool sysmem) return (EINVAL); } + /* + * When given an impossible policy, signal an + * error to the user. + */ + if (obj_domainset != NULL && domainset_empty_vm(obj_domainset)) + return (EINVAL); obj = vm_object_allocate(OBJT_SWAP, len >> PAGE_SHIFT); if (obj == NULL) return (ENOMEM); seg->len = len; seg->object = obj; + if (obj_domainset != NULL) + seg->object->domain.dr_policy = obj_domainset; seg->sysmem = sysmem; + return (0); } diff --git a/sys/dev/vmm/vmm_mem.h b/sys/dev/vmm/vmm_mem.h index a4be4c1c57aa..856470cf2590 100644 --- a/sys/dev/vmm/vmm_mem.h +++ b/sys/dev/vmm/vmm_mem.h @@ -8,6 +8,27 @@ #ifndef _DEV_VMM_MEM_H_ #define _DEV_VMM_MEM_H_ +/* Maximum number of NUMA domains in a guest. */ +#define VM_MAXMEMDOM 8 +#define VM_MAXSYSMEM VM_MAXMEMDOM + +/* + * Identifiers for memory segments. + * Each guest NUMA domain is represented by a single system + * memory segment from [VM_SYSMEM, VM_MAXSYSMEM). + * The remaining identifiers can be used to create devmem segments. + */ +enum { + VM_SYSMEM = 0, + VM_BOOTROM = VM_MAXSYSMEM, + VM_FRAMEBUFFER, + VM_PCIROM, + VM_MEMSEG_END +}; + +#define VM_MAX_MEMSEGS VM_MEMSEG_END +#define VM_MAX_MEMMAPS (VM_MAX_MEMSEGS * 2) + #ifdef _KERNEL #include @@ -31,9 +52,6 @@ struct vm_mem_map { int flags; }; -#define VM_MAX_MEMSEGS 4 -#define VM_MAX_MEMMAPS 8 - struct vm_mem { struct vm_mem_map mem_maps[VM_MAX_MEMMAPS]; struct vm_mem_seg mem_segs[VM_MAX_MEMSEGS]; @@ -55,7 +73,8 @@ void vm_assert_memseg_xlocked(struct vm *vm); int vm_mmap_memseg(struct vm *vm, vm_paddr_t gpa, int segid, vm_ooffset_t off, size_t len, int prot, int flags); int vm_munmap_memseg(struct vm *vm, vm_paddr_t gpa, size_t len); -int vm_alloc_memseg(struct vm *vm, int ident, size_t len, bool sysmem); +int vm_alloc_memseg(struct vm *vm, int ident, size_t len, bool sysmem, + struct domainset *obj_domainset); void vm_free_memseg(struct vm *vm, int ident); /* diff --git a/sys/riscv/include/vmm_dev.h b/sys/riscv/include/vmm_dev.h index 856ff0778b95..4d30d5a1c35b 100644 --- a/sys/riscv/include/vmm_dev.h +++ b/sys/riscv/include/vmm_dev.h @@ -34,6 +34,8 @@ #ifndef _VMM_DEV_H_ #define _VMM_DEV_H_ +#include + #include struct vm_memmap { @@ -56,6 +58,9 @@ struct vm_memseg { int segid; size_t len; char name[VM_MAX_SUFFIXLEN + 1]; + domainset_t *ds_mask; + size_t ds_mask_size; + int ds_policy; }; struct vm_register { From nobody Sun Jul 27 16:32:18 2025 X-Original-To: dev-commits-src-all@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 4bqnFb1Gl7z62slv; Sun, 27 Jul 2025 16:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqnFZ4yGtz3b1K; Sun, 27 Jul 2025 16:32:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753633938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2HO5stfaypeJjnOcS3ar1kNW4M0PsOHjXScHM6+IUPQ=; b=CzUV8Ibavo/1eT/u5H52IOJ7DKAU3fmPlAKzIakvtSR+L6p2DRmVUtCMHUt9UFbq7wEXr2 rp5OtBdnsyiukgM8y7eEkCo9BGSMt7kG1DuIV1EPbgI9ZJuE6E3IMI0Bqs3qIKxNVXxzhu zMCbPD5zf0bWXqY5uihHZ9g3j4HKyevKa/qzrisBGhYOOaNsvAEHjHXprotAMHUrPH3XOo tfnJ7GWm4VzHKP6mtZecSZV/8yhmB0ZDciEyVSQrV+VYcOYa3g5W++hdatV5qZeowEIdUe Q1DdTntO3pfpQyZpI4bHNwadyjl6R2k4nwcuCm8jzUYClGc+tgl1907e7bfaYA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753633938; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2HO5stfaypeJjnOcS3ar1kNW4M0PsOHjXScHM6+IUPQ=; b=YZydBBr6KGEEc/fSwGDpvwSQoJW7Tr4kkzr5LSzeZv84IqUMSLuuWyjlssxcFFFV2TiiLj 7nUdFFP+HrDHlZyOGfU+kl4psi+td6sNo4KxbSPNDYR7jjzSoxBlJB7Hy6oaxYhvXPmF80 HZMwNmQj8v8Nl2/f0Rz/iW+rol9E+8aMnqsb8vm6XTvI6VQ8qQ+el79dn9SeFQyKzW8KNm Y9bO66fStbirNtV43T1IKo9pUnGKs1Es/Qb63OP71vAeFDzPSyHXzm7GFVGmSK9fxoHgU7 qaW5xuHpzzft/vjolAzZcQCNeDffVhopLfvzHqQc3hratNtN72i0M03LGcMqKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753633938; a=rsa-sha256; cv=none; b=RJZfPxA7W6Yjg3Bd9UDg7cNlHHODgWGvy4KhdjIga4Pt+p9ICpDCFBkJK//FOz7Ho5Vb1t Rh2ej0GtFTPvGMlzllQl4u1pJODJ6O05zsj7v4UiAtPrHEHE3nu0VP/I39bUFejFc0GDYR X9lWkYEt18zMnu0wrK2lekOeV9EEiT7WdwQXJq6QksvVLxHRfrcdbQQy9mwnb1UCnOUT+9 4YR6IP1vOF1JZZOLU73GFFcMkASx3MTNRxp+VcCZj7iZ+EYB+QZrqFTFBSjO816Oxvf0D/ xxf5ME6M1vwviCtUiuCKHCZxbmq/6rSJE8PTqqgFQliX+cuuSXg70PSwhkobMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqnFZ3xrjz1MD2; Sun, 27 Jul 2025 16:32:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56RGWIHg015747; Sun, 27 Jul 2025 16:32:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56RGWI5T015744; Sun, 27 Jul 2025 16:32:18 GMT (envelope-from git) Date: Sun, 27 Jul 2025 16:32:18 GMT Message-Id: <202507271632.56RGWI5T015744@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: 08c7dd2fbe4f - main - libvmmapi: Add support for setting up and configuring guest NUMA domains List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 08c7dd2fbe4fb7ae5cd6943afef04bd4cb350c1f Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=08c7dd2fbe4fb7ae5cd6943afef04bd4cb350c1f commit 08c7dd2fbe4fb7ae5cd6943afef04bd4cb350c1f Author: Bojan Novković AuthorDate: 2024-09-08 15:57:55 +0000 Commit: Bojan Novković CommitDate: 2025-07-27 16:31:48 +0000 libvmmapi: Add support for setting up and configuring guest NUMA domains This patch reworks libvmmapi to provide support for emulating NUMA domains in guests. More specifically, it reworks 'vm_setup_memory' to setup system memory segments for each guest NUMA domain. An emulated NUMA domain is described by a 'struct vmdom' in vmmapi.h. Aside from its size in bytes, each domain can be configured to use a specific domainset(9) policy and domain mask. 'vm_setup_memory' now takes two additional arguments - an array of struct vmdoms and the array's size. It then proceeds to set up a memory segment for each specified domain using the existing memory mapping scheme. If no domain info is passed, the memory setup falls back to the original, non-NUMA behaviour. Differential Revision: https://reviews.freebsd.org/D44566 Reviewed by: markj --- lib/libvmmapi/internal.h | 11 ++- lib/libvmmapi/vmmapi.c | 181 ++++++++++++++++++++++++++++++++++------------- lib/libvmmapi/vmmapi.h | 12 +++- 3 files changed, 145 insertions(+), 59 deletions(-) diff --git a/lib/libvmmapi/internal.h b/lib/libvmmapi/internal.h index aa7b1d8e6a93..4afe1cab3460 100644 --- a/lib/libvmmapi/internal.h +++ b/lib/libvmmapi/internal.h @@ -8,12 +8,7 @@ #define __VMMAPI_INTERNAL_H__ #include - -enum { - VM_MEMSEG_LOW, - VM_MEMSEG_HIGH, - VM_MEMSEG_COUNT, -}; +#include struct vmctx { int fd; /* device file descriptor */ @@ -21,7 +16,9 @@ struct vmctx { struct { vm_paddr_t base; vm_size_t size; - } memsegs[VM_MEMSEG_COUNT]; + } memsegs[VM_MAX_MEMSEGS]; + size_t lowmem_size; + size_t highmem_size; int memflags; char *baseaddr; char *name; diff --git a/lib/libvmmapi/vmmapi.c b/lib/libvmmapi/vmmapi.c index a1a5d56ff8a2..77f0f8f5c581 100644 --- a/lib/libvmmapi/vmmapi.c +++ b/lib/libvmmapi/vmmapi.c @@ -28,13 +28,14 @@ #include #include +#include +#include #include #include #include #include #include #include -#include #include #include @@ -322,8 +323,8 @@ vm_get_guestmem_from_ctx(struct vmctx *ctx, char **guest_baseaddr, { *guest_baseaddr = ctx->baseaddr; - *lowmem_size = ctx->memsegs[VM_MEMSEG_LOW].size; - *highmem_size = ctx->memsegs[VM_MEMSEG_HIGH].size; + *lowmem_size = ctx->lowmem_size; + *highmem_size = ctx->highmem_size; return (0); } @@ -379,7 +380,8 @@ cmpseg(size_t len, const char *str, size_t len2, const char *str2) } static int -vm_alloc_memseg(struct vmctx *ctx, int segid, size_t len, const char *name) +vm_alloc_memseg(struct vmctx *ctx, int segid, size_t len, const char *name, + int ds_policy, domainset_t *ds_mask, size_t ds_size) { struct vm_memseg memseg; size_t n; @@ -407,6 +409,13 @@ vm_alloc_memseg(struct vmctx *ctx, int segid, size_t len, const char *name) bzero(&memseg, sizeof(struct vm_memseg)); memseg.segid = segid; memseg.len = len; + if (ds_mask == NULL) { + memseg.ds_policy = DOMAINSET_POLICY_INVALID; + } else { + memseg.ds_policy = ds_policy; + memseg.ds_mask = ds_mask; + memseg.ds_mask_size = ds_size; + } if (name != NULL) { n = strlcpy(memseg.name, name, sizeof(memseg.name)); if (n >= sizeof(memseg.name)) { @@ -442,13 +451,14 @@ vm_get_memseg(struct vmctx *ctx, int segid, size_t *lenp, char *namebuf, } static int -setup_memory_segment(struct vmctx *ctx, vm_paddr_t gpa, size_t len, char *base) +map_memory_segment(struct vmctx *ctx, int segid, vm_paddr_t gpa, size_t len, + size_t segoff, char *base) { char *ptr; int error, flags; /* Map 'len' bytes starting at 'gpa' in the guest address space */ - error = vm_mmap_memseg(ctx, gpa, VM_SYSMEM, gpa, len, PROT_ALL); + error = vm_mmap_memseg(ctx, gpa, segid, segoff, len, PROT_ALL); if (error) return (error); @@ -464,65 +474,136 @@ setup_memory_segment(struct vmctx *ctx, vm_paddr_t gpa, size_t len, char *base) return (0); } +/* + * Allocates and maps virtual machine memory segments according + * to the NUMA topology specified by the 'doms' array. + * + * The domains are laid out sequentially in the guest's physical address space. + * The [VM_LOWMEM_LIMIT, VM_HIGHMEM_BASE) address range is skipped and + * left unmapped. + */ int -vm_setup_memory(struct vmctx *ctx, size_t memsize, enum vm_mmap_style vms) +vm_setup_memory_domains(struct vmctx *ctx, enum vm_mmap_style vms, + struct vm_mem_domain *doms, int ndoms) { - size_t objsize, len; - vm_paddr_t gpa; + size_t low_len, len, totalsize; + struct vm_mem_domain *dom; + struct vm_memseg memseg; char *baseaddr, *ptr; - int error; + int error, i, segid; + vm_paddr_t gpa; + /* Sanity checks. */ assert(vms == VM_MMAP_ALL); - - /* - * If 'memsize' cannot fit entirely in the 'lowmem' segment then create - * another 'highmem' segment above VM_HIGHMEM_BASE for the remainder. - */ - if (memsize > VM_LOWMEM_LIMIT) { - ctx->memsegs[VM_MEMSEG_LOW].size = VM_LOWMEM_LIMIT; - ctx->memsegs[VM_MEMSEG_HIGH].size = memsize - VM_LOWMEM_LIMIT; - objsize = VM_HIGHMEM_BASE + ctx->memsegs[VM_MEMSEG_HIGH].size; - } else { - ctx->memsegs[VM_MEMSEG_LOW].size = memsize; - ctx->memsegs[VM_MEMSEG_HIGH].size = 0; - objsize = memsize; + if (doms == NULL || ndoms <= 0 || ndoms > VM_MAXMEMDOM) { + errno = EINVAL; + return (-1); } - error = vm_alloc_memseg(ctx, VM_SYSMEM, objsize, NULL); - if (error) - return (error); + /* Calculate total memory size. */ + totalsize = 0; + for (i = 0; i < ndoms; i++) + totalsize += doms[i].size; + + if (totalsize > VM_LOWMEM_LIMIT) + totalsize = VM_HIGHMEM_BASE + (totalsize - VM_LOWMEM_LIMIT); /* * Stake out a contiguous region covering the guest physical memory * and the adjoining guard regions. */ - len = VM_MMAP_GUARD_SIZE + objsize + VM_MMAP_GUARD_SIZE; + len = VM_MMAP_GUARD_SIZE + totalsize + VM_MMAP_GUARD_SIZE; ptr = mmap(NULL, len, PROT_NONE, MAP_GUARD | MAP_ALIGNED_SUPER, -1, 0); if (ptr == MAP_FAILED) return (-1); - baseaddr = ptr + VM_MMAP_GUARD_SIZE; - if (ctx->memsegs[VM_MEMSEG_HIGH].size > 0) { - gpa = VM_HIGHMEM_BASE; - len = ctx->memsegs[VM_MEMSEG_HIGH].size; - error = setup_memory_segment(ctx, gpa, len, baseaddr); - if (error) - return (error); - } - if (ctx->memsegs[VM_MEMSEG_LOW].size > 0) { - gpa = 0; - len = ctx->memsegs[VM_MEMSEG_LOW].size; - error = setup_memory_segment(ctx, gpa, len, baseaddr); - if (error) - return (error); - } + /* + * Allocate and map memory segments for the virtual machine. + */ + gpa = VM_LOWMEM_LIMIT > 0 ? 0 : VM_HIGHMEM_BASE; + ctx->lowmem_size = 0; + ctx->highmem_size = 0; + for (i = 0; i < ndoms; i++) { + segid = VM_SYSMEM + i; + dom = &doms[i]; + + /* + * Check if the memory segment already exists. + * If 'ndoms' is greater than one, refuse to proceed if the + * memseg already exists. If only one domain was requested, use + * the existing segment to preserve the behaviour of the previous + * implementation. + * + * Splitting existing memory segments is tedious and + * error-prone, which is why we don't support NUMA + * domains for bhyveload(8)-loaded VMs. + */ + error = vm_get_memseg(ctx, segid, &len, memseg.name, + sizeof(memseg.name)); + if (error == 0 && len != 0) { + if (ndoms != 1) { + errno = EEXIST; + return (-1); + } else + doms[0].size = len; + } else { + error = vm_alloc_memseg(ctx, segid, dom->size, NULL, + dom->ds_policy, dom->ds_mask, dom->ds_size); + if (error) + return (error); + } + /* + * If a domain is split by VM_LOWMEM_LIMIT then break + * its segment mapping into two parts, one below VM_LOWMEM_LIMIT + * and one above VM_HIGHMEM_BASE. + */ + if (gpa <= VM_LOWMEM_LIMIT && + gpa + dom->size > VM_LOWMEM_LIMIT) { + low_len = VM_LOWMEM_LIMIT - gpa; + error = map_memory_segment(ctx, segid, gpa, low_len, 0, + baseaddr); + if (error) + return (error); + ctx->lowmem_size = VM_LOWMEM_LIMIT; + /* Map the remainder. */ + gpa = VM_HIGHMEM_BASE; + len = dom->size - low_len; + error = map_memory_segment(ctx, segid, gpa, len, + low_len, baseaddr); + if (error) + return (error); + } else { + len = dom->size; + error = map_memory_segment(ctx, segid, gpa, len, 0, + baseaddr); + if (error) + return (error); + } + if (gpa <= VM_LOWMEM_LIMIT) + ctx->lowmem_size += len; + else + ctx->highmem_size += len; + gpa += len; + } ctx->baseaddr = baseaddr; return (0); } +int +vm_setup_memory(struct vmctx *ctx, size_t memsize, enum vm_mmap_style vms) +{ + struct vm_mem_domain dom0; + + memset(&dom0, 0, sizeof(dom0)); + dom0.ds_policy = DOMAINSET_POLICY_INVALID; + dom0.size = memsize; + + return (vm_setup_memory_domains(ctx, vms, &dom0, 1)); +} + /* * Returns a non-NULL pointer if [gaddr, gaddr+len) is entirely contained in * the lowmem or highmem regions. @@ -535,13 +616,13 @@ vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len) { vm_size_t lowsize, highsize; - lowsize = ctx->memsegs[VM_MEMSEG_LOW].size; + lowsize = ctx->lowmem_size; if (lowsize > 0) { if (gaddr < lowsize && len <= lowsize && gaddr + len <= lowsize) return (ctx->baseaddr + gaddr); } - highsize = ctx->memsegs[VM_MEMSEG_HIGH].size; + highsize = ctx->highmem_size; if (highsize > 0 && gaddr >= VM_HIGHMEM_BASE) { if (gaddr < VM_HIGHMEM_BASE + highsize && len <= highsize && gaddr + len <= VM_HIGHMEM_BASE + highsize) @@ -559,12 +640,12 @@ vm_rev_map_gpa(struct vmctx *ctx, void *addr) offaddr = (char *)addr - ctx->baseaddr; - lowsize = ctx->memsegs[VM_MEMSEG_LOW].size; + lowsize = ctx->lowmem_size; if (lowsize > 0) if (offaddr <= lowsize) return (offaddr); - highsize = ctx->memsegs[VM_MEMSEG_HIGH].size; + highsize = ctx->highmem_size; if (highsize > 0) if (offaddr >= VM_HIGHMEM_BASE && offaddr < VM_HIGHMEM_BASE + highsize) @@ -583,8 +664,7 @@ vm_get_name(struct vmctx *ctx) size_t vm_get_lowmem_size(struct vmctx *ctx) { - - return (ctx->memsegs[VM_MEMSEG_LOW].size); + return (ctx->lowmem_size); } vm_paddr_t @@ -597,8 +677,7 @@ vm_get_highmem_base(struct vmctx *ctx __unused) size_t vm_get_highmem_size(struct vmctx *ctx) { - - return (ctx->memsegs[VM_MEMSEG_HIGH].size); + return (ctx->highmem_size); } void * @@ -616,7 +695,7 @@ vm_create_devmem(struct vmctx *ctx, int segid, const char *name, size_t len) goto done; } - error = vm_alloc_memseg(ctx, segid, len, name); + error = vm_alloc_memseg(ctx, segid, len, name, 0, NULL, 0); if (error) goto done; diff --git a/lib/libvmmapi/vmmapi.h b/lib/libvmmapi/vmmapi.h index 2072c0105e37..b637c45d1eff 100644 --- a/lib/libvmmapi/vmmapi.h +++ b/lib/libvmmapi/vmmapi.h @@ -64,6 +64,14 @@ enum vm_mmap_style { #define VM_MEM_F_INCORE 0x01 /* include guest memory in core file */ #define VM_MEM_F_WIRED 0x02 /* guest memory is wired */ +/* Memory size and allocation policy for a single NUMA domain. */ +struct vm_mem_domain { + size_t size; + int ds_policy; + domainset_t *ds_mask; + size_t ds_size; +}; + __BEGIN_DECLS /* * Get the length and name of the memory segment identified by 'segid'. @@ -115,7 +123,9 @@ struct vcpu *vm_vcpu_open(struct vmctx *ctx, int vcpuid); void vm_vcpu_close(struct vcpu *vcpu); int vcpu_id(struct vcpu *vcpu); int vm_parse_memsize(const char *optarg, size_t *memsize); -int vm_setup_memory(struct vmctx *ctx, size_t len, enum vm_mmap_style s); +int vm_setup_memory(struct vmctx *ctx, size_t len, enum vm_mmap_style s); +int vm_setup_memory_domains(struct vmctx *ctx, enum vm_mmap_style s, + struct vm_mem_domain *doms, int ndoms); void *vm_map_gpa(struct vmctx *ctx, vm_paddr_t gaddr, size_t len); /* inverse operation to vm_map_gpa - extract guest address from host pointer */ vm_paddr_t vm_rev_map_gpa(struct vmctx *ctx, void *addr); From nobody Sun Jul 27 16:32:20 2025 X-Original-To: dev-commits-src-all@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 4bqnFd0mqhz62sMx; Sun, 27 Jul 2025 16:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqnFc69Z5z3bBP; Sun, 27 Jul 2025 16:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753633940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cV4BV9dFDgMtjYhXdQEjIywplGDhFALw0buk7Dip0ak=; b=vEZupSbeiudmuvu+jSe/mIpd3Tr/UZ8D+gv9WW1EYefAuzncmzK0GT2RDc5aKB36gTrAKG WKvLp1Y96d+pS80U/pkPDBuqVBK7EyQP5jjv+bILhFYwPYXXmsXRgN9HcAWMX/lzihqcHE piEiZIeyGtDRQdn1C/ZltrZAbseYoeEF7WEPiQHUndcJNTWFlWzwttI1a/oubX9K2pPJf0 /6mw74axRoIgBAP4qMX4V8BLWSDoYx1SKEoi1jhq5Y5PfgNb+51wvB70CpnvqjYop0vyCn nDCCIPxwR5Wl52tc3z3+yZpv6mq4UZUqh5CMgm4M/FkMh37VxpfAkgtNEvN5NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753633940; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=cV4BV9dFDgMtjYhXdQEjIywplGDhFALw0buk7Dip0ak=; b=Rp75ZY2vWjiN/c/8Fzi/wYEygCz+vNO9JmCwt4dNgkVJTam6wRhE5gA5BLBsxGTPDN76T1 ssGnErd5zHZ+C/yRCzfn+vpbdKdRDFMGdZQbSUKwHnW0W0lMy6yVOezVzGr79NfT/Tf//I S8/aSgn88C9NzDk+1agxk+JqM/s3sHSuw9XcfkKu/uJdCR7rkPAwYE8mc7dNM/z0f0Ubx8 BDvbXW5AjiXGmXmH0NjyKHe1Qg06m0bhONne1jd/4sxUL2K+wZrwp/5elbhA0DvlgZNDfT kIcZ+BUYUIcgoOBj3WbWxqAb/d61Nnp1WRSH8wyfB+DthETEJ3CR9WpxIwr8DQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753633940; a=rsa-sha256; cv=none; b=l5lT8lK5X4d1Lx4gXL2vMXArHdyTkcdXHk0BhBUWLTYNzXH+zwOA8nhk+hNB/mFCvdPY96 vl/eFakiGisAKshrgeVMSGErxfOYhYLmelrQ+5iPidwzd2Lbvc0zAaIE/P9aW0lgmjXDYv BbWLg3p35+/xwPjc2PByf/6JPUHFqrpej5JMLsYiJgXjzB6AQYscVOlNuplfkBw8z3db9/ D4QGflKiYk7uMakGwY/jkuFZinqm/JYlRv9U2lZqdBNY7O8ch6tsHS75vvFuQXVlLUR4Kq qNgC4KsuXFMNd+bMs2miLgK8c92jJRWhxA741esILaqZ3dGi5fRTJqq+8UcYQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqnFc5Tnlz1Lhc; Sun, 27 Jul 2025 16:32:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56RGWKQJ015828; Sun, 27 Jul 2025 16:32:20 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56RGWKTj015825; Sun, 27 Jul 2025 16:32:20 GMT (envelope-from git) Date: Sun, 27 Jul 2025 16:32:20 GMT Message-Id: <202507271632.56RGWKTj015825@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: 87ab222016a6 - main - bhyve/acpi: Mark dsdt_line as 'printflike' List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 87ab222016a6b02018647c8225499ff253b953a3 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=87ab222016a6b02018647c8225499ff253b953a3 commit 87ab222016a6b02018647c8225499ff253b953a3 Author: Bojan Novković AuthorDate: 2025-07-25 17:48:21 +0000 Commit: Bojan Novković CommitDate: 2025-07-27 16:31:49 +0000 bhyve/acpi: Mark dsdt_line as 'printflike' Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D51534 --- usr.sbin/bhyve/acpi.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/acpi.h b/usr.sbin/bhyve/acpi.h index 824dce776306..f4d24d63800e 100644 --- a/usr.sbin/bhyve/acpi.h +++ b/usr.sbin/bhyve/acpi.h @@ -57,7 +57,7 @@ int acpi_build(struct vmctx *ctx, int ncpu); void acpi_raise_gpe(struct vmctx *ctx, unsigned bit); int acpi_tables_add_device(const struct acpi_device *const dev); int acpi_add_vcpu_affinity(int vcpuid, int domain); -void dsdt_line(const char *fmt, ...); +void dsdt_line(const char *fmt, ...) __printflike(1, 2); void dsdt_fixed_ioport(uint16_t iobase, uint16_t length); void dsdt_fixed_irq(uint8_t irq); void dsdt_fixed_mem32(uint32_t base, uint32_t length); From nobody Sun Jul 27 16:32:19 2025 X-Original-To: dev-commits-src-all@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 4bqnFc148Qz62sSV; Sun, 27 Jul 2025 16:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqnFb5DWWz3Zt2; Sun, 27 Jul 2025 16:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753633939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eZkfpXA3VpgH/CyrZ5nmwVInE4VPlpv5wkAmw3ZHl/g=; b=bkk5i1EMHm5fq+RVFLOqTTSin9Z45Xn2zYyiR+MrRhwZiW5pO6M4The0Obc5/TSNQE+ONt xLbe2xe0dJZ3nH8KmtG73QYKZc3+ILuNPe24Xu0upklNIpznQ6aq1AUSf8/52wRzvoAmsN XDyh/I/yeeNiFsjWnOO4ZtE8bdz7fyXyE8Fb2+3dcvIYik5rvJKKiABFrKThOvxZdzQ8p4 ZrgntVONIwaBpzjdXlwEyA6QdorahvKMoZ9SdCOGcuoP75zUxBepPj3fBbOp0PEb45JNSB PeK0XnXJibR7csFNtysoihTezVv7Fp6emgQ19TVU5Gy0pWRHG3kROxVsNKm47g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753633939; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eZkfpXA3VpgH/CyrZ5nmwVInE4VPlpv5wkAmw3ZHl/g=; b=LJj6TSVry9ZLBh822aNjPbpnrZJRjHFKiPM8lsZpsLh9LR133yJRNMjKoCJnp6Iy/adCpw c+JirEkbB8bZBaEfLGmf2PNFYfe9l0EKF1yJD8ijyNP+jyTpEjRREVX8mSYS1P+IZGca0w 9/Lfr9XV4pAi3oYvqJsQBXj+vRGxhjAebE0v2JIF0abeAkNE7J4/UP7A5C4xipNHZvjLPK 4z9hgzuxIj9YsAqg1XFdvRWQYbU/j+i0mcuo1wo2Q6oVST7hIsk8XSrxn+iG6Z3YALtBvd uMMLqtb3UUGkDx5lGx48hvchg9hFkLBHhFqCgH03dBjbPT8UUBw/I69US4lCzw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753633939; a=rsa-sha256; cv=none; b=Ch7vs6BNFgJM6qMYKmNzXrjgZM5BF45NNsAvvsHaoZFIQwcWIW1IYm96Pe3NiX4hZddEv1 VPH6Qi9ilNevgc9wE0dAKzS2t4KgO2m2Za5HG6BzNb2T85nvjPkIaTa/6i4maYm2jXXDXy OIv/IHD3vevf9vwVvTl11WKGyM9JScj365Ypmm4wfw9du7H6FEV7+8O4ktEzGOSd5RrZXn NnoejKYUn5uj+87/+W7pXMcrH2Kv6RIwNSlpHZPRjf7XBB/gMFIkN70SZ7BrCqcdFfCWhF im+UWVy2hwvnrVsL63xDV715UsO8r4li5vDX//run9rmZGKanZojTkyDHCOW4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqnFb4Z4Rz1MPj; Sun, 27 Jul 2025 16:32:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56RGWJN7015791; Sun, 27 Jul 2025 16:32:19 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56RGWJml015788; Sun, 27 Jul 2025 16:32:19 GMT (envelope-from git) Date: Sun, 27 Jul 2025 16:32:19 GMT Message-Id: <202507271632.56RGWJml015788@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: f1d705d4f431 - main - bhyve: Add support for specifying guest NUMA configuration List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f1d705d4f431a5553aa5e64310bdc703ba27eab4 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=f1d705d4f431a5553aa5e64310bdc703ba27eab4 commit f1d705d4f431a5553aa5e64310bdc703ba27eab4 Author: Bojan Novković AuthorDate: 2024-09-08 16:06:57 +0000 Commit: Bojan Novković CommitDate: 2025-07-27 16:31:48 +0000 bhyve: Add support for specifying guest NUMA configuration This patch adds basic support for adding NUMA domains to a bhyve VM. The user can define a NUMA domain using the -n flag, which expects a domain id, a CPU set, and memory size for each NUMA domain. After parsing the node configurations, we use the interfaces added in previous patches to set the NUMA configuration for the virtual machine. Afterwards, we use the configuration to build the ACPI 'Static Resource Affinity Table' (SRAT) which is used to pass NUMA information to the guest. Users can optionally configure domainset(9) allocation policies for each domain. Since each NUMA domain is essentially a separate system memory segment, we can parse user-provided domainset(9) policies and install them into its backing 'vm_object'. Differential Revision: https://reviews.freebsd.org/D44567 Reviewed by: markj Relnotes: yes --- usr.sbin/bhyve/acpi.c | 124 +++++++++++++++++++++++ usr.sbin/bhyve/acpi.h | 1 + usr.sbin/bhyve/amd64/bhyverun_machdep.c | 14 ++- usr.sbin/bhyve/bhyve.8 | 80 ++++++++++++++- usr.sbin/bhyve/bhyverun.c | 174 +++++++++++++++++++++++++++++++- usr.sbin/bhyve/bhyverun.h | 1 + usr.sbin/bhyve/bootrom.c | 1 + usr.sbin/bhyve/pci_emul.c | 1 + usr.sbin/bhyve/pci_fbuf.c | 1 + usr.sbin/bhyve/pci_passthru.c | 1 + 10 files changed, 393 insertions(+), 5 deletions(-) diff --git a/usr.sbin/bhyve/acpi.c b/usr.sbin/bhyve/acpi.c index 85864da57af2..6ff8dd8e273b 100644 --- a/usr.sbin/bhyve/acpi.c +++ b/usr.sbin/bhyve/acpi.c @@ -37,9 +37,12 @@ */ #include +#include +#include #include #include #include +#include #include #include @@ -50,7 +53,9 @@ #include #include +#include #include +#include #include #include "bhyverun.h" @@ -78,6 +83,22 @@ static int basl_ncpu; static char basl_template[MAXPATHLEN]; static char basl_stemplate[MAXPATHLEN]; +/* + * SRAT vCPU affinity info. + */ +struct acpi_vcpu_affinity_entry { + RB_ENTRY(acpi_vcpu_affinity_entry) entry; + int vcpuid; + int domain; +}; + +static int vcpu_affinity_cmp(struct acpi_vcpu_affinity_entry *const a1, + struct acpi_vcpu_affinity_entry *const a2); +static RB_HEAD(vcpu_affinities, + acpi_vcpu_affinity_entry) aff_head = RB_INITIALIZER(&aff_head); +RB_GENERATE_STATIC(vcpu_affinities, acpi_vcpu_affinity_entry, entry, + vcpu_affinity_cmp); + /* * State for dsdt_line(), dsdt_indent(), and dsdt_unindent(). */ @@ -121,6 +142,31 @@ acpi_tables_add_device(const struct acpi_device *const dev) return (0); } +static int +vcpu_affinity_cmp(struct acpi_vcpu_affinity_entry *a1, + struct acpi_vcpu_affinity_entry *a2) +{ + return (a1->vcpuid < a2->vcpuid ? -1 : a1->vcpuid > a2->vcpuid); +} + +int +acpi_add_vcpu_affinity(int vcpuid, int domain) +{ + struct acpi_vcpu_affinity_entry *entry = calloc(1, sizeof(*entry)); + if (entry == NULL) { + return (ENOMEM); + } + + entry->vcpuid = vcpuid; + entry->domain = domain; + if (RB_INSERT(vcpu_affinities, &aff_head, entry) != NULL) { + free(entry); + return (EEXIST); + } + + return (0); +} + /* * Helper routines for writing to the DSDT from other modules. */ @@ -726,6 +772,83 @@ build_spcr(struct vmctx *const ctx) return (0); } +static int +build_srat(struct vmctx *const ctx) +{ + ACPI_TABLE_SRAT srat; + ACPI_SRAT_MEM_AFFINITY srat_mem_affinity; + ACPI_SRAT_CPU_AFFINITY srat_cpu_affinity; + + struct acpi_vcpu_affinity_entry *ep; + struct basl_table *table; + int segid, domain; + int _flags, _prot; + vm_ooffset_t _off; + size_t maplen; + uint64_t gpa; + int ret; + + if (RB_EMPTY(&aff_head)) + return (0); + + memset(&srat, 0, sizeof(srat)); + BASL_EXEC(basl_table_create(&table, ctx, ACPI_SIG_SRAT, + BASL_TABLE_ALIGNMENT)); + BASL_EXEC(basl_table_append_header(table, ACPI_SIG_SRAT, 1, 1)); + srat.TableRevision = 1; + BASL_EXEC(basl_table_append_content(table, &srat, sizeof(srat))); + + /* + * Iterate over the VM's memory maps and add + * a 'Memory Affinity Structure' for each mapping. + */ + gpa = 0; + while (1) { + ret = vm_mmap_getnext(ctx, &gpa, &segid, &_off, &maplen, &_prot, + &_flags); + if (ret) { + break; + } + + if (segid >= VM_SYSMEM && segid < VM_BOOTROM) { + domain = segid - VM_SYSMEM; + } else { + /* Treat devmem segs as domain 0. */ + domain = 0; + } + memset(&srat_mem_affinity, 0, sizeof(srat_mem_affinity)); + srat_mem_affinity.Header.Type = ACPI_SRAT_TYPE_MEMORY_AFFINITY; + srat_mem_affinity.Header.Length = sizeof(srat_mem_affinity); + srat_mem_affinity.Flags |= ACPI_SRAT_MEM_ENABLED; + srat_mem_affinity.ProximityDomain = htole32(domain); + srat_mem_affinity.BaseAddress = htole64(gpa); + srat_mem_affinity.Length = htole64(maplen); + srat_mem_affinity.Flags = htole32(ACPI_SRAT_MEM_ENABLED); + BASL_EXEC(basl_table_append_bytes(table, &srat_mem_affinity, + sizeof(srat_mem_affinity))); + gpa += maplen; + } + + /* + * Iterate over each "vCPUid to domain id" mapping and emit a + * 'Processor Local APIC/SAPIC Affinity Structure' for each entry. + */ + RB_FOREACH(ep, vcpu_affinities, &aff_head) { + memset(&srat_cpu_affinity, 0, sizeof(srat_cpu_affinity)); + srat_cpu_affinity.Header.Type = ACPI_SRAT_TYPE_CPU_AFFINITY; + srat_cpu_affinity.Header.Length = sizeof(srat_cpu_affinity); + srat_cpu_affinity.ProximityDomainLo = (uint8_t)ep->domain; + srat_cpu_affinity.ApicId = (uint8_t)ep->vcpuid; + srat_cpu_affinity.Flags = htole32(ACPI_SRAT_CPU_USE_AFFINITY); + BASL_EXEC(basl_table_append_bytes(table, &srat_cpu_affinity, + sizeof(srat_cpu_affinity))); + } + + BASL_EXEC(basl_table_register_to_rsdt(table)); + + return (0); +} + int acpi_build(struct vmctx *ctx, int ncpu) { @@ -765,6 +888,7 @@ acpi_build(struct vmctx *ctx, int ncpu) BASL_EXEC(build_mcfg(ctx)); BASL_EXEC(build_facs(ctx)); BASL_EXEC(build_spcr(ctx)); + BASL_EXEC(build_srat(ctx)); /* Build ACPI device-specific tables such as a TPM2 table. */ const struct acpi_device_list_entry *entry; diff --git a/usr.sbin/bhyve/acpi.h b/usr.sbin/bhyve/acpi.h index 4b557993d67f..824dce776306 100644 --- a/usr.sbin/bhyve/acpi.h +++ b/usr.sbin/bhyve/acpi.h @@ -56,6 +56,7 @@ struct vmctx; int acpi_build(struct vmctx *ctx, int ncpu); void acpi_raise_gpe(struct vmctx *ctx, unsigned bit); int acpi_tables_add_device(const struct acpi_device *const dev); +int acpi_add_vcpu_affinity(int vcpuid, int domain); void dsdt_line(const char *fmt, ...); void dsdt_fixed_ioport(uint16_t iobase, uint16_t length); void dsdt_fixed_irq(uint8_t irq); diff --git a/usr.sbin/bhyve/amd64/bhyverun_machdep.c b/usr.sbin/bhyve/amd64/bhyverun_machdep.c index 85af124b5536..dad8f1e52e4e 100644 --- a/usr.sbin/bhyve/amd64/bhyverun_machdep.c +++ b/usr.sbin/bhyve/amd64/bhyverun_machdep.c @@ -91,6 +91,7 @@ bhyve_usage(int code) " -K: PS2 keyboard layout\n" " -l: LPC device configuration\n" " -m: memory size\n" + " -n: NUMA domain specification\n" " -o: set config 'var' to 'value'\n" " -P: vmexit from the guest on pause\n" " -p: pin 'vcpu' to 'hostcpu'\n" @@ -117,9 +118,9 @@ bhyve_optparse(int argc, char **argv) int c; #ifdef BHYVE_SNAPSHOT - optstr = "aehuwxACDHIPSWYk:f:o:p:G:c:s:m:l:K:U:r:"; + optstr = "aehuwxACDHIPSWYk:f:o:p:G:c:s:m:n:l:K:U:r:"; #else - optstr = "aehuwxACDHIPSWYk:f:o:p:G:c:s:m:l:K:U:"; + optstr = "aehuwxACDHIPSWYk:f:o:p:G:c:s:m:n:l:K:U:"; #endif while ((c = getopt(argc, argv, optstr)) != -1) { switch (c) { @@ -194,6 +195,15 @@ bhyve_optparse(int argc, char **argv) case 'm': set_config_value("memory.size", optarg); break; + case 'n': + if (bhyve_numa_parse(optarg) != 0) + errx(EX_USAGE, + "invalid NUMA configuration " + "'%s'", + optarg); + if (!get_config_bool("acpi_tables")) + errx(EX_USAGE, "NUMA emulation requires ACPI"); + break; case 'o': if (!bhyve_parse_config_option(optarg)) { errx(EX_USAGE, diff --git a/usr.sbin/bhyve/bhyve.8 b/usr.sbin/bhyve/bhyve.8 index 62e567fd359d..89c0b23961a8 100644 --- a/usr.sbin/bhyve/bhyve.8 +++ b/usr.sbin/bhyve/bhyve.8 @@ -269,8 +269,56 @@ or (either upper or lower case) to indicate a multiple of kilobytes, megabytes, gigabytes, or terabytes. If no suffix is given, the value is assumed to be in megabytes. -.Pp The default is 256M. +.Pp +.It Fl n Ar id Ns Cm \&, Ns Ar size Ns Cm \&, Ns Ar cpus Ns Op Cm \&, Ns Ar domain_policy +Configure guest NUMA domains. +This option applies only to the amd64 platform. +.Pp +The +.Fl n +option allows the guest physical address space to be partitioned into domains. +The layout of each domain is encoded in an ACPI table +visible to the guest operating system. +The +.Fl n +option also allows the specification of a +.Xr domainset 9 +memory allocation policy for the host memory backing a given NUMA domain. +A guest can have up to 8 NUMA domains. +This feature requires that the guest use a boot ROM, and in +particular cannot be used if the guest was initialized using +.Xr bhyveload 8 . +.Pp +Each domain is identified by a numerical +.Em id . +The domain memory +.Em size +is specified using the same format as the +.Fl m +flag. +The sum of all +.Em size +parameters overrides the total VM memory size specified by the +.Fl m +flag. +However, if at least one domain memory size parameter is +missing, the total VM memory size will be equally distributed across +all emulated domains. +The +.Em cpuset +parameter specifies the set of CPUs that are part of the domain. +The +.Em domain_policy +parameter may be optionally used to configure the +.Xr domainset 9 +host NUMA memory allocation policy for an emulated +domain. +See the +.Ar -n +flag in +.Xr cpuset 1 +for a list of valid NUMA memory allocation policies and their formats. .It Fl o Ar var Ns Cm = Ns Ar value Set the configuration variable .Ar var @@ -1202,6 +1250,33 @@ using this configuration file, use flag .Bd -literal -offset indent /usr/sbin/bhyve -k configfile vm0 .Ed +.Pp +Run a UEFI virtual machine with four CPUs and two emulated NUMA domains: +.Bd -literal -offset indent +bhyve -c 4 -w -H \\ + -s 0,hostbridge \\ + -s 4,ahci-hd,disk.img \\ + -s 31,lpc -l com1,stdio \\ + -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\ + -n id=0,size=4G,cpus=0-1 \\ + -n id=1,size=4G,cpus=2-3 \\ + numavm +.Ed +.Pp +Assuming a host machine with two NUMA domains, +run a UEFI virtual machine with four CPUs using a +.Ar prefer +.Xr domainset 9 +policy to allocate guest memory from the first host NUMA domain only. +.Bd -literal -offset indent +bhyve -c 2 -w -H \\ + -s 0,hostbridge \\ + -s 4,ahci-hd,disk.img \\ + -s 31,lpc -l com1,stdio \\ + -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \\ + -n id=0,size=4G,cpus=0-1,domain_policy=prefer:0 \\ + numavm +.Ed .Sh SEE ALSO .Xr bhyve 4 , .Xr netgraph 4 , @@ -1211,7 +1286,8 @@ using this configuration file, use flag .Xr bhyve_config 5 , .Xr ethers 5 , .Xr bhyvectl 8 , -.Xr bhyveload 8 +.Xr bhyveload 8 , +.Xr domainset 9 .Pp .Rs .%A Intel diff --git a/usr.sbin/bhyve/bhyverun.c b/usr.sbin/bhyve/bhyverun.c index be9cd1611700..9ead49582a7d 100644 --- a/usr.sbin/bhyve/bhyverun.c +++ b/usr.sbin/bhyve/bhyverun.c @@ -30,6 +30,8 @@ #ifndef WITHOUT_CAPSICUM #include #endif +#include +#include #include #ifdef BHYVE_SNAPSHOT #include @@ -54,6 +56,7 @@ #include #endif #include +#include #include #include #include @@ -68,6 +71,7 @@ #include #endif +#include #include #include "acpi.h" @@ -108,6 +112,9 @@ static const int BSP = 0; static cpuset_t cpumask; +static struct vm_mem_domain guest_domains[VM_MAXMEMDOM]; +static int guest_ndomains = 0; + static void vm_loop(struct vmctx *ctx, struct vcpu *vcpu); static struct vcpu_info { @@ -179,6 +186,118 @@ parse_int_value(const char *key, const char *value, int minval, int maxval) return (lval); } +int +bhyve_numa_parse(const char *opt) +{ + int id = -1; + nvlist_t *nvl; + char *cp, *str, *tofree; + char pathbuf[64] = { 0 }; + char *size = NULL, *cpus = NULL, *domain_policy = NULL; + + if (*opt == '\0') { + return (-1); + } + + tofree = str = strdup(opt); + if (str == NULL) + errx(4, "Failed to allocate memory"); + + while ((cp = strsep(&str, ",")) != NULL) { + if (strncmp(cp, "id=", strlen("id=")) == 0) + id = parse_int_value("id", cp + strlen("id="), 0, + UINT8_MAX); + else if (strncmp(cp, "size=", strlen("size=")) == 0) + size = cp + strlen("size="); + else if (strncmp(cp, + "domain_policy=", strlen("domain_policy=")) == 0) + domain_policy = cp + strlen("domain_policy="); + else if (strncmp(cp, "cpus=", strlen("cpus=")) == 0) + cpus = cp + strlen("cpus="); + } + + if (id == -1) { + EPRINTLN("Missing NUMA domain ID in '%s'", opt); + goto out; + } + + snprintf(pathbuf, sizeof(pathbuf), "domains.%d", id); + nvl = find_config_node(pathbuf); + if (nvl == NULL) + nvl = create_config_node(pathbuf); + if (size != NULL) + set_config_value_node(nvl, "size", size); + if (domain_policy != NULL) + set_config_value_node(nvl, "domain_policy", domain_policy); + if (cpus != NULL) + set_config_value_node(nvl, "cpus", cpus); + + free(tofree); + return (0); + +out: + free(tofree); + return (-1); +} + +static void +calc_mem_affinity(size_t vm_memsize) +{ + int i; + nvlist_t *nvl; + bool need_recalc; + const char *value; + struct vm_mem_domain *dom; + char pathbuf[64] = { 0 }; + + need_recalc = false; + for (i = 0; i < VM_MAXMEMDOM; i++) { + dom = &guest_domains[i]; + snprintf(pathbuf, sizeof(pathbuf), "domains.%d", i); + nvl = find_config_node(pathbuf); + if (nvl == NULL) { + break; + } + + value = get_config_value_node(nvl, "size"); + need_recalc |= value == NULL; + if (value != NULL && vm_parse_memsize(value, &dom->size)) { + errx(EX_USAGE, "invalid memsize for domain %d: '%s'", i, + value); + } + + dom->ds_mask = calloc(1, sizeof(domainset_t)); + if (dom->ds_mask == NULL) { + errx(EX_OSERR, "Failed to allocate domainset mask"); + } + dom->ds_size = sizeof(domainset_t); + value = get_config_value_node(nvl, "domain_policy"); + if (value == NULL) { + dom->ds_policy = DOMAINSET_POLICY_INVALID; + DOMAINSET_ZERO(dom->ds_mask); + } else if (domainset_parselist(value, dom->ds_mask, &dom->ds_policy) != + CPUSET_PARSE_OK) { + errx(EX_USAGE, "failed to parse domain policy '%s'", value); + } + } + + guest_ndomains = i; + if (guest_ndomains == 0) { + /* + * No domains were specified - create domain + * 0 holding all CPUs and memory. + */ + guest_ndomains = 1; + guest_domains[0].size = vm_memsize; + } else if (need_recalc) { + warnx("At least one domain memory size was not specified, distributing" + " total VM memory size across all domains"); + for (i = 0; i < guest_ndomains; i++) { + guest_domains[i].size = vm_memsize / guest_ndomains; + } + } +} + /* * Set the sockets, cores, threads, and guest_cpus variables based on * the configured topology. @@ -340,6 +459,56 @@ build_vcpumaps(void) } } +static void +set_vcpu_affinities(void) +{ + int cpu, error; + nvlist_t *nvl = NULL; + cpuset_t cpus; + const char *value; + char pathbuf[64] = { 0 }; + + for (int dom = 0; dom < guest_ndomains; dom++) { + snprintf(pathbuf, sizeof(pathbuf), "domains.%d", dom); + nvl = find_config_node(pathbuf); + if (nvl == NULL) + break; + + value = get_config_value_node(nvl, "cpus"); + if (value == NULL) { + EPRINTLN("Missing CPU set for domain %d", dom); + exit(4); + } + + parse_cpuset(dom, value, &cpus); + CPU_FOREACH_ISSET(cpu, &cpus) { + error = acpi_add_vcpu_affinity(cpu, dom); + if (error) { + EPRINTLN( + "Unable to set vCPU %d affinity for domain %d: %s", + cpu, dom, strerror(errno)); + exit(4); + } + } + } + if (guest_ndomains > 1 || nvl != NULL) + return; + + /* + * If we're dealing with one domain and no cpuset was provided, create a + * default one holding all cpus. + */ + for (cpu = 0; cpu < guest_ncpus; cpu++) { + error = acpi_add_vcpu_affinity(cpu, 0); + if (error) { + EPRINTLN( + "Unable to set vCPU %d affinity for domain %d: %s", + cpu, 0, strerror(errno)); + exit(4); + } + } +} + void * paddr_guest2host(struct vmctx *ctx, uintptr_t gaddr, size_t len) { @@ -713,18 +882,21 @@ main(int argc, char *argv[]) vcpu_info[vcpuid].vcpu = vm_vcpu_open(ctx, vcpuid); } + calc_mem_affinity(memsize); memflags = 0; if (get_config_bool_default("memory.wired", false)) memflags |= VM_MEM_F_WIRED; if (get_config_bool_default("memory.guest_in_core", false)) memflags |= VM_MEM_F_INCORE; vm_set_memflags(ctx, memflags); - error = vm_setup_memory(ctx, memsize, VM_MMAP_ALL); + error = vm_setup_memory_domains(ctx, VM_MMAP_ALL, guest_domains, + guest_ndomains); if (error) { fprintf(stderr, "Unable to setup memory (%d)\n", errno); exit(4); } + set_vcpu_affinities(); init_mem(guest_ncpus); init_bootrom(ctx); if (bhyve_init_platform(ctx, bsp) != 0) diff --git a/usr.sbin/bhyve/bhyverun.h b/usr.sbin/bhyve/bhyverun.h index 005de6dc5410..0a7bbd72a19c 100644 --- a/usr.sbin/bhyve/bhyverun.h +++ b/usr.sbin/bhyve/bhyverun.h @@ -73,6 +73,7 @@ void bhyve_parse_gdb_options(const char *opt); #endif int bhyve_pincpu_parse(const char *opt); int bhyve_topology_parse(const char *opt); +int bhyve_numa_parse(const char *opt); void bhyve_init_vcpu(struct vcpu *vcpu); void bhyve_start_vcpu(struct vcpu *vcpu, bool bsp); diff --git a/usr.sbin/bhyve/bootrom.c b/usr.sbin/bhyve/bootrom.c index e4adaca55947..339974cb2017 100644 --- a/usr.sbin/bhyve/bootrom.c +++ b/usr.sbin/bhyve/bootrom.c @@ -31,6 +31,7 @@ #include #include +#include #include #include diff --git a/usr.sbin/bhyve/pci_emul.c b/usr.sbin/bhyve/pci_emul.c index 2f04a488d9c1..9d6060e3e254 100644 --- a/usr.sbin/bhyve/pci_emul.c +++ b/usr.sbin/bhyve/pci_emul.c @@ -42,6 +42,7 @@ #include #include +#include #include #include #include diff --git a/usr.sbin/bhyve/pci_fbuf.c b/usr.sbin/bhyve/pci_fbuf.c index 125428e0b772..1e3ec77c15b0 100644 --- a/usr.sbin/bhyve/pci_fbuf.c +++ b/usr.sbin/bhyve/pci_fbuf.c @@ -29,6 +29,7 @@ #include #include +#include #include #include #include diff --git a/usr.sbin/bhyve/pci_passthru.c b/usr.sbin/bhyve/pci_passthru.c index 9d38ae9168a1..a82078f6e036 100644 --- a/usr.sbin/bhyve/pci_passthru.c +++ b/usr.sbin/bhyve/pci_passthru.c @@ -38,6 +38,7 @@ #include #include +#include #include From nobody Sun Jul 27 16:32:21 2025 X-Original-To: dev-commits-src-all@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 4bqnFf1nwtz62ssY; Sun, 27 Jul 2025 16:32: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqnFd6XYYz3bF0; Sun, 27 Jul 2025 16:32:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753633941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rArJ4lre5HZrbQXTpjb+DyrJ+Gn2SnKqiecyLTdaFtU=; b=PJVP9ndLrymeiYLmVDhTzU0wDRRJ1rvAJFGeYu95fJiTAS8H/TeLwtRx0jrYl31JmJoLDk jKmLrpwC/ve2LNF3ErjX5c30Ct/ILlaREc9TyZkVlIL9xPNS7LGuWe8cpAZlmTDDeNEOk2 aY0RtFepz2xA6cLJ2XV8ct2sntvUk+IOhYzi+rtft+O8Rq9Y6wqpX4ia9JBQ0odgW+KFn3 Mnv6DcT8mLzCyWBHxVHzfVGK9Gi66DLqaL9EeXYTFVDcs3LOvJ9pvzEidU3RYHjREKmyDR fOE2o4mO1yQob3GUxKrT3rT8wU6zX8U5Fwn8CGzVMXUyfFcc/VRRJfFKpjUpEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753633941; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=rArJ4lre5HZrbQXTpjb+DyrJ+Gn2SnKqiecyLTdaFtU=; b=a8A+RzIgLJbRurclrl/l5krpb04XJmcKgDTxvCDKUqE1RO3yPvqTgj3T4W4do9GDby07b3 s8uAVYP1XJjpmIRrJlq1xziKeoYV1fJU23hVOPr9mDLnWr3omgQHqRQ32zysAfca8K5IzI tikwXVbkSxLsdKiEaIIDYRRxPUxEVeqTtJbOqIy0tp+rT5IUQr3Uv5DI7kioFL8SXJrCXx VBEw0faSS/YmvvgOH1kiYkubXVAgd/oAclJ6FSuJiGlKBQZCCsyE7dVKiYuTa/vDeM2et+ B3lh2YSP1WAB1IKNLClhJXey4kpAFkZJiIrbzGg6FFeQ8GnmeVQYvVwsKEQCGA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753633941; a=rsa-sha256; cv=none; b=o1D4sK+U5MRln0tEWeAavLtxisItaVR8wq5tzyEet4IptjfG4F3yJENJ1eTsJkE/FWeuR4 lL+VInznhLYOplPsbbMS5GalFLBFCLWt35lsC9MgYE/+vMA5xQIb2tcQFVCbZ+bEYaWC/J tnNJJf8SghSV/3Js6DjWEeGToWzFNFT3y1iPZjHmeQ1zSqFmBuq3TIgzsqe9sXNz1Dz+tH VOAT+LYSc3tEgwJCsiM59Quo9uEkrpZc4XmqgV2zEcgZrGQ5qrB1lyS7HAGU680y/9FgcK UAYXieH3KU6n6pkPAnbkzouqYQhwi+lVGYQ+5Y/Ah0q7eO7EIIItMKKJWAvR7w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqnFd5stQz1Lhd; Sun, 27 Jul 2025 16:32:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56RGWLd8015864; Sun, 27 Jul 2025 16:32:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56RGWLJH015861; Sun, 27 Jul 2025 16:32:21 GMT (envelope-from git) Date: Sun, 27 Jul 2025 16:32:21 GMT Message-Id: <202507271632.56RGWLJH015861@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bojan =?utf-8?Q?Novkovi=C4=87?= Subject: git: c7a1776752ec - main - bhyve/tpm_ppi_qemu: Cast address of the TPP3 field to uint32_t List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bnovkov X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c7a1776752ec01af741e3a8715ede72f61b313d6 Auto-Submitted: auto-generated The branch main has been updated by bnovkov: URL: https://cgit.FreeBSD.org/src/commit/?id=c7a1776752ec01af741e3a8715ede72f61b313d6 commit c7a1776752ec01af741e3a8715ede72f61b313d6 Author: Bojan Novković AuthorDate: 2025-07-25 18:00:54 +0000 Commit: Bojan Novković CommitDate: 2025-07-27 16:31:49 +0000 bhyve/tpm_ppi_qemu: Cast address of the TPP3 field to uint32_t Fix a format specifier issue when building 'tpm_ppi_qemu.c' with 'dsdt_line' marked as 'printflike'. Reviewed by: markj, imp Differential Revision: https://reviews.freebsd.org/D51535 --- usr.sbin/bhyve/tpm_ppi_qemu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/bhyve/tpm_ppi_qemu.c b/usr.sbin/bhyve/tpm_ppi_qemu.c index 01b8493e7273..6974b574b983 100644 --- a/usr.sbin/bhyve/tpm_ppi_qemu.c +++ b/usr.sbin/bhyve/tpm_ppi_qemu.c @@ -207,7 +207,7 @@ tpm_ppi_write_dsdt_regions(void *sc __unused) * Used for TCG Platform Reset Attack Mitigation */ dsdt_line("OperationRegion(TPP3, SystemMemory, 0x%8x, 1)", - TPM_PPI_ADDRESS + sizeof(struct tpm_ppi_qemu)); + TPM_PPI_ADDRESS + (uint32_t)sizeof(struct tpm_ppi_qemu)); dsdt_line("Field(TPP3, ByteAcc, NoLock, Preserve)"); dsdt_line("{"); dsdt_line(" MOVV, 8,"); From nobody Sun Jul 27 18:19:58 2025 X-Original-To: dev-commits-src-all@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 4bqqdp4Y8vz62yhT; Sun, 27 Jul 2025 18:19: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqqdp3kV6z3qjW; Sun, 27 Jul 2025 18:19:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753640398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wjCrR3kyteIYuLf8t09W4/Z8C8Xjpzw0Es+Xr8mWFn0=; b=NAR//0AfO5BDda8gnLuB1dXx0r2RWmjCghhuXdUYcTjrxoBBLlJsKCddQef89iadbskure 4nrf3LAtAp95CAyqZjJb6rTam6WpEafwkS2wbdMxMLvtuad4WHr6zL5vLXT2VbJoLRfmSe oIZ5ZZgPP9/YFJ9dCSNA+TL7Mxg4eqyAd+aRMg+CHXVXiR7ZMuBoa51NYeaqkZE0vkvZ+y PNf6vjCXcREBK8ut40/Rpp29D2tQINj4R2g/SrAL5br+312bSUMRT4AJIrP3eYVLJ/30W/ nEd/ZSrQBPFLKcPPdS4j+ItVvYwVseImc+zSYEeiM3zdwyS6gAckg1lsQp6rXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753640398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wjCrR3kyteIYuLf8t09W4/Z8C8Xjpzw0Es+Xr8mWFn0=; b=sqaI0+ABEaC2QtSpwZTglvWwOQBF8dgRpmeg/Iux1VejSZ+xf/aVZ8LFWA1SahU7BJUXg5 l/gqmjphvveCu3S5WRBFiCRQCn5k2KMqxV/Lku7Sm+nSoUWPWrY+LR8TIUqweCYtNM0YDG UPrv68yMxO8u7GYD2Nq9FxLH2fjZxJGrFCoetvevHwycYxXOCWAgFiE+SRPLsy2toren3m 8rBIXu3YCs50XTiPy52uaGz/Aj37lnA6mL4m6GynFLRdwex19L2GnYAj9lccpmplam/VEn 75itM1+bfi4hfnYZKPMudA5vHZ5wrjSa0rzlNEsxrJXN5xCRXMUvIT8cUYK7rA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753640398; a=rsa-sha256; cv=none; b=NZwM1DfzgYvS1wsXS4FUsOb+lanloAWPUJpsm45o3cvS1oFIQ0gju6rGPHK0t0ZhCrykO0 nqjCfLixKFmTCKpKYeXESZhy2lQFQc0DjeVmMqn3ijSE7dji7G6XuhSWTdeX6x/O3g50LT lhBCA6FSVUFwsWO/xAljetcWRDVvRDwstXOvURTlLcnHJmdocDP1B71b8hWBNcpdJ3pMea 9LPM9Mi/XY9sgYoKmILM7y9As/FpaOEtUZPJZPeRWzpH7t1judxEsznIXS3PLmbGgPz2mL ZPnsu0Y3HuWDQ1CVXRmyPxJ3m6JaYxoU6GldfkGhq+9bTYbLfYVO5s4XW3XPww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqqdp39LSz1P2H; Sun, 27 Jul 2025 18:19:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56RIJweI006414; Sun, 27 Jul 2025 18:19:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56RIJwVV006411; Sun, 27 Jul 2025 18:19:58 GMT (envelope-from git) Date: Sun, 27 Jul 2025 18:19:58 GMT Message-Id: <202507271819.56RIJwVV006411@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 6c4771c73470 - main - krb5: Remove includes from autoconf header. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6c4771c73470c78b1a71949783114560ad79d99e Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=6c4771c73470c78b1a71949783114560ad79d99e commit 6c4771c73470c78b1a71949783114560ad79d99e Author: Dag-Erling Smørgrav AuthorDate: 2025-07-27 18:18:59 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2025-07-27 18:19:32 +0000 krb5: Remove includes from autoconf header. These #include directives are neither present upstream nor needed. Reviewed by: ivy Differential Revision: https://reviews.freebsd.org/D51564 --- krb5/include/autoconf.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/krb5/include/autoconf.h b/krb5/include/autoconf.h index 24039611c7e7..a5e2ea5838b0 100644 --- a/krb5/include/autoconf.h +++ b/krb5/include/autoconf.h @@ -5,9 +5,6 @@ #ifndef KRB5_AUTOCONF_H #define KRB5_AUTOCONF_H -#include -#include - /* Define if AES-NI support is enabled */ /* #undef AESNI */ From nobody Sun Jul 27 21:02:08 2025 X-Original-To: dev-commits-src-all@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 4bqvDx1y46z63760; Sun, 27 Jul 2025 21:02: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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4bqvDw4VvYz49Lg; Sun, 27 Jul 2025 21:02:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753650128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+vYdt3idIwo8AkZ8YZDHQcMjTHa8R18juz+3nmVAgaA=; b=RNGoCkeLMQ9dEmYYvmyVBCouN/v4lils1/OpwtnJJBKe5AJx8ivLsz38NNYQW1O+qB583I K+OEwd38+5i7S3QGbP+dvWjDGelgLoPm40F++e6z/RXHGc/uP/TFWLdNP/A3EBgk8wiLf7 N0nU+2sltWyuhm6kAJiRXAc7T6yyLFyveJ8IuQf0fZU5MLCeMsdleHwy8CdcdFeCqH1alh cru72yP1eQG114sArmpqf4vAbOyuC1PmIPZ1exxV+W8oU78LKYpaj4cyAT4oZr+6eTkQSW McCSUHMCd5jHPDFx6xidu9Z1+6LBULEU5Y9K/efrWIr+1eur8sqBtUmwVfWHvg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1753650128; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+vYdt3idIwo8AkZ8YZDHQcMjTHa8R18juz+3nmVAgaA=; b=lHHBY9USviSP1FkZpqm7xer3TkDnU7ASaHkwNOgL59N9wLYOJd4RTB0+xCW9KUIzMteNpv Xvc8cxabnCnX1dmHMt/1QXHiE0nHNBGOsyaBarCkrVStlXMG6CwPoV7eDZW0MUNm/V9ZAK 2mp8KIQ+FC82v7BsV6YsEu6rXzk2iFDYhU5dNk2PNw2JWep+2WY2ZddAmwY3wtwhtppDCo Lb+mlpZ/v8Fu9rSlupclmyWyE5/Qc6Eqr6rx+lDOGb9QSh/aT69FbUHA6Y4QHocMe9Iv8q wwSws1UXe+7PWe4ZHXyhMZenycHsxYc3GsP5D96WMFEVqtJYhLu98TmTSATQwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1753650128; a=rsa-sha256; cv=none; b=InPQzScFp26YvizVCxlFjniUmQ92KfRDcXpjSnhO8JbdUz8Asyavor12T1CcPJ/Jk17WR8 EzZVTkXZFCIr+9vXtOkSLWh3LbMagEMCIjLZhwWUMXrgt6GUtriIzQcZd2iD4T83eNipUI m0yT0zDg5fGUAejHmorRdzriJiUoA7V3CCrp2xmdYcLDVPfE9NsQhkuRV4wScdXAfpuYIj M6M9VlQi6oRzt0iiJk3YmRWIEEwsFwI2BJaMaYEBgzq+6bmnmj/pWrPZLvgKE6mFwKVYzt YSxuMfGlB9XJJTC/YhAA1yWh4ezEAfvgh/A8vB2FsIFDQwI08qUG4EL9KIzatg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4bqvDw46SXz1ZM; Sun, 27 Jul 2025 21:02:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 56RL28hr023737; Sun, 27 Jul 2025 21:02:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 56RL280R023734; Sun, 27 Jul 2025 21:02:08 GMT (envelope-from git) Date: Sun, 27 Jul 2025 21:02:08 GMT Message-Id: <202507272102.56RL280R023734@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 92c3796d05dc - main - GitHub: Use a link for CONTRIBUTING.md in comment List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@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/main X-Git-Reftype: branch X-Git-Commit: 92c3796d05dcac6e0acedee3db83c32b5c22836a Auto-Submitted: auto-generated The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=92c3796d05dcac6e0acedee3db83c32b5c22836a commit 92c3796d05dcac6e0acedee3db83c32b5c22836a Author: Ed Maste AuthorDate: 2025-07-16 14:54:14 +0000 Commit: Ed Maste CommitDate: 2025-07-27 21:01:55 +0000 GitHub: Use a link for CONTRIBUTING.md in comment Make it easy for contributors to find the referenced information. Reviewed by: ziaee Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D51346 --- .github/workflows/checklist.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/checklist.yml b/.github/workflows/checklist.yml index 7f7b0d51f46e..ecc3939f34b8 100644 --- a/.github/workflows/checklist.yml +++ b/.github/workflows/checklist.yml @@ -89,7 +89,7 @@ jobs: /* Loop for each key in "checklist". */ for (const c in checklist) msg += "- " + c + "" + checklist[c].join(", ") + "\n"; - msg += "\nPlease review CONTRIBUTING.md, then update and push your branch again.\n" + msg += "\nPlease review [CONTRIBUTING.md](https://github.com/freebsd/freebsd-src/blob/main/CONTRIBUTING.md), then update and push your branch again.\n" comment_func({ owner: context.repo.owner,