From nobody Mon May 18 09:14:16 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gJsZ11kCnz6f32j for ; Mon, 18 May 2026 09:14: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gJsZ0694lz3xMp for ; Mon, 18 May 2026 09:14:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779095656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zCTWJK0wZ2eKeYkN0aUoWo1RANS+2CM47BNZzmMKskg=; b=OK+W+ApgbTyvOP2cI+VEyadGRK0SaqJg76HnBLbzKSAkr5KXisoCPkBecd5Dmt1es0WX5D cyGsA1pae7N2stNc3jOUi7R20RWBBZhR2KWK7/NtVIPaZJiGzURQ60ed/3FMF04DtIRQra EHvtxrbeIGB9MA/JZPShusQKzX5VRLU+qdkIVxCiMjpLp+rrOZ24oO4mPuGls4CktIa3Qf +F1R9G0khhZerkEgzieAE6/uYA9VBAaUIueHo53eXcendRIvl7fj/SsBP8g+YVGpgPfILH XmrMlb6LIKE8Sr5568yhna9/X7zAVc9w0bmLl8xuG4eIH2Zp8gbzUZei5+yGEQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779095656; a=rsa-sha256; cv=none; b=aEo1IjB+cigJNegolnMHBhKSN/X5QwAYEwgpfJxIaLyPAIrkg+0pRDrEkLt1XnE+1aljiO i6BxU1oxIVhpg489tHGyaAPoDk7cXFrV6O1OBja2L4SJbLB9Hh1Q9Ti1MC7jDl0ldvH0A2 eyFoWiefkU3oo3tqAb/iWQGct1sOC56WmSZ0HgJYA4HU6orXrR2YJEKZCVQNyWIXKMZjg3 8rG0/2UJx51CuLCFyWqawpSJ1js6Pk/pEuS4/08Uk5Im/QU1vm4d7SVyoSc2V3VmXvLdYD pPwvaPixY2B0R439nxszxnpSxjN2SCKF4SknNAvyMinNn3uugL5JHQQT/FeEUg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779095656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zCTWJK0wZ2eKeYkN0aUoWo1RANS+2CM47BNZzmMKskg=; b=ytcp4QXGI5w4U9DU42Hooo0wOplOF+w3ce5bFwwpUlLvXFQmwMOHHoCuSNelgm4F3aQxTb TxC+Ri651hbwSzayiW8YZiRA7GeX0O9sTdMLjgYwsqEKKAxfUJkS7pkW8ZsKgJ6bDC5KrX Ctzbq4CD+U7dGe7Iv6DnVMCYxUSo2pSs90CFTOFkSsWW9B9DKYE0MM2yFpt5quveHcQofQ SYqA/Wsy5x4Useumbn0fSldJiImQLbaHJpGBv65ISMgTNtRnFOAlGLRMa13N4aLlSCkDAU NMPWrtJ8apcE23Pvo3W56cT5L7Mh5hVbO0T6Jf4NMMzix2Eevc4jP7FNzXww6g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gJsZ05YLcz6Hq for ; Mon, 18 May 2026 09:14:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3bf87 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 09:14:16 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 30f500e97b57 - main - p9fs.4: MLINK to virtio_p9fs.4 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 30f500e97b57d36ebb8483cb8b8921507350cd0f Auto-Submitted: auto-generated Date: Mon, 18 May 2026 09:14:16 +0000 Message-Id: <6a0ad868.3bf87.78b2a5bf@gitrepo.freebsd.org> The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=30f500e97b57d36ebb8483cb8b8921507350cd0f commit 30f500e97b57d36ebb8483cb8b8921507350cd0f Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2026-05-15 12:05:46 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2026-05-18 09:12:12 +0000 p9fs.4: MLINK to virtio_p9fs.4 Technically, virtio_p9fs is an emulated device that masquerades as a p9fs mount, but it does not make sense to have two separate manual pages. Reviewed by: bnovkov, dfr MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D57013 --- share/man/man4/Makefile | 1 + share/man/man4/p9fs.4 | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/share/man/man4/Makefile b/share/man/man4/Makefile index 4f067f3ef757..0b94158659fb 100644 --- a/share/man/man4/Makefile +++ b/share/man/man4/Makefile @@ -784,6 +784,7 @@ MLINKS+=${_nfe.4} ${_if_nfe.4} MLINKS+=nge.4 if_nge.4 MLINKS+=openfirm.4 openfirmware.4 MLINKS+=ow.4 onewire.4 +MLINKS+=p9fs.4 virtio_p9fs.4 MLINKS+=pccbb.4 cbb.4 MLINKS+=pcm.4 snd.4 \ pcm.4 sound.4 diff --git a/share/man/man4/p9fs.4 b/share/man/man4/p9fs.4 index c50720b6ebc8..8c65c77c3454 100644 --- a/share/man/man4/p9fs.4 +++ b/share/man/man4/p9fs.4 @@ -22,11 +22,12 @@ .\" (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 May 15, 2026 +.Dd May 18, 2026 .Dt P9FS 4 .Os .Sh NAME -.Nm p9fs +.Nm p9fs , +.Nm virtio_p9fs .Nd "9P file system" .Sh SYNOPSIS To use this filesystem, From nobody Mon May 18 13:03:42 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gJyfk3RX4z6fL0J for ; Mon, 18 May 2026 13:03: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gJyfk2pbxz3KVB for ; Mon, 18 May 2026 13:03:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779109422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8WClzMSV7v9YhtfpcnwwYOQ0FHoLYY3MBJUTOkkqcrA=; b=su/l5lXbO0nj/wBj+vsb8Rp3brNKGdTx3hUcOl1scyWkRNJDSl6z65iR1xV3LhZj9Oj3Xj 9naNGi0RRoVz1lIkTqN/8f1QlzEcIN3iNZkdRGKqIvIstvWF+Ofi87Zubcbl7bajfmv/+Y UJ/RB8/lBGRYP50hUkxg41sD8CVNJ4rUZnLA5vl+WNNAoT7QA0WEDI0wT6D7qioIZVn/X1 FttHNKWd4xVWt2wg2lMnYHoQfxmDXB+UQQx0+4vS5Mvi9KIZhdEH4JFq12gBoA2MfNlCBv q+dccTJgTCfg1zDQBrcYK741DWIXms1IAPXHqSvpaay7ZkBxQ+4SiLzkrl+/qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779109422; a=rsa-sha256; cv=none; b=qahuMM/0Ggk3bskfkt2JS2brwQYZMpV9G0ZHjKUmVJau9W+UTuGwbQB0Cd/nGdlefptkBH /EpS6eAz9/huTjytUTSNFsMaUKhAfhve0vjFt252Oftd0v3NEKKE2eC4CvU8E6ctoRp2hL dTLjXNhkwlIaBRTC3SWQZ4dWMruGdQcX13nmcPPaeffS3tRYUwsA4fFLU+1Ld1pJm1KxgP 6eAzC+qqc0dQpOhUhYvO+TtE0SF4TZ/3Qc6Vl5eDEP3S/+jLBoyCg0FpW0y+s7IYGqPbun mexrl0tqU7gfVNGZtfLE+MZ1295mmOP24K78wrdobFj+uhB1T0yzEC33ayWowA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779109422; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=8WClzMSV7v9YhtfpcnwwYOQ0FHoLYY3MBJUTOkkqcrA=; b=FE84Xp1WuHTPe8hB9m03Uo0JZmJKy6BJnYenCZPKCM1ogFE59VKNTm+1z9M1uTHHvIMQYB m8py7W2nFJWCk5eiVZJ0MJd9CjGFp/u/Y4Obh2BQSv5fkz7EVLPfLQDdpHesc/U17qKkcP aH57twDrp9TfkgSOn4E5V7CrVUy3J0c8Va+B9dA6ctnWSHB1yQP9SmnMZ7s4kgmWM1ei7b w9ql3tb5UbHPDzKGBbXsIf2jSZS7N8Va+pIZrgTAQ+ChWMbmIVISnh4smfeGez8b+ujBUR cxrEbDcP01fFAyJSndY7nHYfNoEemNp+n1+xYjzXlE9uAdKbJRf9+HVSKGU7cQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gJyfk2Kk3zDH0 for ; Mon, 18 May 2026 13:03:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3347f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 13:03:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 0b0e5daf4333 - main - openssh: Fix SIZEOF_TIME_T in freebsd-configure.sh List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 0b0e5daf4333a0faf93133f7d2c7b3743eead9d8 Auto-Submitted: auto-generated Date: Mon, 18 May 2026 13:03:42 +0000 Message-Id: <6a0b0e2e.3347f.60152b26@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=0b0e5daf4333a0faf93133f7d2c7b3743eead9d8 commit 0b0e5daf4333a0faf93133f7d2c7b3743eead9d8 Author: Ed Maste AuthorDate: 2026-05-17 17:05:26 +0000 Commit: Ed Maste CommitDate: 2026-05-18 13:02:33 +0000 openssh: Fix SIZEOF_TIME_T in freebsd-configure.sh Sponsored by: The FreeBSD Foundation Reviewed by: jlduran Differential Revision: https://reviews.freebsd.org/D57053 --- crypto/openssh/freebsd-configure.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/crypto/openssh/freebsd-configure.sh b/crypto/openssh/freebsd-configure.sh index 28c9564435b2..0444527e633f 100755 --- a/crypto/openssh/freebsd-configure.sh +++ b/crypto/openssh/freebsd-configure.sh @@ -55,3 +55,10 @@ diff -u config.h.kerberos5 config.h | diff -u config.h.sk-builtin config.h | sed -n '/^-#define/s/^-//p' | grep -Ff /dev/stdin config.h.sk-builtin > sk_config.h + +# Fix 32/64-bit time_t defines +sed -i '' 's/^#define SIZEOF_TIME_T 8$/#ifdef __i386__\ +#define SIZEOF_TIME_T 4\ +#else\ +#define SIZEOF_TIME_T 8\ +#endif/' config.h From nobody Mon May 18 13:03:43 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gJyfl5crwz6fKX6 for ; Mon, 18 May 2026 13:03: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gJyfl3Zntz3KdZ for ; Mon, 18 May 2026 13:03:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779109423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AmdfsY6bW3Dz2XeTE0fxJ3zpewTIKxHxA97MKM0t2kw=; b=SiE3ngn1T//Ovh3V8BamTInDIbSlTa1Xqwwls/kbcrauHR+OegNVXb6JrTBV+OUBXI765h eQZjaVUJYPbf5Y/eBbguQlcQvv/bbwFsMT9EMKgMjMOIWMQniANl7m4z6INxaehK2Wt9SU nq8SYh/J8QLigiGQh9xcK5wnAptktpK6hWkoa6Fd/OT990qn45Tqe9d9iz24tBDRzl6tWe XW8hBpivvWkn2pd5YtGhsb4FELLzaLXWZ+iJjgAIfMHILZK4hY1n4L95Fwt6L4+oLb5l1p QI4xVsMvuOfY8dZJkakmQYYV1mX6Q2tZoJJoNlBlYcvS/UZsmptn6lO1n3nGcQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779109423; a=rsa-sha256; cv=none; b=bXnAsqd7yzSm0YKzOorskeYryxdevW/SnbBTvZtBEuc/PnwMVQGAacqV+v7KSD7hUp1QCH ZH4xaTvwYHW0oZp0+CInbwlYbKWEI+OqLKe2b91Zo39wj87Z4/Xa/mcLdc7dp3fERlGhTR N1/Um49fuBQnSEyQqAZTeyNdxl4f8RDdrK78Ms77Ae5d8lUsMIf9Gs8XasE4vr1/hrRAEA 2JaL/J1amD2rSfUIqCYB+bmt3A1t6h219CaoW7awQnrgKmaMu7g+GFQxcFenNU5Yd0FYbA BiceQCrLuHnsa3HxyB0HIQksa2s1Hj96XVC8nwiyqvow27gDb7Mnr3xM1rSAvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779109423; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AmdfsY6bW3Dz2XeTE0fxJ3zpewTIKxHxA97MKM0t2kw=; b=O67iJyJYxLIlMSsHxQeMNL9eMDi+tMboW5naz1cTx0JBZHUas5qH2Sltj9/b9DsfWGxYc7 QRrMxoIuxg/X4thHl62dR9DEjQ16/87yecKZjE3MrLhG/lY5EDcvDWfO2uaBbZAJgKA3IE xO+cNH4VcXIYd1UcDlx76X4sbJs8ElrLmy7e/5O8Glqv5eKmMyBLS+sDLyOfuS8Mn1NDaa JmlxeQ6HsP8Tp9j1mbZeDAsvZnP6hIRioUv0d8IIT4AkEw4GwoqC4w/7mbqPgLUUat/3AG RLc8ONgy46fFmuy3w2CMGE4D5C8RU8cGNfZcqdywuKK4Cuhnec/R1ORUsBRLQQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gJyfl37kHzDBC for ; Mon, 18 May 2026 13:03:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 33f11 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 13:03:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: f5993872faf5 - main - openssh: Regen config.h to fix i386 SIZEOF_TIME_T List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: f5993872faf5dbd5c142857e9633b11e330f8c38 Auto-Submitted: auto-generated Date: Mon, 18 May 2026 13:03:43 +0000 Message-Id: <6a0b0e2f.33f11.1c86c810@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=f5993872faf5dbd5c142857e9633b11e330f8c38 commit f5993872faf5dbd5c142857e9633b11e330f8c38 Author: Ed Maste AuthorDate: 2026-05-18 02:52:12 +0000 Commit: Ed Maste CommitDate: 2026-05-18 13:03:02 +0000 openssh: Regen config.h to fix i386 SIZEOF_TIME_T Fixes: 2574974648c6 ("OpenSSH: Update to 10.3p1") Sponsored by: The FreeBSD Foundation --- crypto/openssh/config.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crypto/openssh/config.h b/crypto/openssh/config.h index 69bc79c92bb5..b922734d01b3 100644 --- a/crypto/openssh/config.h +++ b/crypto/openssh/config.h @@ -1921,7 +1921,11 @@ #define SIZEOF_SHORT_INT 2 /* The size of 'time_t', as computed by sizeof. */ +#ifdef __i386__ +#define SIZEOF_TIME_T 4 +#else #define SIZEOF_TIME_T 8 +#endif /* Define as const if snprintf() can declare const char *fmt */ #define SNPRINTF_CONST const From nobody Mon May 18 14:09:39 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK06x0lqVz6fPxw for ; Mon, 18 May 2026 14:09: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK06w5b9Jz3S29 for ; Mon, 18 May 2026 14:09:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779113384; 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; bh=X3WxHdvBlsPdkCo3oRqBRYReRiGM7mqMAhV81gL74cM=; b=b8XEpy14UzA3r4vjhJdAbJgRg1I0jNQkt5mVVUnd6KAIvCt2OVkrOp2DXA8ePS9SmgpmqK 15hTsBDMJprld6A764ruG2QYLg0ngbUlrfnvvhu5T45kFoZ+k9HIljXayzXdhobEDJ3PBt HuZOSW456um/1gad/+ke4bsOdlMyJ3IaHDv+A9EUC+ZoQdlJ4GCNYP+2V+HbgQu6D+Rtk+ lgBxuc2srcEBd8uJ5cFi2vw/vkSzCvpWL1RQD2DckkZKxBm6tBgfafXH/MzHfaLNo+zmUA 8/jkFuq7uIDn3v40lHBzvE3eS1WZdS/bEvYrxEL4mssOXPgXuYzSV7eoeKPqaw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779113384; a=rsa-sha256; cv=none; b=b7CnTkqlSIHdCWQJLxYVdqQNBGms1a/myrJujJH4z2buYAUbu0wcHb6zRSkVHLA3cCu4Ws fhifFArsU5Lcn+YWg1aK6Krlq4RH7f9UR69VW+wgDjD7T894Unxj0arnDuKhVnClVvd3Au IdwezjJlNLOFRo9nBLiOps5Vy2M8tKB0O9qPOaCpVRvuJ672anDo6k8gHh3mt7kUBoo2hz WbiGyZ1H1mOyo+B9X3qyiCoqNZNA8ICSRt/vqLqhFLGstjSUCHSlHjmy1AuQudfVfq3/Sy Qc1svtuzxrjnydNINQ08fRCbun2v7TJUnrvr04RBU5DSqABft2BNiS1Rizfmeg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779113384; 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; bh=X3WxHdvBlsPdkCo3oRqBRYReRiGM7mqMAhV81gL74cM=; b=ajZUCnFRx4r+A2xlhZznaxzfqYV3Kr79HfyADAAeeQzmCn0oN4c8uz+pvxQbkh90lpPilF lDdw6JU6KX/GQCxKuEXSkta+CqjTsWIYapQaQNHJQS4oZxCy0PdA6uVdrMjdc1MJGLIoe3 gs3odRYcxCLjpvH2Tqi5q2r9bu8Elq8nLGhwHivRKOdu/S9I7nIk4ZswjgEn7we1kQmAHU +JPhJ6FeqgERf26d6sTt8YhIm4g0itHEgmFx3Uz7xdENKCgEGKbeBT3LYoHQuBGa2uw6fF vGHXCN0KDlz5mbJaKr+zlmZpEeMWuwhH6JCDxmHL4w/Lr9Z4bh9JhB4fTWw9cA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK06w4m1nzWYZ for ; Mon, 18 May 2026 14:09:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39eff by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 14:09:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Abdelkader Boudih From: Adrian Chadd Subject: git: 3abc07947c14 - main - asmc: fix asmc_key_dump() page fault on T2 MMIO backend List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3abc07947c14f5c30e5328d56a2da8dbf8412ebf Auto-Submitted: auto-generated Date: Mon, 18 May 2026 14:09:39 +0000 Message-Id: <6a0b1da3.39eff.45013213@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=3abc07947c14f5c30e5328d56a2da8dbf8412ebf commit 3abc07947c14f5c30e5328d56a2da8dbf8412ebf Author: Abdelkader Boudih AuthorDate: 2026-05-18 14:01:20 +0000 Commit: Adrian Chadd CommitDate: 2026-05-18 14:01:20 +0000 asmc: fix asmc_key_dump() page fault on T2 MMIO backend asmc_key_dump() used I/O port macros (ASMC_DATAPORT_WRITE/READ, asmc_command()) unconditionally. On T2 Macs, sc_ioport is NULL (MMIO backend is used instead), causing a page fault when ASMC_DEBUG triggers asmc_dumpall() during attach. Add an MMIO guard at the top of asmc_key_dump(): delegate to asmc_key_dump_by_index() + asmc_key_read() for MMIO devices, consistent with the rest of the T2 code paths. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D56748 --- sys/dev/asmc/asmc.c | 36 +++++++++++++++++++++++++++++++----- 1 file changed, 31 insertions(+), 5 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 8cd7842d03fd..30c5da698361 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -45,6 +45,7 @@ #include #include #include +#include #include #include #include @@ -1090,6 +1091,27 @@ asmc_key_dump(device_t dev, int number) uint8_t maxlen; int i, error = 1, try = 0; + if (sc->sc_is_mmio) { + uint8_t len = 0; + char mmio_type[ASMC_TYPELEN + 1] = { 0 }; + if (asmc_key_dump_by_index(dev, number, key, mmio_type, &len)) + return (1); + memset(v, 0, sizeof(v)); + len = MIN(len, sizeof(v)); + asmc_key_read(dev, key, v, len); + struct sbuf sb; + char buf[128]; + sbuf_new(&sb, buf, sizeof(buf), SBUF_FIXEDLEN); + sbuf_printf(&sb, "key %d: %s, type %s (len %d), data", + number, key, mmio_type, len); + for (i = 0; i < len; i++) + sbuf_printf(&sb, " %02x", v[i]); + sbuf_finish(&sb); + device_printf(dev, "%s\n", sbuf_data(&sb)); + sbuf_delete(&sb); + return (0); + } + mtx_lock_spin(&sc->sc_mtx); index[0] = (number >> 24) & 0xff; @@ -1150,19 +1172,23 @@ out: maxlen = type[0]; type[0] = ' '; type[5] = '\0'; - if (maxlen > sizeof(v)) - maxlen = sizeof(v); + maxlen = MIN(maxlen, sizeof(v)); memset(v, 0, sizeof(v)); error = asmc_key_read(dev, key, v, maxlen); if (error) return (error); - device_printf(dev, "key %d: %s, type%s (len %d), data", + struct sbuf sb; + char buf[128]; + sbuf_new(&sb, buf, sizeof(buf), SBUF_FIXEDLEN); + sbuf_printf(&sb, "key %d: %s, type%s (len %d), data", number, key, type, maxlen); for (i = 0; i < maxlen; i++) - printf(" %02x", v[i]); - printf("\n"); + sbuf_printf(&sb, " %02x", v[i]); + sbuf_finish(&sb); + device_printf(dev, "%s\n", sbuf_data(&sb)); + sbuf_delete(&sb); return (0); } From nobody Mon May 18 14:55:18 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK17W0Jvxz6fTHp for ; Mon, 18 May 2026 14:55: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK17V6hc2z3Wwm for ; Mon, 18 May 2026 14:55:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779116119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=67ynpaMnse+4MtesaNI1RhPUHmmQ1TlQLR+pxbxZ01M=; b=jovoxUtbpme2hfddBI2DHozvB/+Yk5WPyREMD2PCce9XOPQ1CZ39ywVV+CmEILHmXphYc+ mwxuwNS7hbFPWCeQlUaBQslKYev5pXD/v28p/K7hh5F4y8D1ejtiEyMMqzn/N5vXcQjacC JGWpDdize2ByTqzh7ilDWdkdDis4NKZpEmKO52UQcR7bK7HZyDW5QW4Q5XUhpzv8rG3o4X MDeUNp+hO/nS7ztC5XZkdEeitDLKlUWmgLTPV/d93q7f6jK1gv2yraM8kPy3kv00FFVVOy QnKeg2XFmxjGUt0FXG8adLEwHrNtNQcJ+jEHxYHC0KE0yREnIEZqsDruJ793fA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779116119; a=rsa-sha256; cv=none; b=DX/eQbUwJfCSEdPmpWBwRTlsAtVrB/U+ZQr4x+gYWCe1CgpHe567DID1RBh0KgM01eSyUj fWgfEosaukUnRJd3Y2UcpB8EtiuxJ+PQ1edSoEosBYlzZosui7AwbtO1EpjYrCWg/CWEbZ 9OAP/YXcRsB0NQj4wsmS6DZYAbDP0NvZuPLpJiM+uisVpI6bxvUBfRc38atjMJbHRJti8X 3qsDX5jp2yOYBQexJTVcbHibMPQszYxbYbxvUpfhttAm10uHOKfvJLAdnkcFlP7aAdUkLE B6V5EMQoaKvcBuQoPL1aAcmx6D91hZ1vxsIYicn/E1mqaqUnony2iva92HeBjg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779116119; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=67ynpaMnse+4MtesaNI1RhPUHmmQ1TlQLR+pxbxZ01M=; b=nbiFIXpy9B8SAjqBt81abwK6muQZMYZhj5RvzMV8psJuTBgMciEAVl1fJ5k2yErNYrfESO 4YEropO++RpPuIcstnDavuGAzQ+T/CbJMtTjQoyJzsHb+a62rRe8/v0/b1zkI7v2GdRlf+ D/QHrGaHagstDfbch+1G9BcKKgRo0HVXFfn40D4cVsVoQhljxc9cse1ON7qCAJoxDLIPJF vhcG6/zQ2zREHLwmvuCUHaciSaJV8ydhNKLkVP/4Oqq3+M94ZpTl2jPfgZZ2iKg2U+JoUO tfNm/8qHwiwaOiciQuIB5N5N5AN+ri2D+BNXY9Q0y/VjrmOItjTMW3lVnj7z2Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK17V6H1CzYyH for ; Mon, 18 May 2026 14:55:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cf65 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 14:55:18 +0000 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=B8rg?=rav Subject: git: 2af70d7a3849 - main - tcp: Make RFC 6191 support configurable List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 2af70d7a384934cee497fb6d75678e04f1416287 Auto-Submitted: auto-generated Date: Mon, 18 May 2026 14:55:18 +0000 Message-Id: <6a0b2856.3cf65.c81425b@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2af70d7a384934cee497fb6d75678e04f1416287 commit 2af70d7a384934cee497fb6d75678e04f1416287 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-18 14:50:14 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-18 14:50:14 +0000 tcp: Make RFC 6191 support configurable Add a default-on per-VIMAGE sysctl for RFC 6191 connection recycling. This makes it possible to merge the change to older branches where it can be switched off by default to minimize risk. MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Modirum MDPay Reviewed by: pouria, marius.h_lden.org, tuexen Differential Revision: https://reviews.freebsd.org/D57045 --- share/man/man4/tcp.4 | 11 ++++++++- sys/netinet/tcp_timewait.c | 58 +++++++++++++++++++++++++++++----------------- sys/netinet/tcp_var.h | 2 ++ 3 files changed, 49 insertions(+), 22 deletions(-) diff --git a/share/man/man4/tcp.4 b/share/man/man4/tcp.4 index 4c01daf4e14e..8bc1eb858a07 100644 --- a/share/man/man4/tcp.4 +++ b/share/man/man4/tcp.4 @@ -31,7 +31,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 7, 2026 +.Dd May 17, 2026 .Dt TCP 4 .Os .Sh NAME @@ -940,6 +940,10 @@ maximum segment size. This helps throughput in general, but particularly affects short transfers and high-bandwidth large propagation-delay connections. +.It Va rfc6191 +Enable RFC 6191 connection recycling, which allows faster connection +recycling in certain circumstances when the new connection has TCP +timestamps enabled. .It Va sack.enable Enable support for RFC 2018, TCP Selective Acknowledgment option, which allows the receiver to inform the sender about all successfully @@ -1145,6 +1149,11 @@ when trying to use a TCP function block that is not available; .%T "Improving TCP's Robustness to Blind In-Window Attacks" .%O "RFC 5961" .Re +.Rs +.%A "F. Gont" +.%T "Reducing the TIME-WAIT State Using TCP Timestamps" +.%O "RFC 6191" +.Re .Sh HISTORY The .Tn TCP diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 4f4ca445fa46..276733066c30 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -91,6 +91,11 @@ #include +VNET_DEFINE(int, tcp_do_rfc6191) = 1; +SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3465, CTLFLAG_VNET | CTLFLAG_RW, + &VNET_NAME(tcp_do_rfc6191), 0, + "Enable RFC 6191 (Reduced TIME-WAIT State)"); + static u_int tcp_eff_msl(struct tcpcb *tp) { @@ -223,29 +228,40 @@ tcp_twcheck(struct inpcb *inp, struct tcpopt *to, struct tcphdr *th, } /* - * If a new connection request is received - * while in TIME_WAIT, drop the old connection - * and start over if allowed by RFC 6191. + * If a new connection request is received while in TIME_WAIT, + * drop the old connection and start over if appropriate. + * + * The original rule is to start over if and only if the sequence + * number of the new connection is greater than the last sequence + * number seen on the old connection. + * + * Additionally, RFC 6191 allows restarting if the new connection + * has TCP timestamps enabled and either the old one didn't, or it + * did but the timestamp on the incoming SYN is greater than the + * last timestamp seen on the old connection. + * * Allow UDP port number changes in this case. */ - if (((thflags & (TH_SYN | TH_ACK)) == TH_SYN) && - ((((tp->t_flags & TF_RCVD_TSTMP) != 0) && - ((to->to_flags & TOF_TS) != 0) && - TSTMP_LT(tp->ts_recent, to->to_tsval)) || - (((tp->t_flags & TF_RCVD_TSTMP) == 0) && - ((to->to_flags & TOF_TS) != 0) && - (V_tcp_tolerate_missing_ts == 0)) || - SEQ_GT(th->th_seq, tp->rcv_nxt))) { - /* - * In case we can't upgrade our lock just pretend we have - * lost this packet. - */ - if (INP_TRY_UPGRADE(inp) == 0) - goto drop; - if ((tp = tcp_close(tp)) != NULL) - INP_WUNLOCK(inp); - TCPSTAT_INC(tcps_tw_recycles); - return (true); + if ((thflags & (TH_SYN | TH_ACK)) == TH_SYN) { + bool rfc6191 = false; + + if ((to->to_flags & TOF_TS) != 0 && V_tcp_do_rfc6191) { + rfc6191 = (tp->t_flags & TF_RCVD_TSTMP) != 0 ? + TSTMP_LT(tp->ts_recent, to->to_tsval) : + V_tcp_tolerate_missing_ts == 0; + } + if (rfc6191 || SEQ_GT(th->th_seq, tp->rcv_nxt)) { + /* + * In case we can't upgrade our lock just pretend + * we have lost this packet. + */ + if (INP_TRY_UPGRADE(inp) == 0) + goto drop; + if ((tp = tcp_close(tp)) != NULL) + INP_WUNLOCK(inp); + TCPSTAT_INC(tcps_tw_recycles); + return (true); + } } /* diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index a1b0519ceac3..5b3733e8e91e 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1308,6 +1308,7 @@ VNET_DECLARE(int, tcp_tolerate_missing_ts); VNET_DECLARE(int, tcp_do_rfc3042); VNET_DECLARE(int, tcp_do_rfc3390); VNET_DECLARE(int, tcp_do_rfc3465); +VNET_DECLARE(int, tcp_do_rfc6191); VNET_DECLARE(int, tcp_do_sack); VNET_DECLARE(int, tcp_do_tso); VNET_DECLARE(int, tcp_ecn_maxretries); @@ -1358,6 +1359,7 @@ VNET_DECLARE(struct inpcbinfo, tcbinfo); #define V_tcp_do_rfc3042 VNET(tcp_do_rfc3042) #define V_tcp_do_rfc3390 VNET(tcp_do_rfc3390) #define V_tcp_do_rfc3465 VNET(tcp_do_rfc3465) +#define V_tcp_do_rfc6191 VNET(tcp_do_rfc6191) #define V_tcp_do_sack VNET(tcp_do_sack) #define V_tcp_do_tso VNET(tcp_do_tso) #define V_tcp_ecn_maxretries VNET(tcp_ecn_maxretries) From nobody Mon May 18 14:55:40 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK17w4lQ7z6fTQL for ; Mon, 18 May 2026 14:55: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK17w47rZz3X75 for ; Mon, 18 May 2026 14:55:40 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779116140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FzPQnuRiRcLk6htq3aTPjFvoIhQtRyI9YTm61wmrPIE=; b=o+r811srTh8m+/HnP3tDtd4JzXGbhWB5wzrNj0EWEdsOnKkIfk3IVGXZ1WgCJ6gBbbnm7H 1jGuNot1lgOjC0HA2llEybYZ+rrkni0m1I+O6MWz6BetEGtf/2b/LFHeTlweM+Xi1BuQnz mR6rmbDgnA/BkHd4m0QQAoMnvb0tVsoUhVpnvvDvFCPjPJqgghQfV+qXYxELJydM0dWna7 DtQkyZblYkcLihOS15MDwHDve0yiOJGvufkSM4WjjrnfDXPh6siwODQxOOp7/6wqEvAXVT ycSTuvwM4IpwZOnreXaT/dIEdQWjRAuTMTsA0UHtA+pGa2VkH4c6NkTnm1iWLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779116140; a=rsa-sha256; cv=none; b=ho1iOXUtCoJeor3kjPeZIyXesyaqhMStM2T2SRYFFz9W2RB+NUrcB29kfxFSb8cS7m+Lf3 DmFbcX3jypWztgPP7q6qfh+OdfTAAN/NHEaHHc1Qj4nGCc7FozREdHGYQ4S3Eq2NY0x3S2 TBbATlVbEqvCph8vt5DLA4UzjfG8glCOje8P0Ow8P1kXaI0dzmFhHs8GLfH6ZOUMzZrLsz Kot1FiyPjTX4ZXkX4bPFEiWkadzcgXUZE1bNxlT1Z/QGBphCEBAdoeXk+1l0NM2lPddHOC akCIi8ppyJfvUxX9KwoIXTO9yAHnFTQo7PvWUhp1KJtY+DTroE6Gde2ZTHbLSA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779116140; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FzPQnuRiRcLk6htq3aTPjFvoIhQtRyI9YTm61wmrPIE=; b=gnAwHg9cYy6HJyPsdXTzG0NaH/CCiKODBGPDdzyiAeMrCLAcxcl2sKT6UNTs12+dFtwnZY pYNKfRRR+M1Dkwl+HqDBhoj7kfUQDF3I36D8HpmHRZTdNqClknGBuV6wAPJDUvRjgd4tF3 drJVx35YPRKLjS9xeLuKP8AxvGjIGRhji9klq6tSHCNZ4xz30kRbpi8YnFLG22f3Da4AB0 JZm/6OHV1Ln3aiDoLpbXystmfEjkBj2pIUnVP4Wqpq6d14PgNf0K3o9tq3/XWol2BdqLtk SFSa6xzdMrrWurJZnkXsnIAQuRHjtXytfoir+JciMGOziY8k4MMsk7QJTW/P0g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK17w3VVyzYqP for ; Mon, 18 May 2026 14:55:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40371 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 14:55:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 876a17321c89 - main - nlist.3: Replace a.out(5) Xref with elf(5) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 876a17321c896427d70de94101df4d888a19189b Auto-Submitted: auto-generated Date: Mon, 18 May 2026 14:55:40 +0000 Message-Id: <6a0b286c.40371.a734374@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=876a17321c896427d70de94101df4d888a19189b commit 876a17321c896427d70de94101df4d888a19189b Author: Ed Maste AuthorDate: 2026-05-18 14:50:22 +0000 Commit: Ed Maste CommitDate: 2026-05-18 14:55:32 +0000 nlist.3: Replace a.out(5) Xref with elf(5) ELF support was added to nlist() in 1997, and a.out support was removed in 2020. The man page was not updated for either of these changes. Fixes: 77909f597881 ("Initial elf nlist support, ...") Fixes: 86cfa7e70b2b ("nlist: retire long-obsolete aout support") Sponsored by: The FreeBSD Foundation --- lib/libc/gen/nlist.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/nlist.3 b/lib/libc/gen/nlist.3 index f4ef59083dab..4df349eed52e 100644 --- a/lib/libc/gen/nlist.3 +++ b/lib/libc/gen/nlist.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 19, 1994 +.Dd May 18, 2026 .Dt NLIST 3 .Os .Sh NAME @@ -43,7 +43,7 @@ The function retrieves name list entries from the symbol table of an executable file (see -.Xr a.out 5 ) . +.Xr elf 5 ) . The argument .Fa \&nl is set to reference the From nobody Mon May 18 15:00:16 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK1FD2xMVz6fTds for ; Mon, 18 May 2026 15:00: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK1FD2MDnz3Xt2 for ; Mon, 18 May 2026 15:00:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779116416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FsZmY4fJ2hxMdqLpsMCzTn4XYabofraaOA2rzjTypVc=; b=sccW6+xpxwi2mm7r7942sCcqxtr0uhG9qRy2HZuVFpUgNiFlkm2mCRr6w3QCWaeq9D+UZF f3Xueb/q1sJqCLddWqKb7aq/QnTx48LUs2l59YR3Aq5BiiibXGcq6ABR6UJppFJMcYfII9 jO9VyGayMQ5LK/IBq2H0CXvrkLoj7fJBmNz9tWa6OYatUMMdyZ+AJGtyQsZacEy2emlKM5 OmJwPKRDOjy2Kw8TTPlXBwl0iXY2A3PuMsg77zKa3Ty/NZxINspL5HGK3JQCYVBTGlQ9Vp m0QI4SuZYFYEfIyL480HVRaaYEi4hUto5+Je7gAg6TKavoura6LC9sbzuTOHng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779116416; a=rsa-sha256; cv=none; b=W7Uz5T5hxKcAAeHNlUr9fD3kjxeac3uhSkD9t8QVHRlxn7LK1nSc0Dxy0NUHoXY8J0h9wu Jpr+OJT4JZ/5HFXLyksB/lo0aZLT+8gpVKkusB3YUc0vmtPJIvTZTZKhHqqC2P7iog3tbD YUS6Qy8GHdVQBB42J/6yUs84qxLi40S6W06uPniWM/mADQaNk12D8UJN++tbxoWN+lhAh1 MWAQ+Gw9LqmD4fSVKvVbfRBU9UAYzvwMZgSIIEhgqbQsyX7KOqSOfkzuVtCHZczswxcYTH nKsZ3hxCy0LP9EdBOTEBhA81KfwFA3aSW3iOZLsI7HWtUOkzlds9aACDWzWs/Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779116416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FsZmY4fJ2hxMdqLpsMCzTn4XYabofraaOA2rzjTypVc=; b=ionwLxA0avrscvMEr0qVW3JFy+yrSzoZ6GdZRb6iI8lCgnElxR97GTYSn2+/6qafVL+GL7 MMcBboI3+u8MoCQfvwLq0O0rmtoJxbTBgsszjuVJUO7Fij+D4TUNapbswfjI/KG3c2t1lG iDhR0cNtKLjLfrRgNnYcPoeiTx09InIz8jIqdX45Exbt3GmkwLRJ83bbWxVz1cQJVEYykd E6ocqU14tuX3u+NRj3qG2tatDoOfcMrA1Hj21j8IZByKEcef+obGyCeZ0WrfrPLXtvcP3/ L2b+hk5OKQZzqH5771DNYhx96kDcATtJkZ8LU4MTGgsOqTzHeO4fbYzxbLQ+Xg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK1FD1QJPzYsb for ; Mon, 18 May 2026 15:00:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40a44 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 15:00:16 +0000 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=B8rg?=rav Subject: git: 78074011acee - main - tcp: Fix typo in RFC 6191 sysctl List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 78074011acee4c3e859ffd37009abb56cc6c8c56 Auto-Submitted: auto-generated Date: Mon, 18 May 2026 15:00:16 +0000 Message-Id: <6a0b2980.40a44.64dbeff8@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=78074011acee4c3e859ffd37009abb56cc6c8c56 commit 78074011acee4c3e859ffd37009abb56cc6c8c56 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-18 14:59:25 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-18 15:00:08 +0000 tcp: Fix typo in RFC 6191 sysctl Fixes: 2af70d7a3849 ("tcp: Make RFC 6191 support configurable") MFC after: 1 week Sponsored by: Klara, Inc. Sponsored by: Modirum MDPay --- sys/netinet/tcp_timewait.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_timewait.c b/sys/netinet/tcp_timewait.c index 276733066c30..5f66159181d6 100644 --- a/sys/netinet/tcp_timewait.c +++ b/sys/netinet/tcp_timewait.c @@ -92,7 +92,7 @@ #include VNET_DEFINE(int, tcp_do_rfc6191) = 1; -SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc3465, CTLFLAG_VNET | CTLFLAG_RW, +SYSCTL_INT(_net_inet_tcp, OID_AUTO, rfc6191, CTLFLAG_VNET | CTLFLAG_RW, &VNET_NAME(tcp_do_rfc6191), 0, "Enable RFC 6191 (Reduced TIME-WAIT State)"); From nobody Mon May 18 15:25:42 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK1pZ6Ktgz6fWhH for ; Mon, 18 May 2026 15:25: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK1pZ5r2xz3m2S for ; Mon, 18 May 2026 15:25:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779117942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w+aU423KzhfskeR4B6d9RTtGcB1KztRFMANViUPlfk8=; b=bptrR30PyiZ5G18ik0oQDSKiak9sjII+rZPFL83H+fx0XUrqk2IH9gETn7/y0mn1SY6Sfv 0iwwuu5iqR5Q11lIvZJ4FQvj0eB6A0j5C6FVn4eeoqLdjvAZbo5tpTDmpmv4xY/4PFU9+l YhNkNhXfONKOpqn+ynSkbWoVF34dblpMHaWM2Fh39wkVeBJUmQ2DWk8OyT7QZBYc7B3xpU v52i4RiKjDGklvs4ZUrcf48HbMcO76e0Xam3SnfRDW/5x1m3VG5G+tWwKmsI6AAP5Qf3C4 7vmFxjICTmhbHarDnCMdlD6HaW1t+46glz5bgYaZ5TXDU9zS5Av0U4JJQHBVXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779117942; a=rsa-sha256; cv=none; b=Ij34giK4vU2o7LmvAhAvbwUNEoeWgET8161M1pl1GFg/zIXSiMOI1Kh9VLtpo8iJqoP/6L of0oTSe5pPFFT5TJsHPTf7foTYcFPsVJ0QmcGxc1P/D7nJK7Z7G50v2IuzRLU/HOHtQkEm 2X/YFLxFSEqfsnNxvz+qrQ1lSNwAxSreX5vlNShnz4mxitONX8YDtM0kKOY73lUAP10K2K YVQHnGwRMexxkXHCUTmBB1SuxPOhqG9YU6nr/7zN8uMc3XCCOnCuL9FYEcM9c1HDs6Vkei zCUg5qH+jDEWMB1mT67m+e1y5pdkIACsDaDTwZA15gkjyGWY+dKPtCl2YElTcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779117942; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=w+aU423KzhfskeR4B6d9RTtGcB1KztRFMANViUPlfk8=; b=Xc1bvRvJ7I9a806OrfPntK122/+TqICSUyutpCO235kMZIo2cPGakkbskYGuSdogY6z3xy NaqLRc4/uOyvBIx6YtiJH9C3fJOe6ZcA2qFK3xq8sBA8izH9RC9UIMros8wHYc6OyTo+ye d3MCA1eOYQB4/fZnsZO8nEuy6m1pSSGih2FfLTBf5k5X5NGm99B4MDrC7BoDpejV6FWYBV +3vupCTqZSzdKq4fabUfhKMDbbhUwUlAYvLGPYKJhF2TWPDnjQMjjt9K3TWUqYR7I2xYeK vS+QVOm3WU6jfBJmwQr6713jLtkcSBqWtHeVqTRXiUEcT8KIk+EJD+dmt98WSw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK1pZ5Kg8zZvR for ; Mon, 18 May 2026 15:25:42 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 43916 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 15:25:42 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: d705a519525f - main - cap_net: do not allow new limits to drop keys from the old ones List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d705a519525f2acae3c1efba11436ec6ee8aea0a Auto-Submitted: auto-generated Date: Mon, 18 May 2026 15:25:42 +0000 Message-Id: <6a0b2f76.43916.7efa6342@gitrepo.freebsd.org> The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=d705a519525f2acae3c1efba11436ec6ee8aea0a commit d705a519525f2acae3c1efba11436ec6ee8aea0a Author: Mariusz Zaborski AuthorDate: 2026-05-12 08:33:41 +0000 Commit: Mariusz Zaborski CommitDate: 2026-05-18 15:18:43 +0000 cap_net: do not allow new limits to drop keys from the old ones If the old limit had family/hosts/sockaddr set, the new limit must have them too. Before, a missing key in the new limit was treated as "allow any", which let a caller silently extend their limits. Reported by: Joshua Rogers of AISLE Research Team Reviewed by: markj MFC after: 1 day Differential Revision: https://reviews.freebsd.org/D56991 --- lib/libcasper/services/cap_net/cap_net.c | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/lib/libcasper/services/cap_net/cap_net.c b/lib/libcasper/services/cap_net/cap_net.c index 59124e3cb54f..e04cad1d834c 100644 --- a/lib/libcasper/services/cap_net/cap_net.c +++ b/lib/libcasper/services/cap_net/cap_net.c @@ -1122,12 +1122,37 @@ net_connect(const nvlist_t *limits, nvlist_t *nvlin, nvlist_t *nvlout) return (0); } +/* + * If the old sublimit restricted a subkey, the new one must too; + * a missing subkey means "allow any" at request time. + */ +static bool +verify_subkeys_present(const nvlist_t *oldfunclimits, + const nvlist_t *newfunclimit) +{ + void *cookie; + const char *name; + + if (oldfunclimits == NULL) + return (true); + + cookie = NULL; + while ((name = nvlist_next(oldfunclimits, NULL, &cookie)) != NULL) { + if (!nvlist_exists(newfunclimit, name)) + return (false); + } + return (true); +} + static bool verify_only_sa_newlimts(const nvlist_t *oldfunclimits, const nvlist_t *newfunclimit) { void *cookie; + if (!verify_subkeys_present(oldfunclimits, newfunclimit)) + return (false); + cookie = NULL; while (nvlist_next(newfunclimit, NULL, &cookie) != NULL) { void *sacookie; @@ -1200,6 +1225,9 @@ verify_addr2name_newlimits(const nvlist_t *oldlimits, LIMIT_NV_ADDR2NAME, NULL); } + if (!verify_subkeys_present(oldfunclimits, newfunclimit)) + return (false); + cookie = NULL; while (nvlist_next(newfunclimit, NULL, &cookie) != NULL) { if (strcmp(cnvlist_name(cookie), "sockaddr") == 0) { @@ -1258,6 +1286,9 @@ verify_name2addr_newlimits(const nvlist_t *oldlimits, LIMIT_NV_NAME2ADDR, NULL); } + if (!verify_subkeys_present(oldfunclimits, newfunclimit)) + return (false); + cookie = NULL; while (nvlist_next(newfunclimit, NULL, &cookie) != NULL) { if (strcmp(cnvlist_name(cookie), "hosts") == 0) { From nobody Mon May 18 16:22:22 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK33y1pjyz6fbn5 for ; Mon, 18 May 2026 16:22: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK33y1JzBz3wL3 for ; Mon, 18 May 2026 16:22:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779121342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4jzgq3k3pcKlm/824Lnk4SyYyzV5uABUazR3qHWJCcc=; b=QdvMElyV+Rmf3Z6xQl8uyw4Sdk3/+OhKDziL23KQd6QGbbopBHW9yEKkmMBPm0v/LzqLHk Fx1Am0a0i1XVyzlob4FJNzn86i0xgydkjChmFQVBznzCHT4EPbjTlrY62zis0sq5Fwy6pp zUhgJM6Y7n9BT9TwiwLkVO/4EuDWQiZxyrG7SbsXOUSn1knaoIARk1m5LYJrLZOFhQqXVj nZ72c0lEYqiT+d1Mrb2WttOhJM1RtPSST5x0k0RXdQqXJBFRyPIEbajnO2NXnWDlijo4Py caup8gutWU4vvYIHn5Xf6UYbnGlMh3UVZ+oM6vICwEyEh3jJGBxbncMnwp1HBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779121342; a=rsa-sha256; cv=none; b=EQ16ys6vqgSIcpTA1HRLcaYNSQhDTmBuPX1OCAHyHeEnWOc8MIv2oiifUl0X8ehc40XL8n UhJM/vuNa016A4/8OyPPrrM1j+imbwIzQjLKH1M+RpW60f7JzKQFAYobBCGvWQJPd1oSDO JBv8n2P/qMdNenHcN3L0UgjlvpbWC8sJdQNhR770XzG5K+fbLAIcdGPsMpIv+tloT3uqq8 bPRi/7c/x6+VUdWDtDOTRH8oShOoXbhY7qpQw3M84vF9pidjn1/YrWDAY7H9DTZ60r4m4G kirxxagtGPsyyh4zeuUDKQpDeb5qEjP764iTxlqQRV2a5tBmNqx7/u0sGdG2kw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779121342; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4jzgq3k3pcKlm/824Lnk4SyYyzV5uABUazR3qHWJCcc=; b=QCxBITre23uCeV6MPDyXBKns68dHe6MPdhN6xhQlQW9CVYA0wB95876Zev3u1wvod7cth5 25Hi9OKpNR1H4ZTUwI18kFfVGG6EZXczJNDbnsrU9KO0TU6t+s2QoszbVa4ji3eo56n5w/ gr5AvZUmLQAZ7aAjprGNuSeVoEbuzziI75NasOGR+ca43JBNjS2PY5zCnCH7FPelS3quLu 3nNzNJz/wMN8XDUy5dnJCj168hcL8D16dcURoxdastcMlMubMGmY0UNWtkZW9PdiSFiY84 ZQysvEVuIlcbvAHragoOSV2tn+tpJr2LjzDbFELZwf4ayBOTf6rWEqduQjesLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK33y0rJGzcQX for ; Mon, 18 May 2026 16:22:22 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18077 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 16:22:22 +0000 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=B8rg?=rav Subject: git: 2509ddee9bdb - main - freebsd-update: Skip /etc/ssl/cert.pem List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 2509ddee9bdb2240ba2f622e3a55a98ebc2aa4ae Auto-Submitted: auto-generated Date: Mon, 18 May 2026 16:22:22 +0000 Message-Id: <6a0b3cbe.18077.1deb9f24@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2509ddee9bdb2240ba2f622e3a55a98ebc2aa4ae commit 2509ddee9bdb2240ba2f622e3a55a98ebc2aa4ae Author: Dag-Erling Smørgrav AuthorDate: 2026-05-18 16:22:04 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-18 16:22:04 +0000 freebsd-update: Skip /etc/ssl/cert.pem We already run `certctl rehash` at the end, there is no point in asking users upgrading from 15.0 to 15.1 to manually merge the trust store. MFC after: 3 days Reviewed by: cperciva Differential Revision: https://reviews.freebsd.org/D57028 --- usr.sbin/freebsd-update/freebsd-update.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr.sbin/freebsd-update/freebsd-update.sh b/usr.sbin/freebsd-update/freebsd-update.sh index b23ada60e8aa..a932cdb26965 100644 --- a/usr.sbin/freebsd-update/freebsd-update.sh +++ b/usr.sbin/freebsd-update/freebsd-update.sh @@ -2581,7 +2581,7 @@ upgrade_merge () { # Some files need special treatment. case ${F} in - /etc/spwd.db | /etc/pwd.db | /etc/login.conf.db) + /etc/spwd.db | /etc/pwd.db | /etc/login.conf.db | /etc/ssl/cert.pem) # Don't merge these -- we're rebuild them # after updates are installed. cp merge/old/${F} merge/new/${F} From nobody Mon May 18 16:40:18 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK3Sx0bpYz6fd10 for ; Mon, 18 May 2026 16:40:33 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-ot1-f53.google.com (mail-ot1-f53.google.com [209.85.210.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 4gK3Sv11vYz3xYK for ; Mon, 18 May 2026 16:40:31 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of carpeddiem@gmail.com designates 209.85.210.53 as permitted sender) smtp.mailfrom=carpeddiem@gmail.com; arc=pass ("google.com:s=arc-20240605:i=1") Received: by mail-ot1-f53.google.com with SMTP id 46e09a7af769-7de7dc85b74so2594766a34.2 for ; Mon, 18 May 2026 09:40:31 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1779122430; cv=none; d=google.com; s=arc-20240605; b=dB9QKFewpduVv5mT21LGxOcelvOEul6jGb0hXY+epSuEiCaTBP9Cf/UBFhaBevMGrq 1Fd1/328mfHNrBdX/7MZstj/DH5Oob95R9Lg+k9oXdi7eFJUP4oF1dX8Ke+3P+2HOrO8 /fUkwdl9eiCEqOsqVsRCLEYzRcLAwAs3MPzFUVseUMErp2+bULO3kzimv7ac/P7pWAnO vLCyBOVRgHCD5bboFS7ufcC64NkMHX4Ndd/QmpFQ3sgLOcQz7Rr2oVFm3fpCJuQ8YIGc ALR7ZiQ4HSicc9IUzr4A5kvCIWF7zC3AsiAii9lwnVPVtqYFz0F9LzJdtfcDa29fSeSR dx2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=sJrJSTzvtNqaA3eNUWGU09cy0aBL0hp1iB3MNa/oHdY=; fh=8G1XhxIoi+LGB9RWClxpVqt5ETo0KPzjrCYKz+En/Jo=; b=lJ6XCdYI7qn1lD8wa1FiXpiouW7MODYH/EEsNuEmRTxIWr8YVkWaPQMeqkz55sIvm/ YPPPbE13Wgkjn82pIdWqErcSP+tgJotsuM/VQWgxMQEajBowIKMjH94yRcz/coMaMLoE QQq/wnwUu4XWiQQCcdnsdDVAUwQbaYaDen6g7Btpo3IeoBGvMn/GoRlWSPHhWa9p2Shu 2Sdu8uex+r1DVXDTuoA1+rBNcV59uyN/jU/BaCMpsc63tAfJYtSeFIAi+RaI/J16qg6G nxXnAHT6uyxW3GYmphdEnAjnDbpzUGoYPlxG8auhXCispNS39c7vLvXvnBoPD1pQk5Sn eZ0A==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779122430; x=1779727230; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=sJrJSTzvtNqaA3eNUWGU09cy0aBL0hp1iB3MNa/oHdY=; b=SGUXlJuQ6xBUlrbRQpvjb1u2TcoontLVbeT8XAQ3M1Kw1wPEE4IUZAtQ2BLB7tiTsO uLd6l+vHjRo3Vpg0pNz0XTS5+9jL+36OR+/EuahDiYa0ViFQaV1fBNmbnij83475aO4r 6yOjJJHSCFrfNeTr8wFaPwMtbcZZf2R6LLFtaWtDrAcr+cH8GmenLDgHW9GevpmwIVin vqQgHrY2tvSu4o4oL7ORAIfGy0BNNt53bKL2ozaZNSyP9TqDYXJKOu3wGk/WuXmZvNDU WbnUx2RDrJGlLVHS0uZ9yX5TwnaV2B2m/Y18ubEQpufyP95W+NqDmyiFGmfLtSIhnmr4 kttw== X-Forwarded-Encrypted: i=1; AFNElJ/I3/mjzGVz+/vH8NxpG5DET3/6t0lQWIipn26uciuo6V40rIIvzsJ/9YndFhK0YjHUJA8IhJDfelEit6mKgBVENOBV/w==@freebsd.org X-Gm-Message-State: AOJu0YxNy0EUhetvaI7W2Xr98Oe4wVH8F9CZbvmwAp0CmahgyefBSwZH jplnp4hKGWGmXO95i7QnguTUHfFfxtcImp5wnKGjMepotmT2g1yoU7WxEW7B2linV1+wVwB1GLw Qn8MsasEvgNrfW7qwGog8C+6POPZWiOQ= X-Gm-Gg: Acq92OERhKRLlJXfed50brMKgair4teKX5tf0zpdUS0/oL9Ix40DG3esn3EEQh7xZ5m Kt3vRckIx+u3hpwZOd6Rmb71udsRt1bxgNe2CLVNYlp1+H8OcIaMIBtyRr+kQ53a8sj4Ah7Qs5c UgzuVw6q0HC2OQnpKc4YmhPDnUiKkaaDPOjFTckr07Z9428ICT6jwe9R4/cBTGEwTsnWivW9dbQ QKubPrSN28mJv/E2I8M3wCiXz48OYCHL0GoUrB4k3tQoQ+65ioIjodtd1zPAuD2JVBus8RgYP6O hJSWxiT2h2bjjlSjX7f6SOVJnyNl4t5E82LNErLy8Yz0PiNj3A== X-Received: by 2002:a05:6820:2203:b0:69b:5482:f3e8 with SMTP id 006d021491bc7-69c94377580mr9311748eaf.32.1779122429835; Mon, 18 May 2026 09:40:29 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 References: <6a061bf9.2672e.364c778f@gitrepo.freebsd.org> <86tss7b27v.fsf@ltc.des.dev> In-Reply-To: <86tss7b27v.fsf@ltc.des.dev> From: Ed Maste Date: Mon, 18 May 2026 12:40:18 -0400 X-Gm-Features: AVHnY4Ij0C7h9VezX6nAzGDLyI1UEO5Oq16P96qtXFNjUYPvWPY6DEQoQ2Kifng Message-ID: Subject: Re: git: 2574974648c6 - main - OpenSSH: Update to 10.3p1 To: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rgrav?= Cc: 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-Spamd-Result: default: False [-2.61 / 15.00]; NEURAL_HAM_LONG(-1.00)[-1.000]; ARC_ALLOW(-1.00)[google.com:s=arc-20240605:i=1]; NEURAL_HAM_MEDIUM(-0.88)[-0.880]; FORGED_SENDER(0.30)[emaste@freebsd.org,carpeddiem@gmail.com]; NEURAL_SPAM_SHORT(0.27)[0.267]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17]; MIME_GOOD(-0.10)[text/plain]; RWL_MAILSPIKE_GOOD(-0.10)[209.85.210.53:from]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; RCVD_COUNT_ONE(0.00)[1]; TO_DN_SOME(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MIME_TRACE(0.00)[0:+]; FREEFALL_USER(0.00)[carpeddiem]; R_DKIM_NA(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; FROM_NEQ_ENVFROM(0.00)[emaste@freebsd.org,carpeddiem@gmail.com]; FROM_HAS_DN(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.210.53:from]; TO_MATCH_ENVRCPT_SOME(0.00)[]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; MISSING_XM_UA(0.00)[]; RCVD_TLS_LAST(0.00)[]; RCPT_COUNT_THREE(0.00)[4] X-Spamd-Bar: -- X-Rspamd-Queue-Id: 4gK3Sv11vYz3xYK On Sat, 16 May 2026 at 15:09, Dag-Erling Sm=C3=B8rgrav wr= ote: > > Ed Maste writes: > > commit 2574974648c68c738aec3ff96644d888d7913a37 > > Merge: fb4e7898a359 2c72d8219c56 > > Author: Ed Maste > > AuthorDate: 2026-05-14 18:59:30 +0000 > > Commit: Ed Maste > > CommitDate: 2026-05-14 18:59:30 +0000 > > > > OpenSSH: Update to 10.3p1 > > [...] > > This breaks i386. Sorry I didn't see your mail, but I fixed freebsd-configure.sh in 0b0e5daf4333 and regenerated config.h in f5993872faf5. From nobody Mon May 18 16:59:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK3tt0DKZz6ff3h for ; Mon, 18 May 2026 16:59: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK3ts30txz412j for ; Mon, 18 May 2026 16:59:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779123573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jqgacgh3ehoi8Dw4BXAWAOfRob6fXoebfBiQbp49dUM=; b=VUTUMkWYnF5pjun3EIxLrP4/HK1iVR99V2fWclAQQVr3e8ilvnZhA4AeBTC/N1FlGYSs1f dEWF4RupVaWQk2qvaK/uOQAClZ/sPRZuRzYABuDGu8CDRDI7JBQQboHDWOI1TfJDqFQL0d h6pbVNeNgYQS6EWLuVKs3wpV1oW/UrPmMK9gyhFm7d07kWFGIQsa9CvVHmMydlSjy7aSor +bgugEApnjLVtGthrzxpqzuUVssRu6bKMSDKhLvJCCIlN3jla+xyB77EWxDkM2fhojeZ4A Qa8UXFhtrVy4kjLFMOlD58z6rjnFZLLL/cG6AtlTr83D2xp6cSH2b11FUJWHGQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779123573; a=rsa-sha256; cv=none; b=wbH5+VZm+vbLNvETHcwXyHWEI5PMT9dbwhTTi757Uo0IcHVX54qrEOUQ3Z988RVeR6NhnX JD3NENk44HmVp0VN73YZIZFnO0HWeETQWL/q2pM2jyDD5kOfGSV3bF+Vdu2Vi4/6hXrCef 6/+mkTlW9cPTcFk9KCBtOuv5W4X4wGG33RDZHoNC1GAXDN1piJYQvBHw1Jp3KSM4arLFIi hB84nwwvDcWchWKdOJMYjwtwemHahLA5lxiNfxf4+0Ss7svg5+pYyupL0qDlfrRlsYuYY2 KSyBlIN4ErW4xGjXTLgmAwf46S3AKYwtoj7C1SkuQY2o4GMYImv+8Pl6VK1vKw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779123573; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jqgacgh3ehoi8Dw4BXAWAOfRob6fXoebfBiQbp49dUM=; b=gN70X5wGrKGoCp1us3ooq6IorpDeIlEOWmtPi252NmLErpj5ZJ5vBUhfx6bmZJ2vdKKQNX vBAXJKHNT9NAxo34tUaAfwuDhgvVYHi5rZEkatZC16urwd4L6bG56n+B3R8jcM7djemCDv kNZhfg7w+A1Lw5ngaSz7oSi++03YwPwT19HJlD1wtZt1Rs6CgcuWHOWwqiuEAxZfQ4J+tx BEomrpLaoOAyihHS+4ZGuPGoTF3Pm6/mwBopqk5D+01d1CTgwxntuojr+7smmPrbHBVjMD WUfUvAXE1jaKuipNQY4tAoRZ+AaL9ybJ85ZRo788omPy7F2RewrDx6kf28lVHQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK3ts23RbzdJK for ; Mon, 18 May 2026 16:59:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1cae9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 16:59:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: af5cdcd8b18c - main - Revert "asmc: fix asmc_key_dump() page fault on T2 MMIO backend" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: af5cdcd8b18c9a24cc317f1886dd3c32b253ef27 Auto-Submitted: auto-generated Date: Mon, 18 May 2026 16:59:33 +0000 Message-Id: <6a0b4575.1cae9.512a95e9@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=af5cdcd8b18c9a24cc317f1886dd3c32b253ef27 commit af5cdcd8b18c9a24cc317f1886dd3c32b253ef27 Author: Adrian Chadd AuthorDate: 2026-05-18 16:58:59 +0000 Commit: Adrian Chadd CommitDate: 2026-05-18 16:58:59 +0000 Revert "asmc: fix asmc_key_dump() page fault on T2 MMIO backend" This reverts commit 3abc07947c14f5c30e5328d56a2da8dbf8412ebf. I'm not sure how this built locally for me but obviously failed in CI; I'll go figure that out with the submitter and come back. --- sys/dev/asmc/asmc.c | 36 +++++------------------------------- 1 file changed, 5 insertions(+), 31 deletions(-) diff --git a/sys/dev/asmc/asmc.c b/sys/dev/asmc/asmc.c index 30c5da698361..8cd7842d03fd 100644 --- a/sys/dev/asmc/asmc.c +++ b/sys/dev/asmc/asmc.c @@ -45,7 +45,6 @@ #include #include #include -#include #include #include #include @@ -1091,27 +1090,6 @@ asmc_key_dump(device_t dev, int number) uint8_t maxlen; int i, error = 1, try = 0; - if (sc->sc_is_mmio) { - uint8_t len = 0; - char mmio_type[ASMC_TYPELEN + 1] = { 0 }; - if (asmc_key_dump_by_index(dev, number, key, mmio_type, &len)) - return (1); - memset(v, 0, sizeof(v)); - len = MIN(len, sizeof(v)); - asmc_key_read(dev, key, v, len); - struct sbuf sb; - char buf[128]; - sbuf_new(&sb, buf, sizeof(buf), SBUF_FIXEDLEN); - sbuf_printf(&sb, "key %d: %s, type %s (len %d), data", - number, key, mmio_type, len); - for (i = 0; i < len; i++) - sbuf_printf(&sb, " %02x", v[i]); - sbuf_finish(&sb); - device_printf(dev, "%s\n", sbuf_data(&sb)); - sbuf_delete(&sb); - return (0); - } - mtx_lock_spin(&sc->sc_mtx); index[0] = (number >> 24) & 0xff; @@ -1172,23 +1150,19 @@ out: maxlen = type[0]; type[0] = ' '; type[5] = '\0'; - maxlen = MIN(maxlen, sizeof(v)); + if (maxlen > sizeof(v)) + maxlen = sizeof(v); memset(v, 0, sizeof(v)); error = asmc_key_read(dev, key, v, maxlen); if (error) return (error); - struct sbuf sb; - char buf[128]; - sbuf_new(&sb, buf, sizeof(buf), SBUF_FIXEDLEN); - sbuf_printf(&sb, "key %d: %s, type%s (len %d), data", + device_printf(dev, "key %d: %s, type%s (len %d), data", number, key, type, maxlen); for (i = 0; i < maxlen; i++) - sbuf_printf(&sb, " %02x", v[i]); - sbuf_finish(&sb); - device_printf(dev, "%s\n", sbuf_data(&sb)); - sbuf_delete(&sb); + printf(" %02x", v[i]); + printf("\n"); return (0); } From nobody Mon May 18 17:00:50 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK3wM0kY2z6ffHG for ; Mon, 18 May 2026 17: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK3wL6qyDz41QR for ; Mon, 18 May 2026 17:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779123651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RrphCU/U5gEsYPQnwzBB/p/GbZ21RwY4puWfHaCXbow=; b=o9pKDuUR8K/ugR/2/ds2Or6OYJHm9aV5J9Oh7PU9wDioIdVeBqMpqzKFKMBy10fiqO+nJG We8JZCHVcMz7o3C3DkPcYRCEyzs2kvKJzsw+yoxbmI60tjqwsoGptlu0NOqc6a+esxNPCE l1yl2pAzpN4oNDkP3afs0ZRk975/GwOGQg45kSYVvjZ2uztUPz9f8R/LWHhZOJ6UtAS/8A JJMiP8/zucdOGxSt3cH8PN4ajdjEVmKN97G58pUHlfoIZpZI5T0+rT2W65xUn6Ri1oC4Dp 6FITn7ZmUWDsU7Akg41ZUsvpp/YkxAt2ww3e6bvXFH4zf3ExTPR/RGqqGtRzVw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779123651; a=rsa-sha256; cv=none; b=PLQEo2UW5etz5lXV1tBHHZ7y/q4JQLf7lUYTSIy56MDT2MnJ1Eh0GVGX4xqIcwD0rYaBhQ sJ3LlImElwnNUD1hIcmIyhYCpHK/hOKC29mCiQuJSl2K96mQH58fK7Dhj4rRUCSrL7q1G6 Lx/wGSaHx25OqqoCZPLZuFghEc8GoE+Qdqe+m8cBb4Xs8h22snu2ky96GApLOV+diPz6Gh SXatjfr/NPs+U2RgKuK3FpXUuQGEPteOlAytGPFVz8fyNeII3AP0K6k7MIsoF8BS0ir/47 9Fvcu9b1LyADVwIyrU6xp2Ljbr+HdfYPSJVfQ4M449BEmBB3RsBiqHCLTbxQDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779123651; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RrphCU/U5gEsYPQnwzBB/p/GbZ21RwY4puWfHaCXbow=; b=bzHnKG4eXFNlxmEi3/ZMMPYCnKExG8hv51omE0OSUtrhteozVaDOV32nHWGcusfJ5Q1Qh9 PjnbqNonaMV9hf7y7+6PS0hp/jKONmIKIwwyW4xEUNa9nsmepHHaxdziJTVBoro13752+z iOSsC3kDtcIdFFScqYHEU9iIuISOIk9IwSlh9qYPPQC9nLh8YMLBobwe/qi14rkItHT4jl nCXTv++b1GFWme0/BPiayjmvqYHUta2ByLfO6NCKeEqs6JIzra2rg2/gdJW4dBRrmBj3ng 6R0SvMNpVSLJphKGp9liWB7cfxM8Qm5BvAhZ41qBxjGi5esaoSWX4K7J3VwxYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK3wL6HDRzd05 for ; Mon, 18 May 2026 17:00:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d3c8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 17:00:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 22c054c4cce7 - main - elf_common.h: Add SHT_LLVM_ADDRSIG List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 22c054c4cce719662d503685138433eb27d40001 Auto-Submitted: auto-generated Date: Mon, 18 May 2026 17:00:50 +0000 Message-Id: <6a0b45c2.1d3c8.22940ac3@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=22c054c4cce719662d503685138433eb27d40001 commit 22c054c4cce719662d503685138433eb27d40001 Author: Ed Maste AuthorDate: 2026-05-18 15:15:59 +0000 Commit: Ed Maste CommitDate: 2026-05-18 17:00:39 +0000 elf_common.h: Add SHT_LLVM_ADDRSIG Reported by: bz Sponsored by: The FreeBSD Foundation --- sys/sys/elf_common.h | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/sys/elf_common.h b/sys/sys/elf_common.h index 8c21d886c6a5..e17b2bfb3afa 100644 --- a/sys/sys/elf_common.h +++ b/sys/sys/elf_common.h @@ -448,6 +448,7 @@ typedef struct { #define SHT_GROUP 17 /* Section group. */ #define SHT_SYMTAB_SHNDX 18 /* Section indexes (see SHN_XINDEX). */ #define SHT_LOOS 0x60000000 /* First of OS specific semantics */ +#define SHT_LLVM_ADDRSIG 0x6fff4c03 /* Address significance table */ #define SHT_LOSUNW 0x6ffffff4 #define SHT_SUNW_dof 0x6ffffff4 #define SHT_SUNW_cap 0x6ffffff5 From nobody Mon May 18 17:04:15 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK40H2Nfjz6ffdB for ; Mon, 18 May 2026 17: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK40H1f06z42jf for ; Mon, 18 May 2026 17: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=1779123855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ECpDvQyaaOT/r/+jfS54o9Opak5L1MkT6VxaMEyYSU8=; b=s4VDPyag6uFrMYC/ZsJ1/90u17rN0kPg86XvVtxndIEPVsDIbdqOJz7Wl0m9WCScMTQdsV UE/VNikvm6rB6dxwbX3hZZCkBgkozyi+jTl5Um6bQOm/qo1A2RiXvx+uvenwj5Sn9DpEBv NRLPjdQguOsqCAdNt4nBVYoGxdLsEcvRJ70mpcmU2mU/eZ2EVomHuQeb/0alxkGLVK1DdT D5SWBo4AOq5Fm4IbKUXRr5ybxnn+LFUf7A8N5vSK3N1DmNi4ALuh8JanJCXM76wk6TohNJ C2pBYpdwf3Cd9qawIs5Qlb6hrkzK3uwHf37c85M39c6G9OOeWI12I+tVpARTEw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779123855; a=rsa-sha256; cv=none; b=xeuF+WUd2ZayHmerY2VpqyC2EhmhVXkizZNEvRkiHdnPdRH7yVPMxrHqyT8Zy91TODzqyh FDzz7MZG6e4Z4+gqex5BO1kriMQRSluQNUpL0iTTIHswiGJG/Gw5s8woYQy6LX902e7Rss 5B2L/Smx5VbvN4GcAv6KMlq3gr/j5p8fguCEAiqf2U5+LF44O9rW3WaHlT5mnkZvUg0Cg4 fkOBNfBIYe6aJSIkCBLYfM4MI0klkrTF+k8RYpWybgotafpM4Obd7Da6eWBwhT9GC54eNc /h5Zi6/cToCeB7h/FAWgcQdSressRsvKtL0lgLZInbSlRYM+6N3xid0mZSc2wg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779123855; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ECpDvQyaaOT/r/+jfS54o9Opak5L1MkT6VxaMEyYSU8=; b=gokIEiVjbAoLUKRR2OV6PR54J5viItRQNoyegqqtF/j3XEeGx1Jbi8t2hAwhxsuRDS9vED wOUhveRdrZpMuVIcNJ1M7vp6aZxJb/9/8YUOWWwsjL3ZJYA6WKh1VGgJ5G+hAFNseVedQo jS+ZTd5ODIXSQMAHvNp48y+vHpqqH72m7enKK2gCKtoazaPBGznlLMkiBeCJIaP5kTPpcO zbp+pAJ9HwV99ehCyKgP2bsNT+rcnKaxRwd5OLsNcfcW7IGT7NhLBPBa6B2VMKjdYlenH4 uWvBRHzz+xHEQuW+OX3HEOT7lzpJLU4Bmr59lyigzJUXYjL8PtVcctKB7RWnaw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK40H0zt3zd0t for ; Mon, 18 May 2026 17:04:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e309 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 17:04:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 32f854663d76 - main - qcom_tlmm: remove annoying debugging List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 32f854663d76ea06529ca8990ec0d116c8acb32b Auto-Submitted: auto-generated Date: Mon, 18 May 2026 17:04:15 +0000 Message-Id: <6a0b468f.1e309.116d4168@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=32f854663d76ea06529ca8990ec0d116c8acb32b commit 32f854663d76ea06529ca8990ec0d116c8acb32b Author: Adrian Chadd AuthorDate: 2026-05-18 17:03:20 +0000 Commit: Adrian Chadd CommitDate: 2026-05-18 17:04:11 +0000 qcom_tlmm: remove annoying debugging Yes this printf is for local debugging and not required at all on anything. Pointed out by: andrew@ --- sys/dev/qcom_tlmm/qcom_tlmm.c | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/dev/qcom_tlmm/qcom_tlmm.c b/sys/dev/qcom_tlmm/qcom_tlmm.c index 3581e651fd59..5b2c11941d50 100644 --- a/sys/dev/qcom_tlmm/qcom_tlmm.c +++ b/sys/dev/qcom_tlmm/qcom_tlmm.c @@ -90,7 +90,6 @@ qcom_tlmm_probe(device_t dev) for (i = 0; qcom_tlmm_chipsets[i].id != 0; i++) { ql = &qcom_tlmm_chipsets[i]; - device_printf(dev, "%s: checking %s\n", __func__, ql->ofw_str); if (ofw_bus_is_compatible(dev, ql->ofw_str) == 1) { sc->sc_chipset = ql->id; sc->sc_attach_func = ql->attach_func; From nobody Mon May 18 17:52:34 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK5430NGQz6fk6s for ; Mon, 18 May 2026 17:52: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK5426Wnfz49Xt for ; Mon, 18 May 2026 17:52:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779126754; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kPt7PSOMZp1hFau17tgZZAgJ+wehKb95SGQ81FkjnLs=; b=sJMtHZ/W6HIgBQ+Px3+dm03brcIZ8PF1ZSPvumnEzp51hYEWgJK//Yj7Q90FXDYhebcHk4 +3aea5zVxRoXn5dzY4m4b7BzA0BTV83zm0HiGhW6OhsLtG/5MRBJG8P0eEo7gcj0WDTVoJ lMv8HR23pi4i/zZbFL7KjUIGx/7fPJBeS9h8hXciQ6gi0iZhTXqsUtokmOhfZ29kILi0vY hkPlgf5hb5P5NoVGoHNQ6VQgP6PdKonJ6mvTKuuIS5Hp+KVdL7ZLb8dB0Xhyh7TaWI8MxJ 1hNz4U+HeyHgQVxrBOnlsFCFi8Gmf6hdzQ1E9nuP++z00spwFCSoL0kjYr5pEA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779126754; a=rsa-sha256; cv=none; b=FvQ8ffe1mvli9sf7UaD3D8g6dtd78SFy+DFCT3HtJWFdwPUV0cfolH0hPy745Rmn1ppimD dB6MknUusUvuG1nhLSeMTPcoHH5ViCjpSQHUIcozn0JFjFrQgGMZyy4zVcDVwnYGbDali4 HQTh/mZp+5TYsJDSsP3TmFqfH4QCDcO9MjPAoqoCziq41wkZJQaXr7I/hFONX4/kXHQXoD cxKSfwUlWPtEQu8n5AbgtEXS/xjFpDsHHTWtxd3SAqwgdheO9lOBTVs9nxm9TkahVnSjlH X+pqPUljUeYi+IXVJyH+B1fAJPShzwqw3dtFtvAFKbhGqSH5PLAC5pFUjinDkg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779126754; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kPt7PSOMZp1hFau17tgZZAgJ+wehKb95SGQ81FkjnLs=; b=tba0MNos/e1pQQl5YpBOwsYeTVEOt3/s/jI+SejSP5KqdWz9OINFs5qLrNWV+LaC30ump8 Yj+cqLhF6coj0PsFe5FGVL3NH9QDoB9eKf7VfZO3bBuHBOWybwdogS1h+IF25r7Ug8h9A4 pKgRKrIZ+N/ujput+COmr2Rh1i4s5LvlqBHk7PI3dhmin3mv0xzfFZbnDFMaV2AFAdrPRk eppS/cziecRVYs/NqgFajqZOzJmuFCsxyc+6Dt7gc//Q5MbTZ24jOwGozPMwUBLjcr4GLV W4N/ZcmOREcWijcT/C6B6Oavw1L4QxtCS2PidLmUmNc7ohDWyAq6Yr/E4/bG3g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK54266h8zf7Y for ; Mon, 18 May 2026 17:52:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 231c2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 17:52:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Simon J. Gerraty Subject: git: 701d7be6e4a9 - main - Add test cases for safe_eval.sh List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 701d7be6e4a9a145700fdee5c038470b355a0e05 Auto-Submitted: auto-generated Date: Mon, 18 May 2026 17:52:34 +0000 Message-Id: <6a0b51e2.231c2.48fde819@gitrepo.freebsd.org> The branch main has been updated by sjg: URL: https://cgit.FreeBSD.org/src/commit/?id=701d7be6e4a9a145700fdee5c038470b355a0e05 commit 701d7be6e4a9a145700fdee5c038470b355a0e05 Author: Simon J. Gerraty AuthorDate: 2026-05-18 17:51:18 +0000 Commit: Simon J. Gerraty CommitDate: 2026-05-18 17:51:18 +0000 Add test cases for safe_eval.sh safe_set is the routine that does all the work. In safe_set; if we replace one=`cmd arg` or two=$(cmd arg) add quotes around the result eg. one="_cmd arg_" Also lines containing `` or $() are too likely to result in syntax errors, so just delete them. Differential Revision: https://reviews.freebsd.org/D56795 --- libexec/rc/safe_eval.sh | 7 +++- libexec/rc/tests/Makefile | 8 ++++- libexec/rc/tests/safe_eval_test.sh | 65 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 78 insertions(+), 2 deletions(-) diff --git a/libexec/rc/safe_eval.sh b/libexec/rc/safe_eval.sh index 3b3241ae821d..eb1698472624 100644 --- a/libexec/rc/safe_eval.sh +++ b/libexec/rc/safe_eval.sh @@ -28,11 +28,16 @@ fi # return a safe variable setting # any non-alphanumeric chars other than those in "xtras" # will be replaced with '_' +# Lines containing `` or $() are too likely to result in syntax errors +# so just delete them. # # "xtras" should be used with caution and cannot include ';' # safe_set() { - ${SED:-sed} 's/^[ ]*//;s/[ ]*#.*//;s/^:.*//;/^[A-Za-z_][A-Za-z0-9_]*=/!d;s;[^A-Za-z0-9_. "'"$1"'$,/=:+-];_;g' + ${SED:-sed} -e 's/^[ ]*//;s/[ ]*#.*//;s/^:.*//' \ + -e '/`/d' -e '/\$(/d' \ + -e '/^[A-Za-z_][A-Za-z0-9_]*=/!d;s;[^A-Za-z0-9_. "'"$1"'$,/=:+-];_;g;' \ + -e '/=.*_.*[ ]/s,=\(.*\),="\1",;s,"",",g' } ## diff --git a/libexec/rc/tests/Makefile b/libexec/rc/tests/Makefile index c44c6db90b77..3a6eafea292d 100644 --- a/libexec/rc/tests/Makefile +++ b/libexec/rc/tests/Makefile @@ -1,3 +1,9 @@ -ATF_TESTS_SH+= rc_subr_test +ATF_TESTS_SH+= rc_subr_test safe_eval_test + +# allow running this as part of the build - in DIRDEPS_BUILD at least +.if ${.MAKE.LEVEL} > 0 && ${MACHINE:Nhost*} == "" +SAFE_EVAL:= ${_PARSEDIR:U${.PARSEDIR:tA}:H}/safe_eval.sh +.export SAFE_EVAL +.endif .include diff --git a/libexec/rc/tests/safe_eval_test.sh b/libexec/rc/tests/safe_eval_test.sh new file mode 100644 index 000000000000..a0f3a2784098 --- /dev/null +++ b/libexec/rc/tests/safe_eval_test.sh @@ -0,0 +1,65 @@ +#- +# SPDX-License-Identifier: BSD-2-Clause +# +# Copyright 2026 Simon J Gerraty +# + +atf_test_case safe_set_reject +safe_set_reject_head() +{ + atf_set "descr" "Verify that safe_set rejects shell meta chars" +} + +safe_set_reject_body() +{ + __name="$(atf_get ident)" + __input=$(mktemp -t "${__name}.input") + + cat <<'EOF' > "$__input" +: ignore=this +# ignore this too +# avoid # in the middle of a quoted value like: +# oops="this # will cause synatx error" +quoted="this and that" +simple=ok # trailing comments ignored + also=ok # leading white-space ignored + also_wik=ok +host=`hostname`' # backtics - delete line +os=$(uname -s) # $() - delete line +oops=one;hostname' # replace ; with _ so: one_hostname +regex="prefix[abc-]*" # []* replaced with _ +EOF + + __output=$(safe_set < "$__input" | tr '"\012' '\047;') + atf_check_equal "$__output" "quoted='this and that';simple=ok;also=ok;also_wik=ok;oops=one_hostname_;regex='prefix_abc-__';" +} + + +atf_test_case safe_set_xtras +safe_set_xtras_head() +{ + atf_set "descr" "Verify that safe_set handles extra allowed chars" +} + +safe_set_xtras_body() +{ + __name="$(atf_get ident)" + __input=$(mktemp -t "${__name}.input") + + cat <<'EOF' > "$__input" +: ignore=this +# ignore this too +regex="prefix[abc-]*" +EOF + + __output=$(safe_set "[]*" < "$__input" | tr '"\012' '\047;') + atf_check_equal "$__output" "regex='prefix[abc-]*';" +} + +atf_init_test_cases() +{ + SAFE_EVAL=${SAFE_EVAL:-/libexec/safe_eval.sh} + . $SAFE_EVAL + atf_add_test_case safe_set_reject + atf_add_test_case safe_set_xtras +} From nobody Mon May 18 18:53:29 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK6QL096Dz6fp5c for ; Mon, 18 May 2026 18:53: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK6QK6HmKz3MHX for ; Mon, 18 May 2026 18:53:29 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779130409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xo4EmsnrgBTx/MHgHBHwMWuK4xN3MiR8mgQ6Iv8J9Hg=; b=aQRa6wcwj6wHaN7uZUYgBjxd81LHZdA9WNpFo8zEWASkMJ/2cGWRGyzvPDEJBwsYVgsn7G rEejnrF/ljxVUB11JZ5bOXRAxib2Gemeh/0kuWn/zbcC2ccnch1qbxHU8qPo/h68C/NkFf GCH6AmiykghrxXxTuKdpc9fYIQGicqFrnu7TvsFXwlbIillaql/JF2pqR8dYXpsyJEUQxh cuUAHMKLNfNNhp2b8ARu7TcvG8IRXrsHDUUSKfDTzSC8HtYouzSouvDstpA6J1ztzyYflQ JMSCf50Uhqg0ap3VRbcBSSUGgUK1Rx5alX9UDM52j7Qzcr5oZAUdecaKGkeL2A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779130409; a=rsa-sha256; cv=none; b=pgHdBI5xRRhqSzG9ZmAwqXl3yyET5UYx1bhpGHnwO5tACFZ58xZsyQXZ62+1JpXFJUMq9q oGkArDilVmJBrPjEIB+PAeMeXwlTDwYc3LBpUpiSG7NLjCX1k75ejKnHY41QbjFp23E50L GXy4NLN5uMwmOtv3iXN94tx8XCMzDhB38gkr9M3wjYOGK+UcEVPhWQIpmBNN3RSbxaoBYr Ie41LyfxCVqi9afrFWS+HIBslDdXY1LLDIY7uI0WRHQ+lt/E86hjApMchIFu/6iw8aCQwk qm893i0fj+mRBv/t2pwILb+0czz5MEf4Hk68S2Q9zDvv3ITCCYcLYJAbUAxH3Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779130409; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=xo4EmsnrgBTx/MHgHBHwMWuK4xN3MiR8mgQ6Iv8J9Hg=; b=M4Ko0fUXoUrVECzViyMRyokGG62mrMHxV6N6ODHvADBm+Iv9ykoFahibE4830vKwsk3ums GoOCEEok4IV3AMS+rpJLXwMcyKoWkpJl8i3npQLGllLonmz+7pkFFWXQWVWpH6HvUWL3wy 6exGWSAFryUz1kOmXujDs0UZ5Qrk8P7nrgGG9LozkiA5T0hrk5FpqxCrPHwoR2wJ+/MAO7 cjhVS8/4fOjcj3cfmx8jPY6dFnaEQzNumfn4T+Wzsig9+Kwdp0QjlXBuKVrYtwkiZlZNHv 0D1B3rZo271bqWmcLoE5iuYFJiJrYM13FTacr3zW/YuZ6muZUVqmCexldCrwTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK6QK5s8FzhMC for ; Mon, 18 May 2026 18:53:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 273ea by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 18:53:29 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 6a043d0814a2 - main - LinuxKPI: Check the devclass of the parent device in dev_is_pci List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6a043d0814a29e756f5d26e7b59a360e1d6dfa45 Auto-Submitted: auto-generated Date: Mon, 18 May 2026 18:53:29 +0000 Message-Id: <6a0b6029.273ea.2891f776@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6a043d0814a29e756f5d26e7b59a360e1d6dfa45 commit 6a043d0814a29e756f5d26e7b59a360e1d6dfa45 Author: John Baldwin AuthorDate: 2026-05-18 18:44:00 +0000 Commit: John Baldwin CommitDate: 2026-05-18 18:44:00 +0000 LinuxKPI: Check the devclass of the parent device in dev_is_pci Reviewed by: bz Fixes: c41d83548b6c ("LinuxKPI: pci.h add more defines and functions") Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D57066 --- sys/compat/linuxkpi/common/include/linux/pci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index 5cd87ff091bc..a6ddc02d1947 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -399,8 +399,8 @@ int _lkpi_pci_enable_msi_range(struct pci_dev *pdev, int minvec, int maxvec); static inline bool dev_is_pci(struct device *dev) { - - return (device_get_devclass(dev->bsddev) == devclass_find("pci")); + return (device_get_devclass(device_get_parent(dev->bsddev)) == + devclass_find("pci")); } static inline uint16_t From nobody Mon May 18 18:53:30 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK6QM2WyRz6fpGn for ; Mon, 18 May 2026 18:53: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK6QL724Tz3MF4 for ; Mon, 18 May 2026 18:53:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779130411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DY6JtIo4atnf+63bShKUDza7cZohrx7sPhf1z70U5C0=; b=txJ71Ll6JF20OwKA0HG2oct1rsMHjdRnjkKG0O8tesCNwE+rwXbPS4oTa03iyiVH9xP+Kp vJaNAw/PcXx8NrN1Qnl2qvZpXd+y/8Wc+ZfTCUkWrHyK3q0Bdl80A3+0kcLApyTTty7bRi gtbh6DD88RTnj+4e9M+MBFUBcxpN9X+9GL1NC+TbP/Y7cIU2y0URTi+exEvw4lRTqWFD0s 4YM/GWAGtwkXejYOChAfOSSkwy6kxzttbU3Nro7j+vTfilePVtVDL0SxWUsex6J4vXhn8O 607iBq7RVi1mF49Sna30jti+Bdoa8okXBgpZ4aa65eiavoO5ne+vPBzlG9UhDg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779130411; a=rsa-sha256; cv=none; b=h3KCAM1FCIqW6EdMkXurL1fWLQ0rMe+Vwkj+kHlesE4/bfiOMoY/D4faPrjohfgUqVG3s2 X+uLFB3VqClCDgJazpsFpOyQLHFTAXc9HYojs6AzioTJwwV8K8Clp8TRXPGYl7xNxUHo1R P1LziUma7kI/G/keF9GO+4LbptiDyAF1jjNB9Sjf0dRlHso0HCijWNzhS8LMOsA21qa0hy zNMvzG0YbLfzLzXWTV6hq+fw913U09zAIeJ6tiClSqBBbVoJOeSxH0JCioIJuMtEp9wlWV Ti61N4pDa+2X10dWrQf5Bzj4JLn6jEAqQjorOzL+fetbtRQRhYYWySDERl3TFw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779130411; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DY6JtIo4atnf+63bShKUDza7cZohrx7sPhf1z70U5C0=; b=aNeGSIBiTnM55PeSyHimkoa29bqDIx39mDf6QZBXIOJ4NwTjPzXmu8MfazuHy4RMxxZnp1 zA4MUpv6TvHe3UrtaC7AJ2YXDadCP90zD2rD5shuQRAR+ktGAOuJNF8TKOu4ELWIm/ZJIL YDBnD5kjeKE/QRltmINvO+eoO1AU/5+/JpetFIxmFeW3GSx8wl6VCLRezRKrT+TUHxw0SB HT735nb/KWTvm5EZcAqpRR7pRGJxKjIthKTLzaQ96pn16qtCCDcyAn5FkyU6EsXG7LaR6m NMGFQnhMbay9oKp7SVl+U537WgY1XPl6Wn4zaOdQG+yN157Brbck4bcKJEXg0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK6QL6L5gzhJg for ; Mon, 18 May 2026 18:53:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 273ee by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 18:53:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: ffcf5e356644 - main - pci: Add is_pci_device helper function List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ffcf5e356644252f2f6c89ba01057af45c216559 Auto-Submitted: auto-generated Date: Mon, 18 May 2026 18:53:30 +0000 Message-Id: <6a0b602a.273ee.3ae63692@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=ffcf5e356644252f2f6c89ba01057af45c216559 commit ffcf5e356644252f2f6c89ba01057af45c216559 Author: John Baldwin AuthorDate: 2026-05-18 18:50:39 +0000 Commit: John Baldwin CommitDate: 2026-05-18 18:50:39 +0000 pci: Add is_pci_device helper function This returns true if a given device is a PCI device (child of a PCI bus). Reviewed by: bz, kib Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56996 --- share/man/man9/Makefile | 3 ++- share/man/man9/pci.9 | 11 ++++++++++- sys/dev/pci/pci.c | 11 +++++++++++ sys/dev/pci/pcivar.h | 1 + 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/share/man/man9/Makefile b/share/man/man9/Makefile index fbb981891ce4..7044b6f1bb68 100644 --- a/share/man/man9/Makefile +++ b/share/man/man9/Makefile @@ -1803,7 +1803,8 @@ MLINKS+=osd.9 osd_call.9 \ osd.9 osd_set_reserved.9 MLINKS+=panic.9 vpanic.9 \ panic.9 KERNEL_PANICKED.9 -MLINKS+=pci.9 pci_alloc_msi.9 \ +MLINKS+=pci.9 is_pci_device.9 \ + pci.9 pci_alloc_msi.9 \ pci.9 pci_alloc_msix.9 \ pci.9 pci_clear_pme.9 \ pci.9 pci_disable_busmaster.9 \ diff --git a/share/man/man9/pci.9 b/share/man/man9/pci.9 index 871f69f887a6..4d69d3a4240f 100644 --- a/share/man/man9/pci.9 +++ b/share/man/man9/pci.9 @@ -23,11 +23,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd March 27, 2025 +.Dd May 18, 2026 .Dt PCI 9 .Os .Sh NAME .Nm pci , +.Nm is_pci_device , .Nm pci_alloc_msi , .Nm pci_alloc_msix , .Nm pci_clear_pme , @@ -80,6 +81,8 @@ .In sys/bus.h .In dev/pci/pcireg.h .In dev/pci/pcivar.h +.Ft bool +.Fn is_pci_device "device_t dev" .Ft int .Fn pci_alloc_msi "device_t dev" "int *count" .Ft int @@ -202,6 +205,12 @@ device information, device configuration, and message signaled interrupts. +.Pp +The +.Fn is_pci_device +function can be used to determine if +.Fa dev +is a PCI device. .Ss Raw Configuration Access The .Fn pci_read_config diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index b5a3012accd6..adf3daea66fd 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -6993,6 +6993,17 @@ pci_print_faulted_dev(void) } } +bool +is_pci_device(device_t dev) +{ + devclass_t pci_class; + + if (device_get_parent(dev) == NULL) + return (false); + pci_class = devclass_find("pci"); + return (device_get_devclass(device_get_parent(dev)) == pci_class); +} + #ifdef DDB DB_SHOW_COMMAND_FLAGS(pcierr, pci_print_faulted_dev_db, DB_CMD_MEMSAFE) { diff --git a/sys/dev/pci/pcivar.h b/sys/dev/pci/pcivar.h index 696e1c688c68..bcd4d2d35b54 100644 --- a/sys/dev/pci/pcivar.h +++ b/sys/dev/pci/pcivar.h @@ -676,6 +676,7 @@ pci_child_added(device_t dev) return (PCI_CHILD_ADDED(device_get_parent(dev), dev)); } +bool is_pci_device(device_t dev); device_t pci_find_bsf(uint8_t, uint8_t, uint8_t); device_t pci_find_dbsf(uint32_t, uint8_t, uint8_t, uint8_t); device_t pci_find_device(uint16_t, uint16_t); From nobody Mon May 18 18:53:31 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK6QN3XDtz6fp7p for ; Mon, 18 May 2026 18:53: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK6QN170Zz3MHj for ; Mon, 18 May 2026 18:53:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779130412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9jD/Ei0QyLHnU5g2N9w2SiIsjeGqjEWOVZp96WTQNYQ=; b=YgNQ4TKHQ35B2jrI6COEL3M4L3qbvU/db4tiwwqzC4oRJ+5u8b5g1zT/br0WFlXra4Ws8m 4kzMo/bok2iO/un/r4DsQKyyAi+4MUlsP7hDEbXPz+UftkeBpaV/rjkYbvXAfsdJX468ex WR0KMIpxDXtVZXb7ZBAUxxQjryHZgWxxsIs1peLstWYqv8z5d/kUmucqMp0RJZYT7oLaIS ExVqMiPD8PgjJcgduoQ2AEfDiyOpFYvTp6wtx9JTTzoEqtXqZ6ZL8Xwa5V/aPBGzY9cxCL P5T/Wh60TceQAEJCuCFRa6Qp6oDfEmQ5ypAu6S+OVnqSHi/3UEZ6ir6lcQjEXg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779130412; a=rsa-sha256; cv=none; b=tP7n4EefYZUdGtVZ3/4tV0zDemnrgLp/0+twpcBz1nfpXPBKUjlgDyE8tUfa3Q/zHqNcZ9 yhi9z7Bm6Iy0KBluciRZrsC1uHIHlVHYKLekW2br7m3U4AT62GjvEUXWoJQgq52seop+8o fo9X7efSiLVc8oIMD9tr5Bx/yx1fnTHl4xBq8fCPD8zEm2DAwhjlqo5ry2v3pKBsgdmVIZ N2QnWrJ0dSt7BE9b3po2AeqS7IqRpN+MsV8XxQVlIN9zsaHSmW13aqTHKfiwVTeVSq+p0R FPdwGMaIMRTwoP1rOK9lC1OwHIm0/WDU5csYxDM1K2lgGG2PsQNqJesiRH7PxQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779130412; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=9jD/Ei0QyLHnU5g2N9w2SiIsjeGqjEWOVZp96WTQNYQ=; b=LE8ocdH7PhUJmMi/Rn1SCm9J3SvSBGn6UTq8VbmgwSLZl6xBAhgEQn5QG+rfDW7KThHQZE pitWnFEIwUR1uYWIytwK8OuZSA/hjNbJTfefzAi4UEBWYUjOs7vu5Z5MM81gJQyr0A4kpV oHjQ3Onpjyy3P8xH2FsZF4Dv6yTrBK7Q3WoYAAUs1uYn1ik+NEJ31YsPQAuZaBMo5pK1cU Nwxx6ElpOH9j5Jxcq54VTxjr80+c9za1RJg4SH94XROo/hz1wKYaPUVMMzI4I6jim531GQ M6HB4ZK7Vo7m3+QefCmKDKa0kX6S/oFXaQ6M25KG30nfQP5y1Krdz08qlgP2LQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK6QN05WnzhMD for ; Mon, 18 May 2026 18:53:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31b86 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 18:53:31 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 6dc813301a17 - main - sys: Use is_pci_device instead of direct comparisons to devclasses List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6dc813301a173e2e1993c3064df162e6218c1231 Auto-Submitted: auto-generated Date: Mon, 18 May 2026 18:53:31 +0000 Message-Id: <6a0b602b.31b86.4dbaa797@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=6dc813301a173e2e1993c3064df162e6218c1231 commit 6dc813301a173e2e1993c3064df162e6218c1231 Author: John Baldwin AuthorDate: 2026-05-18 18:52:23 +0000 Commit: John Baldwin CommitDate: 2026-05-18 18:52:23 +0000 sys: Use is_pci_device instead of direct comparisons to devclasses Reviewed by: bz Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56997 --- sys/arm64/cavium/thunder_pcie_pem.c | 6 +---- sys/arm64/iommu/smmu.c | 6 ++--- sys/compat/linuxkpi/common/include/linux/pci.h | 6 ++--- sys/dev/ata/ata-all.c | 3 +-- sys/dev/bge/if_bge.c | 13 +++-------- sys/dev/ichwd/ichwd.c | 5 ++-- sys/dev/iommu/busdma_iommu.c | 32 +++++++------------------- sys/dev/pci/pci.c | 10 ++------ sys/dev/pci/vga_pci.c | 6 ++--- sys/dev/vnic/thunder_bgx_fdt.c | 9 ++------ sys/x86/iommu/amd_drv.c | 3 +-- sys/x86/iommu/intel_drv.c | 13 +++-------- 12 files changed, 29 insertions(+), 83 deletions(-) diff --git a/sys/arm64/cavium/thunder_pcie_pem.c b/sys/arm64/cavium/thunder_pcie_pem.c index 04b892b91c56..092f11241e29 100644 --- a/sys/arm64/cavium/thunder_pcie_pem.c +++ b/sys/arm64/cavium/thunder_pcie_pem.c @@ -760,8 +760,6 @@ thunder_pem_attach(device_t dev) { struct resource_map_request req; struct resource_map map; - devclass_t pci_class; - device_t parent; struct thunder_pem_softc *sc; int error; int rid; @@ -773,9 +771,7 @@ thunder_pem_attach(device_t dev) sc->dev = dev; /* Allocate memory for resource */ - pci_class = devclass_find("pci"); - parent = device_get_parent(dev); - if (device_get_devclass(parent) == pci_class) + if (is_pci_device(dev)) rid = PCIR_BAR(0); else rid = RID_PEM_SPACE; diff --git a/sys/arm64/iommu/smmu.c b/sys/arm64/iommu/smmu.c index a84ef4ae347e..265f1e56f892 100644 --- a/sys/arm64/iommu/smmu.c +++ b/sys/arm64/iommu/smmu.c @@ -1825,7 +1825,6 @@ smmu_ctx_init(device_t dev, struct iommu_ctx *ioctx) struct iommu_domain *iodom; struct smmu_softc *sc; struct smmu_ctx *ctx; - devclass_t pci_class; u_int sid; int err; @@ -1836,8 +1835,7 @@ smmu_ctx_init(device_t dev, struct iommu_ctx *ioctx) domain = ctx->domain; iodom = (struct iommu_domain *)domain; - pci_class = devclass_find("pci"); - if (device_get_devclass(device_get_parent(ctx->dev)) == pci_class) { + if (is_pci_device(ctx->dev)) { err = smmu_pci_get_sid(ctx->dev, NULL, &sid); if (err) return (err); @@ -1863,7 +1861,7 @@ smmu_ctx_init(device_t dev, struct iommu_ctx *ioctx) smmu_init_ste(sc, domain->cd, ctx->sid, ctx->bypass); - if (device_get_devclass(device_get_parent(ctx->dev)) == pci_class) + if (is_pci_device((ctx->dev)) if (iommu_is_buswide_ctx(iodom->iommu, pci_get_bus(ctx->dev))) smmu_set_buswide(dev, domain, ctx); diff --git a/sys/compat/linuxkpi/common/include/linux/pci.h b/sys/compat/linuxkpi/common/include/linux/pci.h index a6ddc02d1947..56b9c6e05f27 100644 --- a/sys/compat/linuxkpi/common/include/linux/pci.h +++ b/sys/compat/linuxkpi/common/include/linux/pci.h @@ -399,8 +399,7 @@ int _lkpi_pci_enable_msi_range(struct pci_dev *pdev, int minvec, int maxvec); static inline bool dev_is_pci(struct device *dev) { - return (device_get_devclass(device_get_parent(dev->bsddev)) == - devclass_find("pci")); + return (is_pci_device(dev->bsddev)); } static inline uint16_t @@ -556,8 +555,7 @@ pci_upstream_bridge(struct pci_dev *pdev) bridge = device_get_parent(bridge); if (bridge == NULL) goto done; - if (device_get_devclass(device_get_parent(bridge)) != - devclass_find("pci")) + if (!is_pci_device(bridge)) goto done; /* diff --git a/sys/dev/ata/ata-all.c b/sys/dev/ata/ata-all.c index 2e77c0f6478e..85fe40aa4584 100644 --- a/sys/dev/ata/ata-all.c +++ b/sys/dev/ata/ata-all.c @@ -1176,8 +1176,7 @@ ataaction(struct cam_sim *sim, union ccb *ccb) cpi->protocol = PROTO_ATA; cpi->protocol_version = PROTO_VERSION_UNSPECIFIED; cpi->maxio = ch->dma.max_iosize ? ch->dma.max_iosize : DFLTPHYS; - if (device_get_devclass(device_get_parent(parent)) == - devclass_find("pci")) { + if (is_pci_device(parent)) { cpi->hba_vendor = pci_get_vendor(parent); cpi->hba_device = pci_get_device(parent); cpi->hba_subvendor = pci_get_subvendor(parent); diff --git a/sys/dev/bge/if_bge.c b/sys/dev/bge/if_bge.c index 2feb19bff677..3551f10b2ae3 100644 --- a/sys/dev/bge/if_bge.c +++ b/sys/dev/bge/if_bge.c @@ -3202,20 +3202,13 @@ bge_mbox_reorder(struct bge_softc *sc) } mbox_reorder_lists[] = { { 0x1022, 0x7450, "AMD-8131 PCI-X Bridge" }, }; - devclass_t pci, pcib; - device_t bus, dev; + device_t dev; int i; - pci = devclass_find("pci"); - pcib = devclass_find("pcib"); dev = sc->bge_dev; - bus = device_get_parent(dev); for (;;) { - dev = device_get_parent(bus); - bus = device_get_parent(dev); - if (device_get_devclass(dev) != pcib) - break; - if (device_get_devclass(bus) != pci) + dev = device_get_parent(device_get_parent(dev)); + if (!is_pci_device(dev)) break; for (i = 0; i < nitems(mbox_reorder_lists); i++) { if (pci_get_vendor(dev) == diff --git a/sys/dev/ichwd/ichwd.c b/sys/dev/ichwd/ichwd.c index 5481553cc175..b0c953e58956 100644 --- a/sys/dev/ichwd/ichwd.c +++ b/sys/dev/ichwd/ichwd.c @@ -561,13 +561,12 @@ static device_t ichwd_find_ich_lpc_bridge(device_t isa, struct ichwd_device **id_p) { struct ichwd_device *id; - device_t isab, pci; + device_t isab; uint16_t devid; /* Check whether parent ISA bridge looks familiar. */ isab = device_get_parent(isa); - pci = device_get_parent(isab); - if (pci == NULL || device_get_devclass(pci) != devclass_find("pci")) + if (!is_pci_device(isab)) return (NULL); if (pci_get_vendor(isab) != VENDORID_INTEL) return (NULL); diff --git a/sys/dev/iommu/busdma_iommu.c b/sys/dev/iommu/busdma_iommu.c index 82f73d469585..3852429c4a8a 100644 --- a/sys/dev/iommu/busdma_iommu.c +++ b/sys/dev/iommu/busdma_iommu.c @@ -117,17 +117,14 @@ iommu_bus_dma_is_dev_disabled(int domain, int bus, int slot, int func) int iommu_get_requester(device_t dev, device_t *requesterp, uint16_t *rid) { - devclass_t pci_class; device_t l, pci, pcib, pcip, pcibp, requester; int cap_offset; uint16_t pcie_flags; bool bridge_is_pcie; - pci_class = devclass_find("pci"); l = requester = dev; - pci = device_get_parent(dev); - if (pci == NULL || device_get_devclass(pci) != pci_class) { + if (!is_pci_device(dev)) { *rid = 0; /* XXXKIB: Could be ACPI HID */ *requesterp = NULL; return (ENOTTY); @@ -141,29 +138,18 @@ iommu_get_requester(device_t dev, device_t *requesterp, uint16_t *rid) * unit. */ for (;;) { - pci = device_get_parent(l); - if (pci == NULL) { + if (!is_pci_device(l)) { if (bootverbose) { printf( - "iommu_get_requester(%s): NULL parent for %s\n", + "iommu_get_requester(%s): non-pci ancestor %s\n", device_get_name(dev), device_get_name(l)); } *rid = 0; *requesterp = NULL; return (ENXIO); } - if (device_get_devclass(pci) != pci_class) { - if (bootverbose) { - printf( - "iommu_get_requester(%s): non-pci parent %s for %s\n", - device_get_name(dev), device_get_name(pci), - device_get_name(l)); - } - *rid = 0; - *requesterp = NULL; - return (ENXIO); - } + pci = device_get_parent(l); pcib = device_get_parent(pci); if (pcib == NULL) { if (bootverbose) { @@ -182,10 +168,8 @@ iommu_get_requester(device_t dev, device_t *requesterp, uint16_t *rid) * port, and the requester ID won't be translated * further. */ - pcip = device_get_parent(pcib); - if (device_get_devclass(pcip) != pci_class) + if (!is_pci_device(pcib)) break; - pcibp = device_get_parent(pcip); if (pci_find_cap(l, PCIY_EXPRESS, &cap_offset) == 0) { /* @@ -212,6 +196,8 @@ iommu_get_requester(device_t dev, device_t *requesterp, uint16_t *rid) * PCI bridge, then we know pcib is actually a * PCIe/PCI bridge. */ + pcip = device_get_parent(pcib); + pcibp = device_get_parent(pcip); if (!bridge_is_pcie && pci_find_cap(pcibp, PCIY_EXPRESS, &cap_offset) == 0) { pcie_flags = pci_read_config(pcibp, @@ -337,11 +323,9 @@ bool bus_dma_iommu_set_buswide(device_t dev) { struct iommu_unit *unit; - device_t parent; u_int busno, slot, func; - parent = device_get_parent(dev); - if (device_get_devclass(parent) != devclass_find("pci")) + if (!is_pci_device(dev)) return (false); unit = iommu_find(dev, bootverbose); if (unit == NULL) diff --git a/sys/dev/pci/pci.c b/sys/dev/pci/pci.c index adf3daea66fd..034f34e2dde2 100644 --- a/sys/dev/pci/pci.c +++ b/sys/dev/pci/pci.c @@ -6535,11 +6535,9 @@ device_t pci_find_pcie_root_port(device_t dev) { struct pci_devinfo *dinfo; - devclass_t pci_class; device_t pcib, bus; - pci_class = devclass_find("pci"); - KASSERT(device_get_devclass(device_get_parent(dev)) == pci_class, + KASSERT(is_pci_device(dev), ("%s: non-pci device %s", __func__, device_get_nameunit(dev))); /* @@ -6555,11 +6553,7 @@ pci_find_pcie_root_port(device_t dev) KASSERT(pcib != NULL, ("%s: null bridge of %s", __func__, device_get_nameunit(bus))); - /* - * pcib's parent must be a PCI bus for this to be a - * PCI-PCI bridge. - */ - if (device_get_devclass(device_get_parent(pcib)) != pci_class) + if (!is_pci_device(pcib)) return (NULL); dinfo = device_get_ivars(pcib); diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index 39b2fcab67b4..72c93e201d96 100644 --- a/sys/dev/pci/vga_pci.c +++ b/sys/dev/pci/vga_pci.c @@ -111,8 +111,7 @@ vga_pci_is_boot_display(device_t dev) */ pcib = device_get_parent(device_get_parent(dev)); - if (device_get_devclass(device_get_parent(pcib)) == - devclass_find("pci")) { + if (is_pci_device(pcib)) { /* * The parent bridge is a PCI-to-PCI bridge: check the * value of the "VGA Enable" bit. @@ -186,8 +185,7 @@ vga_pci_map_bios(device_t dev, size_t *size) #endif pcib = device_get_parent(device_get_parent(dev)); - if (device_get_devclass(device_get_parent(pcib)) == - devclass_find("pci")) { + if (is_pci_device(pcib)) { /* * The parent bridge is a PCI-to-PCI bridge: check the * value of the "VGA Enable" bit. diff --git a/sys/dev/vnic/thunder_bgx_fdt.c b/sys/dev/vnic/thunder_bgx_fdt.c index 20a5b54f7448..d8c5459f2914 100644 --- a/sys/dev/vnic/thunder_bgx_fdt.c +++ b/sys/dev/vnic/thunder_bgx_fdt.c @@ -285,11 +285,9 @@ bgx_fdt_traverse_nodes(uint8_t unit, phandle_t start, char *name, static device_t bgx_find_root_pcib(device_t dev) { - devclass_t pci_class; device_t pcib, bus; - pci_class = devclass_find("pci"); - KASSERT(device_get_devclass(device_get_parent(dev)) == pci_class, + KASSERT(is_pci_device(dev), ("%s: non-pci device %s", __func__, device_get_nameunit(dev))); /* Walk the bridge hierarchy until we find a non-PCI device */ @@ -298,9 +296,6 @@ bgx_find_root_pcib(device_t dev) KASSERT(bus != NULL, ("%s: null parent of %s", __func__, device_get_nameunit(dev))); - if (device_get_devclass(bus) != pci_class) - return (NULL); - pcib = device_get_parent(bus); KASSERT(pcib != NULL, ("%s: null bridge of %s", __func__, device_get_nameunit(bus))); @@ -309,7 +304,7 @@ bgx_find_root_pcib(device_t dev) * If the parent of this PCIB is not PCI * then we found our root PCIB. */ - if (device_get_devclass(device_get_parent(pcib)) != pci_class) + if (!is_pci_device(pcib)) return (pcib); dev = pcib; diff --git a/sys/x86/iommu/amd_drv.c b/sys/x86/iommu/amd_drv.c index fc9770e1a32b..d45c576856eb 100644 --- a/sys/x86/iommu/amd_drv.c +++ b/sys/x86/iommu/amd_drv.c @@ -894,8 +894,7 @@ amdiommu_find_unit(device_t dev, struct amdiommu_unit **unitp, uint16_t *ridp, if (!amdiommu_enable) return (ENXIO); - if (device_get_devclass(device_get_parent(dev)) != - devclass_find("pci")) + if (!is_pci_device(dev)) return (ENXIO); bzero(&ifu, sizeof(ifu)); diff --git a/sys/x86/iommu/intel_drv.c b/sys/x86/iommu/intel_drv.c index 28db14bba95b..185ed9c1a628 100644 --- a/sys/x86/iommu/intel_drv.c +++ b/sys/x86/iommu/intel_drv.c @@ -605,16 +605,13 @@ dmar_print_path(int busno, int depth, const ACPI_DMAR_PCI_PATH *path) int dmar_dev_depth(device_t child) { - devclass_t pci_class; device_t bus, pcib; int depth; - pci_class = devclass_find("pci"); for (depth = 1; ; depth++) { bus = device_get_parent(child); pcib = device_get_parent(bus); - if (device_get_devclass(device_get_parent(pcib)) != - pci_class) + if (!is_pci_device(pcib)) return (depth); child = pcib; } @@ -623,19 +620,16 @@ dmar_dev_depth(device_t child) void dmar_dev_path(device_t child, int *busno, void *path1, int depth) { - devclass_t pci_class; device_t bus, pcib; ACPI_DMAR_PCI_PATH *path; - pci_class = devclass_find("pci"); path = path1; for (depth--; depth != -1; depth--) { path[depth].Device = pci_get_slot(child); path[depth].Function = pci_get_function(child); bus = device_get_parent(child); pcib = device_get_parent(bus); - if (device_get_devclass(device_get_parent(pcib)) != - pci_class) { + if (!is_pci_device(pcib)) { /* reached a host bridge */ *busno = pcib_get_bus(bus); return; @@ -765,8 +759,7 @@ dmar_find(device_t dev, bool verbose) /* * This function can only handle PCI(e) devices. */ - if (device_get_devclass(device_get_parent(dev)) != - devclass_find("pci")) + if (!is_pci_device(dev)) return (NULL); dev_domain = pci_get_domain(dev); From nobody Mon May 18 18:53:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK6QP3lVmz6fpRw for ; Mon, 18 May 2026 18:53: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK6QP1B7Pz3MHq for ; Mon, 18 May 2026 18:53:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779130413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+RudSkkPm9KdtDd24axoIORCjGIrJOF0qoXlDRmIeqE=; b=hBtRWmuI+xsDdUeigT8TMPbXEK/eYyUdk0x+zqf90M0wqoZ1Z7t9sMPlD6NxeD2QOJWIkc iKIzLZ9WTFP9UqjcGBwZtKyWgePLcoxRgTixHqPjb5vvWt+nHyMfUH5cDTxYiovkCLpme/ f2hclmvHqSTWqSn6eeoE5mqA6dPw2fidf3SRmLL2YKJf5+SBE+YcRfZe6/LSSzrgodv66o apabMESH6ALon5+q6ngzPW6gtIhoG3x//M6YJZ+/VsyNhDI7iLWHrLiJpYHir3JPOI3mdp JzkkaHrEFqIF+uTHBwvKCIxw3u+DyLKqw9V00TlIKbK6sI9prIzdXX0AFhCskA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779130413; a=rsa-sha256; cv=none; b=Cp9/Wk2NkP5ZYSO6uvzAs5lL3IsO9ZEkzDKiCQEM7byGdn9RsOiI1n/1pUQ0OYMtpzVdKf Fs2zoyibDshQj8kUoRhKfnpCBomvoGbKJVAX/md9qOTCxWRqz1BOYAL6aCv8viokAaoBaN erM4rOFkFTxLhQBOIaS85EEKaCoVhX5AC34bqx3BgnDNrD04+AyAX2Pa5mYndt4ljEEP0k /wB5RB2J8Mb9xhSdSHX8xfZziVi9B9fhhG4Ae2vZ6kN1f9Hmn0vIIlhXv57PkThJEob2eU 4cwo6yHxhyAFV9L/l22m3UC0+3iXw3AGu/hHCU/BP3mBsTsL4Moex04T4V+MyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779130413; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+RudSkkPm9KdtDd24axoIORCjGIrJOF0qoXlDRmIeqE=; b=OuLXjohG36BLntiU+N19/DIT6qR/xxfa9ZFURWgKEzUUNk5mQ7HmAwA8btii7b6s6RaAdN 4LdhZ7qmBUUcj9lHF+pmVJ9F4vjpd84pgGFH8sX7iSdZtFeWhSuTnyaBMYhiqRqi80FfHP At2G+hPaeaEsWvA5gexfN/5TAQmyJ+c2gscjOPtEDujVhTPiMthi4sS7Ljbgeg3sKVYvxn v3hrPmW3OANgku3cT/qrf/3G90bMwPZOfVQ/Ow9VE/EBpLAQP+ktc5CrzqQmAdvjtbNVbR zwpF5KfrvruysdKf9p7D76fYhHglmP7OJGVG2GNPlYjiou/u9kT7/ElbY5OiQg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK6QP0VjHzhJk for ; Mon, 18 May 2026 18:53:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31a33 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 18:53:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: be4f245e1e4f - main - sys: Use is_pci_device instead of checking device or devclass names List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: be4f245e1e4fe60d43aaff5b11b45f2a9a66a51c Auto-Submitted: auto-generated Date: Mon, 18 May 2026 18:53:33 +0000 Message-Id: <6a0b602d.31a33.62bc8c54@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=be4f245e1e4fe60d43aaff5b11b45f2a9a66a51c commit be4f245e1e4fe60d43aaff5b11b45f2a9a66a51c Author: John Baldwin AuthorDate: 2026-05-18 18:52:39 +0000 Commit: John Baldwin CommitDate: 2026-05-18 18:52:39 +0000 sys: Use is_pci_device instead of checking device or devclass names Reviewed by: bz, imp Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56998 --- sys/dev/sound/pcm/ac97.c | 2 +- sys/dev/thunderbolt/tb_pcib.c | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/sys/dev/sound/pcm/ac97.c b/sys/dev/sound/pcm/ac97.c index 1407d202a0d1..ec742ccbbfaa 100644 --- a/sys/dev/sound/pcm/ac97.c +++ b/sys/dev/sound/pcm/ac97.c @@ -628,7 +628,7 @@ ac97_initmixer(struct ac97_info *codec) } pdev = codec->dev; - while (strcmp(device_get_name(device_get_parent(pdev)), "pci") != 0) { + while (!is_pci_device(pdev)) { /* find the top-level PCI device handler */ pdev = device_get_parent(pdev); } diff --git a/sys/dev/thunderbolt/tb_pcib.c b/sys/dev/thunderbolt/tb_pcib.c index 65ff42e4f831..876722a0076d 100644 --- a/sys/dev/thunderbolt/tb_pcib.c +++ b/sys/dev/thunderbolt/tb_pcib.c @@ -548,16 +548,13 @@ tb_pci_probe(device_t dev) { struct tb_pcib_ident *n; device_t parent; - devclass_t dc; /* * This driver is only valid if the parent device is a PCI-PCI - * bridge. To determine that, check if the grandparent is a - * PCI bus. + * bridge. */ parent = device_get_parent(dev); - dc = device_get_devclass(device_get_parent(parent)); - if (strcmp(devclass_get_name(dc), "pci") != 0) + if (!is_pci_device(parent)) return (ENXIO); if ((n = tb_pcib_find_ident(parent)) != NULL) { From nobody Mon May 18 19:06:43 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK6jc6dsxz6fqFR; Mon, 18 May 2026 19:06:44 +0000 (UTC) (envelope-from brooks@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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK6jc4qDBz3PV4; Mon, 18 May 2026 19:06:44 +0000 (UTC) (envelope-from brooks@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779131204; 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=Wr9jSq0gOwx05pFgmZg+VsgNJev44RqXfvNMWyS4I4A=; b=K+Dz8xs7bJvAxSZGpsvuLnOdxCKhCpjF4rN7JlEHkhab/T/6SEvlRCrib0m9O5+eO9sfgm gk3wuUqKaajC0oL814vtz555W0RD8MBqxIr5vF1hZP6esKaFCGmCCjBvuvig02q5Hq4T5A hPuXGYLhln5MbnHvtyqHZIn5dc8rRUs+EUTpsJw9IFfLwGfLGMyaEF+dE385+tU5meRRXj 5yXPzt1Sf+wf2oB4EZbA7qGML7DWGq/FnBhYCrN3Jb0qxh+ZhnrLZIEgXaXFoHpRr+7Uvt zyesBRY+As1Ebe52n7sCbhImzaS+8jxaHj3JLUHcFpMdq3m3X+MDRl2+8FX8AA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779131204; a=rsa-sha256; cv=none; b=ecbydO8rmw9HmBp+/257We0YQ2rY8RgCsKagKEswQ25YUardoeLBHLnk7lTV7d9GKw4OVC 6u/oBuB3lKQwPxqkPpSvZ8DuLuqAiUWrcHeyolswAKbVz8oiudrpGiIH2SPmo59TA0UFaN 5M6bAq0c0MGeUevkep9ut0JeMA+Llae8S0of2Dy1f4G4b/L72yqLGOpVEvzs1lwupFmza/ CXdmVSAPnVvQwNXO4wr11ixVBNPNjnNPgM2XogjnTe4+zX5o0/ApUWzPHFUSF0mYqjeZ90 E3r9v95mUpModKH5srDJSS0eIREvOU9stDgi/0esYprEEHdfWSGX/4XO4JJr/A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779131204; 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=Wr9jSq0gOwx05pFgmZg+VsgNJev44RqXfvNMWyS4I4A=; b=fk9K7FN0qQT7VQPtTU4WdefS25nayU2OLoeY9EDHwqUBYeL6EmgXMqzAt9f4abdwvYa/vF RIzoop7TY0yv4r+B9YHf5vLfYUcKVTjRBcZux4MWwHXCXVo7PGgILl+hN0dJZKVLD9x5yu JyITK1PCP0FWniztIBXDWCb1fRba6trM7/NGFMaKDLP+QSIgzzxQ889a8Qy2ESAxD4y4Gk rfZ6gTJJYnCwsEvLuagvOKIv4BM8/gGR4w5awT6pyK5Wqyiw7E/R2T2K0Tsdfgtr4UoXtg +DlU1plNZ8XPO+MCC0f/BXCIT3SVpz3aLQ2+i0vVQ9ix67NcW2kPKTmas3x7ig== Received: from spindle.one-eyed-alien.net (spindle.one-eyed-alien.net [199.48.129.229]) (using TLSv1.3 with cipher TLS_AES_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: brooks/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gK6jc3r5pz1GlN; Mon, 18 May 2026 19:06:44 +0000 (UTC) (envelope-from brooks@freebsd.org) Received: by spindle.one-eyed-alien.net (Postfix, from userid 3001) id B5D253C01A0; Mon, 18 May 2026 19:06:43 +0000 (UTC) Date: Mon, 18 May 2026 19:06:43 +0000 From: Brooks Davis To: Ed Maste Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 876a17321c89 - main - nlist.3: Replace a.out(5) Xref with elf(5) Message-ID: References: <6a0b286c.40371.a734374@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <6a0b286c.40371.a734374@gitrepo.freebsd.org> On Mon, May 18, 2026 at 02:55:40PM +0000, Ed Maste wrote: > The branch main has been updated by emaste: > > URL: https://cgit.FreeBSD.org/src/commit/?id=876a17321c896427d70de94101df4d888a19189b > > commit 876a17321c896427d70de94101df4d888a19189b > Author: Ed Maste > AuthorDate: 2026-05-18 14:50:22 +0000 > Commit: Ed Maste > CommitDate: 2026-05-18 14:55:32 +0000 > > nlist.3: Replace a.out(5) Xref with elf(5) > > ELF support was added to nlist() in 1997, and a.out support was removed > in 2020. The man page was not updated for either of these changes. I'm not sure this is quite the right change. struct nlist is documented in a.out(5) not elf(5). It's also documented in stab(5) so it might be that is a better reference. Ultimately, we might want to embed documentation of the relevant parts of struct nlist in nlist(3). There's a whole cluster of excedingly obsolete manpages in this area including, for example, link(5) which seems to have not had a technical content change since 1995. -- Brooks From nobody Mon May 18 19:51:13 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK7hx2s5Vz6cgXN for ; Mon, 18 May 2026 19:51: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK7hx0nXvz3Txp for ; Mon, 18 May 2026 19:51:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779133873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lUiFvSjejoKJ/lOXmczuKOStFd7Tg5K5TYxT5moU1qE=; b=cIL0bVedeLDDMrjaHhlAOLulRulftAwUE+d+n46xBICqDPc2a8tAWwwgv3jMXrzqaxYp5J 4xEcosehPQ3EedCi8O1opVs56jrD8BJfL6O8t4XXHBgJhHOpb3da/hYxjOC39pNWgftoHp w2vAJFl2SyVetgbR7QKwlgExnq3Fa4Uiyonq0dKfDGiMReBSqD7v2rvmexpS8mRcwLN1M9 aWk6KJANtF/GIeOP/AL9d5/Ae0n1WGMnf8pJ7pwtYMrGIn7nR7LK2doRbMsZum4L4Tl5qd qffqWDDIF0Q+/5G8utzdJAm/EngZMbThx/F8p5sCePtEi8qY9MSxkMw7RPt2jA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779133873; a=rsa-sha256; cv=none; b=cJ4uFDwt0pnfyCzJZQRsVPac9eP1yuUlDu+P7IiKhkJOEW4FcnAcfY6EG78GhB8QVJxQSk d+vVamU6cUu/AwGIrKPcuOTM+Be+1+z6g1sFteooyJczipG7zffpvP+U2K0suphCJKZuum 0ajNzo+D9tp14UglXRvuVvDznMvsm6PRHfeR0XcTt8hsfGL/e8OKvCq6E2puatEUNJIMpv RdkX/KZzz6AYlba2Pwwqkph/RYP0Twqg5hJ4k5gSQZ9VqUDaJHMIaT1nHGv4KO05DTKKAb 5oflytZc5Hiyk8xD0kvaSd8bCh0JMt0PuvAz5IXt3+OJvo6LBK1tWSeB83cchw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779133873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lUiFvSjejoKJ/lOXmczuKOStFd7Tg5K5TYxT5moU1qE=; b=Q0KcmxKFcSsKe7DsCM9UvW5ZV0yRTPQT1ShZjBQLbIwX5MQOsrhEc5u9TyFOPxr8pwJM7v PyoYFTXq6GbAKAqmVaxE+2IvKKjHEomCH1GCXTd8QRkz9bXL4LxDi3F1RUpRbg55iJLA0v VdQbMaJimLP+idtRm/wgeCBaCz6FQxSdcMoRgcLwtycoi8oigZokWmn8C/ZPCAuK0cd0lZ 0X0xHZ3LjlDcZ0obY2lnTFMph15uU9vdlwJ7thgDxthAsyLKOOAzci882qOystgWxM3AG+ 5pbEb9Pyp4be5GeAITEGBDTWHwHsWLvE/AvLTBofH/Q/k5MylhzIGEwqqNz7IQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK7hx0K5JzjZK for ; Mon, 18 May 2026 19:51:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3786f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 19:51:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 63d7b7fad2dd - main - ctld: Mark a few more isns_* methods in the conf class private List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 63d7b7fad2dd2343854c60f0da4ac46ef5b0d8b1 Auto-Submitted: auto-generated Date: Mon, 18 May 2026 19:51:13 +0000 Message-Id: <6a0b6db1.3786f.5ff27204@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=63d7b7fad2dd2343854c60f0da4ac46ef5b0d8b1 commit 63d7b7fad2dd2343854c60f0da4ac46ef5b0d8b1 Author: John Baldwin AuthorDate: 2026-05-18 19:47:57 +0000 Commit: John Baldwin CommitDate: 2026-05-18 19:47:57 +0000 ctld: Mark a few more isns_* methods in the conf class private These are only invoked from other methods in the conf class. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56531 --- usr.sbin/ctld/ctld.hh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/ctld/ctld.hh b/usr.sbin/ctld/ctld.hh index 45590ada4111..d3b08dc12603 100644 --- a/usr.sbin/ctld/ctld.hh +++ b/usr.sbin/ctld/ctld.hh @@ -508,9 +508,6 @@ struct conf { void set_timeout(int timeout); bool add_isns(const char *addr); - void isns_register_targets(struct isns *isns, struct conf *oldconf); - void isns_deregister_targets(struct isns *isns); - void isns_schedule_update(); void isns_update(); int apply(struct conf *oldconf); @@ -523,6 +520,9 @@ private: struct isns_req isns_check_request(const char *hostname); struct isns_req isns_deregister_request(const char *hostname); void isns_check(struct isns *isns); + void isns_deregister_targets(struct isns *isns); + void isns_register_targets(struct isns *isns, struct conf *oldconf); + void isns_schedule_update(); std::string conf_pidfile_path; std::unordered_map> conf_luns; From nobody Mon May 18 19:51:11 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK7hx0JCPz6cgHB for ; Mon, 18 May 2026 19:51: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK7hw09g3z3TcD for ; Mon, 18 May 2026 19:51:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779133872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HtwXl1O4nTQeA1id9rSe9Stl51FI8cLO69laWZGcJQ0=; b=TT3VIxdqiBsFFnIDUTRdWtylyA15oONjI5ksEg1ajZf5aQQQ/T5a6AL/i/Wc0ysaRBlZ91 BW9w98G8gR9IaK/PBNBXgychS8vrJJbEZQz8P5xHazU5WZzmoIh4BT3iKFvD5xx2tRg464 wNFH2eszm7cJLBPKagB830vTMSKE7H7f3i1JybhCBScw5odYl387WuJdx9n3JFE26QSXC7 M1rsFcdIgz7NSOeTlljxDG9uFIMeW7g55/xaFrXrUhKzUgNaYg8jZbmKHrxCd9bP1qCbqy 0g667OryX4/3a6w/C6Yvms1s8kctyUKZwkNwe6BkrYeE/QuU7VhB7kgQ9oz9sA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779133872; a=rsa-sha256; cv=none; b=hm+/uQ7KTLxdgdtTF8F9gY/knDMQRaY/AKl2U1ck5YbRnZdFjIyO6yuG8sc5L9Dl+q3Or/ 8/PgFj4e5wbrKBTQso8JjJOvihG0zTNe0IfOfF0w+4bsibDBsgYyTbzgE6GTPshkEV6YNL swycDsct/MYJvngcKtlk1VetwqiJsKg/VzWqpBsLggDuQMExqpirFk6eUYUKB/Gv04rYDw eYawwZrH/D+iCqR3BzdoaqsjzGxOdLH8Lg1yik0XN5cKjEz8rtCORUDt+HKKzY+DyJw8/A IbhPm4zvNGny8UFDGfgTL7ZOnE+mvFs29/pbyErxe+Me3L4EirWPBgdgxfTQLQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779133872; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HtwXl1O4nTQeA1id9rSe9Stl51FI8cLO69laWZGcJQ0=; b=BhGXfsGoJfjBuScutISoVXi9AFHcGZywVtpCw3UxXvy2Z4vDWzCUNE0Cbr5ollyvhNuKRL EVZKitNFkQV0e/qbLQDe70lRmtomujyWbOSfCcLyTuzgTAnoQECgJXQzt0rvP1b+HGboZN 7Wly81pcOOzMRyKs6vWA10No3+V7A4+YpbbohEGF0jj6PDcRgSW+Y5uhrFg4bctgDCn4Xg yOekYFqwjLdJKlxeO053N46oE7xnUViQZZmMNtBGuB/8R9gogi7TfnqcfoP+4E1PrgdyQ1 b8VSIkf7B3yzQepp9zbRvuV0V6kme7svOQwC/9E4dAf7R97Tr8l8SkYublaYgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK7hv6by1zhkl for ; Mon, 18 May 2026 19:51:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3715e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 19:51:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 4f90de093321 - main - ctld: Remove redundant call to conf::isns_schedule_update List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 4f90de0933218fd257300c6341abf157387f7641 Auto-Submitted: auto-generated Date: Mon, 18 May 2026 19:51:11 +0000 Message-Id: <6a0b6daf.3715e.55456aab@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=4f90de0933218fd257300c6341abf157387f7641 commit 4f90de0933218fd257300c6341abf157387f7641 Author: John Baldwin AuthorDate: 2026-05-18 19:47:41 +0000 Commit: John Baldwin CommitDate: 2026-05-18 19:47:41 +0000 ctld: Remove redundant call to conf::isns_schedule_update This is already called at the end of conf::apply. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56530 --- usr.sbin/ctld/ctld.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/usr.sbin/ctld/ctld.cc b/usr.sbin/ctld/ctld.cc index 8aaec41e8487..627ecf8bba93 100644 --- a/usr.sbin/ctld/ctld.cc +++ b/usr.sbin/ctld/ctld.cc @@ -2740,8 +2740,6 @@ main(int argc, char **argv) pidfile.write(); - newconf->isns_schedule_update(); - for (;;) { main_loop(!daemonize); if (sighup_received) { From nobody Mon May 18 19:51:14 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK7hy3bk6z6cgXQ for ; Mon, 18 May 2026 19:51: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK7hy1XVtz3Txq for ; Mon, 18 May 2026 19:51:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779133874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4//sCDbG2Ps8e3VbRAQRLa+1lUEDvKziEf+O7XacwYw=; b=Y4js2is/HbELAH7zmOVs3r8bbSukg4jNaP4Q24iEgTv+he1Kmp5g7SwwAjNiTLeIvicu70 cXmlDoPTccJtgkopMs47OlHl56gMrkQ/WN2ZAc/7Yd6t532XABJO0EhbMtJM3g81JXh08A kPbz5lfYYTba3zgTmb+hlJGLj+OqvHcR09DINO/d9TObMT2D0xdbhM91wgKynFiAMN6DpM gFXZheTIznoQrv25biYY1d19FaYfFR+hfPLPM/ICNlZSaXYvthlheYgRm/Qw/MfqzH8lG8 2e2RNIi0dU6+JKr7VDM2fVCBY/vaCxXK2PCxnC3afyyyAs3dqBOQ5GWtQ8hetw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779133874; a=rsa-sha256; cv=none; b=bXax4/x01yAU1w5Ewu6JxDbpktoXz28H3yUYP4KGh/T83IFo+HMHi7dLhyT3mu62hSwsqz B9FCcJZuZ6X38PGNc48fNuWERz6EuaiWTn10LWJX0fnUbq6/ezu7IvD7O9KPR+7FIM7V5h WCS52i0hvgTHN+NMt5d2pLgQUxJq46W3QkkkNZwDzHTaAsdcxMwZXbOsbVY9vbccBMQ1QH aQUp60OvkbvibKvKuu00BkvX2z8t/QXLLUWGMfkR5Y0hdLv6U7gbH4XpHcCrkKy6ktt0/y av6chsqhStuwVTkChF4qRp64fuMTCfPfot5TJK6HicD38+ts3LcV+lxeo1+IVQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779133874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4//sCDbG2Ps8e3VbRAQRLa+1lUEDvKziEf+O7XacwYw=; b=S3ksG3nS5M1hFVj4hnq0509vfxBMtHjiBC1MAMASIZnKThmcW2ZMr1YsBl50PJCxbdObB5 ac1pQIQqbEmSGUO+nXuSsTPyELWmJeW8aa2HcyHdwnhIRE4wNk2wGj0G0y4es3sPfdO06p +gS17v30aZECjREzd8H8TE+WahhRRL1PksKRexY18loeseMNFUcjea1N3jeD7k8/3Ph21T RWePIasm51So2tTvGAJjLVsbhlwEtQGq9Cf2y9xo0gnKvMWR9d95uyv6qyi+fVOY6V43IF UXLaSEGFUz/Cmi9gSQgGINnmZ+aoNnZ9haoDtgMKGSKfMhyl8bRgEkE4C+usQw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK7hy17TJzjbf for ; Mon, 18 May 2026 19:51:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 388f1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 19:51:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f1c5de5fab9d - main - ctld: Add a dedicated conf method for shutting down List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f1c5de5fab9d5cada11935418db11e19ebff7e34 Auto-Submitted: auto-generated Date: Mon, 18 May 2026 19:51:14 +0000 Message-Id: <6a0b6db2.388f1.53ec07f6@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f1c5de5fab9d5cada11935418db11e19ebff7e34 commit f1c5de5fab9d5cada11935418db11e19ebff7e34 Author: John Baldwin AuthorDate: 2026-05-18 19:48:09 +0000 Commit: John Baldwin CommitDate: 2026-05-18 19:49:35 +0000 ctld: Add a dedicated conf method for shutting down Currently the main loop creates an empty config and applies it to force a shutdown of all of the existing configuration. While this is functional and does avoid duplicating some code, it is also a bit clunky and requires a special hack in the pidfile path handling in the conf::apply method. Instead, use a dedicated conf::shutdown method which tears down the CTL ports and LUNs and closes the sockets. Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56532 --- usr.sbin/ctld/ctld.cc | 56 ++++++++++++++++++++++++++++++++++++--------------- usr.sbin/ctld/ctld.hh | 1 + 2 files changed, 41 insertions(+), 16 deletions(-) diff --git a/usr.sbin/ctld/ctld.cc b/usr.sbin/ctld/ctld.cc index 627ecf8bba93..24b02a936670 100644 --- a/usr.sbin/ctld/ctld.cc +++ b/usr.sbin/ctld/ctld.cc @@ -1976,11 +1976,9 @@ conf::apply(struct conf *oldconf) /* * Rename the pidfile if the pathname changes. On startup, * oldconf created via conf_new_from_kernel will not contain a - * valid pidfile_path. On shutdown, the temporary newconf - * will not contain a valid pidfile_path. + * valid pidfile_path. */ - if (!oldconf->conf_pidfile_path.empty() && - !conf_pidfile_path.empty()) { + if (!oldconf->conf_pidfile_path.empty()) { if (oldconf->conf_pidfile_path != conf_pidfile_path) { /* pidfile has changed. rename it */ log_debugx("moving pidfile to %s", @@ -2210,6 +2208,41 @@ conf::apply(struct conf *oldconf) return (cumulated_error); } +void +conf::shutdown() +{ + /* Deregister from iSNS servers. */ + for (auto &kv : conf_isns) + isns_deregister_targets(&kv.second); + + /* Remove all ports. */ + for (const auto &kv : conf_ports) { + const std::string &name = kv.first; + port *port = kv.second.get(); + + if (port->is_dummy()) + continue; + log_debugx("removing port \"%s\"", name.c_str()); + if (!port->kernel_remove()) + log_warnx("failed to remove port %s", name.c_str()); + } + + /* Remove all LUNs. */ + for (const auto &kv : conf_luns) { + struct lun *lun = kv.second.get(); + + if (!lun->kernel_remove()) + log_warnx("failed to remove lun \"%s\", CTL lun %d", + lun->name(), lun->ctl_lun()); + } + + /* Close sockets on all portal groups. */ + for (auto &kv : conf_portal_groups) + kv.second->close_sockets(); + for (auto &kv : conf_transport_groups) + kv.second->close_sockets(); +} + bool timed_out(void) { @@ -2767,21 +2800,12 @@ main(int argc, char **argv) oldconf.reset(); } } else if (sigterm_received) { - log_debugx("exiting on signal; " - "reloading empty configuration"); + log_debugx("exiting on signal"); - log_debugx("removing CTL iSCSI ports " + log_debugx("removing CTL iSCSI and NVMeoF ports " "and terminating all connections"); - oldconf = std::move(newconf); - newconf = std::make_unique(); - if (debug > 0) - newconf->set_debug(debug); - error = newconf->apply(oldconf.get()); - if (error != 0) - log_warnx("failed to apply configuration"); - oldconf.reset(); - + newconf->shutdown(); log_warnx("exiting on signal"); return (0); } else { diff --git a/usr.sbin/ctld/ctld.hh b/usr.sbin/ctld/ctld.hh index d3b08dc12603..7ae033804157 100644 --- a/usr.sbin/ctld/ctld.hh +++ b/usr.sbin/ctld/ctld.hh @@ -513,6 +513,7 @@ struct conf { int apply(struct conf *oldconf); void delete_target_luns(struct lun *lun); bool reuse_portal_group_socket(struct portal &newp); + void shutdown(); bool verify(); private: From nobody Mon May 18 19:51:15 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gK7hz5Rsxz6cgXR for ; Mon, 18 May 2026 19:51: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gK7hz2R4kz3TSk for ; Mon, 18 May 2026 19:51:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779133875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FCvJ80FbhCF+pe97TGfyU7y7ZOJeS7y3XCgQKDUXTcM=; b=XJw2LsvKWCGMH/AnRs0tAh6oa2KI8dxMyfQtUPXdO2A0jfo3cMTx6VCeAH76BDXrwOP1a2 7zTlcvGpLQjpu9eznv/tmuEzsYOxx2ZQwITno0WFKt+hQQD10gHCbcA/vcXc80lNoHow/N Wk9/7F2g8ASNExRbMhJu2fdzaDhG7gGquNphZJGnJyLOZ1WsSUSwjCsdpenjjr9o+tQfkr x7FRvNf1CgfLTTd691JoHpGjr20juVvxJZwgSfU7oqX88uMG7rA3W7Ug/4RiARn7/mMJ3b pLV9IcGeEZxii+T1HuZFQaKpfHCO46YWqkP40PsFtevhcukvQBZxlegU11qoRA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779133875; a=rsa-sha256; cv=none; b=NojPb8mywjh9io0o7z5u7cWx9wgaQZ/aQ/Dw0xsNAXxymC1aPVwjn6l9yq0YwnobvnBJrW 6Xy+uf2uBmkNFe/aV8aD01D8L2GpPbpOpgTdguz+a+1FI2WYNnk8Izu1W0r4oPgOhwfBVy EXfjmA/av6aBCLPVoWB7+YhCSvfWf2GnNScRBd7wRPeSzhN8Yf0HOMWkPQTwZHTWJo+/Dd xPrXT5xnYeEYPz/xzSZW5qsf0cbWHXQPWoO6nGoFrf3bSVy5Bs2EF2P4cJsThks8ftE/MN My5IOCRKFcCFL3gv90kcwbPDXb41+gqIkOEl2qEZ+wEYJ4iWaDx/4yaLXHKd9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779133875; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=FCvJ80FbhCF+pe97TGfyU7y7ZOJeS7y3XCgQKDUXTcM=; b=bJ9NMNaphceIoRjaFt4VCzJSt84KSCsPeOalMUPQvL2GG51lGUCwMyIYGhUsZMgQTaSt1B gczI1sJdhjW6VDzca0kXL966uODEw0AjIdVp4wtRvpJOLSFaukFuNcJf6NpwFQ5ckQGinL Wb1E25O2UoDP28cJKH9+pJ6y0sZt8/nK03j9oM4Y4d/kAif7Fu2GTtFZ6gdm+5yfAnS33A gxmxsOyKh++TZ2HUmBv/sNZsqsfo6pHD+/b3vahP9KnuQVN6Nbvmrwbg+5H+yCEDBiT6ck j3463wyHBrCOXmWs9t01zeZgu6UaDi1c095W3+1k9smy6O7WD0mfmXwKmsMeAg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gK7hz1z4GzjDF for ; Mon, 18 May 2026 19:51:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 388f6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 19:51:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 9306d0449ba6 - main - ctld: Simplify pidfile rename handling in conf::apply List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9306d0449ba6fffadf08d5ab61aea596369e03f4 Auto-Submitted: auto-generated Date: Mon, 18 May 2026 19:51:15 +0000 Message-Id: <6a0b6db3.388f6.68a76091@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=9306d0449ba6fffadf08d5ab61aea596369e03f4 commit 9306d0449ba6fffadf08d5ab61aea596369e03f4 Author: John Baldwin AuthorDate: 2026-05-18 19:49:57 +0000 Commit: John Baldwin CommitDate: 2026-05-18 19:49:57 +0000 ctld: Simplify pidfile rename handling in conf::apply Explicitly copy the pidfile path from the initial configuration file to the kernel-derived configuration to avoid having to check if the old path is empty as a special case in conf::apply(). Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D56533 --- usr.sbin/ctld/ctld.cc | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/usr.sbin/ctld/ctld.cc b/usr.sbin/ctld/ctld.cc index 24b02a936670..9bdf15976911 100644 --- a/usr.sbin/ctld/ctld.cc +++ b/usr.sbin/ctld/ctld.cc @@ -1973,22 +1973,14 @@ conf::apply(struct conf *oldconf) log_init(conf_debug); } - /* - * Rename the pidfile if the pathname changes. On startup, - * oldconf created via conf_new_from_kernel will not contain a - * valid pidfile_path. - */ - if (!oldconf->conf_pidfile_path.empty()) { - if (oldconf->conf_pidfile_path != conf_pidfile_path) { - /* pidfile has changed. rename it */ - log_debugx("moving pidfile to %s", + /* Rename the pidfile if the pathname changes. */ + if (oldconf->conf_pidfile_path != conf_pidfile_path) { + log_debugx("moving pidfile to %s", conf_pidfile_path.c_str()); + if (rename(oldconf->conf_pidfile_path.c_str(), + conf_pidfile_path.c_str()) != 0) { + log_err(1, "renaming pidfile %s -> %s", + oldconf->conf_pidfile_path.c_str(), conf_pidfile_path.c_str()); - if (rename(oldconf->conf_pidfile_path.c_str(), - conf_pidfile_path.c_str()) != 0) { - log_err(1, "renaming pidfile %s -> %s", - oldconf->conf_pidfile_path.c_str(), - conf_pidfile_path.c_str()); - } } } @@ -2748,6 +2740,9 @@ main(int argc, char **argv) newconf->set_debug(debug); } + /* Reuse the pidfile path from the configuration file. */ + oldconf->set_pidfile_path(newconf->pidfile_path()); + if (!newconf->add_pports(kports)) log_errx(1, "Error associating physical ports; exiting"); From nobody Mon May 18 23:00:10 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKCty6Hvfz6cyg2 for ; Mon, 18 May 2026 23:00: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKCty5Vlnz41XH for ; Mon, 18 May 2026 23:00:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779145210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bvKrJ3Y0kcYuxeb8BdiKEQ8bTsPVFuOrchWRPWKrJC0=; b=vZ8ot8PnmiPzucyyn9gWVeClugs929XYG+4khYZf1jZ+iWSRqh/6SAVm6SJw5e6NCGmo7I 6bvQTZfk090/VuTY6Av/1PoPuXYKyfLOswkaQ7TNj40T6hl3cu4PEIhkEL4Lj2i2CbLpXn CTdxPRB6NuGMGAd7ZlU+FzfHzb2GTs5pFbfrLSxOPJo8NIIQGW8bz025p2Z1zmrlkZqSlt AX7tQD58Uk3Tfx5h2C7q7U9BcJESvSIQq6VXaOHU1y3pl5G219mFGGVE72a+0UWCcApeqH zb79emvLCbzMPWx0tp535R9KfXAPTFmW4D1p3cxYafoL/oILoOYKI1zhUUZjeA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779145210; a=rsa-sha256; cv=none; b=fcTS0OQAl6r5yNZVIoZEbKgdcfwdvFfwYbrhSLMCjtsg8rMGHqMlWg8hZ1PWeXI09yGnRc PvoVYZIVHwZeJFnMCiLu1b4zqM5b9u7WwjeSXIBxniUSVgwhj2g7Wrtls1bs9kMyuo2XTc oAAyARCfHb76NPcW0399t1g5Icrch7LJzARLmftcpIYQaYvzq8B22M/3hHPLW4dEUzcFv8 ORwotQURBL+WhOQFZSnbJ63l0eF4S+rE5pxVsvsj9eK2LSKn28oTE6/vFLkRNEJmK0MTOu YFEFUJNvLVL4jgzufMXEiDoNS5U7gEDYOL8jlIrD1bxyykiLJOoM/S7Eycpe4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779145210; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bvKrJ3Y0kcYuxeb8BdiKEQ8bTsPVFuOrchWRPWKrJC0=; b=Uw4S3baeAg2nJ16C8pou6FmueDJx6trMG9YBieai+36Ju2xl9RoHXcSDyllrv72O3KDf6X bVLGIAo9yei4/qQl4r9wX/PZyAhR8cerb7sIDriajyfm/YPfIneiTO6USQE4ad0Y2akRks ar+aimf8CHa60Uv4XBmQqvoMvCgE8KJVbd6ZG0Aa8caGAZ7SgOVgU3wK3pGmpYWX2bMaJI HCB/r/ar2ettRgJghF7l5THsfVQug/1nbX98KVfUQigVhKmTzyNgYNdoJ6brC2bTAST1QP V/72TN7AkHTK8ybAa6ZhXDQsoeH4EkVFJVIsb2OtMcjgRwmgoQDDFiRA8fsCbA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKCty4rBlzpMn for ; Mon, 18 May 2026 23:00:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18ce6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 23:00:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: cd6bf930eafe - main - nlist.3: Clarify which symbol table is used List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: cd6bf930eafe850dc631feeaf8332832601f4225 Auto-Submitted: auto-generated Date: Mon, 18 May 2026 23:00:10 +0000 Message-Id: <6a0b99fa.18ce6.78abe0c0@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=cd6bf930eafe850dc631feeaf8332832601f4225 commit cd6bf930eafe850dc631feeaf8332832601f4225 Author: Ed Maste AuthorDate: 2026-05-18 14:59:14 +0000 Commit: Ed Maste CommitDate: 2026-05-18 23:00:03 +0000 nlist.3: Clarify which symbol table is used nlist() requires section headers, and currently fetches symbol names only from SHT_SYMTAB, Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57065 --- lib/libc/gen/nlist.3 | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libc/gen/nlist.3 b/lib/libc/gen/nlist.3 index 4df349eed52e..d6029153de5a 100644 --- a/lib/libc/gen/nlist.3 +++ b/lib/libc/gen/nlist.3 @@ -41,9 +41,11 @@ The .Fn nlist function -retrieves name list entries from the symbol table of an -executable file (see -.Xr elf 5 ) . +retrieves name list entries from the +.Xr elf 5 +section with type +.Dv SHT_SYMTAB +in an ELF object (for example, an executable file or shared library). The argument .Fa \&nl is set to reference the From nobody Mon May 18 23:57:43 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKF9N0R1hz6d41t for ; Mon, 18 May 2026 23:57: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKF9M6f0lz45Km for ; Mon, 18 May 2026 23:57:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779148664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UCXqudvgFIkZ+bzQU9lnlhaI1+/AkEhCszTd0CcBqQE=; b=E3wTO2UTFtRvfDRePhK8cHMQOvZ43VPToOwf/0F9IIfCY0m0E2LDBojhECL2ANAHhQy74y qQTpW5WyZKSE9oaY5k53Qif2JhH7IbnLFl5knNLBeEXXdHvnwYPzPS04TMprJw1Q+LQxI7 psFQOkWU6DsyVe7hjCwrLCGj5Xd38MIBh51VgoTbH8ZSuACo2QA+huOUutEVtT1QKSU78I 6Ljg+nUXRTzaHtb8RkfQYtT5n3d69sAVeWumCzl36r38PG1KCjAQ2z+h9O3MvAI7SE7j/x VaTHwObsph4uFCpnyEvElCS9qPgxUZd7ZhBuJdGxWTH+qnMacWM+tYP0bNuECQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779148664; a=rsa-sha256; cv=none; b=uiEMcOSUP2DdBqxP1IdeKCk+PSf66ibeJu0kiCER5bYmKxpCth235uQZ7hUh7TQg9Jc7uG zFPXRekGRzxNqQ7s7oS1EtTbtEETnRqXmi+pnQETq6uQTp+qXIUzAL34mtvHS/rL3KgM8n n1EoRwPBdE0K515AvJwS4ygOmpZlLqBKzGjA7u3ZuClB+o4GOb+h7CAu5vZIHQ/YgcbLvw IRSiE51DY7FoCLMxCkZO2nxwRpZ+4ZTFN6hfF11/5Zr2xuPjJf0zyHNUf3eVeSTf9s1c03 5sd1Xu2gTjd8Mks/jjrYqiiSen5iOHVpXVGwl7BepYOY2JmZh/PwZnVM3B6GEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779148664; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UCXqudvgFIkZ+bzQU9lnlhaI1+/AkEhCszTd0CcBqQE=; b=ObEr2fb4EC7eAeixKAM0vVUW2dbIIKUjEVBp2AjmuH9eUYvfYaZWZaGO/khvY8DhLgjw/E 5uIyeOxIjMhu6EjX5S35LX8m42Mcux+exmrhoHWhQy9gkDkvs7oHaBTR4wSqrtEY1Q+rCG zZWc1+LgmuCCytl14zHg39uAfVchVMM2Z13miCBc7/3rFQq550M7XXZHNEYH1qDlJXWDh9 wjjfOt1Hp1JL3+ZDPXgAqbpWMG++MPyML+7KfVXvy56L4IQsv7U6PdONxC9gVr4s7rohmr jc6d63x8DZ3UrJCDW9t6SNPO+4+Qus7VY2Yjrf8bmf3X7jfqH+yS1AuHmizf1w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKF9M5fS7zr0N for ; Mon, 18 May 2026 23:57:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e25f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Mon, 18 May 2026 23:57:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 94b7a335683a - main - nlist.3: Add discouraged use notice List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 94b7a335683abcbcd76e8b67d37e21271d81590c Auto-Submitted: auto-generated Date: Mon, 18 May 2026 23:57:43 +0000 Message-Id: <6a0ba777.1e25f.29b11190@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=94b7a335683abcbcd76e8b67d37e21271d81590c commit 94b7a335683abcbcd76e8b67d37e21271d81590c Author: Ed Maste AuthorDate: 2026-05-17 14:29:29 +0000 Commit: Ed Maste CommitDate: 2026-05-18 23:56:00 +0000 nlist.3: Add discouraged use notice It is a relic from a.out days and is poorly specified. Although ELF support was added to nlist, there are better ways to access ELF data. Reviewed by: kib Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57078 --- lib/libc/gen/nlist.3 | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/libc/gen/nlist.3 b/lib/libc/gen/nlist.3 index d6029153de5a..9e2aa0d7eb0f 100644 --- a/lib/libc/gen/nlist.3 +++ b/lib/libc/gen/nlist.3 @@ -40,6 +40,10 @@ .Sh DESCRIPTION The .Fn nlist +function is provided for compatibility with legacy applications. +Its use is discouraged. +The +.Fn nlist function retrieves name list entries from the .Xr elf 5 From nobody Tue May 19 00:16:37 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKFbB1nQGz6d5lv for ; Tue, 19 May 2026 00:16: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKFbB0KSgz47Zc for ; Tue, 19 May 2026 00:16:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779149798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ePxWDj5dKJTHEQ3uVzKSOylHuh8g31Q8+nwMgM2bPg8=; b=Gl76QgBqsJgLqyYR8hdTlfhVilwiLreAvs3CYqtT22a2VTNCPXtL0Tw4GrB4twxZ9k7aZa Z7RrRITs50eHp1H3guVBWaQAj5yP6PsDqrOJxkmRIeZoCVbQzzD2d8lPFRBF5MgJiPrb6p eC7xEG3fcTCpiWm7HuPn1CFIfeyE6HC0MIhvYr+XM6Bcu7+QWWgvkl6HTHsjq18xr7+vXt 4O205uk/HWQMNQckSmtLkKOQ4/8aqQpqkgTwqKE/CLSC6GIO4QMWHGalik0/LQXVlPSYih zGH9DsKWvtrjrGbQesYtWDn+0QzVmhJjfNUipCLFU5pJy/O9JsGArgrQgW9hYw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779149798; a=rsa-sha256; cv=none; b=YRD6t04SikIezGr/ixWcuYusZLK77jhlDT+5OgVzg14WQRSkqsfqBNMkUUju2gbXeeIwhP nLr+10cX2/rGWQNdyUCQnSF50MTlLPPhJ9S9C2dzd3aJc0FPvkxIxBA2QxhVUl5QvU4O2X i9ucpNw4qPx0przKmpAkCjglwS+gHUtc/PJ+/8AkUh0vJXNpf7hStD9F07NsCtlREjpDi1 A/JnZ/togyijPkyOwaAXxI3eDTjveS8Ai6yqWjty19Mg5aT12gqxpd0yW2n6YHQ/zNtFsz 5UM0Mte3PSmju046YsN4vC+r1CN0z9K42KiTvEDUyFcrTcxt7gFKLjVSgYENxw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779149798; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ePxWDj5dKJTHEQ3uVzKSOylHuh8g31Q8+nwMgM2bPg8=; b=Xs7g7WScIwsg/16JG7Uqku6WpWga8XNQCAlCNHng1xvMfJWaEhIFhsc9NkrQlQYGvRqrgI xkWkGSBU9c/W1ekqGpgN3tgxfk42k8qPvKhCV1m8/kD6XtS5eC8goGoaefKSv8J8jJxHYp AtWsWqqrUqAAY7C8gws5SqhwqDrRMnlvChwVvRKmVs6QEjjCoN5dXOlp5+uRFxxOuCQjAE V8DDDPk71rV7JS/tEyxdFNyTNhssXUs+shoRGtn0VIdnIFXdGjVB52bIXXQgX69efvgL/C gj+lNOvo8d+DHUTrhW1wH+8IT4yrW55FpBrFsLDvXpPE25AZcN38Igye0h880w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKFb96mhWzrRJ for ; Tue, 19 May 2026 00:16:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22644 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 00:16:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 762e451b318c - main - nlist.3: Add stab(5) Xref List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 762e451b318c8cbfddbcaaa92a218e8b45306eb9 Auto-Submitted: auto-generated Date: Tue, 19 May 2026 00:16:37 +0000 Message-Id: <6a0babe5.22644.48a5ab0b@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=762e451b318c8cbfddbcaaa92a218e8b45306eb9 commit 762e451b318c8cbfddbcaaa92a218e8b45306eb9 Author: Ed Maste AuthorDate: 2026-05-19 00:11:39 +0000 Commit: Ed Maste CommitDate: 2026-05-19 00:16:13 +0000 nlist.3: Add stab(5) Xref Commit 876a17321c89 removed the a.out Xref as nlist(3) no longer supports a.out, but this left nlist(3) without a reference to a page documenting struct nlist. struct nlist is documented in both a.out(5) and stab(5), so add an Xref to the latter. Reported by: brooks Fixes: 876a17321c89 ("nlist.3: Replace a.out(5) Xref with elf(5)") --- lib/libc/gen/nlist.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libc/gen/nlist.3 b/lib/libc/gen/nlist.3 index 9e2aa0d7eb0f..6aefd95e3b51 100644 --- a/lib/libc/gen/nlist.3 +++ b/lib/libc/gen/nlist.3 @@ -72,7 +72,8 @@ if the file .Fa filename does not exist or is not executable, the returned value is \-1. .Sh SEE ALSO -.Xr elf 5 +.Xr elf 5 , +.Xr stab 5 .Sh HISTORY A .Fn nlist From nobody Tue May 19 00:36:54 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKG2v5phwz6d7Cf for ; Tue, 19 May 2026 00:37:11 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (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 4gKG2v1dVkz49lV for ; Tue, 19 May 2026 00:37:11 +0000 (UTC) (envelope-from carpeddiem@gmail.com) Authentication-Results: mx1.freebsd.org; none Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-39389398838so30758521fa.3 for ; Mon, 18 May 2026 17:37:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1779151029; cv=none; d=google.com; s=arc-20240605; b=U4XGnHRuh4xDLrDttr2T2OlTnpLOug46in/j3NsNgKfKzCaLtLGdJ4IIodIY8T3BSz SCaueBAJJ+fVt3kCFVHq42qczb/z12Dn6c+yYZb5W8zfFYXrWzegtzN3fT8ZEbbFwJHD IQNpy8FhD7Q8KguCkgPAoxsbuo/q6iCe+COsMTeBBkilPaRQ+qjMqIMD8/XeoVg4//wn 0rUgIS9QWfU0wsGRLhmdLvwOQk/sLSk2g0TY71aRms2YVAdEygCDE9pJdGpSswSA1UEZ qbT2j7VbiaFgEmI/LmQcjfHP50yp9UAS1GLiMSdkZfxlJOmZdyn4br+x0bpk9oWtHVJK LpcQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version; bh=XKlU2k2iRK9OkHv6PKrHFebJYEJjE8fzH8+eUKnprHM=; fh=5HRH7n9ZyKB5e60B7b8VePVwoSLQ6Mt8+3r3EnSUN7A=; b=N2NzNpGfZDEvl1pKZuedjUPYCz/fS8+xHwklwC8GraV67uGeo40dmTnBUmdcCoqhHB /riEJn56nKhA9761z2NJij5OftmAK1mNY+ajgidznetP5RxsVBntZSTbjPLQHMVfp7k8 XK+WrPEQRZZlpOVWpVf8aAZepV7Vk1BGb1AhjgNgbY3n7lby3CrLlyBE+jLHfV4ZTOvW bkWmwCgyI6Wlt7dw5wb7LRNZ38tgI1tS9rjd/OT9OvoAy5tF6CoSE8L41OcppK4IY5vw ejUBYozRfi8pTgIKvMSlRwXWcLxRb4npxIZZAxSTe4b5WyE+LmAa4D6RYrMf24r0XEmZ QSDQ==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779151029; x=1779755829; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=XKlU2k2iRK9OkHv6PKrHFebJYEJjE8fzH8+eUKnprHM=; b=ebJWO6U3290gA1CZyzO9ymLTvjreBWJ8VXRTwXJ/s9hYJv2FqTN9NsxDFb0lOUHYvo hyY5tLRMoOhiy5IheFYU3i8F261pm1IG2MKJRgxsgH59K1tt5WOOIVx+O1eMVttTqSMy /sBSkzet2rdmjRhS7jn1IIWupm6aGJq1KulFIbotFPZxyqfWnDVllRLj9iRa1shadUeM 8OdlmbQABb3fRiy8sgeRPGvPANWCh4TnDHKhK7HnBof1nHDcE/0o3JSOXsKaAkGstjxl K08PS8S+GlLRSn7nGMiRbsd6+W679BOM+UnIw5OqLOaUmh9RDm5S/soGkirxiFeN7fmD BpPg== X-Forwarded-Encrypted: i=1; AFNElJ+/ZcImgeomU524bNPZGLEMrnXqJIm1dHo/ngRCTebOuMx4eSyQ0Nh71eN4yG0bnyt7VmpbwYeiFOPchQJFdcr448P9RQ==@freebsd.org X-Gm-Message-State: AOJu0Yx/FbrVeZ6DoSFW/IUcjR75KHIhYN+zMgANXBf1ikzEmNvVQrQm NsHzwueF29knbuM+t3JTrYwRj/EWUyn6AM7EEmQJTQ+tE+JpURZVtlpPvpqodjdSjHARLVyYkd1 3iBup08QFFteA/AfJ3coWvJzIlfZjrG8= X-Gm-Gg: Acq92OH0jBYkGl+Pfa05X02M9iG4cGvCWvoghoXEkfqPLTBC1FLA3l4jVRbUqEMS8yC xXT9Ap4sWnoxo1m+KbXc31QStr7R2KjcW/ZltVoAKm5blaomX4bhj+3QHx93NSD3qy9IrFdY5/A feWvm1FAita2+DqM8FzfGuqrGSTWikyLMcG3whgAsd15wtOSp/mD+tjQ2iQCX2THNJQtvO8uBCC wC9rLbvSbhq14eqdgiBrG8z4GjEsbdq1A4SJGqT1FbtdeFE2alJtkMCIwm6UvNXWqqcVuuJZNEs RCyoJQNlKK4OmOiN4pnXIi5nU6gJwP1nS/X0iBI= X-Received: by 2002:a2e:a584:0:b0:393:e571:276c with SMTP id 38308e7fff4ca-39561c04d5fmr54231401fa.5.1779151028968; Mon, 18 May 2026 17:37:08 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 References: <6a0b286c.40371.a734374@gitrepo.freebsd.org> In-Reply-To: From: Ed Maste Date: Mon, 18 May 2026 20:36:54 -0400 X-Gm-Features: AVHnY4Js7KNWksmP4wyYhhPh-c1mj9On36wFc4POetHLoOkirfXliFdEDp4upuQ Message-ID: Subject: Re: git: 876a17321c89 - main - nlist.3: Replace a.out(5) Xref with elf(5) To: Brooks Davis 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 [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US] X-Rspamd-Queue-Id: 4gKG2v1dVkz49lV X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On Mon, 18 May 2026 at 15:06, Brooks Davis wrote: > > On Mon, May 18, 2026 at 02:55:40PM +0000, Ed Maste wrote: > > The branch main has been updated by emaste: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=876a17321c896427d70de94101df4d888a19189b > > > > commit 876a17321c896427d70de94101df4d888a19189b > > Author: Ed Maste > > AuthorDate: 2026-05-18 14:50:22 +0000 > > Commit: Ed Maste > > CommitDate: 2026-05-18 14:55:32 +0000 > > > > nlist.3: Replace a.out(5) Xref with elf(5) > > > > ELF support was added to nlist() in 1997, and a.out support was removed > > in 2020. The man page was not updated for either of these changes. > > I'm not sure this is quite the right change. struct nlist is documented in > a.out(5) not elf(5). It's also documented in stab(5) so it might be > that is a better reference. Ultimately, we might want to embed > documentation of the relevant parts of struct nlist in nlist(3). stab(5) seems like a suitable reference, yeah. I've added that now. While we could copy the `struct nlist` definition into nlist I think the stab(5) Xr might give a bit more of a clue about why struct fields are as they are. > There's a whole cluster of excedingly obsolete manpages in this area > including, for example, link(5) which seems to have not had a technical > content change since 1995. Oh, indeed. Looking now I see over 250 man pages with a .Dd still in the 1900s. About 50 of those are in lib/libc, 90 in share/man. Those may be good lists to start from. From nobody Tue May 19 03:22:41 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKKjt4Kq3z6ddv4 for ; Tue, 19 May 2026 03:22: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKKjs73j1z3KRp for ; Tue, 19 May 2026 03:22:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779160962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B/cMTlBn1uv9pgMhdktSCZVOKEZIBOf1isihQDhscKo=; b=qYj8aB9dbPutZd57phYu0YU47Jps+7MY9YTDYOak++5yFuPVE5Mu6VRhh3MWMTICqbMV8w FjabE7ftsisaWZg8MAHitOkXLgxn7dE4AVpsLKY5EhowbU4fMYOoCIRtUrmWZq8BAtIS4K rf6X1G2OZnHDcSYH00tyQQzFYXGzf2IbVun/Z1A6z3rW3vJxodlTcmM+7U9RBSOWfGK8xV fsPiUH0gQyE/3JLay1zonyMcw5sdk3eV7eneXl3wi1PG69TiT6EYbGMMrgv0Jsux+MqQif dw4ktWDHVupZDBYqrsZCWf9vJUKJNJ+T0OkYmqLIrqa5aiT8RxDuHdLjKtDRww== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779160962; a=rsa-sha256; cv=none; b=GeI6TjmHOMsiL3mlTM7vEcZ8SL/8KaZ/OZiJewbaRHGZNDLmn1qnQgxbZ/AQ0V5AGBO+/I kC0SBmJUuy4Xf+d9nCaVFMOcZ/q1x3y22Vi9yfLAUZTXdWJJgMrvwnoQghqZ7RwU/V7D5J vSyrp1oagirJiHqmYyTE7py/Lcq5nxFjg47DNWALIf3upOXrke0CJYMSxqn4macGkTPaOY 9KoH9l8PE0xC+CXtMAUCgN+scnOHhDe/ZVki1zouYimh7eccETeZYRVBUQ1vsVK7M38QTW sOw34ai9nrpa8ok/Iti6O2ClpnsTpn3RgnmMn+VLr8o4cu1fuAKObqQKawLFPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779160962; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=B/cMTlBn1uv9pgMhdktSCZVOKEZIBOf1isihQDhscKo=; b=SUywWk6kZkFVgkenjMkrpLpjErjO4jLX04tJP0ljuU2kUhcEm5OX6RuABZuvPNBb+8Y+qs DngsLyXcMtHWfdiOSkFRyEqUEmuWuJ5bVZUZdalhTZqh8sS3+8IjrCvhyIZAU3hUfeniXO oGcex7l3xCOeVl0GyNUzv29oE60yhuUB58LsCh+pjvWr6oNnCokSIbBT+O14v4eeuipjUH Y81hh+1IEpwKsWJVRSxJpzDcI7goNi+qzS0MFzPJ+nNxwoft+DuSaxVVFwp4lQXi8PR+1b 5QjzHLJYKNDblkD0UTQej7h/8kowtFy3Inob/BNZEkt0lLs3pWBALA030q+sBQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKKjs5rRqzxCv for ; Tue, 19 May 2026 03:22:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f330 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 03:22:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 67f7f2781daa - main - linuxkpi: work with numpages > 1 in the set_pages_*() KPIs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 67f7f2781daa9bd398b424ffe2bd0be67f37f03d Auto-Submitted: auto-generated Date: Tue, 19 May 2026 03:22:41 +0000 Message-Id: <6a0bd781.3f330.9bd5956@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=67f7f2781daa9bd398b424ffe2bd0be67f37f03d commit 67f7f2781daa9bd398b424ffe2bd0be67f37f03d Author: Kyle Evans AuthorDate: 2026-05-19 03:22:21 +0000 Commit: Kyle Evans CommitDate: 2026-05-19 03:22:21 +0000 linuxkpi: work with numpages > 1 in the set_pages_*() KPIs These calls are used for buddy pages at least in drm's ttm_pool, which leads to a panic when we invoke lowmem handlers and drm tries to shrink the pool. Cope with numpages > 1 by traversing the contiguous pages and executing the adjustment there, as well, as suggested by markj@. Previous versions have tried to use the corresponding `set_memory_*()` functions, but it is believed that not updating `md.pat_mode` breaks subsequent userspace mappings in ways that may result in things like screen tearing or other artifacts when running i915kms. This stabilized my amdgpu laptop running two VMs, chromium and a concurrent buildworld. Reviewed by: bz, markj Differential Revision: https://reviews.freebsd.org/D57004 --- sys/compat/linuxkpi/common/include/asm/set_memory.h | 17 +++++------------ sys/compat/linuxkpi/common/src/linux_page.c | 21 +++++++++++++++++++++ 2 files changed, 26 insertions(+), 12 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/asm/set_memory.h b/sys/compat/linuxkpi/common/include/asm/set_memory.h index f328fcabd243..f45a51a9710b 100644 --- a/sys/compat/linuxkpi/common/include/asm/set_memory.h +++ b/sys/compat/linuxkpi/common/include/asm/set_memory.h @@ -62,35 +62,28 @@ set_memory_wb(unsigned long addr, int numpages) return (-pmap_change_attr((void *)addr, len, VM_MEMATTR_WRITE_BACK)); } +int lkpi_set_pages_attr(struct page *page, int numpages, vm_memattr_t ma); + static inline int set_pages_uc(struct page *page, int numpages) { - KASSERT(numpages == 1, ("%s: numpages %d", __func__, numpages)); - - pmap_page_set_memattr(page, VM_MEMATTR_UNCACHEABLE); - return (0); + return (lkpi_set_pages_attr(page, numpages, VM_MEMATTR_UNCACHEABLE)); } static inline int set_pages_wc(struct page *page, int numpages) { - KASSERT(numpages == 1, ("%s: numpages %d", __func__, numpages)); - #ifdef VM_MEMATTR_WRITE_COMBINING - pmap_page_set_memattr(page, VM_MEMATTR_WRITE_COMBINING); + return (lkpi_set_pages_attr(page, numpages, VM_MEMATTR_WRITE_COMBINING)); #else return (set_pages_uc(page, numpages)); #endif - return (0); } static inline int set_pages_wb(struct page *page, int numpages) { - KASSERT(numpages == 1, ("%s: numpages %d", __func__, numpages)); - - pmap_page_set_memattr(page, VM_MEMATTR_WRITE_BACK); - return (0); + return (lkpi_set_pages_attr(page, numpages, VM_MEMATTR_WRITE_BACK)); } static inline int diff --git a/sys/compat/linuxkpi/common/src/linux_page.c b/sys/compat/linuxkpi/common/src/linux_page.c index b91115a5ff16..62bfa07dd297 100644 --- a/sys/compat/linuxkpi/common/src/linux_page.c +++ b/sys/compat/linuxkpi/common/src/linux_page.c @@ -710,6 +710,27 @@ lkpi_arch_phys_wc_del(int reg) #endif } +int +lkpi_set_pages_attr(struct page *page, int numpages, vm_memattr_t ma) +{ + while (numpages-- > 0) { + /* + * pmap_page_set_memattr() would only update the DMAP mapping + * if it's a normal page, leaving the kernel map untouched. + */ + MPASS(page->object != kernel_object); + + /* + * pmap_page_set_memattr() sets page->md.pat_mode, which is + * crucial for future userspace mappings. + */ + pmap_page_set_memattr(page, ma); + page++; + } + + return (0); +} + /* * This is a highly simplified version of the Linux page_frag_cache. * We only support up-to 1 single page as fragment size and we will From nobody Tue May 19 04:24:13 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKM4s2YFFz6dkNv for ; Tue, 19 May 2026 04:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKM4s1T0lz3SN6 for ; Tue, 19 May 2026 04:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779164653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZoNqSmGdt2cPv9UadDmMpfKWaCagb50wkYP+Tj0xzAE=; b=rvrirIsAcmN6cLYfIKhIEBpLvMDq6GG6mjEBaKT+eMRM7aNobyNpyVDEzw/KX5V9dN9iEl /OR8GcGcLHLq2lpiT2JeR2AVd1B+2MYGFGecm2WnM8OV/yBoOMfFXOFrjFh1u75fihwXgh PvwUDbKDiNYwr5XKmV7v+Fa89T8x56JFS1/5omDnm3OMSWDL/bD2uRD+/vAtLokq1OnFY6 zWAwEehWtMBC1QRMwETzZoovhBLjWbwesGKYIXq91XkEBuOMb/UoVjmjQBOj80Lohavre4 Ojrm520ued3QQ6fSi7Suq7a/R1LYu50UH5A/Jy9iArkUL5rAKk7uFrfv/PL7IA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779164653; a=rsa-sha256; cv=none; b=EliKJ02bGTD0F5FNdBz2+9tOuegbMHYQbdk/ZMF2XqoeQnn2e8Ai9LPZTfyJGuQHVB4pxk c204lQlyjqGBMTPn+chtc8om41FGbmB0TEZ278CKIsT3+yeJnhQGLHK+Q9iKaw2PcJhluz 900pa/TVGxrAHysF/rCOAYQJ2xdD07FfhUdG7Nt8GtCP4/1hUg8SwkmiawzyR/U50PTOjY RPEPIKz1bbR4+hgXBzGPukIKrSCFGKSrgHWxmWGxk2I488KSmLqU5Hq60DXilB9Y2c9SDp M5cUXym1zjiKfIhrIRAseJqc1fRC3cfmDDSFuqU1HPMprVEGaMBRZcjwXT3wlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779164653; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZoNqSmGdt2cPv9UadDmMpfKWaCagb50wkYP+Tj0xzAE=; b=XEQRHcveD/bu9XuOpgTkJRxRqnFK9wHnmJHPFnPPS6nY8rT+mjiIaYDDuzB2ytzat4JQPk 5siNaZ5lL+vNmLVEP8ptpD3QXwR5lMw4ZbZwAbhgEneLTtVDTMQtaZOgUbgA63mvakc5EH Y9RVn/2M8nbfNLeUJPqDut6V7yplnXfUc0eZhOEY4RXn7dOWsk2m3h/ZeCtuyIbmf7Y5MH 244gY3kZFVAxN+6hPy8lf5yvJ8JQA9xHAuYj83nk/B38JYMrzy4QARPmcqVQ1rNi+gJhSQ dBmY30nryAKFvrbo0nJBtHd5+0eZveRsQykpWyaEJlGujPO2Fpt6LjmLIjDw2A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKM4s14Krz102s for ; Tue, 19 May 2026 04:24:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 447cb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 04:24:13 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: f6f5eb319016 - main - linux/linux_common.h: make header self-contained List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: f6f5eb3190165cea4470048809413b1fdbd97e04 Auto-Submitted: auto-generated Date: Tue, 19 May 2026 04:24:13 +0000 Message-Id: <6a0be5ed.447cb.52f1c909@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f6f5eb3190165cea4470048809413b1fdbd97e04 commit f6f5eb3190165cea4470048809413b1fdbd97e04 Author: Konstantin Belousov AuthorDate: 2026-05-19 02:22:58 +0000 Commit: Konstantin Belousov CommitDate: 2026-05-19 04:23:47 +0000 linux/linux_common.h: make header self-contained Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/compat/linux/linux_common.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/compat/linux/linux_common.h b/sys/compat/linux/linux_common.h index 44ba63c44278..730c10d228dc 100644 --- a/sys/compat/linux/linux_common.h +++ b/sys/compat/linux/linux_common.h @@ -28,6 +28,12 @@ #ifndef _LINUX_COMMON_H_ #define _LINUX_COMMON_H_ +#include +#include + +struct ifnet; +struct thread; + int ifname_bsd_to_linux_ifp(const struct ifnet *, char *, size_t); int ifname_bsd_to_linux_idx(u_int, char *, size_t); struct ifnet *ifname_linux_to_ifp( const char *); From nobody Tue May 19 05:43:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKNrW0HMNz6dqKk for ; Tue, 19 May 2026 05:43: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKNrV6KC8z3b6D for ; Tue, 19 May 2026 05:43:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779169418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T3d6fL2yKJaogeNmgmB2TnzB0DnlNf88geIuheK0Wkw=; b=LnFL8gx6hTe0QuFWtUEsvX6j+Gstjiqpt+nu9yMNJ++lbFrWOpWTLlmOro+5ilfDCIyT6b mRdFfx21kaSRp5Z/zOPxkSJIyo4vuhZW4w+ZhGtjgLvbC3espfskjRqcAQvY/nUY12JtaP 9mpawSZYg68emest+Qsb+kqnPMK8rqIx+Op6mBt5kGutVIe5jJ1RHS2Q4G/lysuMiPYhj3 zbWbqCq/fnzcCtRa2lFa0f4CLRgHxDlTaGxUkeUHL/3+Tk8JeX6IN+jewn3sUtTsl4B3A/ d83tYmPOG8/ljskicvmN+nQtc9L+Iej0dnayCCtSytN4ZcnzLcGZIVXyHppUtw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779169418; a=rsa-sha256; cv=none; b=WyF/Ev/5AzqN4fB9mAZP46SoHHQi1fkxYE8C6r6pymdYUs2Gz4z4txtDk311ndp/eyb7WT D1qwXMbZT9D0ReQCHvI2sZUgvB5Zob2v+WqraZueNs+QVSSakFq+6QWip8ILTg1OyaQABC t2Ns9H00dLfuozARGZEoMYgJrjXZyHgfGIPGmr+UbSftgfIQ/dhotZjm9iI9AyW1oB0xYI FmRxJ5Kfq8X1wjdhpBTnZQStGbfUvsAGetFrekehYBqPKSPMM1aD6/GB4ROmkhgn4tNvJK lAdTIpQii9nTuZrxqghmQuZYmEcAUJYIr6sY0HDcpRrqC5hAjCZE2rXDpsgGpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779169418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=T3d6fL2yKJaogeNmgmB2TnzB0DnlNf88geIuheK0Wkw=; b=BKjGUu66ogdRxLGtau9pua3zX7y/h1EXD+jUfRZsSSCqvbfLeh+AKEG3BTlSo5N4D7Ofma t/Aba5il1UrH0Dh/moClF287LrJbJjbexcT3DAivO6GluAShGbMOn3MJQjwa47lZmchfYS DmVXQHVk9uUhoK2haN30QF6hFRnc5gPqxWR7/rupucK72C8UIN5en4aUN3l7dwlxQFACW3 aACzN2Q8aeXNjFAxlKpMVTie9aFIIO6LM+PydemQDqpI1yfRfy9y4mXi29fLednDQM1+GM JGeOp1i5kYPpkw4//VO270Gr/GjjC9v0mSXGlQnjuaxuGO37mZ2bRswoGKDK/Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKNrV5t5gz11gm for ; Tue, 19 May 2026 05:43:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e889 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 05:43:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: 8d36ec1c9c5b - main - net80211: migrate wk_rxmic / wk_rxmic in TKIP code to accessors List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8d36ec1c9c5b7c545e1a7584e66e1ff9b9798ee7 Auto-Submitted: auto-generated Date: Tue, 19 May 2026 05:43:38 +0000 Message-Id: <6a0bf88a.1e889.6dc7534@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=8d36ec1c9c5b7c545e1a7584e66e1ff9b9798ee7 commit 8d36ec1c9c5b7c545e1a7584e66e1ff9b9798ee7 Author: Adrian Chadd AuthorDate: 2026-05-19 05:28:49 +0000 Commit: Adrian Chadd CommitDate: 2026-05-19 05:28:49 +0000 net80211: migrate wk_rxmic / wk_rxmic in TKIP code to accessors These are the last two uses of the wk_rxmic / wk_txmic macros. Everything should be using the accessor methods at ths point. Reviewed by: bz Differential Revision: https://reviews.freebsd.org/D54790 --- sys/net80211/ieee80211_crypto_tkip.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net80211/ieee80211_crypto_tkip.c b/sys/net80211/ieee80211_crypto_tkip.c index 1d368cf11eb9..4090d130a28f 100644 --- a/sys/net80211/ieee80211_crypto_tkip.c +++ b/sys/net80211/ieee80211_crypto_tkip.c @@ -263,7 +263,7 @@ tkip_enmic(struct ieee80211_key *k, struct mbuf *m, int force) hdrlen = ieee80211_hdrspace(ic, wh); - michael_mic(ctx, k->wk_txmic, + michael_mic(ctx, ieee80211_crypto_get_key_txmic_data(k), m, hdrlen, m->m_pkthdr.len - hdrlen, mic); return m_append(m, tkip.ic_miclen, mic); } @@ -417,7 +417,7 @@ tkip_demic(struct ieee80211_key *k, struct mbuf *m, int force) vap->iv_stats.is_crypto_tkipdemic++; - michael_mic(ctx, k->wk_rxmic, + michael_mic(ctx, ieee80211_crypto_get_key_rxmic_data(k), m, hdrlen, m->m_pkthdr.len - (hdrlen + tkip.ic_miclen), mic); m_copydata(m, m->m_pkthdr.len - tkip.ic_miclen, From nobody Tue May 19 05:43:37 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKNrT6RLbz6dqW3 for ; Tue, 19 May 2026 05:43: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKNrT5RR1z3b4t for ; Tue, 19 May 2026 05:43:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779169417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5tl//C4uT3XEVWRQkzRqLVNvjoCJe5iIfyuu1N+3q/w=; b=ILiZeHxNrk7XxCGrvMPbfe3wh62plFu5hzjqBVktGUDPpbsql9rZJWVisUZPJBbno9cXYC ySzmeuN08/sdatS4hvycbA/KOv2SS83wT1oO48Odu2Z69ajhkwZfxClIZGdkHLSbEtTGob FSpvITOZHh+SEpksLVykkVfzwm83qjMhCrTCzTaCscerLZngg/RhvmEFLFddJTlKpMeYRC UJJpAmu6MOOhKWcoChhDotKsVXu5wXgs1cJmCFfw8ajPXfujG9P1j9UvnTqS5MQK/Ag4Kq h39g0jRWVjKXI5khy0pcE6jmMgPjqmY0eWnBmhJD5q8BCvLXbptzqM2n9gcUcw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779169417; a=rsa-sha256; cv=none; b=s2cepf9BCKa7e4qitVNr0PjKweiueCZs1lKKN53ih69yeCWSPrbiMxEvkgjYd4SMpeYCpy EKlApO2cCRF+PKlIekIiklqnz2RH3/SFvlvVP6oK/J8/9awyceSkKk0gFDJNTwWpy9yXdt 20Ql9NHIJTfZSkq0JaqhOApxu4iH4GO/SSEPLHXzHiyU0xjE34XRS0oe2U617f2lca17D0 W9GDIO1pEp+qj+YHcjYzpjCUTLGALm09sWv1Y0CRxB7WdcmEA0Y13yTQHjrL89kHyut3u3 mEL37VPH/Pu16U+vEADMMY95uSmMpxhAP3zBkPuRrK7e+9a+X9M2uf2VKiKziQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779169417; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5tl//C4uT3XEVWRQkzRqLVNvjoCJe5iIfyuu1N+3q/w=; b=ko0v67St6C20K9lw0SXwEpjfCjQT29rqjB8jVQrkpb2FVvuz6KMsq94Whv8jaP6fuJEfur fE4C558rgo9m5FCRNxmAh/ZX7YWbvnuDtXVroQkeML4MQqP0Z8jq8/86e8z0o1G17naKQ1 fVcnHLZEToDphpa28yeT6h995dbpzrkkjYOPI9PY2lrdsDj6NvIkYcYyUYHgJbsdMap0qz Df3imggc+0pxkPMQpDMmYlEwrTkfNOtV40gmI3JEU7svJ4db9torPS8Ne/eUbHNQI3blGD Qwa7nfWuBtHe3mpjpXIkd3/TS1O6Alc3kfgKVHO/eM+7G2v0f6COdpJGQcU8vw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKNrT527kz11dM for ; Tue, 19 May 2026 05:43:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e29a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 05:43:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Adrian Chadd Subject: git: e56f7becc7ef - main - iwx: clean up / document noise floor and RSSI fetching List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: adrian X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: e56f7becc7efe05acbb08162961dca574b152720 Auto-Submitted: auto-generated Date: Tue, 19 May 2026 05:43:37 +0000 Message-Id: <6a0bf889.1e29a.6f1dfea2@gitrepo.freebsd.org> The branch main has been updated by adrian: URL: https://cgit.FreeBSD.org/src/commit/?id=e56f7becc7efe05acbb08162961dca574b152720 commit e56f7becc7efe05acbb08162961dca574b152720 Author: Adrian Chadd AuthorDate: 2025-11-16 03:13:59 +0000 Commit: Adrian Chadd CommitDate: 2026-05-19 05:27:59 +0000 iwx: clean up / document noise floor and RSSI fetching * Document what iwx_rxmq_get_signal_strength() is doing in a comment, noting what the firmware returns and what math is being done on it to turn it into a dBm value. * Document what iwx_get_noise() is supposed to do, that we can't just go do math with log numbers like we're doing, but also that we're seeing zeros in this firmware (AX210), which may mean we're decoding using the wrong structs. * Swizzle around the RSSI calculation as a function, add min/max RSSI values, and calculate RSSI against the noise floor. * And handle the lowest noise floor value - it can't be -127dBm as that will throw things off. Cap it at -100dBm which is a little lower than the thermal noise floor at 20MHz (-98dBm), but it matches IWX_MIN_DBM. Differential Revision: https://reviews.freebsd.org/D53780 --- sys/dev/iwx/if_iwx.c | 83 ++++++++++++++++++++++++++++++++++++++++++------- sys/dev/iwx/if_iwxreg.h | 17 ++++++++++ 2 files changed, 89 insertions(+), 11 deletions(-) diff --git a/sys/dev/iwx/if_iwx.c b/sys/dev/iwx/if_iwx.c index 03ef775205e7..372fa440466c 100644 --- a/sys/dev/iwx/if_iwx.c +++ b/sys/dev/iwx/if_iwx.c @@ -433,7 +433,7 @@ static int iwx_rx_addbuf(struct iwx_softc *, int, int); static int iwx_rxmq_get_signal_strength(struct iwx_softc *, struct iwx_rx_mpdu_desc *); static void iwx_rx_rx_phy_cmd(struct iwx_softc *, struct iwx_rx_packet *, struct iwx_rx_data *); -static int iwx_get_noise(const struct iwx_statistics_rx_non_phy *); +static int iwx_get_noise(struct iwx_softc *, const struct iwx_statistics_rx_non_phy *); static int iwx_rx_hwdecrypt(struct iwx_softc *, struct mbuf *, uint32_t); #if 0 int iwx_ccmp_decap(struct iwx_softc *, struct mbuf *, @@ -4209,6 +4209,17 @@ iwx_rx_addbuf(struct iwx_softc *sc, int size, int idx) return 0; } +/* + * @brief Return a single signal strength for the given frame. + * + * The firmware communicates up an energy field which is the negative of + * the dBm value. Ie, the number is positive and it increases as the + * signal level decreases. + * + * Fetch the two values, map 0 (inactive antenna) to -256 dBm which is a + * very small number, negate a non-zero value so it's mapped into a dBm + * value, then choose the maximum value to return. + */ static int iwx_rxmq_get_signal_strength(struct iwx_softc *sc, struct iwx_rx_mpdu_desc *desc) @@ -4227,6 +4238,26 @@ iwx_rxmq_get_signal_strength(struct iwx_softc *sc, return MAX(energy_a, energy_b); } +/** + * @brief Calculate an RSSI from the given signal level and noise floor. + * + * This calculates an RSSI and clamps it at IWX_RSSI_MINIMUM at the lower level + * and IWX_RSSI_MAXIMUM at the upper level. + * + * All units are in dBm. + */ +static int +iwx_calculate_rssi(struct iwx_softc *sc, int ss, int nf) +{ + int rssi = (ss - nf); + if (rssi < IWX_RSSI_MINIMUM) + rssi = IWX_RSSI_MINIMUM; + else if (rssi > IWX_RSSI_MAXIMUM) + rssi = IWX_RSSI_MAXIMUM; + + return (rssi); +} + static int iwx_rxmq_get_chains(struct iwx_softc *sc, struct iwx_rx_mpdu_desc *desc) @@ -4254,12 +4285,18 @@ iwx_rx_rx_phy_cmd(struct iwx_softc *sc, struct iwx_rx_packet *pkt, } /* - * Retrieve the average noise (in dBm) among receivers. + * @brief Retrieve the average noise (in dBm) among receivers. + * + * Note: This routine calculates the noise floor sum incorrectly, as + * you can't just linearly add the logarithm based dB units together. + * + * If no noise floor is available then this routine will return -127. */ static int -iwx_get_noise(const struct iwx_statistics_rx_non_phy *stats) +iwx_get_noise(struct iwx_softc *sc, + const struct iwx_statistics_rx_non_phy *stats) { - int i, total, nbant, noise; + int i, total, nbant, noise, ret; total = nbant = noise = 0; for (i = 0; i < 3; i++) { @@ -4271,7 +4308,14 @@ iwx_get_noise(const struct iwx_statistics_rx_non_phy *stats) } /* There should be at least one antenna but check anyway. */ - return (nbant == 0) ? -127 : (total / nbant) - 107; + if (nbant == 0) + ret = -127; + else if (total == 0) + ret = -127; + else + ret = (total / nbant) - 127; + + return (ret); } #if 0 @@ -4669,9 +4713,8 @@ iwx_rx_mpdu_mq(struct iwx_softc *sc, struct mbuf *m, void *pktdata, phy_info = le16toh(desc->phy_info); + /* note: RSSI here is absolute signal strength, not relative */ rssi = iwx_rxmq_get_signal_strength(sc, desc); - rssi = (0 - IWX_MIN_DBM) + rssi; /* normalize */ - rssi = MIN(rssi, (IWX_MAX_DBM - IWX_MIN_DBM)); /* clip to max. 100% */ memset(&rxs, 0, sizeof(rxs)); rxs.r_flags |= IEEE80211_R_IEEE | IEEE80211_R_FREQ; @@ -4688,9 +4731,19 @@ iwx_rx_mpdu_mq(struct iwx_softc *sc, struct mbuf *m, void *pktdata, if (rxs.c_chain != 0) rxs.r_flags |= IEEE80211_R_C_CHAIN; - /* rssi is in 1/2db units */ - rxs.c_rssi = rssi * 2; - rxs.c_nf = sc->sc_noise; + /* noise floor is in 1dB units */ + if (sc->sc_noise < IWX_DEFAULT_NF) + /* + * For now choose /a/ default, net80211 expects nf to be passed + * in various places and older drivers fake NF values where + * needed. + */ + rxs.c_nf = IWX_DEFAULT_NF; + else + rxs.c_nf = sc->sc_noise; + + /* rssi is in 1/2db units relative to the noise floor */ + rxs.c_rssi = iwx_calculate_rssi(sc, rssi, rxs.c_nf) * 2; if (pad) { rxs.c_pktflags |= IEEE80211_RX_F_DECRYPTED; @@ -9142,11 +9195,16 @@ iwx_rx_pkt(struct iwx_softc *sc, struct iwx_rx_data *data, struct mbuf *ml) break; } + /* + * TODO: is this the right struct to use? Look at what + * mvm is doing for statistics notification (eg + * iwl_mvm_handle_rx_statistics() . + */ case IWX_STATISTICS_NOTIFICATION: { struct iwx_notif_statistics *stats; SYNC_RESP_STRUCT(stats, pkt); memcpy(&sc->sc_stats, stats, sizeof(sc->sc_stats)); - sc->sc_noise = iwx_get_noise(&stats->rx.general); + sc->sc_noise = iwx_get_noise(sc, &stats->rx.general); break; } @@ -10587,6 +10645,9 @@ iwx_attach(device_t dev) mbufq_init(&rxba->entries[j].frames, ifqmaxlen); } + /* Initialize to something to have a chance to get S:N values. */ + sc->sc_noise = IWX_DEFAULT_NF; + sc->sc_preinit_hook.ich_func = iwx_attach_hook; sc->sc_preinit_hook.ich_arg = sc; if (config_intrhook_establish(&sc->sc_preinit_hook) != 0) { diff --git a/sys/dev/iwx/if_iwxreg.h b/sys/dev/iwx/if_iwxreg.h index f3d1f078b48e..3f161b627a5f 100644 --- a/sys/dev/iwx/if_iwxreg.h +++ b/sys/dev/iwx/if_iwxreg.h @@ -7902,6 +7902,23 @@ iwx_rx_packet_payload_len(const struct iwx_rx_packet *pkt) #define IWX_MIN_DBM -100 #define IWX_MAX_DBM -33 /* realistic guess */ +/* + * NF values for various channel widths at 20C + * + * 20MHz - -98 dBm + * 40MHz - -94 dBm + * 80MHz - -92 dBm + * 160MHz - -88 dBm + * 320MHz - -85 dBm + */ +#define IWX_DEFAULT_NF -100 +/* + * Note; RSSI is for net80211, and it's calculated against the noise floor + * as a reference. + */ +#define IWX_RSSI_MINIMUM -10 +#define IWX_RSSI_MAXIMUM 60 + #define IWX_READ(sc, reg) \ bus_space_read_4((sc)->sc_st, (sc)->sc_sh, (reg)) From nobody Tue May 19 06:53:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKQPH0n95z6dgmZ for ; Tue, 19 May 2026 06:53: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKQPG6BcHz3hm9 for ; Tue, 19 May 2026 06:53:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779173618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jRZUHDuc67NJatJ5cRfxKFEuoDKMw1IFQiAbjodvA10=; b=IUjT3tPchhKn73RPdMCKItXu8e6WLairoXNCVrtTez96nC9YpGFtKBOoYx1DOCizkOZb5O BGmHWoRtWoZRzHqgTVPHmzWRW6e58e1pIpgvADRO5vpQYyCQ/UvP62J2mamuQrunJceubm wBr+r8cec3EZg4cECUs/XrCjlUpjy/yOHZUPyZ4CO6BvVOhyz7yMAWU52ZSyf/QyLoNAYe 0xP02H7Ejzq8JzronZ03fp0bJhhM9dWoyjzfsNenddg0yWKr8g33kOuO8tPVlJEzckY12q AEaVVr019Yjzn9GepauDcqEzsVdML8RdHffkjyl4CGV2obz7sXE7loFAM6MV1A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779173618; a=rsa-sha256; cv=none; b=eBe0Ew8dnroP1qO3faMtZhp0NedAs59uBltRtPdkdyfs54lxqwHJG+iXz3DWSbKmqabbhK lL8/E5zp962RS5J8MGjGagjwes2kFHjdEatr9U0gh5FHDoTSpbFZiony307HnFIf91kTgq 8VFpAu1B9tVzUXkmWoG4QBgNTXkgOWKp0fs/wIQmGVRgbXbMv2che0aYg9Tl0mQS3J9+LQ kymvJAvamV4CJDafQ/EyEGEZ0YtP9YeC9NOWkfUQlTT6gZTEZeJRkSQi+VNB7iTYITcRR1 v4UO5wPq2WLuCAlHMhF/MfGXfI8boM25YqibKQrc1xlysUEDW5z+2tK2xbBNTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779173618; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jRZUHDuc67NJatJ5cRfxKFEuoDKMw1IFQiAbjodvA10=; b=N8uz15pypKOzGe+7yXTwh1xysRuwsCiGRlVMknWSfh9iIq3tu04UZCPXhWFDRQP8Kps5Us mFnZ/4sPhP/KOMGOMze3w44lpvMb9MCFnLsG7y337zesCn4uIJEhLuFEbm4sclJEjO20eU MRtJMt0klCmgzO0hwf4APc4MGGBOx0/wka0kb3byqo1ZhXuJeoLY3a+z5rAUQe20PP80NY N6YrHp/pwT9/+ZAiUHQjol2uECnlCu0rH0n3OrKGP/t9llOu6RF+fFYMdCqvtaljPh+StK T/qKHSSQQOZUbcF7W5ZBaOMC3uPnQTD8LETDoh8DKlwNZZhEo1W5iDW1KEtDXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKQPG5f1vz13hX for ; Tue, 19 May 2026 06:53:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23d77 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 06:53:38 +0000 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=B8rg?=rav Subject: git: 4617a6cb82a6 - main - nlist: Handle multiple symbol tables List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 4617a6cb82a673b02257257c1f5f8a3c8d2bb943 Auto-Submitted: auto-generated Date: Tue, 19 May 2026 06:53:38 +0000 Message-Id: <6a0c08f2.23d77.5dd90a92@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=4617a6cb82a673b02257257c1f5f8a3c8d2bb943 commit 4617a6cb82a673b02257257c1f5f8a3c8d2bb943 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-19 06:52:53 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-19 06:53:35 +0000 nlist: Handle multiple symbol tables * Instead of looking for and stopping at the first SHT_SYMTAB section, iterate over all SHT_DYNSYM and SHT_SYMTAB sections until we've either found all our symbols or run out. * Perform bounds checks on section and string table offsets and sizes before attempting to mmap() the string table. * Perform bounds checks on individual symbol table entries before attempting to access the corresponding strings. * Stop treating _Foo and Foo as the same symbol. This unbreaks OpenSSH which uses nlist(3) to verify PKCS#11 providers. PR: 295336 MFC after: 1 week Fixes: 77909f597881 ("Initial elf nlist support [...]") Fixes: 644b4646c7ac ("OpenSSH: Update to 10.1p1") Reviewed by: kib, emaste Differential Revision: https://reviews.freebsd.org/D57034 --- lib/libc/gen/nlist.3 | 8 +-- lib/libc/gen/nlist.c | 150 ++++++++++++++++++++++++++++----------------------- 2 files changed, 87 insertions(+), 71 deletions(-) diff --git a/lib/libc/gen/nlist.3 b/lib/libc/gen/nlist.3 index 6aefd95e3b51..4912180e9bcd 100644 --- a/lib/libc/gen/nlist.3 +++ b/lib/libc/gen/nlist.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 18, 2026 +.Dd May 19, 2026 .Dt NLIST 3 .Os .Sh NAME @@ -45,9 +45,11 @@ Its use is discouraged. The .Fn nlist function -retrieves name list entries from the +retrieves name list entries from .Xr elf 5 -section with type +sections with type +.Dv SHT_DYNSYM +or .Dv SHT_SYMTAB in an ELF object (for example, an executable file or shared library). The argument diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c index ebf4ae92641a..06034dc8ee1a 100644 --- a/lib/libc/gen/nlist.c +++ b/lib/libc/gen/nlist.c @@ -36,8 +36,9 @@ #include #include -#include #include +#include +#include #include #include #include @@ -85,6 +86,8 @@ __fdnlist(int fd, struct nlist *list) #define ISLAST(p) (p->n_un.n_name == 0 || p->n_un.n_name[0] == 0) +static int elf_scan_symtab(Elf_Shdr *, int, int, off_t, size_t, char *, size_t, + struct nlist *, int); static void elf_sym_to_nlist(struct nlist *, Elf_Sym *, Elf_Shdr *, int); /* @@ -121,22 +124,19 @@ int __elf_fdnlist(int fd, struct nlist *list) { struct nlist *p; - Elf_Off symoff = 0, symstroff = 0; - Elf_Size symsize = 0, symstrsize = 0; - Elf_Ssize cc, i; + Elf_Off symoff = 0, stroff = 0; + Elf_Size symsize = 0, strsize = 0; + Elf_Ssize i; int nent = -1; int errsave; - Elf_Sym sbuf[1024]; - Elf_Sym *s; Elf_Ehdr ehdr; - char *strtab = NULL; - Elf_Shdr *shdr = NULL; + Elf_Shdr *shdr; Elf_Size shdr_size; void *base; struct stat st; /* Make sure obj is OK */ - if (lseek(fd, (off_t)0, SEEK_SET) == -1 || + if (lseek(fd, 0, SEEK_SET) == -1 || _read(fd, &ehdr, sizeof(Elf_Ehdr)) != sizeof(Elf_Ehdr) || !__elf_is_okay__(&ehdr) || _fstat(fd, &st) < 0) @@ -158,39 +158,6 @@ __elf_fdnlist(int fd, struct nlist *list) return (-1); shdr = (Elf_Shdr *)base; - /* - * Find the symbol table entry and it's corresponding - * string table entry. Version 1.1 of the ABI states - * that there is only one symbol table but that this - * could change in the future. - */ - for (i = 0; i < ehdr.e_shnum; i++) { - if (shdr[i].sh_type == SHT_SYMTAB) { - symoff = shdr[i].sh_offset; - symsize = shdr[i].sh_size; - symstroff = shdr[shdr[i].sh_link].sh_offset; - symstrsize = shdr[shdr[i].sh_link].sh_size; - break; - } - } - - /* Check for files too large to mmap. */ - if (symstrsize > SIZE_T_MAX) { - errno = EFBIG; - goto done; - } - /* - * Map string table into our address space. This gives us - * an easy way to randomly access all the strings, without - * making the memory allocation permanent as with malloc/free - * (i.e., munmap will return it to the system). - */ - base = mmap(NULL, (size_t)symstrsize, PROT_READ, MAP_PRIVATE, fd, - (off_t)symstroff); - if (base == MAP_FAILED) - goto done; - strtab = (char *)base; - /* * clean out any left-over information for all valid entries. * Type and value defined to be 0 if not found; historical @@ -210,46 +177,93 @@ __elf_fdnlist(int fd, struct nlist *list) ++nent; } - /* Don't process any further if object is stripped. */ - if (symoff == 0) - goto done; - - if (lseek(fd, (off_t) symoff, SEEK_SET) == -1) { - nent = -1; - goto done; + /* + * Find the symbol table entry and it's corresponding + * string table entry. Version 1.1 of the ABI states + * that there is only one symbol table but that this + * could change in the future. + */ + for (i = 0; nent > 0 && i < ehdr.e_shnum; i++) { + if (shdr[i].sh_type != SHT_SYMTAB && + shdr[i].sh_type != SHT_DYNSYM) + continue; + symoff = shdr[i].sh_offset; + symsize = shdr[i].sh_size; + stroff = shdr[shdr[i].sh_link].sh_offset; + strsize = shdr[shdr[i].sh_link].sh_size; + + /* + * Skip this section if it or its string table is empty or + * extends beyond the end of the file, or if the string + * table is too large to map into memory. + */ + if (symoff == 0 || symsize == 0 || + symsize > SIZE_MAX - symoff || + symoff + symsize > st.st_size || + stroff == 0 || strsize == 0 || + strsize > SIZE_MAX - stroff || + stroff + strsize > st.st_size) { + errno = ENOENT; + continue; + } + + /* + * Map string table into our address space. This gives us + * an easy way to randomly access all the strings, without + * making the memory allocation permanent as with + * malloc/free (i.e., munmap will return it to the + * system). + */ + base = mmap(NULL, (size_t)strsize, PROT_READ, + MAP_PRIVATE, fd, (off_t)stroff); + if (base == MAP_FAILED) + continue; + + nent = elf_scan_symtab(shdr, ehdr.e_shnum, fd, symoff, symsize, + base, strsize, list, nent); + + errsave = errno; + munmap(base, strsize); + errno = errsave; } + errsave = errno; + munmap(shdr, shdr_size); + errno = errsave; + return (nent); +} + +static int +elf_scan_symtab(Elf_Shdr *shdr, int shnum, int fd, off_t symoff, size_t symsize, + char *strtab, size_t strsize, struct nlist *list, int nent) +{ + Elf_Sym sbuf[1024]; + Elf_Sym *s; + char *name; + struct nlist *p; + Elf_Ssize cc; + size_t slen; + if (lseek(fd, symoff, SEEK_SET) == -1) + return (-1); while (symsize > 0 && nent > 0) { cc = MIN(symsize, sizeof(sbuf)); if (_read(fd, sbuf, cc) != cc) break; symsize -= cc; for (s = sbuf; cc > 0 && nent > 0; ++s, cc -= sizeof(*s)) { - char *name; - struct nlist *p; - + if (s->st_name >= strsize) + continue; name = strtab + s->st_name; if (name[0] == '\0') continue; - for (p = list; !ISLAST(p); p++) { - if ((p->n_un.n_name[0] == '_' && - strcmp(name, p->n_un.n_name+1) == 0) - || strcmp(name, p->n_un.n_name) == 0) { - elf_sym_to_nlist(p, s, shdr, - ehdr.e_shnum); - if (--nent <= 0) - break; - } + slen = strnlen(name, strsize - s->st_name); + for (p = list; nent > 0 && !ISLAST(p); p++) { + if (strncmp(name, p->n_un.n_name, slen) == 0 && + p->n_un.n_name[slen] == '\0') + elf_sym_to_nlist(p, s, shdr, shnum); } } } - done: - errsave = errno; - if (strtab != NULL) - munmap(strtab, symstrsize); - if (shdr != NULL) - munmap(shdr, shdr_size); - errno = errsave; return (nent); } From nobody Tue May 19 06:54:50 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKQQg038Vz6dgb4 for ; Tue, 19 May 2026 06:54: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKQQf5tskz3jfh for ; Tue, 19 May 2026 06:54:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779173690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gLD/QH2bFasYYoOdKZadQ5LHUqiUMS8kZP7l1rQMLH4=; b=ycTR5gwbj3cBqRV1yYQ5wybkvBJsNi1Ka7V3DsTNnvuAY5aysyLPcWxiwMWm3fPHhgMR1g hISq0HPN8B/dhaYGX+TmLY6xHPKnD3XnGNgXMH8KEX0e0shMLOGMKEA3VCY5mMzPxrXQD4 MMaYVkNfMNyYEekA5rFkV1/GRVn1kTGWcv0s6rQUvmjyH+z2Xs5kqSiXNC1yikAPyc3Iw4 AXKGexJQQscIFFPZtWavLiwhLdrj7OCTwny2JJWPzReir6SanYe/+flpGHs8vrbL0CVZkZ NP0Fnml/jJK9zuchBEA+ARjJqHoAAKuNg2ul6btOzqqKERxPf/bAF5dinCz+nQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779173690; a=rsa-sha256; cv=none; b=ZrfZf4pNqPcZBbe3cAYtD2/OLyzl9UoEeSODYhSN5xG9ML8BaN1kDztqJZFg2Ei/5giNUV 2hoIMYcBceIRAee9nkm4M3C/qRBhkuOjV7TRuoWFYDuO4r0QXd40Aoao7vHFiDDFWqS0+C h5j/ge9j6mCY1wXc5A2nKMmdk0YuuLYZq/E8WIoppNF3mttQoWKwgSZH1quaSSdBo2UlCa vJ91op3R9O38E4gfDGmM40MW/wZAm5sgwYlvHvIdV3U2I0wCeO36Tzg5grQHw8IheOTs/g iQ/ogxL5oIjLVCKXKDgjf0VUv7EuHxckzx4bpLNBks+Y/dKcg3pVB0wNQYAQdg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779173690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gLD/QH2bFasYYoOdKZadQ5LHUqiUMS8kZP7l1rQMLH4=; b=w8y2w4EcPkyDsqtEgNZePVMpbHhBG5k4vZ37rq2XRCx0TkeQdatc1gPNF+w7st+nZTXRio SoG7rjy0mOo0xf9xMZ02GQjaC5r+h+LpT+rWvmO5S1CFJJ/SMZMzbWo99XZaMOTXLdEmwv a/P5wDZAQHPYE598bmcb4BN+sR3eq0cl57SqLg9pmJLGvb84i6jPT4CXXOiFQi3VkX9ID0 IkWIAXC/8wjA47M19WJajOm02KIU36l02ds4L9+wye9Rfl34F8G3jgBbLDH29cUikgglSz BEcOBooM2LUm/19OrRJxDKkeNm4XI0JIi7kVya3ZqlpQjgeEjrMmLrjVpiF1/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKQQf5GcRz13S5 for ; Tue, 19 May 2026 06:54:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 25d3a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 06:54:50 +0000 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=B8rg?=rav Subject: git: 1cfc208a07b6 - main - tmpfs: Overhaul option handling on remount List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 1cfc208a07b64a64377a4f8fe51c28f588a929cf Auto-Submitted: auto-generated Date: Tue, 19 May 2026 06:54:50 +0000 Message-Id: <6a0c093a.25d3a.5dda74c9@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=1cfc208a07b64a64377a4f8fe51c28f588a929cf commit 1cfc208a07b64a64377a4f8fe51c28f588a929cf Author: Dag-Erling Smørgrav AuthorDate: 2026-05-19 06:54:28 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-19 06:54:28 +0000 tmpfs: Overhaul option handling on remount On remount, we must accept all the same options as on initial mount. For parameters which we're unable to modify on the fly, fail only if the new value is different from the existing one. PR: 295096 MFC after: 1 week Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D57044 --- sys/fs/tmpfs/tmpfs_vfsops.c | 100 +++++++++++++++++++++++++++----------------- 1 file changed, 62 insertions(+), 38 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs_vfsops.c b/sys/fs/tmpfs/tmpfs_vfsops.c index 431893b77bb9..5a9b9782b9da 100644 --- a/sys/fs/tmpfs/tmpfs_vfsops.c +++ b/sys/fs/tmpfs/tmpfs_vfsops.c @@ -93,10 +93,6 @@ static const char *tmpfs_opts[] = { "export", "union", "nonc", "nomtime", "nosymfollow", "pgread", NULL }; -static const char *tmpfs_updateopts[] = { - "from", "easize", "export", "nomtime", "size", "nosymfollow", NULL -}; - static int tmpfs_update_mtime_lazy_filter(struct vnode *vp, void *arg) { @@ -325,6 +321,7 @@ tmpfs_mount(struct mount *mp) sizeof(struct tmpfs_dirent) + sizeof(struct tmpfs_node)); struct tmpfs_mount *tmp; struct tmpfs_node *root; + struct vfsoptlist *opts; int error; bool nomtime, nonc, pgread; /* Size counters. */ @@ -338,44 +335,71 @@ tmpfs_mount(struct mount *mp) struct vattr va; - if (vfs_filteropt(mp->mnt_optnew, tmpfs_opts)) + opts = mp->mnt_optnew; + if (vfs_filteropt(opts, tmpfs_opts)) return (EINVAL); if (mp->mnt_flag & MNT_UPDATE) { - /* Only support update mounts for certain options. */ - if (vfs_filteropt(mp->mnt_optnew, tmpfs_updateopts) != 0) - return (EOPNOTSUPP); tmp = VFS_TO_TMPFS(mp); - if (vfs_getopt_size(mp->mnt_optnew, "size", &size_max) == 0) { - /* - * On-the-fly resizing is not supported (yet). We still - * need to have "size" listed as "supported", otherwise - * trying to update fs that is listed in fstab with size - * parameter, say trying to change rw to ro or vice - * versa, would cause vfs_filteropt() to bail. - */ - if (size_max != tmp->tm_size_max) - return (EOPNOTSUPP); - } - if (vfs_getopt_size(mp->mnt_optnew, "easize", &ea_max_size) == 0) { + + /* + * These options cannot (yet) be modified on the fly, but + * mount(8) will still pass them when remounting, so we + * will silently ignore them as long as the value is + * unchanged. + */ + if (vfs_scanopt(opts, "gid", "%d", &root_gid) == 1 && + root_gid != tmp->tm_root->tn_gid) + return (EOPNOTSUPP); + if (vfs_scanopt(opts, "uid", "%d", &root_uid) == 1 && + root_uid != tmp->tm_root->tn_uid) + return (EOPNOTSUPP); + if (vfs_scanopt(opts, "mode", "%ho", &root_mode) == 1 && + (root_mode & S_IFMT) != (tmp->tm_root->tn_mode & S_IFMT)) + return (EOPNOTSUPP); + if (vfs_getopt_size(opts, "inodes", &nodes_max) == 0 && + nodes_max != 0 && nodes_max != tmp->tm_nodes_max) + return (EOPNOTSUPP); + if (vfs_getopt_size(opts, "size", &size_max) == 0 && + size_max != 0 && size_max != tmp->tm_size_max) + return (EOPNOTSUPP); + if (vfs_getopt_size(opts, "maxfilesize", &maxfilesize) == 0 && + maxfilesize != 0 && maxfilesize != tmp->tm_maxfilesize) + return (EOPNOTSUPP); + if (tmp->tm_nonc != + (vfs_getopt(opts, "nonc", NULL, NULL) == 0)) + return (EOPNOTSUPP); + if (tmp->tm_pgread != + (vfs_getopt(opts, "pgread", NULL, NULL) == 0)) + return (EOPNOTSUPP); + + /* + * These options can be modified. + */ + if (vfs_getopt_size(opts, "easize", &ea_max_size) != 0) tmp->tm_ea_memory_max = ea_max_size; - } - if (vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) && - !tmp->tm_ronly) { + tmp->tm_nomtime = (vfs_getopt(opts, "nomtime", NULL, 0) == 0); + + /* + * Handle read-write to read-only or vice versa. + */ + if (vfs_flagopt(opts, "ro", NULL, 0) && !tmp->tm_ronly) { /* RW -> RO */ return (tmpfs_rw_to_ro(mp)); - } else if (!vfs_flagopt(mp->mnt_optnew, "ro", NULL, 0) && - tmp->tm_ronly) { + } + if (!vfs_flagopt(opts, "ro", NULL, 0) && tmp->tm_ronly) { /* RO -> RW */ tmp->tm_ronly = 0; MNT_ILOCK(mp); mp->mnt_flag &= ~MNT_RDONLY; MNT_IUNLOCK(mp); } - tmp->tm_nomtime = vfs_getopt(mp->mnt_optnew, "nomtime", NULL, - 0) == 0; + + /* + * Check if fast path lookup is still supported. + */ MNT_ILOCK(mp); - if ((mp->mnt_flag & MNT_UNION) == 0) { + if (!tmp->tm_nonc && (mp->mnt_flag & MNT_UNION) == 0) { mp->mnt_kern_flag |= MNTK_FPLOOKUP; } else { mp->mnt_kern_flag &= ~MNTK_FPLOOKUP; @@ -391,25 +415,25 @@ tmpfs_mount(struct mount *mp) return (error); if (mp->mnt_cred->cr_ruid != 0 || - vfs_scanopt(mp->mnt_optnew, "gid", "%d", &root_gid) != 1) + vfs_scanopt(opts, "gid", "%d", &root_gid) != 1) root_gid = va.va_gid; if (mp->mnt_cred->cr_ruid != 0 || - vfs_scanopt(mp->mnt_optnew, "uid", "%d", &root_uid) != 1) + vfs_scanopt(opts, "uid", "%d", &root_uid) != 1) root_uid = va.va_uid; if (mp->mnt_cred->cr_ruid != 0 || - vfs_scanopt(mp->mnt_optnew, "mode", "%ho", &root_mode) != 1) + vfs_scanopt(opts, "mode", "%ho", &root_mode) != 1) root_mode = va.va_mode; - if (vfs_getopt_size(mp->mnt_optnew, "inodes", &nodes_max) != 0) + if (vfs_getopt_size(opts, "inodes", &nodes_max) != 0) nodes_max = 0; - if (vfs_getopt_size(mp->mnt_optnew, "size", &size_max) != 0) + if (vfs_getopt_size(opts, "size", &size_max) != 0) size_max = 0; - if (vfs_getopt_size(mp->mnt_optnew, "maxfilesize", &maxfilesize) != 0) + if (vfs_getopt_size(opts, "maxfilesize", &maxfilesize) != 0) maxfilesize = 0; - if (vfs_getopt_size(mp->mnt_optnew, "easize", &ea_max_size) != 0) + if (vfs_getopt_size(opts, "easize", &ea_max_size) != 0) ea_max_size = 0; - nonc = vfs_getopt(mp->mnt_optnew, "nonc", NULL, NULL) == 0; - nomtime = vfs_getopt(mp->mnt_optnew, "nomtime", NULL, NULL) == 0; - pgread = vfs_getopt(mp->mnt_optnew, "pgread", NULL, NULL) == 0; + nonc = vfs_getopt(opts, "nonc", NULL, NULL) == 0; + nomtime = vfs_getopt(opts, "nomtime", NULL, NULL) == 0; + pgread = vfs_getopt(opts, "pgread", NULL, NULL) == 0; /* Do not allow mounts if we do not have enough memory to preserve * the minimum reserved pages. */ From nobody Tue May 19 12:26:04 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKYms35JKz6f76w for ; Tue, 19 May 2026 12:26: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKYmr5Pt7z3Rdd for ; Tue, 19 May 2026 12:26:04 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779193564; 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; bh=ZCWMqMeQtCqcuwqm/bFf4sgqunfYj+g6EF1HDjWk/vk=; b=r0oU+07AHn6hHYUb/EtIvX7F+Gr9iDd2C0vt8uTxAfuwO1sqmyGaHs8pbN9bdvgrr7EwCP 2sUlE6LW5LoEi3JxhPl83iZBx9WLPlW2lIPOSjWi1vjtYiRpMczbaSNfDd9Or84XQOg3Bq qko3Gnm/GKPFVPpEPAscePieuIKz59LjVggq9psg+8yYwUFeQ72Z3ctLIhb+D1AzzKw7fS Nwt75LOc5tC+dMEVviRNn/srIz75/e6xx557PxmoWzadwjnwkWd60iGX/U3XZqkAuVyIl3 ohnMFfD657JsuD07lPUOtyp4QxWo5ARc2LBgjiq+4YmFeNUNu30qGouvXXQEnw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779193564; a=rsa-sha256; cv=none; b=iawZTl80EEW9ISz1OYDX97EC6QP+ifa2bZzsQQfC+K3gGnzGtngeTfJ4pIPfRTZsHScdOC aVQPfEDsrZc2qdZmElnMb29O9UA4sXSKxZ8lYOjmysgPDj0hpqUAisB7Cox9OgYCwZtsIj DDPuIGZo59904jEPOo5rCVa2dEnconRkFZdGYOg5179qPhOmWAPNaWkLR38SVJpw7U2oji Yan4RiWJ8dpqqzwfqTQ5vMgl97zZWuXOayWGJ4kO7MTDXJrREhZJtVZ9miSOOtu/9o3lqq 5aIpMRcGl7YpsWDoBGw1wNRMrfiLjFmR8n6BqzvOVNuXeAQgMXLb2DPw8e6qQg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779193564; 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; bh=ZCWMqMeQtCqcuwqm/bFf4sgqunfYj+g6EF1HDjWk/vk=; b=KLKzNJs0nPWAtf3yGdTcwoEbqSFkx+qVdofhBc+KfKRcp4erbqYKJDJTAj3A18uER4nLGT ti4Ovzatd52EJqA2UKr41cKLy2fP+1ed+scSEc0H4wb3CaGpQSSOt1wmE9j2fKsdjDA5ll Q3TFsxqgXAOZJWgBjAHFOucMZK8jOPDBerzBHyWnI1xwVXrMQ8Oq1dFvtl2bdyKedSjY9E cRJRbLTK1B6/7T6vfYoTJHCBQwE5cVgm1PJvelOdEpy9dowczP4lnXZ4Loc8GTbADfWuKo Y0vUoqZK/RlZUSa2lCUVCcy6pP+EhFwgyDjV7Fh2u4xzCuPsyt+snOBvG5Yixg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKYmr4lKPzk6 for ; Tue, 19 May 2026 12:26:04 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 317f6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 12:26:04 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Abdelkader Boudih From: Christos Margiolis Subject: git: 65341ec31729 - main - snd_hda: Reassign duplicate HDMI/DP pin sequences instead of disabling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 65341ec3172936804b081c8ceca9bae88f5c7192 Auto-Submitted: auto-generated Date: Tue, 19 May 2026 12:26:04 +0000 Message-Id: <6a0c56dc.317f6.28faeda0@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=65341ec3172936804b081c8ceca9bae88f5c7192 commit 65341ec3172936804b081c8ceca9bae88f5c7192 Author: Abdelkader Boudih AuthorDate: 2026-05-19 12:24:14 +0000 Commit: Christos Margiolis CommitDate: 2026-05-19 12:25:51 +0000 snd_hda: Reassign duplicate HDMI/DP pin sequences instead of disabling Some firmware (e.g. Apple EFI on Sandy Bridge Mac hardware) programs all HDMI/DP output pins in an association with identical sequence numbers. The existing code disables the entire association on the first duplicate, leaving HDMI/DP audio non-functional. For digital output pins (HDMI/DP) with seq=0 duplicates, search for the next free sequence slot and reassign the duplicate rather than disabling. The seq=0 restriction targets the known Apple firmware pattern; any other duplicate sequence is more likely a genuine firmware error and the association is still disabled. Update first after reassignment so that hpredir is not left pointing at a stale sequence. Non-digital and input associations retain the existing disable behaviour. MFC after: 1 week Reviewed by: christos Differential Revision: https://reviews.freebsd.org/D55473 --- sys/dev/sound/pci/hda/hdaa.c | 49 ++++++++++++++++++++++++++++++++++++++++---- 1 file changed, 45 insertions(+), 4 deletions(-) diff --git a/sys/dev/sound/pci/hda/hdaa.c b/sys/dev/sound/pci/hda/hdaa.c index 7dec437de944..8add23217d1b 100644 --- a/sys/dev/sound/pci/hda/hdaa.c +++ b/sys/dev/sound/pci/hda/hdaa.c @@ -3268,10 +3268,51 @@ hdaa_audio_as_parse(struct hdaa_devinfo *devinfo) first = seq; /* Check association correctness. */ if (as[cnt].pins[seq] != 0) { - device_printf(devinfo->dev, "%s: Duplicate pin %d (%d) " - "in association %d! Disabling association.\n", - __func__, seq, w->nid, j); - as[cnt].enable = 0; + int newseq = -1; + + /* + * Some firmware (e.g. Apple EFI on Mac hardware) + * assigns seq=0 to all HDMI/DP output pins in + * an association. Reassign the duplicate to + * the next free slot rather than disabling the + * whole association. Limit to seq=0 duplicates: + * any other duplicate sequence is more likely a + * genuine firmware error and should still disable. + */ + if (seq == 0 && dir == HDAA_CTL_OUT && + HDA_PARAM_AUDIO_WIDGET_CAP_DIGITAL( + w->param.widget_cap) && + (HDA_PARAM_PIN_CAP_HDMI(w->wclass.pin.cap) || + HDA_PARAM_PIN_CAP_DP(w->wclass.pin.cap))) { + int cand; + + for (cand = 1; cand < 16; cand++) { + if (as[cnt].pins[cand] == 0) { + newseq = cand; + break; + } + } + } + if (newseq >= 0) { + HDA_BOOTVERBOSE( + device_printf(devinfo->dev, + "%s: Duplicate pin %d (%d) " + "in association %d, " + "reassigning to seq %d.\n", + __func__, seq, w->nid, + j, newseq); + ); + seq = newseq; + /* Update hpredir anchor to lowest seq. */ + first = min(first, newseq); + } else { + device_printf(devinfo->dev, + "%s: Duplicate pin %d (%d) " + "in association %d! " + "Disabling association.\n", + __func__, seq, w->nid, j); + as[cnt].enable = 0; + } } if (dir != as[cnt].dir) { device_printf(devinfo->dev, "%s: Pin %d has wrong " From nobody Tue May 19 13:48:20 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKbbs4Tbxz6fDPY for ; Tue, 19 May 2026 13:48: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKbbm1s9nz3dYr for ; Tue, 19 May 2026 13:48:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779198500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P4GwiO9DOv9iWcjXzAOmzy0fnsigSouDr2/26BjOq38=; b=P2m4nNdtoSj2DIvrWEgBJi4SLXC/5lxm44Jlri8go1m9kB6YTydbGGmpWUakGvn3lFCYvr wnWKIUKqiL0POe2hlSWVXhDKrjXpBRwQztsDBm1oG0jT0x15lKF83bbsqkf1jymgEL1VRm L9H967dVtYUIait4DaKv87+2ay2YUofZ/izIZiaQpMmwN1fSwvpy7yy3ugliXrr/4P4gwR pW1AZBPuNLW6lTE2JSx1yPCU6rLCS5L8HqkygHOVlwSQnN9CAnZ3PW/sRumNINvQWrVUQA KOrUWGKbSAwi84Mv5cSDX5jnWrNf0LTRl7GDxMi4PHjCLLy8nfkcwAmjn7rpLw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779198500; a=rsa-sha256; cv=none; b=n+PN5cgTc49WnFGm95y7WGEF3v1Dpqkjdz/7DU8QKge9mjpY8hsTW+tCqPiy1gLqnpDY42 nXVxlp7mD3Q9Oz5knZFYgWv3yRcX/OIYsFE6DaoW7iVJDzC87OT+nwCNyBW9dMWZhFExhP +C+Imq+/qHrpOXLPyFfKK9tkRCZ6nwxFzXx7g+zGj+8Gw+lG5kVKMz18O6UcX4WM0YYxYd Be74Glj1p75v4KatMEhejZs8T5lOJHfAnMZx9lZnOHZ1JNvEV9AFTicAkK9DPKBYj4OaZa 2OMTn+SHH7BL9gwbtOhuRaGojKMTau0TRDp8u98yi4jyTM2FIIkYmZXTv+A5Rg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779198500; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=P4GwiO9DOv9iWcjXzAOmzy0fnsigSouDr2/26BjOq38=; b=A8cO+CXdtJW5Yay0aDZwHDuyIyQoSPw+iO5BgFNaa9myhttJUjQn0OKueNQb2suINaHnhk dkt0tMw4ah4YYBXkFiGUGEa5RD5ldMrOaKGKQCuVFoRR7Sj/DnExZL12pVH1UT+Q0WrN9C 4uogTd4E4CKYMLQ/O/nAVSGlK2QuF3HaNPfxZeR+HCwzr2aW3B4GxydupEDY79nRBtFA0g jbLTAXJSqZ/xtQBl0XZT6rAdADVjph7Snw3Ttw2/4ad5XbNmf0Xlhrk7OWA62kho7MGi/C 4/ZZnmKep3qwiGGTA7chJTPt1oJCD5bToJJgpFbbV27dr2bVLbmlcMRTS4qYXg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKbbm1B5Pz2WQ for ; Tue, 19 May 2026 13:48:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a4a1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 13:48:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: 8dad29555a58 - main - linuxkpi: fix 32-bit arm build List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 8dad29555a5807bf21941807752e1589e20312de Auto-Submitted: auto-generated Date: Tue, 19 May 2026 13:48:20 +0000 Message-Id: <6a0c6a24.3a4a1.4e2c44f5@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=8dad29555a5807bf21941807752e1589e20312de commit 8dad29555a5807bf21941807752e1589e20312de Author: Kyle Evans AuthorDate: 2026-05-19 13:35:36 +0000 Commit: Kyle Evans CommitDate: 2026-05-19 13:47:35 +0000 linuxkpi: fix 32-bit arm build The new KPI is only used in , but it's provided in linux_page.c. The latter only includes the former indirectly by way of , and that's only conditionally included outside of 32-bit ARM there. All of our archs have the necessary pmap_page_set_memattr(), so just move the declaration into instead of trying to reason about the usability of directly in linux_page.c. Reported by: jenkins (via ivy) --- sys/compat/linuxkpi/common/include/asm/set_memory.h | 2 -- sys/compat/linuxkpi/common/include/linux/page.h | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/compat/linuxkpi/common/include/asm/set_memory.h b/sys/compat/linuxkpi/common/include/asm/set_memory.h index f45a51a9710b..99f421b049cd 100644 --- a/sys/compat/linuxkpi/common/include/asm/set_memory.h +++ b/sys/compat/linuxkpi/common/include/asm/set_memory.h @@ -62,8 +62,6 @@ set_memory_wb(unsigned long addr, int numpages) return (-pmap_change_attr((void *)addr, len, VM_MEMATTR_WRITE_BACK)); } -int lkpi_set_pages_attr(struct page *page, int numpages, vm_memattr_t ma); - static inline int set_pages_uc(struct page *page, int numpages) { diff --git a/sys/compat/linuxkpi/common/include/linux/page.h b/sys/compat/linuxkpi/common/include/linux/page.h index 37ab593a64e9..6f5f37d2fd0f 100644 --- a/sys/compat/linuxkpi/common/include/linux/page.h +++ b/sys/compat/linuxkpi/common/include/linux/page.h @@ -127,4 +127,6 @@ clflush_cache_range(void *addr, unsigned int size) } #endif +int lkpi_set_pages_attr(struct page *page, int numpages, vm_memattr_t ma); + #endif /* _LINUXKPI_LINUX_PAGE_H_ */ From nobody Tue May 19 14:29:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKcWM2TCZz6fH6c for ; Tue, 19 May 2026 14:29: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKcWK6qnNz3qD4 for ; Tue, 19 May 2026 14: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=1779200975; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q42Hsg9PKMdllNnw3gnkF/OZjMP2ANIboVue+Cdqndk=; b=i/qyik37iWJ9YeU1egfFiNch5XKf9PFWCRpCbKYN9AMSE3ja0RzTcEDy/ULMcwB/KdIMXI S2eag7ODyHDVUs8jU8r7MZntr/W3GQwhgQKxpBqaCKjufNZkXeetsQZSi7QD8ls/3ZQcXE VREfc5jr+DdAXUvi2TkbvHnoqXPtUPmnniOriY+RSLQBFiGMKpjRrQCB9HSfN3WdHu4Ek/ 4RNjxHvmN2pfzkxBNLxBPy/gNQacdF8r4zSotOycT4NA3xVJPW2bsJ4+kdQ0V00dCaSZqR eOhSN95Ed8hMRyYsmNDeQEjWrH7N/Kfaur81afDk4rGld5jw+b4M/FoGgXlSdA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779200974; a=rsa-sha256; cv=none; b=UTgan+86BaRgpIhCN3Ie00IgjydqGcjBw2xLvBucU+2tWv8gXncamnS4hT5fmIX0g6VMDT 34IHvZqFVHjChZXVFWIpuEQ6dWXnHkFtkPMEgxkTDciH2sIERlG2MNyCWjkS771AEFSTcC x4lURwIvt3xodatXv2H/311PdVWfoC+KykAEcbD5eFX6v8rO8wEkx9cRPycj+HFEc9mfcL vyckQsSx0VUBwJ4kcuzYGfxXg8UTABP+3FxYJ53tRuO8wO+6E5AGZ2smkWHuNan7588hlC wzXr5dheb696hrWe7A1kHvHVKWrkRtzKmY1kAYyb21wQFqCmob/aKiew4fNjKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779200974; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Q42Hsg9PKMdllNnw3gnkF/OZjMP2ANIboVue+Cdqndk=; b=bcbCc9imMcm1RW74dvVs/GGCfj3RSsaaKCZO6xp4uOUFE+n9BOc2SrI1EiyJ3oWU+c9qCf wCEoUMczgaaGFQjnqx5DNl5ArVqXk0nAByvSqQkrqGnky+6hIJMxXsJRWcMSEnZK7/GC4d 1vED6eM63TcT7JjhVSPEyG4fqGkiEM2ctYrAXBlKPz8jW6azCetDB182KmGOJfhq1Zj3mj L3cBzqIxfF1DCuVjSPY7yNzrGH4zdPz5fRfxwhJQ4/0+o8zZRRtKqa0tPqcrZT5PYXFPYj uOMgD3ItPXiMLLHATQ203+Fnvq9RbhfJZwHuyXOAzaPevSqe6mKbP6USwNhtEA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKcWK6KhCz3r2 for ; Tue, 19 May 2026 14:29:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3dc95 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 14:29:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: eeffed5aa0d9 - main - tests/if_carp: Run all tests with execenv=jail List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: eeffed5aa0d9a67adb21bf188515cb374340e9cb Auto-Submitted: auto-generated Date: Tue, 19 May 2026 14:29:33 +0000 Message-Id: <6a0c73cd.3dc95.6ad9f55a@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=eeffed5aa0d9a67adb21bf188515cb374340e9cb commit eeffed5aa0d9a67adb21bf188515cb374340e9cb Author: Mark Johnston AuthorDate: 2026-05-19 14:28:34 +0000 Commit: Mark Johnston CommitDate: 2026-05-19 14:29:12 +0000 tests/if_carp: Run all tests with execenv=jail Otherwise failures can occur when running tests in parallel since some tests reuse jail names. MFC after: 1 week --- tests/sys/netinet/Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/sys/netinet/Makefile b/tests/sys/netinet/Makefile index a13b0b42e2bc..d5bfdad0a812 100644 --- a/tests/sys/netinet/Makefile +++ b/tests/sys/netinet/Makefile @@ -40,6 +40,8 @@ LIBADD.udp_bindings= pthread # Some of the arp tests look for log messages in the dmesg buffer, so run them # serially to avoid problems with interleaved output. TEST_METADATA.arp+= is_exclusive="true" +TEST_METADATA.carp+= execenv="jail" \ + execenv_jail_params="vnet allow.raw_sockets" TEST_METADATA.divert+= required_programs="python" \ execenv="jail" \ execenv_jail_params="vnet allow.raw_sockets" From nobody Tue May 19 14:33:51 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKccH4SHYz6fH9W for ; Tue, 19 May 2026 14:33: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKccH37gjz3qlv for ; Tue, 19 May 2026 14:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779201231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KSP2Zn+92EBs7uXztdHxqyhCtQ62D59ev5QMSBK9658=; b=uSbBmeT98Ftcs8OkZnn6NHh6BMDKdLENQr5Gb83hjxISuTAP1zmmbDcAILEgvWwdNqPwmO alIi76V0SNhoFg2N4atUie8ChftQhrt+nE0cD9PzFY8lZ360DmuM7V2vAwlU+26VdfFsJ/ A1oxkQ+UPokHo3TQOOCw0on1xKcASyldtrskSTp7eyPj9oyYQdU7ago7JZ3VKhe9hpWxTB H7VGwsxTBpLOuGzTO8MKEFDeJQfEUBAVspqfhWtsS3e7RXXT46Kpeu07nbx0shnPq8BmNn HKqVtya1UojWr9srQV+E0lnB1DHr02gRW1mbGpBAK+5eTuXuLYnWfaQNu8/IfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779201231; a=rsa-sha256; cv=none; b=b+8jnPaIB9oCXyqsqqnMj2tfWT0gYfrF0/2YE35UTqCX4DfFUlWOgSTOL/KbOtLizGlzdB uJFXSekBWiY8rY/7rYtJEu76tmKCj35sedDPk+qh7Wb6VrSh3JSNbIlXZ2zxi2whLIW4np erZZGZlHSPaA3VZG7ZhrYD6hsH+Cosbmn6JgSM3pnwH+RHZ6dJT3Pc44uBaC0mFFCWPIi5 cFngXEYg+q5JCYJN62NALfrFUXlTFmztquGWUmSul1lTsxCzVwYFW/6GuNx8UFPA/nyng2 W9kxueuUXuMUN6bEE7sfG9upoyFayddoB0Iiv8LAInc47n49LpRDn+yuHqmvfg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779201231; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KSP2Zn+92EBs7uXztdHxqyhCtQ62D59ev5QMSBK9658=; b=sBV7r7iSZ0T0ORkl5jQpUKy/+euCAatv9GuxkQSCu8O69+NslJZFJbCBuf6IITwMyve+FD KMpbjkPdSrjOn9gaeOiro/kOc3SBO51B2rc2A2Gt76GzDPcpC/4+Y5bsLuTIzCB/n34m4u M9RGXx673moa1I2ahJZbTE1aH/KyJoE2s7CmCH3JvovHGb2bD67tVrTB2puR28pZoM7v7a Cckm538WgH4ycTcDw51bHyvJ8Ld6jz0Fi3uWKcVNkmWU13AuaP+s2embrQsG4PcTo1g88q iLVQ9mCz97DB69a0TE1QH++fDixaURdR/2gRL/NZjek/R5FPAdDI7x1GJS/LaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKccH2lJYz3rj for ; Tue, 19 May 2026 14:33:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3eda4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 14:33:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Sergey A. Osokin Subject: git: 9958d0f1dc64 - main - bsd-family-tree: add OpenBSD 7.9 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: osa X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 9958d0f1dc64fafe73ff6f93c65b3a9f8b39f960 Auto-Submitted: auto-generated Date: Tue, 19 May 2026 14:33:51 +0000 Message-Id: <6a0c74cf.3eda4.36e71f34@gitrepo.freebsd.org> The branch main has been updated by osa: URL: https://cgit.FreeBSD.org/src/commit/?id=9958d0f1dc64fafe73ff6f93c65b3a9f8b39f960 commit 9958d0f1dc64fafe73ff6f93c65b3a9f8b39f960 Author: Sergey A. Osokin AuthorDate: 2026-05-19 14:33:30 +0000 Commit: Sergey A. Osokin CommitDate: 2026-05-19 14:33:30 +0000 bsd-family-tree: add OpenBSD 7.9 --- share/misc/bsd-family-tree | 2 ++ 1 file changed, 2 insertions(+) diff --git a/share/misc/bsd-family-tree b/share/misc/bsd-family-tree index ee528f6ec0dd..1847105e5f34 100644 --- a/share/misc/bsd-family-tree +++ b/share/misc/bsd-family-tree @@ -487,6 +487,7 @@ FreeBSD 5.2 | | | | | 15.0 | | | | | | FreeBSD | | | | | 14.4 | | | | + | | | | OpenBSD 7.9 | | | | | | FreeBSD 16 -current | NetBSD -current OpenBSD -current DragonFly -current | | | | | @@ -936,6 +937,7 @@ macOS 26 2025-09-15 [APL] OpenBSD 7.8 2025-10-22 [OBD] FreeBSD 15.0 2025-12-02 [FBD] FreeBSD 14.4 2026-03-10 [FBD] +OpenBSD 7.9 2026-05-19 [OBD] Bibliography ------------------------ From nobody Tue May 19 15:49:51 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKfJ54JDDz6fNMJ; Tue, 19 May 2026 15:49:57 +0000 (UTC) (envelope-from bz@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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKfJ52H7Lz440w; Tue, 19 May 2026 15:49:57 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779205797; 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=5TrzdVFcyjzqgmN9BeOcEcsjr6qsBT3Rv+tlGd26iU4=; b=mqhiTax2TTqAbwDpquTLJj+iW7kV2kw01bNi4Fs4NYr2K1SVoFxdTBsoarzq9OJZciqs6G FGoR/jCrQrHqJXKScQnjHsJOyI/sPsG2rdwE6O92B71XaoaxzcQNqU0HOO4+4oAKerhlMm bqHEulgy13Wm4uxfccnCMRDlKCca+VN/ap07G6vJRq6Tsp433nZ70OnRo76pqDnAQDlBzA 3GFubfxEBivjL/ok3SNiCvpLu8oDBjYW3KFoDVP13uZCNgABG3XV5O0PKOEUsMOFu6cRzQ 27YYKrqy791wQCnYXQwbeoXVmd7anwaRctljBQ3qWEa6+AYBHaT4vGuGJ1Hhzg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779205797; a=rsa-sha256; cv=none; b=DWBSQjKbEUPOyNNIgjitDQt3LnOofBBqCRxLSxboc5nZxMfS1MB9hEpHW71ziK2b7SQhbK hL5mAko8AV8JTf9nDXyOTG6K+SvLklym3xTBSLycOoo9TlAuoha1Japi8MqjjCaXKP+IUN RQ7k6r/NjEINaOtEmCv1e6ilKrzo35zVsee18splkRudQs3W8H6C43edPjnKjb1mqGIBn+ m/I04D706k5FIz3pt0LSR0UnxE4lgnza98SXjfrFiOoYnq9AfIlHf1Kqa/VLdUIdg2WYVe xG9LUMYBK6AWAp2R0hiRZy+mUmWBNc90i5caljRKSwK2MQT7chDnt8Wg1iTGqA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779205797; 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=5TrzdVFcyjzqgmN9BeOcEcsjr6qsBT3Rv+tlGd26iU4=; b=kHoQqc2jREAG8PF/8RdjXymE7sGK7FsoVVzIOIebx2fQB1/Uhs9y4kOwOdL008DcrRXaG8 N6T/mynCyFAs1JrTvSLEGcacvniTOOvpq+b3MuYR1PEaBJn5vdBh6Kux+v+dAQ8F/G/vuh llS4aEpYdwPVYcJ1scE+t08ZRa0B7znB4l1x9WTErqqdbo6AlH6Ik9Oc7XdlQQ205ogpzt nS1xLMJ3nGX6AwN1p7uF/dk3Qr8HHR9bqpvp9dWFcA8LsHWweryQNMFpAxKF9ncBqEOsw8 X/QMqdvm08tCtCf1XBTVV0p8UoD2XxbAYe2p/Zx8qJSgK9zGxrkBdUFhF+35+g== Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E7" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gKfJ50kTzzFdY; Tue, 19 May 2026 15:49:57 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id 2689FA64805; Tue, 19 May 2026 15:49:31 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id 6723D2D029E9; Tue, 19 May 2026 15:49:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id 3_DDzXiupDGo; Tue, 19 May 2026 15:49:54 +0000 (UTC) Received: from nv.t4-02.sbone.de (nv.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 770B22D029D8; Tue, 19 May 2026 15:49:54 +0000 (UTC) Date: Tue, 19 May 2026 15:49:51 +0000 (UTC) From: "Bjoern A. Zeeb" To: src-committers@FreeBSD.org cc: dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: e56f7becc7ef - main - iwx: clean up / document noise floor and RSSI fetching In-Reply-To: <6a0bf889.1e29a.6f1dfea2@gitrepo.freebsd.org> Message-ID: References: <6a0bf889.1e29a.6f1dfea2@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Tue, 19 May 2026, Adrian Chadd wrote: > The branch main has been updated by adrian: > > URL: https://cgit.FreeBSD.org/src/commit/?id=e56f7becc7efe05acbb08162961dca574b152720 > > commit e56f7becc7efe05acbb08162961dca574b152720 > Author: Adrian Chadd > AuthorDate: 2025-11-16 03:13:59 +0000 > Commit: Adrian Chadd > CommitDate: 2026-05-19 05:27:59 +0000 > > iwx: clean up / document noise floor and RSSI fetching > > * Document what iwx_rxmq_get_signal_strength() is doing in a comment, > noting what the firmware returns and what math is being done on it > to turn it into a dBm value. > > * Document what iwx_get_noise() is supposed to do, that we can't just > go do math with log numbers like we're doing, but also that we're > seeing zeros in this firmware (AX210), which may mean we're decoding > using the wrong structs. > > * Swizzle around the RSSI calculation as a function, add min/max RSSI > values, and calculate RSSI against the noise floor. > > * And handle the lowest noise floor value - it can't be -127dBm as > that will throw things off. Cap it at -100dBm which is a little > lower than the thermal noise floor at 20MHz (-98dBm), but it matches > IWX_MIN_DBM. > > Differential Revision: https://reviews.freebsd.org/D53780 Given some comments remained 1:1 the same: initially based on https://reviews.freebsd.org/D50929 > --- > sys/dev/iwx/if_iwx.c | 83 ++++++++++++++++++++++++++++++++++++++++++------- > sys/dev/iwx/if_iwxreg.h | 17 ++++++++++ > 2 files changed, 89 insertions(+), 11 deletions(-) -- Bjoern A. Zeeb r15:7 From nobody Tue May 19 17:18:57 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKhGn4TNkz6fVQC for ; Tue, 19 May 2026 17:18: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKhGn3FK6z3KWB for ; Tue, 19 May 2026 17:18:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779211137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hem/gWZ8yRoy+L8Oh7mUmLwtlFIGg3PJ2dMTSnQbPcQ=; b=vfHhxUdz46vKJu/wGhI8t63K0798b9RM1scaaTl+56hZ7npwq8mb2jT8Fa/kQvn8rTpjCR POfY8m2jsw+/6P7MVYkCvbj1tzvrZRMBDXyRDYgc2dBg+sqd+MnPK3ajpVSWOZ1MkTKdZ6 MqVyl6mxGFkt9c5ZsJWQS54Cj18JYEJvKJCXDuhi37V9XuwN/2CDm38fU3GBFuE7P8Bhvl RtSDpqi6gGfqFs7wf/8p+3AMsR0HilitpVa/mDDMO8+hfP5qPESlcXCLmY5FYJ0mb74uug i9ZKDZMSJmj76XfJfbGxs2Le5sirlONBbL6rPHESnWr5NbpJ5yR1TEhnJunN6Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779211137; a=rsa-sha256; cv=none; b=t6gQ69TBC12kIcW+Zu1gcx7RRYkCo9+7XWMOg+1VsZE5zkOxSxzzkZmqD1KE5q2qMGwFuW JCjNQKWYZWUKBdSiC+UAf+mfdY35oPuEnWlJc++fnoqpU3p5Bj5u7wqn2zutl/s5zUSyrK Tg+1whZWnC4ZLxjoxQzNQw2aAZ9vH1jIFTedcgLLxJvFvVT8ABxUxSGum/Yi4//ZjIsl+3 Nkg+SsgtATX9o8bdv62ORH4Jz1l+7qO6vvnHRxDpD0q+LaLW6jQ2cNGLsfnhne/V2NtuSz T6ZnxbbwHtAIP7psKdADwc8l9KT+pY3A6koXiJG4ZFnZxFdv1hSrpt2QWUH48w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779211137; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Hem/gWZ8yRoy+L8Oh7mUmLwtlFIGg3PJ2dMTSnQbPcQ=; b=rUesLWpMrtz6dkY/FY2rP+UefAS2fmsPTCFGCnC575tJVATG0JfYd17QTRqw0pQBXSdy4+ CfzEuR02P4ucRu5sA6qZyz1PYEhCzPpVNxSPpqYhRnJV1/vpEfbu5MYItebfR2GKkoq1jE ZWgXqcpKaNTjvxakGzzv6Z8hICL0uzpMTIxk8qltHND0NDK3pUC2+0I3GU48AtBPeOEQPv ub7XbY8zIuAen8VJsZfl1hgrZFGLFsy1upYrBXq6R2JRmsmNOfhK6lBQ3kJnre8mK1FmHg 76vm+JgV7dMZixrFWbkFHn0+nmPSSVT9N170L30AiKoV9xp3c7nFkD6TFv/i+Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKhGn2rC5z8QC for ; Tue, 19 May 2026 17:18:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ff9e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 17:18:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 8c9dc47b5fca - main - vnic: Add missing #include List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8c9dc47b5fcaf58a89b1511118b78a65737b20cc Auto-Submitted: auto-generated Date: Tue, 19 May 2026 17:18:57 +0000 Message-Id: <6a0c9b81.1ff9e.5da41f94@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8c9dc47b5fcaf58a89b1511118b78a65737b20cc commit 8c9dc47b5fcaf58a89b1511118b78a65737b20cc Author: John Baldwin AuthorDate: 2026-05-19 17:18:00 +0000 Commit: John Baldwin CommitDate: 2026-05-19 17:18:00 +0000 vnic: Add missing #include Reported by: bz, olivier Fixes: 6dc813301a17 ("sys: Use is_pci_device instead of direct comparisons to devclasses") Sponsored by: Chelsio Communications --- sys/dev/vnic/thunder_bgx_fdt.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/vnic/thunder_bgx_fdt.c b/sys/dev/vnic/thunder_bgx_fdt.c index d8c5459f2914..e038c0b728eb 100644 --- a/sys/dev/vnic/thunder_bgx_fdt.c +++ b/sys/dev/vnic/thunder_bgx_fdt.c @@ -52,6 +52,7 @@ #include #include #include +#include #include "thunder_bgx.h" #include "thunder_bgx_var.h" From nobody Tue May 19 17:31:45 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKhYZ3Gsxz6fWZT for ; Tue, 19 May 2026 17:31: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKhYY73K4z3M26 for ; Tue, 19 May 2026 17:31:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779211906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Za5JL34DtEIJXb5yQhnLiJCnxA+yhNXorRM1MfI5kT8=; b=WWbr1r8DdiVRugwyKDFJso4PclUbDnkcEBm7Bvpu4k7OAp6oi+92jgFWxAEp0rZEPaV8cX dkUPwJ3Ubyv6RFGK16RC/2qotxBtNQk3pa4+mlykHyjG0Q6uU79c+gVpXc4do2p1bYPpdQ k+NumFCDN2gpwyOExP/yCBkBAaWSIF660Qo3Hq4ZVdwpFFp/ooLY61oHXRAurZGOXA5OO1 HqESGhi26Kab0FCgg9IOZiyUqe+1+ijObGIAiynYUPaHP7dXLZ6EEkL1I+Ew1gIiLWzcAs bDo3N1VgPtNhlVKoGxU4AGXxWkApf4Q11+mlViU05apl7ZSGioNM92tOta5X9g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779211906; a=rsa-sha256; cv=none; b=WBV47jiiRykdOV9WSTR+/LdaWf7Uut0oafOqW+GYyF49fjv3oZ2rT+eAnM1EyYlcVYDOlt WOciZvl0Yz/azzb7hBDFolnHKFI1N/orHGl39epfgKFa4kS6/rfjpwTTLCoSM34b37z7w2 VXQZx4il3XHy60uE7ZVqZx/Bi7ShgxBlS8uxPax0oM4II8VzhrMnbSA8HTJ0JBOOiWhvHP dF+pcTY9kuO4ToMVBZziqbnI+EGnF44Ipl7vqmobwWh0lSlLvHcP/sMarhWOP9udRZawhz oCcQ+CmOnruYl+dULb3EyFgZwY2G1FMvJjo3cJpoY+eW6v9XNwub2QUzZ4TMCQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779211906; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Za5JL34DtEIJXb5yQhnLiJCnxA+yhNXorRM1MfI5kT8=; b=u27SJj3vOf7r09gNsKkjYeGGJ/44LxcKlHoOwVNq++DGOpVvrnRSIFEshPboYnFpwMm8BA zOZFyr9OFKexhtRksh5B+vCzmEYh8RRBQT0JIie7vQlPeqdFZqp2aUx96vhoxt/MY7+Nf0 PpIUslxGVi2QPhwjeFfw7H3fYGVaZKf5vuHfpprzwgw+eO3a/3Kj846xAtxfULc0aOx062 XOgbWEYKBd21xqkh7m5croew+sJ6OiqJNj5+kpcpP3CMagXpKZspMnnUCzhQoNCCAEcUMz JOxmflrAdwjqhQiCE006OkgAo6XKXSjlnuBw4WUDeMYNSlmuVBWwMGiRxem7Ig== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKhYY6cPJz8v6 for ; Tue, 19 May 2026 17:31:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 216b6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 17:31:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: 8de34a84224b - main - arm64/iommu: Add a missing close parenthesis List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8de34a84224b9a353bc0a9d6d3f95540b0e72707 Auto-Submitted: auto-generated Date: Tue, 19 May 2026 17:31:45 +0000 Message-Id: <6a0c9e81.216b6.23e17744@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=8de34a84224b9a353bc0a9d6d3f95540b0e72707 commit 8de34a84224b9a353bc0a9d6d3f95540b0e72707 Author: John Baldwin AuthorDate: 2026-05-19 17:30:01 +0000 Commit: John Baldwin CommitDate: 2026-05-19 17:30:01 +0000 arm64/iommu: Add a missing close parenthesis Fixes: 6dc813301a17 ("sys: Use is_pci_device instead of direct comparisons to devclasses") Sponsored by: Chelsio Communications --- sys/arm64/iommu/smmu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/arm64/iommu/smmu.c b/sys/arm64/iommu/smmu.c index 265f1e56f892..2d34b9177ed7 100644 --- a/sys/arm64/iommu/smmu.c +++ b/sys/arm64/iommu/smmu.c @@ -1861,7 +1861,7 @@ smmu_ctx_init(device_t dev, struct iommu_ctx *ioctx) smmu_init_ste(sc, domain->cd, ctx->sid, ctx->bypass); - if (is_pci_device((ctx->dev)) + if (is_pci_device((ctx->dev))) if (iommu_is_buswide_ctx(iodom->iommu, pci_get_bus(ctx->dev))) smmu_set_buswide(dev, domain, ctx); From nobody Tue May 19 18:17:16 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKjZ4721Nz6fZ2l; Tue, 19 May 2026 18:17:16 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKjZ43pMyz3Vgd; Tue, 19 May 2026 18:17:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779214636; h=from:from:reply-to:subject: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=cKJwafeYso5W7OCmSlNibcIYD/+M6EATzrf4teGHZus=; b=FEr7xD+ceqEHeaIoesVAGqanuI8LoiCDOQKLk5zn92898CFfxm+So5PfPH1s9zD/i3T+eo dYfEK76V0IjElOVuWKZwdru2z7ageaM+AV6G7VFiTN8ftZ2WJgjQVOBflNjBySKzhTfncB T7BdMJx/jWB1w/2Wy0kOcfm9r+VOLhzFJZBhiORomZ1Vi9c6e26rP/rA/H+LwlR9Oezvmk EIzQctLzDZDPYroGfSakbLEPuuWxRO0MmPRV8qMQocndgedKwQiyHtcncNTXFitUcqp4I+ CtBwd90TCMzTEW1nrVahYrwlVPTATzBsi9PCL6Y1vBoM5yS7Zbd4MFa15QnzHQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779214636; a=rsa-sha256; cv=none; b=fEimnA5OyfMJuPDR0Gh0VpfgFSJ1ZilWIayibMdEhXYlpMj+2GROFa9eAnOv5nOpib2+VD zszdmgEBiYcRUAWC3jcYfqiWnuOrj2Np1AZ2IAWf4ki1TU4J0c80jmlJQb6sWnu45namvu UnraIS9MMK0JKQmKFl//IP1dhskU9g3h+LqJOZ61pf7WMO3RRWrN3Y/5Fz5H9HDBxDcJKK 7OEsy10Wqb/peVT1myAqDob61t1bJZ2oxIlIj0bXCDjlwuRdWcsNL+L1tnvMyw1L7plqPA 5FRTmG5nz77YNSqfceaeCG4SkYxvrhyZYJ2KHdAB3ks/pEFokHTIfU+24UIN7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779214636; h=from:from:reply-to:subject: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=cKJwafeYso5W7OCmSlNibcIYD/+M6EATzrf4teGHZus=; b=BODZo7TIxnY9vx1NmkORDKUE00Yj5ZtESs534iBu4BhCyPDjyNK2VRFNNZ7VtrhcuvOD/q 32aKjsY4oRzYa5sw9f4ux2S2cF71CWSilZc5rZJqBa8AwPfrG/+iVvEyWbij/rv7o0X1wf HCzuYRYXbS1H/S/LgHFWUrWN9uYXpDWxCVi4052ADVBu0YHjkokIgAj/PnpSv9dqH3OCuN uNdoxjD+9/9DecCWMAwDUz2tw8vVgungoOv+R/uPfRYI6M9e7c7w55UYRcSm15/4qAhfXv D3usdrkvTsJBvsS+2JFwc3cT3HqvCzowc5yB2354/nUjPoItLC6OfeaO2WuzvQ== Received: from [IPV6:2601:5c0:4202:5670:a9b6:fdfa:b02f:7cfa] (unknown [IPv6:2601:5c0:4202:5670:a9b6:fdfa:b02f:7cfa]) (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 4gKjZ428s6zJjV; Tue, 19 May 2026 18:17:16 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <85eb3305-b58d-455c-9bc7-678c5ade6873@FreeBSD.org> Date: Tue, 19 May 2026 14:17:16 -0400 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 8de34a84224b - main - arm64/iommu: Add a missing close parenthesis Content-Language: en-US From: John Baldwin To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <6a0c9e81.216b6.23e17744@gitrepo.freebsd.org> In-Reply-To: <6a0c9e81.216b6.23e17744@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/19/26 13:31, John Baldwin wrote: > The branch main has been updated by jhb: > > URL: https://cgit.FreeBSD.org/src/commit/?id=8de34a84224b9a353bc0a9d6d3f95540b0e72707 > > commit 8de34a84224b9a353bc0a9d6d3f95540b0e72707 > Author: John Baldwin > AuthorDate: 2026-05-19 17:30:01 +0000 > Commit: John Baldwin > CommitDate: 2026-05-19 17:30:01 +0000 > > arm64/iommu: Add a missing close parenthesis > > Fixes: 6dc813301a17 ("sys: Use is_pci_device instead of direct comparisons to devclasses") > Sponsored by: Chelsio Communications > --- > sys/arm64/iommu/smmu.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/sys/arm64/iommu/smmu.c b/sys/arm64/iommu/smmu.c > index 265f1e56f892..2d34b9177ed7 100644 > --- a/sys/arm64/iommu/smmu.c > +++ b/sys/arm64/iommu/smmu.c > @@ -1861,7 +1861,7 @@ smmu_ctx_init(device_t dev, struct iommu_ctx *ioctx) > > smmu_init_ste(sc, domain->cd, ctx->sid, ctx->bypass); > > - if (is_pci_device((ctx->dev)) > + if (is_pci_device((ctx->dev))) > if (iommu_is_buswide_ctx(iodom->iommu, pci_get_bus(ctx->dev))) > smmu_set_buswide(dev, domain, ctx); Oof, I had tested this on x86, but not compiled it on other arches. :( I have a tinderbox running and will push any other fixes needed. -- John Baldwin From nobody Tue May 19 18:42:14 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKk6t75F0z6fcJP for ; Tue, 19 May 2026 18:42: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKk6t5jKNz3YQg for ; Tue, 19 May 2026 18:42:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779216134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J1s6L5HZ1Byapr3BeFoYMP9myswGR/U1E1X8mLal1kA=; b=osAbY6inXaaz5EpfwfcL9DPZg9KK5MQCUbOxqYcwNndjXHPW6B+LRBjgsKwXZpRiYUkTTY 13sQ1rWmJnPiSGT2/m0DgP4SUGbilvrfV1x/KpwOywEfnEj3H829boetW9kOzokLyweYT2 HNZQZRhD9C3PM62CDd3OXaAZV2n15nhoZwKVgzNn6XS0SY7mrV7QWIM5lcN2cldK0KTup8 do6LPYTEPJvfDHIZCZpcBOZkR2po6vVGY0NKhe623TZtePor2ffJuZ38vjmfh6JRTpregI EPxFVfr7YX2ym6RTc4TATs5OPPTXiApFHYE1Dgq2yAqVnt2a1lgYCwZuiW8n4A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779216134; a=rsa-sha256; cv=none; b=NgN2I1dGbWKUiLn6+pYoSey5t1zesBTajlUxXYlyPsrgVHK2d1IMNxzoP/U8rRCyz489aI 1BZdyDKgC6ew5GebGlEbWm3ivaNiMBCjUhNobQ12udxK3muT0Onmh3gDCVa/PU7PRQU96G S6fBo5Rn19RsIKLYZPZjac2MlgkHfeC+S0TKywVw2M4tjj4gw1/5YIxJrDur+PKzwU38Zj s/Ziq/GYG4D3GiG3UGR9gE0lKCvVXxPOfCOgMI9o1QJwZI2MPy+GKvolAvuTliCCWJipb2 JU90WPrkocpQ1LuxRDc/zOYuWxVCX5fm2cNrSyzEyTHtvJNIyl/e0ZPcYgrGZA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779216134; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=J1s6L5HZ1Byapr3BeFoYMP9myswGR/U1E1X8mLal1kA=; b=XR2yPowOb2RgyGddg/A4vwVwfhP6Ypo8EQE3uwEIuEbWEZ7ALqVsMhmdXsLIjcj3wQbUK8 BtiIBGwJZWAb+uhDnGrEJuDOe+kNqhCsnCvD/gE5YotKGfuxl4GaB+htVIcQn/h1/n/kCC MetE/nkhyxWMhK90QJTtlS2k2wtYvMAHX7Hc6rIPC2NyygFIP2PYXFYAJz16CgJVi5ouY8 7xCDBtv5k8TD0QlXl75Xmst2faiP2oEj9+VoHpfTJkHdNVMKdDipiFz0jN/ocpL6wesgnm aC3o7t9IbwUqcyrH8NdYVs2VYp6BXWDV4Y6kip2XRVlaiahswWxkil1c+Vlfxg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKk6t5C0GzC3r for ; Tue, 19 May 2026 18:42:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31794 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 18:42:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 296c174835cf - main - vnlru: avoid trigger calculation when force < 2 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 296c174835cf603b966e48b232715942df9b6934 Auto-Submitted: auto-generated Date: Tue, 19 May 2026 18:42:14 +0000 Message-Id: <6a0caf06.31794.5c579f0a@gitrepo.freebsd.org> The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=296c174835cf603b966e48b232715942df9b6934 commit 296c174835cf603b966e48b232715942df9b6934 Author: Ryan Libby AuthorDate: 2026-05-19 18:07:57 +0000 Commit: Ryan Libby CommitDate: 2026-05-19 18:07:57 +0000 vnlru: avoid trigger calculation when force < 2 Reviewed by: kib (previous version), olce Sponsored by: Dell Inc. Differential Revision: https://reviews.freebsd.org/D56950 --- sys/kern/vfs_subr.c | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 54e883038046..848d3ac767f3 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -1775,7 +1775,7 @@ SYSCTL_ULONG(_vfs_vnode_vnlru, OID_AUTO, uma_reclaim_calls, CTLFLAG_RD | CTLFLAG static void vnlru_proc(void) { - u_long rnumvnodes, rfreevnodes, target; + u_long rnumvnodes, target; unsigned long onumvnodes; int done, force, trigger, usevnodes; bool reclaim_nc_src, want_reread; @@ -1824,7 +1824,6 @@ vnlru_proc(void) vnlru_proc_sleep(); continue; } - rfreevnodes = vnlru_read_freevnodes(); onumvnodes = rnumvnodes; /* @@ -1833,14 +1832,7 @@ vnlru_proc(void) * The trigger point is to avoid recycling vnodes with lots * of resident pages. We aren't trying to free memory; we * are trying to recycle or at least free vnodes. - */ - if (rnumvnodes <= desiredvnodes) - usevnodes = rnumvnodes - rfreevnodes; - else - usevnodes = rnumvnodes; - if (usevnodes <= 0) - usevnodes = 1; - /* + * * The trigger value is chosen to give a conservatively * large value to ensure that it alone doesn't prevent * making progress. The value can easily be so large that @@ -1848,9 +1840,18 @@ vnlru_proc(void) * misconfigured cases, and this is necessary. Normally * it is about 8 to 100 (pages), which is quite large. */ - trigger = vm_cnt.v_page_count * 2 / usevnodes; - if (force < 2) + if (force < 2) { trigger = vsmalltrigger; + } else { + if (rnumvnodes <= desiredvnodes) + usevnodes = rnumvnodes - + vnlru_read_freevnodes(); + else + usevnodes = rnumvnodes; + if (usevnodes <= 0) + usevnodes = 1; + trigger = vm_cnt.v_page_count * 2 / usevnodes; + } reclaim_nc_src = force >= 3; target = rnumvnodes * (int64_t)gapvnodes / imax(desiredvnodes, 1); target = target / 10 + 1; From nobody Tue May 19 19:57:23 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKlnc23bWz6fhk1 for ; Tue, 19 May 2026 19:57: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKlnc0CnRz3gZ4 for ; Tue, 19 May 2026 19:57:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779220644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+SHGwmz1twpU/WgArtFaFNZDtxaQ2DYJFZAQI0lak9o=; b=wzgfuRm88dgjZGTlhAm/3TH3HRMGHdrOxVKU9JhoiK1m4B4OBlnY51dJc+/giTuBUmi2yX DqsMFuALuJPUsCUCSHH/KTbBcaj36mKnbzkFgvMgwGxlziMUn+ywNnwFkIMwmbPaQWG+1l OO6ajv/ZxbnOOUdGfVDN+ePMbNXOftzktQY2bgjdGbEVjaYKEZO+8GpDgQihBFlb9mlpH9 0hxzlflfxLO0I1WdBykTdY6ZxvtY2hlq0FFUYWn694PQMWyLhrag2kw6zaVcqZJ0GnilIO UDs/x484McadSfS2vBrPI2Zr/DKjPNcvWOl5JJi1QyKoViX7nVqjMo09sfbrMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779220644; a=rsa-sha256; cv=none; b=B5TrFj/XgHGpalXPjTMj/MAPXtLrdYINuQvR/zvOXi+uPnNcwkeyfKVRlXLi9k6KhJrOmY iWn1lvZcbPC1K9xB/Re3EUCbpLogBh3KC5tXCZXTque7X+k2Z0PpuLO+yErTPdAsW3fa+Z IVrv8ZgSb6I5PemCgympdA22aeue9Dw+WCUYo3EBnvjd7NR14Q+4uE4+JxzY/o+WMl0Vez +UbqLKzsozOh8sDp8psgD2Hm1TA1LgQWYlEOMShPDXsfimm2trcpepUfi9CLni5yMYp4FD 1Jg5BljOwwZXyIKJ9a74eRNpxxYNFRSdwpAjn57gRJVpJ8LRjbs/LUOrc6isbw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779220644; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=+SHGwmz1twpU/WgArtFaFNZDtxaQ2DYJFZAQI0lak9o=; b=gvyoyYWt8jqfQkfZyGYSQW/ZQOcx++CVNMIKp1Lu5NY0Fy3lD7KDIVXK5XamG1vFJ6c27D KIYdrY2DU0/rEVFhULwsHV8k9/9FjVWxfyp9yGCdZ7fyjAxjdfljnFZlC55KeX5kpigPO6 gjUUdebOKh13AGoFDbroZqiCvWpg0jDOSANxE5ouTyFGKCMU0Qa2bsjZlCeNAzbJytZlWQ 33OIMAe2EM59xIKqW2NhR4WqRE43AKLojRu3iOWeI6EK/wOuk4Vvtmbtl6gSkMhJOa8r8M Ddj+PRbrXqBmS7IKPtBbLL3oCZbuy9xQQ98l+8J5eOAp557U7dQIQEDbMYylxA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKlnb6scfzTcl for ; Tue, 19 May 2026 19:57:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3973e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 19:57:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: d84a691a3590 - main - powerpc: Remove stale include line from MPC85XX List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d84a691a3590c85a4068dd23644efa478c368a03 Auto-Submitted: auto-generated Date: Tue, 19 May 2026 19:57:23 +0000 Message-Id: <6a0cc0a3.3973e.25c60e4a@gitrepo.freebsd.org> The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=d84a691a3590c85a4068dd23644efa478c368a03 commit d84a691a3590c85a4068dd23644efa478c368a03 Author: John Baldwin AuthorDate: 2026-05-19 19:53:46 +0000 Commit: John Baldwin CommitDate: 2026-05-19 19:53:46 +0000 powerpc: Remove stale include line from MPC85XX The stale include line caused config -m to fail with an error trying to parse the config file during make universe/tinderbox which in turn caused universe/tinderbox to abort without building any powerpc kernels (or subsequent architectures such as riscv64) with the error: make[2]: freebsd/main/Makefile:767: Target architecture for powerpc/conf/MPC85XX unknown. config(8) likely too old. in .for loop from freebsd/main/Makefile:761 with kernel = MPC85XX in make[2] in directory "freebsd/main" make[2]: stopped making "universe_kernels" in freebsd/main *** Error code 1 Reported by: npn, many others Fixes: fd8d34ce272b ("dpaa: Migrate from NCSW base to a home-grown driver") --- sys/powerpc/conf/MPC85XX | 1 - 1 file changed, 1 deletion(-) diff --git a/sys/powerpc/conf/MPC85XX b/sys/powerpc/conf/MPC85XX index c74819c7fee0..521ec21c3234 100644 --- a/sys/powerpc/conf/MPC85XX +++ b/sys/powerpc/conf/MPC85XX @@ -9,7 +9,6 @@ ident MPC85XX machine powerpc powerpc -include "dpaa/config.dpaa" makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols makeoptions WITH_CTF=1 From nobody Tue May 19 20:07:32 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKm1L5dpbz6fjjg; Tue, 19 May 2026 20:07:34 +0000 (UTC) (envelope-from jhibbits@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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKm1L49JTz3hbh; Tue, 19 May 2026 20:07:34 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779221254; 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=jrk2q09Q/v53+Jouifh9R7GbRv6PpMkMjY1lIPo/DAY=; b=WJESwKCF93jOPleWCQ5mq0bkwlcV/31ZVXTqtJJaFWH5iASmhVCsk+5ykcBtJmDPnWbupK QPw9idvT5UEP2pXQtVwceLNE7OB63dmQyYGeCSO5DvRehPPR3Fu0Vt8DtiVOmYJvmOiszw Ob0rsrHbyiWvPQKTmHxKibSXzM8ldDC4wWPA50+qqzEa8V3naSy6bGIb5UkIw8OD2igzXH Hlxo8oLsbw7DR6Flm2mtfBoAUZJ6QfG/U8wEnNBzIt41RDoa0iAqNm6K7mZO5NqLDYWwZz hyV6gMDQ9HKM3eqJIH6tEHyUYQkeCDyx7K2f0e/sLzFq/YoI2TFU523UpqV/Gw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779221254; a=rsa-sha256; cv=none; b=b9BobohOxMo+Ff16oVV71+Fwi7yoceme/vfz541bE31+UnUZrfMcp4REtDFAkMgnVcv+wx TIgVfA87Em9Dy19UyNdkNF1lGRqfVjaXShgHKBRGQWkiWqVZbXUK0djhwwOKNaubjImCQY KjxGYcwdMQvdOduloLkAbbQaPR9d0BKLR8lAkVvnrH+vEO0s7gHLGS1v90nGuxDryxowKA n9ioXzrobyC9HdppWQOI/uxtyTjy+qMF6WvfIV5f2DGlhOa+EYy5D4JVQSLdHeTcF05Kkm oOtFTwSa9wgy1QtnL2OyqSMHajy3PghY0hNI/Ejgs4dnEGCh7BD6IfLlh5Uh0w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779221254; 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=jrk2q09Q/v53+Jouifh9R7GbRv6PpMkMjY1lIPo/DAY=; b=ftkSPPJHUs1n55bqmonK9ofbz0EiAKNc1QCS7436Hs1Z1NCW8ZEmIhU3LiSw6+bUUUhIRW C4dGq/S8mDth0P8yVvgT4+CCDo/wLPz/J0Sgkd8pFgIeequtqs6yhNAIuCds7v1gyAdIP6 +eEqbS1D+7pGvI99Qd0lZxGpfZv1uSs+8uQhYGkKwA9H1s5zRFv9IEn+liX8JftcHA1yS1 SV/yOWOmNxM9Zs89RWU7VWcn4DOIZjoJ0WpQP2dfCYbGF+phTUGfdOTwcO8SUrNHJxgU0Q DiY2z0nCF93ahkhf16wHB2cPAdEABg7hrCFe3eNbBazOjOPTA2ssVNcbz3gj+w== Received: from ralga.knownspace (unknown [IPv6:2600:2b00:a720:d301:9f03:382a:d672:81f0]) (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) (Client did not present a certificate) (Authenticated sender: jhibbits) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gKm1L2HfnzLwJ; Tue, 19 May 2026 20:07:34 +0000 (UTC) (envelope-from jhibbits@FreeBSD.org) Date: Tue, 19 May 2026 16:07:32 -0400 From: Justin Hibbits To: John Baldwin Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: d84a691a3590 - main - powerpc: Remove stale include line from MPC85XX Message-ID: <20260519160732.28ba3171@ralga.knownspace> In-Reply-To: <6a0cc0a3.3973e.25c60e4a@gitrepo.freebsd.org> References: <6a0cc0a3.3973e.25c60e4a@gitrepo.freebsd.org> X-Mailer: Claws Mail 4.3.1 (GTK 3.24.51; powerpc64le-unknown-linux-gnu) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Tue, 19 May 2026 19:57:23 +0000 John Baldwin wrote: > The branch main has been updated by jhb: > > URL: > https://cgit.FreeBSD.org/src/commit/?id=d84a691a3590c85a4068dd23644efa478c368a03 > > commit d84a691a3590c85a4068dd23644efa478c368a03 > Author: John Baldwin > AuthorDate: 2026-05-19 19:53:46 +0000 > Commit: John Baldwin > CommitDate: 2026-05-19 19:53:46 +0000 > > powerpc: Remove stale include line from MPC85XX > > The stale include line caused config -m to fail with an error > trying to parse the config file during make universe/tinderbox which > in turn caused universe/tinderbox to abort without building any > powerpc kernels (or subsequent architectures such as riscv64) with > the error: > make[2]: freebsd/main/Makefile:767: Target architecture for > powerpc/conf/MPC85XX unknown. config(8) likely too old. in .for loop > from freebsd/main/Makefile:761 with kernel = MPC85XX in make[2] in > directory "freebsd/main" > make[2]: stopped making "universe_kernels" in freebsd/main > *** Error code 1 > > Reported by: npn, many others > Fixes: fd8d34ce272b ("dpaa: Migrate from NCSW base to a > home-grown driver") --- > sys/powerpc/conf/MPC85XX | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/sys/powerpc/conf/MPC85XX b/sys/powerpc/conf/MPC85XX > index c74819c7fee0..521ec21c3234 100644 > --- a/sys/powerpc/conf/MPC85XX > +++ b/sys/powerpc/conf/MPC85XX > @@ -9,7 +9,6 @@ ident MPC85XX > > machine powerpc powerpc > > -include "dpaa/config.dpaa" > makeoptions DEBUG=-g #Build kernel with gdb(1) > debug symbols makeoptions WITH_CTF=1 > > Oops, sorry! I thought I'd get an email if the build fails, but I guess the CI build only does 64-bit kernels? - Justin From nobody Tue May 19 23:54:20 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKs311FcVz6dm16 for ; Tue, 19 May 2026 23:54: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKs310S0Nz4B6B for ; Tue, 19 May 2026 23:54:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779234861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TtWk7ri5GdehX2YiczubGfYGoUwzJ5sDSiOWPYhi8WI=; b=tQEYYjcmkOKCZaoI6tzoKyNr7qxP56i4KnbK0la+tCpqUI09y7svEd2L//xtF7VR0BFils 3usOSk/dxHvD0PPPTS43UB1C/ij3bGIrXB8A6gIbEFlmJQIPjeQZThmtVgFKXGjj+YX6/V iMncjdStFyINhS+ylxXL4LbLAb5t+vsNyZgIDiAtkBGz3AGnVla+saFp/r/by5BzuJSCke gQbCBgH/XotoR00FEdVw16vpcCPJ7+PIMT4T6bOUiDfbsomkEWl0VSxCkpJDvg/lhNXE4x RH4GP6kbzv5HS66FRNTbfXPDZRH6Y6DDlg1eUVH1D+2xwStUOnkt7pA2LLY+xQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779234861; a=rsa-sha256; cv=none; b=U1LWilg5SwfGjXZS3gXCqYfdqqao6GPNUBrXu0H2htfbvm5KBCoUV0qjqj3gXNt4ZsU+NY o68ALi3LtqqBhZcXhgFd61E8H2GozZ5FEwd3827fJWaqqfihSINX9w78UIDG4hfsPD1p3x PdI4RcnP711IP4uOZQ+VN6FtwVVz5U/bk7CDB/GI+RgXZT13wJf3aikCPzTAt4Zw5wQYXr 9M/0I9Hfj359nLA/4MK+Dv7TkMKKNRxpo7PmxlpCOGxG2pP8VEyFFohhop0p37DyNirnQ5 jjeMLNIKbn/R0mStNRvtu8RcP1DioprauIfnbdo2tl37rHP1lEOJ4P6I/ogZ2Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779234861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=TtWk7ri5GdehX2YiczubGfYGoUwzJ5sDSiOWPYhi8WI=; b=mq+OpjdzS6A9gl28ilad8uuUH54uG5DVLUo/y8MHMbOpijNSAS8YAnrjTyxkrJSiiViPtp Zul1Bm4InQ+Kq+3gDndl5IaPfkpVPXt5dLC7aCHgghlZFDI9M1/j8afJGjiBzfPJeNI7Sf xiVpgPjxzcjyhh5nwcv/+uihGawmzupnnfPngdMSe6HqLoa6PTSSuwC/PfdF1tJcBvAMOb 1a13HVPh0Jl+JBcC7kL35BQnrAdLI7LwS8M1Ds4RtUJKQ1siWfmcwubvmI2w1BQDfvN45i /6ABGdOxVwPNLjlA7Fd+XLIcAjDPhcYyqUYigi9BJPE7UoPHsSK0TNvvqNcYLA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKs306KCVzdM0 for ; Tue, 19 May 2026 23:54:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22ade by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Tue, 19 May 2026 23:54:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 3c07cfb25283 - main - elfdump: Decode SHT_LLVM_ADDRSIG section header type List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 3c07cfb25283d93f03cdac51158289853d0e17a8 Auto-Submitted: auto-generated Date: Tue, 19 May 2026 23:54:20 +0000 Message-Id: <6a0cf82c.22ade.3ddf48f2@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=3c07cfb25283d93f03cdac51158289853d0e17a8 commit 3c07cfb25283d93f03cdac51158289853d0e17a8 Author: Ed Maste AuthorDate: 2026-05-18 15:43:41 +0000 Commit: Ed Maste CommitDate: 2026-05-19 23:54:07 +0000 elfdump: Decode SHT_LLVM_ADDRSIG section header type Reported by: bz Sponsored by: The FreeBSD Foundation --- usr.bin/elfdump/elfdump.c | 1 + 1 file changed, 1 insertion(+) diff --git a/usr.bin/elfdump/elfdump.c b/usr.bin/elfdump/elfdump.c index 49704cde1b08..3bca46c26cf3 100644 --- a/usr.bin/elfdump/elfdump.c +++ b/usr.bin/elfdump/elfdump.c @@ -354,6 +354,7 @@ sh_types(uint64_t machine, uint64_t sht) { } else if (sht < 0x70000000) { /* 0x60000000-0x6fffffff operating system-specific semantics */ switch (sht) { + case SHT_LLVM_ADDRSIG: return "SHT_LLVM_ADDRSIG"; case 0x6ffffff0: return "XXX:VERSYM"; case SHT_SUNW_dof: return "SHT_SUNW_dof"; case SHT_GNU_HASH: return "SHT_GNU_HASH"; From nobody Wed May 20 02:23:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKwMG4NLxz6dxZW for ; Wed, 20 May 2026 02:23: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKwMG3hQqz3HMk for ; Wed, 20 May 2026 02:23:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779243818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MqVIj96JoV/gbAGCOP7lB5aRGDOJh0+7FMF9oGeqTm0=; b=imfo5r3Nc5LJgTn8MFJOnVHA2+64HS+EteYif+OWC0Mmwn1h4o9n/sq+T3kp3dDMGEQ7fb bK5SyJkAp3FDElqzC3ujz4MM6CvZRhi6iG7RsoUjJ5qFoPlI61kPEVbKqxSLkewuXoVGKh 6i3LTx5B6DgfT3nEdOuaidXDensH/Cloyi6fh8ERYLxUrS/kHBU8OB29vS8Y942G1+QZKE 5h/noWdLr9Zny3NYC8YeNZ8uh0aMTnqW267MFRGueEUES3LxyoLBcqeGnVaeb6Py4vLdKR E00K1XtH1xM/IcBxFQf8w4VbfEiNtxoivV78cFXQSDb5Jui37RXDkHxJk7jC4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779243818; a=rsa-sha256; cv=none; b=Urv6grYQp3QMl3kS/S9H/lNUd7QGX/cNcdfsjTFs+lyExGz4xqNzpH/zDkiDe6YklU8WqW mpFZfX1QzK8YihM3+SX9LeJZ7Y81+SkTb9gGpdk1Siq+x2mHguxQFLszrO1WSB6WnYdEEG roMZKf5YHW45hUGmsjR7IatL5dythZUnys5uaPoA3yhPGoEJC5ASwDqxy5yb5sYyfXQPyI LibVG7IaCnCA4SsM2X3SKn10fQE/Tk4W/o865ox4La58cOhlzFD3KmhSJdlpm59rrnjOPk UMogkU8h83VIOs/wwBmaMKZk5AdjOmWR5NJ4fh6oIruRcldT9tzImvmguiiDvw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779243818; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MqVIj96JoV/gbAGCOP7lB5aRGDOJh0+7FMF9oGeqTm0=; b=lECJorVvu42UgtnM6Zw/2syLAqbVi2w2AwtHP4Fa6KGR4xPIwWqZZFUaiORPT/YaNGH3RP qOJ72GGCnMD4FWn94r2Ppx3Lm0CEoSeYLqSLHGRQXl5qm8yB50B6anXewLqn1QJogn5AzG y0FXI8zBpZg2L/jduum+65BK77mlfiZ4mZMNwhvcmoL6btUp6MEHsLsIuZr5az4MKS4dAH WKQ+55xNac2Hx/k2YsYVciVJSJZufFqrQ1uA7jri2mKpSUwip4NExSIkiArrm4rivn2KHr jJcjJ0btUa7yluVC64NGIW9QT4BI5GOmnxPVSd5ZR7iJFMtcbRuUFh+GBdvyfQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKwMG373bzj2d for ; Wed, 20 May 2026 02:23:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a60d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 02:23:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: cd3cc6e910c0 - main - i2c/sensors: Add driver for W83793 hardware monitor List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cd3cc6e910c0f739925c57e42fae6781d693db02 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 02:23:38 +0000 Message-Id: <6a0d1b2a.3a60d.287b9f55@gitrepo.freebsd.org> The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=cd3cc6e910c0f739925c57e42fae6781d693db02 commit cd3cc6e910c0f739925c57e42fae6781d693db02 Author: Justin Hibbits AuthorDate: 2026-05-20 02:04:30 +0000 Commit: Justin Hibbits CommitDate: 2026-05-20 02:05:00 +0000 i2c/sensors: Add driver for W83793 hardware monitor The Winbond/Nuvoton W83793G system monitor chip includes many features not currently supported by this driver. The following are currently supported: * Up to 6 temperature sensors, 4 of which have 10-bit resolution (8.2),two with 8-bit resolution (no decimal component) * Up to 12 fans - Fans 0-4 (1-5 on the datasheet) are always enabled. The remaining 7 fans are individually enabled. * Multiple voltage sensors, reading up to 10 voltage sources. Sysctls are labeled to match the datasheet. * Chassis open detection. The W83793AG is a feature-reduced version, which lacks 3 thermal diodes and 2 voltage monitors. Since there is no way to tell the difference between the W83793AG and W83793G programmatically, sensors reported on the W83793AG will report strange values. Temperature sensors and 7 of the fans can be individually enabled on the chip, but currently not configured by this driver. The driver only reports what was configured by the firmware. Additionally, this driver numbers the sensors and fans according to the datasheet, so even if, for instance, fan 8 is disabled, it would skip from fan 7 to fan 9, it does not renumber. This makes it easier to follow for hardware debugging purposes. Missing features: * Smart Fan support * Fan PWM control * ASF (Alert Standard Format) Only Bank 0 registers are used at this time. Reviewed by: adrian Differential Revision: https://reviews.freebsd.org/D56776 --- sys/conf/files | 1 + sys/dev/iicbus/sensor/w83793g.c | 366 +++++++++++++++++++++++++++++++++++++++ sys/modules/i2c/Makefile | 3 +- sys/modules/i2c/w83793g/Makefile | 14 ++ 4 files changed, 383 insertions(+), 1 deletion(-) diff --git a/sys/conf/files b/sys/conf/files index 6804c9c81c69..fac94252a362 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -1866,6 +1866,7 @@ dev/iicbus/rtc/s35390a.c optional s35390a dev/iicbus/sensor/htu21.c optional htu21 dev/iicbus/sensor/lm75.c optional lm75 dev/iicbus/sensor/max44009.c optional max44009 +dev/iicbus/sensor/w83793g.c optional w83793g dev/iicbus/gpio/pcf8574.c optional pcf8574 dev/iicbus/gpio/tca64xx.c optional tca64xx fdt gpio dev/iicbus/pmic/fan53555.c optional fan53555 fdt | tcs4525 fdt diff --git a/sys/dev/iicbus/sensor/w83793g.c b/sys/dev/iicbus/sensor/w83793g.c new file mode 100644 index 000000000000..772384aa57a0 --- /dev/null +++ b/sys/dev/iicbus/sensor/w83793g.c @@ -0,0 +1,366 @@ +/* + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 Justin Hibbits + */ + +#include +#include +#include +#include +#include + +#include +#include + +#include +#include + +/* + * Driver for the Winbond W83793G hardware monitor. + * + * The hardware monitor supports the following sensors: + * - 6 temperature sensors + * - 4 with 1/4 integer precision + * - 2 with integer precision + * - 11 voltage sensors + * - 12 fan sensors + * - FanIn 6-12 are on multifunction pins, so may not be enabled. + * 8 DC/PWM fan outputs for fan speed control + * - Case open detection + */ + +#define WB_TD_BASE 0x1c +#define WB_TLOW 0x22 + +#define WB_VCORE_A 0x10 +#define WB_VCORE_B 0x11 +#define WB_VTT 0x12 +#define WB_VSEN1 0x14 +#define WB_VSEN2 0x15 +#define WB_VSEN3 0x16 +#define WB_VSEN4 0x17 +#define WB_5VDD 0x18 +#define WB_5VSB 0x19 +#define WB_VBAT 0x1a +#define WB_VLOW 0x1b +#define WB_FAN_BASE 0x23 + +#define INT_STS1 0x41 +#define INT_STS2 0x42 +#define INT_STS3 0x43 +#define INT_STS4 0x44 +#define CHASSIS 0x40 +#define INT_STS5 0x45 +#define INT_MASK1 0x46 +#define INT_MASK2 0x47 +#define INT_MASK3 0x48 +#define INT_MASK4 0x49 +#define CLR_CHS 0x80 +#define INT_MASK5 0x4a + +#define WB_MFC 0x58 /* Multi-function pin control */ +#define MFC_VIDBSEL 0x80 +#define MFC_SIB_SEL 0x40 +#define MFC_SID_SEL_M 0x30 +#define MFC_SID_VID 0x00 +#define MFC_SID_FANIN 0x20 +#define MFC_SIC_SEL_M 0x0c +#define MFC_SIC_VID 0x00 +#define MFC_SIC_FANIN 0x08 +#define MFC_SIA_SEL 0x02 +#define MFC_FAN8SEL 0x01 +#define WB_FANIN_CTRL 0x5c +#define FANIN_EN_12 0x40 +#define FANIN_EN_11 0x20 +#define FANIN_EN_10 0x10 +#define FANIN_EN_9 0x08 +#define FANIN_EN_8 0x04 +#define FANIN_EN_7 0x02 +#define FANIN_EN_6 0x01 +#define WB_FANIN_SEL 0x5d +#define WB_TD_MD 0x5e /* TD mode select register */ +#define TD_MD_M(n) (0x3 << ((n) * 2)) +#define TD_MD_S(n) ((n) * 2) +#define TD_STOP_M 0x0 +#define TD_INT_MD 0x1 +#define TD_EXT_MD 0x2 +#define WB_TR_MD 0x5f +#define TR2_MD 0x2 +#define TR1_MD 0x1 + +#define WB_TEMP_COUNT 6 /* Total temperature sensors */ +#define WB_TD_COUNT 4 /* Temp sensors with "low" part */ +#define WB_TR_COUNT 2 +#define WB_FAN_COUNT 12 +#define WB_FAN_ALWAYS_ON 5 /* First 5 are not controlled */ +#define WB_V_COUNT 11 + +static const struct wb_vsens { + const char *name; + int reg; + int scale; /* Scale in millivolts */ + int add; /* Scale in millivolts */ + int left_low; /* left bit in VLOW, if applicable */ +} voltages[] = { + { "v_core_a", WB_VCORE_A, 2, 0, 1 }, + { "v_core_b", WB_VCORE_B, 2, 0, 3 }, + { "v_tt", WB_VTT, 2, 0, 5 }, + { "v_sen_1", WB_VSEN1, 16 }, + { "v_sen_2", WB_VSEN2, 16 }, + { "v_sen_3", WB_VSEN3, 16 }, + { "v_sen_4", WB_VSEN4, 8 }, + { "5v", WB_5VDD, 24, 150 }, + { "5v_sb", WB_5VSB, 24, 150 }, + { "v_bat", WB_VBAT, 16 } +}; + +struct w83793g_softc { + device_t sc_dev; + +}; + +static device_probe_t w83793g_probe; +static device_attach_t w83793g_attach; +static device_detach_t w83793g_detach; +static int w83793g_temp_sysctl(SYSCTL_HANDLER_ARGS); +static int w83793g_fan_sysctl(SYSCTL_HANDLER_ARGS); +static int w83793g_voltage_sysctl(SYSCTL_HANDLER_ARGS); +static int w83793g_case_sysctl(SYSCTL_HANDLER_ARGS); + +static device_method_t w83793g_methods[] = { + DEVMETHOD(device_probe, w83793g_probe), + DEVMETHOD(device_attach, w83793g_attach), + DEVMETHOD(device_detach, w83793g_detach), + + DEVMETHOD_END +}; + +static struct ofw_compat_data compat[] = { + { "winbond,w83793", 1 }, + { NULL, 0 } +}; + +DEFINE_CLASS_0(w83793g, w83793g_driver, w83793g_methods, + sizeof(struct w83793g_softc)); +DRIVER_MODULE(w83793g, iicbus, w83793g_driver, NULL, NULL); +MODULE_VERSION(w83793g, 1); +MODULE_DEPEND(w83793g, iicbus, IICBUS_MINVER, IICBUS_PREFVER, IICBUS_MAXVER); +IICBUS_FDT_PNP_INFO(compat); + +static int +w83793g_readreg(device_t dev, int reg, uint8_t *output) +{ + return (iicdev_readfrom(dev, reg, output, sizeof(*output), IIC_WAIT)); +} + +static int +w83793g_writereg(device_t dev, int reg, uint8_t *output) +{ + return (iicdev_writeto(dev, reg, output, sizeof(*output), IIC_WAIT)); +} + +static bool +temp_enabled(struct w83793g_softc *sc, int sensor) +{ + uint8_t reg; + int error; + + if (sensor < WB_TD_COUNT) { + error = w83793g_readreg(sc->sc_dev, WB_TD_MD, ®); + if (error != 0) + return (false); + return ((reg & TD_MD_M(sensor)) != 0); + } else { + error = w83793g_readreg(sc->sc_dev, WB_TR_MD, ®); + sensor -= WB_TD_COUNT; + if (error != 0) + return (false); + return ((reg & (1 << sensor)) != 0); + } +} + +static bool +fan_enabled(struct w83793g_softc *sc, int fan) +{ + int error; + uint8_t fanin_ctl; + + if (fan < WB_FAN_ALWAYS_ON) + return (true); + + error = w83793g_readreg(sc->sc_dev, WB_FANIN_CTRL, &fanin_ctl); + if (error != 0) + return (false); + + fan -= WB_FAN_ALWAYS_ON; + + return ((fanin_ctl & (1 << fan)) != 0); +} + +static int +w83793g_probe(device_t dev) +{ + if (ofw_bus_search_compatible(dev, compat)->ocd_data == 0) + return (ENXIO); + + device_set_desc(dev, "Winbond W83793 Hardware Monitor"); + + return (BUS_PROBE_DEFAULT); +} + +static int +w83793g_attach(device_t dev) +{ + struct w83793g_softc *sc = device_get_softc(dev); + struct sysctl_oid *root = device_get_sysctl_tree(dev); + struct sysctl_ctx_list *ctx = device_get_sysctl_ctx(dev); + struct sysctl_oid *node; + int i; + + sc->sc_dev = dev; + node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(root), OID_AUTO, "voltages", + CTLFLAG_RD, NULL, NULL); + for (i = 0; i < nitems(voltages); i++) { + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(node), OID_AUTO, + voltages[i].name, CTLTYPE_INT | CTLFLAG_RD, sc, + i, w83793g_voltage_sysctl, "I", + "voltage (millivolts)"); + } + node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(root), OID_AUTO, "temp", + CTLFLAG_RD, NULL, NULL); + for (i = 0; i < WB_TEMP_COUNT; i++) { + /* Only supports single-digit sensors. */ + char name[sizeof("sensor_") + 1]; + + if (!temp_enabled(sc, i)) + continue; + snprintf(name, sizeof(name), "sensor_%d", i); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(node), OID_AUTO, name, + CTLTYPE_INT | CTLFLAG_RD, sc, WB_TD_BASE + i, + w83793g_temp_sysctl, "IK2", NULL); + } + node = SYSCTL_ADD_NODE(ctx, SYSCTL_CHILDREN(root), OID_AUTO, "fans", + CTLFLAG_RD, NULL, NULL); + for (i = 0; i < WB_FAN_COUNT; i++) { + /* Supports up to 12 fans */ + char name[sizeof("fan_") + 2]; + + if (!fan_enabled(sc, i)) + continue; + snprintf(name, sizeof(name), "fan_%d", i); + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(node), OID_AUTO, name, + CTLTYPE_INT | CTLFLAG_RD, sc, WB_FAN_BASE + i, + w83793g_fan_sysctl, "I", NULL); + } + SYSCTL_ADD_PROC(ctx, SYSCTL_CHILDREN(root), OID_AUTO, "chassis_open", + CTLTYPE_U8 | CTLFLAG_RD, sc, 0, w83793g_case_sysctl, "CU", + "report if the chassis_open was latched"); + return (0); +} + +static int +w83793g_detach(device_t dev) +{ + return (ENXIO); +} + +static int +w83793g_temp_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct w83793g_softc *sc = arg1; + int reg = arg2; + int temp; + int error; + int8_t t_reg; + uint8_t t_low; + + error = w83793g_readreg(sc->sc_dev, reg, &t_reg); + if (error != 0) + return (error); + + if (reg < WB_TD_BASE + WB_TD_COUNT) { + error = w83793g_readreg(sc->sc_dev, WB_TLOW, &t_low); + if (error != 0) + return (error); + } else + t_low = 0; + + temp = (int)t_reg * 100; + temp += (t_low >> (2 * (reg - WB_TD_BASE)) & 0x3) * 25; + temp += 27315; /* Convert celsius to kelvin */ + + error = sysctl_handle_int(oidp, &temp, 0, req); + + return (error); +} + +static int +w83793g_fan_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct w83793g_softc *sc = arg1; + int reg = arg2; + int count; + int error; + uint8_t reg_vals[2]; /* Fan count is 2 bytes */ + + error = iicdev_readfrom(sc->sc_dev, reg, reg_vals, sizeof(reg_vals), + IIC_WAIT); + if (error != 0) + return (error); + + count = ((int)reg_vals[0] << 8) | reg_vals[1]; + error = sysctl_handle_int(oidp, &count, 0, req); + + return (error); +} + +static int +w83793g_voltage_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct w83793g_softc *sc = arg1; + const struct wb_vsens *sensor; + int index = arg2; + int volts; + int error; + uint8_t v_reg; + uint8_t v_low; + + sensor = &voltages[index]; + error = w83793g_readreg(sc->sc_dev, sensor->reg, &v_reg); + if (error != 0) + return (error); + + volts = v_reg; + if (sensor->left_low != 0) { + volts <<= 2; + error = w83793g_readreg(sc->sc_dev, WB_VLOW, &v_low); + if (error != 0) + return (error); + volts |= (v_low >> (sensor->left_low - 1) & 0x3); + } + + volts *= sensor->scale; + volts += sensor->add; + + error = sysctl_handle_int(oidp, &volts, 0, req); + + return (error); +} + +static int +w83793g_case_sysctl(SYSCTL_HANDLER_ARGS) +{ + struct w83793g_softc *sc = arg1; + int error; + uint8_t reg; + bool chassis; + + error = w83793g_readreg(sc->sc_dev, INT_STS4, ®); + if (error != 0) + return (error); + + chassis = ((reg & CHASSIS) != 0); + + return (sysctl_handle_bool(oidp, &chassis, 0, req)); +} diff --git a/sys/modules/i2c/Makefile b/sys/modules/i2c/Makefile index ff4536694dfc..64b22db3319d 100644 --- a/sys/modules/i2c/Makefile +++ b/sys/modules/i2c/Makefile @@ -32,7 +32,8 @@ SUBDIR += hym8563 \ rv3032 \ rx8803 \ tca64xx \ - tmp461 + tmp461 \ + w83793g .endif .if ${MACHINE_CPUARCH} == "aarch64" || ${MACHINE_CPUARCH} == "amd64" || \ diff --git a/sys/modules/i2c/w83793g/Makefile b/sys/modules/i2c/w83793g/Makefile new file mode 100644 index 000000000000..d4329b00d30a --- /dev/null +++ b/sys/modules/i2c/w83793g/Makefile @@ -0,0 +1,14 @@ +.PATH: ${SRCTOP}/sys/dev/iicbus/sensor/ +KMOD = w83793g +SRCS = w83793g.c + +# Generated files... +SRCS+= \ + bus_if.h \ + clock_if.h \ + device_if.h \ + iicbus_if.h \ + opt_platform.h \ + ofw_bus_if.h \ + +.include From nobody Wed May 20 02:23:39 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gKwMH68Llz6dy0N for ; Wed, 20 May 2026 02:23: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gKwMH4WFyz3H7V for ; Wed, 20 May 2026 02:23:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779243819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SZk0MwXsK1aE0kgnlgSa4CfhKsX+5gKnoAbPKZ6dTGo=; b=PBUYKpGWH9m2Egv8hVCrhtT2HL1RQ8/LmDhNV7da9ZHV2mPL8ca22Y2mK8CG7lv31U8gFx rjaJLy7DgNddVOAgXMYzo9J778nSDSgYbLSl9/MNpQjU9VrnaaNXW4021WfJHkcoheDEzD e2vmRcjQnIBI2O7/jH2tePiWCFae9Ejjrb5AGPBkiK6GKZ3ZKLtVMMy49pz1npaCyrpo5j TLNvEldTftlH5wDcMLQkP6Itbx3SaqJlUBgTx2cRqFPEDZY9TpSB2cgTsIGWj+XUR19Dzj rmud7LHhuyn2A6vKBBmsYSFfI4IiPOBRUB7y/AEXOH/uL9qoElErMmIfy5Tc4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779243819; a=rsa-sha256; cv=none; b=IADUW8L+n9Kz3cVMQjuFRmCaCElGdwz8OjQJ9jA+j1WUo5+jRyFWhoYhBITxfY5M2sf/vP pH1uumZwBpBp9A8WDZ/CMeHlMFkAPmpB44zv/P4+StEDE7Nn6iJiZny9uoZN2XrFWPbJnl E22r/hu/CL+8mo+WCzl3xmkcSfJMhJ1VylRs/SWD3W8Iy7uHa0MBcOfxRE8b/GZqZCH7VN FDfkfGK8iBYPVt64BTKULs9Vt3W1gKHm//ozbuxiqtWVdr0ehlD2KIiDT8x/P+OShxVEG3 JctbwY5RQEI2t7oLGlV7cnFxEPK9JGYkZGZt78jLKfGZcrJXWJSmqEJvwuWYww== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779243819; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=SZk0MwXsK1aE0kgnlgSa4CfhKsX+5gKnoAbPKZ6dTGo=; b=wX2yIUmN2OvTlARhQVIiMcPEwCvpq9ZSyYZNG+vcyDMYQIbjR6DWCTt2S0xVbrLjl6/bU7 mkc35uiYhU85n7qCOz+29dYRbPAu5kBk/1chxqDNLSziuRYe4zOvAzfumi9lhM6NuFqLn5 ymgYWaZE9MM9JaRBkKTfv9ijXpSYEvjjdo1JKWj+XYn7czZ37uuBPeka02sb1tWmxHWV9X 4TcGg031ErppwAsWqZrbP13jwWqCIFmFtnGC7xviWbNyy+WX7VKvx3YXNXzlDxzwSXCC1/ 4FaSzD24V9FaxlF0yq0SfRzeyWR3N5QZMpuL+qeOceZ1wirfmyM7wZPa+9NDmg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gKwMH40P0zj2f for ; Wed, 20 May 2026 02:23:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b481 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 02:23:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Justin Hibbits Subject: git: 31855427d934 - main - dpaa: Restore Semihalf license header List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhibbits X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31855427d93425a699ff9f53cb5eaf2f4e1be200 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 02:23:39 +0000 Message-Id: <6a0d1b2b.3b481.150abbaa@gitrepo.freebsd.org> The branch main has been updated by jhibbits: URL: https://cgit.FreeBSD.org/src/commit/?id=31855427d93425a699ff9f53cb5eaf2f4e1be200 commit 31855427d93425a699ff9f53cb5eaf2f4e1be200 Author: Justin Hibbits AuthorDate: 2026-05-08 19:02:18 +0000 Commit: Justin Hibbits CommitDate: 2026-05-20 02:21:55 +0000 dpaa: Restore Semihalf license header This is a "new" file, but is mostly copied from if_dtsec_fdt.c, so need to retain the original license header in addition to the new one. Reviewed by: ziaee Differential Revision: https://reviews.freebsd.org/D57123 --- sys/dev/dpaa/if_memac_fdt.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/sys/dev/dpaa/if_memac_fdt.c b/sys/dev/dpaa/if_memac_fdt.c index f136608a906c..74a923f45580 100644 --- a/sys/dev/dpaa/if_memac_fdt.c +++ b/sys/dev/dpaa/if_memac_fdt.c @@ -4,6 +4,31 @@ * * SPDX-License-Identifier: BSD-2-Clause */ +/* + * Copyright (c) 2012 Semihalf. + * 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. + */ #include #include From nobody Wed May 20 11:04:12 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gL7vx31lyz6fbTw; Wed, 20 May 2026 11:04:13 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gL7vx1xdQz4646; Wed, 20 May 2026 11:04:13 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779275053; 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=JjJ8gFpfwo33nVpAYPr2CF3UjZe9VoV/8ApJyc8rqQ0=; b=NFjIhWRVtaal3aSMHHhvxPRenCCXP5QtF2f7aM4WFm4BOOLjqfTFYqGjO4lGVxM4gEBf8a t/70tw39+TfNs3pBQ2Fmk3qC638AxdjIyksY2hyg7sPxJMCPumgu+gRv1+rMKnxPbo2vip SPEUngzUPA9TGU6MSm982En9uHRxbLIOtPJD5aC5Z7zTDayAf0k0tfNGbK9DnARB3tERoG VZfAQmxxKgJQfpHdrt0KRbySwkjFGyOBmNMIAaU0Mu/UvStk2v5qGYGfTb2jGN8Hg3vJDe pU9flGzJUCpvb1Kghz2iM7ir9wCeN+Fc5gwk3rZKNESlxtbHp1evrDnAy1wirQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779275053; a=rsa-sha256; cv=none; b=kTS2N2VFW2cghPz3N7XP0uHBWXHifvRQnsBB+Q1/J9h89DMi1VWgLeNpsTb5KOa8bXZWdu 9O/F1zATU03Zi8IiIEqYIE67TovjxGd80i0QR1GHGW4Jcyob/j5Feh0bLx+uqm/EzExkT/ eU7fecAaI+4GP2VTVnEoWiSnb5Ld1wp09Ok3FKfsvg196cGKkBS9FfDklir7y2Ehe7LJks 5qJWphQLgWfBUZ18Ai3W2vG+pCrfJos3nM3zclzXlG08P20D+GgQQsY5sbRul1QQAm/9o5 qscopUIzDcyzpMKzzGu6k+uDjjE97P8OsPO93LrjSA/BWVEnOf4Be/acIea+cA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779275053; 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=JjJ8gFpfwo33nVpAYPr2CF3UjZe9VoV/8ApJyc8rqQ0=; b=BEz0Rtz7lKswOax0xj9m46az0yUWJlshxtqT5pWKSbkm0kIhLh2EV++36Hc6cjVTKR2ZyB ggem9cUVmNP3iL39Hd6z0kgwij+/Y+8YVw5N5ypH3D2maoQhkj2VP+QQIFQj3D1kzs9hV9 cBMCOu52urWtVUmkWIXapbNf5DVXwJi4xHMBLMXJbj7WEIzcN14nqaDtVWXJWVFoq5gcCu Z3dduyQ5X/nKuPMu9pOOcxjnFV/qQpxym+mHFwijlHmWEz54PnWt32JDbIfxeTXlOfLB2Q Mi85WtWM5QyqwXPdO1YOq1+TEQfJscXmhLDFBc+husxe2IHNatLDuZX+R30mvg== Received: from [IPV6:2601:5c0:4202:5670:a9b6:fdfa:b02f:7cfa] (unknown [IPv6:2601:5c0:4202:5670:a9b6:fdfa:b02f:7cfa]) (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 4gL7vx0HLNztBb; Wed, 20 May 2026 11:04:12 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <3c835fcf-7aec-4142-9c25-2ab5b8ba0431@FreeBSD.org> Date: Wed, 20 May 2026 07:04:12 -0400 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: d84a691a3590 - main - powerpc: Remove stale include line from MPC85XX Content-Language: en-US To: Justin Hibbits Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <6a0cc0a3.3973e.25c60e4a@gitrepo.freebsd.org> <20260519160623.727891bf@ralga.knownspace> From: John Baldwin In-Reply-To: <20260519160623.727891bf@ralga.knownspace> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/19/26 16:06, Justin Hibbits wrote: > On Tue, 19 May 2026 19:57:23 +0000 > John Baldwin wrote: > >> The branch main has been updated by jhb: >> >> URL: >> https://cgit.FreeBSD.org/src/commit/?id=d84a691a3590c85a4068dd23644efa478c368a03 >> >> commit d84a691a3590c85a4068dd23644efa478c368a03 >> Author: John Baldwin >> AuthorDate: 2026-05-19 19:53:46 +0000 >> Commit: John Baldwin >> CommitDate: 2026-05-19 19:53:46 +0000 >> >> powerpc: Remove stale include line from MPC85XX >> >> The stale include line caused config -m to fail with an error >> trying to parse the config file during make universe/tinderbox which >> in turn caused universe/tinderbox to abort without building any >> powerpc kernels (or subsequent architectures such as riscv64) with >> the error: >> make[2]: freebsd/main/Makefile:767: Target architecture for >> powerpc/conf/MPC85XX unknown. config(8) likely too old. in .for loop >> from freebsd/main/Makefile:761 with kernel = MPC85XX in make[2] in >> directory "freebsd/main" >> make[2]: stopped making "universe_kernels" in freebsd/main >> *** Error code 1 >> >> Reported by: npn, many others >> Fixes: fd8d34ce272b ("dpaa: Migrate from NCSW base to a >> home-grown driver") --- >> sys/powerpc/conf/MPC85XX | 1 - >> 1 file changed, 1 deletion(-) >> >> diff --git a/sys/powerpc/conf/MPC85XX b/sys/powerpc/conf/MPC85XX >> index c74819c7fee0..521ec21c3234 100644 >> --- a/sys/powerpc/conf/MPC85XX >> +++ b/sys/powerpc/conf/MPC85XX >> @@ -9,7 +9,6 @@ ident MPC85XX >> >> machine powerpc powerpc >> >> -include "dpaa/config.dpaa" >> makeoptions DEBUG=-g #Build kernel with gdb(1) >> debug symbols makeoptions WITH_CTF=1 >> >> > > Oops, sorry! I thought I'd get an email if the build fails, but I > guess the CI build only does 64-bit kernels? Also, CI doesn't do an actual 'make tinderbox' it only builds a few explicit kernel configs. No worries though. -- John Baldwin From nobody Wed May 20 12:38:59 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLB1H6GN0z6dkRN for ; Wed, 20 May 2026 12:38: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLB1H5WBvz3KKD for ; Wed, 20 May 2026 12:38:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779280739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=12KgFPiGcIa3wrznbfXeZw0nDLe2/195YB1JXr++HmA=; b=x8/1FyTsqHhMqqenUyXjtwjZV4D3h2PIwWhCKEwaJP4hsfMdEdC3sq4KWBS61mkGALTGHm ley6yz/sLMtpfChVG2hRP4TfrFcTNXZeIfwZA5cu/LYBDJuqS/sVXZicDaD4YtWdyDfDm+ 4J22Et8gM5gnSCN6C6CREhVovIqhnUOEyw2qCvYppF+5HYfL/41/F7p8TKhVc4PI18nlP8 THcHtUhQJk0/yTw5b1vS8CQu0OafRbS6+IMPq9BK3ca9yJtjN0WBdoNwLjLm7yIM97TWS+ fkjzjP80wEBYQDOWJ8pynK/UGTKmBOqjVqO8qWlZRpY8okAeQkNJFt8Y++hQoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779280739; a=rsa-sha256; cv=none; b=GIE/E43vaHdfYy3zizZdl8m2DTbl8E8z2oAapae04sgpVOh7YEo5sLV0lyUbA/r4GIrMV1 CapdnTLPuImaBl5yxlsFLsX4Pgl1XgPBT6FJqJgAjqKOA1cIi4QCEhJoOJ8Z2dxv+tQGt0 7cKewlXYWz2uA27Zw3Nn6AULhskgaf94m7G8NEYRjclP/iECJxJLThs/lgmFOIpGV42TwB nrzSmgaT9CUHQZox3OexHtuQ4kl6dBaYYyKYIc76GtT+esCx5KkIFSxy2LbBIiYFykuvQc EfJrD4BNb+cNED9gZfzIpq86Z73JcV0oMllQNZwuJDfjMT/WvKOrTwtxOq8ifw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779280739; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=12KgFPiGcIa3wrznbfXeZw0nDLe2/195YB1JXr++HmA=; b=c1NlzCUpjEHlxKfgU13MS9GcHoAvpkBlXPEBPJhjLArNxcF1Z+CgWezqb9cCIgO+o0Z43x +wn0HN0FBVsPXluw6YPaXU8KI8srPTtCnRVP2ix+WcirAgSUewrdKFqqIMjiN8SpZRpn1g Ne0qlAc4HDT7gW+dauCBngXdw/E5I+IN7ZkM9CRM6eeCQWZ3817lI0jJbpOfBcLw3JVxmf ulLEp3tKGMJ6G6eg7PKbrjQrr/kbrmEfV4++7AOllcPsYMWTZp+7RjY6KVmuW9ten5QtoB 7lBkjHDqPo7xpIQBjVxvdkCTptMle2pxXgyFnCzs14ZLovlXexarVDtO2pZnAw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLB1H4s9wz11wy for ; Wed, 20 May 2026 12:38:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 333f6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 12:38:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: d04da19acbef - main - d.7: Document no support for ddi_pathnam(), getmajor(), and getminor() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d04da19acbef62f8aee36f5350470dcbf5ba2931 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 12:38:59 +0000 Message-Id: <6a0dab63.333f6.e31ffc0@gitrepo.freebsd.org> The branch main has been updated by 0mp: URL: https://cgit.FreeBSD.org/src/commit/?id=d04da19acbef62f8aee36f5350470dcbf5ba2931 commit d04da19acbef62f8aee36f5350470dcbf5ba2931 Author: Mateusz Piotrowski <0mp@FreeBSD.org> AuthorDate: 2026-05-20 12:36:40 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2026-05-20 12:36:40 +0000 d.7: Document no support for ddi_pathnam(), getmajor(), and getminor() MFC after: 3 days --- share/man/man7/d.7 | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/share/man/man7/d.7 b/share/man/man7/d.7 index 792f6d36ce73..fd72b3f38ba6 100644 --- a/share/man/man7/d.7 +++ b/share/man/man7/d.7 @@ -3,7 +3,7 @@ .\" .\" Copyright (c) 2025-2026 Mateusz Piotrowski <0mp@FreeBSD.org> .\" -.Dd May 7, 2026 +.Dd May 20, 2026 .Dt D 7 .Os .Sh NAME @@ -453,3 +453,11 @@ and .Va $taskid are always 0 on .Fx . +.Pp +Functions +.Fn ddi_pathname , +.Fn getmajor , +and +.Fn getminor +are not supported on +.Fx . From nobody Wed May 20 13:26:41 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLC4K3D7zz6dnhS for ; Wed, 20 May 2026 13:26: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLC4K2YYvz3R75 for ; Wed, 20 May 2026 13:26:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779283601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5OwQKPPdR2cau9CdF1GB0FuWfmJMpBEv9YsjMJgGTCY=; b=me0BQkTKnv4QnqCrtCYYxVqXORIi6p9IygvpPzmiFB9vVuMXkaJdyG8Mz9O5FIj/q13wsQ OZZOadWc0Dra/zYLnw5Os9nSEfB9pbcX52Ur/R7LGcZNJCLig3CGvlJWrNvwfm/tQ/D521 VNKJS1C1b19gjtTqjPbZ5i/QdWaFS4Tbn9IuRb4QaDW6PpZqyXhEGmXkOG+ScNZ5kAsm5A bdoTFvh9+u1yGRCd4JPO0AlXStW0k1Q44l/TfOfdjZEINuWKMZaT5NW4/izNTOA4GDP5Kf BfTVvoBN2BVj/RdEahV/UclkSGzWnRYyR2Km7XQJ+6j1CtqYcPUSIe/zJ4suRQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779283601; a=rsa-sha256; cv=none; b=CqYvOhDeAAYPmbCp5KSxldHfTKwC5VVglynZe0on/m5G6D7FxTnCOgsfMzSy6sLPlk5jhr jNRxwjrUAlgJYHeRucpf3KH9vxTflJ7S3OMrCD+xCtVmhxyZ/pSPkP/LAXsdSFgqh/e2vr 8V9DMxL14R4uZ4rcII4oYssmcEbizkYMoWO+L3HLZFeNBSHdGIcOPXo97AYdnbOyT+fWg1 cbTaYLlmRyVM41G21HYst9S5wuyW6U7675jNEsRi5CUztyG0nR2y/0Z1I1A09sdTumh1uu Vf4vh0NpGltyqAtwHKYYl5K/pg94H6yF0ZaFgqrq2oXElbsL8klKs+cfniIoWg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779283601; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5OwQKPPdR2cau9CdF1GB0FuWfmJMpBEv9YsjMJgGTCY=; b=EYVofbTohNycU6BNSMqvM5sLUcvFYBPimUeENb+IaZ1KWsl47vLkY1aZ0xTn6DDIAvxms2 EpGRt5+4yCsKmnZz8QISHtT6PCGIX1QQIH5wD7OfdE/THOlbEJzw7YPrXLPEuT4i/hkvBN dOafwXs9Q2GkGWigfDsmkQj8AewnGVWlQep8y/3S5EJxM7CX4qU90uYs6JAul5/t4yOw8J PSVkT2I088SURSNspzrSAjN6uvrioKEYeS+LldJ33KVL858g5CePrPkI/wJbZS13NHRI7N 6QWoaX+sjfKgwtX9zmsLdzSpu4FnR6E6594/P+d1ZJVzeYqzbLzMV9R7sVZs8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLC4K1m0qz12wd for ; Wed, 20 May 2026 13:26:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3909e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 13:26:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 9096a8b1c89c - main - crypto driver manuals: Add crypto to search index List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 9096a8b1c89c7e98df0d5a27cf1a5f4c6e8ddf19 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 13:26:41 +0000 Message-Id: <6a0db691.3909e.41c61636@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=9096a8b1c89c7e98df0d5a27cf1a5f4c6e8ddf19 commit 9096a8b1c89c7e98df0d5a27cf1a5f4c6e8ddf19 Author: Alexander Ziaee AuthorDate: 2026-05-20 13:25:21 +0000 Commit: Alexander Ziaee CommitDate: 2026-05-20 13:25:54 +0000 crypto driver manuals: Add crypto to search index While here, tag spdx and sync the drivers in crypto(4)/SEE ALSO. MFC after: 2 days (add back hifn) Differential Revision: https://reviews.freebsd.org/D57060 --- share/man/man4/aesni.4 | 7 +++++-- share/man/man4/crypto.4 | 11 ++++++++++- share/man/man4/padlock.4 | 7 +++++-- share/man/man4/qat.4 | 6 +++--- share/man/man4/qat_c2xxx.4 | 8 +++++--- 5 files changed, 28 insertions(+), 11 deletions(-) diff --git a/share/man/man4/aesni.4 b/share/man/man4/aesni.4 index fbc0c0e59442..6a27e2dedf9a 100644 --- a/share/man/man4/aesni.4 +++ b/share/man/man4/aesni.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2010 Konstantin Belousov .\" All rights reserved. .\" @@ -22,12 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 29, 2020 +.Dd May 17, 2026 .Dt AESNI 4 .Os .Sh NAME .Nm aesni -.Nd "driver for the AES and SHA accelerator on x86 CPUs" +.Nd x86 CPU AES and SHA crypto accelerator driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your diff --git a/share/man/man4/crypto.4 b/share/man/man4/crypto.4 index 4242a6631352..bf4f785455f6 100644 --- a/share/man/man4/crypto.4 +++ b/share/man/man4/crypto.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" $NetBSD: crypto.4,v 1.24 2014/01/27 21:23:59 pgoyette Exp $ .\" .\" Copyright (c) 2008 The NetBSD Foundation, Inc. @@ -61,7 +64,7 @@ .\" ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF .\" THE POSSIBILITY OF SUCH DAMAGE. .\" -.Dd October 6, 2021 +.Dd May 17, 2026 .Dt CRYPTO 4 .Os .Sh NAME @@ -346,9 +349,15 @@ Destroys the session identified by .El .Sh SEE ALSO .Xr aesni 4 , +.Xr armv8crypto 4 , +.Xr ccr 4 , +.Xr glxsb 4 , .Xr ipsec 4 , .Xr padlock 4 , +.Xr qat 4 , +.Xr qat_c2xxx 4 , .Xr safe 4 , +.Xr safexcel 4 , .Xr crypto 7 , .Xr geli 8 , .Xr crypto 9 diff --git a/share/man/man4/padlock.4 b/share/man/man4/padlock.4 index cf362e58972e..8f4a20b36020 100644 --- a/share/man/man4/padlock.4 +++ b/share/man/man4/padlock.4 @@ -1,3 +1,6 @@ +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2005 Christian Brueffer .\" All rights reserved. .\" @@ -22,12 +25,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 29, 2020 +.Dd May 17, 2026 .Dt PADLOCK 4 .Os .Sh NAME .Nm padlock -.Nd "driver for the cryptographic functions and RNG in VIA C3, C7 and Eden processors" +.Nd VIA C3, C7 and Eden CPU crypto driver .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your diff --git a/share/man/man4/qat.4 b/share/man/man4/qat.4 index 613091df2e7e..31ba61cd39af 100644 --- a/share/man/man4/qat.4 +++ b/share/man/man4/qat.4 @@ -1,11 +1,11 @@ .\" SPDX-License-Identifier: BSD-3-Clause .\" Copyright(c) 2007-2025 Intel Corporation -.Dd June 2, 2025 +.Dd May 17, 2026 .Dt QAT 4 .Os .Sh NAME .Nm qat -.Nd Intel QuickAssist Technology driver +.Nd Intel QuickAssist Technology compression and crypto driver .Sh SYNOPSIS To load the driver call: .Pp @@ -68,7 +68,7 @@ Intel (R) Atom P5300 processor product family .It Intel (R) QAT 4xxx Series .El -.Sh SYSCTL_VARIABLES +.Sh SYSCTL VARIABLES The following .Xr sysctl 8 variables may be used to reconfigure the diff --git a/share/man/man4/qat_c2xxx.4 b/share/man/man4/qat_c2xxx.4 index aad0c043e548..ce0b810fe11e 100644 --- a/share/man/man4/qat_c2xxx.4 +++ b/share/man/man4/qat_c2xxx.4 @@ -1,4 +1,6 @@ -.\"- +.\" +.\" SPDX-License-Identifier: BSD-2-Clause +.\" .\" Copyright (c) 2020 Rubicon Communications, LLC (Netgate) .\" .\" Redistribution and use in source and binary forms, with or without @@ -22,12 +24,12 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd July 21, 2022 +.Dd May 17, 2026 .Dt QAT_C2XXX 4 .Os .Sh NAME .Nm qat_c2xxx -.Nd Intel QuickAssist Technology (QAT) driver for Atom C2000 chipsets +.Nd Intel QuickAssist Technology crypto driver for Atom C2000 .Sh SYNOPSIS To compile this driver into the kernel, place the following lines in your From nobody Wed May 20 13:31:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLCB75s01z6dp7P for ; Wed, 20 May 2026 13:31: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLCB75C90z3RXV for ; Wed, 20 May 2026 13:31:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779283903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vsa0m+OXRoS3xgoadRZBEsBiDbnVjXbG5Zb1FwB+Ybo=; b=mCinZRcohJ7jdatzusmofOrfbjgH7vwzW4+N2tay5c5vfNqlsWwIF0DawDp504qHqtAbyx eCMqm75rUtMe2IIqGFFyXNyZlcsvWRSKTI6AyU3tZstZxMQqE0SmyJTs4lZ4YqWBEB0ZwP ivhFAVNw2BCZyc+6BxgrXTEk6cfm7iyWTD7vFyfKuaUa8SFo26qHAqSAyu+sYAS+6OvHfS QwFxSI+hqb0sPVrI3u1RSar4U6RODQxXLsJcJBe22YReo4JtZPtFVvJFryEEJ07G6ZW9kq rMhFGIENm6hBCLymUiyzVIZfaQhm3pnJBx+Vb7bW6T58ImEC4uNEZM52U64MVQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779283903; a=rsa-sha256; cv=none; b=MfSgdyqWGEwVZf5OyUFBsritJwVaWIeqg1rp9uwmDQYsuK2UCfV5RcpmmebBDeZZbcSUib U0kAyKdM38jYmTGG2h0Y4qDyZv6dj5HqJCMFVzKCmGbO4pRuMgflKOt7PRNLsV2Qtuqnq9 6BmTcEJN70GAymnR7ZASdfKtqYd1WMqNsuzBELrXQE6DrxYKn/SNF9xcDn+dhG5mmmBjfA E9YWfDhYE0zSDHs+wfTOlxJMiaC9Sm5UeATLaObdiH61XBLwnoUDPksjn29mRKE96ChBtQ l0wqsnFnZq872EfxaM0jgnQJQv6Ve1t92Oz5dTkrHbFmR4Mu1Ze9CMCt5RG4iQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779283903; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vsa0m+OXRoS3xgoadRZBEsBiDbnVjXbG5Zb1FwB+Ybo=; b=AQQMIdGJmqvZJxO/fb8PrtXtB5ytRDrmzQMLCkdkNEOh0OIfYXxoI+a3VHRm+tBFn/fuQa PiEoXNw0BxcKkOHbY7At//9J12r1UhuEZGvEiYGeodzHZi08Dp8BQ3ptf0QXdsmywNxZyI 1Y2rVXQmGOxKwVMsZ/kF48RYofj7TJu6pbw1Nkt4dJgjRZm+Eei/Fwwz6Ld0305qucIjoY V4d3ectcTlgd2R++S8ZvtC4X4nzfx0nAV237caL9pyRKqz2r1ZgLyQoSdBq86R5wCiHBr9 TICfLFWW6AZvftfqcvZBhdr/y3OlEvaonvAiJUtJiv1pVAod+PBNKnXKVc7CwQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLCB74l4Mz12x1 for ; Wed, 20 May 2026 13:31:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a094 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 13:31:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: d9c31658df84 - main - kern_umtx.c: remove dead code List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: d9c31658df8492a5666e799c2b267c425cb8f468 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 13:31:38 +0000 Message-Id: <6a0db7ba.3a094.40ffb5b1@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d9c31658df8492a5666e799c2b267c425cb8f468 commit d9c31658df8492a5666e799c2b267c425cb8f468 Author: Konstantin Belousov AuthorDate: 2026-05-20 00:49:09 +0000 Commit: Konstantin Belousov CommitDate: 2026-05-20 13:31:30 +0000 kern_umtx.c: remove dead code It was a placeholder for the access control for process-shared umtx memory, which is not needed. Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D57122 --- sys/kern/kern_umtx.c | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) diff --git a/sys/kern/kern_umtx.c b/sys/kern/kern_umtx.c index 905ebd4f98ac..d9798fb2adb6 100644 --- a/sys/kern/kern_umtx.c +++ b/sys/kern/kern_umtx.c @@ -4624,17 +4624,12 @@ umtx_shm(struct thread *td, void *addr, u_int flags) if ((flags & UMTX_SHM_DESTROY) != 0) { umtx_shm_unref_reg(reg, true); } else { -#if 0 -#ifdef MAC - error = mac_posixshm_check_open(td->td_ucred, - reg->ushm_obj, FFLAGS(O_RDWR)); - if (error == 0) -#endif - error = shm_access(reg->ushm_obj, td->td_ucred, - FFLAGS(O_RDWR)); - if (error == 0) -#endif - error = falloc_caps(td, &fp, &fd, O_CLOEXEC, NULL); + /* + * The current vmspace has the mapping, so it can be + * converted into shm filedescriptor for current + * thread. + */ + error = falloc_caps(td, &fp, &fd, O_CLOEXEC, NULL); if (error == 0) { shm_hold(reg->ushm_obj); finit(fp, FFLAGS(O_RDWR), DTYPE_SHM, reg->ushm_obj, From nobody Wed May 20 14:29:39 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLDSz6g1rz6dsdm for ; Wed, 20 May 2026 14:29: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLDSz62Fkz3ZBH for ; Wed, 20 May 2026 14:29:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779287379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jpBs1yrcr8Vvbg1EcyWffNvYn9zyTT7tPYIm3UWLc+4=; b=oLLZsiAzVGgOKy4a0evgk29W/+NA4ea1R/8VLlR1gm93vYa2BcZN6nKi11U/9Flb3jueX7 l2SGJD1ENZ2oHQ8UsFMEgR5CivIKYTQkfPImun/FHn+f2t129TvEnyDMRFqHKBXslFLCOh tn8IJuzTt+d0tBX/a2E6KGbp6aYNX9eZvfg2NMmJnNFQcm0rkyxgmEtrTjIzmv8Ymj3WbP LolYQRg7s/0vKldGKibItP+Bb6Ji97PtC3tauUNJrTjQ1NP9TSHOjwnU8rtT5eCIqClqn3 VJUdvFAxQti9zStUm5Wvgzdo8rNp3/4/mGWGZz25kkIC2xz1ulz/usG+yed8yA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779287379; a=rsa-sha256; cv=none; b=w12UIgEXS4lDRwsmEyqJaXckJgxZkIkOOjwSyPHHru7RubCDcy4qjjWSuNSZ3P76AmhPom blbmMJOxCmPnOLc6s1YLY/JjWEsKPdIEXqhBAofqegdeBF4gNI/ZNE+SaJbPSo3XE9/2W5 fzbeDystTi1bIkekDf7N66xoBc6NPYLeVMz2q0nhGtp7TLI8v3JK7oKqkOJohfj9uL5gui oN8N7n9or4ftDiUQKNdnxAIRe56GGI+bgZWm3q9qWJH7qIr+lyMQplwJjTd9PCenzkeI1w 1zc6KeKbl7JO4bBHLROBhnbpRjrlJsRvMRsScHKHtklbgW57Hjwg3F72Tv8+yg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779287379; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=jpBs1yrcr8Vvbg1EcyWffNvYn9zyTT7tPYIm3UWLc+4=; b=w8L1Oewz6yeyiz3ZvnKVdnZG6N+M6VwEOuHEPzx6JMHAiB+mk0562mFXPY3d6VR6GoQ0Np Wh5qnOb6pWiHnjpPlEMtqGwRhcWQXP3BNMsL6Df/6qdHUSdz+7bi3uwZDhbaxR0HInG3kL UV8AIDW58dD+pJ+9VUcA2qn8GcEBzzqfagJhI8FHIf2cu5kz0ctreewfaPpV99gU9rYZUb m61lbst//elEAW5SCaFW7VwJM6bKMBVxp1ezeZnfx2scHfC1HhdfvTu3IkiGJWTbVhNGE1 0vbnOIKHGibu8co+bhgUfSrjJKOZ9bZC+6EPXEl3tnCUUnrKgfx+43zBvQ/fiQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLDSz5NLRz14vl for ; Wed, 20 May 2026 14:29:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f3cb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 14:29:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: e145afc9eb91 - main - netlink: factor out compatibility code from inlined function List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: e145afc9eb9187be7e7cfdd42043cefc07b6e8d6 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 14:29:39 +0000 Message-Id: <6a0dc553.3f3cb.14b13c32@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=e145afc9eb9187be7e7cfdd42043cefc07b6e8d6 commit e145afc9eb9187be7e7cfdd42043cefc07b6e8d6 Author: Gleb Smirnoff AuthorDate: 2026-05-20 14:27:39 +0000 Commit: Gleb Smirnoff CommitDate: 2026-05-20 14:27:39 +0000 netlink: factor out compatibility code from inlined function This is a refactor of 228c632ab3f62. First, move compatibility one level up, where we yet work with the full header. Second, move this rarely executed code outside of the inline function. Should be no functional change. Reviewed by: pouria, melifaro Differential Revision: https://reviews.freebsd.org/D56915 --- sys/netlink/netlink_message_parser.c | 32 ++++++++++++++++++++++++++++++++ sys/netlink/netlink_message_parser.h | 29 ++++++++--------------------- 2 files changed, 40 insertions(+), 21 deletions(-) diff --git a/sys/netlink/netlink_message_parser.c b/sys/netlink/netlink_message_parser.c index 4c41235efaac..54aceb660a98 100644 --- a/sys/netlink/netlink_message_parser.c +++ b/sys/netlink/netlink_message_parser.c @@ -50,6 +50,38 @@ #include _DECLARE_DEBUG(LOG_INFO); +/* + * Some applications try to provide only the non-zero part of the required + * message header instead of a full one. It happens when fetching routes or + * interface addresses, where the first header byte is the family. + * This behavior is "illegal" under the "strict" Netlink socket option, however + * there are many applications out there doing things in the "old" way. + * Support this usecase by copying the provided bytes into the temporary + * zero-filled header and running the parser on this header instead. + */ +struct nlmsghdr * +nl_alloc_compat_hdr(struct nlmsghdr *hdr, uint32_t len, struct nl_pstate *npt) +{ + struct nlmsghdr *tmp; + + MPASS(hdr->nlmsg_len < sizeof(struct nlmsghdr) + len); + + len += sizeof(struct nlmsghdr); + if (npt->strict) { + nlmsg_report_err_msg(npt, + "header too short: expected %d, got %d", + len, hdr->nlmsg_len); + return (NULL); + } + tmp = npt_alloc(npt, len); + if (tmp == NULL) + return (NULL); + memcpy(tmp, hdr, hdr->nlmsg_len); + tmp->nlmsg_len = len; + + return (tmp); +} + bool nlmsg_report_err_msg(struct nl_pstate *npt, const char *fmt, ...) { diff --git a/sys/netlink/netlink_message_parser.h b/sys/netlink/netlink_message_parser.h index 720317ed74f3..8f61091c4a7f 100644 --- a/sys/netlink/netlink_message_parser.h +++ b/sys/netlink/netlink_message_parser.h @@ -222,6 +222,9 @@ bool nlmsg_report_err_offset(struct nl_pstate *npt, uint32_t off); void nlmsg_report_cookie(struct nl_pstate *npt, struct nlattr *nla); void nlmsg_report_cookie_u32(struct nl_pstate *npt, uint32_t val); +struct nlmsghdr *nl_alloc_compat_hdr(struct nlmsghdr *hdr, uint32_t len, + struct nl_pstate *npt); + /* * Have it inline so compiler can optimize field accesses into * the list of direct function calls without iteration. @@ -232,27 +235,7 @@ nl_parse_header(void *hdr, uint32_t len, const struct nlhdr_parser *parser, { int error; - if (__predict_false(len < parser->nl_hdr_off)) { - void *tmp_hdr; - - if (npt->strict) { - nlmsg_report_err_msg(npt, - "header too short: expected %d, got %d", - parser->nl_hdr_off, len); - return (EINVAL); - } - - /* - * Compatibility with older applications: - * pretend there's a full header. - */ - tmp_hdr = npt_alloc(npt, parser->nl_hdr_off); - if (tmp_hdr == NULL) - return (EINVAL); - memcpy(tmp_hdr, hdr, len); - hdr = tmp_hdr; - len = parser->nl_hdr_off; - } + MPASS(len >= parser->nl_hdr_off); if (npt->strict && parser->sp != NULL && !parser->sp(hdr, npt)) return (EINVAL); @@ -320,6 +303,10 @@ static inline int nl_parse_nlmsg(struct nlmsghdr *hdr, const struct nlhdr_parser *parser, struct nl_pstate *npt, void *target) { + if (__predict_false(hdr->nlmsg_len - sizeof(struct nlmsghdr) < + parser->nl_hdr_off) && + ((hdr = nl_alloc_compat_hdr(hdr, parser->nl_hdr_off, npt)) == NULL)) + return (ENOMEM); return (nl_parse_header(hdr + 1, hdr->nlmsg_len - sizeof(*hdr), parser, npt, target)); } From nobody Wed May 20 14:29:40 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLDT12Xpnz6dslh for ; Wed, 20 May 2026 14:29: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLDT10FNfz3ZYb for ; Wed, 20 May 2026 14:29:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779287381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ak7Na0A8ic9uxR6JH1tPmUOXRkjlMOmavP7INiQHx2c=; b=f4QlwCa0Im5VajTZ7SDuRzIOPX2vaGykjgMczZodWGCHacCxq4PKNPxBm+zzB+Ivn/Qg0C 1alxyTroioBCQKOYqCWMvFDZwGcMDtT3XMg1t7av6RTFaCSoSdy9d62VJIzBlTPxZoXE2D Jc1i6SiJeXj725/uuifafI9FAA1x88X5unORyP2rTum8K9l2WfIVo+uii8KKY8+drSKBAw ZLgOOqvF30H3Y3iy3nJEPe7WClDr/B5y/YaHkYi2SPfcXdjxETGUlo40yUFOojZEja7TI3 2OLbErmlaOUgTfBzxr/7Q/gJ2HvAnSxcwKkTcE+KnKc1aFi9WNNv5GfFu0os8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779287381; a=rsa-sha256; cv=none; b=dTelnTZnEGa7jjSQWTjGbXb4p1GBn0AxsuM6vis8RLL8xB3abyjufTMKBaOIc2G1P2nrWS GjkGjESuNx8B3nwnc1VMBT+3kCZ8jp8OtVslNb+orz0BZG96I1eDASgpgLLLWQjEa+c562 UKibuMYlFNkUm2USqypZIdw/Ickq7iM7sq36WJtb9JgzP7RsOFu3zXU0/L0O4S8R1Oux7M cVmXpRNzAmu3dij5SGZgeAVqlnl5XD14UZBxYgwMO1/a05xPkAiBi7P7cfm8bX69SLAKrP /241xkpNj5IlcrIhGqIWQS4CjpQ1bmViDF2mArDZkTZkVk+M0r295jHPeT063A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779287381; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ak7Na0A8ic9uxR6JH1tPmUOXRkjlMOmavP7INiQHx2c=; b=JPJdeRrAcbrgUg4/kaibGcMdnSRRur+Ns7sqSSROcog06I7WoLXp0a9kz6OrnpqQECAWfp 3onIc4wbtZ04m+00PMpJp2QtSnWIWR3hH0Xn5M1rHZnqity7SsoySu+Pqp83V2CmFfRzmw CgGhoO+7dqC7RXkSIJqAzpH6TrA4k9nK7HDXju8RsiFOxAwkueGkLtvqlB/yV4AfqFMj4t P9ukk5dKfp5DZuV45VDJyf+YJ84pHWrrameh1wghWBUeLhXtLT79UYa5ByAY5dsAusfz/t ItK+EVZDtX5ixNh+DhKCaGVZdlyI1hwJKY8waEYWsnvDCqxF4X0MPdkY4s1NXQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLDT06B50z14lW for ; Wed, 20 May 2026 14:29:40 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3cf56 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 14:29:40 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: e924a2c80b9e - main - netlink: fix unsigned overflow on a truncated message List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: e924a2c80b9e1ace68d8ca0ffdacec65feec90a3 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 14:29:40 +0000 Message-Id: <6a0dc554.3cf56.4d406b96@gitrepo.freebsd.org> The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=e924a2c80b9e1ace68d8ca0ffdacec65feec90a3 commit e924a2c80b9e1ace68d8ca0ffdacec65feec90a3 Author: Gleb Smirnoff AuthorDate: 2026-05-20 14:27:52 +0000 Commit: Gleb Smirnoff CommitDate: 2026-05-20 14:27:52 +0000 netlink: fix unsigned overflow on a truncated message PR: 295106 Submitted by: Robert Morris Reviewed by: pouria, melifaro Differential Revision: https://reviews.freebsd.org/D56916 --- sys/netlink/netlink_message_parser.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sys/netlink/netlink_message_parser.h b/sys/netlink/netlink_message_parser.h index 8f61091c4a7f..c747f301059c 100644 --- a/sys/netlink/netlink_message_parser.h +++ b/sys/netlink/netlink_message_parser.h @@ -315,6 +315,12 @@ static inline void nl_get_attrs_bmask_nlmsg(struct nlmsghdr *hdr, const struct nlhdr_parser *parser, struct nlattr_bmask *bm) { + if (__predict_false(hdr->nlmsg_len - sizeof(struct nlmsghdr) < + parser->nl_hdr_off)) { + /* Doesn't make sense to call nl_alloc_compat_hdr() here. */ + BIT_ZERO(NL_ATTR_BMASK_SIZE, bm); + return; + } nl_get_attrs_bmask_raw( (struct nlattr *)((char *)(hdr + 1) + parser->nl_hdr_off), hdr->nlmsg_len - sizeof(*hdr) - parser->nl_hdr_off, bm); From nobody Wed May 20 14:35:36 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLDbr6fjGz6dtBC for ; Wed, 20 May 2026 14:35: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLDbr5mbjz3dLK for ; Wed, 20 May 2026 14:35:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779287736; 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; bh=e91t3FpIfRlQgy1lvn8JTDUFClx3jNHCO56T1m+0X04=; b=ygVJq0dsYyV2QxpiKLrvTDmG9fX9lz+34wqOzJyMyicvYpP7vK/rCP904biaRg4vIZukyg trFpYpICz7AXA01fOC43RUeZf7PnAm8SGQ3jCed1Zkh/FkBy2zNWQLngsv48CMYqBgoEg5 MgdTNPinIdb8QPtrmic8/vp7bXxCrYaKXPFfX9FcRrMkoESTJ/IznuumYcV1s0uyyKsh6s lWoNEdqe349sdbdxPJdIaNlqc6H8k7UQWYByvk6HMmRngWqEqMcfk8o8SrrwkdQx6+KqFr lCuEHJEi7Hsw7R2FVRIcz3A3cdMDmN5XSW9kfHmGsE6a3Az9sXH61InKgdf9zg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779287736; a=rsa-sha256; cv=none; b=A62P7eweMvT24G3yXIVAy6+w7y0D1giyc+C7gbNtsK5lLoiaG9zILAVddZStPJHhr3IJGP 34qO4iWlyVJM4ZwrfGODehQcQ90BesRpRURpUIlPkzJgGDG5PrVFhxaPu067wuwzJTlwYu 994I65cFgWu6ufyDBNfFpxDt6jeGgU8qy1j16Z682bGvP7OqekME5bZKjLoA5wsDsBKZAz Mcbn54dk1ND2SE9sIYRaXQBH60OtfqRp9waOPcyeGTS0S4IcEQUqUDPKNBEqOCHjFRdvWf 06ISkxQBuJUYrfeYB0Xgr8+VuElR782wxhhuDu6pfZeLPrExxc13F4BCNtS/Xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779287736; 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; bh=e91t3FpIfRlQgy1lvn8JTDUFClx3jNHCO56T1m+0X04=; b=X7qQQLJMLsktk9l5bVsXqM0XCRAqcbQQUmEpmcGhfsfhX5klqIczHlUd8byoyMYTJaHhxs EJCVu1V+bZeVjC0k3sR2CBbnURDLvDooMBzKJTYmhce32ThFaWe9X/tbgdCU1kNKLrMwfa 9tPH5kO8CnqPV3X5pFgyYs2M9U7cJeWhG/L0BmX1NhcZ6rLGYDguriIQGatcEsxqRQdHdJ 9WI+GOlASDWZLoloic3UxBalkPuM/S2F1gKfvZE4/lkf+r/89KoxQd/zSknZjauUnCevMo FDKiGfGVRpI0MK9m2kj2CNbcUQVzMRGlrprT9t2wNgjmMVKr83RqqcjG2A3vKQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLDbr5MYDz154B for ; Wed, 20 May 2026 14:35:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3de79 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 14:35:36 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Zishun Yi From: Mark Johnston Subject: git: b36fd09a834b - main - amd64/vmparam: Fix KASAN shadow map size in comment List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: b36fd09a834be586fbc1630294e17554e1f76175 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 14:35:36 +0000 Message-Id: <6a0dc6b8.3de79.1a5e52c4@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b36fd09a834be586fbc1630294e17554e1f76175 commit b36fd09a834be586fbc1630294e17554e1f76175 Author: Zishun Yi AuthorDate: 2026-05-20 14:34:08 +0000 Commit: Mark Johnston CommitDate: 2026-05-20 14:35:15 +0000 amd64/vmparam: Fix KASAN shadow map size in comment The address range 0xfffff78000000000 - 0xfffff7bfffffffff spans exactly 256GB (0x4000000000 bytes), not 512GB. For a 2TB kernel map, based on the KASAN 1:8 shadow map ratio, the required shadow map size is indeed 256GB. The current comment incorrectly states 512GB, which can be misleading and cause confusion. Reviewed by: markj MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57129 --- sys/amd64/include/vmparam.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/amd64/include/vmparam.h b/sys/amd64/include/vmparam.h index 2914a204b2ef..1825c431f9f7 100644 --- a/sys/amd64/include/vmparam.h +++ b/sys/amd64/include/vmparam.h @@ -171,7 +171,7 @@ * 0xffff808000000000 - 0xffff847fffffffff large map (can be tuned up) * 0xffff848000000000 - 0xfffff77fffffffff unused (large map extends there) * 0xfffff60000000000 - 0xfffff7ffffffffff 2TB KMSAN origin map, optional - * 0xfffff78000000000 - 0xfffff7bfffffffff 512GB KASAN shadow map, optional + * 0xfffff78000000000 - 0xfffff7bfffffffff 256GB KASAN shadow map, optional * 0xfffff80000000000 - 0xfffffbffffffffff 4TB direct map * 0xfffffc0000000000 - 0xfffffdffffffffff 2TB KMSAN shadow map, optional * 0xfffffe0000000000 - 0xffffffffffffffff 2TB kernel map @@ -185,7 +185,7 @@ * 0xff41000000000000 - 0xffff7fffffffffff unused * 0xffff800000000000 - 0xfffff5ffffffffff unused (start of kernel pml4 entry) * 0xfffff60000000000 - 0xfffff7ffffffffff 2TB KMSAN origin map, optional - * 0xfffff78000000000 - 0xfffff7bfffffffff 512GB KASAN shadow map, optional + * 0xfffff78000000000 - 0xfffff7bfffffffff 256GB KASAN shadow map, optional * 0xfffff80000000000 - 0xfffffbffffffffff 4TB unused * 0xfffffc0000000000 - 0xfffffdffffffffff 2TB KMSAN shadow map, optional * 0xfffffe0000000000 - 0xffffffffffffffff 2TB kernel map From nobody Wed May 20 14:54:05 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLF1B5K2Bz6dvRb for ; Wed, 20 May 2026 14: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLF196wdHz3gb0 for ; Wed, 20 May 2026 14: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=1779288846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vV7MkBd0QoXvHQgrdaiEhZtuz24UAx8h5XEjMdhRsuY=; b=UWsReIRYzO5K9UFBMrmAzaHmEkpex8JAbeP7CviINAabQsH1qgj+YxwLDOsBndxmBFWCC5 3+fRhvPXpCgau+9bciMDUntMaODyiRKTl/2LyvAVsYTaFr2reYHX0Tx1pfreKrt4VtcLhk 5C8C4Gtcur/xpU8J20Wq61uwIbwtcr1L3SzM4qaOelKC88HUTmOXDcHqCPz9dkuCuvPqJN A9E99DQlLbmuu5xvSL6zOVL5KFg7MpzVqzmXntkkgJgEgXyYWjqpCFqSmVgSqLMaed4DEf vrARZcYq2idcxO1BWwBVP7SKLxKzRT4XGb0A5N9VFsQcxgRwkd+fDnmaAJqGzQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779288846; a=rsa-sha256; cv=none; b=ema37EvUHuQbJRdDMsW1EXXWm+wXd6STlmB6StBLB837NFPdBRkxFLpW68f/9aibyr8UJ9 9t6I6uQpnOknbudcB5C6l3Usw0RteutsJS4NhrNMkVnq56MqqiPHkv11o2wVccqazQpxGO kI84I5zhToc1a72GxiuaJcGXoUTjY7vNi6tyYyuhHoGmJoruP6WNHX0WUgHaNlNn/QfGgK ya9WSCHcw0ZkV4rUlwCU+XFoSE/rE9cZleNJWRTyZEfunODooXuQwLSsXiy1JM1ltIPQv+ 12ZEEt9W71s5CxZbNDPDBgRRfwOKRp1+lvwuFQNIpBuKnHtp19qnKwEfxvilSg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779288846; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vV7MkBd0QoXvHQgrdaiEhZtuz24UAx8h5XEjMdhRsuY=; b=oaptV1euvR4cW0SlwarM+8sdsI8wsoAA295KADPPbyLs+xBKwpHf2Co+SiRqIbqKPi9yPm TQRlBQcq9KMkXZizoARFlK9JaYuzx3Wk6J/iVFGDDfyOvvLweBEWqsnaqvQ6J70PwcxCl8 t5Gn/lchfQyDwTijchiKS/Qv8eEOd/DjrERxKpqWe0iCWdmgXfXNEQAVce/nPzqxzgJuKc +pgNyDvm0cV9AiJDj+5fXXNAwqZdHUZUrfae7+bd7J4suc+G1ruFMm+ynNoXgc7FQQh7Sp qIsY4RdgwzdgUdaw34eU6a0jJw8QekOhSuOupZlew7QIgE4OgmzlbeN3zj8xUg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLF196Ft9z15XL for ; Wed, 20 May 2026 14:54:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 415d7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 14:54:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: d6f0e671d079 - main - kinst/arm64: Fix return values from kinst_invop() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: d6f0e671d0797b56011880f84d12ce5fb20bf099 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 14:54:05 +0000 Message-Id: <6a0dcb0d.415d7.3fa5169d@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d6f0e671d0797b56011880f84d12ce5fb20bf099 commit d6f0e671d0797b56011880f84d12ce5fb20bf099 Author: Mark Johnston AuthorDate: 2026-05-20 14:49:28 +0000 Commit: Mark Johnston CommitDate: 2026-05-20 14:49:28 +0000 kinst/arm64: Fix return values from kinst_invop() After commit 853cd8723494 it became invalid for kinst_invop() to return 0: dtrace_invop_start() would convert this to a sentinel value indicating that it did not consume the breakpoint, and so we'd just call kdb_trap() to handle it. Change kinst_invop() to return NOP_INSTR after handling a matching breakpoint. NOP_INSTR is handled by advancing the ELR, so we have to compensate by subtracting INSTR_SIZE before returning. Reviewed by: christos MFC after: 1 week Fixes: 853cd8723494 ("arm64: Clean up usage of the dtrace invop handler") Differential Revision: https://reviews.freebsd.org/D56987 --- sys/cddl/dev/kinst/aarch64/kinst_isa.c | 38 ++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 18 deletions(-) diff --git a/sys/cddl/dev/kinst/aarch64/kinst_isa.c b/sys/cddl/dev/kinst/aarch64/kinst_isa.c index 20ca26219a55..1ccfe20b8dcb 100644 --- a/sys/cddl/dev/kinst/aarch64/kinst_isa.c +++ b/sys/cddl/dev/kinst/aarch64/kinst_isa.c @@ -18,7 +18,7 @@ DPCPU_DEFINE_STATIC(struct kinst_cpu_state, kinst_state); -static int +static void kinst_emulate(struct trapframe *frame, const struct kinst_probe *kp) { kinst_patchval_t instr = kp->kp_savedval; @@ -132,17 +132,13 @@ kinst_emulate(struct trapframe *frame, const struct kinst_probe *kp) else frame->tf_elr += INSN_SIZE; } - - return (0); } static int kinst_jump_next_instr(struct trapframe *frame, const struct kinst_probe *kp) { - frame->tf_elr = (register_t)((const uint8_t *)kp->kp_patchpoint + - INSN_SIZE); - - return (0); + frame->tf_elr = (register_t)(uintptr_t)kp->kp_patchpoint; + return (NOP_INSTR); } static void @@ -215,21 +211,27 @@ kinst_invop(uintptr_t addr, struct trapframe *frame, uintptr_t scratch) dtrace_probe(kp->kp_id, 0, 0, 0, 0, 0); cpu->cpu_dtrace_caller = 0; - if (kp->kp_md.emulate) - return (kinst_emulate(frame, kp)); + if (kp->kp_md.emulate) { + kinst_emulate(frame, kp); + } else { + ks->state = KINST_PROBE_FIRED; + ks->kp = kp; - ks->state = KINST_PROBE_FIRED; - ks->kp = kp; + /* + * Cache the current SPSR and clear interrupts for the duration + * of the double breakpoint. + */ + ks->status = frame->tf_spsr; + frame->tf_spsr |= PSR_I; + frame->tf_elr = (register_t)kp->kp_tramp; + } /* - * Cache the current SPSR and clear interrupts for the duration - * of the double breakpoint. + * NOP_INSTR is handled in dtrace_invop_start() by advancing the ELR, so + * compensate by subtracting INSTR_SIZE before returning. */ - ks->status = frame->tf_spsr; - frame->tf_spsr |= PSR_I; - frame->tf_elr = (register_t)kp->kp_tramp; - - return (0); + frame->tf_elr -= INSN_SIZE; + return (NOP_INSTR); } void From nobody Wed May 20 14:54:06 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLF1C3TL4z6dvP2 for ; Wed, 20 May 2026 14:54: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLF1C0PMJz3gb2 for ; Wed, 20 May 2026 14:54:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779288847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QHOSVls5PB3Qbqs3vxaTMxu4ajgaTPxCybxSgwNDeJE=; b=er/9fkC8AaquV3QBNoFCEN/1oY7VVhNkTbfYHNYkiWHvc3aahxYpUISG0SWSzdEGn7SHlW Sy2nSKAzDZoAzwcd/WmktFu4/Ko4aaHrCrchV84bCr0om7gYmRYofZguLk/xi6O8vpHqtY 2/eK5bj6FEVwFYO9RDHobDXIqQF4rt8wteMtK+IBrTSK1Y6evc/LErI0akVSvpXdCUr/yP 2NZirSMeMRTGUOW3huPAQh4PQrqb4q1wJId0qtbZppT4jnkqoc54/ospbCUlxgAfMmdghJ TFlcCvwPIci0ia35zl11uaR9L7lpkRj4iKf+pkceeNfGM6xW7S6/LOJjTZjH9A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779288847; a=rsa-sha256; cv=none; b=KgRKSvobn1pi21sFnJHnJQeKU845MIVyfcOda0YmDkQQGFhcjarILNq0ibC5FuTYW0PLj7 fixqmnHymdj5Pf2yPGjwoOHun4kzr9XvtlUC/vHA9mUC3ambkYE7/jrVxQjkFZ3YXxT8ns 0OProsoPd6oijCJ1odIfN6hA3m20hixaecGiG2zfMM/WQd6BwvzrHZmYw7eHoeqwHzrQz5 wfChaGSUsM2pAamkeDF4l9nDagA6D+l+lOq1rH3rcxy6r70o99cLYf54X3qc9/u6CUvWgU hLguTDx6XTyHTw11O5JM86BiOyn1QaHm7RDiiCQojyTzDcabPJ7RnGx1ky66kQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779288847; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=QHOSVls5PB3Qbqs3vxaTMxu4ajgaTPxCybxSgwNDeJE=; b=JkPnYwuBPhqOz/hv6Bu1I7sF3pqW4TkxHfoETdJwH+D8x+Nj+D3cy5NJMsFBtI+xRiokDa xljZ6VBOglnc8GYKFhSP8xlI2pJR/C/K6r4zV2lyvzNj3l/NX2n6WGNErJeP6rrCKh3LSW Bd3i62DTRLzagAld8Cm+OaiEkFloDV0MNSm31J1D2ZwhQUPxqICUIHrD62P/aPkf7Bc9ui ZQ2UJijHjzrBbXrGzUipLRmOXfRoGWisxWirs4Yv0SeqnjF7pY4KMUOaBeZkVWWurMtSbj QK0KzeGJKTvAB3eSuF2BnHhjasWhQgp/z2id1CPr1+36woj8berN557aF/TMUQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLF1C00VMz15XM for ; Wed, 20 May 2026 14:54:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4026e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 14:54:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: e6be6dedeea1 - main - kinst/arm64: Handle an additional PC-relative instruction List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: e6be6dedeea1e6d2e5206e1e7422e2d556a6da0c Auto-Submitted: auto-generated Date: Wed, 20 May 2026 14:54:06 +0000 Message-Id: <6a0dcb0e.4026e.9c2b9eb@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=e6be6dedeea1e6d2e5206e1e7422e2d556a6da0c commit e6be6dedeea1e6d2e5206e1e7422e2d556a6da0c Author: Mark Johnston AuthorDate: 2026-05-20 14:49:41 +0000 Commit: Mark Johnston CommitDate: 2026-05-20 14:49:41 +0000 kinst/arm64: Handle an additional PC-relative instruction "ldr , " loads a value from a literal memory address into a register. It's PC-relative and so cannot be directly implemented using the trampoline mechanism. Unfortunately, on arm64 it can't easily be emulated either since the return-to-EL1 handler does not restore callee-saved registers, so like adr/adrp, we simply don't handle it. These instructions are fairly rare in an arm64 kernel. While here, refactor the code so that all instruction decoding is done in one place: introduce an enum type which characterizes the instruction type, add a helper to map instructions to enum values, and store the corresponding enum value in the probe description. Reviewed by: christos MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D56988 --- sys/cddl/dev/kinst/aarch64/kinst_isa.c | 121 +++++++++++++++------------------ sys/cddl/dev/kinst/aarch64/kinst_isa.h | 15 +++- 2 files changed, 69 insertions(+), 67 deletions(-) diff --git a/sys/cddl/dev/kinst/aarch64/kinst_isa.c b/sys/cddl/dev/kinst/aarch64/kinst_isa.c index 1ccfe20b8dcb..d9a8fd0276f2 100644 --- a/sys/cddl/dev/kinst/aarch64/kinst_isa.c +++ b/sys/cddl/dev/kinst/aarch64/kinst_isa.c @@ -18,6 +18,30 @@ DPCPU_DEFINE_STATIC(struct kinst_cpu_state, kinst_state); +static enum kinst_instr +kinst_instr_type(kinst_patchval_t instr) +{ + if (((instr >> 22) & 0xff) == 0b00100001) + return (KINST_INSTR_LDX); + else if (((instr >> 22) & 0xff) == 0b00100000) + return (KINST_INSTR_STX); + if (((instr >> 24) & 0x1f) == 0b10000) + return (KINST_INSTR_ADR); + else if (((instr >> 26) & 0x3f) == 0b000101) + return (KINST_INSTR_B); + else if (((instr >> 24) & 0xff) == 0b01010100) + return (KINST_INSTR_BCOND); + else if (((instr >> 26) & 0x3f) == 0b100101) + return (KINST_INSTR_BL); + else if (((instr >> 25) & 0x3f) == 0b011010) + return (KINST_INSTR_CBZ); + else if (((instr >> 25) & 0x3f) == 0b011011) + return (KINST_INSTR_TBZ); + else if (((instr >> 24) & 0xbf) == 0b11000) + return (KINST_INSTR_LDR_LITERAL); + return (KINST_INSTR_COMMON); +} + static void kinst_emulate(struct trapframe *frame, const struct kinst_probe *kp) { @@ -26,8 +50,8 @@ kinst_emulate(struct trapframe *frame, const struct kinst_probe *kp) uint8_t cond, reg, bitpos; bool res; - if (((instr >> 24) & 0x1f) == 0b10000) { - /* adr/adrp */ + switch (kp->kp_md.kp_type) { + case KINST_INSTR_ADR: reg = instr & 0x1f; imm = (instr >> 29) & 0x3; imm |= ((instr >> 5) & 0x0007ffff) << 2; @@ -44,14 +68,14 @@ kinst_emulate(struct trapframe *frame, const struct kinst_probe *kp) frame->tf_x[reg] = (frame->tf_elr & ~0xfff) + imm; } frame->tf_elr += INSN_SIZE; - } else if (((instr >> 26) & 0x3f) == 0b000101) { - /* b */ + break; + case KINST_INSTR_B: imm = instr & 0x03ffffff; if (imm & 0x0000000002000000) imm |= 0xfffffffffe000000; frame->tf_elr += imm << 2; - } else if (((instr >> 24) & 0xff) == 0b01010100) { - /* b.cond */ + break; + case KINST_INSTR_BCOND: imm = (instr >> 5) & 0x0007ffff; if (imm & 0x0000000000040000) imm |= 0xfffffffffffc0000; @@ -92,15 +116,15 @@ kinst_emulate(struct trapframe *frame, const struct kinst_probe *kp) frame->tf_elr += imm << 2; else frame->tf_elr += INSN_SIZE; - } else if (((instr >> 26) & 0x3f) == 0b100101) { - /* bl */ + break; + case KINST_INSTR_BL: imm = instr & 0x03ffffff; if (imm & 0x0000000002000000) imm |= 0xfffffffffe000000; frame->tf_lr = frame->tf_elr + INSN_SIZE; frame->tf_elr += imm << 2; - } else if (((instr >> 25) & 0x3f) == 0b011010) { - /* cbnz/cbz */ + break; + case KINST_INSTR_CBZ: cond = (instr >> 24) & 0x1; reg = instr & 0x1f; imm = (instr >> 5) & 0x0007ffff; @@ -114,8 +138,8 @@ kinst_emulate(struct trapframe *frame, const struct kinst_probe *kp) frame->tf_elr += imm << 2; else frame->tf_elr += INSN_SIZE; - } else if (((instr >> 25) & 0x3f) == 0b011011) { - /* tbnz/tbz */ + break; + case KINST_INSTR_TBZ: cond = (instr >> 24) & 0x1; reg = instr & 0x1f; bitpos = (instr >> 19) & 0x1f; @@ -131,6 +155,9 @@ kinst_emulate(struct trapframe *frame, const struct kinst_probe *kp) frame->tf_elr += imm << 2; else frame->tf_elr += INSN_SIZE; + break; + default: + __assert_unreachable(); } } @@ -211,7 +238,7 @@ kinst_invop(uintptr_t addr, struct trapframe *frame, uintptr_t scratch) dtrace_probe(kp->kp_id, 0, 0, 0, 0, 0); cpu->cpu_dtrace_caller = 0; - if (kp->kp_md.emulate) { + if (kp->kp_md.kp_type != KINST_INSTR_COMMON) { kinst_emulate(frame, kp); } else { ks->state = KINST_PROBE_FIRED; @@ -245,50 +272,6 @@ kinst_patch_tracepoint(struct kinst_probe *kp, kinst_patchval_t val) cpu_icache_sync_range(kp->kp_patchpoint, INSN_SIZE); } -static void -kinst_instr_dissect(struct kinst_probe *kp) -{ - struct kinst_probe_md *kpmd; - kinst_patchval_t instr = kp->kp_savedval; - - kpmd = &kp->kp_md; - kpmd->emulate = false; - - if (((instr >> 24) & 0x1f) == 0b10000) - kpmd->emulate = true; /* adr/adrp */ - else if (((instr >> 26) & 0x3f) == 0b000101) - kpmd->emulate = true; /* b */ - else if (((instr >> 24) & 0xff) == 0b01010100) - kpmd->emulate = true; /* b.cond */ - else if (((instr >> 26) & 0x3f) == 0b100101) - kpmd->emulate = true; /* bl */ - else if (((instr >> 25) & 0x3f) == 0b011010) - kpmd->emulate = true; /* cbnz/cbz */ - else if (((instr >> 25) & 0x3f) == 0b011011) - kpmd->emulate = true; /* tbnz/tbz */ - - if (!kpmd->emulate) - kinst_trampoline_populate(kp); -} - -static bool -kinst_instr_ldx(kinst_patchval_t instr) -{ - if (((instr >> 22) & 0xff) == 0b00100001) - return (true); - - return (false); -} - -static bool -kinst_instr_stx(kinst_patchval_t instr) -{ - if (((instr >> 22) & 0xff) == 0b00100000) - return (true); - - return (false); -} - int kinst_make_probe(linker_file_t lf, int symindx, linker_symval_t *symval, void *opaque) @@ -359,6 +342,8 @@ kinst_make_probe(linker_file_t lf, int symindx, linker_symval_t *symval, ldxstx_block = false; for (n = 0; instr < limit; instr++) { + enum kinst_instr type; + off = (int)((uint8_t *)instr - (uint8_t *)symval->value); /* @@ -366,9 +351,10 @@ kinst_make_probe(linker_file_t lf, int symindx, linker_symval_t *symval, * breakpoint is placed in a LDX/STX block, we violate the * operation and the loop might fail. */ - if (kinst_instr_ldx(*instr)) + type = kinst_instr_type(*instr); + if (type == KINST_INSTR_LDX) ldxstx_block = true; - else if (kinst_instr_stx(*instr)) { + else if (type == KINST_INSTR_STX) { ldxstx_block = false; continue; } @@ -376,13 +362,14 @@ kinst_make_probe(linker_file_t lf, int symindx, linker_symval_t *symval, continue; /* - * XXX: Skip ADR and ADRP instructions. The arm64 exception - * handler has a micro-optimization where it doesn't restore - * callee-saved registers when returning from exceptions in - * EL1. This results in a panic when the kinst emulation code - * modifies one of those registers. + * XXX: The arm64 exception handler has a micro-optimization + * where it doesn't restore callee-saved registers when + * returning from exceptions in EL1. As a result, instruction + * emulation doesn't work if a (callee-saved) register is + * modified. Hence, exclude the position-dependent ADR/ADRP and + * LDR instructions. */ - if (((*instr >> 24) & 0x1f) == 0b10000) + if (type == KINST_INSTR_ADR || type == KINST_INSTR_LDR_LITERAL) continue; if (pd->kpd_off != -1 && off != pd->kpd_off) @@ -408,12 +395,14 @@ kinst_make_probe(linker_file_t lf, int symindx, linker_symval_t *symval, kp->kp_patchpoint = instr; kp->kp_savedval = *instr; kp->kp_patchval = KINST_PATCHVAL; + kp->kp_md.kp_type = type; if ((kp->kp_tramp = kinst_trampoline_alloc(M_WAITOK)) == NULL) { KINST_LOG("cannot allocate trampoline for %p", instr); return (ENOMEM); } + if (kp->kp_md.kp_type == KINST_INSTR_COMMON) + kinst_trampoline_populate(kp); - kinst_instr_dissect(kp); kinst_probe_create(kp, lf); } if (ldxstx_block) diff --git a/sys/cddl/dev/kinst/aarch64/kinst_isa.h b/sys/cddl/dev/kinst/aarch64/kinst_isa.h index 7e1fd8d123e9..39cf6d49290a 100644 --- a/sys/cddl/dev/kinst/aarch64/kinst_isa.h +++ b/sys/cddl/dev/kinst/aarch64/kinst_isa.h @@ -19,8 +19,21 @@ typedef uint32_t kinst_patchval_t; +enum kinst_instr { + KINST_INSTR_ADR, /* adr/adrp */ + KINST_INSTR_B, + KINST_INSTR_BCOND, + KINST_INSTR_BL, + KINST_INSTR_CBZ, /* cbz/cbnz */ + KINST_INSTR_TBZ, /* tbnz/tbz */ + KINST_INSTR_LDR_LITERAL, + KINST_INSTR_LDX, + KINST_INSTR_STX, + KINST_INSTR_COMMON, +}; + struct kinst_probe_md { - bool emulate; /* emulate in sw */ + enum kinst_instr kp_type; }; #endif /* _KINST_ISA_H_ */ From nobody Wed May 20 15:09:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLFM20sdcz6dwXf for ; Wed, 20 May 2026 15:09: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLFM200k3z3l5v for ; Wed, 20 May 2026 15:09:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779289774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UWmk85YkAtANV4uCrkNaAIJ0DpZ+LBG0aKwfih5J/Kw=; b=MaSVO7Mz3bUzIP8W+F6SE9fyYKyHhMYldIX4NtP3vzCj4SuKOAEbKnGBy2Z68Sv3+07riV GRTd8f/hURiALf5D7PSKUT7n7fcRihLgJsDuQWk5Y5Zto3NVWM/JmrEyAoYwmB4lS4qaIP VeIIwwh0j0Z2gZhxIEaX6S4s4caSaBsPHcmSyHRPuBvZ2ZwD/YBFRYG9y2p549UZDDZqqc G5+EIeJ406ScaQ83O46zcYfZJhGDKasz3XbQUX0bS39EF90Mjt5aTrOvI0FatBrXUPJIPd hyOmQTdjCUdyqqbq6s6F0mK9GM20ihFmoaIMMe/UYZW4iInGRY2i9VpWLPWEnQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779289774; a=rsa-sha256; cv=none; b=bBewAbamS8bDMzJSMWBpxsv/6yUTwBIyAVxfRq0LANi2mtaMxarjIg/VGCy+jxxnj1kAgo xac4PXhQbcmeqy1SabovWBRF6nG6cr0Vjt3FP8CYfeTNz2GGcmWj4frroCG2XuVtoV+7VQ JycoN/+DP/afsxwhDlFEbPfqhQR6jidJYMsSlUvcwptGL+QnEN5J+4Kj4qSfjXuAWhAHqM NhgWFqEGpQ6oIENPFn8Bx+ltT1dJcdWVXiVMUD/zUXZIU8mL4iZJCLHT+iGoK4X6mpagsQ iSr3r0S8VLVgzzoVa7H0ZbiqmC+F3bQpAtdhUC7uFbWge29m7XnirwpqWf/0+w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779289774; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UWmk85YkAtANV4uCrkNaAIJ0DpZ+LBG0aKwfih5J/Kw=; b=tMfQt+67NuBZOv6l1ygusdcLN+TOXtxgRCsJjDxA7TsegQEqN9z93g5cDzvW1btmgwVwk9 EUKf/vC85cHcgUEKtXvFAkm4lXS2v7ZEMyFE/jTu42J1tPVmVciHz5iO4zu2AD1A2UkJri 1CLXI13nqKpTNEXRrb4vrij1Fy5QjYz6ArploQoXCevMoqIDm4oD4tfPntAcd74bsVubWS i3oyW/ZV/tdbYS0hMtkQnIjWBpy3ymrUDJC7RKNnkC8ywUuJd9tIy1UihmJcDlND1D1dz2 tu3bxVCoYffVqo+rWoXoY8k3p6UL2CzOiKsNZgjy1MB7jnJK2yMBEyLCBoiEvA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLFM16hFgz15xv for ; Wed, 20 May 2026 15:09:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 434a4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 15:09:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: c796cc5afff2 - main - nlist.3: Move deprecation notice after intro List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: c796cc5afff2dffd542880c5f624439b25d74402 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 15:09:33 +0000 Message-Id: <6a0dcead.434a4.78f0f402@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=c796cc5afff2dffd542880c5f624439b25d74402 commit c796cc5afff2dffd542880c5f624439b25d74402 Author: Alexander Ziaee AuthorDate: 2026-05-20 15:06:31 +0000 Commit: Alexander Ziaee CommitDate: 2026-05-20 15:09:16 +0000 nlist.3: Move deprecation notice after intro Its more clear and good practice for the first sentence of a description to describe what something is, because there are a lot of different use cases for documentation. Fixes: 94b7a335683a ("nlist.3: Add discouraged use notice") Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57128 --- lib/libc/gen/nlist.3 | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/libc/gen/nlist.3 b/lib/libc/gen/nlist.3 index 4912180e9bcd..12a3dab41ab6 100644 --- a/lib/libc/gen/nlist.3 +++ b/lib/libc/gen/nlist.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 19, 2026 +.Dd May 20, 2026 .Dt NLIST 3 .Os .Sh NAME @@ -40,10 +40,6 @@ .Sh DESCRIPTION The .Fn nlist -function is provided for compatibility with legacy applications. -Its use is discouraged. -The -.Fn nlist function retrieves name list entries from .Xr elf 5 @@ -52,6 +48,9 @@ sections with type or .Dv SHT_SYMTAB in an ELF object (for example, an executable file or shared library). +This function is provided for compatibility with legacy applications. +Its use is discouraged. +.Pp The argument .Fa \&nl is set to reference the From nobody Wed May 20 15:34:52 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLFwD5Txpz6dyNK for ; Wed, 20 May 2026 15:34:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLFwD3Tb3z3nYh for ; Wed, 20 May 2026 15:34:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779291292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qLJclGcUdspbdFFynDe8PZ0Flm4Clk2cOh47f1FQ/o0=; b=Rx9dMbCvC2BQnMzK7m7AZ2dROfMFXqGZ3I+edCNADTM/PQEwN/40dZqYuPfBTJhj6PAMSz dRBgHDe1YYT7lY9GvZ5KWJQIi0/jxGwSWYtxsd5R0yIUDfsSWKPDUDnmSiXfDM37CAYqo7 +G5+88e2f/P13KMbfWiUXMX3QkQMLYAl4rHH8oC01Iqk1WmYzsuAnB93B5q3GUsPS8uYoF 3tIt7CJ0xmjEse3D5oeDqHT3MNb4y6ywgAA/5CTUXtOwUeYgdCoJ8gevQDqCJwF9KuhG4j dCOeCgQBOqhkdmfy0U7VuK1LHE/Mns2IL0hTaYg/JsT33yWUc9Q5MEHa6Rv3zA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779291292; a=rsa-sha256; cv=none; b=oW3iqbnidtLFcc5yZQGUl2ymWL7ZchmJ25BW6sKWw6Nbj3UcOI8yIB59C8MhlIIKROM066 a3JaU072dP0bFoskPD+4fzdsaXGAmcDgSOpBorJWo99r6VbMfEp6L9EHbJA4k5mXKLRcgB yNcMAxdnEg7uH5WgoIxBDGrDfQ/gHR0v4XO5RnSCtXm8p3r0c7qDbP70vXxKkK+8IFS+0m VpZ1YOB/PDEHH4x7DjJ1+5zscMKBc4502lLl5zIlDHfrJ7oMpAKbL6XIAWP9b40TCoCr83 vViaBgNEuy4wh48TQOp05NnN56Fz4Z6NvOISp7i8hoUHDY8ikhvYg550rV8xcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779291292; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=qLJclGcUdspbdFFynDe8PZ0Flm4Clk2cOh47f1FQ/o0=; b=IJ8cUYlpY28P2UEmeEvqZmybrFat1eq75xviNex+/RfT3lDedGP+VYdWMnTUcrnbk/hT3u DJdqx4NMByUMpY9VHR4pgacLMlxg7JDnZ5oKzTpIoEnt/yz9s0vnOfSTP73n4dWML+kW6L TXj0icndFqOarhg3F7W3q/E/CaPyTV/EEID3cgZpKGzCW/MLSqjrG3zij8Kz5zF5Ksw/cc TPI47LZ5QU4RXKqRk3B5S2VljfmTqPaZiagMhSjkejXbL7TOtBiUHlljVOjEk+ENem9aS8 ktJL/4GJjBSHGcmDLGoAP5EvgEtGlLp4hEJ0sQXipoN4fr6BLSh0iQABo29gnA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLFwD2S4Qz16XJ for ; Wed, 20 May 2026 15:34:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45e35 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 15:34:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Cy Schubert Subject: git: 8dfb0805fc31 - main - ipfilter: Validate length before checksum List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 8dfb0805fc31cd78940429ab0560dae7e8ab6536 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 15:34:52 +0000 Message-Id: <6a0dd49c.45e35.f3ed5e8@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=8dfb0805fc31cd78940429ab0560dae7e8ab6536 commit 8dfb0805fc31cd78940429ab0560dae7e8ab6536 Author: Cy Schubert AuthorDate: 2026-05-11 15:44:52 +0000 Commit: Cy Schubert CommitDate: 2026-05-20 15:32:37 +0000 ipfilter: Validate length before checksum Validate the length of the packet listed in the mbuf is the same as the calculated packet length. If not reject the packet and bump the bad packet stat. PR: 295198 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57095 --- sys/netpfil/ipfilter/netinet/fil.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 9217572aac50..cabc6c350981 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -1991,7 +1991,7 @@ ipf_checkcipso(fr_info_t *fin, u_char *s, int ol) /* ------------------------------------------------------------------------ */ /* Function: ipf_makefrip */ -/* Returns: int - 0 == packet ok, -1 == packet freed */ +/* Returns: int - 0 == packet ok, -1 == packet freed or bad length */ /* Parameters: hlen(I) - length of IP packet header */ /* ip(I) - pointer to the IP header */ /* fin(IO) - pointer to packet information */ @@ -2019,14 +2019,23 @@ ipf_makefrip(int hlen, ip_t *ip, fr_info_t *fin) if (v == 4) { fin->fin_plen = ntohs(ip->ip_len); fin->fin_dlen = fin->fin_plen - hlen; - ipf_pr_ipv4hdr(fin); + if (fin->fin_m != NULL && fin->fin_m->m_flags & M_PKTHDR && fin->fin_m->m_pkthdr.len < fin->fin_plen) { + LBUMPD(ipf_stats[fin->fin_out], fr_bad); + return (-1); + } else { + ipf_pr_ipv4hdr(fin); + } #ifdef USE_INET6 } else if (v == 6) { fin->fin_plen = ntohs(((ip6_t *)ip)->ip6_plen); fin->fin_dlen = fin->fin_plen; fin->fin_plen += hlen; - - ipf_pr_ipv6hdr(fin); + if (fin->fin_m != NULL && fin->fin_m->m_flags & M_PKTHDR && fin->fin_m->m_pkthdr.len < fin->fin_plen) { + LBUMPD(ipf_stats[fin->fin_out], fr_v6_bad); + return (-1); + } else { + ipf_pr_ipv6hdr(fin); + } #endif } if (fin->fin_ip == NULL) { From nobody Wed May 20 15:34:53 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLFwG1GkVz6dyNN for ; Wed, 20 May 2026 15:34: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLFwF5j7wz3np0 for ; Wed, 20 May 2026 15:34:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779291293; 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; bh=4itdBTt6crRW7NbWzNmGj1Hwj4EWWhPqy9TZ3LHCfcI=; b=Lbc3NIn56bQ2lep0+PCV3dKPP9KV4CeytJlibaVQCtcUt7g/RwO3yjwl6kLU6EUdvYH723 jam2iwl1F9QxpRR9P+C8RLOevbetT0dVDqsd5AecpNHBOa9EWRAzLdZOq6LoGKq+HuOKH6 D81o86Bt/6MB3UcI5bcluy0oWrS6YSe+9hN6NXvtXPmuSwrtnHvYuXaF8cvt+t6lcU+Xfd 4evFvm+C1kCjvmrZ+F/AUcswfi3RWPgiGHkw8ZUvCAmgvkv8bgGbVpsQpVRST5D1MhD6j3 JNqRGL4XzxBzeGPr7pQ422H7yx0IzU7A7ljaGwymEHHUE3iNqlmV0qz0JSgm8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779291293; a=rsa-sha256; cv=none; b=bRmZir5tuMdAkqMRYWH861OtHktMxDQJhzmZ+SmWJTmb5N8TaOJ3Ru2s3oB1nn2hUFDf3z 4R2O473ElBBBgDlOD4J9jTz0Zc9D9dJZOPbQOQQjsDo1XjBIExrmjiS/YJQONyvfOYh9uC 9VO9XMXRuvbI5Dz7QBcsCR2oKGXziY/uChwwIgneiz67vzqONSlFlV2TjvlsSUGR9XFx+O 1fSh8USEK7qYrzcVQTqQgWk+j0w+CW1iLXn3OawhemIuJqmyNGOyd8uUWPDUTgiMHhVodR 7Ng5+mghRZNR4r5BdPtCYgqr1eyRQz8zGIX7iiti2OMY7bG0J6P340xEI3wL3w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779291293; 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; bh=4itdBTt6crRW7NbWzNmGj1Hwj4EWWhPqy9TZ3LHCfcI=; b=FDAC2U4sga7h+eL9y//l8VC0GERxWA7W2bgafFkHdtArcVOZE4udAh9qYFn9ch7YjwOXM/ v80hbcfaw8JbTqWTBppNQrc30yrccpPkLMln63BQTs6Ex2xkgRc8qQlOyxGktb2VUVeNCn xmjASH79U6ByLD4Zft5SDwjP4j0kVt9TJp/IK7t+ct1FyDHWOwkfcZP2Ruhmw/hJBKjH4c tav1FOYslYt+ychyTyeOWCBp8vf6PLS4hV0v1xWvN0eAnHc3JbZlMtstXrEpepEgIwIh2n 2gBCBzcM+2gF4FPl1RQz9Vcdf//lKXUPxGyomeoQedLnVaAm+pfFFmkpbskR5A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLFwF3Kw8z16j6 for ; Wed, 20 May 2026 15:34:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 46028 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 15:34:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Teddy Engel From: Cy Schubert Subject: git: 68ed81631afa - main - ipfilter: Add NULL check for fin_dp in ICMP packet handlers List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 68ed81631afa20c07883f7f60343f6da8397ee41 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 15:34:53 +0000 Message-Id: <6a0dd49d.46028.387f48d6@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=68ed81631afa20c07883f7f60343f6da8397ee41 commit 68ed81631afa20c07883f7f60343f6da8397ee41 Author: Teddy Engel AuthorDate: 2026-05-19 21:36:15 +0000 Commit: Cy Schubert CommitDate: 2026-05-20 15:33:43 +0000 ipfilter: Add NULL check for fin_dp in ICMP packet handlers Add NULL checks for fin->fin_dp in ipf_pr_icmp6() and ipf_pr_icmp() before dereferencing. When processing packets with IPv6 extension headers, ipf_pr_pullup() can succeed but fin->fin_dp may still be NULL due to extension header processing leaving insufficient data for the protocol header. PR: 288333 MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2214 Signed-off-by: Teddy Engel --- sys/netpfil/ipfilter/netinet/fil.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index cabc6c350981..4174fdcc5f58 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -890,6 +890,8 @@ ipf_pr_icmp6(fr_info_t *fin) ip6_t *ip6; icmp6 = fin->fin_dp; + if (icmp6 == NULL) + return; fin->fin_data[0] = *(u_short *)icmp6; @@ -1198,6 +1200,8 @@ ipf_pr_icmp(fr_info_t *fin) } icmp = fin->fin_dp; + if (icmp == NULL) + return; fin->fin_data[0] = *(u_short *)icmp; fin->fin_data[1] = icmp->icmp_id; From nobody Wed May 20 15:34:54 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLFwG62LLz6dxkY for ; Wed, 20 May 2026 15:34: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLFwG4ZSzz3nhV for ; Wed, 20 May 2026 15:34:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779291294; 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; bh=Y64HfE7dLz5ceURdj+7o2lyjzoSV8isoaVzN7wCoubU=; b=wyN6GTWtm9CuiYPkZTOLBgtzOjbOWYOzROH+QpbbZS7hzyxb9QSr6yAGuxtDOOVEkW9ZHR UOW8hr+nMZ/959CCl/pv/NJPFh8ebG8e94x52iLxAnq+4v05s6fkPcGnfdr5xgeojt8q0Q B9FtOnCbLgKacx1PPd3zOF1Uf8Q5/xq3ygvkwgH3/SA6d6Mt6zqYNCDutj909z+BZhEAHy l3m+DObXcyfXZuHAsCLnq6WVsF2QSvkIlxUgtdMuxHUGwxXOOyGkdY0BmlSdOiISPOYnPX ZtoHY9LFmHWA7SIMn6lSVbuCN24BZVxOpoiRFHC2m+pV9eEVuxFwAuCD8SiMyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779291294; a=rsa-sha256; cv=none; b=U0J/3uuBnoLHNddLsIsuwPfX7qg261HM18NMSYXkTkU9x+2ClxFinsr2mp40DWYAvZxFyv nwH+xYBSlTMhQtvM3B5l+3MitKhB8EGtMJcCMyxAfrX1NwWkwFb4+cPfrWLTq+RUtjqh2r hcRs5EbMliEKPyUHtHRkNaz1kVXpETH5gKOjUr3JiOcocZ8ZI/JFpXiZXEuC+S29tEsddl ZvcP1QSIfPUaU9z4bxrPQkESffFWtv7Ic69zA7xtH+LRCdjGvtqbynHil5vA8EZuGZL0Ag seHJ9m/bZI4BsEqAhMgECFyAfKNPmn/neOX2+DoKt2+c2yJu+v3JlReXUkSF6Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779291294; 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; bh=Y64HfE7dLz5ceURdj+7o2lyjzoSV8isoaVzN7wCoubU=; b=sPFanmXC2fNRKU/TpJDJSWe81KmNlk9IDuMr5maJAeet9HT+r2PcvN+d/nx2szWX7A3se+ 2XbpWfLRhe5uTRN/LlugbfA3eA0GCiK1Qq4xBEygyMIv9i0iY7hNZ3u7LAKD40LPWO/lei NR09X/cJFstlI/J1vRpKxBfCpOTDQIQtbc8lMYawsr6bT583o9IWnWy78+vsjW177BRWXH FLNfNDv+zVlKDY5ULzKUPoykx7P0nZpbiqRfHjT04veF6oF0gjoC95Jo4WB2tnZoDOUTGL 4C5poSd18kQp8nUk0hUxwi652Oxfa0/JFxJXAPaieAeaq+F8wl9X175KP10USA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLFwG4B0Hz16hS for ; Wed, 20 May 2026 15:34:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 440f3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 15:34:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Teddy Engel From: Cy Schubert Subject: git: cdc40489a7a6 - main - ipfilter: Add NULL check for fin_m in ipf_pr_icmp6() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: cdc40489a7a617b742e295cf9005b3569b45e823 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 15:34:54 +0000 Message-Id: <6a0dd49e.440f3.47744cc0@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=cdc40489a7a617b742e295cf9005b3569b45e823 commit cdc40489a7a617b742e295cf9005b3569b45e823 Author: Teddy Engel AuthorDate: 2026-05-19 21:36:23 +0000 Commit: Cy Schubert CommitDate: 2026-05-20 15:33:43 +0000 ipfilter: Add NULL check for fin_m in ipf_pr_icmp6() Add NULL check for fin->fin_m before calling M_LEN() in the ICMPv6 error handling code path. When ipf_checkicmp6matchingstate() calls ipf_makefrip() with a synthesized fr_info_t that has fin_m set to NULL, the subsequent call to ipf_pr_ipv6hdr() can reach ipf_pr_icmp6() which would crash when trying to access the mbuf via M_LEN(). PR: 288333 MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2214 Signed-off-by: Teddy Engel --- sys/netpfil/ipfilter/netinet/fil.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/netpfil/ipfilter/netinet/fil.c b/sys/netpfil/ipfilter/netinet/fil.c index 4174fdcc5f58..7b646d0d55db 100644 --- a/sys/netpfil/ipfilter/netinet/fil.c +++ b/sys/netpfil/ipfilter/netinet/fil.c @@ -916,6 +916,9 @@ ipf_pr_icmp6(fr_info_t *fin) if (fin->fin_plen < ICMP6ERR_IPICMPHLEN) break; + if (fin->fin_m == NULL) + break; + if (M_LEN(fin->fin_m) < fin->fin_plen) { if (ipf_coalesce(fin) != 1) return; From nobody Wed May 20 15:34:55 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLFwJ0h0Fz6dyQs for ; Wed, 20 May 2026 15:34: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLFwH5CB1z3nyR for ; Wed, 20 May 2026 15:34:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779291295; 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; bh=S8LgUdEYOq5yPXpLbSuQSm9SBZqsq3AFuKMM9B9Y47g=; b=KJsZNhi6Wk+xDwiWbrSLDkM6VBfIPEyLQmB69NOjrcL44tBkUVKbGe1UAoGDvpZOgfzeQc jzrnSvP8pLhgaYaDVG1Zn15Iwl/GSbLWW7ESIrrJWRSG9cE27ujJCw5Cc37JWVdp1L9hQm oyChI8ohFD9sa3NxEOxsl/DBguXBBVuKEfZeNecA1Kr2kd185btdjAcgFHfJOysUYrx0Ae 1Fy40Zg404ZUXzaO5QPcdjdKMGt0XjpOqVMLz3KdKwosoxrB51Sh7qFlrsLHDr07duejyl mVSbKzCkWSLaJY8oJgFdzYlLsr7fi1PKotH9XHCipNyhHf6MTcvAMTwva2aM4Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779291295; a=rsa-sha256; cv=none; b=OFCvED6J35aK0wzLshsPARdvcZm2n0/pKHe86ycKiD5h/wbdruNMTX/KKQuNJBsFqq69Ln 7Zn5eirxiPkDW5oBig176Ywd2dTDe5UH6WGt2/538QmCwTx2cYqJaZdWHPhuMMkqXltaog x4MLZEk9XkxgnWL6ntyNmanQDNRoLSMnpZYhqYBDTyoBZoKzBfLWcmW+fawNBsL3ZA0SYn 7k9pPSRozCz8EfNCS3Mn9PkStRrQKvkxFPkw1xxeiDfRxNS/sDXpiwFput5PcxkIATUIjY AVWkUHKQIkmbkIXq/rofZyayrYO7SDHlIIOyUzqsGnZJCDwL1D68F91OKFNkYA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779291295; 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; bh=S8LgUdEYOq5yPXpLbSuQSm9SBZqsq3AFuKMM9B9Y47g=; b=D5jUZXB/4MTL1tv+gNR4lSWWRkSCtAY7qqI4oDCheRocsQNm3PRcOI1PYZnCd+KCjPJ5MD 7gbXlRRcXaGjzqfssi5KFbG6LfUUT9thruT21ilvmqJFuWo8zainQW9A8/vuxyCbLe+l9I a9Iqy16L4MZLhxdbbrUcQeRdP0dAcMw/+zTmRoVwyEijYBtLP9wxBwxyzvWJBVa3/DobPT F1egmImOj1BxjOGCdRop7ucb4NyRV0Sd8o5zVEvDqsRQpUBrCEzvBjnZsIBqYCNAXM4O76 eSVTc/97TQsChLOCZHIRwH7ms1qmk9GqooWVpIbGItp3dqWlCJoOg4+Rzl0EWw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLFwH4pQMz16j8 for ; Wed, 20 May 2026 15:34:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45b13 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 15:34:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Teddy Engel From: Cy Schubert Subject: git: c028080749c0 - main - ipfilter: Fix NULL dereferences in ipf_checkicmp6matchingstate() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: c028080749c09e68c555155df0e9f681ba63c6ae Auto-Submitted: auto-generated Date: Wed, 20 May 2026 15:34:55 +0000 Message-Id: <6a0dd49f.45b13.511e86bf@gitrepo.freebsd.org> The branch main has been updated by cy: URL: https://cgit.FreeBSD.org/src/commit/?id=c028080749c09e68c555155df0e9f681ba63c6ae commit c028080749c09e68c555155df0e9f681ba63c6ae Author: Teddy Engel AuthorDate: 2026-05-19 21:36:33 +0000 Commit: Cy Schubert CommitDate: 2026-05-20 15:33:43 +0000 ipfilter: Fix NULL dereferences in ipf_checkicmp6matchingstate() Add NULL checks for ic6 (the ICMPv6 header pointer from fin->fin_dp) and oic (the inner ICMPv6 header from ofin.fin_dp after ipf_makefrip). These pointers can be NULL when processing malformed ICMPv6 error packets with extension headers. Also fix the length validation: the original check (fin->fin_plen < sizeof(ip6_t)) could never trigger because an earlier check already ensures fin->fin_plen >= ICMP6ERR_MINPKTLEN (48). Replace with a proper check that fin->fin_dlen contains at least ICMPERR_ICMPHLEN + sizeof(ip6_t) bytes to ensure sufficient data exists for both the ICMPv6 error header and the embedded IPv6 header. PR: 288333 MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2214 Signed-off-by: Teddy Engel --- sys/netpfil/ipfilter/netinet/ip_state.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/ipfilter/netinet/ip_state.c b/sys/netpfil/ipfilter/netinet/ip_state.c index c8d6e4e0feb3..d5a04e326321 100644 --- a/sys/netpfil/ipfilter/netinet/ip_state.c +++ b/sys/netpfil/ipfilter/netinet/ip_state.c @@ -4364,9 +4364,13 @@ ipf_checkicmp6matchingstate(fr_info_t *fin) } ic6 = fin->fin_dp; + if (ic6 == NULL) { + SBUMPD(ipf_state_stats, iss_icmp6_miss); + return (NULL); + } oip6 = (ip6_t *)((char *)ic6 + ICMPERR_ICMPHLEN); - if (fin->fin_plen < sizeof(*oip6)) { + if (fin->fin_dlen < ICMPERR_ICMPHLEN + sizeof(*oip6)) { SBUMPD(ipf_state_stats, iss_icmp_short); return (NULL); } @@ -4408,6 +4412,10 @@ ipf_checkicmp6matchingstate(fr_info_t *fin) if (oip6->ip6_nxt == IPPROTO_ICMPV6) { oic = ofin.fin_dp; + if (oic == NULL) { + SBUMPD(ipf_state_stats, iss_icmp6_miss); + return (NULL); + } /* * an ICMP error can only be generated as a result of an * ICMP query, not as the response on an ICMP error From nobody Wed May 20 15:47:35 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLGC26fgXz6dyrQ for ; Wed, 20 May 2026 15:47:42 +0000 (UTC) (envelope-from mail@fbsd2.e4m.org) Received: from mail.e4m.org (mail.e4m.org [IPv6:2a03:4000:66:f68::1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mail.e4m.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLGC21NVdz3rcS for ; Wed, 20 May 2026 15:47:42 +0000 (UTC) (envelope-from mail@fbsd2.e4m.org) Authentication-Results: mx1.freebsd.org; dkim=pass header.d=e4m.org header.s=s header.b=jrKpflFf; dmarc=pass (policy=quarantine) header.from=e4m.org; spf=pass (mx1.freebsd.org: domain of mail@fbsd2.e4m.org designates 2a03:4000:66:f68::1 as permitted sender) smtp.mailfrom=mail@fbsd2.e4m.org; arc=pass ("e4m.org:s=s:i=1") ARC-Filter: OpenARC Filter v1.0 mail.e4m.org 64KFleIi043664 ARC-Seal: i=1; d=e4m.org; s=s; a=rsa-sha256; cv=none; t=1779292061; b=F6E3W5wbFny/ncrNvRK8knZSWCK55WhNbmZFVbny6raSnHHhe26Y59hYGH21bk9oUtiD AzK2cLeEcmxWYqfEeOOFyp/xy1XZEK4cT4tvlrlovSEncoUWW5SHhG12hl+7CgTJ22tYi CuRueT444oQ76UCj/UdieSzABjQnAVfYqtpy31UoUWW2dLSRniIjbcQCPa3trsuwY6FeU h3WMVGBC1dUhXagM1db6APbD88vtlFbEcpD+u1cANxwFZWPh8YgORj6eSM7O9qClRnQmq +9kbHyrGoCQdx1W64T9wOBSnx1+MJ7F58Avz250guczhC2FpS204ghcnukb1a9opu+g== ARC-Message-Signature: i=1; d=e4m.org; s=s; a=rsa-sha256; c=relaxed/relaxed; t=1779292061; h=DKIM-Filter:DKIM-Signature:Received:Received:Received:Date:From:To: Cc:Subject:Message-ID:References:MIME-Version:Content-Type: Content-Disposition:In-Reply-To; bh=QJeZ+d1yB/R97H/8xBF4EUNewLzFBknrYACiizGU7Uo=; b=NZm7bPckYgcD5wfZGn8cVFvCpm7Y32MU+00QWx/x21Ea1p9jKUAZaQVZh0gIL9axYnnz ANO6HK+MDn5gaKGtAfRPSDgAh9DKtYiy3TCPJo+c+VKPrGZzA/rjUrhyw/CE414ZXed56 oazlMZl7JIrIG8rWprnxSK1kezedwA9pR4IhTagv9nQVlcmrtFkXi1Gcybt54fH6OOKNn +Jhoex9sG8ZUmutWVXeZjhRvvUE6cmgus/3wa49xzwx1Ooqs5czBEoV52RIeix8LWEFwu pTRRZJt+6Oct+qEf8pEBQUGlkSeKz5juBL9exqQ3l/GMuWAbKJ5ZVWoN6j82af+oodQ== ARC-Authentication-Results: i=1; mail.e4m.org; arc=none smtp.remote-ip="2a02:3100:a600:a766:ec4:7aff:fee6:add0" DKIM-Filter: OpenDKIM Filter v1.0 mail.e4m.org 64KFleIi043664 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=e4m.org; s=s; t=1779292061; i=@e4m.org; bh=QJeZ+d1yB/R97H/8xBF4EUNewLzFBknrYACiizGU7Uo=; h=Date:From:To:Cc:Subject:References:In-Reply-To:Date:From:To: Subject:Reply-to:Cc:In-reply-to:References; b=jrKpflFf9hxCuSavLkMjgsup94ufEo42xdY7luAN0go0r9Dg9MMTBvaDGpp8GH3YN w9UhikFme0/QdieRn/kl6FT5EkoE5ajqw3APDNHQn8K5A0sGuR0nhc0SBgXhw9I3a2 nHk/V2GSefPvhrLos+PhpX3HLpizfX2QOvuWYJTlYHLLU/tY6EA1Z+KsdnFjTYIyGh kl4zsR0PwUwvnD8hjOrH2Y9lnnbP/98zipMMDDudgehSqmDrqoCm+YHWUJYEe3Vz0Y rwXrG/vQUATvUT3/QWAzC+CInG7INPCeRCDHLNRUKPFNjztfodPs/Q6yUp6Lrj9jqL MgxlALd1/OtLQ== Received: from dynamic-2a02-3100-a600-a766-0ec4-7aff-fee6-add0.310.pool.telefonica.de (dynamic-2a02-3100-a600-a766-0ec4-7aff-fee6-add0.310.pool.telefonica.de [IPv6:2a02:3100:a600:a766:ec4:7aff:fee6:add0]) (authenticated bits=128) by mail.e4m.org (8.18.1/8.18.1) with ESMTPSA id 64KFleIi043664 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=FAIL); Wed, 20 May 2026 17:47:41 +0200 (CEST) (envelope-from mail@fbsd2.e4m.org) Received: from stationary.client ([IPv6:fd00:0:0:0:0:0:0:3]) by gate.local (8.18.1/8.18.1) with ESMTPS id 64KFlZKq071356 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO); Wed, 20 May 2026 17:47:35 +0200 (CEST) (envelope-from mail@fbsd2.e4m.org) Received: from submit.client ([127.0.0.1]) by voyager.local (8.18.1/8.18.1) with ESMTP id 64KFlZnC019511; Wed, 20 May 2026 17:47:35 +0200 (CEST) (envelope-from mail@fbsd2.e4m.org) Received: (from user@localhost) by voyager.local (8.18.1/8.18.1/Submit) id 64KFlZwh019510; Wed, 20 May 2026 17:47:35 +0200 (CEST) (envelope-from mail@fbsd2.e4m.org) Date: Wed, 20 May 2026 17:47:35 +0200 From: Andre Albsmeier To: Kirk McKusick Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org, mail@fbsd2.e4m.org Subject: Re: git: 1111a44301da - main - Defer the January 19, 2038 date limit in UFS1 filesystems to February 7, 2106 Message-ID: References: <202501310131.50V1VRl9002826@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202501310131.50V1VRl9002826@gitrepo.freebsd.org> X-Spamd-Result: default: False [-5.00 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; ARC_ALLOW(-1.00)[e4m.org:s=s:i=1]; NEURAL_HAM_LONG(-1.00)[-1.000]; NEURAL_HAM_SHORT(-1.00)[-0.997]; DMARC_POLICY_ALLOW(-0.50)[e4m.org,quarantine]; R_DKIM_ALLOW(-0.20)[e4m.org:s=s]; R_SPF_ALLOW(-0.20)[+a:mail.e4m.org:c]; MIME_GOOD(-0.10)[text/plain]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; DKIM_TRACE(0.00)[e4m.org:+]; RCVD_COUNT_THREE(0.00)[4]; FROM_HAS_DN(0.00)[]; ASN(0.00)[asn:197540, ipnet:2a03:4000::/32, country:DE]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MISSING_XM_UA(0.00)[]; TO_MATCH_ENVRCPT_SOME(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; MLMMJ_DEST(0.00)[dev-commits-src-main@FreeBSD.org]; RCPT_COUNT_FIVE(0.00)[5] X-Spamd-Bar: ---- X-Rspamd-Queue-Id: 4gLGC21NVdz3rcS On Fri, 31-Jan-2025 at 01:31:27 +0000, Kirk McKusick wrote: > The branch main has been updated by mckusick: > > URL: https://cgit.FreeBSD.org/src/commit/?id=1111a44301da39d7b7459c784230e1405e8980f8 > > commit 1111a44301da39d7b7459c784230e1405e8980f8 > Author: Kirk McKusick > AuthorDate: 2025-01-31 01:27:59 +0000 > Commit: Kirk McKusick > CommitDate: 2025-01-31 01:31:08 +0000 > > Defer the January 19, 2038 date limit in UFS1 filesystems to February 7, 2106 > ... Should the calls to ffs_oldfscompat_inode_read() in ffsck's inode.c (see below) be made conditionally? Maybe depending on some loader hint or wheter fsck runs in preen mode? This is what happened: A server which runs 24/7 and is using UFS1 had a short power outage. Next day I found stuff like ... - 32705 -r-sr-xr-x 1 root wheel 23744 2026-05-08T18:40:37 /usr/bin/login + 32705 -r-sr-xr-x 1 root wheel 23744 2024-02-16T16:34:12 /usr/bin/login @@ -20 +20 @@ - 32751 -r-xr-sr-x 1 root kmem 190944 2026-05-08T18:40:39 /usr/bin/netstat + 32751 -r-xr-sr-x 1 root kmem 190944 2024-02-16T16:33:25 /usr/bin/netstat ... in the daily security output. In fact, timestamps of most files were set to 2024-02-16. This happened because the CMOS battery was down and when power came back, the machine started with the BIOS build date. When fsck ran, ffs_oldfscompat_inode_read() found that this is UFS1 with the various inode times being newer than "now" and changed them to "now". So maybe some knob to disable this (at least for fsck when being run during startup) could help - at least for people who are sure not to have files older that 1970... > --- a/sbin/fsck_ffs/inode.c > +++ b/sbin/fsck_ffs/inode.c > @@ -46,6 +46,7 @@ > #include "fsck.h" > > struct bufarea *icachebp; /* inode cache buffer */ > +static time_t now; /* current time of day */ > > static int iblock(struct inodesc *, off_t isize, int type); > static ufs2_daddr_t indir_blkatoff(ufs2_daddr_t, ino_t, ufs_lbn_t, ufs_lbn_t, > @@ -429,6 +430,7 @@ void > ginode(ino_t inumber, struct inode *ip) > { > ufs2_daddr_t iblk; > + union dinodep dpp; > struct ufs2_dinode *dp; > > if (inumber < UFS_ROOTINO || inumber >= maxino) > @@ -466,10 +468,14 @@ ginode(ino_t inumber, struct inode *ip) > if (sblock.fs_magic == FS_UFS1_MAGIC) { > ip->i_dp = (union dinode *) > &ip->i_bp->b_un.b_dinode1[inumber - ip->i_bp->b_index]; > + dpp.dp1 = (struct ufs1_dinode *)ip->i_dp; > + if (ffs_oldfscompat_inode_read(&sblock, dpp, now)) > + inodirty(ip); > return; > } > ip->i_dp = (union dinode *) > &ip->i_bp->b_un.b_dinode2[inumber - ip->i_bp->b_index]; > + dpp.dp2 = dp = (struct ufs2_dinode *)ip->i_dp; > /* Do not check hash of inodes being created */ > if (dp->di_mode != 0 && ffs_verify_dinode_ckhash(&sblock, dp)) { > pwarn("INODE CHECK-HASH FAILED"); > @@ -481,6 +487,8 @@ ginode(ino_t inumber, struct inode *ip) > inodirty(ip); > } > } > + if (ffs_oldfscompat_inode_read(&sblock, dpp, now)) > + inodirty(ip); > } > > /* > @@ -519,6 +527,7 @@ getnextinode(ino_t inumber, int rebuiltcg) > mode_t mode; > ufs2_daddr_t ndb, blk; > union dinode *dp; > + union dinodep dpp; > struct inode ip; > static caddr_t nextinop; > > @@ -551,8 +560,10 @@ getnextinode(ino_t inumber, int rebuiltcg) > dp = (union dinode *)nextinop; > if (sblock.fs_magic == FS_UFS1_MAGIC) { > nextinop += sizeof(struct ufs1_dinode); > + dpp.dp1 = (struct ufs1_dinode *)dp; > } else { > nextinop += sizeof(struct ufs2_dinode); > + dpp.dp2 = (struct ufs2_dinode *)dp; > } > if ((ckhashadd & CK_INODE) != 0) { > ffs_update_dinode_ckhash(&sblock, (struct ufs2_dinode *)dp); > @@ -572,6 +583,8 @@ getnextinode(ino_t inumber, int rebuiltcg) > dirty(&inobuf); > } > } > + if (ffs_oldfscompat_inode_read(&sblock, dpp, now)) > + dirty(&inobuf); > if (rebuiltcg && (char *)dp == inobuf.b_un.b_buf) { > /* > * Try to determine if we have reached the end of the From nobody Wed May 20 19:35:43 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLMG749JGz6fHxj for ; Wed, 20 May 2026 19:35: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLMG73YTzz3QJg for ; Wed, 20 May 2026 19:35:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779305743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DKXLn3db4mmgGKFGBlsOaGtwOydA3F8TlQl5IObpP8k=; b=VlIlaGGVjBcxsgpf4xFicNX058QhCDrYHVeG6QwT9JcCEMuwXG3FxMg8h7cMsZiAN4KdQ7 xDNQ3bjRiFv3aLi/VeQEObik05Oo+7ZwT9p0JVfHGhic7EXA19Vqw35mCU4ZWfas0XjmGy 4YNlneYeQM25Ldw/x7ie+SBgiZZ6LIa/zuZQ4cNI51SNMV0H60CaU63RYixLBDIJe7ARj+ RHzd6FQCuHb4L0Myx1XYno3PYGaMxGRKOOIxKSU3HOQAvWVe+fkw0kDvofIGVjsI7PlDl/ 8tWqPUCu9ADtIF2ubBwGQ6dB0NKuryM9UJ+imMcZEQMBXWgQKHf/79mmBWR67w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779305743; a=rsa-sha256; cv=none; b=rNcK2b23goEXHleS0fie8gp2kcZgQEKFyp07fMUWl5bV98dXi+y/aky3es/OfmrGPLiCCv d618bQT3qWfi3KEcEi+HzoqyTxRWj72DyMlhQmrL6A87jBUc8rDTnb9rCFw0Pr7RcWERCE jiO4r6qS95cun25BYA+wWERwWKs62Rjmx7Qqo/2+++x8wjG4cGy8nF5RRZooG0WBm+JMM8 t0elgN/ACDD0oBZXaQIlFf/MfqwjDuPhmdbigeKd143vTbU9HwaMnlBIbOKYuh+LHl/LXo TyGPwgLxlyRfhEm2Y26G6U63IUFnKEs70Ns9d8pdTIP+0yCz0U1VkBBQnJYW5Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779305743; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DKXLn3db4mmgGKFGBlsOaGtwOydA3F8TlQl5IObpP8k=; b=Vq5hjlFda+RKBMfu44ijGhSIHIDCdD5+peTwjW0dt91kYzwccTGU91AJ9wqIMwFUy7EFjL 50XJZb6gnqDRoGEpK6H6IFVj4oFcSv6g/Kjwvw+j57a19r8KRCR4LkutkgcFi/VyvIEQpW TBmSEWxSsZ4v5uxQGvQG23giWSuAdDVpQKBHeYDhpoVhQHq/VxsS18SYvEMizI4caelPyM /ya7zkWPcOOXUzH1rEMbNjSCMJQpugAkG2ZH0LUQTtTAHlupzKMwZxay9yX3Hz21G+ayxs zbewSlw17QyqJkpxDUa2zTqRpulV78yGPw9ZWBZVBBf/xK5FrENF3hoqFnp4hw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLMG7389Yz1DrV for ; Wed, 20 May 2026 19:35:43 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3840a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 19:35:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4b6a23eb8a7e - main - procdesc: Make sure to drain selinfo sleepers in procdesc_free() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 4b6a23eb8a7e4b137d9e1b527d1fa84c950484eb Auto-Submitted: auto-generated Date: Wed, 20 May 2026 19:35:43 +0000 Message-Id: <6a0e0d0f.3840a.2b84911a@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4b6a23eb8a7e4b137d9e1b527d1fa84c950484eb commit 4b6a23eb8a7e4b137d9e1b527d1fa84c950484eb Author: Mark Johnston AuthorDate: 2026-05-08 13:03:49 +0000 Commit: Mark Johnston CommitDate: 2026-05-20 19:34:50 +0000 procdesc: Make sure to drain selinfo sleepers in procdesc_free() Otherwise they are left on a freed list after procdesc_free() is called. This can be exploited to elevate privileges. Remove the PDF_SELECTED micro-optimization. doselwakeup() is a no-op if no one ever called selrecord() on the file description, so I see no reason to complicate the code to avoid the call. Add some regression tests. Approved by: so Security: FreeBSD-SA-26:19.file Security: CVE-2026-45251 Reported by: 75Acol, Lexpl0it, fcgboy, and robinzeng2015 Reviewed by: kib, oshogbo Fixes: cfb5f7686588 ("Add experimental support for process descriptors") Differential Revision: https://reviews.freebsd.org/D56887 --- sys/kern/sys_procdesc.c | 10 ++---- sys/sys/procdesc.h | 1 - tests/sys/kern/Makefile | 1 + tests/sys/kern/procdesc.c | 86 ++++++++++++++++++++++++++++++++++++++++++++++- 4 files changed, 89 insertions(+), 9 deletions(-) diff --git a/sys/kern/sys_procdesc.c b/sys/kern/sys_procdesc.c index ec3b37f96148..9360ec147f8a 100644 --- a/sys/kern/sys_procdesc.c +++ b/sys/kern/sys_procdesc.c @@ -274,6 +274,7 @@ procdesc_free(struct procdesc *pd) if (pd->pd_pid != -1) proc_id_clear(PROC_ID_PID, pd->pd_pid); + seldrain(&pd->pd_selinfo); knlist_destroy(&pd->pd_selinfo.si_note); PROCDESC_LOCK_DESTROY(pd); free(pd, M_PROCDESC); @@ -316,10 +317,7 @@ procdesc_exit(struct proc *p) procdesc_free(pd); return (1); } - if (pd->pd_flags & PDF_SELECTED) { - pd->pd_flags &= ~PDF_SELECTED; - selwakeup(&pd->pd_selinfo); - } + selwakeup(&pd->pd_selinfo); KNOTE_LOCKED(&pd->pd_selinfo.si_note, NOTE_EXIT); PROCDESC_UNLOCK(pd); @@ -438,10 +436,8 @@ procdesc_poll(struct file *fp, int events, struct ucred *active_cred, PROCDESC_LOCK(pd); if (pd->pd_flags & PDF_EXITED) revents |= POLLHUP; - if (revents == 0) { + else selrecord(td, &pd->pd_selinfo); - pd->pd_flags |= PDF_SELECTED; - } PROCDESC_UNLOCK(pd); return (revents); } diff --git a/sys/sys/procdesc.h b/sys/sys/procdesc.h index b477903f8053..a6be5dbe576c 100644 --- a/sys/sys/procdesc.h +++ b/sys/sys/procdesc.h @@ -86,7 +86,6 @@ struct procdesc { * Flags for the pd_flags field. */ #define PDF_CLOSED 0x00000001 /* Descriptor has closed. */ -#define PDF_SELECTED 0x00000002 /* Issue selwakeup(). */ #define PDF_EXITED 0x00000004 /* Process exited. */ #define PDF_DAEMON 0x00000008 /* Don't exit when procdesc closes. */ diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index a06e8702f16d..fb75720114ac 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -104,6 +104,7 @@ LIBADD.kcov+= pthread CFLAGS.ktls_test+= -DOPENSSL_API_COMPAT=0x10100000L LIBADD.ktls_test+= crypto util LIBADD.listener_wakeup+= pthread +LIBADD.procdesc+= pthread LIBADD.shutdown_dgram+= pthread LIBADD.socket_msg_waitall+= pthread LIBADD.socket_splice+= pthread diff --git a/tests/sys/kern/procdesc.c b/tests/sys/kern/procdesc.c index 3334ee404518..2d710ef057f2 100644 --- a/tests/sys/kern/procdesc.c +++ b/tests/sys/kern/procdesc.c @@ -2,6 +2,7 @@ * SPDX-License-Identifier: BSD-2-Clause * * Copyright (c) 2026 ConnectWise + * Copyright (c) 2026 Mark Johnston * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions @@ -32,8 +33,12 @@ #include #include -#include +#include +#include #include +#include + +#include /* Tests for procdesc(4) that aren't specific to any one syscall */ @@ -90,9 +95,88 @@ ATF_TC_BODY(pid_recycle, tc) close(pd); } +static void * +poll_procdesc(void *arg) +{ + struct pollfd pfd; + + pfd.fd = *(int *)arg; + pfd.events = POLLHUP; + (void)poll(&pfd, 1, 5000); + return ((void *)(uintptr_t)pfd.revents); +} + +/* + * Regression test to exercise the case where a procdesc is closed while a + * thread is poll()ing it. + */ +ATF_TC_WITHOUT_HEAD(poll_close_race); +ATF_TC_BODY(poll_close_race, tc) +{ + pthread_t thr; + pid_t pid; + uintptr_t revents; + int error, pd; + + pid = pdfork(&pd, PD_DAEMON); + ATF_REQUIRE_MSG(pid >= 0, "pdfork: %s", strerror(errno)); + if (pid == 0) { + pause(); + _exit(0); + } + + error = pthread_create(&thr, NULL, poll_procdesc, &pd); + ATF_REQUIRE_MSG(error == 0, "pthread_create: %s", strerror(error)); + + /* Wait for the thread to block in poll(2). */ + usleep(250000); + + ATF_REQUIRE_MSG(close(pd) == 0, "close: %s", strerror(errno)); + + error = pthread_join(thr, (void *)&revents); + ATF_REQUIRE_MSG(error == 0, "pthread_join: %s", strerror(error)); + ATF_REQUIRE_EQ(revents, POLLNVAL); +} + +/* + * Verify that poll(2) of a procdesc returns POLLHUP when the process exits. + */ +ATF_TC_WITHOUT_HEAD(poll_exit_wakeup); +ATF_TC_BODY(poll_exit_wakeup, tc) +{ + pthread_t thr; + uintptr_t revents; + pid_t pid; + int error, pd; + + pid = pdfork(&pd, PD_DAEMON); + ATF_REQUIRE_MSG(pid >= 0, "pdfork: %s", strerror(errno)); + if (pid == 0) { + pause(); + _exit(0); + } + + error = pthread_create(&thr, NULL, poll_procdesc, &pd); + ATF_REQUIRE_MSG(error == 0, "pthread_create: %s", strerror(error)); + + /* Wait for the thread to block in poll(2). */ + usleep(250000); + + ATF_REQUIRE_MSG(pdkill(pd, SIGKILL) == 0, + "pdkill: %s", strerror(errno)); + + error = pthread_join(thr, (void *)&revents); + ATF_REQUIRE_MSG(error == 0, "pthread_join: %s", strerror(error)); + ATF_REQUIRE_EQ(revents, POLLHUP); + + ATF_REQUIRE_MSG(close(pd) == 0, "close: %s", strerror(errno)); +} + ATF_TP_ADD_TCS(tp) { ATF_TP_ADD_TC(tp, pid_recycle); + ATF_TP_ADD_TC(tp, poll_close_race); + ATF_TP_ADD_TC(tp, poll_exit_wakeup); return (atf_no_error()); } From nobody Wed May 20 19:35:44 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLMG91kHbz6fJ15 for ; Wed, 20 May 2026 19:35: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLMG84Pcpz3QZT for ; Wed, 20 May 2026 19:35:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779305744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UQQ66EMwoOuENiSxU7/dTUJeiq42czj+bODQFIf/804=; b=cJCGeEieEdR5PPOFu5XiJHgYmaj3qOciSoBvVCqsIQUbPwIl88w2O2QZDJn7dNLOJEX36c 06Clodp5zKzqxfpFw1CoGks6YwlU0luyfoYsH44dz3CAsCoQb7dPNGMtXsn1/YnTJcJ2Mq Y8cuQNo07tLanFy/tb1YiyGer1CAIohswHETKcD1e8kGXjX9awD5cUfU47qyORC3U16Bwb CBe2eTUKKoUwCQEWyLbSnRluCdCWuzwcr0RdB5UKEy2R3N12+1ehck+H5/cSVzpIZi4dqo 0m6kO5vjqk5xE3ochRj/BPHdZ8PAWmtzdm/9nQGmhdL9EEXjBkoqC0IQUznyoQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779305744; a=rsa-sha256; cv=none; b=LoNpZsPQqTWEgui5q7/pQKqgRvd3c1LD7FJC2Vf4MoYkHV6kejBCmNPmvGXzcoxgFdSufp becds3GXc8b/5hiuHsGHkvLcHgS0deLPkICIXPBpGEVsQpIHrS1TTSmmFRqWzE4TpIVKOk cO8/X+43ztcKsHmZjRVkew7xRQliE9T36DQzUWuhmVdAfP9WyeeC8I0bCuMG/rtx9N6SsW h/SxO5sv2URttptw00fb4O63aXaT/fm3Q++gUugz5uBzPE9ycpmx93Gr0yd6aqsCVgrmiE SEAGlgprvIJL1+IfnBf/9/OszTfj0Gb1PqqY/Tvq7ndXtVcMY1iStaB5a+fOdw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779305744; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UQQ66EMwoOuENiSxU7/dTUJeiq42czj+bODQFIf/804=; b=quq9Xs9bsd4MfsLawNnzCzCombVorK5CbrC8TtHTZJy7FyuSWyujnoMB9ihraOYKWLQEau uU/jNXChKohVDIWXn+NUlgE8wmzkMA8wgnBPCPfhdcaNhX/fK6ggz/W4oey/mrwF+mS9GK SFIu28aSNSagIHkQ4ogDdoi62srpVUAuaPzh9pNEFo7TBjAm90aeLukpe1KH5JMua2vQfV MZwYMTwff+Ognwa+0fzQpDv55+4FM+4CDmZy+UUqY/sF10FooU22LaEqQ4Avv16bOxuSZR lJk29yxjR4f9LxYMPDwSdVIRIC1KGjGFfg1g7Wsuz/202pF6R0yvK1YDk2V69Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLMG83zw2z1DhD for ; Wed, 20 May 2026 19:35:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 374b2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 19:35:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: f95da272b8b7 - main - jaildesc: Make sure to drain selinfo sleepers in jaildesc_close() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: f95da272b8b7138008542022af3dc7ead3ff2ce2 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 19:35:44 +0000 Message-Id: <6a0e0d10.374b2.322ac261@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=f95da272b8b7138008542022af3dc7ead3ff2ce2 commit f95da272b8b7138008542022af3dc7ead3ff2ce2 Author: Mark Johnston AuthorDate: 2026-05-10 15:15:45 +0000 Commit: Mark Johnston CommitDate: 2026-05-20 19:34:50 +0000 jaildesc: Make sure to drain selinfo sleepers in jaildesc_close() Otherwise they may be left on a freed selinfo list after the corresponding jaildesc struct is freed. This can be exploited to elevate privileges. Remove the JDF_SELECTED micro-optimization. doselwakeup() is a no-op if no one ever called selrecord() on the file description, so I see no reason to complicate the code to avoid the call. Add some regression tests. Approved by: so Security: FreeBSD-SA-26:19.file Security: CVE-2026-45251 Fixes: 66d8ffe3046d ("jaildesc: add kevent support") Reviewed by: kib, jamie Differential Revision: https://reviews.freebsd.org/D56945 --- sys/kern/kern_jaildesc.c | 10 +-- sys/sys/jaildesc.h | 1 - tests/sys/kern/Makefile | 2 + tests/sys/kern/jaildesc.c | 201 ++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 206 insertions(+), 8 deletions(-) diff --git a/sys/kern/kern_jaildesc.c b/sys/kern/kern_jaildesc.c index 80d0f3d07d7c..e2e3246ea92b 100644 --- a/sys/kern/kern_jaildesc.c +++ b/sys/kern/kern_jaildesc.c @@ -232,10 +232,7 @@ jaildesc_knote(struct prison *pr, long hint) JAILDESC_LOCK(jd); if (hint == NOTE_JAIL_REMOVE) { jd->jd_flags |= JDF_REMOVED; - if (jd->jd_flags & JDF_SELECTED) { - jd->jd_flags &= ~JDF_SELECTED; - selwakeup(&jd->jd_selinfo); - } + selwakeup(&jd->jd_selinfo); } KNOTE_LOCKED(&jd->jd_selinfo.si_note, hint); JAILDESC_UNLOCK(jd); @@ -292,6 +289,7 @@ jaildesc_close(struct file *fp, struct thread *td) } prison_free(pr); } + seldrain(&jd->jd_selinfo); knlist_destroy(&jd->jd_selinfo.si_note); JAILDESC_LOCK_DESTROY(jd); free(jd, M_JAILDESC); @@ -311,10 +309,8 @@ jaildesc_poll(struct file *fp, int events, struct ucred *active_cred, JAILDESC_LOCK(jd); if (jd->jd_flags & JDF_REMOVED) revents |= POLLHUP; - if (revents == 0) { + else selrecord(td, &jd->jd_selinfo); - jd->jd_flags |= JDF_SELECTED; - } JAILDESC_UNLOCK(jd); return (revents); } diff --git a/sys/sys/jaildesc.h b/sys/sys/jaildesc.h index b0a1a6238cc9..22a03bfbb1fa 100644 --- a/sys/sys/jaildesc.h +++ b/sys/sys/jaildesc.h @@ -71,7 +71,6 @@ struct jaildesc { /* * Flags for the jd_flags field */ -#define JDF_SELECTED 0x00000001 /* issue selwakeup() */ #define JDF_REMOVED 0x00000002 /* jail was removed */ #define JDF_OWNING 0x00000004 /* closing descriptor removes jail */ diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index fb75720114ac..d7a6af905b7e 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -22,6 +22,7 @@ ATF_TESTS_C+= exterr_test ATF_TESTS_C+= fdgrowtable_test ATF_TESTS_C+= getdirentries_test ATF_TESTS_C+= jail_lookup_root +ATF_TESTS_C+= jaildesc ATF_TESTS_C+= inotify_test ATF_TESTS_C+= kill_zombie .if ${MK_OPENSSL} != "no" @@ -92,6 +93,7 @@ PROGS+= sendfile_helper LIBADD.copy_file_range+= md LIBADD.jail_lookup_root+= jail util +LIBADD.jaildesc+= pthread LIBADD.ssl_sendfile+= pthread crypto ssl CFLAGS.sys_getrandom+= -I${SRCTOP}/sys/contrib/zstd/lib LIBADD.sys_getrandom+= zstd diff --git a/tests/sys/kern/jaildesc.c b/tests/sys/kern/jaildesc.c new file mode 100644 index 000000000000..11d751554887 --- /dev/null +++ b/tests/sys/kern/jaildesc.c @@ -0,0 +1,201 @@ +/* + * Copyright (c) 2026 Mark Johnston + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include + +/* + * Create a persistent jail and return an owning descriptor for it. + * The jail is removed when the returned descriptor is closed. + */ +static int +create_jail(const char *name) +{ + struct iovec iov[8]; + int desc, jid, n; + + desc = -1; + n = 0; + iov[n].iov_base = __DECONST(void *, "name"); + iov[n++].iov_len = strlen("name") + 1; + iov[n].iov_base = __DECONST(void *, name); + iov[n++].iov_len = strlen(name) + 1; + iov[n].iov_base = __DECONST(void *, "path"); + iov[n++].iov_len = strlen("path") + 1; + iov[n].iov_base = __DECONST(void *, "/"); + iov[n++].iov_len = strlen("/") + 1; + iov[n].iov_base = __DECONST(void *, "persist"); + iov[n++].iov_len = strlen("persist") + 1; + iov[n].iov_base = NULL; + iov[n++].iov_len = 0; + iov[n].iov_base = __DECONST(void *, "desc"); + iov[n++].iov_len = strlen("desc") + 1; + iov[n].iov_base = &desc; + iov[n++].iov_len = sizeof(desc); + jid = jail_set(iov, n, JAIL_CREATE | JAIL_OWN_DESC); + ATF_REQUIRE_MSG(jid >= 0, "jail_set: %s", strerror(errno)); + return (desc); +} + +static void * +poll_jaildesc(void *arg) +{ + struct pollfd pfd; + + pfd.fd = *(int *)arg; + pfd.events = POLLHUP; + (void)poll(&pfd, 1, 5000); + return ((void *)(uintptr_t)pfd.revents); +} + +/* + * Regression test for the case where a jail descriptor is closed while a + * thread is blocking in poll(2) on it. + */ +ATF_TC(poll_close_race); +ATF_TC_HEAD(poll_close_race, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(poll_close_race, tc) +{ + pthread_t thr; + uintptr_t revents; + int error, jd; + + jd = create_jail("jaildesc_poll_close_race"); + + error = pthread_create(&thr, NULL, poll_jaildesc, &jd); + ATF_REQUIRE_MSG(error == 0, "pthread_create: %s", strerror(error)); + + /* Wait for the thread to block in poll(2). */ + usleep(250000); + + ATF_REQUIRE_MSG(close(jd) == 0, "close: %s", strerror(errno)); + + error = pthread_join(thr, (void *)&revents); + ATF_REQUIRE_MSG(error == 0, "pthread_join: %s", strerror(error)); + ATF_REQUIRE_EQ(revents, POLLNVAL); +} + +/* + * Verify that poll(2) of a jail descriptor returns POLLHUP when the jail + * is removed. + */ +ATF_TC(poll_remove_wakeup); +ATF_TC_HEAD(poll_remove_wakeup, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(poll_remove_wakeup, tc) +{ + pthread_t thr; + uintptr_t revents; + int error, jd; + + jd = create_jail("jaildesc_poll_remove_wakeup"); + + error = pthread_create(&thr, NULL, poll_jaildesc, &jd); + ATF_REQUIRE_MSG(error == 0, "pthread_create: %s", strerror(error)); + + /* Wait for the thread to block in poll(2). */ + usleep(250000); + + ATF_REQUIRE_MSG(jail_remove_jd(jd) == 0, + "jail_remove_jd: %s", strerror(errno)); + + error = pthread_join(thr, (void *)&revents); + ATF_REQUIRE_MSG(error == 0, "pthread_join: %s", strerror(error)); + ATF_REQUIRE_EQ(revents, POLLHUP); + + ATF_REQUIRE_MSG(close(jd) == 0, "close: %s", strerror(errno)); +} + +static int +get_jaildesc(const char *name) +{ + struct iovec iov[4]; + char namebuf[MAXHOSTNAMELEN]; + int desc, jid, n; + + strlcpy(namebuf, name, sizeof(namebuf)); + desc = -1; + n = 0; + iov[n].iov_base = __DECONST(void *, "name"); + iov[n++].iov_len = strlen("name") + 1; + iov[n].iov_base = namebuf; + iov[n++].iov_len = sizeof(namebuf); + iov[n].iov_base = __DECONST(void *, "desc"); + iov[n++].iov_len = strlen("desc") + 1; + iov[n].iov_base = &desc; + iov[n++].iov_len = sizeof(desc); + jid = jail_get(iov, n, JAIL_GET_DESC); + ATF_REQUIRE_MSG(jid >= 0, "jail_get: %s", strerror(errno)); + return (desc); +} + +/* + * Regression test for the same use-after-free as poll_close_race, but with a + * non-owning JAIL_GET_DESC descriptor obtained without root privileges. + */ +ATF_TC(poll_close_race_get_desc); +ATF_TC_HEAD(poll_close_race_get_desc, tc) +{ + atf_tc_set_md_var(tc, "require.user", "root"); +} +ATF_TC_BODY(poll_close_race_get_desc, tc) +{ + struct passwd *pw; + pthread_t thr; + uintptr_t revents; + int error, jd, owning_jd; + + /* Create the jail as root; keep the owning descriptor for cleanup. */ + owning_jd = create_jail("jaildesc_poll_close_get_desc"); + + /* + * Drop root privileges. jail_get(2) with JAIL_GET_DESC does not + * require PRIV_JAIL_REMOVE, so a non-root process in the host prison + * can obtain a read-only descriptor for any visible jail. + */ + pw = getpwnam("nobody"); + ATF_REQUIRE_MSG(pw != NULL, "getpwnam: %s", strerror(errno)); + ATF_REQUIRE_MSG(setuid(pw->pw_uid) == 0, "setuid: %s", strerror(errno)); + + jd = get_jaildesc("jaildesc_poll_close_get_desc"); + + error = pthread_create(&thr, NULL, poll_jaildesc, &jd); + ATF_REQUIRE_MSG(error == 0, "pthread_create: %s", strerror(error)); + + /* Wait for the thread to block in poll(2). */ + usleep(250000); + + ATF_REQUIRE_MSG(close(jd) == 0, "close: %s", strerror(errno)); + + error = pthread_join(thr, (void *)&revents); + ATF_REQUIRE_MSG(error == 0, "pthread_join: %s", strerror(error)); + ATF_REQUIRE_EQ(revents, POLLNVAL); + + ATF_REQUIRE_MSG(close(owning_jd) == 0, "close: %s", strerror(errno)); +} + +ATF_TP_ADD_TCS(tp) +{ + ATF_TP_ADD_TC(tp, poll_close_race); + ATF_TP_ADD_TC(tp, poll_remove_wakeup); + ATF_TP_ADD_TC(tp, poll_close_race_get_desc); + + return (atf_no_error()); +} From nobody Wed May 20 19:35:45 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLMG96hRzz6fJ18 for ; Wed, 20 May 2026 19:35: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLMG95C35z3QZV for ; Wed, 20 May 2026 19:35:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779305745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o72RFZzkwYz8+0P/jW1i1tf4ELQT22n8YmPSvHg6APE=; b=yqIgGLX1Yr1fkW2Gt3KeKLz3vIScmye8QMlEftwxngw7HnBnCwuUNcsMwJm7Tr8eUqzr5t V30ttXwFymNjzan78d8dokRcNlwSJaWlA5ZujEx2izWqOGMTAf5gsdUzzGzzElB5z1Szqk 00MF0ZrFX1jtBHNPWveAXczehITvTIF5dX2dD9DFaC/TtRBis2+6G01YOr+k1w7bvgVlHN vWvFWJ9V0AJvi2bp6jyVIgo4sRO8Y3HXCIKczlx+X+bIc0YrD9dFNzdbbmJRwZgl4memRu HDVlO5KKUXt4fz4UhkvvbpUlQlRrimHlL9sfWQLQXdEHxfBfzajaenzppYIQ4g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779305745; a=rsa-sha256; cv=none; b=uKWWzVtMHdf78rvXioUfd21veVmMd1vfINCOutJbQvb+i6gHDO5LA7EWgu+oiUf47D34+6 m9NX4563tfbZYbvIofQw1tjg30eDHhMzt22Xt8ZXDRY90ji/q3KOCD5Fy/j2XqTLMGM5Y1 mUwGxk+S8ceX87HO7DPLbeE6mOMEyaYyKLrxEk53/awOYmIhnHfqlJ1tkkI2NCoPFJsAUx HsM7T2mtMAhaEONu2oO4P1lKcF8rvOKAdq0LtFWs8N9a6bCgNxTV5fEdJPsZMGgsjsjmB5 tZvbgpLMBCM8ldtb00wZyo89QsqHyKeUDJvVu6mIWElT0viJ7SuGjDocQ2DTnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779305745; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=o72RFZzkwYz8+0P/jW1i1tf4ELQT22n8YmPSvHg6APE=; b=Ot/QBRMXToVQ+DiBoRBDUz7t01VV6NotYGNMgOeLMxIorAovf35MCmbBNtzcppPWiT4/ra MoTcBnW2wvqZVCkV55L5iv7Z3gLsjsW/YbEBWLc54C2sWDvOgkGqHzXIBEwKwehpOrffs0 oSwpZvuLeHuYA6E3zKy0DWCSAuAso2KvgkmJqVjrmDKDBJEt9FZhjpDqQ/oqW+weyBxunX ZRsRgwfEf+DAjQY+wWw4ZblRVYbP9Gw5TN47NeSLhEiUQCNfZ1LrCNlf/tFYqCv0ABvNDS o6kjNIEGZtkJhDgWy5fgv2bOnnSHijeLvKUB95Bmf1+riOlFiLL49BWmYi/XIQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLMG94nkHz1DsW for ; Wed, 20 May 2026 19:35:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36563 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 19:35:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 4c09834afad0 - main - netmap: Drain selinfo sleepers in nm_os_selinfo_uninit() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 4c09834afad02f97f7daeabc3c281784a04880a3 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 19:35:45 +0000 Message-Id: <6a0e0d11.36563.568b80d5@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=4c09834afad02f97f7daeabc3c281784a04880a3 commit 4c09834afad02f97f7daeabc3c281784a04880a3 Author: Mark Johnston AuthorDate: 2026-05-19 00:09:54 +0000 Commit: Mark Johnston CommitDate: 2026-05-20 19:34:50 +0000 netmap: Drain selinfo sleepers in nm_os_selinfo_uninit() Approved by: so Security: FreeBSD-SA-26:19.file Security: CVE-2026-45251 --- sys/dev/netmap/netmap_freebsd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/dev/netmap/netmap_freebsd.c b/sys/dev/netmap/netmap_freebsd.c index 9fb4370129f3..2241bfc970a6 100644 --- a/sys/dev/netmap/netmap_freebsd.c +++ b/sys/dev/netmap/netmap_freebsd.c @@ -119,6 +119,7 @@ nm_os_selinfo_uninit(NM_SELINFO_T *si) taskqueue_drain(si->ntfytq, &si->ntfytask); taskqueue_free(si->ntfytq); si->ntfytq = NULL; + seldrain(&si->si); knlist_delete(&si->si.si_note, curthread, /*islocked=*/0); knlist_destroy(&si->si.si_note); /* now we don't need the mutex anymore */ From nobody Wed May 20 19:35:46 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLMGC2BG5z6fHs3 for ; Wed, 20 May 2026 19:35: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLMGC0S6tz3QTL for ; Wed, 20 May 2026 19:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779305747; 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; bh=Z8pfblwBi7cLW2Lqd37+7gNFzF8hpUoTFHu0h2SZQOc=; b=Lm8v1EqTpQutANWjOZf7ibuXhVAERbrTwXj+7zb5scYl2e8NKEcRKl2sKX2a9LGlAifmHX J+z2jm2OfPIhHfH+3t/rAUKT+Rqg/sQFxOtlgAHo4mMsOSmlh5tutMG73BqgiH53Ahox7Q JtJ2RTEtd+ZtGUNCvsZ1agwbC9b4CPw4i4uUXzArRHS6CnkJhUFbLWAQPg0MzH/X9r1Kzm 5nJGYlVHNO282dgJgqupAzfHviyTJUKS78GtVgOkA4QMHmCrX7WxB4Xxp/wYehtELAmnIT gCQVVahs7AJo2eXnouPw3n7GL6ZiIf/HxmGEyoi51GIMOYmKyfFWVImr4QE40Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779305747; a=rsa-sha256; cv=none; b=X+MbClhskWTXTQJH2p2waZpLLohONznCiIZOAaRhE8nKpCKv443i79XZXk4ixgA8KXWdWG ShR/Mp6wp4wmpL2kCoMygvQkwgzPrCI6MD46Id7tGHgWBtatESO1T4FotChsXJYQneWZbU Dy7/fh5W37LraNCLTG9hJxfTnTj4VOEdeHCDaZTGZl+43eL0HBTEe57Om8wJAcCAo4m62X KK40KpcNH1H8FblbMFwZYt04EQFAMZ5JlysUaxBF+sYeEObFiUcEivFDmpg4pHPqelXogL 6q52dTgXI0oeJocSZk5lM/3GOG8ksh5EQ0vHfkJTzvmzckV0yDXIkZKad3w46g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779305747; 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; bh=Z8pfblwBi7cLW2Lqd37+7gNFzF8hpUoTFHu0h2SZQOc=; b=fz85b91ox7inH1maA6UYR8i0Q9h1dbZ5Id0kCbEmyxn4c1sxWFHvxPXn2CaCoEEa2DQDr/ 7YYOzA5hVlSk4ArEZux8BHWsKXD6sVsPNk82dxr8tYNwu2+d+ipNYFaNbO5mPiJRoLBc6f T0BpO2RuCABp2oCUtrRsvY13vSnd3gdvLhTBRjtHEVfV0sOqdbRvaCaJIp41M/k92btqtW JE9G0EulTvU2d3seUS/PSxE5P8CXDhtwVe2XyBwdcMK25tziDvkmKdu7pO4dWecVshH86a 8kY5WrcFQrXlcbhJs+tKfR0qU7k5eMnLKaOWvZBSUZW6lfqRvcFwWTESLA4N0A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLMGB5cpNz1F3Q for ; Wed, 20 May 2026 19:35:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3840e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 19:35:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Alan Somers From: Mark Johnston Subject: git: d91c459a93e5 - main - fusefs: Handle buggy servers' LISTXATTR response List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: d91c459a93e5f70c1d3ad3d504bcf64babed8600 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 19:35:46 +0000 Message-Id: <6a0e0d12.3840e.69e17f68@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=d91c459a93e5f70c1d3ad3d504bcf64babed8600 commit d91c459a93e5f70c1d3ad3d504bcf64babed8600 Author: Alan Somers AuthorDate: 2026-05-04 19:35:11 +0000 Commit: Mark Johnston CommitDate: 2026-05-20 19:34:50 +0000 fusefs: Handle buggy servers' LISTXATTR response The fuse protocol requires server to respond to LISTXATTR with a NUL-terminated string. If they don't, report an error rather than attempt to scan through uninitialized memory for a NUL. Approved by: so Security: FreeBSD-SA-26:20.fusefs Security: CVE-2026-45252 admbugs: 1039 Reported by: Joshua Rogers Sponsored by: ConnectWise --- sys/fs/fuse/fuse_ipc.h | 1 + sys/fs/fuse/fuse_vnops.c | 18 +++++++---- tests/sys/fs/fusefs/xattr.cc | 73 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 86 insertions(+), 6 deletions(-) diff --git a/sys/fs/fuse/fuse_ipc.h b/sys/fs/fuse/fuse_ipc.h index 8ceb6bb1fb1a..7091296bb453 100644 --- a/sys/fs/fuse/fuse_ipc.h +++ b/sys/fs/fuse/fuse_ipc.h @@ -240,6 +240,7 @@ struct fuse_data { #define FSESS_WARN_INODE_MISMATCH 0x4000000 /* ino != nodeid */ #define FSESS_SETXATTR_EXT 0x8000000 /* extended fuse_setxattr_in */ #define FSESS_AUTO_UNMOUNT 0x10000000 /* perform unmount when server dies */ +#define FSESS_WARN_LSEXTATTR_NUL 0x20000000 /* Non nul-terminated xattr list */ #define FSESS_MNTOPTS_MASK ( \ FSESS_DAEMON_CAN_SPY | FSESS_PUSH_SYMLINKS_IN | \ FSESS_DEFAULT_PERMISSIONS | FSESS_INTR | FSESS_AUTO_UNMOUNT) diff --git a/sys/fs/fuse/fuse_vnops.c b/sys/fs/fuse/fuse_vnops.c index dd3cc5f16092..d1badd0700f8 100644 --- a/sys/fs/fuse/fuse_vnops.c +++ b/sys/fs/fuse/fuse_vnops.c @@ -2978,8 +2978,8 @@ out: * bsd_list, bsd_list_len - output list compatible with bsd vfs */ static int -fuse_xattrlist_convert(char *prefix, const char *list, int list_len, - char *bsd_list, int *bsd_list_len) +fuse_xattrlist_convert(struct fuse_data *data, char *prefix, const char *list, + int list_len, char *bsd_list, int *bsd_list_len) { int len, pos, dist_to_next, prefix_len; @@ -2988,7 +2988,14 @@ fuse_xattrlist_convert(char *prefix, const char *list, int list_len, prefix_len = strlen(prefix); while (pos < list_len && list[pos] != '\0') { - dist_to_next = strlen(&list[pos]) + 1; + dist_to_next = strnlen(&list[pos], list_len - pos - 1) + 1; + if (list[pos + dist_to_next - 1] != '\0') { + fuse_warn(data, FSESS_WARN_LSEXTATTR_NUL, + "The FUSE server returned a non nul-terminated " + "LISTXATTR response."); + return (EXTERROR(EIO, + "The FUSE server returned a malformed list")); + } if (bcmp(&list[pos], prefix, prefix_len) == 0 && list[pos + prefix_len] == extattr_namespace_separator) { len = dist_to_next - @@ -3044,6 +3051,7 @@ fuse_vnop_listextattr(struct vop_listextattr_args *ap) struct fuse_listxattr_in *list_xattr_in; struct fuse_listxattr_out *list_xattr_out; struct mount *mp = vnode_mount(vp); + struct fuse_data *data = fuse_get_mpdata(mp); struct thread *td = ap->a_td; struct ucred *cred = ap->a_cred; char *prefix; @@ -3124,8 +3132,6 @@ fuse_vnop_listextattr(struct vop_listextattr_args *ap) linux_list = fdi.answ; /* FUSE doesn't allow the server to return more data than requested */ if (fdi.iosize > linux_list_len) { - struct fuse_data *data = fuse_get_mpdata(mp); - fuse_warn(data, FSESS_WARN_LSEXTATTR_LONG, "server returned " "more extended attribute data than requested; " @@ -3142,7 +3148,7 @@ fuse_vnop_listextattr(struct vop_listextattr_args *ap) * FreeBSD's format before giving it to the user. */ bsd_list = malloc(linux_list_len, M_TEMP, M_WAITOK); - err = fuse_xattrlist_convert(prefix, linux_list, linux_list_len, + err = fuse_xattrlist_convert(data, prefix, linux_list, linux_list_len, bsd_list, &bsd_list_len); if (err != 0) goto out; diff --git a/tests/sys/fs/fusefs/xattr.cc b/tests/sys/fs/fusefs/xattr.cc index afeacd4a249e..6dfda55079eb 100644 --- a/tests/sys/fs/fusefs/xattr.cc +++ b/tests/sys/fs/fusefs/xattr.cc @@ -492,6 +492,79 @@ TEST_F(ListxattrSig, erange_forever) ASSERT_TRUE(WIFSIGNALED(status)); } +/* + * A buggy or malicious server returns a list that isn't nul-terminated. The + * kernel should handle it gracefully. + */ +TEST_F(Listxattr, not_nul_terminated) +{ + uint64_t ino = 42; + int ns = EXTATTR_NAMESPACE_USER; + char *data; + const char expected[4] = {3, 'f', 'o', 'o'}; + const char first[255] = "user.foo\0system.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"; + const uint8_t badlist[9] = {'u', 's', 'e', 'r', '.', 'f', 'o', 'o', 'd'}; + Sequence seq; + + EXPECT_LOOKUP(FUSE_ROOT_ID, RELPATH) + .WillRepeatedly(Invoke( + ReturnImmediate([=](auto in __unused, auto& out) { + SET_OUT_HEADER_LEN(out, entry); + out.body.entry.attr.mode = S_IFREG | 0644; + out.body.entry.nodeid = ino; + out.body.entry.attr.nlink = 1; + out.body.entry.attr_valid = UINT64_MAX; + out.body.entry.entry_valid = UINT64_MAX; + }))); + + /* + * On the first LISTXATTRS call, return a big attribute just to fill + * the heap with non-NUL data. + */ + expect_listxattr(ino, 0, + ReturnImmediate([&](auto in __unused, auto& out) { + out.body.listxattr.size = sizeof(first); + SET_OUT_HEADER_LEN(out, listxattr); + }), &seq + ); + expect_listxattr(ino, sizeof(first), + ReturnImmediate([&](auto in __unused, auto& out) { + memcpy((void*)out.body.bytes, first, sizeof(first)); + out.header.len = sizeof(fuse_out_header) + sizeof(first); + }), &seq + ); + /* + * On the second LISTXATTRS call, return a malformed list with no NUL + * termination. The heap might still be full of the data from the + * first call. + */ + expect_listxattr(ino, 0, + ReturnImmediate([&](auto in __unused, auto& out) { + out.body.listxattr.size = sizeof(badlist); + SET_OUT_HEADER_LEN(out, listxattr); + }), &seq + ); + expect_listxattr(ino, sizeof(badlist), + ReturnImmediate([&](auto in __unused, auto& out) { + memset((void*)out.body.bytes, 'x', sizeof(first)); + memcpy((void*)out.body.bytes, badlist, sizeof(badlist)); + out.header.len = sizeof(fuse_out_header) + sizeof(badlist); + }), &seq + ); + + data = new char[1024]; + + ASSERT_EQ(static_cast(sizeof(expected)), + extattr_list_file(FULLPATH, ns, data, sizeof(data))) + << strerror(errno); + /* + * Receiving this malformed list, the kernel should log it to dmesg and + * report an IO error to the caller. + */ + ASSERT_EQ(-1, extattr_list_file(FULLPATH, ns, data, sizeof(data))); + EXPECT_EQ(EIO, errno); +} + /* * Get the size of the list that it would take to list no extended attributes */ From nobody Wed May 20 19:35:47 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLMGD4d5Fz6fHxl for ; Wed, 20 May 2026 19:35: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLMGC74lBz3QMK for ; Wed, 20 May 2026 19:35:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779305748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=43p/QhU0n+KP0q/R30U3UEaHKWaLICzSJyhlrVvpa/o=; b=gm87uFn+e4C5CeCzI5F6Wry3W8b/Lou+n0xSsIdf+Yu3716n7JP7iWcgGcvteuJNlRSeCg PYisNs7yXIv2lnGTZX3Z5fndvW/sXC2KR11jcYa6T9+2oUocHRh921pBuq21b2ekZSCnHH XUVcZYzfgML0immXrIdTnRQdTGT2ueA3bHhMWgbqCfkMph6zF8KkuQu/P4Z7i2Fn7uNQzg eD7pBt1dhZiGZOs+R+ykBgmhpcJsCQomx/bqL9LqDU45vFQsSllUYzWztJxJEJnTeB/TWO jnP+wwflGcfnYDkwymQUXXztVndpGPC0GD9EgfWeVojP+02VuaXIvQm27cmu8Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779305748; a=rsa-sha256; cv=none; b=LVYa32DE9xoaUCRdrR0zvNlT9UC9f02bQ98f1+zbZ6mAHyWMilpdx6P1ACoa7AQMi0a2bW BzPXjE6avZYOtQ54nUYcQEb1CiPekDZmd1I5/op3id14XrwIfQy43+GMhfSZ+RDnxY3UQ+ KuZax7EsT/xu7mB7zPZKEuXwyNaul6EbDIYTcMWNDlv2/cMiRCMmA366IgC3pDdMzHrjDI DK11tx8jWmfal5qTm8vJGAj3iyF3IH9nOk8dsC3S7ZABAFzWOpsTbxZ4GP2r4d3sF4CdHS cZ5YqQSpI/GaT/d+WkekGJVMj4IOrmV2lRY6wXYuwipRI2gjDpzBpdfsUaUZvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779305748; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=43p/QhU0n+KP0q/R30U3UEaHKWaLICzSJyhlrVvpa/o=; b=aDOu26uAaIsOd3Ns4YUTphW7HjjdChn8arzjEsMzgKd5Q/5anT7Q8Sp9LC0q7VzeGHhxji 6vsoqGvEnIfEvIg/CbChXS021b5MMM2BvlEQ8NSpKw4n+gekVx4XNU0XtpuU4Fk6UcoATM 4S5lgJ6f8V9TuXuaB7aVDrVtCQyFGyZeK6qln22F+EPQTlfjjSh937qIquf4MAZrOfN5zz uFHx1ZFqPhtvAfmZgs2AziLqC2cHNSAMZD4hiyq/76qvGCBNiWAXxrH1dm6N2KUJbidXU+ ajZs6RZudRkNcgrYiTE6NmorLZbt3r1561yDTxIemLkL3Cuf2S//0AVsEg/w8A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLMGC6SJSz1DrX for ; Wed, 20 May 2026 19:35:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38a34 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 19:35:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: dea055a0e86f - main - ptrace: Fix validation of PT_SC_REMOTE arguments List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: dea055a0e86fc279a51439b695461b3eda94ad0b Auto-Submitted: auto-generated Date: Wed, 20 May 2026 19:35:47 +0000 Message-Id: <6a0e0d13.38a34.236fe67e@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=dea055a0e86fc279a51439b695461b3eda94ad0b commit dea055a0e86fc279a51439b695461b3eda94ad0b Author: Mark Johnston AuthorDate: 2026-05-12 17:32:17 +0000 Commit: Mark Johnston CommitDate: 2026-05-20 19:34:50 +0000 ptrace: Fix validation of PT_SC_REMOTE arguments - Fix an off-by-one in the system call number check. A value of SYS_MAXSYSCALL was permitted. - Validate the system call number after we've dealt with syscall(2)/__syscall(2), since they pass the syscall number as an argument. - When the syscall number is for syscall(2) or __syscall(2), we must make sure that nargs > 0 to avoid an underflow when shifting arguments down. Add regression tests. Approved by: so Security: FreeBSD-SA-26:21.ptrace Security: CVE-2026-45253 Fixes: 140ceb5d956b ("ptrace(2): add PT_SC_REMOTE remote syscall request") Reported by: Yuxiang Yang, Yizhou Zhao, Ao Wang, Xuewei Feng, Qi Li, and Ke Xu from Tsinghua University using GLM-5.1 from Z.ai Reviewed by: kib, emaste Differential Revision: https://reviews.freebsd.org/D56978 --- sys/kern/kern_sig.c | 17 +++++---- tests/sys/kern/ptrace_test.c | 85 ++++++++++++++++++++++++++++++++++---------- 2 files changed, 76 insertions(+), 26 deletions(-) diff --git a/sys/kern/kern_sig.c b/sys/kern/kern_sig.c index a55f3c761449..9be7c82ee98b 100644 --- a/sys/kern/kern_sig.c +++ b/sys/kern/kern_sig.c @@ -2679,23 +2679,26 @@ ptrace_syscallreq(struct thread *td, struct proc *p, struct sysentvec *sv; struct sysent *se; register_t rv_saved[2]; + unsigned int sc; int error, nerror; - int sc; bool audited, sy_thr_static; - sv = p->p_sysent; - if (sv->sv_table == NULL || sv->sv_size < tsr->ts_sa.code) { - tsr->ts_ret.sr_error = ENOSYS; - return; - } - sc = tsr->ts_sa.code; if (sc == SYS_syscall || sc == SYS___syscall) { + if (tsr->ts_nargs == 0) { + tsr->ts_ret.sr_error = EINVAL; + return; + } sc = tsr->ts_sa.args[0]; memmove(&tsr->ts_sa.args[0], &tsr->ts_sa.args[1], sizeof(register_t) * (tsr->ts_nargs - 1)); } + sv = p->p_sysent; + if (sv->sv_table == NULL || sc >= sv->sv_size) { + tsr->ts_ret.sr_error = ENOSYS; + return; + } tsr->ts_sa.callp = se = &sv->sv_table[sc]; VM_CNT_INC(v_syscall); diff --git a/tests/sys/kern/ptrace_test.c b/tests/sys/kern/ptrace_test.c index fee0bd2ffa38..c1a5d226e990 100644 --- a/tests/sys/kern/ptrace_test.c +++ b/tests/sys/kern/ptrace_test.c @@ -4362,6 +4362,25 @@ ATF_TC_BODY(ptrace__procdesc_reparent_wait_child, tc) REQUIRE_EQ(close(pd), 0); } +static void +pt_sc_remote(pid_t pid, struct ptrace_sc_remote *pscr, int error, + syscallarg_t ret) +{ + pid_t wpid; + int status; + + ATF_REQUIRE(ptrace(PT_SC_REMOTE, pid, (caddr_t)pscr, sizeof(*pscr)) != + -1); + ATF_REQUIRE_EQ(pscr->pscr_ret.sr_error, error); + if (error == 0) + ATF_REQUIRE_EQ(pscr->pscr_ret.sr_retval[0], ret); + + wpid = waitpid(pid, &status, 0); + REQUIRE_EQ(wpid, pid); + ATF_REQUIRE(WIFSTOPPED(status)); + REQUIRE_EQ(WSTOPSIG(status), SIGSTOP); +} + /* * Try using PT_SC_REMOTE to get the PID of a traced child process. */ @@ -4386,35 +4405,62 @@ ATF_TC_BODY(ptrace__PT_SC_REMOTE_getpid, tc) pscr.pscr_syscall = SYS_getpid; pscr.pscr_nargs = 0; pscr.pscr_args = NULL; - ATF_REQUIRE(ptrace(PT_SC_REMOTE, fpid, (caddr_t)&pscr, sizeof(pscr)) != - -1); - ATF_REQUIRE_MSG(pscr.pscr_ret.sr_error == 0, - "remote getpid failed with error %d", pscr.pscr_ret.sr_error); - ATF_REQUIRE_MSG(pscr.pscr_ret.sr_retval[0] == fpid, - "unexpected return value %jd instead of %d", - (intmax_t)pscr.pscr_ret.sr_retval[0], fpid); - - wpid = waitpid(fpid, &status, 0); - REQUIRE_EQ(wpid, fpid); - ATF_REQUIRE(WIFSTOPPED(status)); - REQUIRE_EQ(WSTOPSIG(status), SIGSTOP); + pt_sc_remote(fpid, &pscr, 0, fpid); pscr.pscr_syscall = SYS_getppid; pscr.pscr_nargs = 0; pscr.pscr_args = NULL; - ATF_REQUIRE(ptrace(PT_SC_REMOTE, fpid, (caddr_t)&pscr, sizeof(pscr)) != - -1); - ATF_REQUIRE_MSG(pscr.pscr_ret.sr_error == 0, - "remote getppid failed with error %d", pscr.pscr_ret.sr_error); - ATF_REQUIRE_MSG(pscr.pscr_ret.sr_retval[0] == getpid(), - "unexpected return value %jd instead of %d", - (intmax_t)pscr.pscr_ret.sr_retval[0], fpid); + pt_sc_remote(fpid, &pscr, 0, getpid()); + + ATF_REQUIRE(ptrace(PT_DETACH, fpid, (caddr_t)1, 0) != -1); +} + +ATF_TC_WITHOUT_HEAD(ptrace__PT_SC_REMOTE_syscall_validation); +ATF_TC_BODY(ptrace__PT_SC_REMOTE_syscall_validation, tc) +{ + struct ptrace_sc_remote pscr; + quad_t code; + int status; + pid_t fpid, wpid; + + code = SYS_MAXSYSCALL; + + ATF_REQUIRE((fpid = fork()) != -1); + if (fpid == 0) { + trace_me(); + exit(0); + } wpid = waitpid(fpid, &status, 0); REQUIRE_EQ(wpid, fpid); ATF_REQUIRE(WIFSTOPPED(status)); REQUIRE_EQ(WSTOPSIG(status), SIGSTOP); + pscr.pscr_syscall = SYS_MAXSYSCALL; + pscr.pscr_nargs = 0; + pscr.pscr_args = NULL; + pt_sc_remote(fpid, &pscr, ENOSYS, 0); + + pscr.pscr_syscall = SYS_syscall; + pscr.pscr_nargs = 0; + pscr.pscr_args = NULL; + pt_sc_remote(fpid, &pscr, EINVAL, 0); + + pscr.pscr_syscall = SYS_syscall; + pscr.pscr_nargs = 1; + pscr.pscr_args = (syscallarg_t *)&code; + pt_sc_remote(fpid, &pscr, ENOSYS, 0); + + pscr.pscr_syscall = SYS___syscall; + pscr.pscr_nargs = 0; + pscr.pscr_args = NULL; + pt_sc_remote(fpid, &pscr, EINVAL, 0); + + pscr.pscr_syscall = SYS___syscall; + pscr.pscr_nargs = 1; + pscr.pscr_args = (syscallarg_t *)&code; + pt_sc_remote(fpid, &pscr, ENOSYS, 0); + ATF_REQUIRE(ptrace(PT_DETACH, fpid, (caddr_t)1, 0) != -1); } @@ -4657,6 +4703,7 @@ ATF_TP_ADD_TCS(tp) ATF_TP_ADD_TC(tp, ptrace__procdesc_wait_child); ATF_TP_ADD_TC(tp, ptrace__procdesc_reparent_wait_child); ATF_TP_ADD_TC(tp, ptrace__PT_SC_REMOTE_getpid); + ATF_TP_ADD_TC(tp, ptrace__PT_SC_REMOTE_syscall_validation); 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); From nobody Wed May 20 19:35:49 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLMGF35Cvz6fJPj for ; Wed, 20 May 2026 19:35: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLMGF0ZQRz3QJm for ; Wed, 20 May 2026 19:35:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779305749; 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; bh=U2DNUggp8aSeZHdHJcgrjnfuWB2LSXm0PgB9xMsKtT4=; b=Jznlx9HFiZf0OCJAbiSdDs6Y9mVkPpCK5hl6dIid2FFzU/ndZpFzamhUX40kVfxd6/YtCU PRqFZO+r1FubJUDcFgTSidTkJ0WQIOYkvMRB6IRyWdf7xaYQEdAIFy8SFsPpnqu8AiyhbN Y267RMkqbbcMfmwvHNpQk48X4riUud/6bQmKZWWHHP8djAgfma8BmJD70bGLdkxx6V1YRy ewP+Mtu1R9BHeMXmWpuUAvkZONh2bjxaD2yV9l8P6DFPt4iidtREYhiLAO+aTOeKmwMTZw fcEauz561q6j0upr+SGaohq3RKnil/q4d8Fj7ecf4pCgiB+Ys44RtwrtHf4EjA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779305749; a=rsa-sha256; cv=none; b=Sn+HHxVO/SzL6Y8gSdFHSmDxFNPgrmR4zojVcVHG3odKnujW5ZIQ0nTRk61HuUNFXImKAl 0DCOI7zulNDSERBfN7n2c4Sz9dZ6NumdI4M12HO1I7Hjyurl4dg3/Hw5bJqU0OiQd41FMh Gclm/jhduB46/rr4JO0RkeJ9+P5K874DN6awlNJetZfPZOV6G9Oe/U4s8AFbrmcaaOtPMj dJt+JefalkU0MyitLFNnYCeHRaskfiatYAIiTNIvR8cEdVwo5OT7ifq1aenW4ZqQwKWbpx mzMouL1cJqkLXXz8OK5/zxJ2BfHH7d8KCjvQTE3gRSxM52poWu6NXXhTAe6kNQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779305749; 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; bh=U2DNUggp8aSeZHdHJcgrjnfuWB2LSXm0PgB9xMsKtT4=; b=bDumvkMCKvFnqDo6Z4HTeSgab7zS98ORPbh4vM02/lzsOgZVRLcK7JiObrJLfVyV0JCryD NuLwgnSnFsGVFAOvXXv/mwIAX7MKJBNVAQp1Hv3wy8Cql5jJ2j2/Mpv6KlKWmE1dC2OP4/ DCmvh8Umj6V5PVlJ8fUzkEIs0+nvXBMzfb4WXK9gafF4lNOoW2FFU/wGMG97Mm+6pAV1kb C+M6IhbX2neYP0q94lQPmBcycj4hFDvMQXarU31SvPPgDCZK/FVHj085rHUtuXzUFuiqMR cVotXJ+WFFgSmBSNbBaZXzodRf7B2lBJfwtRRbxxd/B+KCm6aCLfkI2tVEwIWg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLMGF09KGz1F3t for ; Wed, 20 May 2026 19:35:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37d49 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 19:35:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Mariusz Zaborski From: Mark Johnston Subject: git: a10bc81d333e - main - libcasper: switch from select(2) to poll(2) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: a10bc81d333e04664c1a1d6024c580794b079eca Auto-Submitted: auto-generated Date: Wed, 20 May 2026 19:35:49 +0000 Message-Id: <6a0e0d15.37d49.6d8d1e97@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=a10bc81d333e04664c1a1d6024c580794b079eca commit a10bc81d333e04664c1a1d6024c580794b079eca Author: Mariusz Zaborski AuthorDate: 2026-05-18 15:32:49 +0000 Commit: Mark Johnston CommitDate: 2026-05-20 19:34:50 +0000 libcasper: switch from select(2) to poll(2) The previous implementation used FD_SET() on a stack-allocated fd_set, which is an out-of-bounds write whenever the socket fd is >= FD_SETSIZE (1024). poll(2) takes an array indexed by slot rather than by fd value, so it has no FD_SETSIZE limit. Approved by: so Security: FreeBSD-SA-26:22.libcasper Security: CVE-2026-39461 Reported by: Joshua Rogers Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56695 --- lib/libcasper/libcasper/libcasper_impl.h | 6 +- lib/libcasper/libcasper/libcasper_service.c | 57 +-------- lib/libcasper/libcasper/service.c | 187 ++++++++++++++++------------ lib/libcasper/tests/Makefile | 11 +- lib/libcasper/tests/cap_main_test.c | 142 +++++++++++++++++++++ 5 files changed, 262 insertions(+), 141 deletions(-) diff --git a/lib/libcasper/libcasper/libcasper_impl.h b/lib/libcasper/libcasper/libcasper_impl.h index 5f0aacf2afa8..43d2495cacf6 100644 --- a/lib/libcasper/libcasper/libcasper_impl.h +++ b/lib/libcasper/libcasper/libcasper_impl.h @@ -54,6 +54,8 @@ void service_message(struct service *service, void service_start(struct service *service, int sock, int procfd); const char *service_name(struct service *service); int service_get_channel_flags(struct service *service); +bool service_have_connections(void); +bool service_poll_dispatch(void); /* Private service connection functions. */ struct service_connection *service_connection_add(struct service *service, @@ -64,10 +66,6 @@ void service_connection_remove( int service_connection_clone( struct service *service, struct service_connection *sconn); -struct service_connection *service_connection_first( - struct service *service); -struct service_connection *service_connection_next( - struct service_connection *sconn); cap_channel_t *service_connection_get_chan( const struct service_connection *sconn); int service_connection_get_sock( diff --git a/lib/libcasper/libcasper/libcasper_service.c b/lib/libcasper/libcasper/libcasper_service.c index df58f48d78eb..b951de58d229 100644 --- a/lib/libcasper/libcasper/libcasper_service.c +++ b/lib/libcasper/libcasper/libcasper_service.c @@ -222,10 +222,6 @@ service_register_core(int fd) void casper_main_loop(int fd) { - fd_set fds; - struct casper_service *casserv; - struct service_connection *sconn, *sconntmp; - int sock, maxfd, ret; if (zygote_init() < 0) _exit(1); @@ -235,55 +231,10 @@ casper_main_loop(int fd) */ service_register_core(fd); - for (;;) { - FD_ZERO(&fds); - FD_SET(fd, &fds); - maxfd = -1; - TAILQ_FOREACH(casserv, &casper_services, cs_next) { - /* We handle only core services. */ - if (!CSERVICE_IS_CORE(casserv)) - continue; - for (sconn = service_connection_first(casserv->cs_service); - sconn != NULL; - sconn = service_connection_next(sconn)) { - sock = service_connection_get_sock(sconn); - FD_SET(sock, &fds); - maxfd = sock > maxfd ? sock : maxfd; - } - } - if (maxfd == -1) { - /* Nothing to do. */ - _exit(0); - } - maxfd++; - - - assert(maxfd <= (int)FD_SETSIZE); - ret = select(maxfd, &fds, NULL, NULL, NULL); - assert(ret == -1 || ret > 0); /* select() cannot timeout */ - if (ret == -1) { - if (errno == EINTR) - continue; + while (service_have_connections()) { + if (!service_poll_dispatch()) _exit(1); - } - - TAILQ_FOREACH(casserv, &casper_services, cs_next) { - /* We handle only core services. */ - if (!CSERVICE_IS_CORE(casserv)) - continue; - for (sconn = service_connection_first(casserv->cs_service); - sconn != NULL; sconn = sconntmp) { - /* - * Prepare for connection to be removed from - * the list on failure. - */ - sconntmp = service_connection_next(sconn); - sock = service_connection_get_sock(sconn); - if (FD_ISSET(sock, &fds)) { - service_message(casserv->cs_service, - sconn); - } - } - } } + + _exit(0); } diff --git a/lib/libcasper/libcasper/service.c b/lib/libcasper/libcasper/service.c index 70418db50085..72de10477480 100644 --- a/lib/libcasper/libcasper/service.c +++ b/lib/libcasper/libcasper/service.c @@ -30,7 +30,7 @@ * SUCH DAMAGE. */ -#include +#include #include #include #include @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include @@ -71,7 +72,8 @@ struct service_connection { int sc_magic; cap_channel_t *sc_chan; nvlist_t *sc_limits; - TAILQ_ENTRY(service_connection) sc_next; + struct service *sc_service; + size_t sc_pollidx; }; #define SERVICE_MAGIC 0x5e91ce @@ -81,9 +83,90 @@ struct service { uint64_t s_flags; service_limit_func_t *s_limit; service_command_func_t *s_command; - TAILQ_HEAD(, service_connection) s_connections; }; +#define POLLSET_CHUNK 8 +static struct pollfd *pollset_pfds; +static struct service_connection **pollset_conns; +static size_t pollset_cap; +static size_t pollset_size; + +static int +pollset_add(struct service_connection *sconn, int sock) +{ + size_t i, newcap; + void *p; + + for (i = 0; i < pollset_size; i++) { + if (pollset_pfds[i].fd < 0) + break; + } + if (i == pollset_size) { + newcap = roundup2(pollset_size + 1, POLLSET_CHUNK); + if (newcap > pollset_cap) { + p = reallocarray(pollset_pfds, newcap, + sizeof(*pollset_pfds)); + if (p == NULL) + return (-1); + pollset_pfds = p; + p = reallocarray(pollset_conns, newcap, + sizeof(*pollset_conns)); + if (p == NULL) + return (-1); + pollset_conns = p; + pollset_cap = newcap; + } + pollset_size++; + } + pollset_pfds[i].fd = sock; + pollset_pfds[i].events = POLLIN; + pollset_pfds[i].revents = 0; + pollset_conns[i] = sconn; + sconn->sc_pollidx = i; + return (0); +} + +static void +pollset_remove(struct service_connection *sconn) +{ + + pollset_pfds[sconn->sc_pollidx].fd = -1; + pollset_conns[sconn->sc_pollidx] = NULL; +} + +bool +service_have_connections(void) +{ + size_t i; + + for (i = 0; i < pollset_size; i++) { + if (pollset_pfds[i].fd >= 0) + return (true); + } + return (false); +} + +bool +service_poll_dispatch(void) +{ + size_t i; + int ret; + + do { + ret = poll(pollset_pfds, pollset_size, -1); + } while (ret == -1 && errno == EINTR); + if (ret == -1) + return (false); + + for (i = 0; i < pollset_size; i++) { + if (pollset_pfds[i].revents == 0) + continue; + service_message(pollset_conns[i]->sc_service, + pollset_conns[i]); + } + return (true); +} + struct service * service_alloc(const char *name, service_limit_func_t *limitfunc, service_command_func_t *commandfunc, uint64_t flags) @@ -101,7 +184,6 @@ service_alloc(const char *name, service_limit_func_t *limitfunc, service->s_limit = limitfunc; service->s_command = commandfunc; service->s_flags = flags; - TAILQ_INIT(&service->s_connections); service->s_magic = SERVICE_MAGIC; return (service); @@ -110,13 +192,16 @@ service_alloc(const char *name, service_limit_func_t *limitfunc, void service_free(struct service *service) { - struct service_connection *sconn; + size_t i; assert(service->s_magic == SERVICE_MAGIC); service->s_magic = 0; - while ((sconn = service_connection_first(service)) != NULL) - service_connection_remove(service, sconn); + for (i = 0; i < pollset_size; i++) { + if (pollset_conns[i] != NULL && + pollset_conns[i]->sc_service == service) + service_connection_remove(service, pollset_conns[i]); + } free(service->s_name); free(service); } @@ -153,8 +238,16 @@ service_connection_add(struct service *service, int sock, return (NULL); } } + sconn->sc_service = service; + if (pollset_add(sconn, sock) == -1) { + serrno = errno; + nvlist_destroy(sconn->sc_limits); + (void)cap_unwrap(sconn->sc_chan, NULL); + free(sconn); + errno = serrno; + return (NULL); + } sconn->sc_magic = SERVICE_CONNECTION_MAGIC; - TAILQ_INSERT_TAIL(&service->s_connections, sconn, sc_next); return (sconn); } @@ -166,7 +259,7 @@ service_connection_remove(struct service *service, assert(service->s_magic == SERVICE_MAGIC); assert(sconn->sc_magic == SERVICE_CONNECTION_MAGIC); - TAILQ_REMOVE(&service->s_connections, sconn, sc_next); + pollset_remove(sconn); sconn->sc_magic = 0; nvlist_destroy(sconn->sc_limits); cap_close(sconn->sc_chan); @@ -196,31 +289,6 @@ service_connection_clone(struct service *service, return (sock[1]); } -struct service_connection * -service_connection_first(struct service *service) -{ - struct service_connection *sconn; - - assert(service->s_magic == SERVICE_MAGIC); - - sconn = TAILQ_FIRST(&service->s_connections); - assert(sconn == NULL || - sconn->sc_magic == SERVICE_CONNECTION_MAGIC); - return (sconn); -} - -struct service_connection * -service_connection_next(struct service_connection *sconn) -{ - - assert(sconn->sc_magic == SERVICE_CONNECTION_MAGIC); - - sconn = TAILQ_NEXT(sconn, sc_next); - assert(sconn == NULL || - sconn->sc_magic == SERVICE_CONNECTION_MAGIC); - return (sconn); -} - cap_channel_t * service_connection_get_chan(const struct service_connection *sconn) { @@ -329,14 +397,6 @@ service_message(struct service *service, struct service_connection *sconn) nvlist_destroy(nvlout); } -static int -fd_add(fd_set *fdsp, int maxfd, int fd) -{ - - FD_SET(fd, fdsp); - return (fd > maxfd ? fd : maxfd); -} - const char * service_name(struct service *service) { @@ -417,9 +477,6 @@ service_clean(int *sockp, int *procfdp, uint64_t flags) void service_start(struct service *service, int sock, int procfd) { - struct service_connection *sconn, *sconntmp; - fd_set fds; - int maxfd, nfds; assert(service != NULL); assert(service->s_magic == SERVICE_MAGIC); @@ -429,43 +486,9 @@ service_start(struct service *service, int sock, int procfd) if (service_connection_add(service, sock, NULL) == NULL) _exit(1); - for (;;) { - FD_ZERO(&fds); - maxfd = -1; - for (sconn = service_connection_first(service); sconn != NULL; - sconn = service_connection_next(sconn)) { - maxfd = fd_add(&fds, maxfd, - service_connection_get_sock(sconn)); - } - - assert(maxfd >= 0); - assert(maxfd + 1 <= (int)FD_SETSIZE); - nfds = select(maxfd + 1, &fds, NULL, NULL, NULL); - if (nfds < 0) { - if (errno != EINTR) - _exit(1); - continue; - } else if (nfds == 0) { - /* Timeout. */ - abort(); - } - - for (sconn = service_connection_first(service); sconn != NULL; - sconn = sconntmp) { - /* - * Prepare for connection to be removed from the list - * on failure. - */ - sconntmp = service_connection_next(sconn); - if (FD_ISSET(service_connection_get_sock(sconn), &fds)) - service_message(service, sconn); - } - if (service_connection_first(service) == NULL) { - /* - * No connections left, exiting. - */ - break; - } + while (service_have_connections()) { + if (!service_poll_dispatch()) + _exit(1); } _exit(0); diff --git a/lib/libcasper/tests/Makefile b/lib/libcasper/tests/Makefile index 4b6c72fd86e8..1ddb7e72128b 100644 --- a/lib/libcasper/tests/Makefile +++ b/lib/libcasper/tests/Makefile @@ -1,6 +1,13 @@ -.PATH: ${SRCTOP}/tests +.include PACKAGE= tests -KYUAFILE= yes + +ATF_TESTS_C= cap_main_test + +.if ${MK_CASPER} != "no" +LIBADD+= casper +CFLAGS+= -DWITH_CASPER +.endif +LIBADD+= nv .include diff --git a/lib/libcasper/tests/cap_main_test.c b/lib/libcasper/tests/cap_main_test.c new file mode 100644 index 000000000000..0551f12de66e --- /dev/null +++ b/lib/libcasper/tests/cap_main_test.c @@ -0,0 +1,142 @@ +/*- + * SPDX-License-Identifier: BSD-2-Clause + * + * Copyright (c) 2026 Mariusz Zaborski + * + * 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 AUTHORS 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 AUTHORS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +#include +#include + +#include +#include +#include +#include + +#include + +#include + +#define NCONNECTIONS (FD_SETSIZE + 64) +#define FD_HEADROOM 64 + +/* Test that file descriptors past FD_SETSIZE (1024) work. */ +ATF_TC_WITHOUT_HEAD(many_connections); +ATF_TC_BODY(many_connections, tc) +{ + struct rlimit rl; + cap_channel_t *chan; + cap_channel_t **clones; + size_t i; + + if (getrlimit(RLIMIT_NOFILE, &rl) != 0) + atf_tc_skip("getrlimit: %s", strerror(errno)); + if (rl.rlim_max < NCONNECTIONS + FD_HEADROOM) + atf_tc_skip("RLIMIT_NOFILE hard cap %ju below required %d", + (uintmax_t)rl.rlim_max, NCONNECTIONS + FD_HEADROOM); + rl.rlim_cur = rl.rlim_max; + ATF_REQUIRE_MSG(setrlimit(RLIMIT_NOFILE, &rl) == 0, + "setrlimit: %s", strerror(errno)); + + chan = cap_init(); + ATF_REQUIRE_MSG(chan != NULL, "cap_init failed: %s", strerror(errno)); + + clones = calloc(NCONNECTIONS, sizeof(*clones)); + ATF_REQUIRE(clones != NULL); + + /* + * Every cap_clone(3) adds one more connection to the helper. + * After this loop the helper is watching more fds than an + * fd_set can hold. + */ + for (i = 0; i < NCONNECTIONS; i++) { + clones[i] = cap_clone(chan); + ATF_REQUIRE_MSG(clones[i] != NULL, + "cap_clone failed at %zu/%d: %s", + i, NCONNECTIONS, strerror(errno)); + } + + for (i = 0; i < NCONNECTIONS; i++) + cap_close(clones[i]); + free(clones); + cap_close(chan); +} + +#define CHURN_CONNECTIONS 50 +#define CHURN_CLOSE_STEP 5 + +/* Test that gaps in the file descriptor list do not break casper. */ +ATF_TC_WITHOUT_HEAD(connection_churn); +ATF_TC_BODY(connection_churn, tc) +{ + cap_channel_t *chan, *survivor, *extra; + cap_channel_t *clones[CHURN_CONNECTIONS]; + size_t i, survivor_idx; + + chan = cap_init(); + ATF_REQUIRE_MSG(chan != NULL, "cap_init failed: %s", strerror(errno)); + + for (i = 0; i < CHURN_CONNECTIONS; i++) { + clones[i] = cap_clone(chan); + ATF_REQUIRE_MSG(clones[i] != NULL, + "cap_clone failed at %zu: %s", i, strerror(errno)); + } + + /* + * Close every Nth clone. + */ + for (i = 0; i < CHURN_CONNECTIONS; i += CHURN_CLOSE_STEP) { + cap_close(clones[i]); + clones[i] = NULL; + } + + /* + * Force a poll() cycle: the helper handles POLLIN on chan and + * POLLHUP on the closed clones in the same walk. + */ + extra = cap_clone(chan); + ATF_REQUIRE_MSG(extra != NULL, "cap_clone after churn failed: %s", + strerror(errno)); + + /* A surviving clone must still round-trip. */ + survivor_idx = 1; + survivor = cap_clone(clones[survivor_idx]); + ATF_REQUIRE_MSG(survivor != NULL, + "cap_clone on survivor failed: %s", strerror(errno)); + + cap_close(survivor); + cap_close(extra); + for (i = 0; i < CHURN_CONNECTIONS; i++) { + if (clones[i] != NULL) + cap_close(clones[i]); + } + cap_close(chan); +} + +ATF_TP_ADD_TCS(tp) +{ + + ATF_TP_ADD_TC(tp, many_connections); + ATF_TP_ADD_TC(tp, connection_churn); + return (atf_no_error()); +} From nobody Wed May 20 19:35:50 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLMGG5wcvz6fJLd for ; Wed, 20 May 2026 19:35:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLMGG1SNRz3QMf for ; Wed, 20 May 2026 19:35:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779305750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hRaDYWWc2xS15lLg6zPLOMXGuwpwAcHRUWKZonCJL4U=; b=Fu/Z/8GN3rSNuru/53ukPtTpeA6yo8zDAJFnb6r21cAz0kzr2Te25lMgE9qa11uH2w8IQ7 +qlQpky+8NriGNTsWYG2Uuum6mCDl7uIvRLsYh7DNpbwWCw+5xtKLwbU7guEkWIjXi27Xg 4xGaR5eo74jTAWPsY++FBwE3JITi2dDX9jO8oV/UdVPdglYf8fwA/pMxK94S6Qx6j1z5mI yQ9ZVL8XupUj5FpiEQYgd5Fc4dYJIf1jRsFIdGo3ZoNDn3jqDMtDU+Cpuyk9CdlelZ7ExE fprCglT0P6lTS2XlFoGoEMZw8d/mjSyBs+UGbjaZSoFxOAjQinH1Fh0TQDyjfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779305750; a=rsa-sha256; cv=none; b=nSGlfbFMdyVtNKnaJqtfFLuvpL8yWmgSZ/d3dd7s69SHwbhUSe3a5O8cLiNDVbl3SjyhDr j6Sz+rryUGRhDdKMgkIal+2T35Dt0Sq4r00dPKXEnUWeE9CcE7aLTV2SJI3OL+LqW7pn0q qLgtUORgizLqjlX0jsi0AC9iyfUB2l/bHmHgUhIQj9cfX8d1XQULe0V67TIJgWGkm14KNV T3X0ZrX4jOsx6u2zvFDmVMx20uOpjHIE1syYcLw6EJOejFXVJg3mwBa2aKgOlb38lTLHhR Khps/ErkoupxCRvg4kJ4EJrquVwXYR9uL18jaxl156SO121BPbXOAd5LYHL9DA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779305750; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hRaDYWWc2xS15lLg6zPLOMXGuwpwAcHRUWKZonCJL4U=; b=s647cYnVI612I1xgyrzZXy5AESytR6EIk/J7NTBPuloY/hYWwur351qB7TYhBjGJJ9T5mN VFNmvkGieBbNel/XQYyElpBaLicPsH4Vy6J+hImaw84BHM24hWLl5cUmqzNxc3b8T9EUuW r2B+nb5lm6TDNrEvDsESg4mPk0ENfN0xkc8Bkm45K98+bXZRZRHF6ZvmEySe14dgJSXVl2 syFTlD4x6uH6tONxWtTqoaK0IXuerybMAJzRicx86td9d9p2sCWIrkfG6IGmH+5wZKN77O RlcVZp93dSoSqXEdQD5aMGMFP/LsDIBqTrhV0KFF6kWTA3YhtKbbABk1Jo9G5Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLMGG0zJ1z1F3S for ; Wed, 20 May 2026 19:35:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38b8b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 19:35:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 0f15f5359041 - main - bsdinstall: Avoid invoking eval on the wlan SSID list List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 0f15f5359041ac50090606082a9c46d913ce7d0f Auto-Submitted: auto-generated Date: Wed, 20 May 2026 19:35:50 +0000 Message-Id: <6a0e0d16.38b8b.68b7b5cb@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=0f15f5359041ac50090606082a9c46d913ce7d0f commit 0f15f5359041ac50090606082a9c46d913ce7d0f Author: Mark Johnston AuthorDate: 2026-05-12 14:13:56 +0000 Commit: Mark Johnston CommitDate: 2026-05-20 19:34:50 +0000 bsdinstall: Avoid invoking eval on the wlan SSID list The wlanconfig utility is not careful about handling untrusted network names, which can contain shell metacharacters. Factor network selection into a subroutine and use the `set -- "$@"` trick to build up a list of positional parameters for bsddialog without evaluating them. Approved by: so Security: FreeBSD-SA-26:23.bsdinstall Security: CVE-2026-45255 Reported by: Austin Ralls Reviewed by: dteske, des, asiciliano Differential Revision: https://reviews.freebsd.org/D56973 --- usr.sbin/bsdinstall/scripts/wlanconfig | 47 ++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 16 deletions(-) diff --git a/usr.sbin/bsdinstall/scripts/wlanconfig b/usr.sbin/bsdinstall/scripts/wlanconfig index 33d94a933f45..aababf76c266 100755 --- a/usr.sbin/bsdinstall/scripts/wlanconfig +++ b/usr.sbin/bsdinstall/scripts/wlanconfig @@ -147,6 +147,34 @@ dialog_country_select() country_set "$regdomain" "$country" } +dialog_network_select() +{ + local ssid flags height width rows prompt + + # Avoid using eval on untrusted data. + set -- + while IFS=$'\t' read -r ssid flags; do + [ -n "$ssid" ] || continue + set -- "$@" "$ssid" "$flags" + done <&1 >&$DIALOG_TERMINAL_PASSTHRU_FD +} + ############################################################ MAIN : > "$BSDINSTALL_TMPETC/wpa_supplicant.conf" @@ -213,27 +241,14 @@ while :; do f_eval_catch -dk SCAN_RESULTS wlanconfig wpa_cli "wpa_cli scan_results" NETWORKS=$( echo "$SCAN_RESULTS" | awk -F '\t' ' - /..:..:..:..:..:../ && $5 { printf "\"%s\"\t\"%s\"\n", $5, $4 } + /..:..:..:..:..:../ && $5 { print $5 "\t" $4 } ' | sort | uniq ) if [ ! "$NETWORKS" ]; then f_dialog_title "$msg_error" f_yesno "No wireless networks were found. Rescan?" && continue else - f_dialog_title "Network Selection" - prompt="Select a wireless network to connect to." - f_dialog_menu_size height width rows "$DIALOG_TITLE" \ - "$DIALOG_BACKTITLE" "$prompt" "" $NETWORKS - NETWORK=$( eval $DIALOG \ - --title \"\$DIALOG_TITLE\" \ - --backtitle \"\$DIALOG_BACKTITLE\" \ - --extra-button \ - --extra-label \"Rescan\" \ - --menu \"\$prompt\" \ - $height $width $rows \ - $NETWORKS \ - 2>&1 >&$DIALOG_TERMINAL_PASSTHRU_FD - ) + NETWORK=$( dialog_network_select ) fi retval=$? f_dialog_data_sanitize NETWORK @@ -270,7 +285,7 @@ while :; do done [ "$ENCRYPTION" ] || ENCRYPTION=$( echo "$NETWORKS" | - awk -F '\t' "/^\"$NETWORK\"\t/ { print \$2 }" ) + awk -F '\t' "/^$NETWORK\t/ { print \$2 }" ) if echo "$ENCRYPTION" | grep -q PSK; then PASS=$( $DIALOG \ From nobody Wed May 20 19:35:51 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLMGH5sbBz6fJF1 for ; Wed, 20 May 2026 19:35: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLMGH2GMQz3Qb3 for ; Wed, 20 May 2026 19:35:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779305751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zP+ypm8RZHhP+19wfEKtgzCBuOM4hxf9mBiAX9z9624=; b=CrYmMMlfAKLzAkwzDg6FqlB01CIFPrtIkvgXSBXZa1w8SGSVF3UTeFdjFhz9x7eefREO8F EjGZMDrAGpbG2gMkSCz8SOOqKaWsgj4SfCmpoZAHLAyI3zTDVeG5P1A7RnHtCcCKnKFobb qAsrAVLSCPH3cUj46CwiO7VEaXVvzD+UtItsIjIOVdYkB1JnwlVoKUF1wIUDEBJ6+nK8WS +btEOs5HJqLVCGmVChirqzuOB3k6eGM/NuusqVQsbqJ7gG66aA3OOoPWr8nYs3DRoFVJhi FMrU5dzxavwLMkcxKigAZ+TllaMMp1Mhp2PK4Dj8gGUyGPv9ypB3FCckooUofQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779305751; a=rsa-sha256; cv=none; b=rsunW3JhSL70H1d7x5GXIWWbCyPMxk290sNVJJcvrbXQpu5GumUmYHb/R6nMdmTggJPP5M PSTrJ1qB3TOhm/YJuL+oxemeNlZoVuZ3sMaa7RX2Vis4JNMLG1IHCJfq6+TzosaI4/yOue V9LXEKQtC1zIcvsk12vTzizDhdOPCXhxlif8i0qqtmAQrqFCRfEallgUwsp8jIvcJTckS9 aI5Xtqh1uSEEStcE+4nYgxB7TdmxoMgn4LEJZPVeu+GfRt0AnxaDyoyqYW2Z5RniXm9/Rm NBbQTnwUZ1aXkX+ERe8ymj5ji7UvP2FV0rYZ7osEtL1KiT4AeBNkMUrg2kBsTA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779305751; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=zP+ypm8RZHhP+19wfEKtgzCBuOM4hxf9mBiAX9z9624=; b=iTOhgNf0qGLIgBwFYOawSXGA/Q42SXdo+v7rTyreJBsLWmSPTRsHNbxVt0LUqr653ikXzf hRlphZyAMF3eUqIdubV7q41I32Hxr0O5undAxxCDi1Amu2SaYwJiqZsdix4dOfh+XpfxUE 7mUUgNqinl1pky5xBKUf6A0aZ6IRQRM0c+7S1hLJQNFrx73/MXHyoUCs9ytNZNJJzc4T7W 64q/f+jJGTKMNWUWzNOo+QtlDZasklxAzDM0Fpobj3Fc1dchWYnBMVatu546XaCOL5E0tb TeLY7QL7dJl4KEizTtFTWqw/GQPxF0Cuif/XL8U3NVHarQB9zEBl82gWDhwlVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLMGH1p2Nz1DhL for ; Wed, 20 May 2026 19:35:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38413 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 19:35:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 2afb4c979f2d - main - bsdconfig: Make sure that SSID names are properly escaped List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 2afb4c979f2d1befc3e259a0a7359a8e31a48e55 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 19:35:51 +0000 Message-Id: <6a0e0d17.38413.67d1580c@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=2afb4c979f2d1befc3e259a0a7359a8e31a48e55 commit 2afb4c979f2d1befc3e259a0a7359a8e31a48e55 Author: Mark Johnston AuthorDate: 2026-05-12 14:16:46 +0000 Commit: Mark Johnston CommitDate: 2026-05-20 19:34:51 +0000 bsdconfig: Make sure that SSID names are properly escaped The f_menu_wpa_scan_results() function returns a list of networks discovered by a scan. The untrusted network names are evaluated in f_dialog_menu_wireless_edit. The quoting applied in f_menu_wpa_scan_results() protects against evaluation of something like "$(whoami)" but one can add single quotes to defeat that. Pass the SSID names through f_shell_escape to work around this. Escape single quotes in f_dialog_wireless_edit() and f_menu_wireless_configs() too for consistency. I note that this module doesn't seem to actually work, see e.g., bugzilla PR 229883. Approved by: so Security: FreeBSD-SA-26:23.bsdinstall Security: CVE-2026-45255 Reported by: Austin Ralls Reviewed by: dteske, des Differential Revision: https://reviews.freebsd.org/D56974 --- usr.sbin/bsdconfig/share/media/wlan.subr | 3 +++ 1 file changed, 3 insertions(+) diff --git a/usr.sbin/bsdconfig/share/media/wlan.subr b/usr.sbin/bsdconfig/share/media/wlan.subr index 5847356d1925..5d271c403b3c 100644 --- a/usr.sbin/bsdconfig/share/media/wlan.subr +++ b/usr.sbin/bsdconfig/share/media/wlan.subr @@ -813,6 +813,7 @@ f_dialog_wireless_edit() [ $nmatches -le ${#DIALOG_MENU_TAGS} ] || break f_substr -v tag "$DIALOG_MENU_TAGS" $nmatches 1 + f_shell_escape "$wssid" wssid f_wireless_describe WIRELESS_$n help menu_list1="$menu_list1 '$tag $wssid' '$wbssid' '$help' @@ -1076,6 +1077,7 @@ f_menu_wireless_configs() while [ $n -lt $nunique ]; do n=$(( $n + 1 )) menuitem_$n get ssid ssid + f_shell_escape "$ssid" ssid menuitem_$n get nconfigs nconfigs desc="$nconfigs $msg_configured_lc" @@ -1184,6 +1186,7 @@ f_menu_wpa_scan_results() while [ $n -lt $nunique ]; do n=$(( $n + 1 )) menuitem_$n get ssid ssid + f_shell_escape "$ssid" ssid desc= if [ "$DIALOG_MENU_WLAN_SHOW_ALL" ]; then From nobody Wed May 20 20:51:08 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLNxB5Dycz6fPJP for ; Wed, 20 May 2026 20:51: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLNx91dl4z40RP for ; Wed, 20 May 2026 20:51:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ikmcP1yIMqYaAfG6xtbmlPVMvJs6JRr3DeWVU6JeZs8=; b=ZRQEtofw1y7d1ut5T7fXYc62L75G2HHxryvNjZRoE0BhliJ5SHk5fdhDwnLlMnQ3dksBs6 7Z6hk9xAZy8D4t+J9+j0ekn+lylsKj92gKTRhchMwFYOTNNiJD7O/vfMpAJzlr6ahhK5JC DnpiyqamhvrGYbmr9YrFD1YzHrNbuTHzYRfrF8kWPF/67lkql/q87bAkaxHbCeva0JtZH5 DIojSGMjXUEiwH8JMtUkvg4CT+R1FKtQDY734cibkaDc2lqKak/vItnkvE3vE8BfHuIzeu jNz22zg20PBQCqpB2Y7E4XO41EQRaVf/4tLw9gjLKr7LyrrW3f5F5dUYtJsRWQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779310269; a=rsa-sha256; cv=none; b=fGD7lkbbmqODwQ695IxoufiDJ/841HQBLC04KnaVwPvUR+PcjPQapZ/fTiBPikP7WapP6R iRu8czM+MB8D5fkSxQDVXmdMe1UgW8b0pnb6dEBCPRXyHN4M4tVGg2hB7uRyq/M9+TnEZv 7+wFHtfnK8YFkjoewZmEJ1IrCzRUOW6SRV9PoAj35+MXOJo6BirJBtlxVmAfbhQxj2T7uM 1vT9izpaU5zZd9E5B+adnwQhndXExZchsxV+dSd4oEnYGqD6bPecw3o5wKPbtf9IBDiuom T5yOrmsenjUpARoxYntN/VyYYUdg59Tvm3mApERN0q5sd20lRJyV3VSF28fcOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310269; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ikmcP1yIMqYaAfG6xtbmlPVMvJs6JRr3DeWVU6JeZs8=; b=M00OLYO/y4bpuapWXNhSbqw9jQmKG4IYG0RfoSGFZXv6Ny5Csy63FGUFwDUOmxNOY51mzL J4Ly4qMDC6QLsaopb1UO8305e8Uy2pMl/AjzBdbytiDFYsmMdSu9G4w1ZTA6RszI47MXrO 5yaFugjuYzBmq8kLQEkEmSOYkVP23X3CcirLuk96wEEhzpsjZH1nVZ255ghgdRYqgWi5Pl f7wBcyyJyMwSDGoFWIi2fi5GrohvO0xyLFM7pquYFMn0U7wNfcqGzfTBDceGCIhbb9luUG +R+68hqUdGL/TR5cbxwVYbCDizz6kw6hh0lWXlCKQ2omjLTXNqVX0J82IiwarQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLNx84jygz1H06 for ; Wed, 20 May 2026 20:51:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3faea by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 20:51:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 59601a75d6fb - main - cap_net.3: Clarify monotonic reduction in permitted operations List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 59601a75d6fb1300b1aec2977eaa6adeb0300684 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 20:51:08 +0000 Message-Id: <6a0e1ebc.3faea.28d3af8c@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=59601a75d6fb1300b1aec2977eaa6adeb0300684 commit 59601a75d6fb1300b1aec2977eaa6adeb0300684 Author: Ed Maste AuthorDate: 2026-05-20 20:27:49 +0000 Commit: Ed Maste CommitDate: 2026-05-20 20:49:22 +0000 cap_net.3: Clarify monotonic reduction in permitted operations Reviewed by: markj, oshogbo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57141 --- lib/libcasper/services/cap_net/cap_net.3 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/libcasper/services/cap_net/cap_net.3 b/lib/libcasper/services/cap_net/cap_net.3 index ae9a6d820ae3..10d8c8b3f1f6 100644 --- a/lib/libcasper/services/cap_net/cap_net.3 +++ b/lib/libcasper/services/cap_net/cap_net.3 @@ -203,7 +203,8 @@ will consume and apply the limits. .Pp Once a set of limits is applied, subsequent calls to .Fn cap_net_limit -will fail unless the new set is a subset of the current set. +may only further restrict the service. +Any call that would grant operations not currently permitted will fail. .Pp If the .Fn cap_net_limit From nobody Wed May 20 20:58:46 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLP5z11nXz6fPjD for ; Wed, 20 May 2026 20:58:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLP5z0RHyz41g8 for ; Wed, 20 May 2026 20:58:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DYtMfXzqW/A1AMwNzP6cyJYuFG8wL7jcFQXLx6oygkw=; b=kT8Yr4whHa3XV7PSaRpixWn6vvDqt0qcN7VQ+x0HsCvSDAKuIKsEufUw3WVX/74U9iqOhH 8TWkOyAtQ8kMBYVSDhe0iExx50egGGFQxmSNGyLxAVohxYVZGL5UBSverUt+ef5j3WZqoI vLM5iW4kvCQCZbsZlggZdY5+yeAhKbIEc0KkUaqI/cnaSWP9+P8hdQG4oxiUuq7Fhdqn8p W6PBxF6hPKbXEXLqps1rXzZIXX0oSJvJ9EgKlbJYYquIRbpz6Jz17oitT97qeQ8EGosfqS K9U40Xa8RttSjmRzOOyTABCVwNKmiE1MKj+i8N4DxqXIASm6eY3Jw9/ZXhQyxg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779310727; a=rsa-sha256; cv=none; b=jnp1kkrlmgmO8HJpC7zgbTUKqXtZryaY+KXEct8T21Qjnd42i/mqFDfG0OaVS025MJOQBq lHqKZT0K28Kz3iq7Nv1pKv6+JvOVE962fi/zAOZIXbzJsGz48VNaDtdy1iM3zTh6Ku2ePH 18gceKU3bZFsMr8S4Rbw1JvuwUab8prauLK5st+3QhD4CrCNysJgm3yEG+h7a/v+JYru0m joMac40dSJfKl/XAHdqBLu8lUN6wUID0UfYgCvpXHFLIT9aczhbX+rkXI0+PFCpFyTwRvM MmQUCUXfl104jbtficcdVhI9yWImZYctDqW9rZiLu+CW0kKsPRVWLNyO4pFcgA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310727; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DYtMfXzqW/A1AMwNzP6cyJYuFG8wL7jcFQXLx6oygkw=; b=JMEu0JFccwJBcUTzPnKU/8tYvBkQw5ozBdDeY0GARm/oZLWoMIY7swEJGjc6f50OVsfznI MoLqVz5rd8xtWFQvvCtLj7X0AsDu/YadkEwMYSgr7wBgv1Zc+OHjJvzH5EarwGHPLPdNhQ n8sTwNJ2acKeJmoav3zWeEwt8QhbH1JwxLfDQu0useYo2/NdDRL2ZL4vq1xKNuPS3Q9u5T x0BwMwiN/9GqeYWSBZ2emLLsH1XCymgp4zM7rCh1wIIs0TA+IxI0loAU6A11CGfwSUoIIy ECMKh+M+CxDPswV2MlIWgUMAEejtuDT/d0KEF9lQU2FeFRqflcngKHgY/o0/ww== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLP5y6gwGz1HGl for ; Wed, 20 May 2026 20:58:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4012a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 20:58:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: c0256b31efcc - main - routing: Add support for metric List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c0256b31efcccb6964822b5aadb183e8a6d45507 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 20:58:46 +0000 Message-Id: <6a0e2086.4012a.6bd19187@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=c0256b31efcccb6964822b5aadb183e8a6d45507 commit c0256b31efcccb6964822b5aadb183e8a6d45507 Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-05-02 20:04:26 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-05-20 20:55:00 +0000 routing: Add support for metric In our routing stack implementation, metric is an attribute of the nexthop, not the route itself. Store metric in nhop_priv which is control-plane data of nexthop, filter the nexthops by metric and populate the mpath slots in nexthop group with only the lowest metric nexthops for use in the forwarding path. `cmp_priv()` compares nhops based on priv hash. Add metric compare logic to it and only return nexthops with different metrics if the input nexthop's metric is zero (wildcard). Also, add support for metric via rtsock by introducing rmx_metric. Finally, remove the upper 8-bit reservation of weight for administrative distance. Reviewed by: adrian Discussed with: markj Relnotes: yes Differential Revision: https://reviews.freebsd.org/D56322 --- sys/net/route.h | 7 +++-- sys/net/route/nhgrp_ctl.c | 61 +++++++++++++++++++++++++++++++------------ sys/net/route/nhop.h | 2 ++ sys/net/route/nhop_ctl.c | 39 ++++++++++++++++++++++++--- sys/net/route/nhop_var.h | 3 ++- sys/net/route/route_ctl.c | 5 +--- sys/net/route/route_helpers.c | 1 + sys/net/rtsock.c | 1 + 8 files changed, 92 insertions(+), 27 deletions(-) diff --git a/sys/net/route.h b/sys/net/route.h index 34df3297d6d4..d8cc12a39c61 100644 --- a/sys/net/route.h +++ b/sys/net/route.h @@ -90,7 +90,8 @@ struct rt_metrics { u_long rmx_pksent; /* packets sent using this route */ u_long rmx_weight; /* route weight */ u_long rmx_nhidx; /* route nexhop index */ - u_long rmx_filler[2]; /* will be used for T/TCP later */ + u_long rmx_metric; /* route metric */ + u_long rmx_filler[1]; }; /* @@ -103,7 +104,8 @@ struct rt_metrics { /* default route weight */ #define RT_DEFAULT_WEIGHT 1 -#define RT_MAX_WEIGHT 16777215 /* 3 bytes */ +#define RT_DEFAULT_METRIC 1 +#define RT_WILDCARD_METRIC 0 /* * Keep a generation count of routing table, incremented on route addition, @@ -300,6 +302,7 @@ struct rt_msghdr { #define RTV_RTT 0x40 /* init or lock _rtt */ #define RTV_RTTVAR 0x80 /* init or lock _rttvar */ #define RTV_WEIGHT 0x100 /* init or lock _weight */ +#define RTV_METRIC 0x200 /* init or lock _metric */ #ifndef NETLINK_COMPAT diff --git a/sys/net/route/nhgrp_ctl.c b/sys/net/route/nhgrp_ctl.c index 7230e02195ee..d0f954888997 100644 --- a/sys/net/route/nhgrp_ctl.c +++ b/sys/net/route/nhgrp_ctl.c @@ -135,6 +135,7 @@ sort_weightened_nhops_weights(struct weightened_nhop *wn, int num_items) * comparable. * Assumes @wn is sorted by weight ascending and each weight is > 0. * Returns number of slots or 0 if precise calculation failed. + * Only calculate for nexthops with specified metric and ignore the rest. * * Some examples: * note: (i, X) pair means (nhop=i, weight=X): @@ -144,17 +145,26 @@ sort_weightened_nhops_weights(struct weightened_nhop *wn, int num_items) */ static uint32_t calc_min_mpath_slots_fast(struct weightened_nhop *wn, size_t num_items, - uint64_t *ptotal) + uint32_t metric, uint64_t *ptotal) { - uint32_t i, last, xmin; + uint32_t i, x, last, xmin = 0; uint64_t total = 0; // Get sorted array of weights in .storage field sort_weightened_nhops_weights(wn, num_items); + /* start with lowest metric */ + for (x = 0; x < num_items; x++) { + if (nhop_get_metric(wn[x].nh) == metric) { + xmin = wn[x].storage; + break; + } + } last = 0; - xmin = wn[0].storage; - for (i = 0; i < num_items; i++) { + for (i = x; i < num_items; i++) { + if (nhop_get_metric(wn[i].nh) != metric) + continue; + total += wn[i].storage; if ((wn[i].storage != last) && ((wn[i].storage - last < xmin) || xmin == 0)) { @@ -176,7 +186,8 @@ calc_min_mpath_slots_fast(struct weightened_nhop *wn, size_t num_items, /* * Calculate minimum number of slots required to fit the existing - * set of weights while maintaining weight coefficients. + * set of weights while maintaining weight coefficients + * after filtering by metric. * * Assume @wn is sorted by weight ascending and each weight is > 0. * @@ -184,12 +195,13 @@ calc_min_mpath_slots_fast(struct weightened_nhop *wn, size_t num_items, * RIB_MAX_MPATH_WIDTH in case of any failure. */ static uint32_t -calc_min_mpath_slots(struct weightened_nhop *wn, size_t num_items) +calc_min_mpath_slots(struct weightened_nhop *wn, size_t num_items, + uint32_t metric) { uint32_t v; uint64_t total; - v = calc_min_mpath_slots_fast(wn, num_items, &total); + v = calc_min_mpath_slots_fast(wn, num_items, metric, &total); if (total == 0) return (0); if ((v == 0) || (v > RIB_MAX_MPATH_WIDTH)) @@ -224,6 +236,9 @@ get_nhgrp_alloc_size(uint32_t nhg_size, uint32_t num_nhops) /* * Compile actual list of nexthops to be used by datapath from * the nexthop group @dst. + * Since we only need nexthops with lowest metric, only process + * nexthops with specified metric. The metric argument is taken + * from input and is expected to be the lowest metric in weightened_nhop. * * For example, compiling control plane list of 2 nexthops * [(200, A), (100, B)] would result in the datapath array @@ -231,7 +246,7 @@ get_nhgrp_alloc_size(uint32_t nhg_size, uint32_t num_nhops) */ static void compile_nhgrp(struct nhgrp_priv *dst_priv, const struct weightened_nhop *x, - uint32_t num_slots) + uint32_t num_slots, uint32_t metric) { struct nhgrp_object *dst; int i, slot_idx, remaining_slots; @@ -239,14 +254,20 @@ compile_nhgrp(struct nhgrp_priv *dst_priv, const struct weightened_nhop *x, slot_idx = 0; dst = dst_priv->nhg; - /* Calculate sum of all weights */ + /* Calculate sum of all weights with lowest metric */ remaining_sum = 0; - for (i = 0; i < dst_priv->nhg_nh_count; i++) - remaining_sum += x[i].weight; + for (i = 0; i < dst_priv->nhg_nh_count; i++) { + if (nhop_get_metric(x[i].nh) == metric) + remaining_sum += x[i].weight; + } + remaining_slots = num_slots; - FIB_NH_LOG(LOG_DEBUG3, x[0].nh, "sum: %lu, slots: %d", - remaining_sum, remaining_slots); + FIB_NH_LOG(LOG_DEBUG3, x[0].nh, "sum: %lu, slots: %d, lowest_metric: %u", + remaining_sum, remaining_slots, metric); for (i = 0; i < dst_priv->nhg_nh_count; i++) { + if (nhop_get_metric(x[i].nh) != metric) + continue; + /* Calculate number of slots for the current nexthop */ if (remaining_sum > 0) { nh_weight = (uint64_t)x[i].weight; @@ -275,13 +296,13 @@ compile_nhgrp(struct nhgrp_priv *dst_priv, const struct weightened_nhop *x, * Returns group with refcount=1 or NULL. */ static struct nhgrp_priv * -alloc_nhgrp(struct weightened_nhop *wn, int num_nhops) +alloc_nhgrp(struct weightened_nhop *wn, int num_nhops, uint32_t min_metric) { uint32_t nhgrp_size; struct nhgrp_object *nhg; struct nhgrp_priv *nhg_priv; - nhgrp_size = calc_min_mpath_slots(wn, num_nhops); + nhgrp_size = calc_min_mpath_slots(wn, num_nhops, min_metric); if (nhgrp_size == 0) { /* Zero weights, abort */ return (NULL); @@ -314,7 +335,7 @@ alloc_nhgrp(struct weightened_nhop *wn, int num_nhops) FIB_NH_LOG(LOG_DEBUG, wn[0].nh, "num_nhops: %d, compiled_nhop: %u", num_nhops, nhgrp_size); - compile_nhgrp(nhg_priv, wn, nhg->nhg_size); + compile_nhgrp(nhg_priv, wn, nhg->nhg_size, min_metric); return (nhg_priv); } @@ -464,6 +485,8 @@ nhgrp_alloc(uint32_t fibnum, int family, struct weightened_nhop *wn, int num_nho struct nhgrp_priv *nhg_priv; struct nh_control *ctl; + MPASS((num_nhops != 0)); + if (rh == NULL) { *perror = E2BIG; return (NULL); @@ -487,6 +510,7 @@ nhgrp_alloc(uint32_t fibnum, int family, struct weightened_nhop *wn, int num_nho /* Sort nexthops & check there are no duplicates */ sort_weightened_nhops(wn, num_nhops); uint32_t last_id = 0; + uint32_t min_metric = nhop_get_metric(wn[0].nh); for (int i = 0; i < num_nhops; i++) { if (wn[i].nh->nh_priv->nh_control != ctl) { *perror = EINVAL; @@ -497,9 +521,12 @@ nhgrp_alloc(uint32_t fibnum, int family, struct weightened_nhop *wn, int num_nho return (NULL); } last_id = wn[i].nh->nh_priv->nh_idx; + + if (nhop_get_metric(wn[i].nh) < min_metric) + min_metric = nhop_get_metric(wn[i].nh); } - if ((nhg_priv = alloc_nhgrp(wn, num_nhops)) == NULL) { + if ((nhg_priv = alloc_nhgrp(wn, num_nhops, min_metric)) == NULL) { *perror = ENOMEM; return (NULL); } diff --git a/sys/net/route/nhop.h b/sys/net/route/nhop.h index 1e0dba158f04..6c62ae2f2f5f 100644 --- a/sys/net/route/nhop.h +++ b/sys/net/route/nhop.h @@ -219,6 +219,8 @@ uint32_t nhop_get_fibnum(const struct nhop_object *nh); void nhop_set_fibnum(struct nhop_object *nh, uint32_t fibnum); uint32_t nhop_get_expire(const struct nhop_object *nh); void nhop_set_expire(struct nhop_object *nh, uint32_t expire); +uint32_t nhop_get_metric(const struct nhop_object *nh); +void nhop_set_metric(struct nhop_object *nh, uint32_t metric); struct rib_head *nhop_get_rh(const struct nhop_object *nh); struct nhgrp_object; diff --git a/sys/net/route/nhop_ctl.c b/sys/net/route/nhop_ctl.c index 596ec9e25d1a..9ef5bbc74a92 100644 --- a/sys/net/route/nhop_ctl.c +++ b/sys/net/route/nhop_ctl.c @@ -149,13 +149,17 @@ get_aifp(const struct nhop_object *nh) } int -cmp_priv(const struct nhop_priv *_one, const struct nhop_priv *_two) +cmp_priv(const struct nhop_priv *key, const struct nhop_priv *search) { - if (memcmp(_one->nh, _two->nh, NHOP_END_CMP) != 0) + if (memcmp(key->nh, search->nh, NHOP_END_CMP) != 0) return (0); - if (memcmp(_one, _two, NH_PRIV_END_CMP) != 0) + if (memcmp(key, search, NH_PRIV_END_CMP) != 0) + return (0); + + if (key->nh_metric != RT_WILDCARD_METRIC && + key->nh_metric != search->nh_metric) return (0); return (1); @@ -171,6 +175,19 @@ set_nhop_mtu_from_info(struct nhop_object *nh, const struct rt_addrinfo *info) nhop_set_mtu(nh, info->rti_rmx->rmx_mtu, true); } +static void +set_nhop_metric_from_info(struct nhop_object *nh, const struct rt_addrinfo *info) +{ + uint32_t metric; + + if (info->rti_mflags & RTV_METRIC) + metric = info->rti_rmx->rmx_metric; + else + metric = RT_DEFAULT_METRIC; + + nhop_set_metric(nh, metric); +} + /* * Fills in shorted link-level sockadd version suitable to be stored inside the * nexthop gateway buffer. @@ -288,6 +305,7 @@ nhop_create_from_info(struct rib_head *rnh, struct rt_addrinfo *info, nhop_set_rtflags(nh, info->rti_flags); set_nhop_mtu_from_info(nh, info); + set_nhop_metric_from_info(nh, info); nhop_set_src(nh, info->rti_ifa); /* @@ -1044,6 +1062,21 @@ nhop_set_origin(struct nhop_object *nh, uint8_t origin) nh->nh_priv->nh_origin = origin; } +uint32_t +nhop_get_metric(const struct nhop_object *nh) +{ + return (nh->nh_priv->nh_metric); +} + +void +nhop_set_metric(struct nhop_object *nh, uint32_t metric) +{ + if (metric != RT_WILDCARD_METRIC) + nh->nh_priv->nh_metric = metric; + else + nh->nh_priv->nh_metric = RT_DEFAULT_METRIC; +} + void nhops_update_ifmtu(struct rib_head *rh, struct ifnet *ifp, uint32_t mtu) { diff --git a/sys/net/route/nhop_var.h b/sys/net/route/nhop_var.h index b8d7732551d3..0a07f4f3f901 100644 --- a/sys/net/route/nhop_var.h +++ b/sys/net/route/nhop_var.h @@ -81,6 +81,7 @@ struct nhop_priv { /* nhop lookup comparison end */ uint32_t nh_idx; /* nexthop index */ uint32_t nh_fibnum; /* nexthop fib */ + uint32_t nh_metric; /* nexthop metric */ void *cb_func; /* function handling additional rewrite caps */ u_int nh_refcnt; /* number of references, refcount(9) */ u_int nh_linked; /* refcount(9), == 2 if linked to the list */ @@ -106,6 +107,6 @@ int link_nhop(struct nh_control *ctl, struct nhop_priv *nh_priv); struct nhop_priv *unlink_nhop(struct nh_control *ctl, struct nhop_priv *nh_priv); /* nhop_ctl.c */ -int cmp_priv(const struct nhop_priv *_one, const struct nhop_priv *_two); +int cmp_priv(const struct nhop_priv *key, const struct nhop_priv *search); #endif diff --git a/sys/net/route/route_ctl.c b/sys/net/route/route_ctl.c index 7612c2bdfb58..cfa3b52b63a6 100644 --- a/sys/net/route/route_ctl.c +++ b/sys/net/route/route_ctl.c @@ -196,10 +196,7 @@ get_info_weight(const struct rt_addrinfo *info, uint32_t default_weight) weight = info->rti_rmx->rmx_weight; else weight = default_weight; - /* Keep upper 1 byte for adm distance purposes */ - if (weight > RT_MAX_WEIGHT) - weight = RT_MAX_WEIGHT; - else if (weight == 0) + if (weight == 0) weight = default_weight; return (weight); diff --git a/sys/net/route/route_helpers.c b/sys/net/route/route_helpers.c index 303ff018e9e0..f09a8bbbd3e5 100644 --- a/sys/net/route/route_helpers.c +++ b/sys/net/route/route_helpers.c @@ -458,6 +458,7 @@ rib_add_default_route(uint32_t fibnum, int family, struct ifnet *ifp, nhop_set_transmit_ifp(nh, ifp); nhop_set_src(nh, ifa); nhop_set_pxtype_flag(nh, NHF_DEFAULT); + nhop_set_metric(nh, RT_DEFAULT_METRIC); rnd.rnd_nhop = nhop_get_nhop(nh, &error); if (error == 0) diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 562cf6d426c9..47da83b5561b 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1328,6 +1328,7 @@ rt_getmetrics(const struct rtentry *rt, const struct nhop_object *nh, bzero(out, sizeof(*out)); out->rmx_mtu = nh->nh_mtu; out->rmx_weight = rt->rt_weight; + out->rmx_metric = nhop_get_metric(nh); out->rmx_nhidx = nhop_get_idx(nh); /* Kernel -> userland timebase conversion. */ out->rmx_expire = nhop_get_expire(nh) ? From nobody Wed May 20 20:58:47 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLP602gDyz6fPw8 for ; Wed, 20 May 2026 20:58:48 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLP600VFNz41X2 for ; Wed, 20 May 2026 20:58:48 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=naWfe77RptwI9utg+VugRPDdMT+65qGn8vOC/G45Ufw=; b=yQ2sk9IEac/FKH1w6Z03QUC5yVgnqmQhh8D9EBc1t7lxFqYxeZp1R8Bt7ILYB+5bGxncfR 57U5pdCzbljqyKmWrOpr/dIGV0lVWjooalM7onhIL/PexWFzVQhu2xHJ6T4i3lcubMYZTl m2RZg/FtBu9khBsgK3okHz32+BluDX22d1c2BeGnlmNGe96Nglj0zp7cx/1CF7sPxl1swd YJwjZCtHO3K+q1ID8v6ceCGkgiQz+govAfKFEgtINQqEYp/NqguQLfhRGeE342KQbZiDG3 4FxIqNxsX166YTwqDSHrxAYeqUwn/CQzodoDGLSmnbbDzHepiRxxv6pmQyr5Hg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779310728; a=rsa-sha256; cv=none; b=F172fHH9k2DzgHO4PsbWfbj8T7MUXX24OkQwvs964BulzSQ2MiAsNnqposZT+wMyV5yrRP IHNcQgZR4Gut25gdDru1T4/XbFFjHXn23UoCWpicFrzrObjlCoylVrGt3hm2YOndYvAOf0 Ab6GSMz12QCffPCl6yOhXD25KDho+Iq70ArYwb31o8F92NfkeJOnHXd+PvCYNRePCOmQPh y7VTiSr4PH66GBxSl7lwwv4kE6aF385c2W1nqV7A4iW+sd+Kj5pZzw0PoPVe2ANGpgC4Tq Uwwb4E9muekKsvlMnnTLyuzGFhoDnRTkTHQZPISiq0KD/tbRBErHfMbTflLtEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310728; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=naWfe77RptwI9utg+VugRPDdMT+65qGn8vOC/G45Ufw=; b=Gw4A/V3xJmY2eaiS093Y5Tmv9yeQ6udWZPAEI1+b5cNA2tKw/+Eh2kbgkNUU42elyHDqHz WAv6764l+cmeva2K6ZQOqOFKcL+RR0akywB/c1pv6/P1dqSDZcpq9YfShpCxWJPQqnqMa/ xIGxi5fyWEfq2kArhNJEUYffv/1FvTwwcfoB7KzLLvb9BicnnufcJAiWEp83Gnq9Q2V0Dx 0Y+sXo/JmZnm0msSQ2IeZiS30c9yyHCqF2fOg/Saes+12/nNcZ9kr7IBzCLt/bURHAQBz2 lB23Y72o7Y02bEBXh7K0KpsCX6L7tSwUXtIlMELDuQwZcMT1X0RRyNLDHalQYQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLP5z708lz1GKN for ; Wed, 20 May 2026 20:58:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4031a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 20:58:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: 73acfc586348 - main - netlink: Add RTA_PRIORITY support (metric) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 73acfc5863489f0d7ed671d5529eea4c05ec40e6 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 20:58:47 +0000 Message-Id: <6a0e2087.4031a.5b84ae22@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=73acfc5863489f0d7ed671d5529eea4c05ec40e6 commit 73acfc5863489f0d7ed671d5529eea4c05ec40e6 Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-05-02 20:58:40 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-05-20 20:55:03 +0000 netlink: Add RTA_PRIORITY support (metric) * Use our new 32-bit metric for RTA_PRIORITY support. * Update snl library for new RTA_PRIORITY support. * return RTA_PRIORITY for both MPATH and non-MPATH routes. Reviewed by: glebius (previous version) Discussed with: markj Differential Revision: https://reviews.freebsd.org/D56323 --- sys/netlink/netlink_snl_route_parsers.h | 4 ++++ sys/netlink/route/route.h | 2 +- sys/netlink/route/rt.c | 17 +++++++++++++++-- 3 files changed, 20 insertions(+), 3 deletions(-) diff --git a/sys/netlink/netlink_snl_route_parsers.h b/sys/netlink/netlink_snl_route_parsers.h index 7e5eaceb18e1..438ed820262b 100644 --- a/sys/netlink/netlink_snl_route_parsers.h +++ b/sys/netlink/netlink_snl_route_parsers.h @@ -52,6 +52,7 @@ struct rta_mpath_nh { uint8_t rtnh_flags; uint8_t rtnh_weight; uint32_t rtax_mtu; + uint32_t rta_metric; uint32_t rta_rtflags; uint32_t rta_expire; }; @@ -65,6 +66,7 @@ SNL_DECLARE_ATTR_PARSER(_metrics_mp_nh_parser, _nla_p_mp_nh_metrics); static const struct snl_attr_parser _nla_p_mp_nh[] = { { .type = NL_RTA_GATEWAY, .off = _OUT(gw), .cb = snl_attr_get_ip }, + { .type = NL_RTA_PRIORITY, .off = _OUT(rta_metric), .cb = snl_attr_get_uint32 }, { .type = NL_RTA_METRICS, .arg = &_metrics_mp_nh_parser, .cb = snl_attr_get_nested }, { .type = NL_RTA_RTFLAGS, .off = _OUT(rta_rtflags), .cb = snl_attr_get_uint32 }, { .type = NL_RTA_VIA, .off = _OUT(gw), .cb = snl_attr_get_ipvia }, @@ -121,6 +123,7 @@ struct snl_parsed_route { uint32_t rta_rtflags; uint32_t rtax_mtu; uint32_t rtax_weight; + uint32_t rta_metric; uint8_t rtm_family; uint8_t rtm_type; uint8_t rtm_protocol; @@ -138,6 +141,7 @@ static const struct snl_attr_parser _nla_p_route[] = { { .type = NL_RTA_DST, .off = _OUT(rta_dst), .cb = snl_attr_get_ip }, { .type = NL_RTA_OIF, .off = _OUT(rta_oif), .cb = snl_attr_get_uint32 }, { .type = NL_RTA_GATEWAY, .off = _OUT(rta_gw), .cb = snl_attr_get_ip }, + { .type = NL_RTA_PRIORITY, .off = _OUT(rta_metric), .cb = snl_attr_get_uint32 }, { .type = NL_RTA_METRICS, .arg = &_metrics_parser, .cb = snl_attr_get_nested }, { .type = NL_RTA_MULTIPATH, .off = _OUT(rta_multipath), .cb = nlattr_get_multipath }, { .type = NL_RTA_KNH_ID, .off = _OUT(rta_knh_id), .cb = snl_attr_get_uint32 }, diff --git a/sys/netlink/route/route.h b/sys/netlink/route/route.h index 60c3a22718a3..592b978b4745 100644 --- a/sys/netlink/route/route.h +++ b/sys/netlink/route/route.h @@ -149,7 +149,7 @@ enum rtattr_type_t { NL_RTA_IIF = 3, /* not supported */ NL_RTA_OIF = 4, /* u32, transmit ifindex */ NL_RTA_GATEWAY = 5, /* binary: IPv4/IPv6 gateway */ - NL_RTA_PRIORITY = 6, /* not supported */ + NL_RTA_PRIORITY = 6, /* u32, path metric */ NL_RTA_PREFSRC = 7, /* not supported */ NL_RTA_METRICS = 8, /* nested, list of NL_RTAX* attrs */ NL_RTA_MULTIPATH = 9, /* binary, array of struct rtnexthop */ diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c index dfc501e11299..09717c976021 100644 --- a/sys/netlink/route/rt.c +++ b/sys/netlink/route/rt.c @@ -181,12 +181,13 @@ dump_rc_nhg(struct nl_writer *nw, const struct route_nhop_data *rnd, struct rtms const struct weightened_nhop *wn; struct nhop_object *nh; uint32_t uidx, num_nhops, nh_expire; - uint32_t base_rtflags, rtflags, nhop_weight; + uint32_t base_rtflags, rtflags, nhop_weight, nhop_metric; MPASS((NH_IS_NHGRP(rnd->rnd_nhop))); /* select a nhop from nhgrp to not confuse non-mpath consumers */ nhop_weight = RT_DEFAULT_WEIGHT; + nhop_metric = RT_DEFAULT_METRIC; nh = nhop_select_func(rnd->rnd_nhop, 0); rtflags = nhop_get_rtflags(nh); if (nh->nh_flags & NHF_GATEWAY) @@ -223,13 +224,16 @@ dump_rc_nhg(struct nl_writer *nw, const struct route_nhop_data *rnd, struct rtms nlattr_add_u32(nw, NL_RTA_RTFLAGS, rtflags); if (rtflags & RTF_FIXEDMTU) dump_rc_nhop_mtu(nw, wn[i].nh); + nlattr_add_u32(nw, NL_RTA_PRIORITY, nhop_get_metric(wn[i].nh)); nh_expire = nhop_get_expire(wn[i].nh); if (nh_expire > 0) nlattr_add_u32(nw, NL_RTA_EXPIRES, nh_expire - time_uptime); rtnh = nlattr_restore_offset(nw, nh_off, struct rtnexthop); - if (nh == wn[i].nh) + if (nh == wn[i].nh) { nhop_weight = wn[i].weight; + nhop_metric = nhop_get_metric(wn[i].nh); + } /* * nlattr_add() allocates 4-byte aligned storage, no need to aligh * length here @@ -237,6 +241,7 @@ dump_rc_nhg(struct nl_writer *nw, const struct route_nhop_data *rnd, struct rtms rtnh->rtnh_len = nlattr_save_offset(nw) - nh_off; } nlattr_set_len(nw, off); + nlattr_add_u32(nw, NL_RTA_PRIORITY, nhop_metric); nlattr_add_u32(nw, NL_RTA_WEIGHT, nhop_weight); } @@ -278,6 +283,7 @@ dump_rc_nhop(struct nl_writer *nw, const struct route_nhop_data *rnd, struct rtm /* In any case, fill outgoing interface */ nlattr_add_u32(nw, NL_RTA_OIF, if_getindex(nh->nh_ifp)); + nlattr_add_u32(nw, NL_RTA_PRIORITY, nhop_get_metric(nh)); if (rnd->rnd_weight != RT_DEFAULT_WEIGHT) nlattr_add_u32(nw, NL_RTA_WEIGHT, rnd->rnd_weight); } @@ -516,6 +522,7 @@ struct nl_parsed_route { uint32_t rta_table; uint32_t rta_rtflags; uint32_t rta_nh_id; + uint32_t rta_metric; uint32_t rta_weight; uint32_t rta_expire; uint32_t rtax_mtu; @@ -538,6 +545,7 @@ static const struct nlattr_parser nla_p_rtmsg[] = { { .type = NL_RTA_DST, .off = _OUT(rta_dst), .cb = nlattr_get_ip }, { .type = NL_RTA_OIF, .off = _OUT(rta_oif), .cb = nlattr_get_ifp }, { .type = NL_RTA_GATEWAY, .off = _OUT(rta_gw), .cb = nlattr_get_ip }, + { .type = NL_RTA_PRIORITY, .off = _OUT(rta_metric), .cb = nlattr_get_uint32 }, { .type = NL_RTA_METRICS, .arg = &metrics_parser, .cb = nlattr_get_nested }, { .type = NL_RTA_MULTIPATH, .off = _OUT(rta_multipath), .cb = nlattr_get_multipath }, { .type = NL_RTA_WEIGHT, .off = _OUT(rta_weight), .cb = nlattr_get_uint32 }, @@ -866,6 +874,7 @@ create_nexthop_one(struct nl_parsed_route *attrs, struct rta_mpath_nh *mpnh, nhop_set_transmit_ifp(nh, mpnh->ifp); nhop_set_pxtype_flag(nh, get_pxflag(attrs)); nhop_set_rtflags(nh, attrs->rta_rtflags); + nhop_set_metric(nh, attrs->rta_metric); if (attrs->rtm_protocol > RTPROT_STATIC) nhop_set_origin(nh, attrs->rtm_protocol); @@ -941,6 +950,7 @@ create_nexthop_from_attrs(struct nl_parsed_route *attrs, nhop_set_broadcast(nh, true); if (attrs->rtm_protocol > RTPROT_STATIC) nhop_set_origin(nh, attrs->rtm_protocol); + nhop_set_metric(nh, attrs->rta_metric); nhop_set_pxtype_flag(nh, get_pxflag(attrs)); nhop_set_rtflags(nh, attrs->rta_rtflags); @@ -1022,6 +1032,9 @@ path_match_func(const struct rtentry *rt, const struct nhop_object *nh, void *_d { struct nl_parsed_route *attrs = (struct nl_parsed_route *)_data; + if (attrs->rta_metric != 0 && attrs->rta_metric != nhop_get_metric(nh)) + return (0); + if ((attrs->rta_gw != NULL) && !rib_match_gw(rt, nh, attrs->rta_gw)) return (0); From nobody Wed May 20 20:58:49 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLP613jd2z6fPjR for ; Wed, 20 May 2026 20:58:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLP611CrNz41X4 for ; Wed, 20 May 2026 20:58:49 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GlbHD5nQ2XwsVZiXgDbroc9XLHX3icQXWjPwL8y78JE=; b=LHzQ2cc1rSXv0hpRtnX6tU6+s0wokq+22uob63JinGlOavTs3WrdCsdvcx/E2mYUuOtLhS Gao0haNf4SRmVuZMbjsRz2aRO9ETSE2p6SwHu4RSfkNbTn9Pg12JBJob9bGBfm+yc1X55J CePRhTMLZ72Yee70FacPGP5YzUzqqBpmHIURNW1Gf0xp+K9yMyq9YJihRgIPqsrhCxOgdz Hpq4M9Z0tVlVkKpe47GwlsYaEQud9ApIUHKpiG4hKPA6CFBKksx90LwtRV+yEmawMAhqJF ukydyNGdjdjoPPdtgnVnr7lDsUb3u6wC4PPmo/6TlxtXNRT7N0AYcBUfK+/H5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779310729; a=rsa-sha256; cv=none; b=JirNL7UvFmCDaolGyw0vl7NwZfkkyw3r5JgPnxeIyUY7qEn9OK2FM+nfJzbn66JdSLkYo7 l9yFaJmSqNmwUsAEx70IJQWFUAj8xMdyTCVT/AGMlZAQNY8r6cTYBmHVVl9z+EVvWucnkA pK61GEU7f9REWcM1Z7WRw9S/d+CHViUiesU4Kx6xJdoIb4XGY4sZNGeKXiax0JYZ2/7v4r MjTm1XuEtrxAeABpQzsC6WKwVRNWeMjp0616wlbrq40EtdPylcmuyZCduU12OJLl8In1Up hoTO/X6QtZ4MLLeX+oKNX2/KXhbMWxSCGnB4sUzehDGMxOfNSt9Fp7dCcaSMeA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GlbHD5nQ2XwsVZiXgDbroc9XLHX3icQXWjPwL8y78JE=; b=xsvdm2vQc4HUohvXMeeYtb/OItU8Oz/oTgHnjbuul/Jfz7bmMEfBwzLSfCKR/vMTAB62wm bq+XnssRCvsYXDmqB8049zpdaHBOVaTALiy9VkmejX3dRk3vUlGqPtBSM9EnZatFmkGE+c qq6ib8KWu1wiFROdLvuT4t2HaFqVR3MtXcR3WE4qqlZC2zwJ2ZHhlBbgSrxBTChsFo5aOV ZCu2Ik5HTCsbFFE9sLdROcgyyLbiktxt+zWsJJ0MxBSlFNtmlxpcDbCc1A/z/FcuxC/kdH E40GP6TU3QChBahGUISEenS3U3HHwBZNttJmggvXrjX68Rgy0Fyd7tHCoosKPw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLP610h64z1HGm for ; Wed, 20 May 2026 20:58:49 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4031e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 20:58:49 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: b9a246a91797 - main - rtnetlink.4: Add RTA_PRIORITY List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b9a246a9179777d28567c33a9a0f4b5f6055ab73 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 20:58:49 +0000 Message-Id: <6a0e2089.4031e.43505988@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=b9a246a9179777d28567c33a9a0f4b5f6055ab73 commit b9a246a9179777d28567c33a9a0f4b5f6055ab73 Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-05-02 21:14:46 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-05-20 20:55:04 +0000 rtnetlink.4: Add RTA_PRIORITY Add metric implementation of netlink to manual. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D56324 --- share/man/man4/rtnetlink.4 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/share/man/man4/rtnetlink.4 b/share/man/man4/rtnetlink.4 index f15e2690ef49..2161db157234 100644 --- a/share/man/man4/rtnetlink.4 +++ b/share/man/man4/rtnetlink.4 @@ -22,7 +22,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd November 1, 2022 +.Dd May 15, 2026 .Dt RTNETLINK 4 .Os .Sh NAME @@ -178,6 +178,8 @@ Default route table is .Dv RT_TABLE_MAIN . To explicitly specify "all tables" one needs to set the value to .Dv RT_TABLE_UNSPEC . +.It Dv RTA_PRIORITY +(uint32_t) metric of the nexthop. .It Dv RTA_EXPIRES (uint32_t) seconds till path expiration. .It Dv RTA_NH_ID From nobody Wed May 20 20:58:50 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLP625Fqhz6fPjT for ; Wed, 20 May 2026 20:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLP621f1Mz41jj for ; Wed, 20 May 2026 20:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wy0kcKS9ZVyTUQoKGEVcvDikFcVwfmUbgEdSfYsxSmg=; b=h4R41CmC3ZHuxqrz11QMIsxPwuSx7KSZpsYFfDabIJ6Re1DHYTUieKY7siMUc6EADRtSHa avvsVvbWBanICh1yne4OMvK1TsqZDV/8DFr6aGmuFCu7uMH/VxGvnl87j0R+Cbdb1tWH5B Z2wHupxzFA2FXx35iX6TUBDBxz1hmRx0B8pb3ac2Av6iynisXp1zpv4VBG3aQJh44k7UMe V/+Br1fDz/T94WAPcheKxmXnpmgOl90C5t52U2CvwyYv5G4wPVugYwnt8W5MGnqKMAF34J 8rtg23rPqsOYy7trEUxllOkhwIYUuJPN4PgWjvFYz1SAi9tDoAltc1sQYs0hew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779310730; a=rsa-sha256; cv=none; b=skOzkfHlYIdQNcPqgy/PP3Mcv8rhKV0FAe9jswNa58dr0xCb8ltkFHCknXFdnjAvb42hUp G3H5UW8vuzDVtDf6/0+YkaiD88ES57IvJ4fymV59l/pN3FrSzGkyB/wAYjUqvKPh9AFVVm AEWA4ngNvnD+9SOMCNnvsXi4/bpt7W7SAp+QPlHkAWW9Gn3sple9wxKbYOJm/WpMACBcbN PjEz/PPgciawZoAja6EsvOggxjc6iaBD5myL2+ofmzDTPEC88FunCf977YAu9EjsC5EE8U IcerGGqNLC0xdB3OZygYlt9z8QXmcUeIzw7bypPdil32nDzbfW5ePtnNb/ShdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310730; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=wy0kcKS9ZVyTUQoKGEVcvDikFcVwfmUbgEdSfYsxSmg=; b=VUWvRl6KvCsF8eqKC+47ojxZ1MrwEaOm6hOqpi0BqVljUKgDCGCw65N5JrfdfP+UEi5bhp Af+bnrLGy5NeuuAYZ7Ar/hqklp0LTRLIxsFajAg20QsmEsRP8V6U3VEmM4cVkm4CmDesYy 2lzmzyzGHTY7oVA0utQIKYmKpu9dzg8F/0/bIkkWQUouoBapTrOyK0Trjm8VwHcwOVEyMN 4ehVozqptFf62Fyl050gZRk9YF7oIvKSNRFeT3OLe7N47+Cwu0+IcRfo9njCXQvQJYW4Mh uQIG5MPrf5r23lhM8x9yG4zfoGmgN82r736HKw184WH7aWj/qoY+tXiqfYWKjQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLP6214J0z1H8K for ; Wed, 20 May 2026 20:58:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40afd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 20:58:50 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: 6dd429aeabec - main - route(8): Show metric value in get route List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6dd429aeabecd63ece3c567b73472e2c75991afc Auto-Submitted: auto-generated Date: Wed, 20 May 2026 20:58:50 +0000 Message-Id: <6a0e208a.40afd.6ded16ed@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=6dd429aeabecd63ece3c567b73472e2c75991afc commit 6dd429aeabecd63ece3c567b73472e2c75991afc Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-05-03 11:55:25 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-05-20 20:55:05 +0000 route(8): Show metric value in get route Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D56325 --- sbin/route/route_netlink.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/sbin/route/route_netlink.c b/sbin/route/route_netlink.c index 531336903896..eef8c2cfef18 100644 --- a/sbin/route/route_netlink.c +++ b/sbin/route/route_netlink.c @@ -383,16 +383,18 @@ print_getmsg(struct nl_helper *h, struct nlmsghdr *hdr, struct sockaddr *dst) struct rt_metrics rmx = { .rmx_mtu = r.rtax_mtu, .rmx_weight = r.rtax_weight, + .rmx_metric = r.rta_metric, .rmx_expire = r.rta_expire, }; - printf("\n%9s %9s %9s %9s %9s %10s %9s\n", "recvpipe", - "sendpipe", "ssthresh", "rtt,msec", "mtu ", "weight", "expire"); + printf("\n%9s %9s %9s %9s %9s %9s %9s %9s\n", "recvpipe", "sendpipe", + "ssthresh", "rtt,msec", "mtu ", "metric", "weight", "expire"); printf("%8lu ", rmx.rmx_recvpipe); printf("%8lu ", rmx.rmx_sendpipe); printf("%8lu ", rmx.rmx_ssthresh); printf("%8lu ", 0UL); printf("%8lu ", rmx.rmx_mtu); + printf("%8lu ", rmx.rmx_metric); printf("%8lu ", rmx.rmx_weight); printf("%8ld \n", rmx.rmx_expire); } @@ -436,6 +438,7 @@ print_nhop_getmsg(struct nl_helper *h, struct nlmsghdr *hdr, struct sockaddr *ds .gw = r.rta_gw, .ifindex = r.rta_oif, .rtax_mtu = link.ifla_mtu, + .rta_metric = r.rta_metric, }; printf("\tvia "); print_nlmsg_route_nhop(h, &r, &nh, true); From nobody Wed May 20 20:58:51 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLP63563Nz6fPtK for ; Wed, 20 May 2026 20:58:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLP632jtzz41wW for ; Wed, 20 May 2026 20:58:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KOkkUIbeEJIz07iR6MrN21/ca2n4v1wzkQCrV+oCeBM=; b=BTSMXDHmng9UIsvB7WBT8bAvFKJCsDBdsZM2ZkNsQhaePYaIJFEDjGkwHb3vRFOtpEOHWM Lt18LT8jY5kD531M7F47O3rO/i+uso3kH+qe5VADz4j9frqSiwIo1nlyyWVUTl886iBpop JnIU70SWbqZB6N9V5GDD/nQe8EfY7Lvurll050KhmU4wwum21BTYJs2g1BASjjCND8W1mV K4D8yE2WGbC0/20EwEY10Lr4M0Rl1547Kc1Yf8o6zVwa3Xkw218kv9Gwt5cqGHdFwNJvFW 05IOBKQhRQCWDjtSui8vDV2Me83lvtFfHkXNZgEc4Y75kp41lKDY1MRqhP81zw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779310731; a=rsa-sha256; cv=none; b=xFlU8U61v5QxHKRqqQhyu+0ff1XCEtyC8lf+pXSR9JmWLCJCNLQ4ce4rAlr0F3FEjh0bnB Z6gQZ5eqImHFErRKGNBgUp7mCm9kbIk7KlN5oDpKic2M7fef+5Xy6d3/xsqLrjVr+hwfxQ stkceuvNSfbp5cJOtS5994EP0TbjWpBHv2ExVZ5tVo7k1espNvyXvLR+KijRg1l/P1rmaH jLbRCaL9xFwMbsb/zwrp3JCPIKNp8MGz6OxCLXBnDG/ZnDGmLs1fwLZqKuDNrWUav3OKZN xq9DpGJda9MLAcOLFyeSQ7j83Td0DZbBNAgN4lPeWbqi+Ev3ZCROfUDewnUDCw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310731; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KOkkUIbeEJIz07iR6MrN21/ca2n4v1wzkQCrV+oCeBM=; b=MtP9HFMAyGCQf8hROc0Tkn7CByMqryLAzSeDMZC191HVQm9/4QMVsHN8o6XCJ/As3HM5CO dLE7XeWNOjM0vYwGEHG54mvs0RFDbzeSBNbjCjXN4bA2XV9mZt2AsKdhh9Dpud8LNRkfsw xUJkMowBLHHE3rswACS9j5lHBihRutQdGe7nNfCLoIH+B0aBHcHp8sCW1rJR+lLWO5no/l Lh0hG9KC/nccQVSKLaiSnc1cCg5y5kaY7SBk8iRHPmpJ99Lejnwp73gwpE/JgSJvaUOpYs FbjSG7aocZkcHZoKEDDQZuCIIF2gWJ+c2Le3T6Rip1Dz1ffsP5mwFX0DlHYc2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLP631tgWz1Gxy for ; Wed, 20 May 2026 20:58:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4012e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 20:58:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: f15b8a8f1de1 - main - route(8): Show metric value in monitor route List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f15b8a8f1de1c1d879afe9296eb3d998c64469c6 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 20:58:51 +0000 Message-Id: <6a0e208b.4012e.6f9d230b@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=f15b8a8f1de1c1d879afe9296eb3d998c64469c6 commit f15b8a8f1de1c1d879afe9296eb3d998c64469c6 Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-05-04 17:59:15 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-05-20 20:55:07 +0000 route(8): Show metric value in monitor route Reviewed by: glebius Differential Revision: https://reviews.freebsd.org/D56326 --- sbin/route/route_netlink.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sbin/route/route_netlink.c b/sbin/route/route_netlink.c index eef8c2cfef18..20c82c25f5cf 100644 --- a/sbin/route/route_netlink.c +++ b/sbin/route/route_netlink.c @@ -542,6 +542,7 @@ print_nlmsg_route_nhop(struct nl_helper *h, struct snl_parsed_route *r, if (nh->rtax_mtu == 0) nh->rtax_mtu = link.ifla_mtu; printf("iface %s ", link.ifla_ifname); + printf("metric %d ", nh->rta_metric); printf("weight %d ", nh->rtnh_weight); if (nh->rtax_mtu != 0) printf("mtu %d ", nh->rtax_mtu); From nobody Wed May 20 20:58:52 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLP647444z6fPyh for ; Wed, 20 May 2026 20:58:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLP643vJvz41tl for ; Wed, 20 May 2026 20: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=1779310732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fgqtwruRYnrJdth48gEXicoDj5pPXsO/sSvFNDi2QnI=; b=lC+c8YlTU1ral1RlNMJAI/cu/msAyKU0OBikmyNPLChIO1BKY4RQmKQXRMpZivN+cnqoa6 YD7iKeHLhuudvod+9+n3ksFMx4a4KxBdJ5mmnq86iZstP7ga6a+CoxVFePcxo5AWaGGT48 ghCNzRRZEe+qW1JJxgCK8ZI/weGQf7LZtyS3ncvq2UfJl4M5Qcfyf+WxZSoIjepbPiEBfv DOl4bvGWxCe62iZVGoACHpRYGhlXtv7gLOYFs+If8dx9MLb7/wVgZXCiUNt9AO7M+oWD0g 31AH61r6ZIwroQHALhEPE4M9eF7+rliJO+Nij+tF4kRjRlRa9ld1ZszXGfdHQQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779310732; a=rsa-sha256; cv=none; b=PqyC4tmZHk35Pl1tKsbvN33SGeZXSIwFtxO8lpQmUKN/oF+9fykwC5PljRsukWm6h3XX/f LZZE+7OQLS5m8Cx3Ilw31IF+NR4IabWcW8FKPJWUqoHWh12EHbNtgrt9wcr3ClIArUsLZ1 BOdS0TKgHmETISqk2tpNONKg/d8kaosEyQ+atS9QPsICq3c2UokB+hXlZewnC6xbncY9Hx vHdRKTk5xWwkm94hMh5gR4Sk+eKd0DiSXqK0EE2CAxj4OWpbL4toIq+CKnphIu3ucXlYFt Pr5sJXdAj2UMFcKFZVvcHZwjdFQw2+OvBkuVgA6+zmlDQZ7cO1Tho23qJr4gyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310732; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=fgqtwruRYnrJdth48gEXicoDj5pPXsO/sSvFNDi2QnI=; b=PkCKyLEP2jMvGGmBViWRK/gtEYGkVaF+YBXfSF62vaga93j7pb1VSiQudMoGyTYTlLrOAC UcWk0+f0xx87nkpUEvk+gPpGfkNbB2oyPia80XpfpHhE0xuLR/AzKR3qLF8sTeqppSo0Hb j1o0pdUy977RstSO27B2TKMw5i6NTTR0g01E6YG79PyJubGQKX5BpEntRgUo8nXJOlOMip RoD0Bcb8AZHi3lRaWPYS6E94Kec2uwCXQpLCvtQHmZtJbCkbQpMBMExWYD+Wozt7yGO4AG IFYk0fwWgeDTw8w/pyX4boFDdRaVaBMzRSqWbLKYZ9E1cNQBW17n4b4UHELqgg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLP643QJNz1H8L for ; Wed, 20 May 2026 20:58:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ebd8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 20:58:52 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: 2e2d402d061d - main - route(8): Add metric argument List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 2e2d402d061dc0d091308c477ab800b3eda007ad Auto-Submitted: auto-generated Date: Wed, 20 May 2026 20:58:52 +0000 Message-Id: <6a0e208c.3ebd8.14f1859c@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=2e2d402d061dc0d091308c477ab800b3eda007ad commit 2e2d402d061dc0d091308c477ab800b3eda007ad Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-05-02 21:22:17 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-05-20 20:55:08 +0000 route(8): Add metric argument Add support for metric in route command. Differential Revision: https://reviews.freebsd.org/D56335 --- sbin/route/keywords | 1 + sbin/route/route.c | 4 ++++ sbin/route/route_netlink.c | 2 ++ 3 files changed, 7 insertions(+) diff --git a/sbin/route/keywords b/sbin/route/keywords index cbd8799ffb6b..3dbfcd187773 100644 --- a/sbin/route/keywords +++ b/sbin/route/keywords @@ -50,6 +50,7 @@ ssthresh static sticky weight +metric x25 xns xresolve diff --git a/sbin/route/route.c b/sbin/route/route.c index f0d9515f9892..84c520bd4f39 100644 --- a/sbin/route/route.c +++ b/sbin/route/route.c @@ -813,6 +813,7 @@ set_metric(char *value, int key) caseof(K_RTT, RTV_RTT, rmx_rtt); caseof(K_RTTVAR, RTV_RTTVAR, rmx_rttvar); caseof(K_WEIGHT, RTV_WEIGHT, rmx_weight); + caseof(K_METRIC, RTV_METRIC, rmx_metric); } rtm_inits |= flag; if (lockrest || locking) @@ -823,6 +824,8 @@ set_metric(char *value, int key) *valp = strtol(value, &endptr, 0); if (errno == 0 && *endptr != '\0') errno = EINVAL; + if (flag & RTV_METRIC && *valp == RT_WILDCARD_METRIC) + err(EX_USAGE, "Metric can not be zero"); if (errno) err(EX_USAGE, "%s", value); if (flag & RTV_EXPIRE && (value[0] == '+' || value[0] == '-')) { @@ -999,6 +1002,7 @@ newroute(int argc, char **argv) case K_RTT: case K_RTTVAR: case K_WEIGHT: + case K_METRIC: if (!--argc) usage(NULL); set_metric(*++argv, key); diff --git a/sbin/route/route_netlink.c b/sbin/route/route_netlink.c index 20c82c25f5cf..051662688047 100644 --- a/sbin/route/route_netlink.c +++ b/sbin/route/route_netlink.c @@ -270,6 +270,8 @@ rtmsg_nl_int(struct nl_helper *h, int cmd, int rtm_flags, int fib, int rtm_addrs if (rt_metrics->rmx_expire > 0) snl_add_msg_attr_u32(&nw, NL_RTA_EXPIRES, rt_metrics->rmx_expire); + if (rt_metrics->rmx_metric > 0) + snl_add_msg_attr_u32(&nw, NL_RTA_PRIORITY, rt_metrics->rmx_metric); if (rt_metrics->rmx_weight > 0) snl_add_msg_attr_u32(&nw, NL_RTA_WEIGHT, rt_metrics->rmx_weight); From nobody Wed May 20 20:58:53 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLP656lzSz6fPlf for ; Wed, 20 May 2026 20: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLP654N1nz41tn for ; Wed, 20 May 2026 20: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=1779310733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sCcKIMg3fKKxtnIz1zerKGPnAc/ytNgKhkNYVn+BadM=; b=sZxlcPweCFoHzXTNfVO2+aBp0sfuhZyM9b20wMcmmaf8yMWZwLgN9cGqyzTsNbeyNe+FqS mBSVV7bTT1WauNBoo6kD0b9gXej1s+1ysNIKJt6TLFP7vTj8KRXGYs+Yjbjm3vwAU7p9vp Bng5PUou3Ah/zDz+c4mIxTlIxakQJvgtCAGMYT+g6sNo/xS41SwgwvMGpdaZAfENmR4Bap +qv3PyGYvjLY0GDDecQ88q+3SW0owQExOi6eYdVkev56KHaxmTINZIoJs/SwoQ7lX38eAP vuxWY4KiHUntUfFaPt+wL0oyG0/G5pM4mxYxVB4rMKO6H8xmxkfSbJew6oN1Ng== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779310733; a=rsa-sha256; cv=none; b=RkLl94sYqwtJahU/bS9yoFA0knZM6U3VT0cN77MihmyyV12y7qTJPpOz6RTEYcg6fJ0orU g6eq4rZE8fe4pCtTPw17RohqU39lRNKFulI+ycJaZHxfjJjdYZNcXC5efNWsAuigNOiDVB dkYrkBKjFnld8ZQU3MKT1/fUS4M8WzbtQUUP5yAFAfx2ivW9h4tJObMJLpq2TLz2KbzN3y e1aU6VLF4vABtmuC2ELdbXTpNY2PkKN9o6I52esF/dDgvUHwHz83KtBlykUy70dWJrL6le Mw4pbMyMGkgCVwyQScd6yA0w4lUd5ONYmAU0XFEBwVdrQPs7ij6dzZlY1+jFAg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310733; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=sCcKIMg3fKKxtnIz1zerKGPnAc/ytNgKhkNYVn+BadM=; b=U3R/xtS7tVv549ujrKOGe5RXd69flNsptIO8jjGQqbHPxVJX0wX1dZVN4bxAaQ0w1BwTdK U2QDHLC6pwfHEfdRhfMAwoCzqwKx8utLj/dyYHaTkBcFzfF0SbLl5ciN7i0WuRSM02+NTF GMNto8MQ0aDOp9eKboO7JickwuPDwgoNJQGBO5to8T+hN6sPPRwllkPw0uZxM994Rfjg3j ltz579AJCHL/IwYGMwg3lhyHZrAHwDx0HVg35Kixzo2a+b2vvwUgIgsTteTre/AnA2zU/R nlmdQtkgVBP2UKFchta01f7J8CuFcqVxs0ZN8Mnm64M1VapBJUNrqgMffwuvaA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLP653VJ0z1GWS for ; Wed, 20 May 2026 20:58:53 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f1cf by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 20:58:53 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: d87e5b28b763 - main - route.8: Describe metric modifier List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d87e5b28b763f1f0d73fd0ba0ce7f4eee30a8fca Auto-Submitted: auto-generated Date: Wed, 20 May 2026 20:58:53 +0000 Message-Id: <6a0e208d.3f1cf.2f6952a6@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=d87e5b28b763f1f0d73fd0ba0ce7f4eee30a8fca commit d87e5b28b763f1f0d73fd0ba0ce7f4eee30a8fca Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-05-15 22:02:09 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-05-20 20:55:09 +0000 route.8: Describe metric modifier Describe `-metric` argument in the route manual. Discussed with: ziaee Differential Revision: https://reviews.freebsd.org/D57025 --- sbin/route/route.8 | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/sbin/route/route.8 b/sbin/route/route.8 index 5cb16120c8d8..424b005ca984 100644 --- a/sbin/route/route.8 +++ b/sbin/route/route.8 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd May 16, 2026 +.Dd May 17, 2026 .Dt ROUTE 8 .Os .Sh NAME @@ -308,6 +308,26 @@ and .Dq Fl gateway Ar 3fff::2 Fl weight Ar 200 will make the nexthop 3fff::2 twice as likely to be chosen as 3fff::1. .Pp +The +.Fl metric +option sets the numeric cost associated with a route nexthop. +The lowest metric is always preferred and routes with higher metric +values are only used if lower-metric routes become unavailable. +This allows routes to establish primary and backup nexthops without +removing the primary. +The default value for +.Fl metric +is 1 when not specified. +When multiple routes to the same destination have identical metrics, the +.Fl weight +option determines which nexthop is selected for ECMP. +.Pp +For example, a destination with two nexthops defined as +.Dq Fl gateway Ar 3fff::1 Fl metric Ar 1 +and +.Dq Fl gateway Ar 3fff::2 Fl metric Ar 2 +will cause the nexthop 3fff::1 to be selected. +.Pp Routes have associated flags which influence operation of the protocols when sending to destinations matched by the routes. These flags may be set (or sometimes cleared) From nobody Wed May 20 20:58:54 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLP666ZMcz6fPjk for ; Wed, 20 May 2026 20: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLP6655Hrz41mJ for ; Wed, 20 May 2026 20: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=1779310734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gnm1OWTji7GqoDJl20qrjxnMCzk41Myr5rGYW9bKpBQ=; b=GNOyXOzUl7MYIsRU8h2Gb78ALdoD4x34RoC9bY3rxowJ8fXK7QmYlIsAsPCSEKCL4UNexU 1KpdtMHDBwk/M/aegr9kK+ZDcCF61d6zUy/VfB/gxZGlcpJ8dWKUQ3rleZloY/u1RQD2zy oG7TVE0IUNxcYdXDFnjwpr3BOp7SkA2LNHPYJo2T76zA8algJbABch1vnzwdNuWq+tNZRu dmDIUdjS3hafYXq5GtZTHF4TA2D18uJD1ndDftkOur06VJAsItyIfVjrcYnUbJqvWmeiwz hRrqYTQS45ouniKJAOoLogmzp4idK/aG7NQHcKQw3Wlge8R832BZPAHQKp+yNQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779310734; a=rsa-sha256; cv=none; b=oj4T2ubtIHZwwxJXMo+CCKscACoTv2dGNyVsiTOTa3aEY6ibDD4LzMn18cLoBuZ+xtdne3 2xBWyDKGDZ7zRQfXURZRGx+PSIt6ClSN+Nc7JPfK5rZ7IvLmgFk+G4eoZ6S2pCxqFwIBKI Jnui5fJkxhXXgzWHXx6sdxY1Sp4JOdDPBVU/izQ0mAXTHw2X3OtLiFMRE6ZVYp3puv3ZOX uzztFYLC8GWpE8MAhkaqhU9hAHpCoquIHMsPB6/c2MzylM/TKwZSLnAU7lbngni8PVbLLF apLP3gaWmphghP4o2GiLfvGiEssq/EwReEOQBXytb4kk8pSKrxPQR5lxg745nw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310734; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=gnm1OWTji7GqoDJl20qrjxnMCzk41Myr5rGYW9bKpBQ=; b=ABEgYbjPTvhSDO9LCkSoHSeghmy2N3EB/x65W+txX9tfcTjte+tu8QFLd/9kdubLf/DIC6 kk47YfW5gwzNX0L44WSxpxiFvIXl1djIn3o486aZkXGmw9+LL8tmN7YwwH3X8QiWwm16gK vdY1JbVIehcBpd+IRbWWQ715niBsoUTUxBK4Sz1pTUn4SsQJNbxPUyOHU88JdathZJolcv eMXQ3Q9CfHpBLHXHzqRJmYPfq6w3z3EeOPpZMvKYZ+CT11lPKbMWcNTKiFFYAFKhOdzBOq 5hE/YOUAtEwU2K2H57TEzI+u5zYDS+rced/87dtvizvzcqqn+PsjURHDK2bgNw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLP664VNtz1GWT for ; Wed, 20 May 2026 20:58:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40322 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 20:58:54 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: 1f03c62e43a0 - main - netstat(1): Show metric value for routes List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1f03c62e43a02ec705b9998f37edde0258c442e9 Auto-Submitted: auto-generated Date: Wed, 20 May 2026 20:58:54 +0000 Message-Id: <6a0e208e.40322.18657a80@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=1f03c62e43a02ec705b9998f37edde0258c442e9 commit 1f03c62e43a02ec705b9998f37edde0258c442e9 Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-05-15 10:08:16 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-05-20 20:55:10 +0000 netstat(1): Show metric value for routes Add metric support and show its value in wide flag and libxo output. Also, add metric to the description of wide flag (`-w`) in routing display (`-r`) section of manual page. Reviewed by: markj (manpage) Discussed with: markj Differential Revision: https://reviews.freebsd.org/D57011 --- usr.bin/netstat/common.h | 1 + usr.bin/netstat/netstat.1 | 4 ++-- usr.bin/netstat/route.c | 12 ++++++++---- usr.bin/netstat/route_netlink.c | 9 ++++++--- 4 files changed, 17 insertions(+), 9 deletions(-) diff --git a/usr.bin/netstat/common.h b/usr.bin/netstat/common.h index d5d39902037b..a2b560c1b849 100644 --- a/usr.bin/netstat/common.h +++ b/usr.bin/netstat/common.h @@ -52,6 +52,7 @@ struct _wid { int pksent; int mtu; int iface; + int metric; int expire; }; void set_wid(int fam); diff --git a/usr.bin/netstat/netstat.1 b/usr.bin/netstat/netstat.1 index 5c7f2336c06b..52e91c20d5eb 100644 --- a/usr.bin/netstat/netstat.1 +++ b/usr.bin/netstat/netstat.1 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 7, 2026 +.Dd May 18, 2026 .Dt NETSTAT 1 .Os .Sh NAME @@ -678,7 +678,7 @@ Do not resolve numeric addresses and port numbers to names. See .Sx GENERAL OPTIONS . .It Fl W -Show the path MTU for each route, and print interface names with a +Show the metric and path MTU for each route, and print interface names with a wider field size. .It Fl F Display the routing table with the number diff --git a/usr.bin/netstat/route.c b/usr.bin/netstat/route.c index 697c7ba2e9e1..1337a48faeed 100644 --- a/usr.bin/netstat/route.c +++ b/usr.bin/netstat/route.c @@ -205,13 +205,14 @@ pr_rthdr(int af1 __unused) if (Wflag) { xo_emit("{T:/%-*.*s} {T:/%-*.*s} {T:/%-*.*s} {T:/%*.*s} " - "{T:/%*.*s} {T:/%*.*s} {T:/%*s}\n", + "{T:/%*.*s} {T:/%*.*s} {T:/%*.*s} {T:/%*s}\n", wid.dst, wid.dst, "Destination", wid.gw, wid.gw, "Gateway", wid.flags, wid.flags, "Flags", wid.mtu, wid.mtu, "Nhop#", wid.mtu, wid.mtu, "Mtu", wid.iface, wid.iface, "Netif", + wid.metric, wid.metric, "Metric", wid.expire, "Expire"); } else { xo_emit("{T:/%-*.*s} {T:/%-*.*s} {T:/%-*.*s} {T:/%*.*s} " @@ -233,6 +234,7 @@ set_wid(int fam) wid.pksent = 8; wid.mtu = 6; wid.iface = WID_IF_DEFAULT; + wid.metric = 8; wid.expire = 6; } @@ -326,8 +328,9 @@ p_rtentry_sysctl(const char *name, struct rt_msghdr *rtm) snprintf(buffer, sizeof(buffer), "{[:-%d}{:flags/%%s}{]:} ", wid.flags - protrusion); p_flags(rtm->rtm_flags, buffer); - /* Output path weight as non-visual property */ + /* Output path weight and metric as non-visual property */ xo_emit("{e:weight/%u}", rtm->rtm_rmx.rmx_weight); + xo_emit("{e:metric/%lu}", rtm->rtm_rmx.rmx_metric); if (Wflag) { /* XXX: use=0? */ xo_emit("{t:nhop/%*lu} ", wid.mtu, rtm->rtm_rmx.rmx_nhidx); @@ -346,9 +349,10 @@ p_rtentry_sysctl(const char *name, struct rt_msghdr *rtm) strlcpy(prettyname, "---", sizeof(prettyname)); } - if (Wflag) + if (Wflag) { xo_emit("{t:interface-name/%*s}", wid.iface, prettyname); - else + xo_emit("{t:metric/%*lu} ", wid.metric, rtm->rtm_rmx.rmx_metric); + } else xo_emit("{t:interface-name/%*.*s}", wid.iface, wid.iface, prettyname); if (rtm->rtm_rmx.rmx_expire) { diff --git a/usr.bin/netstat/route_netlink.c b/usr.bin/netstat/route_netlink.c index 2c4b7a5c6b00..f7349650f4c6 100644 --- a/usr.bin/netstat/route_netlink.c +++ b/usr.bin/netstat/route_netlink.c @@ -177,8 +177,9 @@ p_path(struct snl_parsed_route *rt, bool is_mpath) snprintf(buffer, sizeof(buffer), "{[:-%d}{:flags/%%s}{]:} ", wid.flags - protrusion); p_flags(rt->rta_rtflags | RTF_UP, buffer); - /* Output path weight as non-visual property */ + /* Output path weight and metric as non-visual property */ xo_emit("{e:weight/%u}", rt->rtax_weight); + xo_emit("{e:metric/%lu}", rt->rta_metric); if (is_mpath) xo_emit("{e:nhg-kidx/%u}", rt->rta_knh_id); else @@ -213,9 +214,10 @@ p_path(struct snl_parsed_route *rt, bool is_mpath) } - if (Wflag) + if (Wflag) { xo_emit("{t:interface-name/%*s}", wid.iface, prettyname); - else + xo_emit("{t:metric/%*lu} ", wid.metric, rt->rta_metric); + } else xo_emit("{t:interface-name/%*.*s}", wid.iface, wid.iface, prettyname); if (rt->rta_expire > 0) { @@ -242,6 +244,7 @@ p_rtentry_netlink(struct snl_state *ss, const char *name, struct nlmsghdr *hdr) rt.rta_gw = nhop->gw; rt.rta_oif = nhop->ifindex; rt.rtax_weight = nhop->rtnh_weight; + rt.rta_metric = nhop->rta_metric; rt.rta_rtflags = nhop->rta_rtflags ? nhop->rta_rtflags : orig_rtflags; rt.rtax_mtu = nhop->rtax_mtu ? nhop->rtax_mtu : orig_mtu; rt.rta_expire = nhop->rta_expire; From nobody Wed May 20 20:58:55 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLP681g6Hz6fPqy for ; Wed, 20 May 2026 20:58:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLP675cRMz420J for ; Wed, 20 May 2026 20:58:55 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wb7aN7f/xkB+Z0B/4iQZggwes+oiKLkAoi9rgNz+P/U=; b=yye+0OWjVVg5GoalRcbc3+xN4YxFDGDBS4KL5SjExvdX382V/XBQ+TzbvG/YL2YrGESaXo N/c2gQ6LpjlRqduHiBBApebzX2XcoOSCll2PYC9FonNJrzQgnfFssakj1vaWgacIjwnE2d EN/x8tKAJQUjZnUD4K8G7moubXmjXTo2OJBqlkhguhrRTx5DLIw0YDLbB3T32u2nCoVGBY kRJQYdVkz5XwmUtEz/x8k08a5QD7iMl1p6gz13kpqfGWufZEMtKTjxTHnECQaEOpp/PYTE l29TOCEkBFL8HneRfluSKEoDE+Go3ygBnYFALIf77qnuLiRZa8Rh0DemzTOY6w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779310735; a=rsa-sha256; cv=none; b=RL2hUIBT95Pd9gLulMqzg+vz8Tu43ZQS8Kdy1o36Y/jh2v0cTKM0VaM8FOE53nhd5QCm38 ES3kvnOFlBRDYMzIjDyi68T9a3e9/zFhgqsLcLlgeqhQ1tYQfFFBX5AdNIVOzj2lUTBVSO buUBxwYJFPuxcVRv/e9ZAdLjMI8JSTLUPNOifVGwiHHczHVhqL58wwsfeu8B4mfKu1KJyT XjxTtoZMP2L0Z3GHCWTf0dOtDSktMJ+ROVobjdZSb4JMainH9JLv/zgonVmUo0p1Td4WzS KNNNy8m1qHxx9xHk7irO3ODc/9K9AQ8pmecuA5DbNdymklYBXp+UI/7uv7ylfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779310735; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Wb7aN7f/xkB+Z0B/4iQZggwes+oiKLkAoi9rgNz+P/U=; b=quOadhl7SCCfIq7fvt93ZIn5V8iCh9YkJkvIKeP9DM9zEEFeAwXYKlfKHygBYca5qlx5KT H/jl4t6+tEot2ZMXTD7AWuTWf4cRa6hIINoi2dxsDYuCRW4r3pRRqiO0R03WM2cZPc05Lu rtXwbVzUYpTvxzJap1NXjHjkEPvfO5wWR1ON1BKzzcsKXKjtwcAjd7TqOX3ElBqH1ewMsq 8KaABio/dsL09RtM8jqDScWKR92tEASq35LTKJQz9MCWj0EYlad5VzLqOQloe7boLWBgkh acblvcXRI4yvj1YMUxsNpHkT3Jeshd5UhRAj/BzD3qQb5dbz6qzyjzmX5w4tfA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLP674nR9z1HBL for ; Wed, 20 May 2026 20:58:55 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 40227 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 20 May 2026 20:58:55 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Pouria Mousavizadeh Tehrani Subject: git: bc301fee4cb2 - main - routing: Add tests for metric List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pouria X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bc301fee4cb2c3e9ce220dc3e0cbb9d7d5a83d6f Auto-Submitted: auto-generated Date: Wed, 20 May 2026 20:58:55 +0000 Message-Id: <6a0e208f.40227.6189aa08@gitrepo.freebsd.org> The branch main has been updated by pouria: URL: https://cgit.FreeBSD.org/src/commit/?id=bc301fee4cb2c3e9ce220dc3e0cbb9d7d5a83d6f commit bc301fee4cb2c3e9ce220dc3e0cbb9d7d5a83d6f Author: Pouria Mousavizadeh Tehrani AuthorDate: 2026-05-15 14:03:37 +0000 Commit: Pouria Mousavizadeh Tehrani CommitDate: 2026-05-20 20:55:11 +0000 routing: Add tests for metric Add tests to make sure: * Default metric is enforced. * Lowest metric wins. * Deleting routes by specifying gateway/metric works. Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57016 --- tests/sys/net/routing/Makefile | 3 + tests/sys/net/routing/test_routing.sh | 231 ++++++++++++++++++++++++++++++++++ 2 files changed, 234 insertions(+) diff --git a/tests/sys/net/routing/Makefile b/tests/sys/net/routing/Makefile index c725d23f15d1..cbb00a236871 100644 --- a/tests/sys/net/routing/Makefile +++ b/tests/sys/net/routing/Makefile @@ -8,6 +8,7 @@ ATF_TESTS_C += test_rtsock_lladdr ATF_TESTS_C += test_rtsock_ops ATF_TESTS_PYTEST += test_routing_l3.py ATF_TESTS_PYTEST += test_rtsock_multipath.py +ATF_TESTS_SH+= test_routing ${PACKAGE}FILES+= generic_cleanup.sh ${PACKAGE}FILESMODE_generic_cleanup.sh=0555 @@ -15,6 +16,8 @@ ${PACKAGE}FILESMODE_generic_cleanup.sh=0555 # Most of the tests operates on a common IPv4/IPv6 prefix, # so running them in parallel will lead to weird results. TEST_METADATA+= is_exclusive=true +TEST_METADATA.test_routing+= execenv="jail" \ + execenv_jail_params="vnet" CFLAGS+= -I${.CURDIR:H:H:H} diff --git a/tests/sys/net/routing/test_routing.sh b/tests/sys/net/routing/test_routing.sh new file mode 100755 index 000000000000..296bd7ebaffd --- /dev/null +++ b/tests/sys/net/routing/test_routing.sh @@ -0,0 +1,231 @@ +# +# Copyright (c) 2026 Pouria Mousavizadeh Tehrani +# +# SPDX-License-Identifier: BSD-2-Clause +# + +. $(atf_get_srcdir)/../../common/vnet.subr + +jq_rtentry() +{ + local route="$1" + + jq -r '.statistics."route-information"."route-table"."rt-family".[]."rt-entry".[] | + select(.destination == "'${route}'")' +} + +jq_nhop_filter() +{ + local nhop="$1" + local weight="$2" + local metric="$3" + + jq -r 'select(.gateway == "'${nhop}'") | + select(.weight == '${weight}') | + select(.metric == '${metric}') | + .gateway' +} + + +atf_test_case "add_lowest_metric" "cleanup" +add_lowest_metric_head() +{ + atf_set descr 'Create 4 routes to same dst and verify the lowest metric wins' + atf_set require.user root + atf_set require.progs jq +} + +add_lowest_metric_body() +{ + local epair laddr route nhop1 nhop2 nhop3 + + laddr="3fff::1" + route="3fff:a::" + nhop1="3fff::1" + nhop2="3fff::2" + nhop3="3fff::3" + + vnet_init + epair=$(vnet_mkepair) + + atf_check -o ignore \ + ifconfig ${epair}a inet6 ${laddr} up + + # Create an ECMP route with metric 2 + atf_check -o ignore \ + route -6 add -net ${route}/64 -gateway ${nhop2} -weight 10 -metric 2 + atf_check -o ignore \ + route -6 add -net ${route}/64 -gateway ${nhop3} -weight 10 -metric 2 + + # Validate routes + atf_check -o save:netstat \ + netstat -rn6 --libxo json + output=$(cat netstat | jq_rtentry ${route}/64 | jq_nhop_filter ${nhop2} 10 2) + atf_check_equal "$output" "$nhop2" + output=$(cat netstat | jq_rtentry ${route}/64 | jq_nhop_filter ${nhop3} 10 2) + atf_check_equal "$output" "$nhop3" + + # Create a route with metric 3 + atf_check -o ignore \ + route -6 add -net ${route}/64 -gateway ${nhop1} -metric 3 + # Verify that nhop1 is not the best route + atf_check -o not-match:".*gateway: ${nhop1}.*" \ + route -n6 get -net ${route}/64 + + # Create a route to the same nhop with same metric 3 and verify it fails + atf_check -s exit:1 -o ignore -e match:".*exists.*" \ + route -6 add -net ${route}/64 -gateway ${nhop1} -metric 3 + + # Create a route to an existing nhop with lower metric + atf_check -o ignore \ + route -6 add -net ${route}/64 -gateway ${nhop1} -metric 1 + # Verify that nhop1 is now the best route + atf_check -o match:".*gateway: ${nhop1}.*" \ + route -n6 get -net ${route}/64 +} + +add_lowest_metric_cleanup() +{ + vnet_cleanup +} + +atf_test_case "add_default_metric" "cleanup" +add_default_metric_head() +{ + atf_set descr 'Create a route and verify the default metric is set' + atf_set require.user root + atf_set require.progs jq +} + +add_default_metric_body() +{ + local epair laddr route nhop1 + + laddr="3fff::1" + route="3fff:a::" + nhop1="3fff::1" + + vnet_init + epair=$(vnet_mkepair) + + atf_check -o ignore \ + ifconfig ${epair}a inet6 ${laddr} up + + # Create a route without specifying its metric + atf_check -o ignore \ + route -6 add -net ${route}/64 -gateway ${nhop1} + + # Verify the route has the default metric of 1 + atf_check -o save:netstat \ + netstat -rn6 --libxo json + output=$(cat netstat | jq_rtentry ${route}/64 | jq_nhop_filter ${nhop1} 1 1) + atf_check_equal "$output" "$nhop1" +} + +add_default_metric_cleanup() +{ + vnet_cleanup +} + +atf_test_case "delete_route_with_metric" "cleanup" +delete_route_with_metric_head() +{ + atf_set descr 'Create multiple routes to same dst and delete routes with specific metric' + atf_set require.user root + atf_set require.progs jq +} + +delete_route_with_metric_body() +{ + local epair laddr route nhop1 nhop2 + + laddr="3fff::1" + route="3fff:a::" + nhop1="3fff::1" + nhop2="3fff::2" + + vnet_init + epair=$(vnet_mkepair) + + atf_check -o ignore \ + ifconfig ${epair}a inet6 ${laddr} up + + # Create two groups of ECMP routes with metric 2 and 3, and + # another route with metric 4. + atf_check -o ignore \ + route -6 add -net ${route}/64 -gateway ${nhop1} -metric 3 + atf_check -o ignore \ + route -6 add -net ${route}/64 -gateway ${nhop1} -weight 10 -metric 2 + atf_check -o ignore \ + route -6 add -net ${route}/64 -gateway ${nhop2} -weight 10 -metric 2 + atf_check -o ignore \ + route -6 add -net ${route}/64 -gateway ${nhop2} -metric 3 + atf_check -o ignore \ + route -6 add -net ${route}/64 -gateway ${nhop2} -metric 4 + + # Validate we have 5 routes + atf_check -o save:netstat \ + netstat -rn6 --libxo json + output=$(cat netstat | jq_rtentry ${route}/64 | jq_nhop_filter ${nhop1} 1 3) + atf_check_equal "$output" "$nhop1" + output=$(cat netstat | jq_rtentry ${route}/64 | jq_nhop_filter ${nhop1} 10 2) + atf_check_equal "$output" "$nhop1" + output=$(cat netstat | jq_rtentry ${route}/64 | jq_nhop_filter ${nhop2} 10 2) + atf_check_equal "$output" "$nhop2" + output=$(cat netstat | jq_rtentry ${route}/64 | jq_nhop_filter ${nhop2} 1 3) + atf_check_equal "$output" "$nhop2" + output=$(cat netstat | jq_rtentry ${route}/64 | jq_nhop_filter ${nhop2} 1 4) + atf_check_equal "$output" "$nhop2" + + # Delete one of the nexthops of them best ECMP route + # Test that deleting a route by specifying gateway + metric works. + atf_check -o ignore \ + route -n6 delete -net ${route}/64 -gateway ${nhop2} -metric 2 + + # Verify that nhop1 is the best route now + atf_check -o match:".*gateway: ${nhop1}.*" \ + route -n6 get -net ${route}/64 + + # But other route with nhops2 should exists. + atf_check -o save:netstat \ + netstat -rn6 --libxo json + output=$(cat netstat | jq_rtentry ${route}/64 | jq_nhop_filter ${nhop2} 1 3) + atf_check_equal "$output" "$nhop2" + output=$(cat netstat | jq_rtentry ${route}/64 | jq_nhop_filter ${nhop2} 1 4) + atf_check_equal "$output" "$nhop2" + + # Delete routes with nhop1 as nexthop without specifying metric. + # Test that deleting a route by gateway removes all routes with + # that gateway, regardless of metric value. + atf_check -o ignore \ + route -n6 delete -net ${route}/64 -gateway ${nhop1} + + # Verify that nhop2 is the best route now + atf_check -o match:".*gateway: ${nhop2}.*" \ + route -n6 get -net ${route}/64 + + # Delete routes with metric 3 without specifying their gateway. + # Test that deleting a route by metric removes all routes with + # that metric, regardless of gateway value. + atf_check -o ignore \ + route -n6 delete -net ${route}/64 -metric 3 + + # Verify that nhop2 is still the best route with metric of 4 + atf_check -o match:".*gateway: ${nhop2}.*" \ + route -n6 get -net ${route}/64 + output=$(cat netstat | jq_rtentry ${route}/64 | jq_nhop_filter ${nhop2} 1 4) + atf_check_equal "$output" "$nhop2" +} + +delete_route_with_metric_cleanup() +{ + vnet_cleanup +} + + +atf_init_test_cases() +{ + atf_add_test_case "add_lowest_metric" + atf_add_test_case "add_default_metric" + atf_add_test_case "delete_route_with_metric" +} From nobody Thu May 21 06:13:57 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLdQY2cCfz6fTFQ for ; Thu, 21 May 2026 06:13: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLdQY0n6Rz3BvY for ; Thu, 21 May 2026 06: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=1779344037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vhlSl2QPT4pj6wGZjYq/J49ZvyUC2iy5OLvg1kXOLWo=; b=A29EZZO66GqyM3zacRG5KzCLXIUQxvrQh74ZMhr5Z/uf2WJnOEY+BAn/9po3xGCCSTKdn8 t9kU5xJDM+JGZkNMRrU6LSmVDJskiFucYVbCy2/WWWaITS4I38wakUgTK8zMXMIC7Pr1dj dwoOBlqJ31UDMtF6usdx4xDKlX3hrzUPyGtSw/cqv63fFvkRRCQH19u3JcT5pjL2/+Bwz8 BzJNugOKhsE8h7Uav3vIvEecJSbTyO0xuI9zNkQcN+XM/2vGd/hN1AxTqoOM+xMjiosKl3 GwfTaTxQfgebKeqg9KQCNBolkSNw3fWJMV1crwqE5WIzSKMgO3KAJclaxZrWUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779344037; a=rsa-sha256; cv=none; b=JpAFsIjFuVqMEzJ3Gdv6sgV+bAk7xqyOpRJNaQ7QJb47OVKuzailjfEzNU7TLupYjBGaNo 7uBVbKCIJjlxIeSmkaK1MrOYZsEPhiv3Wr8iLWn+QLoieRjQKpXZfEiYcUwd1j5MeOmTyY sdN2FkWSGjsZBJOmDDKRjHcaKI5YHbCa69Yz4Y7C2oC9Puc6i+sqphieD8jYH5rZHRoR23 A+kg93HVhiQ1EPjoJwg4E9VXpBteFe7BPn7BGzMCH89InVkXeVS4P5FsdmKDpUzR01KuPF p5El4/y2oq1SkpVS6hO3JS6rCjNT7ata3aS94mKWkRMvXCvQaIgTweJBlwFxvA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779344037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vhlSl2QPT4pj6wGZjYq/J49ZvyUC2iy5OLvg1kXOLWo=; b=U8hvTPnM904yKgs/WSR39mZItDr2Nx9jvmpuubLzvAW0QdvlF64NLqYGFWHWmCBpYT0dJO sZZuBFoozkZW4kG0Miny2drzxr2nFWkN7Gs1u2iQzhMK+J1QmpQwSwUn1+InJ3HTKMqYAk DBm6ibjIcRH9chqTRSSUYHG5DTqxrMlPtWdQ1v5bAqET5/e/fB7y6+YAxjks3MMc+Q9llP 7DijyS8F1hu/nE4TSm6oaK1ptjPApUWmc8jnIegcZ3LLhrD/0aCIDuJ8MssIyVAeJKn+tZ PoW+Nmjr7SFZ44Oz+/udVWTw8bZXgtMw3hbfpzbyX1B83vOuvUUkS1bUABbCKA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLdQY0MZBz4Jk for ; Thu, 21 May 2026 06:13:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34572 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 06:13:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mariusz Zaborski Subject: git: 1d0410fb349f - main - ping6: convert receive loop from pselect(2) to ppoll(2) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: oshogbo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d0410fb349fded5a79db3c6e6d993eb9efcc10c Auto-Submitted: auto-generated Date: Thu, 21 May 2026 06:13:57 +0000 Message-Id: <6a0ea2a5.34572.49219d68@gitrepo.freebsd.org> The branch main has been updated by oshogbo: URL: https://cgit.FreeBSD.org/src/commit/?id=1d0410fb349fded5a79db3c6e6d993eb9efcc10c commit 1d0410fb349fded5a79db3c6e6d993eb9efcc10c Author: Mariusz Zaborski AuthorDate: 2026-05-21 06:08:46 +0000 Commit: Mariusz Zaborski CommitDate: 2026-05-21 06:10:49 +0000 ping6: convert receive loop from pselect(2) to ppoll(2) pselect(2) might overflow if the desciptor number is above FD_SETSIZE and silently corrupt the stack. Switch to ppoll(2) so the receive socket fd is no longer constrained by FD_SETSIZE. Reported by: Joshua Rogers of AISLE Research Team Reviewed by: markj MFC after: 7 days Differential Revision: https://reviews.freebsd.org/D56721 --- sbin/ping/ping6.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sbin/ping/ping6.c b/sbin/ping/ping6.c index f81de062e59a..b00b00ac8ce1 100644 --- a/sbin/ping/ping6.c +++ b/sbin/ping/ping6.c @@ -111,6 +111,7 @@ #include #include #include +#include #include #include #include @@ -1145,7 +1146,7 @@ ping6(int argc, char *argv[]) struct timespec now, timeout; struct msghdr m; struct iovec iov[2]; - fd_set rfds; + struct pollfd pfd; int n; /* signal handling */ @@ -1154,15 +1155,16 @@ ping6(int argc, char *argv[]) seeninfo = 0; continue; } - FD_ZERO(&rfds); - FD_SET(srecv, &rfds); + pfd.fd = srecv; + pfd.events = POLLIN; + pfd.revents = 0; clock_gettime(CLOCK_MONOTONIC, &now); timespecadd(&last, &intvl, &timeout); timespecsub(&timeout, &now, &timeout); if (timeout.tv_sec < 0) timespecclear(&timeout); - n = pselect(srecv + 1, &rfds, NULL, NULL, &timeout, NULL); + n = ppoll(&pfd, 1, &timeout, NULL); if (n < 0) continue; /* EINTR */ if (n == 1) { From nobody Thu May 21 08:11:00 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLh1k2TZFz6fgxC for ; Thu, 21 May 2026 08:11: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLh1k1jZLz3QHr for ; Thu, 21 May 2026 08:11:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779351066; 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; bh=WzeH+edlGo2FHr6D/MME3MPNWrlY3iOWrhBabAPKhiQ=; b=C8uKd8xa+sTA19M8Sat/CwRjMBu6ryYl28ZvuhCJVkGbhYK6/uwlVceSRwkY393jDNwL0l ax/aT5N5+iKR3Da0WjyVb0ZhDrYl9hV/gvYlHJxI6ezyr4Acz7i1FFwB6onoG19CNY7CPe 2JWGh5YPZn6fYmYduL0tng7cAMVl9Y8A1/6Q6P6p70+JUQXCoIn9XCNg1jwPmTfhHp3XNU 7l62E61Sd2Mu0AQl0bSPKxCOLUh23CvshtE/7hrgzwcSkIgJe5xzeXCJPN54zjAzQRwENn lpFTHoIAPNUb74xK6c061AduAL/AaO7R/pUHRpKapIdQlNzt9i7e4OQog5z/yA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779351066; a=rsa-sha256; cv=none; b=iXPEvh4fhnX46ToEAxAsKAxSeG/tfDKemgr5Ojrjh4rxtUuFeugZHFQOzHpnxNVY1gcLLh 26ks5ETuIf/NQ7RukJgY6mcGDPcx6AhjhdfdE/pHrg1KocR+sXuw+VMj5+Tc2n7vb2lgtK PhATMBHCRBc99KrKPfTy2nv9JcxfUsO9uNxHwum5flFGj5BoqeqPdZyuG4GmnjNHjZ6O7a Muyuk8pp7MDh+6NuoE/G6Ignd9mngRBZos797gTJoivvuRSootxkP4eFb78yHBmiQvUuIL 4vCwCAvlpVm0SnHx26J1/X7WkoMc5BJJlA57ToWMj7x6TTbBMYwXcm1tpQU1KA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779351066; 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; bh=WzeH+edlGo2FHr6D/MME3MPNWrlY3iOWrhBabAPKhiQ=; b=c/8681weXTsZt5eBrffxGKtsAzW8XJC0VmxYA8YLtVmbuYJf92j8/yNMbzr2xbHDtqsCxm 2CYZ7uf1ttUNsxWOstbOZ10k6RFudl2RvUIu93fXNv26P2whlafskZMJgogzM24zBYWIK5 sp86MBb9vlLbuL17+aLXsJBDbrFRdVFKzxHV0INMx8gmrVStZ4YeOmMmihxhnu0e2QIEVD zWVbZ3vxVeInfe3HjzhH4dfHKE+CHggrZifHDBZBsYh1GFBPtoBEalOAviREgXeXFBLmwN MwM1Zcrq91PxCWJkGA/xK1j4oj3u2oorKQFMxKsPDgmXyA4JB1pGdjRWlVFi0Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLh1k10vBz7ts for ; Thu, 21 May 2026 08:11:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 404f3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 08:11:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Vyacheslav Terehov From: Andrey V. Elsukov Subject: git: 6eba055fcf5b - main - ipfw: fix parsing error in nat config port_range List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ae X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6eba055fcf5b0bbfbebcac59f5982d13815001b0 Auto-Submitted: auto-generated Date: Thu, 21 May 2026 08:11:00 +0000 Message-Id: <6a0ebe14.404f3.42d3486f@gitrepo.freebsd.org> The branch main has been updated by ae: URL: https://cgit.FreeBSD.org/src/commit/?id=6eba055fcf5b0bbfbebcac59f5982d13815001b0 commit 6eba055fcf5b0bbfbebcac59f5982d13815001b0 Author: Vyacheslav Terehov AuthorDate: 2026-05-21 07:15:22 +0000 Commit: Andrey V. Elsukov CommitDate: 2026-05-21 07:15:22 +0000 ipfw: fix parsing error in nat config port_range Also fix the corresponding tests. PR: 263240 MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57010 --- sbin/ipfw/ipfw.8 | 3 ++- sbin/ipfw/nat.c | 29 ++++++++++++++++------------- tests/sys/netpfil/common/nat.sh | 26 ++++++++++++++------------ 3 files changed, 32 insertions(+), 26 deletions(-) diff --git a/sbin/ipfw/ipfw.8 b/sbin/ipfw/ipfw.8 index 2d3b0722cc42..b01982ff4c53 100644 --- a/sbin/ipfw/ipfw.8 +++ b/sbin/ipfw/ipfw.8 @@ -1,5 +1,5 @@ .\" -.Dd March 1, 2026 +.Dd May 21, 2026 .Dt IPFW 8 .Os .Sh NAME @@ -3519,6 +3519,7 @@ Obey transparent proxy rules only, packet aliasing is not performed. Skip instance in case of global state lookup (see below). .It Cm port_range Ar lower-upper Set the aliasing ports between the ranges given. +Ports must be in the range 1024-65535. Upper port has to be greater than lower. .It Cm udp_eim When enabled, UDP packets use endpoint-independent mapping (EIM) from RFC 4787 diff --git a/sbin/ipfw/nat.c b/sbin/ipfw/nat.c index db74abaab233..a5691200943c 100644 --- a/sbin/ipfw/nat.c +++ b/sbin/ipfw/nat.c @@ -757,25 +757,28 @@ nat_show_cfg(struct nat44_cfg_nat *n, void *arg __unused) } static int -nat_port_alias_parse(char *str, u_short *lpout, u_short *hpout) { +nat_port_alias_parse(char *str, u_short *lpout, u_short *hpout) +{ long lp, hp; - char *ptr; + char *ptr, *substr; + + substr = strsep(&str, "-"); + if (substr == NULL || str == NULL) + return (0); + /* Lower port parsing */ - lp = (long) strtol(str, &ptr, 10); - if (lp < 1024 || lp > 65535) - return 0; - if (!ptr || *ptr != '-') - return 0; + lp = (long) strtol(substr, &ptr, 0); + if (*ptr != '\0' || lp < 1024 || lp > 65535) + return (0); + /* Upper port parsing */ - hp = (long) strtol(ptr, &ptr, 10); - if (hp < 1024 || hp > 65535) - return 0; - if (ptr) - return 0; + hp = (long) strtol(str, &ptr, 0); + if (*ptr != '\0' || hp < 1024 || hp > 65535) + return (0); *lpout = (u_short) lp; *hpout = (u_short) hp; - return 1; + return (1); } void diff --git a/tests/sys/netpfil/common/nat.sh b/tests/sys/netpfil/common/nat.sh index 023b0742ec6b..2b828dc03fdc 100644 --- a/tests/sys/netpfil/common/nat.sh +++ b/tests/sys/netpfil/common/nat.sh @@ -26,6 +26,8 @@ # # +set -e + . $(atf_get_srcdir)/utils.subr . $(atf_get_srcdir)/runner.subr @@ -178,13 +180,13 @@ common_cgn() { atf_check -s exit:2 -o ignore jexec client1 ping -t 1 -c 1 198.51.100.2 atf_check -s exit:2 -o ignore jexec client2 ping -t 1 -c 1 198.51.100.2 - if [[ $portalias ]]; then + if [ ${portalias} = "true" ]; then firewall_config nat $firewall \ "ipfw" \ - "ipfw -q nat 123 config if ${epair_host_nat}b unreg_cgn port_alias 2000-2999" \ - "ipfw -q nat 456 config if ${epair_host_nat}b unreg_cgn port_alias 3000-3999" \ - "ipfw -q add 1000 nat 123 all from any to 198.51.100.2 2000-2999 in via ${epair_host_nat}b" \ - "ipfw -q add 2000 nat 456 all from any to 198.51.100.2 3000-3999 in via ${epair_host_nat}b" \ + "ipfw -q nat 123 config if ${epair_host_nat}b unreg_cgn port_range 2000-2999" \ + "ipfw -q nat 456 config if ${epair_host_nat}b unreg_cgn port_range 3000-3999" \ + "ipfw -q add 1000 nat 123 all from any to 198.51.100.0/24 2000-2999 in via ${epair_host_nat}b" \ + "ipfw -q add 2000 nat 456 all from any to 198.51.100.0/24 3000-3999 in via ${epair_host_nat}b" \ "ipfw -q add 3000 nat 123 all from 100.64.0.2 to any out via ${epair_host_nat}b" \ "ipfw -q add 4000 nat 456 all from 100.64.1.2 to any out via ${epair_host_nat}b" else @@ -194,16 +196,16 @@ common_cgn() { "ipfw -q add 1000 nat 123 all from any to any" fi - # ping is successful now - atf_check -s exit:0 -o ignore jexec client1 ping -t 1 -c 1 198.51.100.2 - atf_check -s exit:0 -o ignore jexec client2 ping -t 1 -c 1 198.51.100.2 - # if portalias, test a tcp server/client with nc - if [[ $portalias ]]; then + if [ ${portalias} = "true" ]; then for inst in 1 2; do - daemon nc -p 198.51.100.2 7 - atf_check -s exit:0 -o ignore jexec client$inst sh -c "echo | nc -N 198.51.100.2 7" + daemon nc -l 198.51.100.2 7 + atf_check -s exit:0 -o ignore -e ignore jexec client$inst nc -z 198.51.100.2 7 done + else + # ping is successful now + atf_check -s exit:0 -o ignore jexec client1 ping -t 1 -c 1 198.51.100.2 + atf_check -s exit:0 -o ignore jexec client2 ping -t 1 -c 1 198.51.100.2 fi } From nobody Thu May 21 09:37:50 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLjxq2C7rz6fq9Z for ; Thu, 21 May 2026 09:37: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLjxq06Gyz3cyr for ; Thu, 21 May 2026 09:37:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779356271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2sAfXapJmE5Kq7W4Uk4JobXtYcf9bpG0dz9Y9vtb4/g=; b=C/TEdVsOQ5oIwIo0XZfj+YvvJSa/yW+mVqO6aQ5Dlob0M2BpvjwjPOj4Wu0m60jvBewJzX W0vXAuAeCq33urbpXfj4Mg2OG4HmPAIIuDxEOkTvW1YMR8NZWWpe7jDr+0wQJxdmjwEPid sCtBuvGyNb6i5TU9Yti3lV7HHD47hLn7ozNC71lG3VnGvlCrl/EK8Z7fsSrxQ+x3D+VK6f x2CluxuMPSBwJf+RjuL8KD3tavLvC5FwxND6/4fqDCleUgaUARf88BBb42KOczXN9QphZk wW42luvtbzFumIUuk4RvIyvWre7OtZQSQqWCN9o70sJC9b3oWQ32rFmVDYcQUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779356271; a=rsa-sha256; cv=none; b=x17rybkFhfFwyDuXer01l+QW3fWYlQuKsNbxx1F69WYWBlA1fuFXhnsGY6nUELwaNuUaqk eKc15kcTrfef3al+nQyoExA+yo+u8UaDAZ11xHXtaNFQ9rt1H2/nKHgR3jzrknIGP2Ndzt He/XJ3/QAcp2RCpUf00ZptOjjl7Gu+HM2KDbV7hsuQ1fau2e4ZYEWBVeCalc46fvHHHusu Urbapj9ysy8On/BEg2R0sxVePrXtwugUVqjgWXJOCvv5PvSYX9qYtTjZ3qbJj3LZD+F/1m P0ms8bFG0rjSSIrTYaeUP/4oc20hRUl+CROS8gvpmZR9Vi3S713ULkcR8RaIfA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779356271; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2sAfXapJmE5Kq7W4Uk4JobXtYcf9bpG0dz9Y9vtb4/g=; b=k0IU7twAiiSKNpZfNTqzjHtZZHk9+0bkFg/Gf0KekuZpDShjJ1TETMuWW3qgyrAfxxxuQ7 PwX9CpkTavyh2pjyGLg5X7t3/F9JLEaUW+wwM4Zrxi5kzLUNSEdsvL34of3OyC/BbTeHgS Aoc2P1yliI2HUycpJvWZMA6ac2wT7RZQZYY9qX2RlC9Zxp+L5Hpxxru9F5eq3NkpKvWgg2 iu+aGxj/w+euJvvDSMoLQo9FLn8RbBnSgHtUUZpTjuiDCllV2SePcqHOQsi2FSjfaFsq1O ns2wEoKJhbn073HPP4oblz6LlG7pevr+JJ9YSMHo+QLR9GzjQACSR0AoV9I7vQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLjxp6pn5zBWM for ; Thu, 21 May 2026 09:37:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47aba by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 09:37:50 +0000 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=B8rg?=rav Subject: git: e9cbbf04d6fe - main - nlist: Decrement nent on match List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: e9cbbf04d6fe24b3a207cf085122def72145742e Auto-Submitted: auto-generated Date: Thu, 21 May 2026 09:37:50 +0000 Message-Id: <6a0ed26e.47aba.2ba15dc3@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=e9cbbf04d6fe24b3a207cf085122def72145742e commit e9cbbf04d6fe24b3a207cf085122def72145742e Author: Dag-Erling Smørgrav AuthorDate: 2026-05-21 09:26:47 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-21 09:37:33 +0000 nlist: Decrement nent on match PR: 295336 MFC after: 1 week Fixes: 4617a6cb82a6 ("nlist: Handle multiple symbol tables") --- lib/libc/gen/nlist.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c index 06034dc8ee1a..2a9d22852b9a 100644 --- a/lib/libc/gen/nlist.c +++ b/lib/libc/gen/nlist.c @@ -259,8 +259,10 @@ elf_scan_symtab(Elf_Shdr *shdr, int shnum, int fd, off_t symoff, size_t symsize, slen = strnlen(name, strsize - s->st_name); for (p = list; nent > 0 && !ISLAST(p); p++) { if (strncmp(name, p->n_un.n_name, slen) == 0 && - p->n_un.n_name[slen] == '\0') + p->n_un.n_name[slen] == '\0') { elf_sym_to_nlist(p, s, shdr, shnum); + --nent; + } } } } From nobody Thu May 21 11:07:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLlxR3dwnz6dlXj for ; Thu, 21 May 2026 11:07: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLlxR2VmCz3ncQ for ; Thu, 21 May 2026 11:07:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779361659; 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; bh=WKtIad0ih92u0C47kbNaTeo4ys+55Wz8hxRf6Tvxr/U=; b=cCYIQqRUlANdmU45I2TDmaxctveCyOPPDaMPlt39gwKcUGQX55WoJwVkLG/HCzw+IX31E4 nWqqTg5xZe+lyK4qHbAzDjBycTN/KttyTT30EpFVn8nqyL2O3b0RcyyGz8wRcoM0Nyt1e5 8074rIRN4gXIy+BBiZw3OOpXj5goI/V/zxKkMmzF0vZrNQ92lZFTQTBvmZJ9iJMAqj/M56 2SR/0Mx4llEB47/4d+ufZ/f0c9WmmL/GjxRnwYNVmZ93fCaigIfQQtOevE5ByZ2Iw+jGBj GbZihob6M7TY/uesiZnlXlUBCwpoYPsnFVmmFmqNRp1zNh5iyNVHuaEe6gGsGg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779361659; a=rsa-sha256; cv=none; b=uRa+HLtuHUpeJbX2Aycn1wrotGAmdmmrym71URqpCu6braI6nJ4Yej/QtyWivWvgljCeC5 wlHU/cQJSqftarHF0+pqtaV6vvyIziYFG1oQvf5lk8ZIdKqUw5o1+Bt3gTqazVW6qt+FOe 2VWhlQhit582LvlSPWMe7Dh8HmZBmSVW9reCOzOd8c8Ip3b/8l1m3w3/dbJzwfXbK8tHGG jO5Z1QMyni26/WSdq7s169j/wDFAjWo428QNmRz0tVTXgidczaIxiiwJ/4iKXwBIyxdq/0 PplqQ8qj6+3RZjh8f/zhYDnlB5FKw3VDil+32Xk5yRJMcrBNA3WWjecY6tJ8eg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779361659; 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; bh=WKtIad0ih92u0C47kbNaTeo4ys+55Wz8hxRf6Tvxr/U=; b=kqBId7a6kckCZWd7HLkIx6xhR3G59pEyVDtw8nKMyQY5fG93HDVLdWaisnkKXuPhrjS1Km ZoC7dZlHv2x8Hip507bZnb8spu6SpDgXywrPUGLv3iDPM0GLEk/k6LcUYxjslMDHAroGHS thRGNlMUbgPyOOaaIWv3L/6nlZz38gpY3NUazDUjP3hGeGwYeXNUzWuSbfuTtDeOiSMGY0 StTxqFrbcG4FTYd8FxGtmsfMMPaAopWRBj0WS8Ro4zwaX7oFRna4sIgwB9UAAxsoRbFHUh LffgBwZoHOXhDHPQ7fQ3Zb9P838vk6ElfvtxPLOMfGyaFeMzemg8u0zmd+QrYg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLlxR1PB6zTbm for ; Thu, 21 May 2026 11:07:39 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 226bd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 11:07:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Timo =?utf-8?Q?V=C3=B6lker?= From: Michael Tuexen Subject: git: 81b47a7c604f - main - ipfw: fix checksum after NAT List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 81b47a7c604f1d563283759572fa7a1f9d4dc56f Auto-Submitted: auto-generated Date: Thu, 21 May 2026 11:07:33 +0000 Message-Id: <6a0ee775.226bd.724200c1@gitrepo.freebsd.org> The branch main has been updated by tuexen: URL: https://cgit.FreeBSD.org/src/commit/?id=81b47a7c604f1d563283759572fa7a1f9d4dc56f commit 81b47a7c604f1d563283759572fa7a1f9d4dc56f Author: Timo Völker AuthorDate: 2026-05-21 10:54:44 +0000 Commit: Michael Tuexen CommitDate: 2026-05-21 10:54:44 +0000 ipfw: fix checksum after NAT When checksum offloading is used, IPFW needs to fix the checksum after libalias has done NAT. The ipfw_nat() function does so, but only for mbufs without a receiving interface. However, if, for example, the packet was sent inside a jail that used checksum offloading over an epair, ipfw still needs to fix the checksum even though the mbuf has set a receiving interface (epair). This patch just removes the check whether a receiving interface is set. PR: 295057 Reviewed by: tuexen MFC after: immediately Differential Revision: https://reviews.freebsd.org/D57091 --- sys/netpfil/ipfw/ip_fw_nat.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/sys/netpfil/ipfw/ip_fw_nat.c b/sys/netpfil/ipfw/ip_fw_nat.c index 75f12511a264..e816c7bd95eb 100644 --- a/sys/netpfil/ipfw/ip_fw_nat.c +++ b/sys/netpfil/ipfw/ip_fw_nat.c @@ -311,17 +311,17 @@ ipfw_nat(struct ip_fw_args *args, struct cfg_nat *t, struct mbuf *m) /* * XXX - Libalias checksum offload 'duct tape': * - * locally generated packets have only pseudo-header checksum - * calculated and libalias will break it[1], so mark them for - * later fix. Moreover there are cases when libalias modifies + * When checksum offloading is used, packets contain only the + * pseudo-header checksum and libalias will break it[1], so mark them + * for later fix. Moreover there are cases when libalias modifies * tcp packet data[2], mark them for later fix too. * * [1] libalias was never meant to run in kernel, so it does * not have any knowledge about checksum offloading, and * expects a packet with a full internet checksum. - * Unfortunately, packets generated locally will have just the - * pseudo header calculated, and when libalias tries to adjust - * the checksum it will actually compute a wrong value. + * Unfortunately, when checksum offloading is used, packets will + * contain just the pseudo-header checksum, and when libalias tries to + * adjust the checksum it will actually compute a wrong value. * * [2] when libalias modifies tcp's data content, full TCP * checksum has to be recomputed: the problem is that @@ -340,8 +340,7 @@ ipfw_nat(struct ip_fw_args *args, struct cfg_nat *t, struct mbuf *m) * it can handle delayed checksum and tso) */ - if (mcl->m_pkthdr.rcvif == NULL && - mcl->m_pkthdr.csum_flags & CSUM_DELAY_DATA) + if (mcl->m_pkthdr.csum_flags & CSUM_DELAY_DATA) ldt = 1; c = mtod(mcl, char *); From nobody Thu May 21 13:38:15 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLqHD1pgjz6f2f3 for ; Thu, 21 May 2026 13:38: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLqHD1Jwyz3FTF for ; Thu, 21 May 2026 13:38:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779370696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AMP0f1V2InbOnpMH/b061Olgki0csDO/y+G5ednoTLo=; b=H2NbB5Km2ucu57bZxOnp0Tliu+dVR15+7g78qTCwtoCKmBzMepq/xEmQBHrNIL8mesUPKP iG1OnNSuv1HYMROHoreI0FENW9jDXaXP9wUJcE8mzHjoLRUe4NcWSTXdnSegCTSCdz6Wbw RNeQCiJCeVnbtI5EMAf2fpSCPg8mhczcMx4T2rD2N5DbOOK/zUNZY/y8Nuj7U9Z73gAijo xI8G9rekxXGjcYCL/cr7XNPXYvdPMCzjvNIf3ZaBDtUcce+iINZF5dOd8mgrPalzKNTkFV oErRIXxgjx89iUD0QpepavgQHPE5uJefLMCi9JzLOUJsZdTa5uLAPgGA8FdIMQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779370696; a=rsa-sha256; cv=none; b=HDWlN48Y1GhTMWOeRo9E+uGuygAawjllRqmQ1Bl/JSSFffySDf588jllqYA81vA/WHzIxc M7XzFQ2QJB9ygMJEZZXZveIYWDiYUW/lwqjtqgTIv1LBxn+KC/0aghKf4E5Hy5OzDsaPkc xpG5+FcYE7bPZb38k0HQH/mdHKZJEq4nGyMnNy6PFgSnPr5/flX/hFSKmMg+r6RLxUpsqS xlqLFx545JKIMTMWQVSiMeZbqCEaN/abV+Qc80rbBqxQ/qgPvuwIpeNuH5oHrUldPG/V3m r/lJMpRoBGrJI9A5Qbt8HVcEQ/o99U45NdV8Qx3Wi7LXljF4LtBLikbp312bVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779370696; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AMP0f1V2InbOnpMH/b061Olgki0csDO/y+G5ednoTLo=; b=mqbB+wiERpi5ETlkLNR17gSrtVeikDJkjDFUXqT36xENt9auFPtdBhZIRT0C2EO8RfICEn mfP/XBAapPeGHKrZMDvtT3mOpU4mGgB1nIyYORKbpYrEU7MrwczCtXbxv/sqhozxIC59Tv v5IKtZtPpIM8jTF00HdrzDegIC/LONb8eMnAefiw++Wug/Pd9dAOlNFEtiYdtTY6oPf9AS leiVlrZPhgMRs946rTGFEmCESsg0WH4EvYV6ndlvWGbKGHeufHXUf0nvzBKOSwlItpd1Hu IjA+inh8luc65hmLzxF2lnNhgR1ap7LHC8q3PqZ7cDXNpnG40Hq5lZ3Ee43Rtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLqHD0TxmzbTS for ; Thu, 21 May 2026 13:38:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b54d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 13:38:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: d7cde43f95bf - main - Revert "loopback: Clear hash unconditionally." List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/main X-Git-Reftype: branch X-Git-Commit: d7cde43f95bf432b6894c3cf804a8dffe99461e4 Auto-Submitted: auto-generated Date: Thu, 21 May 2026 13:38:15 +0000 Message-Id: <6a0f0ac7.3b54d.68a9a336@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=d7cde43f95bf432b6894c3cf804a8dffe99461e4 commit d7cde43f95bf432b6894c3cf804a8dffe99461e4 Author: Andrew Gallatin AuthorDate: 2026-05-21 13:28:46 +0000 Commit: Andrew Gallatin CommitDate: 2026-05-21 13:34:40 +0000 Revert "loopback: Clear hash unconditionally." This reverts commit 2fe37927d41990abe8d1c336e75fd75873285e90. This turns out to have been misguided. First, clearing the hash results in all loopback ip/ip6 traffic being hashed to the netisr queue associated with the if_index of the loopback interface. Eg, it bottlenecks loopback traffic. When the hash is kept, traffic is spread evenly among netisrs. Also, it is safe to keep the hash here. The clearing was only needed when RSS core selection is enabled; we only enabled the consistent hashing parts of RSS globally, not the cpuid mapping stuff. So there is no need to clear it. Reviewed by: glebius Sponsored by: Netflix --- sys/net/if_loop.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sys/net/if_loop.c b/sys/net/if_loop.c index 33ddd3a8540e..fc5ce9548bcc 100644 --- a/sys/net/if_loop.c +++ b/sys/net/if_loop.c @@ -219,7 +219,9 @@ looutput(struct ifnet *ifp, struct mbuf *m, const struct sockaddr *dst, if_inc_counter(ifp, IFCOUNTER_OPACKETS, 1); if_inc_counter(ifp, IFCOUNTER_OBYTES, m->m_pkthdr.len); +#ifdef RSS M_HASHTYPE_CLEAR(m); +#endif /* BPF writes need to be handled specially. */ if (dst->sa_family == AF_UNSPEC || dst->sa_family == pseudo_AF_HDRCMPLT) From nobody Thu May 21 14:22:56 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLrGm4cDHz6f74Z for ; Thu, 21 May 2026 14:22: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLrGm40ZQz3Khs for ; Thu, 21 May 2026 14:22:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779373376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bIK+LP1ht9XSoEV0O3I64I9YkV7zRA2XFI7F7VEGzGY=; b=M15Pp0KlrujfrsrKe08xIArTCdlqvxVVasL8AT9YHujM4YkVys4Z7sCpWj/RgUQYPAd6SJ dpiQlEEAz8ko2KAmIb3wX4lGORqCh8WIG8qMKostVED75GgtqL0MGBj91H1OTK5C2+rUB7 XIV10uggJb+KSDevKX+kuw3UGSgUy2xXpE+kRtbOQerUWnwb1F7wgZQ7SVMhXll5vofIcE 0O9NBOc/Q6aDhmVHwXmcUzJynv64oPd/gp7nQDz7/HOKPkNLUKkha9dDS5xADwG9yQYulF WYYNN425rde7qT2UKCPh0+lDwlDkplEOrbUWiJF+qUJTRPPXpS0shyqvXvlVog== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779373376; a=rsa-sha256; cv=none; b=ItpLS9ccONYZQL23nZjw4nnDKN4aP9PPOMRhDe9PeuWM+vLxGcZifyN3ogQGzzO6FtaMTc YzEQGE5snd/fN6b0dDz99MYsXk8SLZOk1/uhRjrrtcn/BpFHICYSncNPenOOL28n1zUE67 MJdEd12R/lklSeerfNOe60xhpw3gvsLcasnSlCPoK2rzQLGzVMX+qMXM5w+upGUUBPqC+E bdVe8oNDN5WwkMj3v+Lrt3zLvhWzRky2VZnkNDq0gKwURqsxHKJICoydRycXf8AqrSUjRv SsuiCbl3mYxcwS1v2D5o8dX4UsDfmV2H0KnWYiP5G5xwkMGaPKp9w3QicS5zzg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779373376; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bIK+LP1ht9XSoEV0O3I64I9YkV7zRA2XFI7F7VEGzGY=; b=cDYV04qWMNbLuuaX1qEsWs0HdwPPTZoSHHZLt0n/IwY56OJXQZVACqSn+SealCogwx4U2W oEEdclPlNH/ZlTAxUTw54dUWauIhDA77F7tqsgyZmP1NB82b3+phMviKkjh/t85mCz7O3Q zB8Sv793rSkxnHWqw3JSp97Ec14Y5/s49e27waoPosZvuLFjcHCZ3ZhTp3hN/0JE7iFgrQ j7yxSf1SgwVYZFA0ouiLAU7zS8nCgyvxzB1rIKXzorAPS/S6bgbxCLoIiv1/lxJljrlgXl cFY3Z8qO5T6OZTbOhQNyTHePk1ww2bGZQs9dOao8oihodEHzNsUXSZSjj4Qtmw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLrGm3cTQzcZm for ; Thu, 21 May 2026 14:22:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3ff24 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 14:22:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Siva Mahadevan Subject: git: 02ef0b6d76e9 - main - universe: allow moving build logs to UNIVERSE_LOGDIR List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: siva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 02ef0b6d76e9717b8e3182dd706e23fd2702701d Auto-Submitted: auto-generated Date: Thu, 21 May 2026 14:22:56 +0000 Message-Id: <6a0f1540.3ff24.51dc4c5c@gitrepo.freebsd.org> The branch main has been updated by siva: URL: https://cgit.FreeBSD.org/src/commit/?id=02ef0b6d76e9717b8e3182dd706e23fd2702701d commit 02ef0b6d76e9717b8e3182dd706e23fd2702701d Author: Siva Mahadevan AuthorDate: 2026-05-20 20:05:53 +0000 Commit: Siva Mahadevan CommitDate: 2026-05-21 14:16:48 +0000 universe: allow moving build logs to UNIVERSE_LOGDIR This allows `make universe` or `make tinderbox` to build from a read-only src tree. Reviewed by: ziaee, imp, delphij Approved by: lwhsu (mentor), emaste (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D55566 --- Makefile | 17 ++++++++--------- share/man/man7/build.7 | 7 ++++++- 2 files changed, 14 insertions(+), 10 deletions(-) diff --git a/Makefile b/Makefile index 9308883b8500..e7a565cff05e 100644 --- a/Makefile +++ b/Makefile @@ -599,8 +599,9 @@ targets: .PHONY .endfor .endfor +UNIVERSE_LOGDIR?=${.CURDIR} .if defined(DOING_TINDERBOX) -FAILFILE=${.CURDIR}/_.tinderbox.failed +FAILFILE=${UNIVERSE_LOGDIR}/_.tinderbox.failed MAKEFAIL=tee -a ${FAILFILE} .else MAKEFAIL=cat @@ -612,9 +613,7 @@ universe_prologue: .PHONY @echo "--------------------------------------------------------------" @echo ">>> make universe started on ${STARTTIME}" @echo "--------------------------------------------------------------" -.if defined(DOING_TINDERBOX) @rm -f ${FAILFILE} -.endif universe-toolchain: .PHONY universe_prologue @echo "--------------------------------------------------------------" @@ -630,9 +629,9 @@ universe-toolchain: .PHONY universe_prologue TOOLS_PREFIX_UNDEF= \ kernel-toolchain \ MK_LLVM_TARGET_ALL=yes \ - > _.${.TARGET} 2>&1 || \ + > ${UNIVERSE_LOGDIR}/_.${.TARGET} 2>&1 || \ (echo "${.TARGET} failed," \ - "check _.${.TARGET} for details" | \ + "check ${UNIVERSE_LOGDIR}/_.${.TARGET} for details" | \ ${MAKEFAIL}; false) @if [ ! -e "${HOST_OBJTOP}/tmp/usr/bin/cc" ]; then \ echo "Missing host compiler at ${HOST_OBJTOP}/tmp/usr/bin/cc?" >&2; \ @@ -716,9 +715,9 @@ universe_${target}_${target_arch}: universe_${target}_prologue .MAKE .PHONY TARGET=${target} \ TARGET_ARCH=${target_arch} \ ${MAKE_PARAMS_${target_arch}} \ - > _.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \ + > ${UNIVERSE_LOGDIR}/_.${target}.${target_arch}.${UNIVERSE_TARGET} 2>&1 || \ (echo "${target}.${target_arch} ${UNIVERSE_TARGET} failed," \ - "check _.${target}.${target_arch}.${UNIVERSE_TARGET} for details" | \ + "check ${UNIVERSE_LOGDIR}/_.${target}.${target_arch}.${UNIVERSE_TARGET} for details" | \ ${MAKEFAIL})) @echo ">> ${target}.${target_arch} ${UNIVERSE_TARGET} completed on `LC_ALL=C date`" .endfor @@ -775,9 +774,9 @@ universe_kernconf_${TARGET}_${kernel}: .MAKE TARGET_ARCH=${TARGET_ARCH_${kernel}} \ ${MAKE_PARAMS_${TARGET_ARCH_${kernel}}} \ KERNCONF=${kernel} \ - > _.${TARGET}.${kernel} 2>&1 || \ + > ${UNIVERSE_LOGDIR}/_.${TARGET}.${kernel} 2>&1 || \ (echo "${TARGET} ${kernel} kernel failed," \ - "check _.${TARGET}.${kernel} for details"| ${MAKEFAIL})) + "check ${UNIVERSE_LOGDIR}/_.${TARGET}.${kernel} for details"| ${MAKEFAIL})) @echo ">> ${TARGET}.${TARGET_ARCH_${kernel}} ${kernel} kernel completed on `LC_ALL=C date`" .endfor .for target_arch in ${TARGET_ARCHES_${TARGET}} diff --git a/share/man/man7/build.7 b/share/man/man7/build.7 index b9a781a9b5ab..23980875eaaa 100644 --- a/share/man/man7/build.7 +++ b/share/man/man7/build.7 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd April 28, 2026 +.Dd May 20, 2026 .Dt BUILD 7 .Os .Sh NAME @@ -958,6 +958,11 @@ Only build worlds for each supported architecture. Only build kernels for each supported architecture. .It Va WITHOUT_KERNELS Only build worlds for each supported architecture. +.It Va UNIVERSE_LOGDIR +Write all build logs to this directory for each supported architecture. +When invoking +.Cm tinderbox , +also write the summary of all failed targets to this directory. .It Va UNIVERSE_TARGET Execute the specified .Xr make 1 From nobody Thu May 21 14:22:57 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLrGn5s4Rz6f74b for ; Thu, 21 May 2026 14:22: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLrGn4gMnz3KlF for ; Thu, 21 May 2026 14:22:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779373377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lBnL30T0DVO1/Fvw9xWegJf/MiArltaFiJrseM3PoJE=; b=HdzJPFHILvk94EC+c22lZJqmlZEJZI4q1olQ69BBu5xvpDZ5QhXEh7Sf95q7wm01xu53l2 wzenFFfJryFA+Jc/mLR9h3wlOQ1+c6dEZRppE/sA+cxbDDcZQut6RmjCmwrvMAGm3n9ID6 WaQN6ZWkl06EILhvgJLtMNk6S97VCsTc76Ksy2Y1XlYWAbgHn3glYtvx9LY0v7VvLfokB6 DKfs3+yuBcZoVxuiwARGyNXcrf44uUd0EU7NpjQEevNK0u7sgA4eDia/0hjbiXWb4bzVBn DN5Ax1jDSrfCDg1eEy3Lf4MAQaNtDMFKh11AxgM/dtz9151sQ+/tcRp8LsmVXw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779373377; a=rsa-sha256; cv=none; b=Pf/bTBJweE6Iclbx42ybW2K4pdfPiR9ruutxA9hfrdaoJLB8hH9Gdv0L5ZsTXw+Sfn9itu qlpSvto9OnFbITw6E4zAdYC7Lx0sOZnKMntkxg18eNNUsAxaG57O9jEOAsbNsN21KXcp1j BU+ippQi/FLiEP+SUmiRwhR+Aqkp+Pu4jZ1xn7pp40XIr7DF6WQqPGw9i39XNNmaHBzCvm hY91jeF03pDm4VrUdGoee0ntQ02fBL+69q6csNNsexr1zmA3aJ1EBIOovc03V4faJ91SJ3 UgaY4wdvimwKDn2hsoZEw3IdUoZhdQlJmPzS0QUN09NV6bxKVlN1rKYU6GmesA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779373377; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=lBnL30T0DVO1/Fvw9xWegJf/MiArltaFiJrseM3PoJE=; b=xNncGzbwZc5GQ03HTTcbCRzuzJ188YW3exChJONrhEa3puPB3nBtRf/75feDxMrfQtnILE e17oCkeZyZQuTyFPa3IIePWSKo7VH3enYKB4N85J9IDWlaYOwDAmgOERPAPh3FrkmsYAVD wQ+tyahmemnyG7ymQJbvyJakJnWjVM+KfvMBHU4OwCRlnMISlJTZflcpqioFlvkZT+gbIr FGgizXGbBQ1vEs0bKU4VM92FniTMD69zb3pz7rwSRI3PPIGHF1VsmcLF68md7QfkhV5Nox LmUBzjSQTArTl23D9TvwzM+ETPrf2ZrYYgbrb3UPxDT/F/iVzBaQEI/BWsFsmA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLrGn40HlzcZn for ; Thu, 21 May 2026 14:22:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f55a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 14:22:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Siva Mahadevan Subject: git: c170a96dbeeb - main - universe: emit warning instead of error for bad/missing KERNCONF List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: siva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c170a96dbeeb3b0d36456d21beee6c551957a456 Auto-Submitted: auto-generated Date: Thu, 21 May 2026 14:22:57 +0000 Message-Id: <6a0f1541.3f55a.265c45dd@gitrepo.freebsd.org> The branch main has been updated by siva: URL: https://cgit.FreeBSD.org/src/commit/?id=c170a96dbeeb3b0d36456d21beee6c551957a456 commit c170a96dbeeb3b0d36456d21beee6c551957a456 Author: Siva Mahadevan AuthorDate: 2026-05-21 14:08:32 +0000 Commit: Siva Mahadevan CommitDate: 2026-05-21 14:17:03 +0000 universe: emit warning instead of error for bad/missing KERNCONF When doing a large `make universe` build with multiple KERNCONFS, it should not be an error when a particular target has a missing KERNCONF. In this example, ``` $ make universe TARGETS='arm64 riscv' KERNCONFS='QEMU VIRT' ``` Currently, arm64 does not have a QEMU conf, and riscv does not have a VIRT conf. However, this command should still succeed instead of failing with the following message: ``` make[2]: /usr/src/Makefile:767: Target architecture for riscv/conf/VIRT unknown. config(8) likely too old. in .for loop from /usr/src/Makefile:761 with kernel = VIRT in make[2] in directory "/usr/src" make[2]: stopped making "universe_kernels" in /usr/src ``` Since the opposite is true, we should build whatever confs are available from the requested list of KERNCONFS, while making sure to still emit warnings along the way. Reviewed by: imp Approved by: lwhsu (mentor), emaste (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D55571 --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index e7a565cff05e..00c454b38147 100644 --- a/Makefile +++ b/Makefile @@ -758,12 +758,16 @@ KERNCONFS!= cd ${KERNSRCDIR}/${TARGET}/conf && \ ${_THINNER} universe_kernconfs: universe_kernels_prologue .PHONY .for kernel in ${KERNCONFS} +.if !exists(${KERNSRCDIR}/${TARGET}/conf/${kernel}) +.warning ${TARGET}/conf/${kernel} missing; skipping. +.else TARGET_ARCH_${kernel}!= cd ${KERNSRCDIR}/${TARGET}/conf && \ env PATH=${HOST_OBJTOP}/tmp/legacy/bin:${PATH:Q} \ config -m ${KERNSRCDIR}/${TARGET}/conf/${kernel} 2> /dev/null | \ grep -v WARNING: | cut -f 2 .if empty(TARGET_ARCH_${kernel}) -.error Target architecture for ${TARGET}/conf/${kernel} unknown. config(8) likely too old. +.error Target architecture for ${TARGET}/conf/${kernel} cannot be determined, kernconf file may be invalid! +.endif .endif universe_kernconfs_${TARGET_ARCH_${kernel}}: universe_kernconf_${TARGET}_${kernel} universe_kernconf_${TARGET}_${kernel}: .MAKE From nobody Thu May 21 14:22:58 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLrGp6FPlz6f6xR for ; Thu, 21 May 2026 14:22: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLrGp5GzBz3KVy for ; Thu, 21 May 2026 14:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779373378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0MugVOEEUoDU1w/pM2IHaZFddnnmAsKpMcBu8+roQMI=; b=kaT2DJxC0aInLWASO8mwjV9zy9918jCbHoM475iTo81wso6nnJu/KBoyky7JliJyObU+tl lygUR2TUc+AUYR53hdsU6H87lcm3mFAoyjcW3ZnoAy5NJrJqYUGnYRie/D5+f0IqVj01Vn 4qXXD1Ue+RKDlFwlbOwiGbcjxqEVsMXinLsSSpWXjNPs/09OXJ4et9UURBDmCa9sWO5P10 P/4BPC/ZnjtsvOvMTagSyc1yUdglH7n2eNSQii/FA0CMD1+2rIJx/r0wHta5GoeG6kAVVb i/FVkklmB1CiurOGxmaZFNJf/qPOZ7gU4yBgI0BgcPkTnSq7tYj2Hso/483RMw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779373378; a=rsa-sha256; cv=none; b=dFse/QGHr16JO2g1yZJo0Qf9yRjY1RdgLV+L3+ma/ovoci64MNdMD3OScF1BQNSb48Crjh ClPdywrHSjPmcGNZfucMr5F5tEEEP0yUKcp4UCXk5sDr4gMdRcrk95ecN0ZwnEKQt8zBy2 Hogffd0gUk6U43Vx/XYUoadh+tm+CFMc6y9H5jkI6Wt8AciSpueUpsKk1C3JSH25DUiZNC iRHMfBrLnDrqEz4yCawEKpAw49dVSiQfEhiQCjGtlm/7ECdhbqAhRjVhTHPU2ol1HCc45f 9BOg5Otr6T2ANUv8zAyIPT5F+wwTE7MV5FWKoqPyd0lzGtC6RkmY7H3JR6xZcw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779373378; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=0MugVOEEUoDU1w/pM2IHaZFddnnmAsKpMcBu8+roQMI=; b=US+2hE+FowvLaF2O3H6/vDuU3dlRVSFgFBs9+Vsm6JZdfUyYZdLT61vrlSA5SCv2JjbHc8 JiNqkP7hkMQqYO4yW3EwxrSMe1CKKlSnbUugxH2hN40RVX78tfw64V+ONyc0t7jl7+9J1h 8HQzrwUih2L5a3MP5OUCxNZrl8Bnyf4gEf6immF5avCWa47rrl3JwLgj492JtK4fnWuQCd MUNlMIDXMJ2aBYICKmlEgH3UkS+Ht+VR/7gfd0CG0//IBcsR05oXYuU4AyLpBMrKABfITq YyPlYy383vbFN9KbcihjnENi6tRrWn0neO5nAmhKXvNVBIOveYlIjity5qCaSA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLrGp4b0czcZp for ; Thu, 21 May 2026 14:22:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c070 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 14:22:58 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Siva Mahadevan Subject: git: a8c74d6c64df - main - tests/ndp: fix ndp_routeinfo_option testcase flakiness List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: siva X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: a8c74d6c64dfddae95b9c6d48a8ea82b7c4d7b25 Auto-Submitted: auto-generated Date: Thu, 21 May 2026 14:22:58 +0000 Message-Id: <6a0f1542.3c070.7612e5f2@gitrepo.freebsd.org> The branch main has been updated by siva: URL: https://cgit.FreeBSD.org/src/commit/?id=a8c74d6c64dfddae95b9c6d48a8ea82b7c4d7b25 commit a8c74d6c64dfddae95b9c6d48a8ea82b7c4d7b25 Author: Siva Mahadevan AuthorDate: 2026-05-21 14:22:22 +0000 Commit: Siva Mahadevan CommitDate: 2026-05-21 14:22:22 +0000 tests/ndp: fix ndp_routeinfo_option testcase flakiness Since we are sleeping for an indefinite period of time waiting for the default route to appear, the expire times may be gone past 1+ seconds, causing the Expire column to show <1800 or <600. Fixes: f6bcc0925f0ea838da5183dc503f847e56d15cc8 Reviewed by: pouria Approved by: lwhsu (mentor) MFC after: 3 days Differential Revision: https://reviews.freebsd.org/D56712 --- tests/sys/netinet6/ndp.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/tests/sys/netinet6/ndp.sh b/tests/sys/netinet6/ndp.sh index 35ea6655d922..636a5558b7a8 100755 --- a/tests/sys/netinet6/ndp.sh +++ b/tests/sys/netinet6/ndp.sh @@ -834,11 +834,16 @@ ndp_routeinfo_option_body() { done # Make sure routes from rti option are being installed - atf_check -s exit:0 \ - -o match:"^${route1}/32[[:space:]]+${lladdr}.*1800" \ - -o match:"^${route2}/48[[:space:]]+${lladdr}.*600" \ - -o match:"^default[[:space:]]+${lladdr}" \ - jexec ${jname} netstat -rn6 + atf_check -s exit:0 -o save:netstat_out netstat -j ${jname} -rn6 + atf_check -s exit:0 -o match:"^default[[:space:]]+${lladdr}" \ + cat netstat_out + + # Ensure that route1's and route2's expiration times are correct + # respectively and do not get swapped + expire1="$(grep "^${route1}/32[[:space:]]*${lladdr}" netstat_out | cut -wf5)" + atf_check -s exit:0 test 601 -le ${expire1} -a ${expire1} -le 1800 + expire2="$(grep "^${route2}/48[[:space:]]*${lladdr}" netstat_out | cut -wf5)" + atf_check -s exit:0 test ${expire2} -le 600 # Verify the default route lifetime and its preference is overwrited atf_check -s exit:0 \ From nobody Thu May 21 17:34:33 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLwWs3F7Tz6fWFs for ; Thu, 21 May 2026 17:34: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLwWs2fH6z3Q23 for ; Thu, 21 May 2026 17:34:33 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779384873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iy2E75M2YopwXvjpLKfY7Md1z89QhIqP1zoZtgPY5V4=; b=f5QIaZPU0AysPIMA1zE5ZZFqY8eCrvjHkVskE9bvamAxVbf0E8cSZh9Cjf71WgRXdu4uZt OjSgK8ikAroVnBDmFaNf0/Y4lqUzK/SIFqRkwdu2NyynBlWjI2FavDzHMqqpbFaqmg4QNm PunPDQ0hP0EbWVcytdoIFEVzo5Sm1Pl6yZrlfjFdk76nNKMmKfmnUQgNBoKJGAJWzWzXRq yP/7cFyJvzTgK3MucujuCH8e+QojgDSIyx1e/xy7und98xUxhNh6clmIH3U54UvX3UZTrN 7jdNraz1Tn2ccc1qcNd+GdT/l1nKSKgBfIQxyAgV/VYg+Oo19FpcjLl9doHdAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779384873; a=rsa-sha256; cv=none; b=CmYaYUeb++y0YKFwsRSOSL7gx3jxTNNHjwSFN4INawo3XcODRnB13KctBiJvQqWWUNGGr5 XX3csKy+2lkKglT15ucTZa6hX4NWbp/aqoHPe1T35QM+weIcnCNZ5fqFQZeb9qDTmtzBMO FkKwKyUDoUb/yhfF9YAzfyBPclDdFuKseseNpUkcdarkn8HXtBuGnYU/CEXqksEJnoK9Kv VtWhox0FhQUkGSJ/THbFsbONVi0XL17ELk+o3HH2ZNpZ2JzcSB/kbIaWsN2/CJaCjYVT33 40AdZCvIW6s+L/13SSqza9Iiicr4EkyNJeHWBUQtr7nWA2qoB8YVIsXs8FsPrQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779384873; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iy2E75M2YopwXvjpLKfY7Md1z89QhIqP1zoZtgPY5V4=; b=kX8CZa9KlPmmif3lmyJv8vc9bl8S3VCtoFDlc77d7ksexbeemxOjxBCOAS4brUgdB+w1qx AxQI441pMft6Lw7tcJ2Zc9QFQUAYeGgPM5OklDGb0ZxpYNYcUDG323XGjRs6ToELq9kiUS HZqHRz4NOE5B0BYiQRVBpQybTF+isyMucPp6i3YYqJPhpe59ynodEje2Ugh80n46I4jfWP xIOvq+Mf5lEuzBDemKHinGXgEP9J6FxK97gLY1laDaJ/5YHs4wPvdOfAGbLnD/UhC8Lkg2 RNrbeBQjyolxPXnb29Ptvbq7f6bFV2APMWyCkm3GuNjPBB9SfIr7512NVQwhVA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLwWs2BJSzhtD for ; Thu, 21 May 2026 17:34:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 23ad1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 17:34:33 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 6024e3f99a1e - main - Add audio group List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 6024e3f99a1e3f5e52fd50c26789fc2dc98fd9c1 Auto-Submitted: auto-generated Date: Thu, 21 May 2026 17:34:33 +0000 Message-Id: <6a0f4229.23ad1.6961dda9@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=6024e3f99a1e3f5e52fd50c26789fc2dc98fd9c1 commit 6024e3f99a1e3f5e52fd50c26789fc2dc98fd9c1 Author: Christos Margiolis AuthorDate: 2026-05-06 16:00:38 +0000 Commit: Christos Margiolis CommitDate: 2026-05-21 17:32:42 +0000 Add audio group To be initially used by virtual_oss(8) loopback devices. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/26 --- etc/group | 1 + sys/sys/conf.h | 1 + 2 files changed, 2 insertions(+) diff --git a/etc/group b/etc/group index af42fa1bcc11..740b970787b8 100644 --- a/etc/group +++ b/etc/group @@ -15,6 +15,7 @@ sshd:*:22: smmsp:*:25: mailnull:*:26: guest:*:31: +audio:*:43: video:*:44: realtime:*:47: idletime:*:48: diff --git a/sys/sys/conf.h b/sys/sys/conf.h index e5a6be9b891c..a6713ee91190 100644 --- a/sys/sys/conf.h +++ b/sys/sys/conf.h @@ -155,6 +155,7 @@ typedef int dumper_hdr_t(struct dumperinfo *di, struct kerneldumpheader *kdh); #define GID_OPERATOR 5 #define GID_BIN 7 #define GID_GAMES 13 +#define GID_AUDIO 43 #define GID_VIDEO 44 #define GID_RT_PRIO 47 #define GID_ID_PRIO 48 From nobody Thu May 21 17:34:34 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLwWt4vbcz6fWFt for ; Thu, 21 May 2026 17:34: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLwWt3V4yz3QWV for ; Thu, 21 May 2026 17:34:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779384874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aeO4ZMspi4vV0m59o5wcBimHDSbsPuEMaX9ro3uTBOI=; b=Qt3bg76IN2CI8oIhirmzRsa+iFUdhdJdYsclH6qkwFqG2RHcB/LhvHNpwmw5ECHWynd6VF 23Xv/sHRbyTJyaKgTUQFVNye5iWCc7PHlqTdSxIycycppTpqnl2MZNyY+YXsJLuRlYinw4 SidO9SX1fotXF3DZ7BUtcxxub1DbKL+kYh2W/7MqRtEIk31qeV515zhogTu5JWcmg3NSyh f1KIv+2OEVm7RlnjaTLQX2lW2rORcNKqhgg3kjoswN3szKO2rBaWrJPrVXTotZ25PDLmoG TfzbNKu+wGWETg1EGXZ1MO8VFr6pr+Ked69NgeS2qp+n0Gp3cVcqvYwW8z3DAA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779384874; a=rsa-sha256; cv=none; b=DWx0ZNwlLW0hC9ggfup1nkGliLNKwTxWIJn3fJGxnlygVUm7qBs8kHjr5dtCYV1+ni2gWx FtU9AWhggBl7zWI+Me41V9jBTXj2NYx6zeUcMSGF4f9SQZj79LbvHTwvRRUMECifXGiY8r nftfhI6wCjQSmsLNwuiGxw+beoBSR/HcfF1A5C9vkOUTUnBqrS8mrEVtrQyCLFgl64ZOHm hfiQsGRoF8l7Z477pwJIsiCIyoBCs0cK6dPE1hv27pj1hDSk3sYNhrR5xP4i2+Js3oyMPC RU7n+D3OnBa97C/ePq1euRch0WboHBaTyWZPvQchLD/u2oy+0rCK5kFtU63xIQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779384874; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=aeO4ZMspi4vV0m59o5wcBimHDSbsPuEMaX9ro3uTBOI=; b=to2tCyJTJRM/La167FWyh9WqucHrefTWx/TFxPrsTN3ShGzT20pCqAaMa2p+sqipphjl1c NXQGfWe1/0HsIsetpMZ8Q9tOlqntUwZ6Smy1FBl8ssJPnuUlsT+iPGqK5caLiDJIR/63b9 ruqc356zmN94II759BtpzVvzTfrFk8++zMIw+BpR38oI6ZzPZFw3i7xfAy2BsyYjkz0MEy BklIe3d0wh9DR/Imic3unpHtyvyadTJNrLEfIf9yat656IwG4mlOY1wLkDRz0GHdW/DAkO nv6RvrFF54rcM8k4r2kJpnMVELEKbv+AF7EzQBatcV3CqVwKMylMlqfzlRzX/Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLwWt2zYRzhtF for ; Thu, 21 May 2026 17:34:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2502c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 17:34:34 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 5f904cb1b05c - main - virtual_oss(8): Create loopback devices with GID_AUDIO List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f904cb1b05c94453727abb606d6109fe504b10b Auto-Submitted: auto-generated Date: Thu, 21 May 2026 17:34:34 +0000 Message-Id: <6a0f422a.2502c.6b5ae719@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=5f904cb1b05c94453727abb606d6109fe504b10b commit 5f904cb1b05c94453727abb606d6109fe504b10b Author: Christos Margiolis AuthorDate: 2026-05-06 16:19:27 +0000 Commit: Christos Margiolis CommitDate: 2026-05-21 17:32:43 +0000 virtual_oss(8): Create loopback devices with GID_AUDIO Make sure the user is part of the audio group to avoid unintended snooping of loopback audio by unprivileged users. While here, retire voss_dsp_perm, since we don't use the same value everywhere now. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/26 --- usr.sbin/virtual_oss/virtual_oss/main.c | 27 +++++++++++++++++++++----- usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 | 4 +++- 2 files changed, 25 insertions(+), 6 deletions(-) diff --git a/usr.sbin/virtual_oss/virtual_oss/main.c b/usr.sbin/virtual_oss/virtual_oss/main.c index 6a56adbc6075..1d24be89f3da 100644 --- a/usr.sbin/virtual_oss/virtual_oss/main.c +++ b/usr.sbin/virtual_oss/virtual_oss/main.c @@ -37,6 +37,7 @@ #include #include +#include #include #include #include @@ -1620,7 +1621,6 @@ int voss_is_recording = 1; int voss_has_synchronization; volatile sig_atomic_t voss_exit = 0; -static int voss_dsp_perm = 0666; static int voss_do_background; static int voss_baseclone = 0; static const char *voss_pid_path; @@ -1864,7 +1864,24 @@ dup_profile(vprofile_t *pvp, int *pamp, int pol, int rx_mute, { vprofile_t *ptr; struct cuse_dev *pdev; - int x; + struct group *gr; + gid_t gid; + int x, perm; + + if (!is_client) { + /* + * Loopback devices can be used only by users who part of the + * audio group, to avoid unintended snooping by unprivileged + * users. + */ + if ((gr = getgrnam("audio")) == NULL) + return ("getgrnam() failed"); + gid = gr->gr_gid; + perm = 0660; + } else { + gid = 0; + perm = 0666; + } rx_mute = rx_mute ? 1 : 0; tx_mute = tx_mute ? 1 : 0; @@ -1918,7 +1935,7 @@ dup_profile(vprofile_t *pvp, int *pamp, int pol, int rx_mute, /* create DSP character device */ pdev = cuse_dev_create(&vclient_oss_methods, ptr, NULL, - 0, 0, voss_dsp_perm, ptr->oss_name); + 0, gid, perm, ptr->oss_name); if (pdev == NULL) { free(ptr); return ("Could not create CUSE DSP device"); @@ -1935,7 +1952,7 @@ dup_profile(vprofile_t *pvp, int *pamp, int pol, int rx_mute, /* create WAV device */ if (ptr->wav_name[0] != 0) { pdev = cuse_dev_create(&vclient_wav_methods, ptr, NULL, - 0, 0, voss_dsp_perm, ptr->wav_name); + 0, gid, perm, ptr->wav_name); if (pdev == NULL) { free(ptr); return ("Could not create CUSE WAV device"); @@ -2612,7 +2629,7 @@ main(int argc, char **argv) if (voss_ctl_device[0] != 0) { pdev = cuse_dev_create(&vctl_methods, NULL, NULL, - 0, 0, voss_dsp_perm, voss_ctl_device); + 0, 0, 0666, voss_ctl_device); if (pdev == NULL) errx(EX_USAGE, "Could not create '/dev/%s'", voss_ctl_device); diff --git a/usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 b/usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 index b607f45cd369..b9dc8fd86a3c 100644 --- a/usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 +++ b/usr.sbin/virtual_oss/virtual_oss/virtual_oss.8 @@ -23,7 +23,7 @@ .\" SUCH DAMAGE. .\" .\" -.Dd April 17, 2026 +.Dd May 7, 2026 .Dt VIRTUAL_OSS 8 .Os .Sh NAME @@ -162,6 +162,8 @@ This option should be specified before the -d and -l options. Create an OSS device by given name. .It Fl l Ar name Create a loopback OSS device by given name. +Users have to be part of the audio group to access this device. +This is a security measure to avoid unintended snooping by unprivileged users. .It Fl L Ar name Create a loopback OSS device which acts as a master device. This option is used in conjunction with -f /dev/null . From nobody Thu May 21 17:39:12 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLwdD4wrDz6fWwd for ; Thu, 21 May 2026 17:39:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLwdD4JT9z3RC5 for ; Thu, 21 May 2026 17:39:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779385152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rwt/yrzPf35L2NzMCp0YioxlBCHdgC9AnaCqLa/1xdY=; b=fDRrBfaFayz0Q/9VdEveqhTnGLeXWBka/6jlMoSvBTmA0I40b/joziQ9Ncm081uMekkBKf zOTfA+6P5GCYKJPlmD78oMlN7xr8pBR4TLAHX4ZQsrCGcO5aIMNbMCzIRLJnTUnL8x2DSt u31uPYCChbi9DT8RDzS6CG9n8gJ1bKMvVtdrcmOxa80YRwqlWOva3vpogrs3n/rpGG/sqS p0SVmvvZDkq3UVRe9rxk66Rq/5iNHBvkzGu701Yq1nq/XZvfz3XKYeqq8VGegorb3nLBpl rF9sdLKxk4m25Zb0dLWLZVQZuCbVYwQGUHxenA/IPBhueYO82tayfwR1gJgglA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779385152; a=rsa-sha256; cv=none; b=Y/Ta+XSVUR/74Bf8x2PEvlgZ1sWtqzxkQXtLiQs1ofSJsoMuHoF/wQ9Lsd6oHGLPiUuQ9D 2ohC4QcvASj8KOzGFnj/bJKsH2eEYRg8ubsBxPebby/ocAeHNhAQSkl7nVxvQj1m7OeGFO HQtctKGEM4RpLrAf5ZT7VTx8G/mu/O9Jt7e6hqCudrURNAiQrWLyJaPYrQviTrvHkJP4d7 HCaIeddvS08C/083u+sunIUPnIE2AHvsTCzA/1j6IGFBRSffl8M7ZehXRI4HnqtRpbfocP OiX4t4xKVyYNClkMFnwTbacPAgLEoKI3wEu46XpxCvGGelXQ5539HGmLB3LBZw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779385152; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Rwt/yrzPf35L2NzMCp0YioxlBCHdgC9AnaCqLa/1xdY=; b=vG7r/8CLoBzP0tiBqaVwZoZNoyRq6Vk+sReweeO7m0AAQQ7KicRt5HUzHuSJa5tN/lZ+V7 gusXuBrF8godPc5miSdku1Ce0a2cDeOGbxdVURZ66Tyv/wSyPYXkXa+KIGKZ9gEQ/GBtIo B11LlVAqzMF1BATJH6NHVQZf4CEzWAPbOQxOQqNKic0cxI0EgHwRLLE+hgE+uM9tG0Tlae Huato92wIw/pSCNS6b0Jp4otaxcDZvULcy8v6p+XsbAlG99Sh78vC/W5ifv3hymsm5BLWg ghxiJBi0xW7dwWGG0CR0LiZ+87NjwVzaGr1znzlsWNoYKKRxd1kOYNxPXkixug== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLwdD3tlNzk57 for ; Thu, 21 May 2026 17:39:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 24ec0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 17:39:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 8532b4a43636 - main - rc: virtual_oss: Create a loopback device in the default configuration List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8532b4a436364d04d5c1feb7af5ecd4b5df71a9f Auto-Submitted: auto-generated Date: Thu, 21 May 2026 17:39:12 +0000 Message-Id: <6a0f4340.24ec0.54b55c7b@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=8532b4a436364d04d5c1feb7af5ecd4b5df71a9f commit 8532b4a436364d04d5c1feb7af5ecd4b5df71a9f Author: Christos Margiolis AuthorDate: 2026-04-17 10:03:30 +0000 Commit: Christos Margiolis CommitDate: 2026-05-21 17:37:34 +0000 rc: virtual_oss: Create a loopback device in the default configuration The loopback device allows us to record desktop sound by reading from it, or even use it as an input device, for example during a call. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: emaste Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/16 --- libexec/rc/rc.d/virtual_oss | 1 + 1 file changed, 1 insertion(+) diff --git a/libexec/rc/rc.d/virtual_oss b/libexec/rc/rc.d/virtual_oss index a25abf256f55..73a486f547a5 100644 --- a/libexec/rc/rc.d/virtual_oss +++ b/libexec/rc/rc.d/virtual_oss @@ -39,6 +39,7 @@ virtual_oss_default_args="\ -i 8 \ -f /dev/dsp${default_unit} \ -d dsp \ + -l dsp.loop \ -t ${virtual_oss_default_control_device}" # Set to NO by default. Set it to "YES" to enable virtual_oss. From nobody Thu May 21 18:18:10 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLxVT36H5z6fbGn for ; Thu, 21 May 2026 18:18:25 +0000 (UTC) (envelope-from eduardo@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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLxVT0Xl5z3WCq for ; Thu, 21 May 2026 18:18:25 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779387505; 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=4lbmD1h3iFF7+QUaZZJuPtoTVlmLu5Mzi4VHRfDB/hA=; b=mk4vYPIx1Vz2N3X6wArd33chWvEt4aYAr6tvGCgj2v3AT4Q05TuKmqG+dghlh3IK1sjX9/ qc4xuGqKFl980BV5j4ca/Lzhj3OCCBi0quakdVKaC5txyF0r70tEFNR4UGE5TDkTUPOsc2 nec9BJCStSwY/duDlDgavi35kpaDNuopj7CN3wfC6j90LPRwS0JJPloS+apKLZUeOJrR3T Rcmr1y6IHjGYB2sZqXbahH4wRmpsuJIeY/n7jsCT6Bab3so1AQT7WtftBbxTASte+iM5Sa C0hFeaHt5ZeOYiu4Hec9oBgLDdAZZHKV+8gRUS91YNRQeboOdc+1dpNkVgLUBQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779387505; a=rsa-sha256; cv=none; b=orQXsta+6zwA3QtTrgIru+iqk7gImkY8nfk60lJoSKnStxO/RqkPpbKkmZ9+P2aOqG+Agu EM+K8YQSWGsIrl4q+tWOQzSreLTNI7eObnosO1D8vYDqDCr1kDsf7xGvdWdlSh4dwMeqC9 NfdBaLTfwGYnqD0O+3URBx0A0FlsqRFY3Qn2DmQBHv0w6RmNMqwGnwpQQrmivV5ON/5mTS BvIAA3EKYGejvnheaKzuyhpX1zgcZBk0kJT2pWmfl2wq55tQJvlEvmbmMGSk/k/uANXn5T uFXMT0rp73c6MWH6FMGDvkluen0+kY0or9xNS1oGZD9dVX1h0tR5NmIyWmFNQw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779387505; 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=4lbmD1h3iFF7+QUaZZJuPtoTVlmLu5Mzi4VHRfDB/hA=; b=NXGL41bPiN+IvGQk7C8GrYIFytDxl2ItTMRDeUxxyFVtlw+V+KNMd+ylIiWsPraCeNo2tt lbi8lP/mR6bAS97RSbZ1rzZYO3eVgoTuij1i3o8VMQs3c32BozEFab0+wZQuAkuOSrfD8H wMuzE8V4URcl6ss6O7qp6pASzrGtaALZn9YoMnntZOGItSzceyy+uFpsiUKA5N/5CUlhnv ZDS3kDTgoERBvNXEviUpGUBFoKdCGtebiWG4RBuYPRV+izE1T1mNL5BZ4SNozx5GhnLVnu MUT/p5suPcThJlJZisMuq4xEg2dn2jtdGwVusoFxNLaL9ApOrKS/I2NnXqczmQ== Received: from mail-lj1-f169.google.com (mail-lj1-f169.google.com [209.85.208.169]) (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)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gLxVS6yTzzNwV for ; Thu, 21 May 2026 18:18:24 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-lj1-f169.google.com with SMTP id 38308e7fff4ca-38e8de47ed4so7852011fa.1 for ; Thu, 21 May 2026 11:18:24 -0700 (PDT) X-Forwarded-Encrypted: i=1; AFNElJ/b5IyyfxVng/cWL1LmtHbd+KV8mE4I/82o+veOQpLljESHh+2OV15uxBdDR1hjz0EgXqNKDhntbTkraCYxbaeUZDLjZw==@freebsd.org X-Gm-Message-State: AOJu0YwnWIZw5u6ktAjH5JnMYyMl6WD5MI1DVL5GKoazCiE5gkrke9/P lr+zDGumVIB6eaItbP7xAEF4C9XrdYOAQjUgdQpBrRimamhhROzWuK9pxt6mC2veIqao1n3bQML Mfi02xxqLlEozAx9g8dYvIL6MsQHoy34= X-Received: by 2002:a2e:bd06:0:b0:393:b135:aa60 with SMTP id 38308e7fff4ca-395d8c364e8mr43981fa.2.1779387503483; Thu, 21 May 2026 11:18:23 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 References: <69ee1653.34850.61462b24@gitrepo.freebsd.org> <24a05f73-84a3-480f-b797-e0688753810c@yahoo.com> In-Reply-To: <24a05f73-84a3-480f-b797-e0688753810c@yahoo.com> From: Nuno Teixeira Date: Thu, 21 May 2026 19:18:10 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: AVHnY4IU-VFlLQ_Uj2AV6nUdKdOZypeZupuFFIUXE33AHq1rwZ3A7o6oAj2eXnE Message-ID: Subject: Re: git: 4dd97955e68d - main - libpkgconf: Fix paths To: Mark Millard Cc: =?UTF-8?Q?Dag=2DErling_Sm=C3=B8rg_rav?= , dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="0000000000001020ae065257f0a8" --0000000000001020ae065257f0a8 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, This change doens't honour PREFIX when it is set to other path than default "/usr/local/" -CFLAGS+=3D -DPERSONALITY_PATH=3D\"/usr/share/pkgconfig/personality.d:/etc/pkgconfig/p= ersonality.d:${LOCALBASE:U}/etc/pkgconfig/personality.d\" -CFLAGS+=3D -DPKG_DEFAULT_PATH=3D\"${LOCALBASE:U}/libdata/pkgconfig:/usr/libdata/pkgco= nfig:${LOCALBASE:U}/share/pkgconfig\" +CFLAGS+=3D -DPERSONALITY_PATH=3D\"/usr/share/pkgconfig/personality.d:/etc/pkgconfig/p= ersonality.d:${LOCALBASE:U/usr/local}/etc/ pkgconfig/personality.d\" +CFLAGS+=3D -DPKG_DEFAULT_PATH=3D\"${LOCALBASE:U/usr/local}/libdata/pkgconfig:/usr/lib= data/pkgconfig:${LOCALBASE:U/usr/local}/share/pkgconfig\" Please see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D295439 Thanks, Mark Millard escreveu (domingo, 26/04/2026 =C3=A0(s) 19= :08): > On 4/26/26 06:42, Dag-Erling Sm=C3=B8rg rav wrote: > > The branch main has been updated by des: > > > > URL: > https://cgit.FreeBSD.org/src/commit/?id=3D4dd97955e68df02b26d59e4e7c9a816= 7947a5164 > > > > commit 4dd97955e68df02b26d59e4e7c9a8167947a5164 > > Author: Dag-Erling Sm=C3=B8rgrav > > AuthorDate: 2026-04-26 13:41:47 +0000 > > Commit: Dag-Erling Sm=C3=B8rgrav > > CommitDate: 2026-04-26 13:41:47 +0000 > > > > libpkgconf: Fix paths > > > > ${LOCALBASE:U} evaluates to exactly the same thing as ${LOCALBASE}. > > Presumably what was meant was ${LOCALBASE:U/usr/local}. > > > > Fixes: b8352da33f34 ("pkgconf: import into the base system= ") > > Reviewed by: khorben > > Differential Revision: https://reviews.freebsd.org/D56642 > > --- > > lib/libpkgconf/Makefile | 4 ++-- > > tools/build/depend-cleanup.sh | 4 ++++ > > 2 files changed, 6 insertions(+), 2 deletions(-) > > > > diff --git a/lib/libpkgconf/Makefile b/lib/libpkgconf/Makefile > > index fee7f275d9ff..3cfb2172a00e 100644 > > --- a/lib/libpkgconf/Makefile > > +++ b/lib/libpkgconf/Makefile > > @@ -14,8 +14,8 @@ INCS=3D bsdstubs.h iter.h libpkgconf-ap= i.h > libpkgconf.h stdinc.h > > > > WARNS?=3D 3 > > > > -CFLAGS+=3D > -DPERSONALITY_PATH=3D\"/usr/share/pkgconfig/personality.d:/etc/pkgconfig= /personality.d:${LOCALBASE:U}/etc/pkgconfig/personality.d\" > > -CFLAGS+=3D > -DPKG_DEFAULT_PATH=3D\"${LOCALBASE:U}/libdata/pkgconfig:/usr/libdata/pkg= config:${LOCALBASE:U}/share/pkgconfig\" > > +CFLAGS+=3D > -DPERSONALITY_PATH=3D\"/usr/share/pkgconfig/personality.d:/etc/pkgconfig= /personality.d:${LOCALBASE:U/usr/local}/etc/pkgconfig/personality.d\" > > +CFLAGS+=3D > -DPKG_DEFAULT_PATH=3D\"${LOCALBASE:U/usr/local}/libdata/pkgconfig:/usr/l= ibdata/pkgconfig:${LOCALBASE:U/usr/local}/share/pkgconfig\" > > CFLAGS+=3D -DSYSTEM_INCLUDEDIR=3D\"/usr/include\" > > CFLAGS+=3D -DSYSTEM_LIBDIR=3D\"/usr/lib\" > > CFLAGS+=3D -I${SRCTOP}/lib/libpkgconf -I${PKGCONFDIR} > > diff --git a/tools/build/depend-cleanup.sh > b/tools/build/depend-cleanup.sh > > index e9c02d015368..c186c39a3448 100755 > > --- a/tools/build/depend-cleanup.sh > > +++ b/tools/build/depend-cleanup.sh > > @@ -317,6 +317,10 @@ check_epoch_and_opts > > # "$OBJTOP"/tests/sys/kqueue/libkqueue/* > > #fi > > > > +# 20250426 # libpkgconfig contains incorrect paths > > 2025 above is a typo? > > > +clean_obj lib/libpkgconf personality c pkgconfig:/share > > +clean_obj lib/libpkgconf pkg c pkgconfig:/share > > + > > # 20251219 # libkrb5profile is now internal > > for libcompat in "" $ALL_libcompats; do > > dirprfx=3D${libcompat:+obj-lib${libcompat}} > > > > > > > -- > =3D=3D=3D > Mark Millard > marklmi at yahoo.com > > --=20 Nuno Teixeira FreeBSD UNIX: Web: https://FreeBSD.org --0000000000001020ae065257f0a8 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

This change doens't= honour PREFIX when it is set to other path than default "/usr/local/&= quot;

-CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0-DPERSONALITY_PATH=3D\&q= uot;/usr/share/pkgconfig/personality.d:/etc/pkgconfig/personality.d:${LOCAL= BASE:U}/etc/pkgconfig/personality.d\"
-CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0-DPKG_DEFAULT_PATH=3D\"${LOCALBA= SE:U}/libdata/pkgconfig:/usr/libdata/pkgconfig:${LOCALBASE:U}/share/pkgconf= ig\"
+CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0-DPERSONALITY_PATH=3D\"/usr/shar= e/pkgconfig/personality.d:/etc/pkgconfig/personality.d:${LOCALBASE:U/usr/lo= cal}/etc/pkgconfig/personality.d\"
+CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0-DPKG_DEFAULT_PATH=3D\"${LOCALBA= SE:U/usr/local}/libdata/pkgconfig:/usr/libdata/pkgconfig:${LOCALBASE:U/usr/= local}/share/pkgconfig\"

Please see https://bugs.freebsd.org/= bugzilla/show_bug.cgi?id=3D295439

Thanks,

Mark Millard <marklmi@yahoo.co= m> escreveu (domingo, 26/04/2026 =C3=A0(s) 19:08):
On 4/26/26 06:42, Dag-Erling Sm= =C3=B8rg rav wrote:
> The branch main has been updated by des:
>
> URL: https://= cgit.FreeBSD.org/src/commit/?id=3D4dd97955e68df02b26d59e4e7c9a8167947a5164<= /a>
>
> commit 4dd97955e68df02b26d59e4e7c9a8167947a5164
> Author:=C2=A0 =C2=A0 =C2=A0Dag-Erling Sm=C3=B8rgrav <des@FreeBSD.or= g>
> AuthorDate: 2026-04-26 13:41:47 +0000
> Commit:=C2=A0 =C2=A0 =C2=A0Dag-Erling Sm=C3=B8rgrav <des@FreeBSD.or= g>
> CommitDate: 2026-04-26 13:41:47 +0000
>
>=C2=A0 =C2=A0 =C2=A0libpkgconf: Fix paths
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0${LOCALBASE:U} evaluates to exactly the same thing = as ${LOCALBASE}.
>=C2=A0 =C2=A0 =C2=A0Presumably what was meant was ${LOCALBASE:U/usr/loc= al}.
>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0Fixes:=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 b8352da33f= 34 ("pkgconf: import into the base system")
>=C2=A0 =C2=A0 =C2=A0Reviewed by:=C2=A0 =C2=A0 khorben
>=C2=A0 =C2=A0 =C2=A0Differential Revision:=C2=A0
https://revie= ws.freebsd.org/D56642
> ---
>=C2=A0 lib/libpkgconf/Makefile=C2=A0 =C2=A0 =C2=A0 =C2=A0| 4 ++--
>=C2=A0 tools/build/depend-cleanup.sh | 4 ++++
>=C2=A0 2 files changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/lib/libpkgconf/Makefile b/lib/libpkgconf/Makefile
> index fee7f275d9ff..3cfb2172a00e 100644
> --- a/lib/libpkgconf/Makefile
> +++ b/lib/libpkgconf/Makefile
> @@ -14,8 +14,8 @@ INCS=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0bsdstubs.h iter.h libpkgconf-api.h libpkgconf.h stdinc.h
>=C2=A0
>=C2=A0 WARNS?=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 3
>=C2=A0
> -CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0-DPERSONALITY_PATH=3D\"/usr/share/= pkgconfig/personality.d:/etc/pkgconfig/personality.d:${LOCALBASE:U}/etc/pkg= config/personality.d\"
> -CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0-DPKG_DEFAULT_PATH=3D\"${LOCALBASE= :U}/libdata/pkgconfig:/usr/libdata/pkgconfig:${LOCALBASE:U}/share/pkgconfig= \"
> +CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0-DPERSONALITY_PATH=3D\"/usr/share/= pkgconfig/personality.d:/etc/pkgconfig/personality.d:${LOCALBASE:U/usr/loca= l}/etc/pkgconfig/personality.d\"
> +CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0-DPKG_DEFAULT_PATH=3D\"${LOCALBASE= :U/usr/local}/libdata/pkgconfig:/usr/libdata/pkgconfig:${LOCALBASE:U/usr/lo= cal}/share/pkgconfig\"
>=C2=A0 CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0-DSYSTEM_INCLUDEDIR=3D\"/usr/= include\"
>=C2=A0 CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0-DSYSTEM_LIBDIR=3D\"/usr/lib\= "
>=C2=A0 CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0-I${SRCTOP}/lib/libpkgconf -I${PKG= CONFDIR}
> diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend-cleanu= p.sh
> index e9c02d015368..c186c39a3448 100755
> --- a/tools/build/depend-cleanup.sh
> +++ b/tools/build/depend-cleanup.sh
> @@ -317,6 +317,10 @@ check_epoch_and_opts
>=C2=A0 #=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 "$OBJTOP"/tests/sy= s/kqueue/libkqueue/*
>=C2=A0 #fi
>=C2=A0
> +# 20250426 # libpkgconfig contains incorrect paths

2025 above is a typo?

> +clean_obj lib/libpkgconf personality c pkgconfig:/share
> +clean_obj lib/libpkgconf pkg c pkgconfig:/share
> +
>=C2=A0 # 20251219 # libkrb5profile is now internal
>=C2=A0 for libcompat in "" $ALL_libcompats; do
>=C2=A0 =C2=A0 =C2=A0 =C2=A0dirprfx=3D${libcompat:+obj-lib${libcompat}}<= br> >
>


--
=3D=3D=3D
Mark Millard
marklmi at yahoo.com



--
Nuno Teixeira
=
FreeBSD UNIX:=C2=A0 <eduardo@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 https://Fr= eeBSD.org
--0000000000001020ae065257f0a8-- From nobody Thu May 21 19:19:09 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLyrY5ss1z6dk2x for ; Thu, 21 May 2026 19:19: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLyrY3RhVz3hJC for ; Thu, 21 May 2026 19:19:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779391149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JGbJzRO7u1POdl906x+eAd/uHrkpsdLR+/kvOPMXFiU=; b=RXhLVGTTmIUhDGKqIeDggzl0e0ziuA85B4lkQZ9ZMHECwHLb8+kkhYwO4ruVfLbxwg/mEI hWd6GPfa1ZjyAV8xzkJYCLMp4rPlNqxN+Gt2w5Yj3AeKsLAyhQNekKw5AJY/nTk8Qn02FT zjuyKvugMpVtdLWVURz241pT6yhEiLg1mmwbJ+JhcozTKBV7pCdO0ybL2jqXXHjMg6bsGP wppQ+CnWRMT84W0wmn5cV9ZM7XtfqXyfv+CcmtFnYSkXrYV5Hfssn7CmDv0hrdeluPtb8P utMNlswVJoz4TVbpC79lmWRDEQY3lVDRc69SHPm/rI00gKq0QHoXbpleno9SWg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779391149; a=rsa-sha256; cv=none; b=YM1/m/k5rob/DQutGWLWuvX0ayWZw3yTR7SIIFFpbxx4vqo9UckhoGj/rRHkC545uW5tMA AaTfxzGbfrz5ToQLGbctQ2R946OSUd8tUrcSP79nYoiUW4AA1NnVG1+aC5Rmi2WfoqgvVh zR81zAWYp8zkMirF3r2/qTorfFOm1spNcJJlqW9kqgYtqb9D4XWB0Dh2gyXZCc8OElJkep yUTaIyuCf7f6iYut4o7WD+8OeCMD2uGL72AagTOzUA4yHclNAJcVAY6bwO4sVO+A5LJSSO /fkiUvvKZ9v3mMZWBdNqKMg4YJ/RU8rKHiEIMdtuONHMXLxwoQEaxStY03jUeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779391149; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=JGbJzRO7u1POdl906x+eAd/uHrkpsdLR+/kvOPMXFiU=; b=rGDkcSNPOI+rtoVW36+L7FoYUbAUiTU8FvbAfBs0ie+5W5ppAKz1VtWztOmBLZH8d8qHNn EYsQdEmjw4FzoPFo6siQ/H97KgTx1iEpXF+fm6eGKX8Z1kgPiQ1lrP4JDpsndve6PLOaDO iwA0ukMcm0QvwxcxwkgFGfHzcNH/lBEYS6fIbd5dNV6f5oTjgW+KSrbq8G2w0fRgCD17hu io/8cRz5aTqfZeNDIL13sav2HjtBbzLW0gVDRQ5KkvgQYeCx4vr3RNOCMZBoOD+pixD09M wvgk/1THg9eZ/084p1jyxRglOZ0IAXKHTBTzyJNLeGik00+5oVkDYsdvH3CoRQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLyrY1zTPzmSD for ; Thu, 21 May 2026 19:19:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 348db by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 19:19:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: cba191e291c1 - main - MAC/do: Add basic tests on setting rules List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cba191e291c17b32247e12d6f94dcde56994bfe6 Auto-Submitted: auto-generated Date: Thu, 21 May 2026 19:19:09 +0000 Message-Id: <6a0f5aad.348db.63b15638@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=cba191e291c17b32247e12d6f94dcde56994bfe6 commit cba191e291c17b32247e12d6f94dcde56994bfe6 Author: Olivier Certner AuthorDate: 2026-05-21 13:34:14 +0000 Commit: Olivier Certner CommitDate: 2026-05-21 19:18:56 +0000 MAC/do: Add basic tests on setting rules MFC after: 1 minute Sponsored by: The FreeBSD Foundation --- tests/sys/mac/Makefile | 1 + tests/sys/mac/do/Makefile | 14 ++++ tests/sys/mac/do/common.sh | 72 +++++++++++++++++++ tests/sys/mac/do/invalid_configs.sh | 86 +++++++++++++++++++++++ tests/sys/mac/do/valid_configs.sh | 135 ++++++++++++++++++++++++++++++++++++ 5 files changed, 308 insertions(+) diff --git a/tests/sys/mac/Makefile b/tests/sys/mac/Makefile index 3447d00122f5..9858b09b5f1d 100644 --- a/tests/sys/mac/Makefile +++ b/tests/sys/mac/Makefile @@ -1,6 +1,7 @@ TESTSDIR= ${TESTSBASE}/sys/mac TESTS_SUBDIRS+= bsdextended +TESTS_SUBDIRS+= do TESTS_SUBDIRS+= ipacl TESTS_SUBDIRS+= portacl diff --git a/tests/sys/mac/do/Makefile b/tests/sys/mac/do/Makefile new file mode 100644 index 000000000000..980067ea56e6 --- /dev/null +++ b/tests/sys/mac/do/Makefile @@ -0,0 +1,14 @@ +PACKAGE= tests + +TESTSDIR= ${TESTSBASE}/sys/mac/do + +ATF_TESTS_SH+= valid_configs invalid_configs + +${PACKAGE}FILES+= common.sh + +TEST_METADATA+= execenv="jail" +TEST_METADATA+= required_kmods="mac_do" +TEST_METADATA+= required_user="root" +TEST_METADATA+= required_programs="sysctl" + +.include diff --git a/tests/sys/mac/do/common.sh b/tests/sys/mac/do/common.sh new file mode 100644 index 000000000000..88529adcc1f3 --- /dev/null +++ b/tests/sys/mac/do/common.sh @@ -0,0 +1,72 @@ +# +# Copyright (c) 2026, The FreeBSD Foundation +# +# This software was developed by Olivier Certner at +# Kumacom SARL under sponsorship from the FreeBSD Foundation. + +rules_parameter() +{ + echo "$1".rules +} + + +CONF_ROOT_KNOB=security.mac.do +RULES_KNOB=$(rules_parameter ${CONF_ROOT_KNOB}) +PPE_KNOB=${CONF_ROOT_KNOB}.print_parse_error + + +# $1 = knob name, $2 = value +sysctl_set_and_check() +{ + local knob value + + knob=$1 + value=$2 + atf_check -o ignore sysctl "$knob"="$value" + atf_check -o inline:"$value\n" sysctl -n "$knob" +} + +# $1 = knob name, $2 = value +sysctl_set_and_check_fails() +{ + local knob value orig_value + + knob=$1 + value=$2 + orig_value=$(sysctl -n "$knob") + atf_check -s not-exit:0 -o ignore -e ignore sysctl "$knob"="$value" + atf_check -o inline:"${orig_value}\n" sysctl -n "$knob" +} + +# $1 = sysctl function, $2 = value +sysctl_set_and_check_rules_common() +{ + local func value + + func=$1 + value=$2 + "$func" ${RULES_KNOB} "$value" + # Same spec but using the older in-rule separator (':') + "$func" ${RULES_KNOB} "$(echo "$value" | sed 's%>%:%')" +} + +# $1 = value +sysctl_set_and_check_rules() +{ + local value + + value=$1 + sysctl_set_and_check_rules_common sysctl_set_and_check "$value" +} + +# $1 = value +sysctl_set_and_check_fails_rules() +{ + local value + + value=$1 + sysctl_set_and_check_rules_common sysctl_set_and_check_fails "$value" +} + +# Do not pollute kernel logs with parse errors +sysctl $PPE_KNOB=0 >/dev/null 2>&1 diff --git a/tests/sys/mac/do/invalid_configs.sh b/tests/sys/mac/do/invalid_configs.sh new file mode 100644 index 000000000000..f24309cb2f3b --- /dev/null +++ b/tests/sys/mac/do/invalid_configs.sh @@ -0,0 +1,86 @@ +#!/usr/bin/env atf-sh +# +# Copyright (c) 2026, The FreeBSD Foundation +# +# This software was developed by Olivier Certner at +# Kumacom SARL under sponsorship from the FreeBSD Foundation. + +atf_test_case rule_no_target_part +rule_no_target_part_head() +{ + atf_set descr "Missing target part in a rule" +} +rule_no_target_part_body() +{ + sysctl_set_and_check_fails_rules "uid=0>" + sysctl_set_and_check_fails_rules "gid=0>" + sysctl_set_and_check_fails_rules "uid=0" + sysctl_set_and_check_fails_rules "gid=0" +} + +atf_test_case rule_no_match_part +rule_no_match_part_head() +{ + atf_set descr "Missing match part in a rule" +} +rule_no_match_part_body() +{ + sysctl_set_and_check_fails_rules ">uid=0" + sysctl_set_and_check_fails_rules ">gid=0" +} + +atf_test_case rule_space_between_flag_and_gid_fail +rule_space_between_flag_and_gid_fail_head() +{ + atf_set descr "No space allowed between flag and GID" +} +rule_space_between_flag_and_gid_fail_body() +{ + sysctl_set_and_check_fails_rules "uid=1001>uid=0,gid=0,+ gid=0" +} + +atf_test_case rule_user_names_fail +rule_user_names_fail_head() +{ + atf_set descr "Reject user names (only numerical IDs supported)" +} +rule_user_names_fail_body() +{ + sysctl_set_and_check_fails_rules "uid=user>uid=0" + sysctl_set_and_check_fails_rules "uid=1001>uid=root" +} + +atf_test_case rule_group_names_fail +rule_group_names_fail_head() +{ + atf_set descr "Reject group names (only numerical IDs supported)" +} +rule_group_names_fail_body() +{ + sysctl_set_and_check_fails_rules "gid=group>gid=0" + sysctl_set_and_check_fails_rules "gid=1001>gid=root" + sysctl_set_and_check_fails_rules "gid=1001>gid=0,+gid=operator" +} + +atf_test_case rules_wrong_separator +rules_wrong_separator_head() +{ + atf_set descr "Wrong rules separator" +} +rules_wrong_separator_body() +{ + sysctl_set_and_check_fails_rules "uid=1001>gid=0:gid=1001>gid=5" +} + + +atf_init_test_cases() +{ + . $(atf_get_srcdir)/common.sh + + atf_add_test_case rule_no_target_part + atf_add_test_case rule_no_match_part + atf_add_test_case rule_space_between_flag_and_gid_fail + atf_add_test_case rule_user_names_fail + atf_add_test_case rule_group_names_fail + atf_add_test_case rules_wrong_separator +} diff --git a/tests/sys/mac/do/valid_configs.sh b/tests/sys/mac/do/valid_configs.sh new file mode 100644 index 000000000000..bd5b53b5d5d8 --- /dev/null +++ b/tests/sys/mac/do/valid_configs.sh @@ -0,0 +1,135 @@ +#!/usr/bin/env atf-sh +# +# Copyright (c) 2026, The FreeBSD Foundation +# +# This software was developed by Olivier Certner at +# Kumacom SARL under sponsorship from the FreeBSD Foundation. + +atf_test_case rule_uid_to_any +rule_uid_to_any_head() +{ + atf_set descr "Single \"to any\" rule" +} +rule_uid_to_any_body() +{ + sysctl_set_and_check_rules "uid=1001>any" + sysctl_set_and_check_rules "gid=1001>any" +} + +atf_test_case rule_uid_to_uid +rule_uid_to_uid_head() +{ + atf_set descr "Single \"to UID\" rule" +} +rule_uid_to_uid_body() +{ + sysctl_set_and_check_rules "uid=1001>uid=0" + sysctl_set_and_check_rules "gid=1001>uid=0" +} + +atf_test_case rule_uid_to_uid_any +rule_uid_to_uid_any_head() +{ + atf_set descr "Single \"to UID any\" rule" +} +rule_uid_to_uid_any_body() +{ + sysctl_set_and_check_rules "uid=1001>uid=any" + sysctl_set_and_check_rules "gid=1001>uid=any" +} + +atf_test_case rule_uid_to_uid_star +rule_uid_to_uid_star_head() +{ + atf_set descr "Single \"to any (with '*')\" rule" +} +rule_uid_to_uid_star_body() +{ + sysctl_set_and_check_rules "uid=1001>uid=*" + sysctl_set_and_check_rules "gid=1001>uid=*" +} + +atf_test_case rule_uid_to_uid_gid +rule_uid_to_uid_gid_head() +{ + atf_set descr "Single \"to UID and GID\" rule" +} +rule_uid_to_uid_gid_body() +{ + sysctl_set_and_check_rules "uid=1001>uid=0,gid=0" + sysctl_set_and_check_rules "gid=1001>uid=0,gid=0" +} + +atf_test_case rule_uid_to_uid_gid_optional_sgid +rule_uid_to_uid_gid_optional_sgid_head() +{ + atf_set descr "Single \"to UID, GID and \ +optional supplementary group rule\" rule" +} +rule_uid_to_uid_gid_optional_sgid_body() +{ + sysctl_set_and_check_rules "uid=1001>uid=0,gid=0,+gid=0" + sysctl_set_and_check_rules "gid=1001>uid=0,gid=0,+gid=0" +} + +atf_test_case rule_uid_to_uid_gid_mandatory_sgid +rule_uid_to_uid_gid_mandatory_sgid_head() +{ + atf_set descr "Single \"to UID, GID and \ +mandatory supplementary group\" rule" +} +rule_uid_to_uid_gid_mandatory_sgid_body() +{ + sysctl_set_and_check_rules "uid=1001>uid=0,gid=0,!gid=0" + sysctl_set_and_check_rules "gid=1001>uid=0,gid=0,!gid=0" +} + +atf_test_case rule_uid_to_uid_gid_excluded_sgid +rule_uid_to_uid_gid_excluded_sgid_head() +{ + atf_set descr "Single \"to UID, GID and excluded supplementary group\" rule" +} +rule_uid_to_uid_gid_excluded_sgid_body() +{ + sysctl_set_and_check_rules "uid=1001>uid=0,gid=0,-gid=0" + sysctl_set_and_check_rules "gid=1001>uid=0,gid=0,-gid=0" +} + +atf_test_case rules_uid_to_uid +rules_uid_to_uid_head() +{ + atf_set descr "Multiple \"to UID\" rules" +} +rules_uid_to_uid_body() { + sysctl_set_and_check_rules \ + "uid=1001>uid=0;uid=1001>uid=0,gid=0,!gid=0,+gid=5;gid=1001>gid=5" +} + +atf_test_case rules_uid_to_uid_with_spaces +rules_uid_to_uid_with_spaces_head() +{ + atf_set descr "Multiple \"to UID\" rules with extra spaces" +} +rules_uid_to_uid_with_spaces_body() +{ + sysctl_set_and_check_rules \ + "uid=1001 > uid=0; uid=1001>uid=0, gid = 0, !gid =0,+gid =5; \ +gid= 1001 >gid =5" +} + + +atf_init_test_cases() +{ + . $(atf_get_srcdir)/common.sh + + atf_add_test_case rule_uid_to_any + atf_add_test_case rule_uid_to_uid + atf_add_test_case rule_uid_to_uid_any + atf_add_test_case rule_uid_to_uid_star + atf_add_test_case rule_uid_to_uid_gid + atf_add_test_case rule_uid_to_uid_gid_optional_sgid + atf_add_test_case rule_uid_to_uid_gid_mandatory_sgid + atf_add_test_case rule_uid_to_uid_gid_excluded_sgid + atf_add_test_case rules_uid_to_uid + atf_add_test_case rules_uid_to_uid_with_spaces +} From nobody Thu May 21 19:19:08 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLyrX5fbNz6dk16 for ; Thu, 21 May 2026 19:19: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLyrX2JHSz3gty for ; Thu, 21 May 2026 19:19:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779391148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PuQbpFxkzeCWazmQhQcK94m655BGwxBaSNks147bAHQ=; b=YhxgRgxOARJB1iYfNJ7KB2py4KY9G4s8nTyUc2VJfY/Y2j4BjpMK6Q1QXVJQGJ1L9WwYig NWLIfSnXROP0rZIBb8mZB7/26Hbu7Q1cIVkfzJgirJpse/A87MbtqrThfNcO7iS2sNogAR TYsJi8h/f43trOe6EVp2VXt3TTQTmG/iJ6+GiWD+xVlgvJqpqZFHod19ueqbvo3fGcwEXu CpxS0yXZ+Y44LM/EqjXPRDtHxBrbeKTO3jhDqVOjMwgC+l1Crind4ewUw334g+s38tc94Y VmxxAXDoGN82do3RqsFGf4n6URsTPgKT+ST8pjdE7/l4tOaGsZ01bZFTNUIOgw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779391148; a=rsa-sha256; cv=none; b=mMCSg7eBB0JpYNBHsp4gZLLUOn/pllDeY5cGWz8TYo2fr/leYoXfoIigRq2c8WyvYDBVVd KMP3iRQvlasux7qSfj5sN4f9aRRXOJs2kvb29fOMr6bk/PnbWruTHrc0r154dE7yZ3kNqj 9ii9t9Ptv2RedrpzYhT8vSGlzC071lDR9Vk7N1jgUNOt2uBZLdUs4s4uDdiZhtbOpNxdW8 VTm7XgpetDwu/4RKqCHPfUtYoS5IAH/LNFFXvephjp+9ASFQyC+NBNu0jZnoQJaGaBu2F0 vMmsOWQH3fucQw4A/pWXILlfFffXBKSKRMi8NYqmyV3Uoks/A6Dxkx68Bq6c0A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779391148; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=PuQbpFxkzeCWazmQhQcK94m655BGwxBaSNks147bAHQ=; b=iKeuFkNowCWti+eJEcwZrs+HoszIIRxXzi5g2a/QZYXb/JdZ88xXcHXRFG4lBuyEtveeAN vMWTaQGhZ2v+cr0bwD6ogo8dsqJJ6ics2V8ms/PBUY4WEJOlUV/bENFoSu67BcQbpCgjab zE5iE/isylfKR6lq83Md7TeNcnkDMYG6UZxdB5shB3aGv4h0EFGrH77UW2Bz/LmIPc8/4I B7aAx89igB18z7xFZCvCWh56WZuKLQUUptWZXmZA6vzBKes66X1Zzw9cnhz5ILRsmfR33h Axh2CTXl0Qkr5KtOO3Cya/6pijt2+uIj/vFyqQQFX+0ifMYoyY1lzir9FAakag== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLyrX1d0Jzm7R for ; Thu, 21 May 2026 19:19:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37b51 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 19:19:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: 21df76d01fce - main - mac_do.4: Jail parameter takes 'new', not 'enable'; uid_t/gid_t are 32-bit List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 21df76d01fce35b0398cf38c31928c6f47111d55 Auto-Submitted: auto-generated Date: Thu, 21 May 2026 19:19:08 +0000 Message-Id: <6a0f5aac.37b51.104f56f3@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=21df76d01fce35b0398cf38c31928c6f47111d55 commit 21df76d01fce35b0398cf38c31928c6f47111d55 Author: Olivier Certner AuthorDate: 2026-05-21 18:52:37 +0000 Commit: Olivier Certner CommitDate: 2026-05-21 19:18:48 +0000 mac_do.4: Jail parameter takes 'new', not 'enable'; uid_t/gid_t are 32-bit MFC after: 1 minute Sponsored by: The FreeBSD Foundation --- share/man/man4/mac_do.4 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/share/man/man4/mac_do.4 b/share/man/man4/mac_do.4 index d02932070e25..8c08e072be88 100644 --- a/share/man/man4/mac_do.4 +++ b/share/man/man4/mac_do.4 @@ -8,7 +8,7 @@ .\" at Kumacom SARL under sponsorship from the FreeBSD .\" Foundation. .\" -.Dd June 11, 2025 +.Dd May 21, 2026 .Dt MAC_DO 4 .Os .Sh NAME @@ -266,7 +266,7 @@ then converted to unsigned ones as specified in the C standard for the .Vt uid_t and .Vt gid_t -types, which are both 64-bit unsigned integers. +types, which are both 32-bit unsigned integers. .Sh RUNTIME CONFIGURATION The following .Xr sysctl 8 @@ -307,7 +307,7 @@ The following jail parameters are defined: .It Va mac.do Possible values are: .Bl -tag -width "'disable'" -compact -.It Ql enable +.It Ql new .Nm will enforce specific credential rules in the jail. The @@ -337,7 +337,7 @@ If set, and the jail parameter is not so explicitly, the value of the latter will default to .Ql disable if empty, else to -.Ql enable . +.Ql new . .El .Pp Each jail must have From nobody Thu May 21 20:08:24 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gLzxP0Hryz6dqND for ; Thu, 21 May 2026 20:08: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gLzxN6wk8z3scD for ; Thu, 21 May 2026 20:08:24 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779394105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OFrIpd+zKG7XTmRylDBp7At6OSdbEan8W0Y/wdh+m3M=; b=Lv3lVAzERyjadbBoGTWuW9yfdYP6m5bJVe3mLlaWzgZeeMeGnB+OgXJbtc6PddDw641npQ PPSWLHwGsyIEXnMcrYqfz/mvv9FNm5Kws1LlyVRtOjtwwm8ELHr2bYYqhJ41uZLp/tHzLy 7gF55Vrbj4NilfBSNixO5SnSiZLJHklzA/IOuo46pvX+8tkVj4wxw3lq3JlEpuzWA1xS91 G6q5e5gNJgBSgop+wwc0W7FhwjVjk2OeQWZWZUrCMZ7cv25nWrYks93/SWUsuo6LMK0bRd C5XVUQ2N9DZdqu7+pQNevmTj4ABTdckqOU9HcxQWPM10q+2GDiGwyfMJAjGS/w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779394105; a=rsa-sha256; cv=none; b=C0+v1HZCobPwR4zxmYkkOBqLA2Mw0nQpej853N4UlFL5s5KJSU+17VD2shWj1VUrYK0Rf/ 5RlryDyFMA5AYeMQdBSPd11b8UXukTOrjZC2OX4xZOdzShrSAwQbast2zAers8fNOYJnV4 bHAktLgj1lLeZu5fn0MjYTrqxMtIMKtyXHwo3OayXycSB4iDj9tIJw8FgQ+d67fAhRw3IZ ZVdL1OyrOjPCL17RZOM2Rlm89vNlCkao8FzRd9wOngrc3Rd+vXfOhNeeAcWKHtJceoDeUo baPxwLmqehtYZMztjDOm5+G+OCHAyhepdjwMk+3K6OSqUpn/PnXKTvum45oxmA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779394105; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OFrIpd+zKG7XTmRylDBp7At6OSdbEan8W0Y/wdh+m3M=; b=Tq8u/jXR9oIYVWKYZj8bqcejnLhjEPV446p6EEBorRjju2ts4QAYQd0Ji/PGmVakKrJSXY LyO3pgEWwhAdffMva/NaaNphuQNCo9rCDAqzwfOuy7WfDIt/jT5siZNyqG0rvSyrok41pn Q+SR71CTtaBcV7faE5S9keU2B8nUamMLrluhLYnZaZ/Ajd1WMlGIruT3zCA8EW7BnUCesZ gVBuVMdCqpCse9aZdaAHj4NyLrduD+qMV8HpGfd8l9E7kt5rnt1aJz0KEPChVoDOX0BsnG ji743QbxDb2LEbX2f/WMmlNIEbZG5vH979CsWA07rQhL9UQCo+j7qOvjrQvujg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gLzxN6PJpznxb for ; Thu, 21 May 2026 20:08:24 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c7a0 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 20:08:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Cracauer Subject: git: 03c410ba1724 - main - man: Stop referring to non-existing manpage strlcpy(9) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cracauer X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 03c410ba172426aa7f2a1cc19b94250686e5c8bd Auto-Submitted: auto-generated Date: Thu, 21 May 2026 20:08:24 +0000 Message-Id: <6a0f6638.3c7a0.152892aa@gitrepo.freebsd.org> The branch main has been updated by cracauer: URL: https://cgit.FreeBSD.org/src/commit/?id=03c410ba172426aa7f2a1cc19b94250686e5c8bd commit 03c410ba172426aa7f2a1cc19b94250686e5c8bd Author: Martin Cracauer AuthorDate: 2026-05-21 20:08:08 +0000 Commit: Martin Cracauer CommitDate: 2026-05-21 20:08:08 +0000 man: Stop referring to non-existing manpage strlcpy(9) Reviewed by: ziaee, mhorne, kevans --- share/man/man9/copy.9 | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/share/man/man9/copy.9 b/share/man/man9/copy.9 index 3a3105ddf644..fe51bbd12704 100644 --- a/share/man/man9/copy.9 +++ b/share/man/man9/copy.9 @@ -67,9 +67,10 @@ to another. .Pp .Fn copystr is deprecated and should be replaced with -.Xr strlcpy 9 . +.Xr strlcpy 3 , +which has a kernel-to-kernel version. It will be removed from -.Fx 13 . +.Fx 16 . .Pp The .Fn copyin From nobody Thu May 21 20:13:14 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gM02y4wkxz6dqjy for ; Thu, 21 May 2026 20:13: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gM02y40dkz3tSr for ; Thu, 21 May 2026 20:13:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779394394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A1v7Dne3LyXU3GooMjgOvWCgJY6tR2TNYqXfAe0R204=; b=sHBcj4mfE+ufWwLB7OQzKYz37YSzpFLmUJB3DnFI+OuEfaLkCnP8kMvMp4gD10kj9PZm0J /3n1iGxv3mfkzQRwJFMsBcwmA7Wk6F97jYgmMhHwCtjwBZJC8mLh8b1I3G92WoECcQo4V+ nUJIRbFzo7Yt677TZkjNPY2MkmYHNmGx918oliDFNi1SkY8LKJxJ4s+NIUg40Wp92tDpRI Klr1hyO9Z92qZFLvp7JfIFlSpgHBwWUSpeHBAV+L0DoxmVB13d0KAD1JgmwR3We1otp2In xWl3v5+7+lMmO5q8n60/FNhvwW3I4pBjgZATf4YydLNSB/yf2T8C0zCwzhzG8g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779394394; a=rsa-sha256; cv=none; b=xijw9k5WDFJ41jqokJzscx4I5G2q4IglCC2ElReqZMqttESPO5mx4Sn7ttY+1iOqmy+Byq LY3WhtEigaTpNuKlW5I6w9f4ncZizoDLDh4JqcGbfe4w80ijWBthkrmxlXeVh3f/ryLS7c jS/za7LcwJewEQafC8ejjprShODqtWIf5kIuZn73RfFJVj4LLyNPDz/u99fzxi0bJeHXXC aKTrt8rHoHAj2oMtrs1PFXorxriT8ybqRWjqo955OUh+ICEFr+fH1TP5Hrn/GFXaJyqic9 17Kkqe8hEM8TTzgF+c1lK8F8WNhWlceizXormTSsnEwemOqIJKdz5GA6HCOsnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779394394; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=A1v7Dne3LyXU3GooMjgOvWCgJY6tR2TNYqXfAe0R204=; b=oSnty/5+dDyPhJ57BUbkjKn4Zbc18tyardwW9LUdcT98N0yxvYryWkbSbOJtzmTYfqWUOs dFqwRnRrKuFP8De7bHI5C46/fQwcitH0Co3cW/TVA98PKtMaNifAh6z2GhJQ1Q8khvlftu 4+E1W32yVfAM5vHqNMm7Z4hqzp3TNlm6+jGRl5ZcBmjg/AkMr9aBpC4YIZs5EZj61ld0xA KnRwa+8YCmJn9vwU/ttJyuUAEKRFdo4KHBjoBr73bWhXFkJmjT+i0kxxYBDZTlWtDDmUmZ H6IfJ+0ZynQ6jUMVjFBlZcM1Zmz8miiJxzZbGPZ3iUenk6c9BJ3GBk5mWY2BuA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gM02y3Zk9zpHW for ; Thu, 21 May 2026 20:13:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d507 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 20:13:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: ace4a3e177c0 - main - vn_lock_pair(): handle the case of vp1->v_vnlock == vp2->v_vnlock List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: ace4a3e177c0da5efd9ceee0d9f46068562e3f5e Auto-Submitted: auto-generated Date: Thu, 21 May 2026 20:13:14 +0000 Message-Id: <6a0f675a.3d507.1d2e5099@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=ace4a3e177c0da5efd9ceee0d9f46068562e3f5e commit ace4a3e177c0da5efd9ceee0d9f46068562e3f5e Author: Konstantin Belousov AuthorDate: 2026-05-16 23:19:50 +0000 Commit: Konstantin Belousov CommitDate: 2026-05-21 20:11:47 +0000 vn_lock_pair(): handle the case of vp1->v_vnlock == vp2->v_vnlock It is not enough to check vp1 == vp2 to detect lock recursion, since vnodes might share the locks. This might happen for e.g. stacked filesystems (nullfs and other), and for FFS snapshots. Switch from checking vnode equiality to check v_vnlock equiality, and recheck the condition after vnode relock since reclamation or otner parallel operation might change the vnode locks under us. Return a value (not really an error) indicating the case that vnodes share the lock, to simplify the unlock in caller. Reviewed by: jah, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57035 --- sys/kern/vfs_vnops.c | 32 +++++++++++++++++++++++++------- sys/sys/vnode.h | 2 +- 2 files changed, 26 insertions(+), 8 deletions(-) diff --git a/sys/kern/vfs_vnops.c b/sys/kern/vfs_vnops.c index 15704634ff62..1aa20954e4bd 100644 --- a/sys/kern/vfs_vnops.c +++ b/sys/kern/vfs_vnops.c @@ -4354,9 +4354,16 @@ vn_lock_pair_pause(const char *wmesg) * Only one of LK_SHARED and LK_EXCLUSIVE must be specified. * LK_NODDLKTREAT can be optionally passed. * - * If vp1 == vp2, only one, most exclusive, lock is obtained on it. + * If vp1->v_vnlock == vp2->v_vnlock, only one, most exclusive, lock + * is obtained on the vnode(s). The function accounts for the + * possibility of vp1 or vp2' v_vnlock changing while the + * corresponding vnode is unlocked. + * + * Return values: + * 0 - locked, two unlocks are required + * EDEADLK - locked, vnodes share the same lock, only one unlock is due. */ -void +int vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, struct vnode *vp2, bool vp2_locked, int lkflags2) { @@ -4370,9 +4377,10 @@ vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, MPASS((lkflags2 & ~(LK_SHARED | LK_EXCLUSIVE | LK_NODDLKTREAT)) == 0); if (vp1 == NULL && vp2 == NULL) - return; + return (0); - if (vp1 == vp2) { +recheck_same: + if (vp1 != NULL && vp2 != NULL && vp1->v_vnlock == vp2->v_vnlock) { MPASS(vp1_locked == vp2_locked); /* Select the most exclusive mode for lock. */ @@ -4385,20 +4393,26 @@ vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, /* No need to relock if any lock is exclusive. */ if ((vp1->v_vnlock->lock_object.lo_flags & LK_NOSHARE) != 0) - return; + return (EDEADLK); locked1 = VOP_ISLOCKED(vp1); if (((lkflags1 & LK_SHARED) != 0 && locked1 != LK_EXCLUSIVE) || ((lkflags1 & LK_EXCLUSIVE) != 0 && locked1 == LK_EXCLUSIVE)) - return; + return (EDEADLK); VOP_UNLOCK(vp1); } ASSERT_VOP_UNLOCKED(vp1, "vp1"); vn_lock(vp1, lkflags1 | LK_RETRY); - return; + if (vp1->v_vnlock == vp2->v_vnlock) + return (EDEADLK); + VOP_UNLOCK(vp1); + if (vp2_locked) { + VOP_UNLOCK(vp2); + vp2_locked = false; + } } if (vp1 != NULL) { @@ -4469,6 +4483,9 @@ vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, vn_lock(vp1, lkflags1 | LK_RETRY); vp1_locked = true; } + if (vp1 != NULL && vp2 != NULL && + vp1->v_vnlock == vp2->v_vnlock) + goto recheck_same; } if (vp1 != NULL) { if (lkflags1 == LK_EXCLUSIVE) @@ -4482,6 +4499,7 @@ vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, else ASSERT_VOP_LOCKED(vp2, "vp2 ret"); } + return (0); } int diff --git a/sys/sys/vnode.h b/sys/sys/vnode.h index 4fee025a93ea..41b5e21fb879 100644 --- a/sys/sys/vnode.h +++ b/sys/sys/vnode.h @@ -781,7 +781,7 @@ bool vn_isdisk_error(struct vnode *vp, int *errp); bool vn_isdisk(struct vnode *vp); int _vn_lock(struct vnode *vp, int flags, const char *file, int line); #define vn_lock(vp, flags) _vn_lock(vp, flags, __FILE__, __LINE__) -void vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, +int vn_lock_pair(struct vnode *vp1, bool vp1_locked, int lkflags1, struct vnode *vp2, bool vp2_locked, int lkflags2); int vn_open(struct nameidata *ndp, int *flagp, int cmode, struct file *fp); int vn_open_cred(struct nameidata *ndp, int *flagp, int cmode, From nobody Thu May 21 20:13:15 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gM02z6Pb7z6dqd2 for ; Thu, 21 May 2026 20:13: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gM02z54zLz3tSs for ; Thu, 21 May 2026 20:13:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779394395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iBswLW41NERxMh8NuW3L2Mb5MkT9a8B+xkwqKAE50Xk=; b=ncDLWRa16hgUBg6I+X8pFBPXfdJ8NC9L7UwCPgLfQzg2c5sQcODAIR1h+njkF4fWh7HYx0 LL0uf8BmVJL4Cp6jAM0qqQ7ddiDI1KNOmA4ad7aYVg51Xmz8js4NR1+lwhGYlSJAczVwYU NPsZpiRjBpbKxOdfdW1gUsqpGMxnTdYCzz/H7VAtP+LSNHJQJbjQAAhlCfA1De8KBZTtgT sYPQUcZSmvwRj2tjKLZxQZeQMGtlELnLqNNg81NxttjEOsu7xin32xHk3oJ9xFdzWkSmLR BzqxPnrXaFI2nwzR9j1vjDWfAZ1+I7kgv3jD77lwiX4yZGg4eDkOkOR0L/lnQA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779394395; a=rsa-sha256; cv=none; b=WYCgw7SXgyrfRFgT4Ux09KVkI7XX94Mgp6HyDaUGLQT0CzELdpc80ExVkmbTd69DmQdKuG CDBLoRnbLPfAAD0n1vaYR4aKf+be7hsTsKeDwLhfcgkbKjcQLqOJGMVYtrDLwhqJrl1OY7 FQjKHnYjx39J54MreXm7QKU1EPxMKQcfhTi2ejMLuG6KbgWq26ko+R52E0uolCaxy9kVX7 MWjukFHaK8YdCRfIGyYLurWMU9cdarZHaPhmb9pIZuqkXKP0o7VfwJN3JqJ/uVSfbd9jFL sVchvFxFMgPrqqzIrDpYL7FtDI7hcFJ79+qFA9tdb3Wf1MH53DoJTB1yjLbtdA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779394395; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iBswLW41NERxMh8NuW3L2Mb5MkT9a8B+xkwqKAE50Xk=; b=kZmLas6dr9Og6Z8kAwEu3cZKjp6+i+Yv8QvnlAR10oUX5veJPlj1pAkT6RNp20fLmBPddM Axx8IoEpxrcO0MLF76BnTH87wfxItjMJSGJv1LGnO6o+WnpQI+IZRTGLxkjN+foLVZcnKX NlYi8zkILB99Z2Ur8BCez/Aij++JIOOquj3tEH9mTzhf3njNdwTo5RHZTyDQT8vtGlhqq/ w4cPoRy9bPFSjiLJj53LeBd6m8HQs2+IvuKwkV0jXtQLFXd+De3d9EugfyPdyYFqk+1Ucy QAcKW43PU+qabESWwH6UH3Jqf+e2awyhBL9YGAQi/iQkTM7di/Z2RmuByhc51Q== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gM02z4RJHznyj for ; Thu, 21 May 2026 20:13:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b8e4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 20:13:15 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: f5433e784078 - main - vfs_domount(): handle the case when vn_lock_pair() only locked once List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: f5433e784078ee139a37eb43ffa1d9e0e1f4f217 Auto-Submitted: auto-generated Date: Thu, 21 May 2026 20:13:15 +0000 Message-Id: <6a0f675b.3b8e4.4b84e032@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=f5433e784078ee139a37eb43ffa1d9e0e1f4f217 commit f5433e784078ee139a37eb43ffa1d9e0e1f4f217 Author: Konstantin Belousov AuthorDate: 2026-05-17 21:27:52 +0000 Commit: Konstantin Belousov CommitDate: 2026-05-21 20:11:55 +0000 vfs_domount(): handle the case when vn_lock_pair() only locked once Reviewed by: jah, markj Tested by: pho Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D57035 --- sys/kern/vfs_mount.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/sys/kern/vfs_mount.c b/sys/kern/vfs_mount.c index fff05a627162..d7e6683e0446 100644 --- a/sys/kern/vfs_mount.c +++ b/sys/kern/vfs_mount.c @@ -1292,7 +1292,8 @@ vfs_domount_first( * Use vn_lock_pair to avoid establishing an ordering between vnodes * from different filesystems. */ - vn_lock_pair(vp, false, LK_EXCLUSIVE, newdp, false, LK_EXCLUSIVE); + error1 = vn_lock_pair(vp, false, LK_EXCLUSIVE, newdp, false, + LK_EXCLUSIVE); VI_LOCK(vp); vp->v_iflag &= ~VI_MOUNT; @@ -1302,7 +1303,10 @@ vfs_domount_first( TAILQ_INSERT_TAIL(&mountlist, mp, mnt_list); mtx_unlock(&mountlist_mtx); vfs_event_signal(NULL, VQ_MOUNT, 0); - VOP_UNLOCK(vp); + if (error1 == 0) + VOP_UNLOCK(vp); + else + MPASS(error1 == EDEADLK); EVENTHANDLER_DIRECT_INVOKE(vfs_mounted, mp, newdp, td); VOP_UNLOCK(newdp); mount_devctl_event("MOUNT", mp, false); From nobody Thu May 21 20:15:08 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gM0583dbDz6drDm for ; Thu, 21 May 2026 20:15: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gM0581Vbsz3v8R for ; Thu, 21 May 2026 20:15:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779394508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CVtikFwmoa9uTsCKyAYWyG3USVjqyewKvuq742tI+sI=; b=fzBWTDhOD7FWj+yB2yb63rc9F5hmUS99qq8riZ8Wwq9D2DEl3bMAEuOCS2gGguSYxh8DNe nXrMBGPotQp7cyHn3UG/t7LCSdbfRSkHxk8JCpNpZWURSSp0073D/cTVlO7zUkKel3ojWG g+wB8VdRekXPwcmV2QVFHBq2t4ghKZ3Lk3iyigmtXIGxGtVJZlEVGOwWIErmm1iwBR7rKJ ccm7SqSRuQzPnhBsHYwBkL403yOFsRJty/fdSolsnDotB9BwbiN/qwrGekEPsJgYTt94oN CE18OPcpOrG0IPKG83nal5WwK8bC2zNALjHliWODsm+mVuXQRNAYkbfvNtpnpA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779394508; a=rsa-sha256; cv=none; b=THRS+3BGxFXQblknoH/y5iOeM5wEsGMsBcmdH21fXX4Z4FaVeIn5DaMxQ7x01MrWymlKes 4KbdF1P7pUh+8TPHIKmQaBkP0z1ZMZ1kUqNhY0MUicCfXY3gT7Pzst2M/71ONWyFdG85uu s/1xuYumbqKrKusNeyLmjnT/V/9W4glqaQtHLRqHKAI6qUQ0kbjQambtU2DjlpLTKDEKCs k9uSbIXGGmio/RLzndZwWSqyHi8k2ebU3D2DpggTpnyD1u7VKlE9YIGzHAnMi5EkWNVw05 IARQE1VTFV+sWh2POmLymabcnl05haTCj4oXao/dx1lw75Pt+G1CHwfVF8AuPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779394508; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CVtikFwmoa9uTsCKyAYWyG3USVjqyewKvuq742tI+sI=; b=W5R7bBKllsC/cSiRK+IEpfgU5sQB6JVkjYF5dqPKiW4FhlA8Xsnym++tDTReqP+iLISqzp RPGUhKhewZkG0UjKKYSkxfDlfF2O/g2DwcHKQEHAWrZgMkVJD8c4bKMeJ9nW9knQ6pwYx3 2kMd3Kw68q4x7WzSYw0e2xpJvATN83gq794i1nCA+Gqa6oEfBFHjUFiv252MwdFzunYxvd bRH4kD5nT7uOUeimizhmqaH61pqtsq4V5aOFoo9sRcJaDNUJgQN5MLRMzrtafwUPMr/+w6 sNAJRxnepbfRheDA2i2YhX/hjfnydiilid6vQwPr9DiJ+Jgiu175+1mRa1FdBg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gM0580zgKznyl for ; Thu, 21 May 2026 20:15:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d50b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 20:15:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Joseph Mingrone Subject: git: bc2055b94576 - main - sbin/devd/snd.conf: Add missing -n options to sysrc calls List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: bc2055b94576078453b372f537ef40bc4e3c18e4 Auto-Submitted: auto-generated Date: Thu, 21 May 2026 20:15:08 +0000 Message-Id: <6a0f67cc.3d50b.42039f4e@gitrepo.freebsd.org> The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/src/commit/?id=bc2055b94576078453b372f537ef40bc4e3c18e4 commit bc2055b94576078453b372f537ef40bc4e3c18e4 Author: Joseph Mingrone AuthorDate: 2026-05-21 19:43:05 +0000 Commit: Joseph Mingrone CommitDate: 2026-05-21 20:14:45 +0000 sbin/devd/snd.conf: Add missing -n options to sysrc calls Reviewed by: christos Fixes: 70e27ecba518 (virtual_oss: Introduce virtual_oss_default_control_device rc variable) Sponsored by: The FreeBSD Foundation Pull Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/36 --- sbin/devd/snd.conf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sbin/devd/snd.conf b/sbin/devd/snd.conf index e2dc6d94a299..3fc1cb9f0b0e 100644 --- a/sbin/devd/snd.conf +++ b/sbin/devd/snd.conf @@ -8,7 +8,7 @@ notify 0 { # Other audio servers or device switching commands can be used here # instead of virtual_oss(8). action "/usr/sbin/virtual_oss_cmd \ - /dev/$(sysrc virtual_oss_default_control_device) -R /dev/$cdev"; + /dev/$(sysrc -n virtual_oss_default_control_device) -R /dev/$cdev"; }; notify 0 { @@ -19,7 +19,7 @@ notify 0 { # See comment above. action "/usr/sbin/virtual_oss_cmd \ - /dev/$(sysrc virtual_oss_default_control_device) -P /dev/$cdev"; + /dev/$(sysrc -n virtual_oss_default_control_device) -P /dev/$cdev"; }; notify 0 { @@ -30,5 +30,5 @@ notify 0 { # No connected devices. Disable both recording and playback to avoid # repeated virtual_oss error messages. action "/usr/sbin/virtual_oss_cmd \ - /dev/$(sysrc virtual_oss_default_control_device) -f /dev/null"; + /dev/$(sysrc -n virtual_oss_default_control_device) -f /dev/null"; }; From nobody Thu May 21 20:21:11 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gM0DN74sVz6drcG for ; Thu, 21 May 2026 20:21:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic301-22.consmr.mail.gq1.yahoo.com (sonic301-22.consmr.mail.gq1.yahoo.com [98.137.64.148]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4gM0DN2lpyz3x8h for ; Thu, 21 May 2026 20:21:24 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1779394876; bh=OiBNytJ5wxSfxnzrG0kMb3yh7vlyBWOWkfUzopc09kM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From:Subject:Reply-To; b=ruLuKi+r+3gGE5V0yb8uKrYF76lI9g8WfMsgVQpYFNLrjiDR1en34dtIcevzzE6vPoQ4s7zbUVXmYG+tl9xB9zX7mmGyu8O9YM8wyVGhnxWLTmQFm9/xOU7sjJvcmLAPfs9ryUiq5mxlaFgEeQrqo2jzSGBR01s/ZEJWCy6SWYsD54tDkjU2jvBKY5SBBZFYBgDevBANpoVSHRBWC8vqo6Aj5anf8O2xqu+EUTxDqtD7Ats0ZIjXH1oIrUrvhhFW7kPiAaG46HNPh9kfNCQtev6f4t7T1dGJGM/zb37W0I6rjOhIkkivC/yjI1lOaoan/TIIlP7DoqD9ryikbhUcUg== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1779394876; bh=Rwt/rbxE3MA9Gt1+TWirJJ7pCVRKDJrHBDAOGOeIXQ2=; h=X-Sonic-MF:Date:Subject:To:From:From:Subject; b=ZrkvE4Dr/fVRD2+hNFnuQAsDNEIwxYxVclMTZvAgjRtFgP/tlfbQTJwz6egt4H2Vd8xtdSV5AqY8n41O3aYehHUKuq6Q7PkrQxIBJarTgCqVj5BZA8JfNhaSmKdr0Q2d3uORrNoCL+RPp+ZON9Hk2Q9n4eFiY8FUZp2f2K7tVnB354GqcwnbTUIBiwy0rfno/NlvDUuWxI/Tb2DxwZoeipcvU+peHiRXsPYhzTJNEzGmCMeh963gvD1mMLomn3WC/Gu3CwPguwbhV79SfcTBwVW+AWl1JLMUwTDSmEnwkfzx4Hgmy23zbtwBR2wzjfDwDVlnrOyGG6kuR2ayf2l/eQ== X-YMail-OSG: 2sjVIIwVM1nvH7hYmFB.YiQI9tjt.gJkPZpMeY9_gzIbSZjltihhvuHY4Gnqxg. 9r2BO33BuwFF6tYZ7t.ruDMYAi_IY3et1zbwzBll0_RTmoASlv1e_SLYzjDeojmHGocFNDIG3bBU VZQVEoJmH32ohPZffyHtkLBgpeLBF5LRVSie.xBFRXpNuAHGkeTV2MU38zG9DmIuP9iPjlJ40rFl Rw_UZv4mLPhMGCJDqN4pwCwP0WSG1poJuzAWmvU64Rz22fY7HFULhkNxu_D1clr2wk3BFoC2jNzZ Wz6holUB1BBk1aG498o.RSVcqLLGckVJE7jICV2hgF7x6l1skY0BFE32pL4ANk7EetD0Tf.J4grm ES5m3hIEMguCtx49bu6UyzEn9te3.0Mor7Oa_WFy71npJaXG_ydLpV.Zp.JxyFEjmDUsFweva4sV m000pbNpq6DV1JKduzYI_Z3I4SC.G1uSrAYMeicKttalDQ5_v2lvXtllSOLoJFS0sSXkNHp3nTXg .1mrN.6R9129T_ytbsYoshKlhlu8Z2SzgDQ5R1cre2Eb24AbiQ_tLSmDFHjZDNk1ZOQg1uKMDPCi ytcM0dNaJ9NLDb639p3OtXiaURxCith.9vVY86gVrjKhuara9C7wAU0C9Tq8Htgdts3czT0mGjkE uoUMLmIVmliM.W3aDuPHambDQVMOAJK8am75Qqk8z1LK8sD0XKEqsg2l3seCvAQcnRG33.cdO9Vy xaSfnW7d2MARrf4_lj2oDuhmxWmUpp7KSpZkGYr6hczFXOIn4bXcDbgfPSbxS81C1fPDcC1qZH4w yhpquw.03B1mPcPjHKMhmP6qALoCIcy8mGbcWL2Fne6_VtASjA1.F7PONTiEtDj7R2fQFZicwD6K 8veEWXGa3XVYQgt4UsDwfkbW9yZwlxSWhdP22UyP5DJSj0QAPkbaVa0uV22acycedUyWcQs1rsbp KvjBUrhawLJQotmbD4mfrYJWxn51wXEUqCjJDTmoqotfbxCoaZDtbmw8dGzrW.IEmnb7EgmK47Ha SRmjx.r_mdKJvC9ziNV7tXd3uQDLiqSy3t16hPwkBzcP6fAuQLao6WhmSAWQATKX_1g9kNgygUet ca2bdf5LYEgAMLwV.QWC5jtHWic9SRl6RTGXJFu8tHuB2wO99I6U2vaaf5Uc8uDUwoVApSsoGITg X4xdhYvDJBR6viV9LidA9JVIEAp5ctN3Mb3nRAM9q6KPDw0kZjMoUEPg8iSMCtZlOfzDp4oqNDaQ pu7J3EXBtrRH2fWNX9ROK_a51KIDR2lI4Jlr0YGL5HLvj8DH9EkKmccRXZz9Xj0YT79t3KgeYrNG j_WrUzBEDEoQN9ZkK0og8giGvlqZ2Iw5CF6.dzFtXiuP2fAQ8YGgd.9.NL202v1.UPqYm67Qt0Dd tbrhtINmqK2WQJrycxxD8tLcWHW8bovaVT2G3FU.AWuQ.LG1owlCk9bAQBejMfMiQk56uG50eZHu m_IHRjsYSwpP_gB.K_0Hi6NZqGStHsdl.qDusJOJVip1fRNyLEPJr_F_T.xgEtoyBXePfEnL8ya7 qarNvximwyFh_Z88fUDKSHO_lgfJUS1q.PeCHJ7PHa9JoPevvw6wJxc1wXjkWPqDfUWmyUkx6QdX pW08GhvhbxA4RBuS__Cco5i_vl2xXK.xELU3B_omI_fxd8RzDCDvguLp_JNyddjQ4JaUid0p_iGS dMihIzHsu4Y88_s7jduOR_AhuGs9fMiIYhaQGQVdgarqXhbXz0dp6iV7IX5r2zo39ZHS9KpFOfFq OxzgcSq.JhXm6IiO71b2wpt.ilqgT7SP7GOHGL1evc5CqPUI44wD75jbK4a3h3OPz3THN_.GftsD KQWuS2u06fvkctNUmRjl.5rVjvWJh6wui4lMOca4rkux_7psOuE0GoyrRChcl1V5SmMT8UE0Omva ZEniGFGLb_LaNrQtPoQ7t6o0A8k2_uz4XMN5fScM2mlBUACzN4Tc5exB6deiFFyI4SQD3jfpbLIf ALkauPvAqxzVQMDzKtD_ZmIu7ylkUxJ7w2PjnpLOpsp_smNrXAT1jtwwgsbrRBQd1nUVEs8ouYap UJb0pa4mw_r3Orxfy.ZC_0txts4c_dkuvLj2PFg6C5B.2l4bv635.xyvOwkB8HVj6ZukYN1UARfd x9Fj8znqFy7phtqnpLb1jt3r7IHoxKZnKxP0eA1jigIwSz9LHb0bR3bZewU42VORhPpmAxV5YuM7 Tp5wZ91CvuAzMl8cEtd1p.kvhEitK8o0nieEvCZbLSsE6RbG75PVfDpZum3knAid1tB9ubs8o.vr WQhXMt94GoZAhqYY__rdTMprz1yO1uiuik7sNf.Cf27jhglRQGNk- X-Sonic-MF: X-Sonic-ID: 34827c72-eecb-4003-91d0-3ae2b942ea22 Received: from sonic.gate.mail.ne1.yahoo.com by sonic301.consmr.mail.gq1.yahoo.com with HTTP; Thu, 21 May 2026 20:21:16 +0000 Received: by hermes--production-gq1-7bb7df5c46-c2zcp (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 592a36ae2923a42f47e24dfbd6fe8300; Thu, 21 May 2026 20:21:11 +0000 (UTC) Message-ID: <6f82ab2f-b5da-429f-84ed-4d5b7af5f5f0@yahoo.com> Date: Thu, 21 May 2026 13:21:11 -0700 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 4dd97955e68d - main - libpkgconf: Fix paths To: Nuno Teixeira Cc: dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org References: <69ee1653.34850.61462b24@gitrepo.freebsd.org> <24a05f73-84a3-480f-b797-e0688753810c@yahoo.com> Content-Language: en-US From: Mark Millard In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailer: WebService/1.1.25725 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Queue-Id: 4gM0DN2lpyz3x8h X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On 5/21/26 11:18, Nuno Teixeira wrote: > Hello, > > This change doens't honour PREFIX when it is set to other path than > default "/usr/local/" As I only had noted an unexpected year in a date when I read the original and replied about that, replying to my message instead of des@'s original message is a little odd. But, in response, I did post a question to the review of the original https://reviews.freebsd.org/D56404 ("pkgconf: import into the base system"), asking: "What is the relationship of this type of change to use of ${PREFIX} when ports install themselves and it is not the /usr/local default value? (There is also a linux compatibility related standard default for PREFIX and folks can specify things like /opt .)" I referenced you and your message. > > -CFLAGS+=       -DPERSONALITY_PATH=\"/usr/share/pkgconfig/ > personality.d:/etc/pkgconfig/personality.d:${LOCALBASE:U}/etc/pkgconfig/ > personality.d\" > -CFLAGS+=       -DPKG_DEFAULT_PATH=\"${LOCALBASE:U}/libdata/pkgconfig:/ > usr/libdata/pkgconfig:${LOCALBASE:U}/share/pkgconfig\" > +CFLAGS+=       -DPERSONALITY_PATH=\"/usr/share/pkgconfig/ > personality.d:/etc/pkgconfig/personality.d:${LOCALBASE:U/usr/local}/etc/ > pkgconfig/personality.d\" > +CFLAGS+=       -DPKG_DEFAULT_PATH=\"${LOCALBASE:U/usr/local}/libdata/ > pkgconfig:/usr/libdata/pkgconfig:${LOCALBASE:U/usr/local}/share/pkgconfig\" > > Please see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=295439 > > > Thanks, > > Mark Millard > escreveu > (domingo, 26/04/2026 à(s) 19:08): > > On 4/26/26 06:42, Dag-Erling Smørg rav wrote: > > The branch main has been updated by des: > > > > URL: https://cgit.FreeBSD.org/src/commit/? > id=4dd97955e68df02b26d59e4e7c9a8167947a5164 cgit.FreeBSD.org/src/commit/? > id=4dd97955e68df02b26d59e4e7c9a8167947a5164> > > > > commit 4dd97955e68df02b26d59e4e7c9a8167947a5164 > > Author:     Dag-Erling Smørgrav > > AuthorDate: 2026-04-26 13:41:47 +0000 > > Commit:     Dag-Erling Smørgrav > > CommitDate: 2026-04-26 13:41:47 +0000 > > > >     libpkgconf: Fix paths > >      > >     ${LOCALBASE:U} evaluates to exactly the same thing as > ${LOCALBASE}. > >     Presumably what was meant was ${LOCALBASE:U/usr/local}. > >      > >     Fixes:          b8352da33f34 ("pkgconf: import into the base > system") > >     Reviewed by:    khorben > >     Differential Revision:  https://reviews.freebsd.org/D56642 > > > --- > >  lib/libpkgconf/Makefile       | 4 ++-- > >  tools/build/depend-cleanup.sh | 4 ++++ > >  2 files changed, 6 insertions(+), 2 deletions(-) > > > > diff --git a/lib/libpkgconf/Makefile b/lib/libpkgconf/Makefile > > index fee7f275d9ff..3cfb2172a00e 100644 > > --- a/lib/libpkgconf/Makefile > > +++ b/lib/libpkgconf/Makefile > > @@ -14,8 +14,8 @@ INCS=               bsdstubs.h iter.h > libpkgconf-api.h libpkgconf.h stdinc.h > >  > >  WARNS?=              3 > >  > > -CFLAGS+=     -DPERSONALITY_PATH=\"/usr/share/pkgconfig/ > personality.d:/etc/pkgconfig/personality.d:${LOCALBASE:U}/etc/ > pkgconfig/personality.d\" > > -CFLAGS+=     -DPKG_DEFAULT_PATH=\"${LOCALBASE:U}/libdata/ > pkgconfig:/usr/libdata/pkgconfig:${LOCALBASE:U}/share/pkgconfig\" > > +CFLAGS+=     -DPERSONALITY_PATH=\"/usr/share/pkgconfig/ > personality.d:/etc/pkgconfig/personality.d:${LOCALBASE:U/usr/local}/ > etc/pkgconfig/personality.d\" > > +CFLAGS+=     -DPKG_DEFAULT_PATH=\"${LOCALBASE:U/usr/local}/ > libdata/pkgconfig:/usr/libdata/pkgconfig:${LOCALBASE:U/usr/local}/ > share/pkgconfig\" > >  CFLAGS+=     -DSYSTEM_INCLUDEDIR=\"/usr/include\" > >  CFLAGS+=     -DSYSTEM_LIBDIR=\"/usr/lib\" > >  CFLAGS+=     -I${SRCTOP}/lib/libpkgconf -I${PKGCONFDIR} > > diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend- > cleanup.sh > > index e9c02d015368..c186c39a3448 100755 > > --- a/tools/build/depend-cleanup.sh > > +++ b/tools/build/depend-cleanup.sh > > @@ -317,6 +317,10 @@ check_epoch_and_opts > >  #          "$OBJTOP"/tests/sys/kqueue/libkqueue/* > >  #fi > >  > > +# 20250426 # libpkgconfig contains incorrect paths > > 2025 above is a typo? > > > +clean_obj lib/libpkgconf personality c pkgconfig:/share > > +clean_obj lib/libpkgconf pkg c pkgconfig:/share > > + > >  # 20251219 # libkrb5profile is now internal > >  for libcompat in "" $ALL_libcompats; do > >       dirprfx=${libcompat:+obj-lib${libcompat}} > > > > > > > -- > === > Mark Millard > marklmi at yahoo.com > > > > -- > Nuno Teixeira > FreeBSD UNIX:     Web:  https://FreeBSD.org > -- === Mark Millard marklmi at yahoo.com From nobody Thu May 21 20:33:05 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gM0Ty6DNTz6dtPc for ; Thu, 21 May 2026 20:33: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gM0Ty5hs2z43Sn for ; Thu, 21 May 2026 20:33:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779395590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eivm9rhxFg7UZHXe1C2J29hY7lviTjK9IJg9tvjvabI=; b=V+jTZ2D8GhHZs9Quqx1iDpAdij2M559fYHZ8SPSTNuWBCpbbx0tsSlygRZ1xYRrx2aAknM LXBKvG28qMvHVIpwY/aP0mGYYOInaR9Aq94lfXjtopZs/pP085Qt3ZgnXsAtzwlULlgC0M qx/Ji4VN1xQmXt0u1SeGCKtOXyydPQYM22m8By/wfg8ePTyML9MYOcKhOSIWIN4sr0806A 0nFZxu8L+hwe6zSWu7WwPoo4ZM/SUEGQCz78mq13vmehDRkhAsI1gDaDPRmhWYrlcdYk6a XoDykwAYK30rAvUNpfb+ph1zGbVK/+Wf0A9h7xT5RjREEDOVgKhxizRSdJaGxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779395590; a=rsa-sha256; cv=none; b=fJvVzBuuJ2RWb+GXkDC1DOZENDTPCrxYcMtQHrBy55oXsY7QM0ihav0BsGEBCqnkEQx3/U FMzTAXqtjKcVrRmrLWjcJAVxSAEl/bcrHhdMXYlVlUyMKXb95dbxyZvxq1Dbuz6e6+Ylws DXpQcZheRbIqRQ6ASJ9zCq4fLf5NfqZgWd94FrMb0H3uc6mDlTd1xgylclZI5WvyiVNq1C MwCKBISFSBUfD3XZi3B99OBJ8UVpGiUje6rWPrEsaA1TmKu32BSAc+Bsn65BMiWUJxFNMP vEKlWoS+MhpPibI008ClGBUVpBPARnB7zGlYVHl8kLmAAafqP71dZrrbHXqkxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779395590; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eivm9rhxFg7UZHXe1C2J29hY7lviTjK9IJg9tvjvabI=; b=p9qhB8DB6LTHDJLOmJJ1a1EVePOPy5tD1C2QbEQibNCovO5WWjb6nUqRyLWVAgMJOpA74j j8vJoR/MaP3aqgbuwWAdctSa5yMko0I8pbrKoLZBIqCfj2vLKtN0FpcLPk3Mup7J2bNW72 nZcDTfUV99ziVewz+2CXF9Fcg1qRrcZ13XbjRQlX0t7sAOPZPth57+xOczB0DiHbBCWpEI ZgLs09JqbQWhOANOIP9gl4Lqtusup++9cDPSmPXS0oytaZ5eGmElrM2rsYM36+Sk+PSKIb IDJRStVYNgQgpp7CF38J3zOazU+CA/vvlE8tjMeYaVicsv+CukfU/gGDiRKdkw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gM0Ty5JWBzp5N for ; Thu, 21 May 2026 20:33:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d9fc by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 20:33:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Olivier Certner Subject: git: ad3d7666e00b - main - BSD.tests.dist: Add the new sys/mac/do directory List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: ad3d7666e00bb0261dd2b80f5f2d56ceeb84aba7 Auto-Submitted: auto-generated Date: Thu, 21 May 2026 20:33:05 +0000 Message-Id: <6a0f6c01.3d9fc.d3061ad@gitrepo.freebsd.org> The branch main has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=ad3d7666e00bb0261dd2b80f5f2d56ceeb84aba7 commit ad3d7666e00bb0261dd2b80f5f2d56ceeb84aba7 Author: Olivier Certner AuthorDate: 2026-05-21 20:18:19 +0000 Commit: Olivier Certner CommitDate: 2026-05-21 20:32:16 +0000 BSD.tests.dist: Add the new sys/mac/do directory Without that, 'make distributeworld' fails ('make buildworld' and 'make installworld' do not need it). Fixes: cba191e291c1 ("MAC/do: Add basic tests on setting rules") MFC after: 1 minute Sponsored by: The FreeBSD Foundation --- etc/mtree/BSD.tests.dist | 2 ++ 1 file changed, 2 insertions(+) diff --git a/etc/mtree/BSD.tests.dist b/etc/mtree/BSD.tests.dist index ae10c6ecec38..b6c415e9e789 100644 --- a/etc/mtree/BSD.tests.dist +++ b/etc/mtree/BSD.tests.dist @@ -894,6 +894,8 @@ mac bsdextended .. + do + .. ipacl .. portacl From nobody Thu May 21 21:20:05 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gM1X51rblz6dyxX for ; Thu, 21 May 2026 21:20: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gM1X51P67z49v5 for ; Thu, 21 May 2026 21:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779398405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c3xfRQE63F3Wr3vXcyEzl8MfgEBWbEt0m92YAPUJmUQ=; b=vUdfGoYk4hgvxXc6/aQuqf48kbWbx3rJ2zUT7V1LapTk+27RxnEBloBsq75PHrEvWVJlCt lQrs//qUXo8h+Rqneca9F81xCRi6ZvfgtInnnjouaO7/ik2xbJOunYTxpalkFzhj6icYGQ 3Lf4TgHd78QPCq5fb9N8LtLVH3S5JgYpJukVVr06mKv92cmz9wnq5LID7CxUh0bjDZUV7Y kraW0QyJkx9lBRIgSFLD0Lqur7TwE1ERLwkNfYhQtqmbJw03HiqHcjC9rSKgC3MQUQbClR CTS6P9gJpAOjd2NsFWWEGMNOcPsMsnFtmNxcUucnJpqnXPfwM+y4ftbJsibdTA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779398405; a=rsa-sha256; cv=none; b=k/JVUh51gFAfTFxo95lyjC4kx/sEX7tyR6+xZcpssxrFVHDunRAl46T3DB4FKaApLMRind PgTjK1lWnnDxUfS5fuomnPmkyelA4lcumlYV1zmxK0heyKAjG21EEmtsB8b3wor/xZw/pz nGwWodLSuffWbnLcnVMXj1kybXX4lrE5Pk1wGBl8o5cGlhKakihCYThFzPsOHc+hUtnmP8 uNnZBw9bTkS8JD02/9pyu1V//puPt9kNM+QoFx60CFjuYf49GG9NQRi4hFb0dRwtBnc2nN MIGSa6Ca9iJLFTk4mT1aFtW0OLoEWx8zmTWoCEcLqRY2eTyy4SMmVZNQkMkdiA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779398405; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c3xfRQE63F3Wr3vXcyEzl8MfgEBWbEt0m92YAPUJmUQ=; b=HQhyhcvGhhvK7oxeJj7QaNRUBGWz7rL4pC9uSr60q7b4Y8R0tVVAhfoIxX8ovpeo+KmltG z+7Hb/+evchc0R01X8q5xYivVSSB3HJkpZ1+cauObgk6i32H57GjvngSg7p8IJ5ey2Q1dQ wdCrHAMNKpELc0oWsGiE1DOMFpDlpVIkeWNb74hEq8hFTDZvPNS/kBGx2qUnGa57u53ukp ZJ4qzJcl91hc9WcS+0w/tTwwTgO/pPaCaBHrcfvAehCfdJCucofXxE7cj017UYfocUZE+l I3ra44hVOd/8VuYJnX7IQysr1O0f9ydpIht67Xk2iPT4vYKkfxjPhiHF6PBNoQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gM1X50pFRzqQZ for ; Thu, 21 May 2026 21:20:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d8e4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 21:20:05 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: 64327f769cee - main - pf: fix incorrect table decoding in netlink List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 64327f769cee0c26e1b81e6195a5092498b10403 Auto-Submitted: auto-generated Date: Thu, 21 May 2026 21:20:05 +0000 Message-Id: <6a0f7705.1d8e4.4e2eb214@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=64327f769cee0c26e1b81e6195a5092498b10403 commit 64327f769cee0c26e1b81e6195a5092498b10403 Author: Kristof Provost AuthorDate: 2026-05-21 08:13:24 +0000 Commit: Kristof Provost CommitDate: 2026-05-21 21:19:49 +0000 pf: fix incorrect table decoding in netlink We used nla_p_table for pfr_table structures, but this netlink decoder was intended for pfioc_table and decoded an extra field, outside of pfr_table. This allowed userspace to write (slightly) outside of pfr_table. Use a separate nlattr_parser for pfr_table. PR: 295218 Reported by: Robert Morris MFC after: 1 week Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/pf_nl.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/sys/netpfil/pf/pf_nl.c b/sys/netpfil/pf/pf_nl.c index d1beb7681c21..0e1c77864615 100644 --- a/sys/netpfil/pf/pf_nl.c +++ b/sys/netpfil/pf/pf_nl.c @@ -2189,7 +2189,14 @@ nlattr_get_pfr_addr(struct nlattr *nla, struct nl_pstate *npt, const void *arg, return (0); } -NL_DECLARE_ATTR_PARSER(nested_table_parser, nla_p_table); +#define _OUT(_field) offsetof(struct pfr_table, _field) +static const struct nlattr_parser nla_p_pfrtable[] = { + { .type = PF_T_ANCHOR, .off = _OUT(pfrt_anchor), .arg = (void *)MAXPATHLEN, .cb = nlattr_get_chara }, + { .type = PF_T_NAME, .off = _OUT(pfrt_name), .arg = (void *)PF_TABLE_NAME_SIZE, .cb = nlattr_get_chara }, + { .type = PF_T_TABLE_FLAGS, .off = _OUT(pfrt_flags), .cb = nlattr_get_uint32 }, +}; +#undef _OUT +NL_DECLARE_ATTR_PARSER(nested_table_parser, nla_p_pfrtable); #define _OUT(_field) offsetof(struct nl_parsed_table_addrs, _field) static const struct nlattr_parser nla_p_table_addr[] = { From nobody Thu May 21 21:20:06 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gM1X62gyFz6f09g for ; Thu, 21 May 2026 21:20: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gM1X629QYz3Br9 for ; Thu, 21 May 2026 21:20:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779398406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NlGeR3gxZHd/OHWPvbISIiiHK/Z4CbFcAa8LIxy+/K0=; b=oKmLNSa36Zea3cdeM3xb9+j7TUiGD5Trunr8R6dZQI8+lDjSD8F8IGjgICZkRkN9bpNcaA KeWWjGCxniMG986RrYn4buAe1OD7TL/hNx92/MJ2AdlWlC9GdDMWvJ2VK4vHl4VQxq4XoW wQOqijKrceEjhpOrV2Y1+rhM3JPHgfTKh0SrEi6KtSRdnL7YnE69ORWE7bEr3c5vUOar9Y xFwMNGq8byWU6Y6XGWoY4RTigXGy8Rxc+KmTBRlCikxvV/WOQn+x/l/aS9Ub7MCvaLxaRi bl5fJp7NS96lG8mBF9oJ7rcnZqTk8LCtIFaA/hhaAnxDZMNppKOmwY5Ehz0sbw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779398406; a=rsa-sha256; cv=none; b=jXhnHUdb6zZJJuJLmRxGVV07UwQob+cD+8/zxjNelTTlgPxgXfTaK/yJDl/ib9cQIKf2oW zHS6Px1/Hj5oR1t/0tpnVX4+RGdNJQQPlgiYkCyfhDfDD0Wd9jjImiz83L7jeDCnQbVQ6O F2MfHz25N5JPDs4sxTZ4g6Cq521pt170TroUT1K094kLhkYDH00JzY5VbXCMQh8E/vTcbE Od8++h3d5oQnyb7vQW1+3T+MN+2dlhnDjcVZSrnfbSuv9YYzWeP5ItFEKLVd2sOWlcsX/N HgA5fw8rgeJORAFy5VyZWXJDkmsmDqVHGtWwVGsfnATiClB6CNEmtXTdyc05kA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779398406; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=NlGeR3gxZHd/OHWPvbISIiiHK/Z4CbFcAa8LIxy+/K0=; b=RQiDBmlzucg8cC1ddMSzi3qQvxoBSPn+rGE8neorTn1towYfNJq/j3TG0FyVH7qV4chu05 wTnD2o5wD5I4u0qK7skDyaIfNsrR6ofywnHprsuneuSLrqNtP1H2f0ifj7u6dW5qT9mbO7 JUDxYOyrKsF/tZUv0iHwZMHUsPi2oqut15ffFMMP9ozJwkJb34tsmkS6Q5Vkda7brgTbsL diNAb7svSDGpOzo4mbawGjhtSulAdkBHrBHSYt+xjvui1Zlmap1pZkGajJmlmEwlah+UGK upkk2JpImdSp3Ufh175HkMd4/0IAj54jNL9WAzbMSYVwM8C/6PjnGFqIH53LvQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gM1X618S8zqp5 for ; Thu, 21 May 2026 21:20:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1d9ab by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Thu, 21 May 2026 21:20:06 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kristof Provost Subject: git: e4130ac13d2f - main - pf: switch to getmicro(up)time() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: e4130ac13d2fe9c17b8f8e86d39a7b5223fe7b79 Auto-Submitted: auto-generated Date: Thu, 21 May 2026 21:20:06 +0000 Message-Id: <6a0f7706.1d9ab.c2b35ef@gitrepo.freebsd.org> The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=e4130ac13d2fe9c17b8f8e86d39a7b5223fe7b79 commit e4130ac13d2fe9c17b8f8e86d39a7b5223fe7b79 Author: Kristof Provost AuthorDate: 2026-05-21 11:31:11 +0000 Commit: Kristof Provost CommitDate: 2026-05-21 21:19:50 +0000 pf: switch to getmicro(up)time() It is reported that micro(up)time() performs poorly in certain virtualisation scenarios. Absolute accuracy isn't required here, so switch to the slightly less accurate (as per the man page) get-variants. PR: 295043 MFC after: 3 weeks Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/net/pfvar.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/net/pfvar.h b/sys/net/pfvar.h index 4c57a605438f..533cb4f08283 100644 --- a/sys/net/pfvar.h +++ b/sys/net/pfvar.h @@ -2792,7 +2792,7 @@ static __inline uint64_t pf_get_uptime(void) { struct timeval t; - microuptime(&t); + getmicrouptime(&t); return ((t.tv_sec * 1000) + (t.tv_usec / 1000)); } @@ -2800,7 +2800,7 @@ static __inline uint64_t pf_get_time(void) { struct timeval t; - microtime(&t); + getmicrotime(&t); return ((t.tv_sec * 1000) + (t.tv_usec / 1000)); } From nobody Thu May 21 22:51:43 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gM3Z5659Gz6f9PJ for ; Thu, 21 May 2026 22:51:57 +0000 (UTC) (envelope-from eduardo@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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gM3Z55lDKz3mlt for ; Thu, 21 May 2026 22:51:57 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779403917; 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=n90pQDV4Bt7NuUKV8OrM0L8Yib14f+Mp7w6cCpkKXcQ=; b=N5uJ9SjKo3j4M0b5PRoS+NjcsueqBbIt+Q2gPknVLULUAdtomA3XzJlh8AfmrJQNRe6Sh9 MEQpKrYbbd8+Pxoc08FYu/3jWevMYr99CXRfSCcKO86e7raymUhMzClY5HujkgAJniKxMk h6GsvNWaTSYT3KEkHUokIDB5a+X8/i4VA3cmw5m15IdwPF9wai+wia2ZOQH1Y5Nle8vEKg Xd78iFJxx6gKBaYnQocgBHF+50ePFaVAY4I8gryY3GBMJJo2jY1OvfA01reiSv28ughg6N L8irFnCc2/dMyTVucyPCZOt+sOXpfyQdrpgbHPsrNIhFdsi042Os4kvfNaJN8A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779403917; a=rsa-sha256; cv=none; b=aGUM4HunOmtrZLp9/+xGufwP2BCTBDyFImV7wQc1e2e5lsbJ59HTHVUtnDV6GA3Uj80oLz pOi1tehGMbOzUv5+BG/AaqoMJ6H/EKk/ZQkB2tSlAUJwVBJyIUbn0xwAHKVCpVaUH8gYMV cfj4/cMDLTh9t4+rw0p9VXI7NemZQ8yRrKarZNr2piIfTlIjWgeQrUr5JMQuDqzdQ/R4cf DMTWfUUz/EQ9mzCRRCmkvqPAa170Q5QdTbFFJZwabhE6YcsHqjhOJGXlZeWo4RHj07Wdnt alPLmAaW3F/zTFqrCMB4BgWXMLVTvanqbcUcF8asbZPBouqXUIq6JHUy70jIMw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779403917; 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=n90pQDV4Bt7NuUKV8OrM0L8Yib14f+Mp7w6cCpkKXcQ=; b=aJNBUkFvLurcffZhFVPeyWd6ZUelTsHMiP4gYeHdR/uenptxbKHBvZBSw+ViqLtPaep+Qt V+onxvG/mQXqsh3fZxHulQeS04mIHURncImlPpBXbDhBIUyEW6N+qKFPnSQKEBEdNY1Da9 Qk0nKa+3b4tWODqmqeZJU0zw0MWjTKrKnbnwrixOrhMVpuJIfxFG5Y3ZKJq17Sh1VQisuG jK4NBSHvRuJW/u5CZaJzG2WsNr/0IFIxcsjLxVt2oYJRsszrzwFRHgSggpyGIFRpBKknXZ LT1h3YxjkzZD5UOWwh/q8M85BXNVoMsg3kL9dvjWubsayl/ziUKVfIEIGrPN6g== Received: from mail-lj1-f180.google.com (mail-lj1-f180.google.com [209.85.208.180]) (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)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gM3Z54j82zmcq for ; Thu, 21 May 2026 22:51:57 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-lj1-f180.google.com with SMTP id 38308e7fff4ca-393da0280d1so7947621fa.0 for ; Thu, 21 May 2026 15:51:57 -0700 (PDT) X-Forwarded-Encrypted: i=1; AFNElJ9EjO2l0ENTPYzOt7WM3PUk3EZRMrKFLK7Eu4qaYizeywBobPRNPy1TDNte1/X+wayrULCcgQ7I2cmtaFfoRGev1A/4qQ==@freebsd.org X-Gm-Message-State: AOJu0YyR60j6qlOxFrMvdEkbintt0dqTA4mAhHTxZPkb/+YtkDzhpF96 dxM64ySgXyxq7y5Rjk4eS26rh5fnr2qW4AkYV4VeqTLHtUDRozMcxRjwY/DynhTsHo8vHsbWVif 8pC2pgIZgvKDIl9bpCG4SuMCxsJ3W0PY= X-Received: by 2002:a05:6512:230d:b0:5a4:18cb:8850 with SMTP id 2adb3069b0e04-5aa323b2995mr88020e87.6.1779403916226; Thu, 21 May 2026 15:51:56 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 References: <69ee1653.34850.61462b24@gitrepo.freebsd.org> <24a05f73-84a3-480f-b797-e0688753810c@yahoo.com> <6f82ab2f-b5da-429f-84ed-4d5b7af5f5f0@yahoo.com> In-Reply-To: <6f82ab2f-b5da-429f-84ed-4d5b7af5f5f0@yahoo.com> From: Nuno Teixeira Date: Thu, 21 May 2026 23:51:43 +0100 X-Gmail-Original-Message-ID: X-Gm-Features: AVHnY4L4sEpYQB7Qudwqr1vS1Y7DZ9fJbodnv-yhYaf7lODlAXZC_XK89XWaxko Message-ID: Subject: Re: git: 4dd97955e68d - main - libpkgconf: Fix paths To: Mark Millard Cc: dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Content-Type: multipart/alternative; boundary="00000000000056b60106525bc2f6" --00000000000056b60106525bc2f6 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello Mark, Sorry for bad reply... I did take a look a https://reviews.freebsd.org/D56404 and noticed that ivy= @ participate on it and did open https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D295439 For what I see in PR is that uacme pkgconf problem is related to PREFIX set to pkg maybe related to pkgbase method when installing main or suing a custom PREFIX. Thanks, Mark Millard escreveu (quinta, 21/05/2026 =C3=A0(s) 21:= 21): > On 5/21/26 11:18, Nuno Teixeira wrote: > > Hello, > > > > This change doens't honour PREFIX when it is set to other path than > > default "/usr/local/" > > As I only had noted an unexpected year in a date when I read the > original and replied about that, replying to my message instead of > des@'s original message is a little odd. > > But, in response, I did post a question to the review of the original > https://reviews.freebsd.org/D56404 ("pkgconf: import into the base > system"), asking: > > "What is the relationship of this type of change to use of ${PREFIX} > when ports install themselves and it is not the /usr/local default > value? (There is also a linux compatibility related standard default for > PREFIX and folks can specify things like /opt .)" > > I referenced you and your message. > > > > > -CFLAGS+=3D -DPERSONALITY_PATH=3D\"/usr/share/pkgconfig/ > > personality.d:/etc/pkgconfig/personality.d:${LOCALBASE:U}/etc/pkgconfig= / > > personality.d\" > > -CFLAGS+=3D -DPKG_DEFAULT_PATH=3D\"${LOCALBASE:U}/libdata/pkgconf= ig:/ > > usr/libdata/pkgconfig:${LOCALBASE:U}/share/pkgconfig\" > > +CFLAGS+=3D -DPERSONALITY_PATH=3D\"/usr/share/pkgconfig/ > > personality.d:/etc/pkgconfig/personality.d:${LOCALBASE:U/usr/local}/etc= / > > pkgconfig/personality.d\" > > +CFLAGS+=3D -DPKG_DEFAULT_PATH=3D\"${LOCALBASE:U/usr/local}/libda= ta/ > > > pkgconfig:/usr/libdata/pkgconfig:${LOCALBASE:U/usr/local}/share/pkgconfig= \" > > > > Please see https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D295439 > > > > > > Thanks, > > > > Mark Millard > escreveu > > (domingo, 26/04/2026 =C3=A0(s) 19:08): > > > > On 4/26/26 06:42, Dag-Erling Sm=C3=B8rg rav wrote: > > > The branch main has been updated by des: > > > > > > URL: https://cgit.FreeBSD.org/src/commit/? > > id=3D4dd97955e68df02b26d59e4e7c9a8167947a5164 > cgit.FreeBSD.org/src/commit/? > > id=3D4dd97955e68df02b26d59e4e7c9a8167947a5164> > > > > > > commit 4dd97955e68df02b26d59e4e7c9a8167947a5164 > > > Author: Dag-Erling Sm=C3=B8rgrav > > > AuthorDate: 2026-04-26 13:41:47 +0000 > > > Commit: Dag-Erling Sm=C3=B8rgrav > > > CommitDate: 2026-04-26 13:41:47 +0000 > > > > > > libpkgconf: Fix paths > > > > > > ${LOCALBASE:U} evaluates to exactly the same thing as > > ${LOCALBASE}. > > > Presumably what was meant was ${LOCALBASE:U/usr/local}. > > > > > > Fixes: b8352da33f34 ("pkgconf: import into the base > > system") > > > Reviewed by: khorben > > > Differential Revision: https://reviews.freebsd.org/D56642 > > > > > --- > > > lib/libpkgconf/Makefile | 4 ++-- > > > tools/build/depend-cleanup.sh | 4 ++++ > > > 2 files changed, 6 insertions(+), 2 deletions(-) > > > > > > diff --git a/lib/libpkgconf/Makefile b/lib/libpkgconf/Makefile > > > index fee7f275d9ff..3cfb2172a00e 100644 > > > --- a/lib/libpkgconf/Makefile > > > +++ b/lib/libpkgconf/Makefile > > > @@ -14,8 +14,8 @@ INCS=3D bsdstubs.h iter.h > > libpkgconf-api.h libpkgconf.h stdinc.h > > > > > > WARNS?=3D 3 > > > > > > -CFLAGS+=3D -DPERSONALITY_PATH=3D\"/usr/share/pkgconfig/ > > personality.d:/etc/pkgconfig/personality.d:${LOCALBASE:U}/etc/ > > pkgconfig/personality.d\" > > > -CFLAGS+=3D -DPKG_DEFAULT_PATH=3D\"${LOCALBASE:U}/libdata/ > > pkgconfig:/usr/libdata/pkgconfig:${LOCALBASE:U}/share/pkgconfig\" > > > +CFLAGS+=3D -DPERSONALITY_PATH=3D\"/usr/share/pkgconfig/ > > personality.d:/etc/pkgconfig/personality.d:${LOCALBASE:U/usr/local}= / > > etc/pkgconfig/personality.d\" > > > +CFLAGS+=3D -DPKG_DEFAULT_PATH=3D\"${LOCALBASE:U/usr/local}/ > > libdata/pkgconfig:/usr/libdata/pkgconfig:${LOCALBASE:U/usr/local}/ > > share/pkgconfig\" > > > CFLAGS+=3D -DSYSTEM_INCLUDEDIR=3D\"/usr/include\" > > > CFLAGS+=3D -DSYSTEM_LIBDIR=3D\"/usr/lib\" > > > CFLAGS+=3D -I${SRCTOP}/lib/libpkgconf -I${PKGCONFDIR} > > > diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend- > > cleanup.sh > > > index e9c02d015368..c186c39a3448 100755 > > > --- a/tools/build/depend-cleanup.sh > > > +++ b/tools/build/depend-cleanup.sh > > > @@ -317,6 +317,10 @@ check_epoch_and_opts > > > # "$OBJTOP"/tests/sys/kqueue/libkqueue/* > > > #fi > > > > > > +# 20250426 # libpkgconfig contains incorrect paths > > > > 2025 above is a typo? > > > > > +clean_obj lib/libpkgconf personality c pkgconfig:/share > > > +clean_obj lib/libpkgconf pkg c pkgconfig:/share > > > + > > > # 20251219 # libkrb5profile is now internal > > > for libcompat in "" $ALL_libcompats; do > > > dirprfx=3D${libcompat:+obj-lib${libcompat}} > > > > > > > > > > > > -- > > =3D=3D=3D > > Mark Millard > > marklmi at yahoo.com > > > > > > > > -- > > Nuno Teixeira > > FreeBSD UNIX: Web: https://FreeBSD.org > > > > > -- > =3D=3D=3D > Mark Millard > marklmi at yahoo.com > --=20 Nuno Teixeira FreeBSD UNIX: Web: https://FreeBSD.org --00000000000056b60106525bc2f6 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Mark,

Sorry for bad= reply...

I did take a look a https://reviews.freebsd.org/D56404 and noticed that ivy@=
participate on it and did open https://bugs.freebsd.org/bugzilla/show_bug.c= gi?id=3D295439

For what I see in PR is that uacme pkgconf = problem is related to PREFIX set to pkg maybe related to pkgbase method whe= n installing main or suing a custom PREFIX.

Thanks,

<= div class=3D"gmail_quote gmail_quote_container">
Mark Millard <marklmi@ya= hoo.com> escreveu (quinta, 21/05/2026 =C3=A0(s) 21:21):
On 5/21/26 11:18, Nuno Teixe= ira wrote:
> Hello,
>
> This change doens't honour PREFIX when it is set to other path tha= n
> default "/usr/local/"

As I only had noted an unexpected year in a date when I read the
original and replied about that, replying to my message instead of
des@'s original message is a little odd.

But, in response, I did post a question to the review of the original
https://reviews.freebsd.org/D56404 ("pkgconf: import into= the base
system"), asking:

"What is the relationship of this type of change to use of ${PREFIX} when ports install themselves and it is not the /usr/local default
value? (There is also a linux compatibility related standard default for PREFIX and folks can specify things like /opt .)"

I referenced you and your message.

>
> -CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0-DPERSONALITY_PATH=3D\"/usr= /share/pkgconfig/
> personality.d:/etc/pkgconfig/personality.d:${LOCALBASE:U}/etc/pkgconfi= g/
> personality.d\"
> -CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0-DPKG_DEFAULT_PATH=3D\"${LO= CALBASE:U}/libdata/pkgconfig:/
> usr/libdata/pkgconfig:${LOCALBASE:U}/share/pkgconfig\"
> +CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0-DPERSONALITY_PATH=3D\"/usr= /share/pkgconfig/
> personality.d:/etc/pkgconfig/personality.d:${LOCALBASE:U/usr/local}/et= c/
> pkgconfig/personality.d\"
> +CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0-DPKG_DEFAULT_PATH=3D\"${LO= CALBASE:U/usr/local}/libdata/
> pkgconfig:/usr/libdata/pkgconfig:${LOCALBASE:U/usr/local}/share/pkgcon= fig\"
>
> Please see https://bugs.freebsd.org/b= ugzilla/show_bug.cgi?id=3D295439
> <https://bugs.freebsd.org/bugzilla= /show_bug.cgi?id=3D295439>
>
> Thanks,
>
> Mark Millard <marklmi@yahoo.com <mailto:marklmi@yahoo.com>> escreveu
> (domingo, 26/04/2026 =C3=A0(s) 19:08):
>
>=C2=A0 =C2=A0 =C2=A0On 4/26/26 06:42, Dag-Erling Sm=C3=B8rg rav wrote:<= br> >=C2=A0 =C2=A0 =C2=A0> The branch main has been updated by des:
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> URL: https://cgit.FreeBSD.org/src/c= ommit/?
>=C2=A0 =C2=A0 =C2=A0id=3D4dd97955e68df02b26d59e4e7c9a8167947a5164 <h= ttps://
>=C2=A0 =C2=A0 =C2=A0cgit.FreeBSD.org/src/commit/?
>=C2=A0 =C2=A0 =C2=A0id=3D4dd97955e68df02b26d59e4e7c9a8167947a5164> >=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> commit 4dd97955e68df02b26d59e4e7c9a8167947a516= 4
>=C2=A0 =C2=A0 =C2=A0> Author:=C2=A0 =C2=A0 =C2=A0Dag-Erling Sm=C3=B8= rgrav <des@FreeBSD.org>
>=C2=A0 =C2=A0 =C2=A0> AuthorDate: 2026-04-26 13:41:47 +0000
>=C2=A0 =C2=A0 =C2=A0> Commit:=C2=A0 =C2=A0 =C2=A0Dag-Erling Sm=C3=B8= rgrav <des@FreeBSD.org>
>=C2=A0 =C2=A0 =C2=A0> CommitDate: 2026-04-26 13:41:47 +0000
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0libpkgconf: Fix paths
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0${LOCALBASE:U} evaluates to= exactly the same thing as
>=C2=A0 =C2=A0 =C2=A0${LOCALBASE}.
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0Presumably what was meant w= as ${LOCALBASE:U/usr/local}.
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0Fixes:=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 b8352da33f34 ("pkgconf: import into the base
>=C2=A0 =C2=A0 =C2=A0system")
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0Reviewed by:=C2=A0 =C2=A0 k= horben
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0Differential Revision:=C2= =A0 https://reviews.freebsd.org/D56642
>=C2=A0 =C2=A0 =C2=A0<https://reviews.freebsd.org/D56642= >
>=C2=A0 =C2=A0 =C2=A0> ---
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 lib/libpkgconf/Makefile=C2=A0 =C2=A0 =C2= =A0 =C2=A0| 4 ++--
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 tools/build/depend-cleanup.sh | 4 ++++ >=C2=A0 =C2=A0 =C2=A0>=C2=A0 2 files changed, 6 insertions(+), 2 dele= tions(-)
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0> diff --git a/lib/libpkgconf/Makefile b/lib/lib= pkgconf/Makefile
>=C2=A0 =C2=A0 =C2=A0> index fee7f275d9ff..3cfb2172a00e 100644
>=C2=A0 =C2=A0 =C2=A0> --- a/lib/libpkgconf/Makefile
>=C2=A0 =C2=A0 =C2=A0> +++ b/lib/libpkgconf/Makefile
>=C2=A0 =C2=A0 =C2=A0> @@ -14,8 +14,8 @@ INCS=3D=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0bsdstubs.h iter.h
>=C2=A0 =C2=A0 =C2=A0libpkgconf-api.h libpkgconf.h stdinc.h
>=C2=A0 =C2=A0 =C2=A0>=C2=A0
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 WARNS?=3D=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 3
>=C2=A0 =C2=A0 =C2=A0>=C2=A0
>=C2=A0 =C2=A0 =C2=A0> -CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0-DPERSONALITY_P= ATH=3D\"/usr/share/pkgconfig/
>=C2=A0 =C2=A0 =C2=A0personality.d:/etc/pkgconfig/personality.d:${LOCALB= ASE:U}/etc/
>=C2=A0 =C2=A0 =C2=A0pkgconfig/personality.d\"
>=C2=A0 =C2=A0 =C2=A0> -CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0-DPKG_DEFAULT_P= ATH=3D\"${LOCALBASE:U}/libdata/
>=C2=A0 =C2=A0 =C2=A0pkgconfig:/usr/libdata/pkgconfig:${LOCALBASE:U}/sha= re/pkgconfig\"
>=C2=A0 =C2=A0 =C2=A0> +CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0-DPERSONALITY_P= ATH=3D\"/usr/share/pkgconfig/
>=C2=A0 =C2=A0 =C2=A0personality.d:/etc/pkgconfig/personality.d:${LOCALB= ASE:U/usr/local}/
>=C2=A0 =C2=A0 =C2=A0etc/pkgconfig/personality.d\"
>=C2=A0 =C2=A0 =C2=A0> +CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0-DPKG_DEFAULT_P= ATH=3D\"${LOCALBASE:U/usr/local}/
>=C2=A0 =C2=A0 =C2=A0libdata/pkgconfig:/usr/libdata/pkgconfig:${LOCALBAS= E:U/usr/local}/
>=C2=A0 =C2=A0 =C2=A0share/pkgconfig\"
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0-DSYSTEM_I= NCLUDEDIR=3D\"/usr/include\"
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0-DSYSTEM_L= IBDIR=3D\"/usr/lib\"
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 CFLAGS+=3D=C2=A0 =C2=A0 =C2=A0-I${SRCTOP= }/lib/libpkgconf -I${PKGCONFDIR}
>=C2=A0 =C2=A0 =C2=A0> diff --git a/tools/build/depend-cleanup.sh b/t= ools/build/depend-
>=C2=A0 =C2=A0 =C2=A0cleanup.sh
>=C2=A0 =C2=A0 =C2=A0> index e9c02d015368..c186c39a3448 100755
>=C2=A0 =C2=A0 =C2=A0> --- a/tools/build/depend-cleanup.sh
>=C2=A0 =C2=A0 =C2=A0> +++ b/tools/build/depend-cleanup.sh
>=C2=A0 =C2=A0 =C2=A0> @@ -317,6 +317,10 @@ check_epoch_and_opts
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 #=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 &quo= t;$OBJTOP"/tests/sys/kqueue/libkqueue/*
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 #fi
>=C2=A0 =C2=A0 =C2=A0>=C2=A0
>=C2=A0 =C2=A0 =C2=A0> +# 20250426 # libpkgconfig contains incorrect = paths
>
>=C2=A0 =C2=A0 =C2=A02025 above is a typo?
>
>=C2=A0 =C2=A0 =C2=A0> +clean_obj lib/libpkgconf personality c pkgcon= fig:/share
>=C2=A0 =C2=A0 =C2=A0> +clean_obj lib/libpkgconf pkg c pkgconfig:/sha= re
>=C2=A0 =C2=A0 =C2=A0> +
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 # 20251219 # libkrb5profile is now inter= nal
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 for libcompat in "" $ALL_libco= mpats; do
>=C2=A0 =C2=A0 =C2=A0>=C2=A0 =C2=A0 =C2=A0 =C2=A0dirprfx=3D${libcompa= t:+obj-lib${libcompat}}
>=C2=A0 =C2=A0 =C2=A0>
>=C2=A0 =C2=A0 =C2=A0>
>
>
>=C2=A0 =C2=A0 =C2=A0--
>=C2=A0 =C2=A0 =C2=A0=3D=3D=3D
>=C2=A0 =C2=A0 =C2=A0Mark Millard
>=C2=A0 =C2=A0 =C2=A0marklmi at yahoo.com <http://yahoo.com>
>
>
>
> --
> Nuno Teixeira
> FreeBSD UNIX:=C2=A0 <eduardo@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0= https= ://FreeBSD.org
> <https://FreeBSD.org>


--
=3D=3D=3D
Mark Millard
marklmi at yahoo.com


--
Nuno Teixeira
=
FreeBSD UNIX:=C2=A0 <eduardo@FreeBSD.org>=C2=A0 =C2=A0Web:=C2=A0 https://Fr= eeBSD.org
--00000000000056b60106525bc2f6-- From nobody Fri May 22 00:40:08 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gM5yw4xrPz6fPDj for ; Fri, 22 May 2026 00:40: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gM5yw48mzz3DK7 for ; Fri, 22 May 2026 00:40:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779410408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c4CleROlR17wTldiFGFcWFiATmZqfdOlSkb2YQ6Cslc=; b=WTBhgekfXbwPwbg6WJr+cbqfcL+ollQ4114SLcDgFjo45PnzLRn7CNJo5jIDMBcKt8bpeI dQw2jkWOOeQHeLNibstLOD23ydyLvGTs/DixaAifE2FwixfEHVin0URso6P1h1jpIbZANL Dl19WG61tvoj3G1/4GvmtPEKxapI5uSMbw8XtmSm3KvvHSrglK7lm3xR71G4iuTh1VLt24 uqxhBY0N3KHurAeb5MfWXs11Ooqe6ivnL6SJMwqoT4cnrcYn9Xe1NX6iDh7DWeLazQQ/re qpYAXsZM9mWDjpYEoZ3a/eRtBxF22iKOpHpfO7GAohVJd4Gba0s/0nfYVrt13g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779410408; a=rsa-sha256; cv=none; b=xpO1LCcjP37FVC+ZGCvrR6rb1xCUNQ6WLM5oT4eg9q6AI7LYaVGMRI7GdwI9R399FjOK4Y 3zW4Z3k/FV/RTF3jiQ2YrrgXh3QS5603uOfN4dVtkTbTwOU8kFbx+drxTwHsluzHihI9EH tDuIxLcgkfo/g1sfNGz0q2fnhgVFB2EFl+Thvnq8S2gsbUItxfQ8KOevOMjxpKrkGQbcIr D1wVPU88PvhCmG6P5fCDjUER9NL9yaKD46qI3/zHMdEm/UYzsipWv9Bwi3hKhIxrIplm2E wYEay97YmQ4mycr73KAYlyhJExkIEmN3A9fQyHmU6ywXQdlAK0xF5Aez8NaPeQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779410408; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=c4CleROlR17wTldiFGFcWFiATmZqfdOlSkb2YQ6Cslc=; b=nE0v9qtp14ZrqTSk/Um2d0ANcinq2iS/a6IQSpGtkAtn4m0alB++equ1bhMPLwwMRepYsl 5+AtcATB1Qdax+ICeyeXBO50AWRA3B2Iw0ue6uOULGX+dB+l3BsYS6eGZPlw4/HaglxM1J 6AIJ+YAKH3DGGqpxbRCXorJPKx//qidLryrLRbK2yPGe2tV8ke4m2bzI5Ag/PRkjfAfkYs uOvC0dqCRe1arcllQamU3+MJCX5862C3wGQfrG9VjUW+G0jWnJ4HRAjrJK6SNdCGsi3mtN DCrp8ARTdWVH1Qj7BLiw5vhfOpTsnO+D7+piNQQbVUo1BNRee+vNtImNBvlHFQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gM5yw3V8dzwvj for ; Fri, 22 May 2026 00:40:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39e4b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 00:40:08 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: d66fec481bfd - main - netlink: Fix lock leak in nl_find_nhop List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: d66fec481bfd65cbabb6c12a410d76843e76083e Auto-Submitted: auto-generated Date: Fri, 22 May 2026 00:40:08 +0000 Message-Id: <6a0fa5e8.39e4b.39a1a3f0@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=d66fec481bfd65cbabb6c12a410d76843e76083e commit d66fec481bfd65cbabb6c12a410d76843e76083e Author: Ed Maste AuthorDate: 2026-05-21 21:14:41 +0000 Commit: Ed Maste CommitDate: 2026-05-22 00:38:45 +0000 netlink: Fix lock leak in nl_find_nhop Reviewed by: bz, pouria Fixes: 7e5bf68495cc ("netlink: add netlink support") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57156 --- sys/netlink/route/nexthop.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netlink/route/nexthop.c b/sys/netlink/route/nexthop.c index 314fb66431b9..0b4a929f65a6 100644 --- a/sys/netlink/route/nexthop.c +++ b/sys/netlink/route/nexthop.c @@ -173,7 +173,7 @@ nl_find_nhop(uint32_t fibnum, int family, uint32_t uidx, CHT_SLIST_FIND_BYOBJ(&ctl->un_head, unhop, &key, unhop); if (unhop != NULL) { struct nhop_object *nh = unhop->un_nhop; - UN_RLOCK(ctl); + UN_RUNLOCK(ctl); *perror = 0; nhop_ref_any(nh); return (nh); From nobody Fri May 22 03:12:56 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gM9MD5r4Wz6fhdH for ; Fri, 22 May 2026 03:12: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gM9MD2zj7z3ggZ for ; Fri, 22 May 2026 03:12:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779419576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bhn4r5RZmqKVqEuPyofuFT6Y+igOudk1uhZhYqkqX1s=; b=sj124gtKAyc3qj26+YEBHzLHICM3brJpEN8h+vRAuas7JS/CwLBA5K6AwJqtSNE+zOrGo4 DhV37dNTZdMgzKSgPC3g8MddQ7tVFEvOouvxLWMvSA4wUOuK3HUtZ11GsbPDf7Cd4grfLa /c9mPWXmhqqJkfXYBQDIrx0ARr1wtLlWm5N6ZEM6NxBhOnfyrdB4YZj4rJhK3u/H+OEgpp j5WO64iCM4cwGMtA0Y4K0vJ4B687Wan/30WtVWUZgptdD1jy1dGStNm/y1sv9xxYcrI3z2 ZIB7RtQ8iF6UxJOTKRIPsZhYIVh5H3OeNckg7uq8Pc5roObynTTA0zhr0g82Xg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779419576; a=rsa-sha256; cv=none; b=k80DeUDqXrQQia7aGMXvZHDOvP8GkrBcsdxgDYAPkjfGi0Z4cNd8DPrmhObn6vRrUd1Geo 5IiapqPZU0a1VbYabgaEpvKtT/ql/6cs8qi7Rbw2WtXu0cYF1/sWtADToqUAGVq8VsMDwE QvpIch91KKUgkp7fyPfNirenQA8V32ZR005mnnmY1lKERmUNgtL40mBotKrzxHFNwJag8u kcraj8y2ocK2YfW2T6CqXbf2O5UTZycs07YhOtX2mkzkp8THDnBgPA7yqLnQdThH6xEIvs RxuTmRq/MroJpVQZ+0PEDVpIP9UMxXqOh6lHlYX85VqM/W9ZUtDdJhwGZ5VdCg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779419576; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=bhn4r5RZmqKVqEuPyofuFT6Y+igOudk1uhZhYqkqX1s=; b=ffy6sPJK5rXJdK0Q6zoMcM4+Ss6w8eOnYPnIluQtjAnd6/3wZXuQxKPX0zlAzRd8nQZfa9 b2gHVjHidVTmn/SZeyX4yR2jrOpC/DxXTB1TMPcLRXsRZ1m9hWHFtYL4g5SOY3cuQE4t8L rs5dRnfcJgIZO1ESqCJE779Ljzjn23JsffI8Ou+1d0rLWgTpKAW1PJy7/M7m30zrH/krz6 iWKQlGcZW8hCv7gRvg2naO7JQAXDA4vNWpj8QGu7MO7EBVlz5tLFdTkBuMgLMoI38lLHKi tOy5jaVo/i7dkisE0EopAIUiIXLQVT+gcfGRF3ulBk5IMivdkwEiFVdHXHdfkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gM9MD2WTKz12F7 for ; Fri, 22 May 2026 03:12:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 47afb by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 03:12:56 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 0c85df006514 - main - vop_read_pgcache_post(): the vnode is unlocked List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 0c85df0065146516d5bacfc80d52d9ee6b33b96d Auto-Submitted: auto-generated Date: Fri, 22 May 2026 03:12:56 +0000 Message-Id: <6a0fc9b8.47afb.402930aa@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=0c85df0065146516d5bacfc80d52d9ee6b33b96d commit 0c85df0065146516d5bacfc80d52d9ee6b33b96d Author: Konstantin Belousov AuthorDate: 2026-05-22 03:07:59 +0000 Commit: Konstantin Belousov CommitDate: 2026-05-22 03:07:59 +0000 vop_read_pgcache_post(): the vnode is unlocked Reported by: markj Fixes: e9a5eb0e5e44 ("vop_read_pgcache_post(): report inotify IN_ACCESS same as for vop_read_post()") Sponsored by: The FreeBSD Foundation MFC after: 1 week --- sys/kern/vfs_subr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c index 848d3ac767f3..65529bc195bb 100644 --- a/sys/kern/vfs_subr.c +++ b/sys/kern/vfs_subr.c @@ -6521,7 +6521,7 @@ vop_read_pgcache_post(void *ap, int rc) struct vop_read_pgcache_args *a = ap; if (rc == 0) { - VFS_KNOTE_LOCKED(a->a_vp, NOTE_READ); + VFS_KNOTE_UNLOCKED(a->a_vp, NOTE_READ); INOTIFY(a->a_vp, IN_ACCESS); } } From nobody Fri May 22 07:41:20 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMHJx18mLz6f3kg for ; Fri, 22 May 2026 07:41:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMHJw6wldz3LFd for ; Fri, 22 May 2026 07:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779435681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ILYoAFYHXhilPCVWKSwpIzqJaBg1CFfueo3aR0heQ5s=; b=c0t8l5A+zM7ekYzhkn3z0au+5mcu1y1dPA2J+wJpTjHBK0rb/7cZMNKl8wvFgf3tm27Ra7 awJcK/ttycWLZhT0GW5L9/8ls1PWRSKzt7HDBBLN0pkI2C/Qy4eokshDLqlW18TYWV+Gsy 9mnKQ8/VlUyXbhIQXhGJlAR4kVOspY3q9UIfAHvjy1ulg1JPeSeUPzM2fYkKjFqUF5cetT TkEU/Pwvrdm3EwFCt5hfapd5TAbAQ0Z/oHcPez9VAe3Lu+nO67MpnBA34e0AuFlJHHvMrk lWvzb719zFtkR1vPhAvN2E5+ejAg+49824Tb6OjbBW1wnOCLGixnLFZ3kXqcNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779435681; a=rsa-sha256; cv=none; b=TO9JZ1TTm6sJxD6QOYJxOGql/vi5MXvf5AWKvcJka/Z7ZqtQU1WYQc7r4TW+ZpGUkjFAHN r2stFpx9Spr2NiyMtJ++MC6kHri11UqgQCcDRGiQgcIbdOIpCNcWJjWWh8U4D45p+Ic8Ta ycO2Wy7iNc/0xSkr81hBDxjhh5APgZ0RyZ5CikOExFjWe3Cj3RPU7FJuZu9CGukGdYACJd Y064K+k/QG6j7h0i1zphPlr8NvQLWpeQzMggjRM+Q6qL0zk2O2EPNRmQ9c/GskAGyd4iuz yJXgZ8CV/scwoOH6BOJv/dXF3TLAWTzykVq8lse9cF5Dt8yKaL5xQ7oMKRSyOg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779435681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ILYoAFYHXhilPCVWKSwpIzqJaBg1CFfueo3aR0heQ5s=; b=X2xJSMT/2o2IqpW+lKWgHbhDMr2+iCeOyYuXB/rTQr312QqJLReghQGc245xaH+TmIYxz0 IhznKgWGpZH1PjbSf9/ouBWfn4e4Hrzb8SbEJgMi4sVCF54aVTAaqZD2xVHsAB/JBv9rPs X/B2LbWOQv7F8yv3ipxp38hqujlQkE6sshgehqzJG/UeXxqRtqqDi/IQgjYyMEU/ivwAiM zah9i1ekPmLW/9ggHWiLWO+fk2u5voYNWGcnhZTGsAEOUSJgcIuIh97hM4PeNP7jsger9W +cvA2S6+nGwbzW+rWi8kQdcaHGChmScALNyaarqzCPvG5NxbdEEkZizj5ty0DQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMHJw6CmTz19GS for ; Fri, 22 May 2026 07:41:20 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3f79c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 07:41:20 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: ShengYi Hung Subject: git: 28d85db46b48 - main - xhci: Do not drop and add bits in xhci List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 28d85db46b484589e2ee74cf4b270db066821de1 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 07:41:20 +0000 Message-Id: <6a1008a0.3f79c.1d455f29@gitrepo.freebsd.org> The branch main has been updated by aokblast: URL: https://cgit.FreeBSD.org/src/commit/?id=28d85db46b484589e2ee74cf4b270db066821de1 commit 28d85db46b484589e2ee74cf4b270db066821de1 Author: ShengYi Hung AuthorDate: 2026-05-21 12:49:42 +0000 Commit: ShengYi Hung CommitDate: 2026-05-22 07:41:07 +0000 xhci: Do not drop and add bits in xhci Drop and Add bits reset the data toggle for high-speed devices in XHCI. The toggle bit represents the sequence number in USB 2.0 transfers. However, a device can only recognize that the toggle bit has been reset while in the HALT state. As a result, the host and device toggle values may become mismatched, causing xHCI to reject the packet. This issue was observed while testing the EZ-USB FX2 device. The transfer may then return to the original value after a bi-directional TD because the toggle field is only one bit wide. This explains the reson that we can only receive packets bi-transfer in some case. Therefore, we do not reset the toggle bit here. Reviewed by: adrian MFC after: 2 weeks Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57146 --- sys/dev/usb/controller/xhci.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/sys/dev/usb/controller/xhci.c b/sys/dev/usb/controller/xhci.c index 3dad0985b39d..b522c5fdc5a3 100644 --- a/sys/dev/usb/controller/xhci.c +++ b/sys/dev/usb/controller/xhci.c @@ -3898,10 +3898,8 @@ xhci_configure_reset_endpoint(struct usb_xfer *xfer) */ switch (xhci_get_endpoint_state(udev, epno)) { case XHCI_EPCTX_0_EPSTATE_DISABLED: - drop = 0; - break; case XHCI_EPCTX_0_EPSTATE_STOPPED: - drop = 1; + drop = 0; break; case XHCI_EPCTX_0_EPSTATE_HALTED: err = xhci_cmd_reset_ep(sc, 0, epno, index); @@ -3910,9 +3908,15 @@ xhci_configure_reset_endpoint(struct usb_xfer *xfer) DPRINTF("Could not reset endpoint %u\n", epno); break; default: - drop = 1; + /* + * xHCI spec 4.6.8: + * The Drop and Add operation resets the toggle bit, which can + * cause a toggle mismatch between the device and host. As a + * result, xHCI may refuse to receive or process the packet. + */ err = xhci_cmd_stop_ep(sc, 0, epno, index); - if (err != 0) + drop = (err != 0); + if (drop) DPRINTF("Could not stop endpoint %u\n", epno); break; } From nobody Fri May 22 10:03:45 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMLTF2qSJz6fLnh for ; Fri, 22 May 2026 10:03: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMLTF2JG1z3k6x for ; Fri, 22 May 2026 10:03:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779444225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uWJLMwxddJtBnZmcuKdcZKTy/pfZaKHsMxlluOq22HE=; b=ysHOgnaupPkPszGtZwALD3JuethPD9J+nrxX+0R6yB8EFAokvUe8CKRlvCV6nLPJuuFwaZ uvZ7VZsLJeOUMMrEYpH2jbFN/v3xMrSaMVrBxE6UofvLLbDfKxOkSdxZ/QuSIpO+j84CUs qgotbIHzFUTtDBOKIONsuQechmwNV03YNdIusbuLGqcbUsLkeEqGsC3YZ8sdNeJ9pVdw6U J/ES68IPOcYpFoIzSsNUJbmUn65ZNY8yyOrfhPNK29ovrBAcs9ViT2arQkAebg4uYw5J60 79V+SUEVCYvbZNj98Z8PTiBc6VS5qbyEj8wh18uI81FOQ0WV2EyxGX13sJVQ1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779444225; a=rsa-sha256; cv=none; b=Qccglhn8m/1vmd2UweQSWZE+bgLxZD3moMhT50LU6GRrNjK1CgcqtC1wJuL6niTLhwwpiB DwKSvjMnMyy6Sx11eP+1IFpwrTn+g8o3oqiyp8816U5rnX2oN/haGVw5o9z96MVj7+BANv OvEz9zkwcrr4oln8/CSpCOZMv4E1ni5xOra9OHc1CUkj5TgBRjC4iEkRLo1GM6c3LkJ2ZS ikJpEUAgNXrx9+b8Hl6NdkKIZyxQOl1rys5gRowhnjkRCsy0aXu5iTBGNer9fu5kg0a7n3 SoGGv4rCcAkYwUutzryZbNIWPzMuLM/MKp2rlceIY5QspgirDfFlGyvBbP50oA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779444225; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=uWJLMwxddJtBnZmcuKdcZKTy/pfZaKHsMxlluOq22HE=; b=ofyi3fqwMUbqnpGMO8HeqvtZdkvXH4Zq8jEeDeiFaJrGazuy1uLGpXTQfs8QG8Ktm7B6iR hBiCpx4fcSaVIvnnJeVPtLaV/+As79UnlHaxf1gD4ZUUEreyhu/7Yan7Oge6w5PkctSyNC AgqN+gBo2xuT1Fi2GkWvzzjkhNfqGyfz0/qvaU2GthZ3vtyzadMi2eqrCBrxMwiZT93B7Q UvagHbFgxfvp4h3TTuKSRpjDnlrWRnzvePWkipe7iVMn86iMbRrY4wSbaHKhHCSyOx2Ahb NzcBAb5nOuMykTw0D1bZGUlK+jMa8+n+ULU6x78RdnFAZS/ERLPnxWyrbk9A2w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMLTF1vNgz1BT for ; Fri, 22 May 2026 10:03:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1ebd3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 10:03:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: f814650aaf78 - main - power: Fix stype name lengths List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: f814650aaf788323b3d485d96996fce6cd7b2d7f Auto-Submitted: auto-generated Date: Fri, 22 May 2026 10:03:45 +0000 Message-Id: <6a102a01.1ebd3.138af078@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=f814650aaf788323b3d485d96996fce6cd7b2d7f commit f814650aaf788323b3d485d96996fce6cd7b2d7f Author: Aymeric Wibo AuthorDate: 2026-05-22 09:58:57 +0000 Commit: Aymeric Wibo CommitDate: 2026-05-22 10:01:07 +0000 power: Fix stype name lengths When updating the names of the sleep types in 95b4436e989d ("power: Rename sleep types"), I forgot to update the lengths of the buffers they went into. Reported by: mhorne Fixes: 95b4436e989d ("power: Rename sleep types") Sponsored by: The FreeBSD Foundation --- sys/dev/acpica/acpi.c | 2 +- sys/kern/subr_power.c | 2 +- sys/sys/power.h | 5 ++++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c index ec1f002150c1..8be94db73729 100644 --- a/sys/dev/acpica/acpi.c +++ b/sys/dev/acpica/acpi.c @@ -4609,7 +4609,7 @@ acpi_sleep_state_sysctl(SYSCTL_HANDLER_ARGS) static int acpi_stype_sysctl(SYSCTL_HANDLER_ARGS) { - char name[10]; + char name[POWER_STYPE_NAME_LEN]; int err; int sstate; enum power_stype new_stype, old_stype; diff --git a/sys/kern/subr_power.c b/sys/kern/subr_power.c index ffd91db83e96..1cfa6e5c77dd 100644 --- a/sys/kern/subr_power.c +++ b/sys/kern/subr_power.c @@ -145,7 +145,7 @@ sysctl_supported_stypes(SYSCTL_HANDLER_ARGS) static int power_sysctl_stype(SYSCTL_HANDLER_ARGS) { - char name[10]; + char name[POWER_STYPE_NAME_LEN]; int err; enum power_stype new_stype, old_stype; diff --git a/sys/sys/power.h b/sys/sys/power.h index a1497d1a6524..b2d49781d359 100644 --- a/sys/sys/power.h +++ b/sys/sys/power.h @@ -85,7 +85,10 @@ enum power_stype { POWER_STYPE_UNKNOWN, }; -static const char * const power_stype_names[POWER_STYPE_COUNT] = { +/* XXX NUL terminator is included in this number */ +#define POWER_STYPE_NAME_LEN 16 + +static const char power_stype_names[POWER_STYPE_COUNT][POWER_STYPE_NAME_LEN] = { [POWER_STYPE_AWAKE] = "awake", [POWER_STYPE_STANDBY] = "standby", [POWER_STYPE_FW_SUSPEND] = "fw_suspend", From nobody Fri May 22 11:04:21 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMMqB0Cr7z6fSqX for ; Fri, 22 May 2026 11:04: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMMq95LPMz3qG8 for ; Fri, 22 May 2026 11:04:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779447861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XV1aBsSIni+RhG/5Rgwf5CXTDzTvg0cJfTxQto1Pd2k=; b=qFUpzWpSIsFFkFXxzUHhNbwSe1ZILjGo+c49KDzx7SajNi+UVjHcmZpCx5CJJWn94KFJk+ 5VD1mN2Qlddksj3UP8o4dytAJwP4epYK1Ru58r60XiiD/ZmK/LXISf4eNqIS8IeXX/nO0C QyEJCqIIZ/RMuoaXJqlKOlLMw2nHe/Jx/JPRH+W9GkKYDSBlXJBjoIyz54JJdr4Z21ZEys NYHwjUDV4OzZSG0KHNk+LXe6iZ+ouEJChtgZfyM16N3g+Zuv7GQWSfPhLpF62oXKfc1/fL 86W7q+K+R2wvBofxY+9iTfNitjtkvsZa1l3Ee1COrvmEnZnaxmhPdAKFqlyt2g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779447861; a=rsa-sha256; cv=none; b=FkVttp0V9Tnjaae6oq/ICjp8xTD0RxuANljpC2F7awSHBAlCuNTvhN6la9wbpY7PsMn4kj J2+3UQ6nlFVHlZ+h2uO3XzFfLKsa1LRxPzDNWRYAVTa6AnWGIS/oA2ssTzSdrdHug2T/Dc sC1pw7fnqEBd1h78hq9UvmNSF9w+xWwmp37qXSVptMNqiaWhdYqCFbaccnwuDj8tAiIMg1 dUp0XANyiRfWO7lXHCUvsE0ZEBIu+HVW0jKjOfSTyggBKLAfn7rgv0f9DpPCSDjbkZ5540 MQZWsibrCN1SwQRS+7FFGnHrzcmeHHgjbDJwW0WMDBm5XZOOnfo9b6FWHQ8lwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779447861; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XV1aBsSIni+RhG/5Rgwf5CXTDzTvg0cJfTxQto1Pd2k=; b=dgrdE3/EmhY4kll3Yp2OGfDP7M7mP25FtsO9nRXcgKqU6dV85UoH/a0d/2XOHbapVb1lLV nh5Ir9lYppcQZr5wDKkJ7Su4SsTc3S1B4p34R1hrP4/qOxVXAmAaGPEqjHUGO0mdNEDRj+ iyiHrKqUWRcMNc0kTMl7CZACTjG0APRxwWGdF/Li/gk4e9ezCSA1IKJxXppkWRW/zoiMGE w4ffDS0R04gSWvH5cTLK3GEMBIxJoKhf2qCMhdEbG5IzRn/EmK+Kudux1DreXylGtFjTui DKwcEnOJ/6mvXo5dY5Fo6rrA5+/w65DbrimutX6svyccTWxvSUc0Cr8FdfUR6w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMMq94LkLz3BZ for ; Fri, 22 May 2026 11:04:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 22c76 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 11:04:21 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Christos Margiolis Subject: git: 3a3b05459136 - main - sound: Remove SV_ABI_LINUX ifdef List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: christos X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 3a3b0545913625360e38b30dba10c74dae71bbcc Auto-Submitted: auto-generated Date: Fri, 22 May 2026 11:04:21 +0000 Message-Id: <6a103835.22c76.25b4256@gitrepo.freebsd.org> The branch main has been updated by christos: URL: https://cgit.FreeBSD.org/src/commit/?id=3a3b0545913625360e38b30dba10c74dae71bbcc commit 3a3b0545913625360e38b30dba10c74dae71bbcc Author: Christos Margiolis AuthorDate: 2026-05-22 10:57:59 +0000 Commit: Christos Margiolis CommitDate: 2026-05-22 11:03:09 +0000 sound: Remove SV_ABI_LINUX ifdef This ifdef does not do anything, SV_ABI_LINUX is a flag. Sponsored by: The FreeBSD Foundation MFC after: 1 week Reviewed by: ivy, brooks Pull-Request: https://ron-dev.freebsd.org/FreeBSD/src/pulls/37 --- sys/dev/sound/pcm/dsp.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/sys/dev/sound/pcm/dsp.c b/sys/dev/sound/pcm/dsp.c index 7b4f3f15645e..0f76791448ca 100644 --- a/sys/dev/sound/pcm/dsp.c +++ b/sys/dev/sound/pcm/dsp.c @@ -54,12 +54,10 @@ struct dsp_cdevpriv { struct pcm_channel *wrch; }; -#ifdef SV_ABI_LINUX static int dsp_mmap_allow_prot_exec = -1; SYSCTL_INT(_hw_snd, OID_AUTO, compat_linux_mmap, CTLFLAG_RWTUN, &dsp_mmap_allow_prot_exec, 0, "linux mmap compatibility (-1=force-disable 0=auto)"); -#endif static int dsp_basename_clone = 1; SYSCTL_INT(_hw_snd, OID_AUTO, basename_clone, CTLFLAG_RWTUN, @@ -1925,16 +1923,12 @@ dsp_mmap_single(struct cdev *i_dev, vm_ooffset_t *offset, struct pcm_channel *wrch, *rdch, *c; int err; -#ifdef SV_ABI_LINUX /* * https://lists.freebsd.org/pipermail/freebsd-emulation/2007-June/003698.html */ if ((nprot & PROT_EXEC) && (dsp_mmap_allow_prot_exec < 0 || (dsp_mmap_allow_prot_exec == 0 && SV_CURPROC_ABI() != SV_ABI_LINUX))) -#else - if (nprot & PROT_EXEC) -#endif return (EINVAL); /* From nobody Fri May 22 11:27:59 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMNLS0d8Xz6fWHS for ; Fri, 22 May 2026 11: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMNLR73WNz3tjQ for ; Fri, 22 May 2026 11:27:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779449280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R8OeY/6NIacgo4ex74LwwyFjtxwby+ONoGvB2+fpbWU=; b=KzJTay7v2PgFOwxLj8GNuv9ZUo7bD0T7MWeu9+S4WdbVj4Kfwcpk0WAeJKw7e18O4D8fG7 gVnmR10Sxn6QgckqFzJJsSS8q9Upo5DKfs073vJN4/XY2cnuWkygYeNXr2MeaKu/jTWsEu 5yYP9TKQXJc1+zeyjL/6Eupkalg1mK2kWiw0wYtDhJw6Nkcog8vzezppmZty3VgA6dPgt0 E526vGpj+2T428TvpXZfIRZkxV+lRs+FlVduxK5TGmr7KZ/ahd/dSi7QAVAVG93ocM6MuT GFXSCsalsDeIZiqGOlYr1pnuBet6Rjhk1hkqPXycBkux5ns3KQjWnWsj+rXxKw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779449280; a=rsa-sha256; cv=none; b=lD7Z6AhDcG3EAC+MmaNOSOMopP2rA45Rzq6Ku43qWsgLd3OvEopf5M29GoIHDYzPBFirc/ 84IpUXF6cypdvQxu0gMDHkCSYm/bxhIKfQQYhwWQu+/2OWPlwI/uiZQQ6yxZ0O9IfEth6N 5zczYgHqwQegxeTRRqvhERpWmPE3GStIIv/mpe0uRjkWGMztVd55nanC81XQQR8d4k5lpd ndaJ60ywnzuIWR/+J/laJty6GE1fo/LFCgxp60yEwDe59sNAoBnLifhfwWo1iPrP4D1f4n QF+xguJ/PKYsZQ8bIa3/EqrgpfYwN03IDboorREG5PihLJUrzhlF0EfZSdKPxg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779449280; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R8OeY/6NIacgo4ex74LwwyFjtxwby+ONoGvB2+fpbWU=; b=PWRyYX91cdCYZ93kpN1wLHXH5SN7UJvGJNVMZRFpeOHs/zmqVZ1QCE5CROqPQWMnRPEc2Y nIwGTXP3hubRZ65pVScGLLOGbevAL9DhyWEWiBjNxGkqPh4WURibyQ4dib7X1uInPBnZ0E yu/7u3U7ZaL2bN1PQgj+jpS4jOdjiMcUfiwgHtBRr27cI3qNeCt5sVedtXh955wLVr5AV3 9CenpYCC3ctRS7KuvWXN3CDt+ut8edwAAgIERt+KPC02/Cvo9ngX1Pr1wCo3yCsE5a+NOA xNpT7aL7imEBQeQkn+1UFXKyDPkPoEo2WjRW92LD0+Ea6BmZE12su71rYh/luA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMNLR6YzHz3jG for ; Fri, 22 May 2026 11:27:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 26562 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 11:27:59 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Aymeric Wibo Subject: git: 0b2df683672e - main - acpi_spmc: Remove useless __DECONSTs List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 0b2df683672e3b5792aa552a3700da86617f9d90 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 11:27:59 +0000 Message-Id: <6a103dbf.26562.208f1b9c@gitrepo.freebsd.org> The branch main has been updated by obiwac: URL: https://cgit.FreeBSD.org/src/commit/?id=0b2df683672e3b5792aa552a3700da86617f9d90 commit 0b2df683672e3b5792aa552a3700da86617f9d90 Author: Aymeric Wibo AuthorDate: 2026-05-22 11:11:39 +0000 Commit: Aymeric Wibo CommitDate: 2026-05-22 11:27:40 +0000 acpi_spmc: Remove useless __DECONSTs Sponsored by: The FreeBSD Foundation --- sys/dev/acpica/acpi_spmc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/dev/acpica/acpi_spmc.c b/sys/dev/acpica/acpi_spmc.c index c8e2cf4c3733..611a9a09a6eb 100644 --- a/sys/dev/acpica/acpi_spmc.c +++ b/sys/dev/acpica/acpi_spmc.c @@ -785,8 +785,8 @@ acpi_spmc_get_constraints(struct acpi_spmc_softc *const sc) for (size_t i = 0; i < sc->constraint_count; i++) { constraint = &sc->constraints[i]; - status = acpi_GetHandleInScope(sc->handle, - __DECONST(char *, constraint->name), &constraint->handle); + status = acpi_GetHandleInScope(sc->handle, constraint->name, + &constraint->handle); if (ACPI_FAILURE(status)) { if (VERBOSE()) device_printf(sc->dev, From nobody Fri May 22 14:25:00 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMSGh4Tjfz6frhV for ; Fri, 22 May 2026 14: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMSGh3tjGz3Q9t for ; Fri, 22 May 2026 14:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779459900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HsZAABT4buKvxmV0oImrH6nr7Bv9NW2HD+sBdoNua44=; b=Awbcf1UiwXuFqvpuL4euAiUu55KPMq4M2dzBmAAfw4J2UYefDxfWn2DCb5plirM3Ry6qPN YwJ3Uur8eowciqOpMzAB9U+EieHXRrpEIqg+GV5iswAlMAEoXNMKHRV+jk9LHNE8FxY7fj 0TXWIwJb45mhOVQ6FEVdwtzCWFwFg6py90gOkZsSDNzrlj/+DjL0Eoi0OeEuNeVxxKtuoN le75Q2aVZVK7+d/FVd0kbgdvdr/e5BA1dZDoVmk3vqV4yeFKFdGaJ1b+zhZ0xiSJG2VH5B gc1Y4fF73MeereGZKEvi94mRouHAcjR7Oj55TrCxVNrLE6BWjCup+ysdsKztwQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779459900; a=rsa-sha256; cv=none; b=IALYQ8mAojabUksK52HWA0Igerglyh+Es80/AEoH3hrGbq3sUSpy0smbtDZ8tJC9YURdYt FPU2/5C/KbJCsfd+slha1TiFcrxEXupWfUwvLodZVE/TwCmEohc7OqR7Ekx+gPiDtVJiXd 19oGVzvB/GWsotoieHvhEl8kMyAEBzxk5ZLHYaSxQsa+YAnnUXW4LBubBGaTeq1CUlKGaT ujPS4VmHdWS/TveRLHwfKYxkCTew1w8zQGpOf+CR9FZw9aZu5VSrKPh/HpiwYwU4DPhxSH vacUuqQJLcQHgbHJj5zTqb6j13sM7JMWicNj01EuLQSL6fP81TVGNbZr6BeNpQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779459900; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HsZAABT4buKvxmV0oImrH6nr7Bv9NW2HD+sBdoNua44=; b=CGXp4dlQULjQ1pxldVjLvZeEmPhhf52VadhHcBADaCDc9piDV8h75w99KGcTazCh75VuRO UoFc0KR/XiOogfp8iwACSgQ5+zz8MvLwos38NFL/lPknfZvctztPWNRE70MDomI/Hd+pvZ rSjM5FXlgKujyw4r4P7qN/EW8/f6kipVF2mirMvvpT3tA0cB6riXfnRDqXGWeRWcTUmPpo Ka0g65JNHz3rSgzHFjP+2+hQVsEH/WsXwPOb28DGoPYqt5mMrcF0yOmsCVmC7+vMMahEpU 1ZUlrZZ+bOGVclkqOJJCJtvqQg/wBY3LCOnCVmfTnZKc23gm1yrhlqUxRALPOQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMSGh34Cgz80C for ; Fri, 22 May 2026 14:25:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 197c8 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 14:25:00 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 1a4ad649cb13 - main - netlink: Avoid undefined behaviour List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 1a4ad649cb135501f0bee56a4214e8c904ca402e Auto-Submitted: auto-generated Date: Fri, 22 May 2026 14:25:00 +0000 Message-Id: <6a10673c.197c8.27ef3f@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1a4ad649cb135501f0bee56a4214e8c904ca402e commit 1a4ad649cb135501f0bee56a4214e8c904ca402e Author: Ed Maste AuthorDate: 2026-05-22 00:50:00 +0000 Commit: Ed Maste CommitDate: 2026-05-22 14:21:11 +0000 netlink: Avoid undefined behaviour Even though it is not dereferenced, it is UB to take the address of an out of bounds array element. Reviewed by: pouria, bz, des, adrian Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57158 --- sys/netlink/netlink_generic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/netlink/netlink_generic.c b/sys/netlink/netlink_generic.c index fb74860e42b3..c2f82eed5656 100644 --- a/sys/netlink/netlink_generic.c +++ b/sys/netlink/netlink_generic.c @@ -127,13 +127,13 @@ genl_handle_message(struct nlmsghdr *hdr, struct nl_pstate *npt) } family_id = hdr->nlmsg_type - GENL_MIN_ID; - gf = &families[family_id]; if (__predict_false(family_id >= MAX_FAMILIES || - gf->family_name == NULL)) { + families[family_id].family_name == NULL)) { NLP_LOG(LOG_DEBUG, nlp, "invalid message type: %d", hdr->nlmsg_type); return (ENOTSUP); } + gf = &families[family_id]; struct genlmsghdr *ghdr = (struct genlmsghdr *)(hdr + 1); From nobody Fri May 22 14:54:43 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMSx00xhfz6dwv2 for ; Fri, 22 May 2026 14:54: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMSx00S3xz3T6Y for ; Fri, 22 May 2026 14:54:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779461684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4Cy9sf0cP1Kk6jMsnEdHjUWzHHLr4+vXwmSDiJPkEw=; b=qlEu46GEfWxtDUetHDV1u9YXrqPLCHlbV39Wjg4lQ+ZOK4t2h30VuCZLaxWJO16c1WC6BK kIpJ7ooxypiSHEI196Cf5or6Xxyf79poNg+cbH5HesJ12yoDniJ3DDkuIrfD0UFHHNjzsz iGpC2TKjXlNfk5ZZWKq4FMqmSf0yj4xU1Mg44ND4SweZ/ePcMq95HQcD9vL3OlGHmzAxYr D5W75quBC3WPS0n/GKIcNx9Ab+LMalgzVINsbfP58MTBQK0fb1pK6/FtlBuTkdMiLutzQZ sMfUX17CqKerAcxY5hslhP3WRQlXxSSAy2M1KFK9SD7jV+e7yEC7zD+qbXG7XQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779461684; a=rsa-sha256; cv=none; b=wWdSrtOMn4SlttIPNTe+yfeL4l8cZ04Lg1qGvhypKjE2ooVGfUjZHExXRpCzpsrfMukO53 tBs5VWu1XSz1A01sFkW2zylChD8P54m2Hql3NgtlRoxnM3GPKfoo54jFyMH3bUwxcA7111 gB00nnf+xUO6ocyA2nOQNySuauuag8VNs7HSY6LrYDlaKiv8ySSUn437i4PQ9ijzPB3EGL Uzx7g3AXKqyzOm0YToocqsB6OWwn++7fMnAPcsZogGn02Ygi07N4GVugXTmT0qri3XPHD1 CHU9Mrq65hr1Baii1OjKIOVwbMzAyDnrYuIOBNZSwGVVnP7/oSYdHAOHoG58GA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779461684; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=G4Cy9sf0cP1Kk6jMsnEdHjUWzHHLr4+vXwmSDiJPkEw=; b=xY9vWsnS61MmkNk1IP/cPQxKVV5VTrTjdOEhurLjf79Dw7c0JMpj7YhMY1FzfRpxnJy9xB ySiUNzDbgrHtJcSHhjTU9nkWd/OZk5Rfwb4+s6AZWMGSfOopKl1MxH9akQlqRKGJfM6cjz 30sqhZQA35jO6y4gXRKl/m+Sa4mnHgISl+z1GeBdCETIQtiGLiCa2pJpdmFn3O27RxRhik 2Q+r8gP2DeAyyjuR2WnvHKCtxbnjtcg7RsNvrCqtkb9cj2lwnr/mLG6jZDUOL6WpxD62QL kp9iNxqXAQXNWY/bEqn7p9C4vKX+kEHc8+WDH9iNyAoZA84+jGvgiahZZyYXEw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMSx000lbz9Vd for ; Fri, 22 May 2026 14:54:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1e41c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 14:54:43 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 6ab30433a73b - main - tests/net: Run all tests with execenv=jail and enable parallelism List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 6ab30433a73b5e52a0562010b75257bcfc57bcbd Auto-Submitted: auto-generated Date: Fri, 22 May 2026 14:54:43 +0000 Message-Id: <6a106e33.1e41c.42b3d703@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=6ab30433a73b5e52a0562010b75257bcfc57bcbd commit 6ab30433a73b5e52a0562010b75257bcfc57bcbd Author: Mark Johnston AuthorDate: 2026-05-22 14:44:08 +0000 Commit: Mark Johnston CommitDate: 2026-05-22 14:44:08 +0000 tests/net: Run all tests with execenv=jail and enable parallelism This has been stable in my testing, and enabling parallelism speeds up test runs considerably. In particular, with -v parallelism=16 in a 16-vcpu bhyve VM my test runs go from ~50m to ~40m; the exact numbers depend on the kernel config in use. Reviewed by: pouria MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57094 --- tests/sys/net/Makefile | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/tests/sys/net/Makefile b/tests/sys/net/Makefile index 6dcc23b49b67..b1bd2c06f729 100644 --- a/tests/sys/net/Makefile +++ b/tests/sys/net/Makefile @@ -6,8 +6,6 @@ BINDIR= ${TESTSDIR} ATF_TESTS_C+= if_epair ATF_TESTS_SH+= if_epair_test ATF_TESTS_SH+= if_bridge_test -TEST_METADATA.if_bridge_test+= execenv="jail" -TEST_METADATA.if_bridge_test+= execenv_jail_params="vnet allow.raw_sockets" ATF_TESTS_SH+= if_clone_test ATF_TESTS_SH+= if_gif ATF_TESTS_SH+= if_lagg_test @@ -16,6 +14,8 @@ ATF_TESTS_SH+= if_tun_test ATF_TESTS_SH+= if_vlan ATF_TESTS_SH+= if_wg ATF_TESTS_SH+= if_geneve +TEST_METADATA+= execenv="jail" +TEST_METADATA+= execenv_jail_params="vnet allow.raw_sockets" TESTS_SUBDIRS+= bpf TESTS_SUBDIRS+= if_ovpn @@ -26,11 +26,6 @@ TESTS_SUBDIRS+= routing PROGS+= bridge LIBADD.bridge+= netmap -# The tests are written to be run in parallel, but doing so leads to random -# panics. I think it's because the kernel's list of interfaces isn't properly -# locked. -TEST_METADATA+= is_exclusive=true - ${PACKAGE}FILES+= \ dhclient_pcp.conf \ pcp.py \ From nobody Fri May 22 14:54:45 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMSx15Gv2z6dwrm for ; Fri, 22 May 2026 14:54: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMSx11pByz3T8p for ; Fri, 22 May 2026 14:54:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779461685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EbMQsQfMlXaLCaVDjhNlkcX7JTsO5u9BxBQ93F4zu0k=; b=tHs8rRbGBggzoPSrDL5el/gzd/QggBDagw1G5Isbvsoj1VoFBRHVywfRXyzU7nQDYBLzGW 6f1ffFlBegAVqHlTOL2RQrRXIoz03o2ae3vApOx/8l8BcDoKJxLFHeussGTfMD8FNky3l1 otdk6Rysp6F3Qt0Dhxypk45tvpcEGA23VA9CoW3q3c3PWCJjMGviZXjRiYucWMsVuD5xwI 5W4SXRdaG6oVaix0nO6nMl8sGsfZFK5n/eYJJmUzxGr/gx3dm7VcUgUmWBcTz4ENhpMBh6 blCmAuI45HL/btcY0fl4hsusn6KC8O94fuW/mQ7Ttmf0Bh7PQpeYwsm0VCiafA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779461685; a=rsa-sha256; cv=none; b=ApLZB3tZ1UBt+TbfPOgzJDUz7q3YOnrGTlqqLEmrwNKOZwFfmu/hlTvJoVROf7SAEFC7D2 47SD9eg9M/l+Af8kazuoN/Ieql84huHMbMiptpPcWW4kqkHWYPwR8MIIy7iuNRRHY58yFC kBrRLAaML0uxptYhI+oHG2CHT2VfYyJDV7ETCMKnMBWMlzJOcVHewEyXRn3J4jGjxjNNC6 qsub6Qkqdr8THvBIeeY7slK3MdIvq2EzwF5+iMicYXrZayuzDV2Q27lLjnZo7Vjgjj+BtG ZyEn2nfJS/D4z61Nu2IqgaMZc4RGxej1cXtkqrePiX/fGApmpFXtzobYk1wK9w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779461685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=EbMQsQfMlXaLCaVDjhNlkcX7JTsO5u9BxBQ93F4zu0k=; b=RuMwoNfREQXk8s6cCvLYNvGNuxPhDqueOWCpCL6Qpmb4Sn1i5zeyjyYJIB85sXbLd8/rya ucsM0lmuSX7s8ay5uZ5EJIGd3VoczfDBslvxhIgOfmwZ1cIwHY06NAboWoUBMQs0VA8aiX lOyt0pZSHicSs7eFPEtICY0ZYM9BTTH+sAiYqsfmrZZsksgLhQCGPZt72HAjoTv7MDww0D F/ZfxzTfOChlCMCp75IbXcgM8zDFXN6xWZsC17a7Eg6nMvyPvZsoNW4sq4VIraNUbw7g8/ qwnPYp71zfzAnilUkrXri1DaG4zmby/wdkYLCfSTuYfZGOYTlmbWqPyytarWxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMSx10rcVz9Zp for ; Fri, 22 May 2026 14:54:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1de09 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 14:54:45 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: 8deebce931fa - main - kernel: Enable -fstack-protector-strong by default List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 8deebce931fa9b469cf28a082038a64caf972602 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 14:54:45 +0000 Message-Id: <6a106e35.1de09.3dc6a77e@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=8deebce931fa9b469cf28a082038a64caf972602 commit 8deebce931fa9b469cf28a082038a64caf972602 Author: Mark Johnston AuthorDate: 2026-05-22 14:45:52 +0000 Commit: Mark Johnston CommitDate: 2026-05-22 14:45:52 +0000 kernel: Enable -fstack-protector-strong by default This extends stack canary use to all functions which define arrays on the stack, not just those which operate on byte buffers. This option would have made it harder to exploit SA-26:18.setcred and SA-26:08.rpcsec_gss. The change bloats the amd64 kernel text by about 350KB and increases the number of covered functions from ~1500 to ~9000 (within the kernel itself, i.e., not counting kernel modules). Reviewed by: olce, olivier, emaste MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D56870 --- sys/conf/kern.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk index af7b1589c5cd..b87583db21c5 100644 --- a/sys/conf/kern.mk +++ b/sys/conf/kern.mk @@ -235,7 +235,7 @@ CFLAGS+= -fwrapv # Stack Smashing Protection (SSP) support # .if ${MK_SSP} != "no" -CFLAGS+= -fstack-protector +CFLAGS+= -fstack-protector-strong .endif # From nobody Fri May 22 14:54:46 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMSx26tcfz6dwg4 for ; Fri, 22 May 2026 14:54: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMSx22Jfwz3T4s for ; Fri, 22 May 2026 14:54:46 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779461686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LrRauNhajClK80HYhG7GWooVPM1r3mh4P+/gvIq10SU=; b=mR0sDMc7EtjvdrSDpIuKroA3x4LR5/WfzP9ilLlUcOME9iatiQmwpys9D5vMdL6c5D7WGg qaSwUer9Yke5SicmfYACkKQa1u7RsZSLmuy8DiY1zIqMFTv/AxrbisZATxKFe1oC0gzGer HWW3CPPJJeYsWsbkhswNfmOyT/RBV/WyYci35J00STExhvmMY0T84y2S3qkPCij9mKuhxm nsJEUyrnVDt/0IUNhmk1NhJ2S92KCvsv+HDgBOwn5jRQhaj+jd8FX/W49L7mYhTn1pLxb+ jzR6SV0lFvAHIa2Kr5JaFifcJWSjNC9INcRjlyFurDof92Y/nyd8XfNMc/fEjQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779461686; a=rsa-sha256; cv=none; b=chp6oJGFNrDnnOdiXC3mNplhKCxCjmQl3Eleg320l0G0N07g6d6Qc+rQ+R3+px2+UUkTye HtrdOz/MjWH2n0VGr+wFtaf6OAi5QHbgdtgK8bqERD5PBxkUpg7lqo0bVUpvDwBmFU4KI9 yMA4kUpzKTo6HyNhCrT9dtulVC/O8yVpkhX8H6+A4akCPLK4TVLfpStIS9iIsw+3JSZPxN W06IceLmdOTnWZ3dLeMnmvf3ppBSpAYNXFDT+6UOFbM3mF2seVwdkRQg5Mq+xLQxkdauJS GKGixr5FRsbYIOWKTiomvf+AGoVGshuLtSzky2HdY/Su7KRz5/kZJeYGQTTGcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779461686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=LrRauNhajClK80HYhG7GWooVPM1r3mh4P+/gvIq10SU=; b=TJlifW3oz0ddhoCpwdqmO09qot8Q97JvPE9SNTEPg8Bxwn5wroIqUqzc06yQy5xPJA6XWY 5T01OMk/j8ZvliNjPR+jsL18pB6LRKV3KrgOKetkVwVmOI/nJqCAsdqMtGYIY43DOhhNfQ LretkRHB7DPtUI7CNvqfhQe7z9+sd6LJ5ZapVtQUMtF0rIQvWC/eI0+XwEX9a5/pRjvWMS Gj/LuDMVkpjzuE1agDNtbk1PdsAY6yZshKsAsjPnPYlfdJjLDiA3rEv/82R1WrUBbZBC3S ragdzXXmaJuHz/IAMY/aqsQF25poZZ7pTQ8epZoaH1StBjwFCKaMen8Px/PjgQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMSx21d6Jz9Vg for ; Fri, 22 May 2026 14:54:46 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1df07 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 14:54:46 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: bc041630fae2 - main - tcp: Remove a no-op eventhandler List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: bc041630fae2ea89bf041bf5d13df220aae4b2bf Auto-Submitted: auto-generated Date: Fri, 22 May 2026 14:54:46 +0000 Message-Id: <6a106e36.1df07.23c8142e@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bc041630fae2ea89bf041bf5d13df220aae4b2bf commit bc041630fae2ea89bf041bf5d13df220aae4b2bf Author: Mark Johnston AuthorDate: 2026-05-22 14:51:15 +0000 Commit: Mark Johnston CommitDate: 2026-05-22 14:51:15 +0000 tcp: Remove a no-op eventhandler It has done nothing since commit bc7d18ae7224. No functional change intended. Reviewed by: tuexen MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D57101 --- sys/netinet/tcp_subr.c | 8 -------- sys/netinet/tcp_var.h | 1 - 2 files changed, 9 deletions(-) diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index 2b7ac6c4701d..7c56a7a77cb5 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1522,8 +1522,6 @@ tcp_init(void *arg __unused) #endif /* INET6 */ ISN_LOCK_INIT(); - EVENTHANDLER_REGISTER(shutdown_pre_sync, tcp_fini, NULL, - SHUTDOWN_PRI_DEFAULT); EVENTHANDLER_REGISTER(vm_lowmem, tcp_drain, NULL, LOWMEM_PRI_DEFAULT); EVENTHANDLER_REGISTER(mbuf_lowmem, tcp_drain, NULL, LOWMEM_PRI_DEFAULT); @@ -1629,12 +1627,6 @@ tcp_destroy(void *unused __unused) VNET_SYSUNINIT(tcp, SI_SUB_PROTO_DOMAIN, SI_ORDER_FOURTH, tcp_destroy, NULL); #endif -void -tcp_fini(void *xtp) -{ - -} - /* * Fill in the IP and TCP headers for an outgoing packet, given the tcpcb. * tcp_template used to store this data in mbufs, but we now recopy it out diff --git a/sys/netinet/tcp_var.h b/sys/netinet/tcp_var.h index 5b3733e8e91e..fa8fdb570897 100644 --- a/sys/netinet/tcp_var.h +++ b/sys/netinet/tcp_var.h @@ -1398,7 +1398,6 @@ struct tcpcb * void tcp_discardcb(struct tcpcb *); void tcp_twstart(struct tcpcb *); int tcp_ctloutput(struct socket *, struct sockopt *); -void tcp_fini(void *); char *tcp_log_addrs(struct in_conninfo *, struct tcphdr *, const void *, const void *); char *tcp_log_vain(struct in_conninfo *, struct tcphdr *, const void *, From nobody Fri May 22 14:55:36 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMSy228W4z6dwgJ; Fri, 22 May 2026 14:55:38 +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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMSy21C48z3VC7; Fri, 22 May 2026 14:55:38 +0000 (UTC) (envelope-from jhb@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779461738; h=from:from:reply-to:subject: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=hWi8Y1iKKfhgxpJll2vYqMnff6NNXZQA45NQQVRcezM=; b=hcxuPPEFKfyBCiKPt9eKndWD0+ilfjIH2x39r7r3xSvQxaggLK+yEwMwWjlHMILn1Uxkrz rV4wzeicLCbhf/oUAjnV+zXong0nx3J607QlM85DuWzpupuldqVwUK0FMPKzPHnbmrdTgG SBV5IVJRb2fWkahfMqDEUUnnOwZcgeTh+iSRRg3scSs80+/NBVZu9zqP1XGd7DKfW1RC2d 9aPQ1WqsXH3Mlf85Zk0Oc9QVCQdrNLmsZ4cj+CESDmgKPqtxMILV+DfpN9nKVJvvZTU+WO CIWP7sk6ayCgHDoHpbE4CWyb6QS8rplZr51jWUnOjzK5jpWihLWKvMuvK0fVKA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779461738; a=rsa-sha256; cv=none; b=CzQVn3u2OE1s+FwhzE9SFE9dXZ6VkYxwmqdeEhZC+p+RDJ7Pg2WI2Fix0qCZXRgFw3FDxv rH6tfBeo49RZXs+WXwZTqOhc293zq/TUkKCTNJsmA3kE8IWLNGRIBdhusVFR7l+0D8BTu/ v97s46LPdI0dH0gI2mJnqMd4HI06r5H8h3gTAYgoVxpUH6CxnsT85sz75NdQ+yoP2stK2c kCmYOetOX94ZETgjmXAudaukgnoh/kDgI+9BsG3J+qsdgH4SYlCOZp272Rn/zDl1yUV7ZX TQokiMe3lE7m6fQX96Oe6XngQcVKPPcNlphGT7DV57KEYc+N3Uv1hqPPBHodVg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779461738; h=from:from:reply-to:subject: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=hWi8Y1iKKfhgxpJll2vYqMnff6NNXZQA45NQQVRcezM=; b=mtbMvmMqqpqEc5ocboJowObjzn5DNYxMi+PD4gi+d4mLHZelPcNyTgeDOoFze6rapk5R58 849sExovMja8eETTZ9NIOTsQqJOLaiT0arGv9v4vc9TeAnanBCnT4a2E4kWIToEdoz/NCv brBmX0bDfXAGdx49fVIhYUyEgN4VqsG2WtHhzI59a7ZFgaoYoMakpXgiMcVMIm3UZbPXY7 PPbpGOzffgKmE2X85LWpgLMHr6rdCDhqIe0FbLNbIShGvBUn08+80FRhkBloGy+L9xjQkW XQPBFDzx5HZMCIJbFdsqymgwCklms7OtaPxgajtSBUYHsbI2SHmxFP/DHmtIpA== Received: from [IPV6:2601:5c0:4202:5670:b084:249c:1542:22b4] (unknown [IPv6:2601:5c0:4202:5670:b084:249c:1542:22b4]) (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 4gMSy16DVJz17Pk; Fri, 22 May 2026 14:55:37 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Message-ID: <5bc3179a-9146-4f32-b250-b64cb0ea541a@FreeBSD.org> Date: Fri, 22 May 2026 10:55:36 -0400 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 03c410ba1724 - main - man: Stop referring to non-existing manpage strlcpy(9) Content-Language: en-US To: Martin Cracauer , src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <6a0f6638.3c7a0.152892aa@gitrepo.freebsd.org> From: John Baldwin In-Reply-To: <6a0f6638.3c7a0.152892aa@gitrepo.freebsd.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit On 5/21/26 16:08, Martin Cracauer wrote: > The branch main has been updated by cracauer: > > URL: https://cgit.FreeBSD.org/src/commit/?id=03c410ba172426aa7f2a1cc19b94250686e5c8bd > > commit 03c410ba172426aa7f2a1cc19b94250686e5c8bd > Author: Martin Cracauer > AuthorDate: 2026-05-21 20:08:08 +0000 > Commit: Martin Cracauer > CommitDate: 2026-05-21 20:08:08 +0000 > > man: Stop referring to non-existing manpage strlcpy(9) > > Reviewed by: ziaee, mhorne, kevans It might be best to not use a manpage reference here then. You can't call userspace functions from the kernel, so it is a category error for a kernel API manpage in section 9 to ever refer to calling a userspace function from sections 2 or 3. There is an implementation of strlcpy int he kernel, and the point of the section 9 here was to indicate that there is a kernel version that can be called. However, there are many, many functions in section 3 that do not have equivalent implementations in the kernel and cannot be called. > --- > share/man/man9/copy.9 | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/share/man/man9/copy.9 b/share/man/man9/copy.9 > index 3a3105ddf644..fe51bbd12704 100644 > --- a/share/man/man9/copy.9 > +++ b/share/man/man9/copy.9 > @@ -67,9 +67,10 @@ to another. > .Pp > .Fn copystr > is deprecated and should be replaced with > -.Xr strlcpy 9 . > +.Xr strlcpy 3 , > +which has a kernel-to-kernel version. What does this sentence even mean? We don't have a version of strlcpy anywhere or strncpy or strcpy that tries to copy between different address spaces (e.g. between user and kernel pointers). I think this is trying to address the confusion you've just introduced, but you would be better off IMO just saying "strlcpy" I think, e.g.: is deprecated and should be replaced with strlcpy. > It will be removed from > -.Fx 13 . > +.Fx 16 . > .Pp > The > .Fn copyin > -- John Baldwin From nobody Fri May 22 14:57:10 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMSzp3qgfz6dwft for ; Fri, 22 May 2026 14:57: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMSzp22t1z3VlG for ; Fri, 22 May 2026 14:57:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779461830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UhrE69UwamrhLsgbQaX0qS1UCO1t+EKIOtQafI5rZ0s=; b=Sq/vfSb76pr3BWkkfEvw3JQb777lAQezq61pyYAXsutP6xT/rB7aipdqYF8/HeNRIa1hOQ NNJ1nKRlT+wjkZpQtVSPGjEa7iv45+szmkSKUKHmfaT2WL57RuDQC1nkTq865oS8d2a2eh KFeYLf14VYSkkb5yEvOE/mwE50OtcNTnm88rAhE3Xxl8HoMSioLVoaX1C/poQEsVufNstL Zh4JqHdt6tBno3kRiGLEt6wb6s+UAidIAeEjpJEgtgtV4NlJ0BHbkQXfwjfbbpe49RX5fF n1q8PvQEDIvN3UVZXLxP3FNVom+AJwXEwDrBmhJPFBKX0wNyctxUUXJ7Oyq6qQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779461830; a=rsa-sha256; cv=none; b=g8HIPwL8Nw0mB6yhq/Gu7DvCQ+Qh+j3OKFbfo8rww50xwxjYFglXnnpsZ0pQOMwMyf1SOi jvybBXFeyfFynj94L2kCP2m/wAlxmuEfAh9LVUvWElFJfW/4ePD/nCyblfFuHtMDjEXLC9 14zdiUT3ffWLvwA9EPC44jrKzTZeFX2dngJPxetJ+aHWaQJ56+nVsl6Eku8AmjTvftzJJr uBSHIyCcyg9g3T9o9/6Ped7Z4tV+xBOJlZE5uVwSvLfY+hIZTCSqxs+LJpLma1qowmu5cG tMVFNdOYqN5XLk1a1XZvh40HJTKDmZGt8KK3nyNn+9ev1tipPK8QBZzGxkuzyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779461830; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=UhrE69UwamrhLsgbQaX0qS1UCO1t+EKIOtQafI5rZ0s=; b=jgNLWrPeS4TcE+1gEv58VjXfPUvVcNDCC0ZdQlpOR5fPpsGw7WBMtS+taVm/fu0oGIRhqK XRVJy1xJPbtMt0GQC0MSaqVuPfMfSmT6D0CzV8PFWj9WQxfFQaZwNFhhyDBOOkO3M9nyo+ +3MQvIrV7M++wFVp1v5tl0B/iZNDFu2cLKF03YctjxEX5iFlZNMGhgsyMZOUzKdnqAsvgw DYgOVOfYCx6SSPCF7VTxEszKc6QZxx/714NaIq/X1VUDjxqDCfoBinGt2jCVVy2H4iWwsW Fb4SQJrwhK63no3C8+1j3Sm8s2B8SW6HXfC7j9VilyS6gIXJr6pPu6fYnZgwbw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMSzp1fSKz9Nh for ; Fri, 22 May 2026 14:57:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1df0b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 14:57:10 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: c9546bb61910 - main - tests/procdesc: Use a more efficient mechanism to block List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: c9546bb61910d40f4cb0dfb9716ba6eba44d1a0d Auto-Submitted: auto-generated Date: Fri, 22 May 2026 14:57:10 +0000 Message-Id: <6a106ec6.1df0b.241bdf1d@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=c9546bb61910d40f4cb0dfb9716ba6eba44d1a0d commit c9546bb61910d40f4cb0dfb9716ba6eba44d1a0d Author: Mark Johnston AuthorDate: 2026-05-22 14:56:47 +0000 Commit: Mark Johnston CommitDate: 2026-05-22 14:56:47 +0000 tests/procdesc: Use a more efficient mechanism to block Reviewed by: kib MFC after: 2 weeks Differential Revision: https://reviews.freebsd.org/D57149 --- tests/sys/kern/Makefile | 2 +- tests/sys/kern/procdesc.c | 41 +++++++++++++++++++++++++++++++++++++---- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/tests/sys/kern/Makefile b/tests/sys/kern/Makefile index d7a6af905b7e..dcaeb8d2f1fa 100644 --- a/tests/sys/kern/Makefile +++ b/tests/sys/kern/Makefile @@ -106,7 +106,7 @@ LIBADD.kcov+= pthread CFLAGS.ktls_test+= -DOPENSSL_API_COMPAT=0x10100000L LIBADD.ktls_test+= crypto util LIBADD.listener_wakeup+= pthread -LIBADD.procdesc+= pthread +LIBADD.procdesc+= kvm pthread LIBADD.shutdown_dgram+= pthread LIBADD.socket_msg_waitall+= pthread LIBADD.socket_splice+= pthread diff --git a/tests/sys/kern/procdesc.c b/tests/sys/kern/procdesc.c index 2d710ef057f2..2fe50be45bf7 100644 --- a/tests/sys/kern/procdesc.c +++ b/tests/sys/kern/procdesc.c @@ -33,15 +33,50 @@ #include #include +#include #include #include #include #include #include +#include /* Tests for procdesc(4) that aren't specific to any one syscall */ +/* + * Block until a thread in the specified process is sleeping in the specified + * wait message. + */ +static void +wait_for_naptime(pid_t pid, const char *wmesg) +{ + kvm_t *kd; + int count; + + kd = kvm_openfiles(NULL, "/dev/null", NULL, O_RDONLY, NULL); + ATF_REQUIRE(kd != NULL); + for (;;) { + struct kinfo_proc *kip; + int i; + + usleep(1000); + kip = kvm_getprocs(kd, KERN_PROC_PID | KERN_PROC_INC_THREAD, + pid, &count); + ATF_REQUIRE(kip != NULL); + for (i = 0; i < count; i++) { + ATF_REQUIRE(kip[i].ki_stat != SZOMB); + if (kip[i].ki_stat == SSLEEP && + strcmp(kip[i].ki_wmesg, wmesg) == 0) + break; + } + if (i < count) + break; + } + + kvm_close(kd); +} + /* * Even after waiting on a process descriptor with waitpid(2), the kernel will * not recycle the pid until after the process descriptor is closed. That is @@ -128,8 +163,7 @@ ATF_TC_BODY(poll_close_race, tc) error = pthread_create(&thr, NULL, poll_procdesc, &pd); ATF_REQUIRE_MSG(error == 0, "pthread_create: %s", strerror(error)); - /* Wait for the thread to block in poll(2). */ - usleep(250000); + wait_for_naptime(getpid(), "select"); ATF_REQUIRE_MSG(close(pd) == 0, "close: %s", strerror(errno)); @@ -159,8 +193,7 @@ ATF_TC_BODY(poll_exit_wakeup, tc) error = pthread_create(&thr, NULL, poll_procdesc, &pd); ATF_REQUIRE_MSG(error == 0, "pthread_create: %s", strerror(error)); - /* Wait for the thread to block in poll(2). */ - usleep(250000); + wait_for_naptime(getpid(), "select"); ATF_REQUIRE_MSG(pdkill(pd, SIGKILL) == 0, "pdkill: %s", strerror(errno)); From nobody Fri May 22 15:30:57 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMTkq55fHz6f1YM; Fri, 22 May 2026 15:30:59 +0000 (UTC) (envelope-from markj@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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMTkq4JJ9z3bTh; Fri, 22 May 2026 15:30:59 +0000 (UTC) (envelope-from markj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779463859; 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=PM3JvZtK0ZiEg9FrHFnmtsOJ5uxK8EOwIG0CIASfXl4=; b=cj6pYWRNMBcuKkTC9TsqpdGMH/2wdsFRJenebKyQioqxLo5pXIGK7aPxUWcPhh6IgKr63M AeymzsOqzmDYurTdDvTSpp1WkB8xPmCXrno/maUDo3JhIAwLJe+1TPMcfU5SvrpcQtpRuE g9OxVA8fNg2UsirtyzTVk1MfVtBg77UMgqSjQOJsvytZ5A29TEUxNZaPaKhBkUE7J3+mc4 VgXs3DfyWp66G3Nol/xARbXQ4Tt+H3OieEIOmVhIwedMRqVT/cZUePtI0q8M7PRf9COiFf HMB+hhUo57fNn1NcubWmL7lxBn83nxSy8+Rc18rzSI5hh9WNWWzTvV05vzeMRg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779463859; a=rsa-sha256; cv=none; b=AzeHFnVWRQUEOrmyaoCf/UZPpiux5RK3Gp7iAMlDSQsHwZwrJb+lGAMDDMI3uac2Jj0Dpc 7+hx+F2C6JsQuJaQ485VMgn8jUqris1AAlR692M5Gpmg41RXUFsJeV2Y8aL7oLjkQwmPYw I2agKarvOKzhHvRYhX4Dl8Qdwolv3JAXMLOZSGJqy6fFPDMQgzx8cILAZSEzoOWaw+0DKi C7b9IdM0krXNpDf0BDc8UuYDhmQLrfb59st39iKlQM7WXCtowsHyTGu/MaiIZ561bfhJOA f3xpgNGpU6/OdU2iELNEreq8rK68LVaGXsPqjlozp7aeVgWI1v8ukrKUvVSOTQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779463859; 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=PM3JvZtK0ZiEg9FrHFnmtsOJ5uxK8EOwIG0CIASfXl4=; b=bTo42/2mOPJv/BiSO3YDh38w1j2SKuHrXQf0OjmvAH0+hHFqL9xB3yUi9QhNdewI2qJpuL ZW+qwxiqmG2QSxP/UYJUegm22+jlpY4JRv6mKkW4vlUe5sZ0oNl+oPig8k0Zs5SfntY38d RAOk0peXlx9XpXBhRZrl0I5t9JQSYQ4BHXpSh6enTD4d1rBZt2m5BoovbeNaajQodpzl2Z bmjzSuPSuefaPS033CdUNT9KP/qQzjorpiRw+l0pwcBdBbhCoIAeICWrnvwzYfHKp/TBRO wKscA6yiwQQtvLRkSlWskaMkn4DvRs8LN20j3ksG/sK4YlfP93u4hiqsrtxZWA== Received: from nuc (192-0-220-237.cpe.teksavvy.com [192.0.220.237]) (using TLSv1.3 with cipher TLS_AES_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: markj) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gMTkp73xgz186L; Fri, 22 May 2026 15:30:58 +0000 (UTC) (envelope-from markj@freebsd.org) Date: Fri, 22 May 2026 11:30:57 -0400 From: Mark Johnston To: Konstantin Belousov Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 8deebce931fa - main - kernel: Enable -fstack-protector-strong by default Message-ID: References: <6a106e35.1de09.3dc6a77e@gitrepo.freebsd.org> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: On Fri, May 22, 2026 at 06:22:10PM +0300, Konstantin Belousov wrote: > On Fri, May 22, 2026 at 02:54:45PM +0000, Mark Johnston wrote: > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=8deebce931fa9b469cf28a082038a64caf972602 > > > > commit 8deebce931fa9b469cf28a082038a64caf972602 > > Author: Mark Johnston > > AuthorDate: 2026-05-22 14:45:52 +0000 > > Commit: Mark Johnston > > CommitDate: 2026-05-22 14:45:52 +0000 > > > > kernel: Enable -fstack-protector-strong by default > > > > This extends stack canary use to all functions which define arrays on > > the stack, not just those which operate on byte buffers. This option > > would have made it harder to exploit SA-26:18.setcred and > > SA-26:08.rpcsec_gss. > > > > The change bloats the amd64 kernel text by about 350KB and increases the > > number of covered functions from ~1500 to ~9000 (within the kernel > > itself, i.e., not counting kernel modules). > > > > Reviewed by: olce, olivier, emaste > > MFC after: 2 weeks > > Differential Revision: https://reviews.freebsd.org/D56870 > > --- > > sys/conf/kern.mk | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/sys/conf/kern.mk b/sys/conf/kern.mk > > index af7b1589c5cd..b87583db21c5 100644 > > --- a/sys/conf/kern.mk > > +++ b/sys/conf/kern.mk > > @@ -235,7 +235,7 @@ CFLAGS+= -fwrapv > > # Stack Smashing Protection (SSP) support > > # > > .if ${MK_SSP} != "no" > > -CFLAGS+= -fstack-protector > > +CFLAGS+= -fstack-protector-strong > > .endif > > Can ssp turned off from the kernel config? Yes, add "makeoptions WITHOUT_SSP=1". Of course, that disables SSP entirely. From nobody Fri May 22 16:18:23 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMVnX04N2z6f6D3 for ; Fri, 22 May 2026 16:18: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMVnW6SF4z3n0N for ; Fri, 22 May 2026 16:18:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779466703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R4QOzFOzqvBGeiGDKZ3x2H9OiZufT4h7mqG06xDUG/U=; b=WL2u//pgJk3OtUEYDUz9X00SWrte+1yo8MwJVHCLM8gfChuNxdI5Hlaih87PBiVenadtv5 hXTrdu0/XZgROsmM4XeRTzoI1SV1k6gcZSSDKHwmK5Cky7N2J04WvM2kp/so6Tt/DPoD8y 1EggnTSI7ttVSat2upIyeZdat7UsilnWbazeLiE+MRzIzCR/PnXgVwXvDRhvFP94WvNlNR m4+Bkm5RkdWmPAMpJx0fq1xFxss2V7oXn4+QHzK4X6HH7tQRSbir86PGkAc3gmFmb3j3wL V6vctTbL9YmKAwa8smh3NVlxEqmVLVAUNcOK/W2zxl5a6/9fAbBDPje28L8kPA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779466703; a=rsa-sha256; cv=none; b=RhYb6h42zInxkflBFTdC7921iyZegq88O88rIDbE3vsXxWaGCrr+kIv+e0RjqqOSqAfvtC v/JQa2kGD/p2gEQabss0nzVXyFcMcoCT/mJsQcCUwsvS6ojbJnHubmj2WGJ1jHGBpZSJbp rSkdeWHtpv4dD9Nv8jARfkxRCfTlVVocMtJmCTzWUHFiUrdYIKjymrs1Bgxw32kCGyEAol 6tGahgJarmchzzvtLhR5gP+ax9Yt23mg2/uacIq8JtIqR+GGuFtcWnp+5TlBpvxw0tWuHu vhFqL7D49VZW6nXWbJtLmhrPjkN/nSLS9UUJq1bum+e0fX6wVjbBDIIKGun69A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779466703; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=R4QOzFOzqvBGeiGDKZ3x2H9OiZufT4h7mqG06xDUG/U=; b=ZXO822xkEcONrrlIB15z2Z2nLe5BybvfjezdtTlyd+d3iHYm73dODW1zZvi5FVHFXOE+mK 4UD03cFYnuCyGLmNFGVcfKdyUk6I4owDG949eGqqcEzuJBAUAdoTluMaRbVXBqWkdTwy8l PoSZomYyxEir8YNMLfJvw7UoxSgS3XYFrkaPZaGoO4/7vZch6LOYiC+vAiqwXRfns0jnjq f38X55qv2X8Xd1tfJKFO1ZHbLSyQwi3jC5ls/LS6cwJ/Bkf4D0IiuElJFxZxQm49hBsrMj 1OVNU+68KnFGV8/QIkqrkGjL9N8w47KQWrccaLVjhNJ4jxjyDQtWgVkTdVY2UQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMVnW5nkhzCGq for ; Fri, 22 May 2026 16:18:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2592a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 16:18:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: bed77cf7c213 - main - vmm/arm64: Compile vmm_nvhe.c without SSP List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: bed77cf7c213c3f93a0dc099e4b46c078495a328 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 16:18:23 +0000 Message-Id: <6a1081cf.2592a.122bd13a@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=bed77cf7c213c3f93a0dc099e4b46c078495a328 commit bed77cf7c213c3f93a0dc099e4b46c078495a328 Author: Mark Johnston AuthorDate: 2026-05-22 16:10:04 +0000 Commit: Mark Johnston CommitDate: 2026-05-22 16:10:04 +0000 vmm/arm64: Compile vmm_nvhe.c without SSP This file implements a set of EL2 hypercall handlers and is used to switch between guests and the host kernel when VHE is not in use. There is no SSP runtime available there. Reported by: Jenkins Fixes: 8deebce931fa ("kernel: Enable -fstack-protector-strong by default") --- sys/conf/files.arm64 | 2 +- sys/modules/vmm/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/conf/files.arm64 b/sys/conf/files.arm64 index faecea51d5c1..172f79cc5773 100644 --- a/sys/conf/files.arm64 +++ b/sys/conf/files.arm64 @@ -141,7 +141,7 @@ arm64/vmm/vmm_nvhe_exception.S optional vmm \ no-obj arm64/vmm/vmm_nvhe.c optional vmm \ dependency "$S/arm64/vmm/vmm_hyp.c" \ - compile-with "${NOSAN_C} -fpie" \ + compile-with "${NOSAN_C:N-fstack-protector*} -fpie" \ no-obj vmm_hyp_blob.elf.full optional vmm \ dependency "vmm_nvhe.o vmm_nvhe_exception.o" \ diff --git a/sys/modules/vmm/Makefile b/sys/modules/vmm/Makefile index dcb401d2026d..4084822c4f43 100644 --- a/sys/modules/vmm/Makefile +++ b/sys/modules/vmm/Makefile @@ -52,7 +52,7 @@ vmm_nvhe_exception.o: vmm_nvhe_exception.S vmm_hyp_exception.S ${NOSAN_CFLAGS:N-mbranch-protection*} ${.IMPSRC} -o ${.TARGET} -fpie vmm_nvhe.o: vmm_nvhe.c vmm_hyp.c - ${CC} -c ${NOSAN_CFLAGS:N-mbranch-protection*} ${.IMPSRC} \ + ${CC} -c ${NOSAN_CFLAGS:N-mbranch-protection*:N-fstack-protector*} ${.IMPSRC} \ -o ${.TARGET} -fpie vmm_hyp_blob.elf.full: vmm_nvhe_exception.o vmm_nvhe.o From nobody Fri May 22 17:21:30 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMXBM0388z6fGF1 for ; Fri, 22 May 2026 17:21: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMXBL6cBLz42tk for ; Fri, 22 May 2026 17:21:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779470490; 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; bh=lXbRR4OltMhPo3+qexO6ayNpqbi9o+mMHN6YXdBQm7M=; b=XSqYNgx2cW+CwrB51ObkTZIowHK6kDhvvIgtbRkvyrXI2XlfhaMEMxK3Y/dqKmcpaDIPs8 dqbokwXKhml6Y62YzsIM5jxVKDB7JRAaeQVLyts+aITPOT7qFPd1VTVnaFgmo5eabikHkQ EBnWKUe7akqK6iTyHMVvcXP9EqCFxA+ykVMcgeWSb09KfzqXN4xCEz5wlSSqQtq6tyFc8/ As5jOoi1gGvtwswOYuXA350WuD4sCRaOQtVFZrAvVC+/NTWNIIoc+g9w6GUAYWKVv+yoRG NjGk9m+psdcMeE84K4B8KZ4h4ejDMXRtF1K8L7MxHeRLEGjPd6sBezTYkgGdeg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779470490; a=rsa-sha256; cv=none; b=eE7LLaO+7RNxiAJZh462R5HGUEoZCZi77DkOlFiVnqsxZLnfurQ7h/gDU1xz84LVUHZwpO K8BJECBO3Hi+eZhREqAAiJ92JdrApkSKDKjcZ4lSQkxT7CgR6lTzG2TcPqbQM+1SxuhErx JkRgWWtQrFSo1iP92C5qMirUMc3M4LYmKEdDRxHqJ66G/edZvw0ICEFcvDjGEViXWTTzWt jZTpXDtgyCL6NnsDmFva5T85ZmRBcnfgGsnyVJO/Jb45rGs86vpfn/+agheLQ2SdJW3GBP 3X33sWl5Ka6MT7jPzv1JDWMgr3Lxhvute7GZqvtQuuOCZTp5MNyXsKZGGTBaqQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779470490; 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; bh=lXbRR4OltMhPo3+qexO6ayNpqbi9o+mMHN6YXdBQm7M=; b=jqAJY5hnyfOBuZzY1C9/LeBzbFJu4QgkM5Q+tFNIJd/vjOc+zPz3yf3yZUYXIT/FJ8zQWU gp7MEKaS7gIXmWbEHEpt7x6wSmOrIG0f7C9HGzSRAkVqx5LlFRIFqqVoWCY1LLY8wIEH8u VZ2F+FI+mMbtkvyXioTn4eLIueDN8eDas1xskmv//FI8qePgWi0HVKk6TBw+h4hNkzloqZ CB+XTUie52lPKW5Spg6IdihKIjYK5X79jQm1nb1GEwbQ2GSDcpC8H9Oq6uugaaR9ya9CsR 259eJx0Luz6imRx8dUPnSRu3Y4lr00gtWExS0AYH84de+I5Tw5bJNi2seZuWGQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMXBL6CM3zVRT for ; Fri, 22 May 2026 17:21:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3658f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:21:30 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jitendra Bhati From: Alan Somers Subject: git: e030e4e73fe7 - main - lib/libc/gen/fts.3: use 'options' consistently in fts_set() description List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: e030e4e73fe77f3626f6468e89219deed316553d Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:21:30 +0000 Message-Id: <6a10909a.3658f.23bddadc@gitrepo.freebsd.org> The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=e030e4e73fe77f3626f6468e89219deed316553d commit e030e4e73fe77f3626f6468e89219deed316553d Author: Jitendra Bhati AuthorDate: 2026-05-21 01:51:45 +0000 Commit: Alan Somers CommitDate: 2026-05-22 17:18:25 +0000 lib/libc/gen/fts.3: use 'options' consistently in fts_set() description The RETURN VALUES section used "instr" to describe the fts_set() argument, while the SYNOPSIS and all other references use "options". Fix the inconsistency. MFC after: 1 week Sponsored by: Google LLC (GSoC 2026) Reviewed by: asomers Pull Request: https://github.com/freebsd/freebsd-src/pull/2213 --- lib/libc/gen/fts.3 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/gen/fts.3 b/lib/libc/gen/fts.3 index da304e59ee72..199603b5f3c7 100644 --- a/lib/libc/gen/fts.3 +++ b/lib/libc/gen/fts.3 @@ -25,7 +25,7 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd October 6, 2025 +.Dd May 21, 2026 .Dt FTS 3 .Os .Sh NAME @@ -893,7 +893,7 @@ to an appropriate non-zero value. The .Fn fts_set function returns 0 on success and \-1 if its -.Fa instr +.Fa options argument is invalid. .Pp The From nobody Fri May 22 17:24:13 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMXFV16ktz6fH5c for ; Fri, 22 May 2026 17:24: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMXFV0Z9kz43ds for ; Fri, 22 May 2026 17:24:14 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779470654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7+lx6fbEl2GLwPsAPjwTiVCnGfzHDKS6rJuXKHYiJpo=; b=tivsT4zEnVsZ/dIwv0g+Iq1yxgt2m8Dn+3q1pmBjRI+zjezJmgIAhgwcaIa/miNIek3MgY Kvmx9IJ0+9fZeIKbmogoEtiy2PCIZ5sh0OreT7dFZ5WgeQKipuZlK5/Tfgn4JOy7Gf0CuO qTqqlHNuREShGRcHlXSK/6yUPn9iUMybLyZe/WazvIroaENZIZ+cz+ys/aZm4LVmEtJFjK 2uEy19lVfwXyL8OKp6qi1Pgys8OPV6WKeKxSymDj4d8xQhM8boIFbx47Sy3jKN9MvghmmS yPxMM+r0iewMbgX/EF8px9809k40Kv+RgwdhiKpygtysBwz9VHgmZvinQZnO1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779470654; a=rsa-sha256; cv=none; b=Oz4OziZuctFAZM+30RW8dBRE9qvH69TbHCiC04gnPZ+rKNOGnYQ3e/SCp+mBm2dJG/SyvQ RShTSNdT0aQ53FLWshA6deGuD7YPg8ahz3HVYQiKPLgCOKDhjggThFp0JjD5+Mn96cdJbx YQ1DGHvUKIdzIx/76Sbn8cmYULUTzDBjLNZlPjY8olaREx1W0NfI7nJ9oHC7bCZ06rCInb QsgTCLHuLyzXTa5ipd1X6CcIGixzQYn+6pnh0JJc4MzdmtYQTdjCHVT9HyGcAnQbwS5YqV m0W9WBrlChadBMLlHbqvoynQ4QAsreV4Y8V09IMJePLu4aKrP7YCqzu4IE0tEA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779470654; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7+lx6fbEl2GLwPsAPjwTiVCnGfzHDKS6rJuXKHYiJpo=; b=re40oo/E12n6ShsQKQM45Ma5GFAPfg9JyeE1edTpAV91hruIlsavOj5QttUxtvza6uIx8/ GNQMV9XlHQ7kkWeV0CMnNf45P6FUqpIDoM6bM7QXxovI5YsK6ow6eDRiI4O/Tj/f9KPMLz fL2zhgOxYHRvFXEkt5Z2zG8CtUBbpA6RKODsnoSjNkxNidICuw1d/+RTJYWyio+SG0Re5W rSEvhPJsUZ9MiefdEUz0r/MDEtfw1w6VL9JqI6GffUGW/QtauHy90wYl6K2Ly65RYPORXP IkWR8lL2hBAQhDapBS6S7H9UojvzQMUFaZD8nkno4MbhVORPksTdzkInOKZCpA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMXFV03g8zVjl for ; Fri, 22 May 2026 17:24:14 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 362a2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:24:13 +0000 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=B8rg?=rav Subject: git: cbe037c97058 - main - ldns: Belatedly update for OpenSSL 3.0.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: cbe037c970580efc40eeca4715ac51e4d0fea082 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:24:13 +0000 Message-Id: <6a10913d.362a2.72b82976@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=cbe037c970580efc40eeca4715ac51e4d0fea082 commit cbe037c970580efc40eeca4715ac51e4d0fea082 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 13:56:16 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 17:23:50 +0000 ldns: Belatedly update for OpenSSL 3.0.0 MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57168 --- contrib/ldns/ldns/config.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/ldns/ldns/config.h b/contrib/ldns/ldns/config.h index 3ac94403296f..0fe9f2c3dbce 100644 --- a/contrib/ldns/ldns/config.h +++ b/contrib/ldns/ldns/config.h @@ -118,7 +118,7 @@ #define HAVE_EVP_PKEY_BASE_ID 1 /* Define to 1 if you have the `EVP_PKEY_get_base_id' function. */ -/* #undef HAVE_EVP_PKEY_GET_BASE_ID */ +#define HAVE_EVP_PKEY_GET_BASE_ID 1 /* Define to 1 if you have the `EVP_PKEY_keygen' function. */ #define HAVE_EVP_PKEY_KEYGEN 1 From nobody Fri May 22 17:24:15 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMXFW2hsWz6fGy2 for ; Fri, 22 May 2026 17:24: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMXFW25tzz43dx for ; Fri, 22 May 2026 17:24:15 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779470655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O3MSbYAadvz626XwScl/NFWYPgYeFG0PP9MgZyukt7M=; b=SR+HCJtB9BCuiIOHrWORh/sQoowrErNKH+eMfwccDLWErBh3+onK/9xegWPs0FnD5QpYDJ /NpKtS67ggg3WsvwN5mcz4j00hLbST7MW8YmGiI/E7EKdQaILvnY4BGifC0yUHB/CveNtK NcGRoqaul9DAUpu0zv+BrAbIXzpChQz+SoygvDYBdRP4BrX0m7fmGtY85O8VJ4XOedTW1F 6SCrkQNWxFOuDOzeLfnTPBPZgHkGmHfR/33azrFo2dTPM363rVoAYoFKYQM/Dzt5mBFkUe cPJE2gOVE99vkC3gPcG3+skEVsnTJPeiTz3n2jMK6ZThurcJp0goILofpS0v2w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779470655; a=rsa-sha256; cv=none; b=CrZyDrlWN+SHtz5UzW19zZK2DORQnNi/m+oEU50sxE6l+PGyg8TJy8fQ0qkWNk3giv1vjA mzdKVFA5tEFo+5G3QGH++DEsm5xay4cEhlmYXIc3Ods2D0ca89poZT66GO1UvodV+nRPmg P6nHfrM0CcVhBviD9iXMRVpFzzCRy+Zn6nMMiq7COjxjXkb/M+M9XYFd2Vr2TiI0OeBLN8 Kr6BthHSxUyOzYg3B3DKC5u2h+2xzEthr5Y7HUFC+4BKDoYvE09pfY6ETb6Mm32bx0xMrO uYdL4l05Av5Z7Q3Mm4NJB5Pe/NgW0a3mzYwe4Vx/T888hlgwSm2YJKrCq2sUEg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779470655; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=O3MSbYAadvz626XwScl/NFWYPgYeFG0PP9MgZyukt7M=; b=v6onsnZArOSk+jhkEMKEfKzUFsIOavfzN7R8ym+x8cczfh1ymR6CiL3Vczp/idOLY+rx5V g4eitf0HtQWOZIpeqpp8c+D1yH2kgkunL3H/MyqxgiLnEYKYg+hRHh9HsB9m5CU53u675Q 5uAayzGUzaOd0RbvhUBAHlQI2t2EwVNG7BN+AGD0q1FghMIAt+BucCB5tMlCtyalMh6NSY 9tVYm8/BHZw0D9wP98DtqKyzagtp8elFWRhR8Japml2y0yQLcSUbyCMUQYWqLn8t4ULnfX CySAcS4DHSVrdSMx6MrzUuQxRPF5Ez838NsI/SCZ6THP2hi4djVCeeVhFkHl8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMXFW1ZJ7zVcC for ; Fri, 22 May 2026 17:24:15 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 35bac by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:24:15 +0000 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=B8rg?=rav Subject: git: 2bc6aa3c41d0 - main - import ldns 1.8.3 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 2bc6aa3c41d0dc330fefa6363a23d2cfa0253f73 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:24:15 +0000 Message-Id: <6a10913f.35bac.71a619bb@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=2bc6aa3c41d0dc330fefa6363a23d2cfa0253f73 commit 2bc6aa3c41d0dc330fefa6363a23d2cfa0253f73 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 13:36:27 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 17:23:57 +0000 import ldns 1.8.3 MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57169 --- contrib/ldns/Changelog | 41 ++ contrib/ldns/Makefile.in | 48 +- contrib/ldns/README | 23 - contrib/ldns/README-Travis.md | 274 ----------- contrib/ldns/README.snapshots | 2 +- contrib/ldns/acx_nlnetlabs.m4 | 223 ++++++--- contrib/ldns/ax_python_devel.m4 | 147 ++++-- contrib/ldns/compat/asctime_r.c | 16 + contrib/ldns/config.guess | 70 ++- contrib/ldns/config.sub | 239 ++++++---- contrib/ldns/configure | 876 ++++++++++++++++++++++++++--------- contrib/ldns/configure.ac | 150 +++--- contrib/ldns/dane.c | 4 +- contrib/ldns/dnssec.c | 8 +- contrib/ldns/dnssec_sign.c | 9 +- contrib/ldns/dnssec_zone.c | 3 + contrib/ldns/drill/drill.1.in | 2 +- contrib/ldns/drill/drill.c | 2 +- contrib/ldns/drill/root.c | 22 +- contrib/ldns/edns.c | 41 +- contrib/ldns/error.c | 5 + contrib/ldns/host2str.c | 20 +- contrib/ldns/keys.c | 16 +- contrib/ldns/ldns/config.h.in | 28 +- contrib/ldns/ldns/edns.h | 15 + contrib/ldns/ldns/error.h | 4 +- contrib/ldns/ldns/net.h.in | 3 +- contrib/ldns/ldns/parse.h | 26 +- contrib/ldns/ldns/radix.h | 2 +- contrib/ldns/ldns/rdata.h | 2 +- contrib/ldns/ldns/rr.h | 18 +- contrib/ldns/libdns.doxygen.in | 20 +- contrib/ldns/ltmain.sh | 851 +++++++++++++++++++++------------- contrib/ldns/m4/libtool.m4 | 229 +++++---- contrib/ldns/m4/ltoptions.m4 | 4 +- contrib/ldns/m4/ltsugar.m4 | 2 +- contrib/ldns/m4/ltversion.m4 | 13 +- contrib/ldns/m4/lt~obsolete.m4 | 4 +- contrib/ldns/makewin.sh | 65 ++- contrib/ldns/net.c | 4 +- contrib/ldns/packaging/ldns-config.1 | 2 +- contrib/ldns/packet.c | 4 +- contrib/ldns/rr.c | 14 +- contrib/ldns/util.c | 2 + 44 files changed, 2264 insertions(+), 1289 deletions(-) diff --git a/contrib/ldns/Changelog b/contrib/ldns/Changelog index aba41c88c5c8..c7f36767b360 100644 --- a/contrib/ldns/Changelog +++ b/contrib/ldns/Changelog @@ -1,3 +1,44 @@ +1.8.4 2024-07-19 + * Fix building documentation in build directory. + Thanks Michael Tokarev + * Updated the configure script for split openssl directories. + * Fix for windows compile; asctime_r compat, search for inet_ntop + in ws2_32, avoid double decl of inet_ntop, check for symlink call, + include config.h in edns.c, have socket compare use correct + signedness, add -u repo option to makewin.sh, fix quoting in + makewin.sh and check return value of bind and connect in net.c + for failure instead of a socket type. And fix to install .exe files. + * Fix to compile with OpenSSL 3.2. Update acx_nlnetlabs.m4 to 48. + * Fix to compile DLLs, and pick out of the lib64 dir, and include + libssp-0.dll and ldns-config. + * bugfix #237: Resolver uses nameserver commented out in + /etc/resolv.conf. Thanks grembo. + * Added RESINFO rrtype. + * Added WALLET rrtype. + * PR #241: Fix coverity cited problems. Thanks Enji Cooper. + * PR #233: Several Python SWIG issues. Thanks Florian Weimer. + * PR #231: const ldns_rdf * typemap fixes to support swig-4.2.0 + Thanks William S Fulton + * PR #227: keys.c: fix build with libressl >= 3.8.1 + Thanks Fabrice Fontaine + * PR #224: Portable executable progs don't underlink to libldns + Thanks Ørjan Malde + * PR #216: Update declaration for function with no argument + Thanks Ed Maste + * PR #214: fix the build in FreeBSD's base system + Thanks Pierre Pronchery and Dag-Erling Smørgrav + * PR #206: improve 'next-label' algorithm in ldns-walk + Thanks Jelte Jansen + * PR #205: Add functions to extract RFC 8914 extended errors + Thanks Roland van Rijswijk-Deij + * PR #203: Expand CI: Cygwin, BSDs, musl libc, 32-bit, and big-endian + Thanks Felipe Gasper + * PR #191: 16-unit-tests-edns: Fix leak & warnings + Thanks Felipe Gasper + * Added NXNAME rrtype. + * PR #242: Openssl no engine improved support #242 + Thanks Petr Menšík + 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. This caused packet creation with only a DO bit (for DNSSEC OK) diff --git a/contrib/ldns/Makefile.in b/contrib/ldns/Makefile.in index 57957d0844d3..32b91576d0d9 100644 --- a/contrib/ldns/Makefile.in +++ b/contrib/ldns/Makefile.in @@ -20,13 +20,14 @@ p5_dns_ldns_dir = $(srcdir)/contrib/DNS-LDNS PERL = @PERL@ swig = @swig@ swigpy_flags = -python @SWIGPY3@ -python_site = @PYTHON_SITE_PKG@ +python_site = @PYTHON_PLATFORM_SITE_PKG@ pyldns_inst = @PYLDNSINST@ pyldns_uninst = @PYLDNSUNINST@ pyldnsx_inst = @PYLDNSXINST@ pyldnsx_uninst = @PYLDNSXUNINST@ libtool = @libtool@ CONFIG_FILES = @CONFIG_FILES@ +top_builddir = @top_builddir@ LDNS_TRUST_ANCHOR_FILE = @LDNS_TRUST_ANCHOR_FILE@ DEFAULT_CAFILE = @DEFAULT_CAFILE@ @@ -85,6 +86,7 @@ LINTFLAGS += -D"__BEGIN_DECLS=" -D"__ssize_t=ssize_t" -D"__intptr_t=intptr # FreeBSD 9 LINTFLAGS += -D"_RuneLocale=int" DEPFLAG = @DEPFLAG@ +EXEEXT=@EXEEXT@ INSTALL = $(srcdir)/install-sh @@ -150,7 +152,8 @@ setup-builddir: # builddir/ is used by 60-compile-builddir putdown-builddir: - rm -f include/ldns lib config.h + rm -rf include/ldns + rm -f lib config.h test ! -d include || rmdir include || : if test -d examples -a ! -f examples/README; then rmdir examples || : ; fi if test -d drill -a ! -f drill/README ; then rmdir drill || : ; fi @@ -168,7 +171,7 @@ no-drill-config-h: fi drill/drill: $(DRILL_LOBJS) $(LIB) $(LIBLOBJS) - $(LINK_EXE) $(DRILL_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o drill/drill + $(LINK_EXE) $(DRILL_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o drill/drill $(top_builddir)/libldns.la drill/drill.1: $(srcdir)/drill/drill.1.in $(edit) $(srcdir)/drill/drill.1.in > drill/drill.1 @@ -177,16 +180,16 @@ install-drill: drill/drill drill/drill.1 $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 - $(LIBTOOL) --mode=install cp drill/drill $(DESTDIR)$(bindir) + $(LIBTOOL) --mode=install cp drill/drill$(EXEEXT) $(DESTDIR)$(bindir) $(INSTALL) -m 644 drill/drill.1 $(DESTDIR)$(mandir)/man1/drill.1 uninstall-drill: - rm -f $(DESTDIR)$(bindir)/drill $(DESTDIR)$(mandir)/man1/drill.1 + rm -f $(DESTDIR)$(bindir)/drill$(EXEEXT) $(DESTDIR)$(mandir)/man1/drill.1 test ! -d $(DESTDIR)$(mandir) || rmdir -p $(DESTDIR)$(mandir)/man1 || :; test ! -d $(DESTDIR)$(bindir) || rmdir -p $(DESTDIR)$(bindir) || : ; clean-drill: - $(LIBTOOL) --mode clean rm -f $(DRILL_LOBJS) drill/drill drill/drill.1 + $(LIBTOOL) --mode clean rm -f $(DRILL_LOBJS) drill/drill$(EXEEXT) drill/drill.1 examples: setup-builddir no-examples-config-h $(LIB) $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) examples/ldns-dane.1 examples/ldns-verify-zone.1 no-examples-config-h: @@ -200,23 +203,23 @@ no-examples-config-h: # Need LIBSSL_LIBS $(EXAMPLE_PROGS): - $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ + $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ $(top_builddir)/libldns.la # Need LIBSSL_LIBS $(TESTNS): - $(LINK_EXE) $(TESTNS_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $(TESTNS) + $(LINK_EXE) $(TESTNS_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $(TESTNS) $(top_builddir)/libldns.la # Need LIBSSL_LIBS $(LDNS_DPA): $(LINK_EXE) $(LDNS_DPA_LOBJS) $(LIBLOBJS) $(LIB) $(LIBPCAP_LIBS) $(LIBSSL_LIBS) $(LIBS) \ - -o $(LDNS_DPA) + -o $(LDNS_DPA) $(top_builddir)/libldns.la $(LDNS_DANE): $(LINK_EXE) $(LDNS_DANE_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_SSL_LIBS) $(LIBS) \ - -o $(LDNS_DANE) + -o $(LDNS_DANE) $(top_builddir)/libldns.la $(EX_SSL_PROGS): - $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ + $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ $(top_builddir)/libldns.la examples/ldns-dane.1: $(srcdir)/examples/ldns-dane.1.in $(edit) $(srcdir)/examples/ldns-dane.1.in > examples/ldns-dane.1 @@ -229,7 +232,7 @@ install-examples: $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_P $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 for p in $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) ; do \ - $(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(bindir) ; \ + $(LIBTOOL) --mode=install cp $$p$(EXEEXT) $(DESTDIR)$(bindir) ; \ if test -f $$p.1 ; \ then $(INSTALL) -m 644 $$p.1 $(DESTDIR)$(mandir)/man1 ; \ else $(INSTALL) -m 644 $(srcdir)/$$p.1 $(DESTDIR)$(mandir)/man1 ; \ @@ -238,20 +241,22 @@ install-examples: $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_P uninstall-examples: for p in $(EX_PROGS_BASENM) ; do \ - rm -f $(DESTDIR)$(bindir)/$$p $(DESTDIR)$(mandir)/man1/$$p.1 ;\ + rm -f $(DESTDIR)$(bindir)/$$p$(EXEEXT) $(DESTDIR)$(mandir)/man1/$$p.1 ;\ done test ! -d $(DESTDIR)$(mandir) || rmdir -p $(DESTDIR)$(mandir)/man1 || :; test ! -d $(DESTDIR)$(bindir) || rmdir -p $(DESTDIR)$(bindir) || : ; clean-examples: - $(LIBTOOL) --mode clean rm -f $(EXAMPLE_PROGS) + for p in $(EX_PROGS_BASENM) ; do \ + $(LIBTOOL) --mode clean rm -f $$p$(EXEEXT) ;\ + done $(LIBTOOL) --mode clean rm -f $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) $(LIBTOOL) --mode clean rm -f $(EXAMPLE_LOBJS) $(LIBTOOL) --mode clean rm -f examples/ldns-dane.1 examples/ldns-verify-zone.1 linktest: $(srcdir)/linktest.c libldns.la $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/linktest.c -o linktest.lo - $(LINK_EXE) linktest.lo $(LIB) $(LIBSSL_LIBS) $(LIBS) -o linktest + $(LINK_EXE) linktest.lo $(LIB) $(LIBSSL_LIBS) $(LIBS) -o linktest $(top_builddir)/libldns.la lib: libldns.la @@ -270,7 +275,7 @@ doxygen: @if test ! -e doc/header.html ; then \ $(INSTALL) -c -m 644 $(srcdir)/doc/header.html doc/ ; \ fi ; - $(doxygen) $(srcdir)/libdns.doxygen + $(doxygen) libdns.doxygen doc: manpages $(doxygen) @$(INSTALL) -d doc @@ -641,10 +646,10 @@ dnssec_zone.lo dnssec_zone.o: $(srcdir)/dnssec_zone.c ldns/config.h $(srcdir)/ld $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h duration.lo duration.o: $(srcdir)/duration.c ldns/config.h $(srcdir)/ldns/duration.h -edns.lo edns.o: $(srcdir)/edns.c $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h \ - $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h \ - $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \ - $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ +edns.lo edns.o: $(srcdir)/edns.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ + $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ + $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ + $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \ $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ @@ -807,6 +812,7 @@ zone.lo zone.o: $(srcdir)/zone.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h +compat/asctime_r.lo compat/asctime_r.o: $(srcdir)/compat/asctime_r.c ldns/config.h compat/b64_ntop.lo compat/b64_ntop.o: $(srcdir)/compat/b64_ntop.c ldns/config.h compat/b64_pton.lo compat/b64_pton.o: $(srcdir)/compat/b64_pton.c ldns/config.h compat/calloc.lo compat/calloc.o: $(srcdir)/compat/calloc.c ldns/config.h @@ -865,7 +871,7 @@ examples/ldns-dpa.lo examples/ldns-dpa.o: $(srcdir)/examples/ldns-dpa.c ldns/con $(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h \ $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ - $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h $(srcdir)/examples/ldns-dpa.h + $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h examples/ldns-gen-zone.lo examples/ldns-gen-zone.o: $(srcdir)/examples/ldns-gen-zone.c ldns/config.h $(srcdir)/ldns/ldns.h \ ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \ $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \ diff --git a/contrib/ldns/README b/contrib/ldns/README index 98575917b448..e07fdc078aa2 100644 --- a/contrib/ldns/README +++ b/contrib/ldns/README @@ -106,26 +106,3 @@ Also, when building with SWIG older than 2.0.4, compiling pyldns produces many ``missing initializer'' warnings. Those are harmless too. -Your Support -NLnet Labs offers all of its software products as open source, most -published under a BSD license. You can download them, not only from the -NLnet Labs website but also through the various OS distributions for -which NSD, ldns, and Unbound are packaged. We therefore have little idea -who uses our software in production environments and have no direct ties -with 'our customers'. - -Therefore, we ask you to contact us at users@NLnetLabs.nl and tell us -whether you use one of our products in your production environment, -what that environment looks like, and maybe even share some praise. -We would like to refer to the fact that your organization is using our -products. We will only do that if you explicitly allow us. In all other -cases we will keep the information you share with us to ourselves. - -In addition to the moral support you can also support us -financially. NLnet Labs is a recognized not-for-profit charity foundation -that is chartered to develop open-source software and open-standards -for the Internet. If you use our software to satisfaction please express -that by giving us a donation. For small donations PayPal can be used. For -larger and regular donations please contact us at users@NLnetLabs.nl. Also -see http://www.nlnetlabs.nl/labs/contributors/. - diff --git a/contrib/ldns/README-Travis.md b/contrib/ldns/README-Travis.md deleted file mode 100644 index faa534353119..000000000000 --- a/contrib/ldns/README-Travis.md +++ /dev/null @@ -1,274 +0,0 @@ -# Travis Testing - -LDNS 1.7.1 and above leverage Travis CI to increase coverage of compilers and platforms. Compilers include Clang and GCC; while platforms include Android, iOS, Linux, and OS X on AMD64, Aarch64, PowerPC and s390x hardware. - -Android is tested on armv7a, aarch64, x86 and x86_64. The Android recipes build and install OpenSSL, and then builds LDNS. The testing is tailored for Android NDK-r19 and above, and includes NDK-r20 and NDK-r21. Mips and Mips64 are not tested because they are no longer supported under current NDKs. - -iOS is tested for iPhoneOS, WatchOS, AppleTVOS, iPhoneSimulator, AppleTVSimulator and WatchSimulator. The testing uses Xcode 10 on OS X 10.13. - -The LDNS Travis configuration file `.travis.yml` does not use top-level keys like `os:` and `compiler:` so there is no matrix expansion. Instead LDNS specifies the exact job to run under the `jobs:` and `include:` keys. - -## Typical recipe - -A typical recipe tests Clang and GCC on various hardware. The hardware includes AMD64, Aarch64, PowerPC and s390x. PowerPC is a little-endian platform, and s390x is a big-endian platform. There are pairs of recipes that are similar to the following. - -``` -- os: linux - name: GCC on Linux, Aarch64 - compiler: gcc - arch: arm64 - dist: bionic -- os: linux - name: Clang on Linux, Aarch64 - compiler: clang - arch: arm64 - dist: bionic -``` - -OS X provides a single recipe to test Clang. GCC is not tested because GCC is an alias for Clang. - -## Sanitizer builds - -Two sanitizer builds are tested using Clang and GCC, for a total of four builds. The first sanitizer is Undefined Behavior sanitizer (UBsan), and the second is Address sanitizer (Asan). The sanitizers are only run on AMD64 hardware. Note the environment includes `UBSAN=yes` or `ASAN=yes` for the sanitizer builds. - -The recipes are similar to the following. - -``` -- os: linux - name: UBsan, GCC on Linux, Amd64 - compiler: gcc - arch: amd64 - dist: bionic - env: UBSAN=yes -- os: linux - name: UBsan, Clang on Linux, Amd64 - compiler: clang - arch: amd64 - dist: bionic - env: UBSAN=yes -``` - -When the Travis script encounters a sanitizer it uses different `CFLAGS` and configuration string. - -``` -if [ "$UBSAN" = "yes" ]; then - export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=undefined -fno-sanitize-recover" - bash test/test_ci.sh -elif [ "$ASAN" = "yes" ]; then - export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=address" - bash test/test_ci.sh -... -``` - -## Android builds - -Travis tests Android builds for the armv7a, aarch64, x86 and x86_64 architectures. The builds are trickier than other builds for several reasons. The testing requires installation of the Android NDK and SDK, it requires a cross-compile, and requires OpenSSL prerequisites. The Android cross-compiles also require care to set the Autotools triplet, the OpenSSL triplet, the toolchain path, the tool variables, and the sysroot. The discussion below detail the steps of the Android recipes. - -### Android job - -The first step sets environmental variables for the cross-compile using the Travis job. A typical job with variables is shown below. - -``` -- os: linux - name: Android armv7a, Linux, Amd64 - compiler: clang - arch: amd64 - dist: bionic - env: - - ANDROID=yes - - AUTOTOOLS_HOST=armv7a-linux-androideabi - - OPENSSL_HOST=android-arm - - ANDROID_CPU=armv7a - - ANDROID_API=23 - - ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU" - - ANDROID_SDK_ROOT="$HOME/android-sdk" - - ANDROID_NDK_ROOT="$HOME/android-ndk" -``` - -### ANDROID_NDK_ROOT - -The second step for Android is to set the environmental variables `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT`. This is an important step because the NDK and SDK use the variables internally to locate their own tools. Also see [Recommended NDK Directory?](https://groups.google.com/forum/#!topic/android-ndk/qZjhOaynHXc) on the android-ndk mailing list. (Many folks miss this step, or use incorrect variables like `ANDROID_NDK_HOME` or `ANDROID_SDK_HOME`). - -If you are working from a developer machine you probably already have the necessary tools installed. You should ensure `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT` are set properly. - -### Tool installation - -The second step installs tools needed for OpenSSL, Expat and LDNS. This step is handled in by the script `contrib/android/install_tools.sh`. The tools include curl, tar, zip, unzip and java. - -``` -before_script: - - | - if [ "$ANDROID" = "yes" ]; then - ./contrib/android/install_tools.sh - elif [ "$IOS" = "yes" ]; then - ./contrib/ios/install_tools.sh - fi -``` - -### NDK installation - -The third step installs the NDK and SDK. This step is handled in by the script `contrib/android/install_ndk.sh`. The script uses `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT` to place the NDK and SDK in the `$HOME` directory. - -If you are working from a developer machine you probably already have a NDK and SDK installed. - -### Android environment - -The fourth step sets the Android cross-compile environment using the script `contrib/android/setenv_android.sh`. The script is `sourced` so the variables in the script are available to the calling shell. The script sets variables like `CC`, `CXX`, `AS` and `AR`; sets `CFLAGS` and `CXXFLAGS`; sets a `sysroot` so Android headers and libraries are found; and adds the path to the toolchain to `PATH`. - -`contrib/android/setenv_android.sh` knows which toolchain and architecture to select by inspecting environmental variables set by Travis for the job. In particular, the variables `ANDROID_CPU` and `ANDROID_API` tell `contrib/android/setenv_android.sh` which tools and libraries to select. - -The `contrib/android/setenv_android.sh` script specifies the tools in a `case` statement like the following. There is a case for each of the architectures armv7a, aarch64, x86 and x86_64. - -``` -armv8a|aarch64|arm64|arm64-v8a) - CC="aarch64-linux-android$ANDROID_API-clang" - CXX="aarch64-linux-android$ANDROID_API-clang++" - LD="aarch64-linux-android-ld" - AS="aarch64-linux-android-as" - AR="aarch64-linux-android-ar" - RANLIB="aarch64-linux-android-ranlib" - STRIP="aarch64-linux-android-strip" - - CFLAGS="-funwind-tables -fexceptions" - CXXFLAGS="-funwind-tables -fexceptions -frtti" -``` - -### OpenSSL - -The fifth step builds OpenSSL. OpenSSL is built for iOS using the scripts `contrib/android/install_openssl.sh`. The script downloads, configures and installs the latest release version of the OpenSSL libraries. OpenSSL is configured with `--prefix="$ANDROID_PREFIX"` so the headers are placed in `$ANDROID_PREFIX/include` directory, and the libraries are placed in the `$ANDROID_PREFIX/lib` directory. - -`ANDROID_PREFIX` is the value `$HOME/android$ANDROID_API-$ANDROID_CPU`. The libraries will be installed in `$HOME/android23-armv7a`, `$HOME/android23-aarch64`, etc. For Autotools projects, the appropriate `PKG_CONFIG_PATH` is exported. - -`PKG_CONFIG_PATH` is an important variable. It is the userland equivalent to sysroot, and allows Autotools to find non-system headers and libraries for an architecture. Typical `PKG_CONFIG_PATH` are `$HOME/android23-armv7a/lib/pkgconfig` and `$HOME/android23-aarch64/lib/pkgconfig`. - -OpenSSL also uses a custom configuration file called `15-android.conf`. It is a copy of the OpenSSL's project file and located at `contrib/android/15-android.conf`. The LDNS version is copied to the OpenSSL source files after unpacking the OpenSSL distribution. The LDNS version has legacy NDK support removed and some other fixes, like `ANDROID_NDK_ROOT` awareness. The changes mean LDNS's `15-android.conf` will only work with LDNS, with NDK-r19 and above, and a properly set environment. - -OpenSSL is configured with `no-engine`. If you want to include OpenSSL engines then edit `contrib/android/install_openssl.sh` and remove the config option. - -### Android build - -Finally, once OpenSSL are built, then the Travis script configures and builds LDNS. The recipe looks as follows. - -``` -elif [ "$ANDROID" = "yes" ]; then - export AUTOTOOLS_BUILD="$(./config.guess)" - export PKG_CONFIG_PATH="$ANDROID_PREFIX/lib/pkgconfig" - ./contrib/android/install_ndk.sh - source ./contrib/android/setenv_android.sh - ./contrib/android/install_openssl.sh - ./contrib/android/bootstrap_ldns.sh - ./configure \ - --build="$AUTOTOOLS_BUILD" \ - --host="$AUTOTOOLS_HOST" \ - --prefix="$ANDROID_PREFIX" \ - --with-ssl="$ANDROID_PREFIX" \ - --disable-gost \ - --with-drill --with-examples - make -j 2 - make install -``` - -Travis only smoke tests an Android build using a compile, link and install. The self tests are not run. TODO: figure out how to fire up an emulator, push the tests to the device and run them. - -### Android flags - -`contrib/android/setenv_android.sh` uses specific flags for `CFLAGS` and `CXXFLAGS`. They are taken from `ndk-build`, so we consider them the official flag set. It is important to use the same flags across projects to avoid subtle problems due to mixing and matching different flags. - -`CXXFLAGS` includes `-fexceptions` and `-frtti` because exceptions and runtime type info are disabled by default. `CFLAGS` include `-funwind-tables` and `-fexceptions` to ensure C++ exceptions pass through C code, if needed. Also see `docs/CPLUSPLUS-SUPPORT.html` in the NDK docs. - -To inspect the flags used by `ndk-build` for a platform clone ASOP's [ndk-samples](https://github.com/android/ndk-samples/tree/master/hello-jni) and build the `hello-jni` project. Use the `V=1` flag to see the full compiler output from `ndk-build`. - -## iOS builds - -Travis tests iOS builds for the armv7a, armv7s and aarch64 architectures for iPhoneOS, AppleTVOS and WatchOS. iPhoneOS is tested using both 32-bit builds (iPhones) and 64-bit builds (iPads). Travis also tests compiles against the simulators. The builds are trickier than other builds for several reasons. The testing requires a cross-compile, and requires OpenSSL prerequisites. The iOS cross-compiles also require care to set the Autotools triplet, the OpenSSL triplet, the toolchain path, the tool variables, and the sysroot. The discussion below detail the steps of the iOS recipes. - -### iOS job - -The first step sets environmental variables for the cross-compile using the Travis job. A typical job with variables is shown below. - -``` -- os: osx - osx_image: xcode10 - name: Apple iPhone on iOS, armv7 - compiler: clang - env: - - IOS=yes - - AUTOTOOLS_HOST=armv7-apple-ios - - OPENSSL_HOST=ios-cross - - IOS_SDK=iPhoneOS - - IOS_CPU=armv7s - - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" -``` - -### Tool installation - -The second step installs tools needed for OpenSSL, Expat and LDNS. This step is handled in by the script `contrib/ios/install_tools.sh`. The tools include autotools, curl and perl. The installation happens at the `before_script:` stage of Travis. - -``` -before_script: - - | - if [ "$ANDROID" = "yes" ]; then - ./contrib/android/install_tools.sh - elif [ "$IOS" = "yes" ]; then - ./contrib/ios/install_tools.sh - fi -``` - -### iOS environment - -The third step sets the iOS cross-compile environment using the script `contrib/ios/setenv_ios.sh`. The script is `sourced` so the variables in the script are available to the calling shell. The script sets variables like `CC`, `CXX`, `AS` and `AR`; sets `CFLAGS` and `CXXFLAGS`; sets a `sysroot` so iOS headers and libraries are found; and adds the path to the toolchain to `PATH`. - -`contrib/ios/setenv_ios.sh` knows which toolchain and architecture to select by inspecting environmental variables set by Travis for the job. In particular, the variables `IOS_SDK` and `IOS_CPU` tell `contrib/ios/setenv_ios.sh` which tools and libraries to select. - -The `contrib/ios/setenv_ios.sh` script specifies the tools to use during the cross-compile. For Apple SDKs, the tool names are the same as a desktop. There are no special prefixes for the mobile tools. - -``` -CPP=cpp -CC=clang -CXX=clang++ -LD=ld -AS=as -AR=ar -RANLIB=ranlib -STRIP=strip -``` - -If you are working from a developer machine you probably already have the necessary tools installed. - -### OpenSSL - -The fourth step builds OpenSSL. OpenSSL is built for iOS using the scripts `contrib/ios/install_openssl.sh`. The script downloads, configures and installs the latest release version of the OpenSSL libraries. OpenSSL is configured with `--prefix="$IOS_PREFIX"` so the headers are placed in `$IOS_PREFIX/include` directory, and the libraries are placed in the `$IOS_PREFIX/lib` directory. - -`IOS_PREFIX` is the value `$HOME/$IOS_SDK-$IOS_CPU`. The scheme handles both iOS SDKs and cpu architectures so the pair receives a unique installation directory. The libraries will be installed in `$HOME/iPhoneOS-armv7s`, `$HOME/iPhoneOS-arm64`, `$HOME/iPhoneSimulator-i386`, etc. For Autotools projects, the appropriate `PKG_CONFIG_PATH` is exported. - -`PKG_CONFIG_PATH` is an important variable. It is the userland equivalent to sysroot, and allows Autotools to find non-system headers and libraries for an architecture. Typical `PKG_CONFIG_PATH` are `$HOME/iPhoneOS-armv7s/lib/pkgconfig` and `$HOME/iPhoneOS-arm64/lib/pkgconfig`. - -OpenSSL also uses a custom configuration file called `15-ios.conf`. It is a copy of the OpenSSL's project file and located at `contrib/ios/15-ios.conf`. The LDNS version is copied to the OpenSSL source files after unpacking the OpenSSL distribution. The changes mean LDNS's `15-ios.conf` will only work with LDNS and a properly set environment. - -OpenSSL is configured with `no-engine`. Engines require dynamic loading so engines are disabled permanently in `15-ios.conf`. - -### iOS build - -Finally, once OpenSSL are built, then the Travis script configures and builds LDNS. The full recipe looks as follows. - -``` -elif [ "$IOS" = "yes" ]; then - export AUTOTOOLS_BUILD="$(./config.guess)" - export PKG_CONFIG_PATH="$IOS_PREFIX/lib/pkgconfig" - source ./contrib/ios/setenv_ios.sh - ./contrib/ios/install_openssl.sh - ./contrib/ios/bootstrap_ldns.sh - ./configure \ - --build="$AUTOTOOLS_BUILD" --host="$AUTOTOOLS_HOST" \ - --prefix="$IOS_PREFIX" \ - --with-ssl="$IOS_PREFIX" --disable-gost \ - --with-drill --with-examples - make -j 2 - make install -``` - -Travis only smoke tests an iOS build using a compile, link and install. The self tests are not run. TODO: figure out how to fire up an simulator, push the tests to the device and run them. - -### iOS flags - -`contrib/ios/setenv_ios.sh` uses specific flags for `CFLAGS` and `CXXFLAGS`. They are taken from Xcode, so we consider them the official flag set. It is important to use the same flags across projects to avoid subtle problems due to mixing and matching different flags. diff --git a/contrib/ldns/README.snapshots b/contrib/ldns/README.snapshots index 891fcca1d6ef..df7ee003cada 100644 --- a/contrib/ldns/README.snapshots +++ b/contrib/ldns/README.snapshots @@ -3,6 +3,6 @@ ldns - snapshot releases Snapshot releases are not official released. They can be released to interested parties for development. -Snapshots can be recognized from the date in the the tar file name. +Snapshots can be recognized from the date in the tar file name. They should not be used for packaging in distributions. diff --git a/contrib/ldns/acx_nlnetlabs.m4 b/contrib/ldns/acx_nlnetlabs.m4 index 39e92d875331..6a01dc5a4769 100644 --- a/contrib/ldns/acx_nlnetlabs.m4 +++ b/contrib/ldns/acx_nlnetlabs.m4 @@ -2,7 +2,16 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 41 +# Version 48 +# 2024-01-16 fix to add -l:libssp.a to -lcrypto link check. +# and check for getaddrinfo with only header. +# 2024-01-15 fix to add crypt32 to -lcrypto link check when checking for gdi32. +# 2023-05-04 fix to remove unused whitespace. +# 2023-01-26 fix -Wstrict-prototypes. +# 2022-09-01 fix checking if nonblocking sockets work on OpenBSD. +# 2021-08-17 fix sed script in ssldir split handling. +# 2021-08-17 fix for openssl to detect split version, with ssldir_include +# and ssldir_lib output directories. # 2021-07-30 fix for openssl use of lib64 directory. # 2021-06-14 fix nonblocking test to use host instead of target for mingw test. # 2021-05-17 fix nonblocking socket test from grep on mingw32 to mingw for @@ -183,7 +192,7 @@ dnl cache=`echo $1 | sed 'y%.=/+- %___p__%'` AC_CACHE_VAL(cv_prog_cc_flag_needed_$cache, [ echo '$2' > conftest.c -echo 'void f(){}' >>conftest.c +echo 'void f(void){}' >>conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_needed_$cache=no" else @@ -229,7 +238,7 @@ dnl DEPFLAG: set to flag that generates dependencies. AC_DEFUN([ACX_DEPFLAG], [ AC_MSG_CHECKING([$CC dependency flag]) -echo 'void f(){}' >conftest.c +echo 'void f(void){}' >conftest.c if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then DEPFLAG="-MM" else @@ -268,7 +277,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -305,7 +314,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -331,7 +340,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG, [ #include #include -int test() { +int test(void) { int a = 0; return a; } @@ -341,7 +350,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_BSD_SOURCE -D_DEFAULT_SOURCE, [ #include -int test() { +int test(void) { int a; a = isascii(32); return a; @@ -352,7 +361,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE, [ #include -int test() { +int test(void) { struct in6_pktinfo inf; int a = (int)sizeof(inf); return a; @@ -366,7 +375,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE -D_FRSRESGID, [ #include -int test() { +int test(void) { int a = setresgid(0,0,0); a = setresuid(0,0,0); return a; @@ -381,7 +390,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_POSIX_C_SOURCE=200112, #endif #include -int test() { +int test(void) { int a = 0; char *t; time_t time = 0; @@ -409,7 +418,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D__EXTENSIONS__, #include #endif -int test() { +int test(void) { int a; char **opts = NULL; struct timeval tv; @@ -471,7 +480,7 @@ fi dnl Setup ATTR_FORMAT config.h parts. dnl make sure you call ACX_CHECK_FORMAT_ATTRIBUTE also. AC_DEFUN([AHX_CONFIG_FORMAT_ATTRIBUTE], -[ +[ #ifdef HAVE_ATTR_FORMAT # define ATTR_FORMAT(archetype, string_index, first_to_check) \ __attribute__ ((format (archetype, string_index, first_to_check))) @@ -647,6 +656,30 @@ AC_DEFUN([ACX_SSL_CHECKS], [ withval=$1 if test x_$withval != x_no; then AC_MSG_CHECKING(for SSL) + if test -n "$withval"; then + dnl look for openssl install with different version, eg. + dnl in /usr/include/openssl11/openssl/ssl.h + dnl and /usr/lib64/openssl11/libssl.so + dnl with the --with-ssl=/usr/include/openssl11 + if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then + ssldir="$withval" + found_ssl="yes" + withval="" + ssldir_include="$ssldir" + dnl find the libdir + ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'` + if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then + : # found here + else + ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'` + if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then + : # found here + else + AC_MSG_ERROR([Could not find openssl lib file, $ssldir_lib/libssl.[so,a], pass like "/usr/local" or "/usr/include/openssl11"]) + fi + fi + fi + fi if test x_$withval = x_ -o x_$withval = x_yes; then withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr" fi @@ -654,12 +687,12 @@ AC_DEFUN([ACX_SSL_CHECKS], [ ssldir="$dir" if test -f "$dir/include/openssl/ssl.h"; then found_ssl="yes" - AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.]) - dnl assume /usr/include is already in the include-path. - if test "$ssldir" != "/usr"; then - CPPFLAGS="$CPPFLAGS -I$ssldir/include" - LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include" - fi + ssldir_include="$ssldir/include" + if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then + ssldir_lib="$ssldir/lib64" + else + ssldir_lib="$ssldir/lib" + fi break; fi done @@ -667,20 +700,17 @@ AC_DEFUN([ACX_SSL_CHECKS], [ AC_MSG_ERROR(Cannot find the SSL libraries in $withval) else AC_MSG_RESULT(found in $ssldir) + AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.]) HAVE_SSL=yes - dnl assume /usr is already in the lib and dynlib paths. - if test "$ssldir" != "/usr" -a "$ssldir" != ""; then - if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then - LDFLAGS="$LDFLAGS -L$ssldir/lib64" - LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib64" - ACX_RUNTIME_PATH_ADD([$ssldir/lib64]) - else - LDFLAGS="$LDFLAGS -L$ssldir/lib" - LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib" - ACX_RUNTIME_PATH_ADD([$ssldir/lib]) - fi - fi - + dnl assume /usr is already in the include, lib and dynlib paths. + if test "$ssldir" != "/usr"; then + CPPFLAGS="$CPPFLAGS -I$ssldir_include" + LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include" + LDFLAGS="$LDFLAGS -L$ssldir_lib" + LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib" + ACX_RUNTIME_PATH_ADD([$ssldir_lib]) + fi + AC_MSG_CHECKING([for EVP_sha256 in -lcrypto]) LIBS="$LIBS -lcrypto" LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto" @@ -705,40 +735,73 @@ AC_DEFUN([ACX_SSL_CHECKS], [ ]])],[ AC_DEFINE([HAVE_EVP_SHA256], 1, [If you have EVP_sha256]) - AC_MSG_RESULT(yes) + AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no) LIBS="$BAKLIBS" LIBSSL_LIBS="$BAKSSLLIBS" - LIBS="$LIBS -ldl" - LIBSSL_LIBS="$LIBSSL_LIBS -ldl" - AC_MSG_CHECKING([if -lcrypto needs -ldl]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ - int EVP_sha256(void); - (void)EVP_sha256(); - ]])],[ - AC_DEFINE([HAVE_EVP_SHA256], 1, - [If you have EVP_sha256]) - AC_MSG_RESULT(yes) - ],[ - AC_MSG_RESULT(no) - LIBS="$BAKLIBS" - LIBSSL_LIBS="$BAKSSLLIBS" - LIBS="$LIBS -ldl -pthread" - LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread" - AC_MSG_CHECKING([if -lcrypto needs -ldl -pthread]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ - int EVP_sha256(void); - (void)EVP_sha256(); - ]])],[ - AC_DEFINE([HAVE_EVP_SHA256], 1, - [If you have EVP_sha256]) - AC_MSG_RESULT(yes) - ],[ - AC_MSG_RESULT(no) - AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required]) + + LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32" + LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32" + AC_MSG_CHECKING([if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + LIBS="$BAKLIBS" + LIBSSL_LIBS="$BAKSSLLIBS" + + LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" + LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" + AC_MSG_CHECKING([if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + LIBS="$BAKLIBS" + LIBSSL_LIBS="$BAKSSLLIBS" + + LIBS="$LIBS -ldl" + LIBSSL_LIBS="$LIBSSL_LIBS -ldl" + AC_MSG_CHECKING([if -lcrypto needs -ldl]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + LIBS="$BAKLIBS" + LIBSSL_LIBS="$BAKSSLLIBS" + LIBS="$LIBS -ldl -pthread" + LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread" + AC_MSG_CHECKING([if -lcrypto needs -ldl -pthread]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required]) + ]) + ]) ]) - ]) + ]) ]) ]) fi @@ -752,13 +815,13 @@ AC_CHECK_HEADERS([openssl/rand.h],,, [AC_INCLUDES_DEFAULT]) dnl Check for SSL, where SSL is mandatory dnl Adds --with-ssl option, searches for openssl and defines HAVE_SSL if found -dnl Setup of CPPFLAGS, CFLAGS. Adds -lcrypto to LIBS. +dnl Setup of CPPFLAGS, CFLAGS. Adds -lcrypto to LIBS. dnl Checks main header files of SSL. dnl AC_DEFUN([ACX_WITH_SSL], [ AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl=pathname],[enable SSL (will check /usr/local/ssl - /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[ + /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr or specify like /usr/include/openssl11)]),[ ],[ withval="yes" ]) @@ -776,7 +839,7 @@ dnl AC_DEFUN([ACX_WITH_SSL_OPTIONAL], [ AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl=pathname],[enable SSL (will check /usr/local/ssl - /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[ + /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr or specify like /usr/include/openssl11)]),[ ],[ withval="yes" ]) @@ -809,7 +872,7 @@ dnl try to see if an additional _LARGEFILE_SOURCE 1 is needed to get fseeko ACX_CHECK_COMPILER_FLAG_NEEDED(-D_LARGEFILE_SOURCE=1, [ #include -int test() { +int test(void) { int a = fseeko(stdin, 0, 0); return a; } @@ -834,7 +897,7 @@ char* (*f) () = getaddrinfo; #ifdef __cplusplus } #endif -int main() { +int main(void) { ; return 0; } @@ -845,7 +908,7 @@ dnl see if on windows if test "$ac_cv_header_windows_h" = "yes"; then AC_DEFINE(USE_WINSOCK, 1, [Whether the windows socket API is used]) USE_WINSOCK="1" - if echo $LIBS | grep 'lws2_32' >/dev/null; then + if echo "$LIBS" | grep 'lws2_32' >/dev/null; then : else LIBS="$LIBS -lws2_32" @@ -853,6 +916,24 @@ if test "$ac_cv_header_windows_h" = "yes"; then fi ], dnl no quick getaddrinfo, try mingw32 and winsock2 library. +dnl perhaps getaddrinfo needs only the include +AC_LINK_IFELSE( +[AC_LANG_PROGRAM( +[ +#ifdef HAVE_WS2TCPIP_H +#include +#endif +], +[ + (void)getaddrinfo(NULL, NULL, NULL, NULL); +] +)], +[ +ac_cv_func_getaddrinfo="yes" +AC_DEFINE(USE_WINSOCK, 1, [Whether the windows socket API is used]) +USE_WINSOCK="1" +], + ORIGLIBS="$LIBS" LIBS="$LIBS -lws2_32" *** 6648 LINES SKIPPED *** From nobody Fri May 22 17:24:16 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMXFX4f7wz6fH5h for ; Fri, 22 May 2026 17:24: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMXFX33zLz43mC for ; Fri, 22 May 2026 17:24:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779470656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lze1XRpgxBkk2M0c5v4N2HzAUZc+zGhRiUOgN0ALjGI=; b=G7k0bfG2pgGdEJM9sOjQvRp2YsqG1NirgRIzTvhxj+sv7pqEFLg+by9SNKFa/AcBxYN/St Lf8mQ5j7eJaqAuBIpFmxc47uMqmtGqfuX3RqkzsjeIxUYjpBpiURdt5bg1iMSFI20joWca RpRH3s9EzRf8/kBkhzppU67NIIss7pE90lox1DkXUM6cUiMIjV/ZTgLK0xprcISBNiw6iW RrEiUbaLKtKJ65VZH2H1dy9m3cI1KYRQzxw8x1gILOoVYQeEM97Jsbp+C7657y4CoTO1/i YH0Oyhoznwe5CJE5zOUQaaLbNADkovbyzJVtSxAc/eVYqAXv3Fl7lMmuTnELdg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779470656; a=rsa-sha256; cv=none; b=H3k6LRLpBmQCJjy+aKcoPH1OYXcT49wvp0cM7/mbwveTiIADNIBaGmJ1U6Xnf8GMXMJ8D5 RomK8h+SWPtkzpBCIqS2CWEqoxGILfjLnJsPHqfRDMB0ykeNmEGgiXGyQAhGGo7/AO08Lc xUK6PG14E8qbxS2bASswg+Ne06Lre9+bnJGJCvTGJRidetVw0u4swBF3mV5EDLnUnbqGVw N4duFz74BHqLuKVoxk0i07rQ91uPXDa3EANR1/tKhxWDsWua3ap8N71s24o7fj/oOxsn5m PFEHUIaKnMcvE9Q1mAMoSXeG7n//tiXIgdoHUknfnbq9mh/O509JheT7lXV1xg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779470656; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Lze1XRpgxBkk2M0c5v4N2HzAUZc+zGhRiUOgN0ALjGI=; b=Y0T7QjIbtP86ZD+ok1eQRfGeznp4nt4rJJoAszZdIV0zh+XfRcjSWptvGVtsH4/4TFwtEC U66MG7Mp6QRQiLdHzcYQ0EYeVl8NbC9LmmD7RbWVFXbDzYaSK+s3CCTjCc/i2pCbUlh6x+ 6g6ss06+ivVdQsk9RgGeYTMwJGUQKN2IIWfPcbwgFfyJ7CCgO5gC3X5Z4zyKWGv+PVNaXR 7JNWp9eM5Tg9ulkWgri9Y28BRFS/JNCfrwv8BBMUQengXCzMFT/JbGyRKJxRsJLm1WQZ+P HqIj5YSFu5OWIJ0sbpUQ9EH0znDHKi3Ohwwju7CtVvvRs0F+2UF4WEYjmQM6/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMXFX2Xr4zVXg for ; Fri, 22 May 2026 17:24:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 36498 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:24:16 +0000 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=B8rg?=rav Subject: git: 597a090ff2ab - main - import ldns 1.9.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 597a090ff2ab868242e4ec1cdec7469edbe41c50 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:24:16 +0000 Message-Id: <6a109140.36498.2f2397b6@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=597a090ff2ab868242e4ec1cdec7469edbe41c50 commit 597a090ff2ab868242e4ec1cdec7469edbe41c50 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 13:37:52 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 17:23:59 +0000 import ldns 1.9.0 MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57170 --- contrib/ldns/Changelog | 46 +++ contrib/ldns/Makefile.in | 58 +-- contrib/ldns/README | 19 +- contrib/ldns/config.guess | 26 +- contrib/ldns/config.sub | 749 +++++++++++++++++++++++++++++---------- contrib/ldns/configure | 94 ++++- contrib/ldns/configure.ac | 41 ++- contrib/ldns/dnssec.c | 4 +- contrib/ldns/dnssec_zone.c | 50 ++- contrib/ldns/drill/drill.c | 2 +- contrib/ldns/drill/securetrace.c | 7 +- contrib/ldns/error.c | 2 + contrib/ldns/host2str.c | 60 ++++ contrib/ldns/host2wire.c | 2 +- contrib/ldns/keys.c | 2 + contrib/ldns/ldns/config.h.in | 11 +- contrib/ldns/ldns/dnssec_zone.h | 14 +- contrib/ldns/ldns/edns.h | 6 +- contrib/ldns/ldns/error.h | 3 +- contrib/ldns/ldns/host2str.h | 18 + contrib/ldns/ldns/packet.h | 13 + contrib/ldns/ldns/rdata.h | 10 +- contrib/ldns/ldns/rr.h | 20 +- contrib/ldns/ldns/str2host.h | 10 + contrib/ldns/ldns/util.h.in | 22 ++ contrib/ldns/net.c | 2 + contrib/ldns/packet.c | 23 +- contrib/ldns/rdata.c | 6 + contrib/ldns/resolver.c | 18 +- contrib/ldns/rr.c | 129 ++++++- contrib/ldns/sha1.c | 2 +- contrib/ldns/sha2.c | 18 +- contrib/ldns/str2host.c | 68 +++- contrib/ldns/util.c | 5 + contrib/ldns/wire2host.c | 3 + contrib/ldns/zone.c | 2 +- 36 files changed, 1265 insertions(+), 300 deletions(-) diff --git a/contrib/ldns/Changelog b/contrib/ldns/Changelog index c7f36767b360..74e2631af72d 100644 --- a/contrib/ldns/Changelog +++ b/contrib/ldns/Changelog @@ -1,3 +1,49 @@ +1.9.0 2025-12-04 + * PR #246: Make ldns_calc_keytag() available for CDNSKEY RR + Thanks tgreenx and pnax + * PR #247: Make ldns_key_rr2ds() available for CDNSKEY RR + Thanks tgreenx + * PR #248: Make ldns_rr_compare_{ds,ds_dnskey}() available for + CDS and CDNSKEY RRs. Thanks tgreenx + * PR #245: Make drill trace use IPv6 when used with -6 + Thanks Paul Radford + * Fix #254: Unquoted "value" rdata for CAA records fail to validate. + Follows the long string unquoted syntax from RFC8659, section 4.1.1. + * Fix #266: ldns-read-zone -u fails if a type is the only type in a + window and the type modulo 256 is equal to zero. + * Fix #271: Intermittent build failure with multi-job + builds (make -j). + * Add ldns-verify-zone -s option. It checks all signature results, + instead of passing by when one RRSIG validates. That prints output + for spurious RRSIGs, the failures for them. + * Fix RR types NSAP-PTR, GPOS and RESINFO to print unquoted strings. + * Fix memory leak when trying to read zones that have equal RRs. + the ldns_dnssec_*_add_rr() functions now return LDNS_STATUS_EQUAL_RR + when an already existing RR is tried to be added. This is a API + change, hence this also bumps the version to 1.9.0 + * PR #282: ensure returning pkt with LDNS_STATUS_OK. Thanks grobian. + * PR #286: Fix RR Type AMTRELAY type nogateway, to print relay '.', + and memory leaks in parsing it. + * DSYNC is no longer a draft RR type and compiled by default + * RFC 9824 support: Compact Denial of Existence in DNSSEC + * The HHIT and BRID draft RR types + * PR #249: If RNG is already seeded, return early. + Thanks crrodriguez + * PR #221: Improve error messages. Thanks jschauma + * PR #256: Use SWIG_AppendOutput to support swig 4.3 + Thanks pemensik + * PR #188: Homogenize paths for source files during compilation + Thanks duthils + * Fix #283: ldns-walk fails after update from 1.8.3 to 1.8.4 + Thanks jschauma + * PR #200: Allow compiled tests to link to ldns statically via + environment variable. Thanks FGasper and pemensik + * PR #220: Optionally exclude ZONEMD RRs in ldns-compare-zone + Thanks gjherbiet + * Fix #285: A WALLET RR breaks TXT signing. Thanks bortzmeyer + * Fix #287: ldns-verify-zone hangs with missing NSEC3 RRs. + Thanks Roy Arends + 1.8.4 2024-07-19 * Fix building documentation in build directory. Thanks Michael Tokarev diff --git a/contrib/ldns/Makefile.in b/contrib/ldns/Makefile.in index 32b91576d0d9..b5ca1d3c3adf 100644 --- a/contrib/ldns/Makefile.in +++ b/contrib/ldns/Makefile.in @@ -132,11 +132,11 @@ all: setup-builddir lib linktest manpages @P5_DNS_LDNS@ @PYLDNS@ @DRILL@ @EXAMPL .SUFFIXES: .c .o .a .lo .h .i .c.lo: - $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $< -o $@ + $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/$< -o $@ # Need libtool compile .c.o: - $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $< -o $@ + $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/$< -o $@ $(LDNS_LOBJS) $(LIBLOBJS) $(DRILL_LOBJS) $(EXAMPLE_LOBJS): $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/$(@:.lo=.c) -o $@ @@ -571,9 +571,9 @@ depend: done; \ done for p in $(EXAMPLE_PROGS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS); do \ - echo "$$p: $$p.lo $$p.o \$$(LIB)" >> $(DEPEND_TMP) ; done + echo "$$p: $$p.lo \$$(LIB)" >> $(DEPEND_TMP) ; done echo "$(TESTNS): `for o in $(TESTNS_LOBJS) ; do \ - echo -n "$$o $${o%lo}o " ; done` \$$(LIB)" \ + echo -n "$$o " ; done`\$$(LIB)" \ >> $(DEPEND_TMP) cp $(DEPEND_TARGET) $(DEPEND_TMP2) head -`egrep -n "# Dependencies" $(DEPEND_TARGET) | tail -1 | sed -e 's/:.*$$//'` $(DEPEND_TMP2) > $(DEPEND_TARGET) @@ -1114,28 +1114,28 @@ drill/work.lo drill/work.o: $(srcdir)/drill/work.c $(srcdir)/drill/drill.h ldns/ $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-chaos: examples/ldns-chaos.lo examples/ldns-chaos.o $(LIB) -examples/ldns-compare-zones: examples/ldns-compare-zones.lo examples/ldns-compare-zones.o $(LIB) -examples/ldnsd: examples/ldnsd.lo examples/ldnsd.o $(LIB) -examples/ldns-gen-zone: examples/ldns-gen-zone.lo examples/ldns-gen-zone.o $(LIB) -examples/ldns-key2ds: examples/ldns-key2ds.lo examples/ldns-key2ds.o $(LIB) -examples/ldns-keyfetcher: examples/ldns-keyfetcher.lo examples/ldns-keyfetcher.o $(LIB) -examples/ldns-keygen: examples/ldns-keygen.lo examples/ldns-keygen.o $(LIB) -examples/ldns-mx: examples/ldns-mx.lo examples/ldns-mx.o $(LIB) -examples/ldns-notify: examples/ldns-notify.lo examples/ldns-notify.o $(LIB) -examples/ldns-read-zone: examples/ldns-read-zone.lo examples/ldns-read-zone.o $(LIB) -examples/ldns-resolver: examples/ldns-resolver.lo examples/ldns-resolver.o $(LIB) -examples/ldns-rrsig: examples/ldns-rrsig.lo examples/ldns-rrsig.o $(LIB) -examples/ldns-test-edns: examples/ldns-test-edns.lo examples/ldns-test-edns.o $(LIB) -examples/ldns-update: examples/ldns-update.lo examples/ldns-update.o $(LIB) -examples/ldns-version: examples/ldns-version.lo examples/ldns-version.o $(LIB) -examples/ldns-walk: examples/ldns-walk.lo examples/ldns-walk.o $(LIB) -examples/ldns-zcat: examples/ldns-zcat.lo examples/ldns-zcat.o $(LIB) -examples/ldns-zsplit: examples/ldns-zsplit.lo examples/ldns-zsplit.o $(LIB) -examples/ldns-dpa: examples/ldns-dpa.lo examples/ldns-dpa.o $(LIB) -examples/ldns-dane: examples/ldns-dane.lo examples/ldns-dane.o $(LIB) -examples/ldns-nsec3-hash: examples/ldns-nsec3-hash.lo examples/ldns-nsec3-hash.o $(LIB) -examples/ldns-revoke: examples/ldns-revoke.lo examples/ldns-revoke.o $(LIB) -examples/ldns-signzone: examples/ldns-signzone.lo examples/ldns-signzone.o $(LIB) -examples/ldns-verify-zone: examples/ldns-verify-zone.lo examples/ldns-verify-zone.o $(LIB) -examples/ldns-testns: examples/ldns-testns.lo examples/ldns-testns.o examples/ldns-testpkts.lo examples/ldns-testpkts.o $(LIB) +examples/ldns-chaos: examples/ldns-chaos.lo $(LIB) +examples/ldns-compare-zones: examples/ldns-compare-zones.lo $(LIB) +examples/ldnsd: examples/ldnsd.lo $(LIB) +examples/ldns-gen-zone: examples/ldns-gen-zone.lo $(LIB) +examples/ldns-key2ds: examples/ldns-key2ds.lo $(LIB) +examples/ldns-keyfetcher: examples/ldns-keyfetcher.lo $(LIB) +examples/ldns-keygen: examples/ldns-keygen.lo $(LIB) +examples/ldns-mx: examples/ldns-mx.lo $(LIB) +examples/ldns-notify: examples/ldns-notify.lo $(LIB) +examples/ldns-read-zone: examples/ldns-read-zone.lo $(LIB) +examples/ldns-resolver: examples/ldns-resolver.lo $(LIB) +examples/ldns-rrsig: examples/ldns-rrsig.lo $(LIB) +examples/ldns-test-edns: examples/ldns-test-edns.lo $(LIB) +examples/ldns-update: examples/ldns-update.lo $(LIB) +examples/ldns-version: examples/ldns-version.lo $(LIB) +examples/ldns-walk: examples/ldns-walk.lo $(LIB) +examples/ldns-zcat: examples/ldns-zcat.lo $(LIB) +examples/ldns-zsplit: examples/ldns-zsplit.lo $(LIB) +examples/ldns-dpa: examples/ldns-dpa.lo $(LIB) +examples/ldns-dane: examples/ldns-dane.lo $(LIB) +examples/ldns-nsec3-hash: examples/ldns-nsec3-hash.lo $(LIB) +examples/ldns-revoke: examples/ldns-revoke.lo $(LIB) +examples/ldns-signzone: examples/ldns-signzone.lo $(LIB) +examples/ldns-verify-zone: examples/ldns-verify-zone.lo $(LIB) +examples/ldns-testns: examples/ldns-testns.lo examples/ldns-testpkts.lo $(LIB) diff --git a/contrib/ldns/README b/contrib/ldns/README index e07fdc078aa2..fb588f4da586 100644 --- a/contrib/ldns/README +++ b/contrib/ldns/README @@ -1,3 +1,21 @@ +DEVELOPMENT VISION + +Note: ldns has been in maintenance mode since 2020, with no plans for major +features. We welcome PRs from contributors who want to add new functionality. +We also actively fix bugs, so users can continue to rely on ldns if its +current features meet their needs. + +We will continue to make occasional use of ldns in an experimental +setting, such as during an IETF Hackathon to build a proof of concept for an +Internet Draft. + +The natural successor to the ldns library is the domain library for Rust: +https://github.com/NLnetLabs/domain + +We offer drop-in replacements for commonly used ldns example tools in dnst: +https://github.com/NLnetLabs/dnst + +--- Contents: REQUIREMENTS @@ -10,7 +28,6 @@ Contents: Solaris KNOWN ISSUES pyldns - Your Support Project page: http://www.nlnetlabs.nl/ldns/ diff --git a/contrib/ldns/config.guess b/contrib/ldns/config.guess index f6d217a49f8f..a9d01fde4617 100755 --- a/contrib/ldns/config.guess +++ b/contrib/ldns/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2024 Free Software Foundation, Inc. +# Copyright 1992-2025 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2024-01-01' +timestamp='2025-07-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -60,7 +60,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2024 Free Software Foundation, Inc. +Copyright 1992-2025 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -123,7 +123,7 @@ set_cc_for_build() { dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" - for driver in cc gcc c89 c99 ; do + for driver in cc gcc c17 c99 c89 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD=$driver break @@ -634,7 +634,8 @@ EOF sed 's/^ //' << EOF > "$dummy.c" #include - main() + int + main () { if (!__power_pc()) exit(1); @@ -718,7 +719,8 @@ EOF #include #include - int main () + int + main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); @@ -1595,8 +1597,11 @@ EOF *:Unleashed:*:*) GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE ;; - *:Ironclad:*:*) - GUESS=$UNAME_MACHINE-unknown-ironclad + x86_64:[Ii]ronclad:*:*|i?86:[Ii]ronclad:*:*) + GUESS=$UNAME_MACHINE-pc-ironclad-mlibc + ;; + *:[Ii]ronclad:*:*) + GUESS=$UNAME_MACHINE-unknown-ironclad-mlibc ;; esac @@ -1621,6 +1626,7 @@ cat > "$dummy.c" <." version="\ GNU config.sub ($timestamp) -Copyright 1992-2024 Free Software Foundation, Inc. +Copyright 1992-2025 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -120,7 +120,6 @@ case $# in esac # Split fields of configuration type -# shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <; Fri, 22 May 2026 17:37:30 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic308-55.consmr.mail.gq1.yahoo.com (sonic308-55.consmr.mail.gq1.yahoo.com [98.137.68.31]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMXXn6KMdz46WQ for ; Fri, 22 May 2026 17:37:29 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1779471443; bh=4b9w4Zq3DyhErOX1cB+RM8NVr6oDnZ/Ish3CTt/4VsU=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From:Subject:Reply-To; b=nXp/9jzf9nJWwjc3hSgQ8pE5YzKP9rHoJWkJttlAnEPfF3/iaisv5m8ymMh/8DK35k8jJnRuEuDqXYFKETHwPX7EG7/i/Oyw0eXmOgE76KaCWH46kuCaf00VNTy/yJykpbhEvaanQwf6U5C3YqEwl0cTBaXM7DULBb5WFeIKvF+c5kQFeTJwcEgdv+GCVUBHVsgWotlu2Sb/aJJRq0uFqoSMR15FEgK/WSz1ZaQk/+HdBYmGuE7Gd07V2pednGqSXHbcvhXUQuYUxJ5ypT1f/a3+qUk8Kkh2rMxPnaMVzQr2KSGkUSze7cZDG5tZvyz5/SVfoDq3q5Qo53SHLn2xZA== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1779471443; bh=0sBeE2a1pPMu0WR0PQAnS8RM9BqSuXEmJIZgb43NQNK=; h=X-Sonic-MF:Date:Subject:To:From:From:Subject; b=tBB2kYjINxbYg6iQny5jrEINFG1j5ua6x0smIE/j3cF5zh8e96KD+Lr+/3CrQXMWe68owmVNdYR6z2AgwEg8OLSxZkJYBmVWlVR7DscARHNkfLsiJjzFg2yz2FGkH6UANczyeNJQkJKIJNFMyvlDFY3wGZX3JrBkE2pRWijM2EDKE9hkI66ftMHXkUFp604cYeaxpTC7h5uwJfR5IkCmGhl73VfHxtIwUirkWw6Q80J0Vng4X+3kxUzjVqpZ3N8sqjiCjm1NdiHqGSqI3xT8QrwEmrOaZaxNJH0qXp8bYQR7wXMkvwKsHLs3aVdmqJFS3EobpgumdNEDoAHdkVRyLQ== X-YMail-OSG: uC5DU6UVM1nVnvk7FIm_AI_9TXCPFrbTQQyQ9v.8EIYE40aJv8iNZdm4V8GeRmN l2OtnHFbzwKw0PX9NBa074ree7LgCI_CHbewkAMVAVmkAoyr.JZRl.Nzte4aeSMIlrVOPOOviz5f KHqBGJBZTEqYe_jTzIWvlSCYPLbSDXd.Oc8VAP5pNMBGmemAsC2VqEbKoVn0MbCXwGI5cCtozWHV nAIRASYvwhT0dWeMBs4Lx.yQePxxnH5CKYqnTiNAr6u.OlZnhoDtexJpbD94dxQfhZQ6yY.arqtW KbtdJwJrE5FYFPcHGHHXydZm65Yun.yOgRH1OoIqPqw.5yXH5NC0Np5x7vt5EpMbng7ofbsHOz21 _kGVWZqFnv19yRxA05Ron70gs6h_xWayiV903.rbizgoUON2Ftr4.haJ97F9jAJW78stSb5sFAVY fGvgauhBE7E3MJg1Yaj_sb2hzOgPeqSV6ykmLzifkazNfwitKV9u0O9NobYop7kdc9eOh5tWYhNk 1_kKRlD3LfiwONOpjOGnPFP_Z3KJ31cqHLOJgu.XOnMT7tvqkXEJZtGFLXiwKfA.kQDwGrH70us5 OdTyJGqHULX4OLOnYK750jH_UIRf_8d_TeB9VaeHzolhD_NwL2ySzdxOjfbaaRqW6M2QqSIZBERl yofkQXGA6v3it2WXOS7ixYl9qRGnCKmD88h6jyyyc5xE8h0rlww.SCIBn09Kje5A66UmDfRwZaLB AZ3pZswW4Asacw2ySfF5xE8nDUxkaHW5OYBJH.o7HtGHOoZ1SZPUvBYRAOIJAbbsui11Q6_FQ_k3 jhjqwO4iDAq_2JX0CvkepVseWTHcVUNP8aD9zWlzBCvVhjEent9ZftWs50lEgcLXND8RndA_3HDd 8Tx85xBDEq7LxKSWprNO_YfN4a0f7dF52MLDVSoIRuLT30IF7hNXSIXynv73dhtIyAuaB6ZrOm_X ynWastACco5sy0l6Mjmo6xYRY9QB927cSe8krI3tJGxO6SkasSl0_SbkmqOx6BY3inWxHOAa_9Tz qjaPoHr4.LClNL2iaN8WSUTNb4XhwE3ht9wyfxpGIEqIb6faoNeJGop8hyTUb5ZSiNjwQ_KscKVw YzgkKOqA9znXrKePzv6KVr0qq_gVdG_bkO9R6oqPUrTtnf8DlCEfWgJF5VmfFduKHqNDx9_ezSsr EleFTVOSHtyPceTDx8Tqaqp7_1g9wH0lmn5c10V14zEO3zR38OYfnjeNx.8c018ABdlbROZ8TFyf 5PXIflre47y4LE3BFlubHUZIcYZjJJapC31mjUDrLIamRNYOlJ5IQmTkDS2BRX5GwJiy4gMN53cR l4YtRVh4xSnFhjQJMcnPhYAOvnmAGLyUif5LjD7pJnLDkcz1YFCfLsAuCj7JZSzIZLKfdoTEYlys CzUin21TvC5RTCHmY3is5t0gekhEpSL3OTkbrewaihaBGnYI0U4o1bkliLyE28l_pGJpvRoJDOKx QhszYb_tYP9tX6KIJOJMKbTj6LH3wTIkBMSeDscPpBOZzngtfRL35FAu8b1g3YGvefoCPl2tfWO5 B3DyUBFZId4ZOvHRlVmKo1tvHZ_pcIjx3AzLU7sZYRDvBS7jK6oNakUjoNjsE8oQRyGF3SMioBKi dEA3z.LgU_5yoVIMkh1AGexk9RzD4IHFNME7K4mWDRVcprr9uXy8RvABmBlCYNAHofxDiQr7_aUt D.lg7S1j9hjfkZbV1rFnJE9T2qqkTndiVF1MAXKhEGqjw2_CUUkS7EippSabmQuJSidKooBd3dCZ C1_L4iNMC88s13PHXAJxErfoxnS5tALsJ4lm9wmwzW9l6f4fSUwvjS6z3EyqvIQKsHeVzUKuhTh_ FfDNQt5BPZXS3BdoDCf37T6AREcfvuM19XTAqrgKPU6tRYiyt5Go6DUxsfVV_ukDmQBE0ts0ER32 2Zbi5bLZqu3rDyWumIWCZ9DaLiK7.rmICYbyJlxQEWmpR1n.989uQ3np2b34jaxE57OhzZmFgtdO FTqzxxrLBY.Y089Q5k8Bl8Evjv44WSbAqRDSMzRAlQMXdweK_2d2YXEHDYFD9iLCuC.FnVvENKHe ps7QG7unLUJLIIUw3bgrBva2MarEtxV69AH5GalYfeY39.IsgaVQzeQh7izgXljcpXcOfgbkEPmQ tLeyh.h_DTwPhLLjrkYPlAmG0R_LbBX21yY4PhB7fLBIuf3m4KhepzDdJ8_bdI4ctFb9DaeBTzUt OtZXkWPqm.fAkQ.mTum9vMNcWRSF.NMEBetMr9PK9FB_W_IizN8Vhuji_z4q.LEoBaVDe9oQKoWZ EdlGkfhOp3BAQ5MHGMrNndMd8yyeN3o4xRc590N23JOeJmzTGeg1Y X-Sonic-MF: X-Sonic-ID: c92bb6a4-ab2f-4500-ab35-4eda38e685d5 Received: from sonic.gate.mail.ne1.yahoo.com by sonic308.consmr.mail.gq1.yahoo.com with HTTP; Fri, 22 May 2026 17:37:23 +0000 Received: by hermes--production-gq1-7bb7df5c46-7wvm2 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID e18b76d8ddef541c5c8c1e6c11868569; Fri, 22 May 2026 17:37:21 +0000 (UTC) Message-ID: <486b7947-2842-49bc-977f-e9d12b3d1ef8@yahoo.com> Date: Fri, 22 May 2026 10:37:19 -0700 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 4dd97955e68d - main - libpkgconf: Fix paths To: Nuno Teixeira Cc: dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org, freebsd-current References: <69ee1653.34850.61462b24@gitrepo.freebsd.org> <24a05f73-84a3-480f-b797-e0688753810c@yahoo.com> <6f82ab2f-b5da-429f-84ed-4d5b7af5f5f0@yahoo.com> Content-Language: en-US From: Mark Millard In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Mailer: WebService/1.1.25725 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Queue-Id: 4gMXXn6KMdz46WQ X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On 5/21/26 15:51, Nuno Teixeira wrote: > Hello Mark, > > Sorry for bad reply... > > I did take a look a https://reviews.freebsd.org/D56404 reviews.freebsd.org/D56404> and noticed that ivy@ > participate on it and did open https://bugs.freebsd.org/bugzilla/ > show_bug.cgi?id=295439 id=295439> > > For what I see in PR is that uacme pkgconf problem is related to PREFIX > set to pkg maybe related to pkgbase method when installing main or suing > a custom PREFIX. There is a response in the review: QUOTE khorben added a comment. . . . Systems with a different `PREFIX` than `/usr/local` should install `pkgconf` for themselves, as was the case before. Make sure that path has precedence over `/usr/bin` in such cases. Let me know if that's not an acceptable situation, and we can look for a better solution. END QUOTE > > Thanks, > > Mark Millard > escreveu > (quinta, 21/05/2026 à(s) 21:21): > > On 5/21/26 11:18, Nuno Teixeira wrote: > > Hello, > > > > This change doens't honour PREFIX when it is set to other path than > > default "/usr/local/" > > As I only had noted an unexpected year in a date when I read the > original and replied about that, replying to my message instead of > des@'s original message is a little odd. > > But, in response, I did post a question to the review of the original > https://reviews.freebsd.org/D56404 D56404> ("pkgconf: import into the base > system"), asking: > > "What is the relationship of this type of change to use of ${PREFIX} > when ports install themselves and it is not the /usr/local default > value? (There is also a linux compatibility related standard default for > PREFIX and folks can specify things like /opt .)" > > I referenced you and your message. > > > > > -CFLAGS+=       -DPERSONALITY_PATH=\"/usr/share/pkgconfig/ > > personality.d:/etc/pkgconfig/personality.d:${LOCALBASE:U}/etc/ > pkgconfig/ > > personality.d\" > > -CFLAGS+=       -DPKG_DEFAULT_PATH=\"${LOCALBASE:U}/libdata/ > pkgconfig:/ > > usr/libdata/pkgconfig:${LOCALBASE:U}/share/pkgconfig\" > > +CFLAGS+=       -DPERSONALITY_PATH=\"/usr/share/pkgconfig/ > > personality.d:/etc/pkgconfig/personality.d:${LOCALBASE:U/usr/ > local}/etc/ > > pkgconfig/personality.d\" > > +CFLAGS+=       -DPKG_DEFAULT_PATH=\"${LOCALBASE:U/usr/local}/libdata/ > > pkgconfig:/usr/libdata/pkgconfig:${LOCALBASE:U/usr/local}/share/ > pkgconfig\" > > > > Please see https://bugs.freebsd.org/bugzilla/show_bug.cgi? > id=295439 > > > > > > > Thanks, > > > > Mark Millard > >> escreveu > > (domingo, 26/04/2026 à(s) 19:08): > > > >     On 4/26/26 06:42, Dag-Erling Smørg rav wrote: > >     > The branch main has been updated by des: > >     > > >     > URL: https://cgit.FreeBSD.org/src/commit/ cgit.FreeBSD.org/src/commit/>? > >     id=4dd97955e68df02b26d59e4e7c9a8167947a5164 >     cgit.FreeBSD.org/src/commit/ commit/>? > >     id=4dd97955e68df02b26d59e4e7c9a8167947a5164> > >     > > >     > commit 4dd97955e68df02b26d59e4e7c9a8167947a5164 > >     > Author:     Dag-Erling Smørgrav > >     > AuthorDate: 2026-04-26 13:41:47 +0000 > >     > Commit:     Dag-Erling Smørgrav > >     > CommitDate: 2026-04-26 13:41:47 +0000 > >     > > >     >     libpkgconf: Fix paths > >     >      > >     >     ${LOCALBASE:U} evaluates to exactly the same thing as > >     ${LOCALBASE}. > >     >     Presumably what was meant was ${LOCALBASE:U/usr/local}. > >     >      > >     >     Fixes:          b8352da33f34 ("pkgconf: import into the base > >     system") > >     >     Reviewed by:    khorben > >     >     Differential Revision:  https://reviews.freebsd.org/ > D56642 > >      reviews.freebsd.org/D56642>> > >     > --- > >     >  lib/libpkgconf/Makefile       | 4 ++-- > >     >  tools/build/depend-cleanup.sh | 4 ++++ > >     >  2 files changed, 6 insertions(+), 2 deletions(-) > >     > > >     > diff --git a/lib/libpkgconf/Makefile b/lib/libpkgconf/Makefile > >     > index fee7f275d9ff..3cfb2172a00e 100644 > >     > --- a/lib/libpkgconf/Makefile > >     > +++ b/lib/libpkgconf/Makefile > >     > @@ -14,8 +14,8 @@ INCS=               bsdstubs.h iter.h > >     libpkgconf-api.h libpkgconf.h stdinc.h > >     >  > >     >  WARNS?=              3 > >     >  > >     > -CFLAGS+=     -DPERSONALITY_PATH=\"/usr/share/pkgconfig/ > >     personality.d:/etc/pkgconfig/personality.d:${LOCALBASE:U}/etc/ > >     pkgconfig/personality.d\" > >     > -CFLAGS+=     -DPKG_DEFAULT_PATH=\"${LOCALBASE:U}/libdata/ > >     pkgconfig:/usr/libdata/pkgconfig:${LOCALBASE:U}/share/pkgconfig\" > >     > +CFLAGS+=     -DPERSONALITY_PATH=\"/usr/share/pkgconfig/ > >     personality.d:/etc/pkgconfig/personality.d:${LOCALBASE:U/usr/ > local}/ > >     etc/pkgconfig/personality.d\" > >     > +CFLAGS+=     -DPKG_DEFAULT_PATH=\"${LOCALBASE:U/usr/local}/ > >     libdata/pkgconfig:/usr/libdata/pkgconfig:${LOCALBASE:U/usr/local}/ > >     share/pkgconfig\" > >     >  CFLAGS+=     -DSYSTEM_INCLUDEDIR=\"/usr/include\" > >     >  CFLAGS+=     -DSYSTEM_LIBDIR=\"/usr/lib\" > >     >  CFLAGS+=     -I${SRCTOP}/lib/libpkgconf -I${PKGCONFDIR} > >     > diff --git a/tools/build/depend-cleanup.sh b/tools/build/depend- > >     cleanup.sh > >     > index e9c02d015368..c186c39a3448 100755 > >     > --- a/tools/build/depend-cleanup.sh > >     > +++ b/tools/build/depend-cleanup.sh > >     > @@ -317,6 +317,10 @@ check_epoch_and_opts > >     >  #          "$OBJTOP"/tests/sys/kqueue/libkqueue/* > >     >  #fi > >     >  > >     > +# 20250426 # libpkgconfig contains incorrect paths > > > >     2025 above is a typo? > > > >     > +clean_obj lib/libpkgconf personality c pkgconfig:/share > >     > +clean_obj lib/libpkgconf pkg c pkgconfig:/share > >     > + > >     >  # 20251219 # libkrb5profile is now internal > >     >  for libcompat in "" $ALL_libcompats; do > >     >       dirprfx=${libcompat:+obj-lib${libcompat}} > >     > > >     > > > > > > >     -- > >     === > >     Mark Millard > >     marklmi at yahoo.com > > > > > > > > > -- > > Nuno Teixeira > > FreeBSD UNIX:     Web:  https://FreeBSD.org > > > > > > > -- > === > Mark Millard > marklmi at yahoo.com > > > > -- > Nuno Teixeira > FreeBSD UNIX:     Web:  https://FreeBSD.org > -- === Mark Millard marklmi at yahoo.com From nobody Fri May 22 17:39:14 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMXZv6qFHz6fJgB for ; Fri, 22 May 2026 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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMXZv5sf6z47b1 for ; Fri, 22 May 2026 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=1779471559; 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; bh=ZdKUEkoRPoeSw+ukh0kYmGgl4f90iKL4l2aHR5fE2hQ=; b=RRrkCci79Vg6GDWr7HgFnZpMG/F6sfkNoDn8sVlvUcx3hw9G7Pz426D1ozmjemM/plvchB L2qY/iEmKjbpZ5DXeYi8ORUsKdLPSY3EymhsXjQZIPhsahjHZnG3fWFzRferg518eeVcbC lTxLZ0/fGI0jx0IgbNZX3JNforOtGt3m9bjTwQ5Uhd/jLEZyiW+QyaIQXdHdvET1rzf5W2 N3YTXVWq9PP2+qC9yW90nndYItVU5WwmoHJZKQAI4Qc/wxm8DqD8oXonNPJv/SoTD7q71V FimTJiGSzxPHy6Lg48wI2vZOHvU+YfrwV24FWiyusuaiQC48PoWZKVrspt45+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779471559; a=rsa-sha256; cv=none; b=j/7VWRLU512tVsrOUZqUhP0I17BiXARJ3m/HnvCYkBR9hHejH8kuoL7B0oZ6WQ0oNHzVvV 72kq7m9ldgyjLDT2FqwFFdW9s5i4sCaZIJ/5jYIHyPQbLwl69vqd+YJZGh0zun+Voo1Ia5 Kg6bqQkxlUXLlzdsFSHVOiAmBrQA0210dufCRjQpbWxjzz8yvjPaiAKpTtg4vN0d1aVG21 J6tFI9ZlfUnEzePJxCRNz6fW5IeDjowGv0UfZ/8x5Xd98Kx5D0dGxxj9uSh7HUnFsODSSZ 1drxieW7tmIN/ou9CTw2WsjCmHKpKM52ph/HVrbqy9pbiH2IYOID48TbL4jSDA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779471559; 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; bh=ZdKUEkoRPoeSw+ukh0kYmGgl4f90iKL4l2aHR5fE2hQ=; b=ZN5CROUka+Psu/C9XNWh3JJSZN3fmuIvLWbj/b/8MhGbBBvvwyh77cioboO7boSYMPlxVz lNWQEd/d0xAQ0N9ARCQSpnVBCDt2xZU3MZxNnJYY8EMjU6EPoqUGEliEgGe3NvV0fnB/5o HK5O6gUWYEsm6Tk89OwrhKVJv0oMPtWQnAviT6Z/u/CpHt/NJfk8aUrOotm5rF8uKwekG0 LfUcWOk1WvtSIsaXAs0BYzOa7NJr0+DwzCHGdv8yCf+GKOJbEU1y7dPmW8y8Ur8G93+xhM xN+Gjvrdn2S8VZD4JP+Zvq8ldtA7/qhJFEsUpMIuw+yz2K9NL+CQFYNsBfEe4A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMXZv5BvXzWPb for ; Fri, 22 May 2026 17:39:19 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37423 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:39:14 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jitendra Bhati From: Alan Somers Subject: git: 113c262b2ad1 - main - lib/libc/tests/gen: add fts_open() error and edge case tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 113c262b2ad157790e19188bf298b7205bd1887b Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:39:14 +0000 Message-Id: <6a1094c2.37423.3db33e3e@gitrepo.freebsd.org> The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=113c262b2ad157790e19188bf298b7205bd1887b commit 113c262b2ad157790e19188bf298b7205bd1887b Author: Jitendra Bhati AuthorDate: 2026-05-21 01:40:13 +0000 Commit: Alan Somers CommitDate: 2026-05-22 17:38:21 +0000 lib/libc/tests/gen: add fts_open() error and edge case tests Add ATF test cases covering fts_open() error conditions and edge cases: - invalid option bits (outside FTS_OPTIONMASK) yield EINVAL - empty argv yields EINVAL - empty path string yields FTS_NS with ENOENT - nonexistent path yields FTS_NS, not open failure - trailing slash does not crash (SVN r49851 regression) - unreadable directory yields FTS_D then FTS_DNR, never FTS_DP - multiple root paths are all visited left to right Sponsored by: Google LLC (GSoC 2026) Reviewed by: asomers MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2217 --- lib/libc/tests/gen/Makefile | 1 + lib/libc/tests/gen/fts_open_test.c | 230 +++++++++++++++++++++++++++++++++++++ 2 files changed, 231 insertions(+) diff --git a/lib/libc/tests/gen/Makefile b/lib/libc/tests/gen/Makefile index 054b1b426b3d..9c1c1cb75bcf 100644 --- a/lib/libc/tests/gen/Makefile +++ b/lib/libc/tests/gen/Makefile @@ -11,6 +11,7 @@ ATF_TESTS_C+= fpclassify2_test ATF_TESTS_C+= fts_blocks_test .endif ATF_TESTS_C+= fts_misc_test +ATF_TESTS_C+= fts_open_test ATF_TESTS_C+= fts_options_test ATF_TESTS_C+= ftw_test ATF_TESTS_C+= getentropy_test diff --git a/lib/libc/tests/gen/fts_open_test.c b/lib/libc/tests/gen/fts_open_test.c new file mode 100644 index 000000000000..e6120b09006b --- /dev/null +++ b/lib/libc/tests/gen/fts_open_test.c @@ -0,0 +1,230 @@ +/* + * Copyright (c) 2026 Jitendra Bhati + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * Tests for fts_open() error conditions and edge cases. + */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "fts_test.h" + +/* + * Option bits outside FTS_OPTIONMASK must fail with EINVAL. + */ +ATF_TC(invalid_options); +ATF_TC_HEAD(invalid_options, tc) +{ + atf_tc_set_md_var(tc, "descr", + "fts_open with out-of-mask option bits fails with EINVAL"); +} +ATF_TC_BODY(invalid_options, tc) +{ + char *paths[] = { ".", NULL }; + + ATF_REQUIRE_ERRNO(EINVAL, fts_open(paths, 0x10000, NULL) == NULL); +} + +/* + * Empty argv (NULL as first element) must fail with EINVAL. + */ +ATF_TC(empty_argv); +ATF_TC_HEAD(empty_argv, tc) +{ + atf_tc_set_md_var(tc, "descr", + "fts_open with NULL first argv element fails with EINVAL"); +} +ATF_TC_BODY(empty_argv, tc) +{ + char *paths[] = { NULL }; + + ATF_REQUIRE_ERRNO(EINVAL, + fts_open(paths, FTS_PHYSICAL, NULL) == NULL); +} + +/* + * An empty string in argv is a valid path but stat("") fails with ENOENT. + * fts_open() succeeds; the resulting FTSENT has fts_info == FTS_NS and + * fts_errno == ENOENT. + */ +ATF_TC(empty_path_string); +ATF_TC_HEAD(empty_path_string, tc) +{ + atf_tc_set_md_var(tc, "descr", + "empty string in argv produces FTS_NS entry"); +} +ATF_TC_BODY(empty_path_string, tc) +{ + char *paths[] = { "", NULL }; + FTS *fts; + FTSENT *ent; + + ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL, NULL)) != NULL); + + ent = fts_read(fts); + ATF_REQUIRE(ent != NULL); + ATF_CHECK_EQ(FTS_NS, ent->fts_info); + ATF_CHECK_EQ(ENOENT, ent->fts_errno); + + fts_close(fts); +} + +/* + * A nonexistent path produces an FTS_NS entry rather than causing + * fts_open() itself to fail. fts_open() does not validate whether + * paths exist. errno must be 0 after the traversal ends normally. + */ +ATF_TC(nonexistent_path); +ATF_TC_HEAD(nonexistent_path, tc) +{ + atf_tc_set_md_var(tc, "descr", + "nonexistent path produces FTS_NS entry, not fts_open failure"); +} +ATF_TC_BODY(nonexistent_path, tc) +{ + char *paths[] = { "this-path-does-not-exist", NULL }; + FTS *fts; + FTSENT *ent; + + ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL, NULL)) != NULL); + + ent = fts_read(fts); + ATF_REQUIRE(ent != NULL); + ATF_CHECK_EQ(FTS_NS, ent->fts_info); + ATF_CHECK_EQ(ENOENT, ent->fts_errno); + + /* + * Next fts_read must return NULL with errno == 0 — + * end-of-traversal, not an error. + */ + errno = 1; /* sentinel — fts_read must clear this */ + ATF_CHECK_EQ(NULL, fts_read(fts)); + ATF_CHECK_EQ(0, errno); + + ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m"); +} + +/* + * A path with a trailing slash must not crash and must traverse the + * directory normally. This is a regression test for SVN r49851. + */ +ATF_TC(trailing_slash); +ATF_TC_HEAD(trailing_slash, tc) +{ + atf_tc_set_md_var(tc, "descr", + "trailing slash on root path must not crash (SVN r49851)"); +} +ATF_TC_BODY(trailing_slash, tc) +{ + char *paths[] = { "dir/", NULL }; + FTS *fts; + FTSENT *ent; + int seen_dir, seen_file; + + ATF_REQUIRE_EQ(0, mkdir("dir", 0755)); + ATF_REQUIRE_EQ(0, close(creat("dir/file", 0644))); + + ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL, NULL)) != NULL); + + seen_dir = 0; + seen_file = 0; + while ((ent = fts_read(fts)) != NULL) { + if (ent->fts_info == FTS_D || ent->fts_info == FTS_DP) + seen_dir = 1; + if (ent->fts_info == FTS_F) + seen_file = 1; + } + + ATF_CHECK_EQ_MSG(0, errno, + "fts_read loop should end with errno 0, not %d", errno); + ATF_CHECK_MSG(seen_dir != 0, "directory was never visited"); + ATF_CHECK_MSG(seen_file != 0, "file inside dir was never visited"); + + ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m"); +} + +/* + * An unreadable directory must produce FTS_D then FTS_DNR. It must NOT + * produce FTS_DP because fts never successfully entered it. + * + * Requires an unprivileged user because root ignores directory permissions. + */ +ATF_TC(unreadable_dir); +ATF_TC_HEAD(unreadable_dir, tc) +{ + atf_tc_set_md_var(tc, "descr", + "unreadable directory yields FTS_D then FTS_DNR, never FTS_DP"); + atf_tc_set_md_var(tc, "require.user", "unprivileged"); +} +ATF_TC_BODY(unreadable_dir, tc) +{ + ATF_REQUIRE_EQ(0, mkdir("unr", 0000)); + fts_test(tc, &(struct fts_testcase){ + (char *[]){ "unr", NULL }, + FTS_PHYSICAL, + (struct fts_expect[]){ + { FTS_D, "unr", "unr" }, + { FTS_DNR, "unr", "unr" }, + { 0 } + }, + }); +} + +/* + * Multiple root paths must all be visited left-to-right, each tree + * traversed completely before moving to the next root. + */ +ATF_TC(multiple_roots); +ATF_TC_HEAD(multiple_roots, tc) +{ + atf_tc_set_md_var(tc, "descr", + "fts_open visits multiple root paths left-to-right"); +} +ATF_TC_BODY(multiple_roots, tc) +{ + ATF_REQUIRE_EQ(0, mkdir("a", 0755)); + ATF_REQUIRE_EQ(0, mkdir("b", 0755)); + ATF_REQUIRE_EQ(0, close(creat("a/x", 0644))); + ATF_REQUIRE_EQ(0, close(creat("b/y", 0644))); + + fts_test(tc, &(struct fts_testcase){ + (char *[]){ "a", "b", NULL }, + FTS_PHYSICAL, + (struct fts_expect[]){ + { FTS_D, "a", "a" }, + { FTS_F, "x", "x" }, + { FTS_DP, "a", "a" }, + { FTS_D, "b", "b" }, + { FTS_F, "y", "y" }, + { FTS_DP, "b", "b" }, + { 0 } + }, + }); +} + +ATF_TP_ADD_TCS(tp) +{ + fts_check_debug(); + ATF_TP_ADD_TC(tp, invalid_options); + ATF_TP_ADD_TC(tp, empty_argv); + ATF_TP_ADD_TC(tp, empty_path_string); + ATF_TP_ADD_TC(tp, nonexistent_path); + ATF_TP_ADD_TC(tp, trailing_slash); + ATF_TP_ADD_TC(tp, unreadable_dir); + ATF_TP_ADD_TC(tp, multiple_roots); + + return (atf_no_error()); +} From nobody Fri May 22 17:43:32 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMXgn0G3tz6fK6J for ; Fri, 22 May 2026 17:43:33 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMXgm6V9Lz497s for ; Fri, 22 May 2026 17:43:32 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779471812; 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; bh=n3I47a/BjUgldU9TLLq/JEcp9/Fw+N1u4e+iA6D2oxw=; b=pQ/dB6OHVdTWJNAq0ITgA3hkK7yShioaV+LF5DG7X25sGqfRn3I0DtUFGuunLozAvJphFT yxbW8MGcrLYOBI0FSfoKn9qE+Nf3C4ULV6IguNyw+PE7vYjev9xJt29qfgk5Ae/iCIhDlg i2HLZDpcgmL2IrYdlu3u51KAvFsRQaZs7UJTqsAzKqT67sTcoPNSWsKZcWRUVAEoWHQhs4 spxw7dSkbydH+dbKS/NBo7Wbjs8vEDEESh5c+CpzJfV1JaUaSwZuUpKWn3pdgnT0sGn9Pg moNSUbcoMUeSeiQno4+P7IDNcAisbwbWnEA0DgNugvlIXaa+KnVSS4r3Ohq2Dg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779471812; a=rsa-sha256; cv=none; b=aKtr+ENVwfVdULghSS/AaewrjmnNnI9WrzTVynT1xr+L2tsHNd7fadrYk7BhxUsHWjsBck +g8vKHy8VcKr/4hjjchlxRoZibf1zJ/7uOG3VGVmjLIVG0p7PjmgI95/GYLJPNta7qTJwX 2JFrxsbta3S3LfakrOp1gmjoicQKF0KIdsksp3503mKAEIat6n5b1DedExndllp4ek1sZ1 q/Mrxr3g0+4+poBJV1MDhFwii13fPWUqDz+pHB7XKI2UgxXO9UQJVSc5ZQxWNFAnOAXv+l JhppfvKTa8sZvIHxKNNsHsBrEo3tUR2SSWBk2ZyVZOQZt116bwxhmrrGvcqX/w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779471812; 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; bh=n3I47a/BjUgldU9TLLq/JEcp9/Fw+N1u4e+iA6D2oxw=; b=q/NWojZ9CKFIzqcZfVfi17aPmvZ4lu+Zj/CsOCoCPnb0tK3fmyccPPb48BgpCK5gsSAuc7 llaonVthyenGLr3b78w/G3c/sPKds6otI1x2uXYojHp8l1sj3BjyQfpzmWPyUxeAs/grqN 7jIqkONgKzo5OLWKRJtg0X4d4WShPoexjEl4Gxg46Xz2hU+8TA1HYmc6eOP6gI+4lYLn9q HkuG+Pcgh/MUmE2z6KeoXROVpeTZNDvRD1EG5AlD7K4q8QA8HA3iI3v8ijxP4H8N809Yys +oBA17cSOi5pyH927bJKqjnZh00S4SvlDSeXE6pbLdyoJFa267qcaAM4GrbP4g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMXgm62HDzWXC for ; Fri, 22 May 2026 17:43:32 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 38631 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:43:32 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Jitendra Bhati From: Alan Somers Subject: git: e624417db8a1 - main - lib/libc/tests/gen: add fts_children() tests List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: e624417db8a136849caa31fc34266645ed6c3429 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:43:32 +0000 Message-Id: <6a1095c4.38631.14d7c934@gitrepo.freebsd.org> The branch main has been updated by asomers: URL: https://cgit.FreeBSD.org/src/commit/?id=e624417db8a136849caa31fc34266645ed6c3429 commit e624417db8a136849caa31fc34266645ed6c3429 Author: Jitendra Bhati AuthorDate: 2026-05-21 01:44:04 +0000 Commit: Alan Somers CommitDate: 2026-05-22 17:40:06 +0000 lib/libc/tests/gen: add fts_children() tests Add ATF test cases covering fts_children() behaviour: - before fts_read returns root entry list - empty directory returns NULL with errno 0 - non-empty directory returns all children in order - called twice returns equivalent results - FTS_NAMEONLY fills only fts_name, fts_info is FTS_NSOK - non-directory node returns NULL with errno 0 - invalid options returns NULL with EINVAL Sponsored by: Google LLC (GSoC 2026) Reviewed by: asomers MFC after: 1 week Pull Request: https://github.com/freebsd/freebsd-src/pull/2218 --- lib/libc/tests/gen/Makefile | 1 + lib/libc/tests/gen/fts_children_test.c | 323 +++++++++++++++++++++++++++++++++ 2 files changed, 324 insertions(+) diff --git a/lib/libc/tests/gen/Makefile b/lib/libc/tests/gen/Makefile index 9c1c1cb75bcf..9341fe8c9074 100644 --- a/lib/libc/tests/gen/Makefile +++ b/lib/libc/tests/gen/Makefile @@ -10,6 +10,7 @@ ATF_TESTS_C+= fpclassify2_test .if ${COMPILER_FEATURES:Mblocks} ATF_TESTS_C+= fts_blocks_test .endif +ATF_TESTS_C+= fts_children_test ATF_TESTS_C+= fts_misc_test ATF_TESTS_C+= fts_open_test ATF_TESTS_C+= fts_options_test diff --git a/lib/libc/tests/gen/fts_children_test.c b/lib/libc/tests/gen/fts_children_test.c new file mode 100644 index 000000000000..171b1227104c --- /dev/null +++ b/lib/libc/tests/gen/fts_children_test.c @@ -0,0 +1,323 @@ +/* + * Copyright (c) 2026 Jitendra Bhati + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +/* + * Tests for fts_children(). + */ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "fts_test.h" + +/* + * fts_children() before fts_read() returns the list of root entries. + */ +ATF_TC(before_read); +ATF_TC_HEAD(before_read, tc) +{ + atf_tc_set_md_var(tc, "descr", + "fts_children before fts_read returns root entry list"); +} +ATF_TC_BODY(before_read, tc) +{ + char *paths[] = { "dir", NULL }; + FTS *fts; + FTSENT *children, *p; + int count; + + ATF_REQUIRE_EQ(0, mkdir("dir", 0755)); + ATF_REQUIRE_EQ(0, close(creat("dir/a", 0644))); + + ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL, NULL)) != NULL); + + errno = 0; + children = fts_children(fts, 0); + ATF_REQUIRE_MSG(children != NULL, + "fts_children before fts_read must return the root list"); + ATF_CHECK_EQ(0, errno); + + count = 0; + for (p = children; p != NULL; p = p->fts_link) { + ATF_CHECK_EQ_MSG(FTS_D, p->fts_info, + "root entry should be FTS_D, got %d", p->fts_info); + count++; + } + ATF_CHECK_EQ_MSG(1, count, + "expected 1 root entry, found %d", count); + + ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m"); +} + +/* + * fts_children() on an empty directory returns NULL with errno == 0. + * errno=0 distinguishes "empty" from an actual error. + */ +ATF_TC(empty_dir); +ATF_TC_HEAD(empty_dir, tc) +{ + atf_tc_set_md_var(tc, "descr", + "fts_children on empty directory returns NULL with errno 0"); +} +ATF_TC_BODY(empty_dir, tc) +{ + char *paths[] = { "dir", NULL }; + FTS *fts; + FTSENT *ent, *children; + + ATF_REQUIRE_EQ(0, mkdir("dir", 0755)); + + ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL, NULL)) != NULL); + + ent = fts_read(fts); + ATF_REQUIRE(ent != NULL); + ATF_REQUIRE_EQ_MSG(FTS_D, ent->fts_info, + "expected FTS_D, got %d", ent->fts_info); + + errno = 1; /* sentinel — fts_children must clear this */ + children = fts_children(fts, 0); + ATF_CHECK_MSG(children == NULL, + "fts_children on empty dir must return NULL"); + ATF_CHECK_EQ_MSG(0, errno, + "fts_children on empty dir must set errno=0, got %d", errno); + + ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m"); +} + +/* + * fts_children() on a non-empty directory returns a linked list of all + * children in comparator order. + */ +ATF_TC(nonempty_dir); +ATF_TC_HEAD(nonempty_dir, tc) +{ + atf_tc_set_md_var(tc, "descr", + "fts_children on non-empty directory returns all children"); +} +ATF_TC_BODY(nonempty_dir, tc) +{ + static const char *expected[] = { "a", "b", "c", NULL }; + char *paths[] = { "dir", NULL }; + FTS *fts; + FTSENT *ent, *children, *p; + int i; + + ATF_REQUIRE_EQ(0, mkdir("dir", 0755)); + ATF_REQUIRE_EQ(0, close(creat("dir/a", 0644))); + ATF_REQUIRE_EQ(0, close(creat("dir/b", 0644))); + ATF_REQUIRE_EQ(0, close(creat("dir/c", 0644))); + + ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL, + fts_lexical_compar)) != NULL); + + ent = fts_read(fts); + ATF_REQUIRE(ent != NULL); + ATF_REQUIRE_EQ(FTS_D, ent->fts_info); + + children = fts_children(fts, 0); + ATF_REQUIRE_MSG(children != NULL, "fts_children(): %m"); + + i = 0; + for (p = children; p != NULL; p = p->fts_link, i++) { + ATF_REQUIRE_MSG(expected[i] != NULL, + "more children returned than expected"); + ATF_CHECK_STREQ(expected[i], p->fts_name); + ATF_CHECK_EQ(FTS_F, p->fts_info); + } + ATF_CHECK_MSG(expected[i] == NULL, + "fewer children returned than expected"); + + ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m"); +} + +/* + * fts_children() called twice on the same FTS_D node must return an + * equivalent list both times. + */ +ATF_TC(called_twice); +ATF_TC_HEAD(called_twice, tc) +{ + atf_tc_set_md_var(tc, "descr", + "fts_children called twice returns equivalent results"); +} +ATF_TC_BODY(called_twice, tc) +{ + char *paths[] = { "dir", NULL }; + FTS *fts; + FTSENT *ent, *first, *second, *p; + int count1, count2; + + ATF_REQUIRE_EQ(0, mkdir("dir", 0755)); + ATF_REQUIRE_EQ(0, close(creat("dir/x", 0644))); + ATF_REQUIRE_EQ(0, close(creat("dir/y", 0644))); + + ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL, + fts_lexical_compar)) != NULL); + + ent = fts_read(fts); + ATF_REQUIRE(ent != NULL); + ATF_REQUIRE_EQ(FTS_D, ent->fts_info); + + first = fts_children(fts, 0); + ATF_REQUIRE_MSG(first != NULL, "first fts_children call: %m"); + + count1 = 0; + for (p = first; p != NULL; p = p->fts_link) + count1++; + + /* + * The second call frees the first list and rebuilds. Do not + * dereference 'first' after this point — it has been freed. + */ + second = fts_children(fts, 0); + ATF_REQUIRE_MSG(second != NULL, "second fts_children call: %m"); + + count2 = 0; + for (p = second; p != NULL; p = p->fts_link) + count2++; + + ATF_CHECK_EQ_MSG(count1, count2, + "first call returned %d children, second returned %d", + count1, count2); + ATF_CHECK_EQ(2, count2); + + ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m"); +} + +/* + * fts_children(FTS_NAMEONLY): only fts_name and fts_namelen are filled. + * fts_info is FTS_NSOK for every entry. + */ +ATF_TC(nameonly); +ATF_TC_HEAD(nameonly, tc) +{ + atf_tc_set_md_var(tc, "descr", + "FTS_NAMEONLY fills only fts_name, fts_info is FTS_NSOK"); +} +ATF_TC_BODY(nameonly, tc) +{ + char *paths[] = { "dir", NULL }; + FTS *fts; + FTSENT *ent, *children, *p; + int count; + + ATF_REQUIRE_EQ(0, mkdir("dir", 0755)); + ATF_REQUIRE_EQ(0, close(creat("dir/f1", 0644))); + ATF_REQUIRE_EQ(0, close(creat("dir/f2", 0644))); + + ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL, + fts_lexical_compar)) != NULL); + + ent = fts_read(fts); + ATF_REQUIRE(ent != NULL); + ATF_REQUIRE_EQ(FTS_D, ent->fts_info); + + children = fts_children(fts, FTS_NAMEONLY); + ATF_REQUIRE_MSG(children != NULL, "fts_children(FTS_NAMEONLY): %m"); + + count = 0; + for (p = children; p != NULL; p = p->fts_link) { + ATF_CHECK_MSG(p->fts_name[0] != '\0', + "FTS_NAMEONLY: fts_name is empty"); + ATF_CHECK_EQ(strlen(p->fts_name), p->fts_namelen); + ATF_CHECK_EQ_MSG(FTS_NSOK, p->fts_info, + "FTS_NAMEONLY: expected FTS_NSOK, got %d", p->fts_info); + count++; + } + ATF_CHECK_EQ(2, count); + + /* Normal traversal must still work after FTS_NAMEONLY. */ + while (fts_read(fts) != NULL) + ; + ATF_CHECK_EQ_MSG(0, errno, + "traversal after FTS_NAMEONLY ended with errno %d", errno); + + ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m"); +} + +/* + * fts_children() on a non-directory node must return NULL with errno == 0. + */ +ATF_TC(nondirectory); +ATF_TC_HEAD(nondirectory, tc) +{ + atf_tc_set_md_var(tc, "descr", + "fts_children on a non-directory node returns NULL with errno 0"); +} +ATF_TC_BODY(nondirectory, tc) +{ + char *paths[] = { "dir", NULL }; + FTS *fts; + FTSENT *ent; + + ATF_REQUIRE_EQ(0, mkdir("dir", 0755)); + ATF_REQUIRE_EQ(0, close(creat("dir/file", 0644))); + + ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL, + fts_lexical_compar)) != NULL); + + ent = fts_read(fts); /* FTS_D dir */ + ATF_REQUIRE(ent != NULL); + ATF_REQUIRE_EQ(FTS_D, ent->fts_info); + + ent = fts_read(fts); /* FTS_F file */ + ATF_REQUIRE(ent != NULL); + ATF_REQUIRE_EQ(FTS_F, ent->fts_info); + + errno = 1; + ATF_CHECK_MSG(fts_children(fts, 0) == NULL, + "fts_children on FTS_F must return NULL"); + ATF_CHECK_EQ_MSG(0, errno, + "fts_children on FTS_F must set errno=0, got %d", errno); + + ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m"); +} + +/* + * fts_children() with an invalid options value must return NULL with + * errno == EINVAL. + */ +ATF_TC(invalid_options); +ATF_TC_HEAD(invalid_options, tc) +{ + atf_tc_set_md_var(tc, "descr", + "fts_children with invalid options returns NULL with EINVAL"); +} +ATF_TC_BODY(invalid_options, tc) +{ + char *paths[] = { ".", NULL }; + FTS *fts; + + ATF_REQUIRE((fts = fts_open(paths, FTS_PHYSICAL, NULL)) != NULL); + + ATF_REQUIRE_ERRNO(EINVAL, fts_children(fts, 99) == NULL); + + ATF_REQUIRE_EQ_MSG(0, fts_close(fts), "fts_close(): %m"); +} + +ATF_TP_ADD_TCS(tp) +{ + fts_check_debug(); + ATF_TP_ADD_TC(tp, before_read); + ATF_TP_ADD_TC(tp, empty_dir); + ATF_TP_ADD_TC(tp, nonempty_dir); + ATF_TP_ADD_TC(tp, called_twice); + ATF_TP_ADD_TC(tp, nameonly); + ATF_TP_ADD_TC(tp, nondirectory); + ATF_TP_ADD_TC(tp, invalid_options); + + return (atf_no_error()); +} From nobody Fri May 22 17:53:36 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMXvP4tkrz6fKlH for ; Fri, 22 May 2026 17:53: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMXvN5QHKz4Gxd for ; Fri, 22 May 2026 17:53:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kJJvnL84xyH6/9zc88nOlbU5IUWcQl1FFpWk+nLkdxo=; b=magEUvKsCQ2yPcNs7DzkB6NduA/KwzFVnJE9p2VRCDmsutxk3wT1lXmSBM07RwbIrth0Gv nNlX2daCWaSOFFZQeEeWK74qC1Ju6+DGegHV0VnGQaThSM1Xr4auZnUgp+k1RFnlvwg+wR NpOWTtPetkGDogQZpXa9RMFfx+d5ISV/cNHZVeeKipa2xrywGuNEvjdJdSRT5d4ZKwqqWy Zy3KaJoRkgcFMyZuTXwP93rDT+/Sd9KyXi2wD6jRFBAz788U+JmOGtNJTB9VBCq91WLNQT ZMEL8/UwdRs25WA0Jk8T6QjVTiuNsltunpt56aFhwNGBsLq68cRlCp6BK+oQ5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779472416; a=rsa-sha256; cv=none; b=thv5niHUT0ihHAjMweGdIXNxiXPmhUiC/y2uDp3cuA6FHpIv+2Jg9CthiZqtyKb2GVmU0F VGBxJN277qyRF0Aufc8UKHvcGkTQLmM3oxFF0zPqN4aKBM6XBtdZVqV5Kr644vW1RchBoz +k6h6PhYLUvakrtedXGvl8XtuXfxFKQx0S/0KDSvZPRXs7cnDGsJQlh8SVPk6ttmg6p5eQ TRyR+qORgoo/0JB2gI5CciE81T26NZUlO8+mdQmsiXy7lCDbOZqgdqYNDF18TX3mq2HCfz KVmTf18+OfBAeo78Ao9s7gMrMZ3/lPbfexdrwD5mDDELYHzmfdoY9uw79SAXcA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472416; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kJJvnL84xyH6/9zc88nOlbU5IUWcQl1FFpWk+nLkdxo=; b=BSJCLh5biKvTceBibvrSWjohgdlLJYuJGyCBsdEbGmsS4bPcDPiOzcSdM694c9KYzgJ5ne xpHbKpuJ0KRikjBCU3LA4vsMQR32AUWDndvgs2yJse3qpY5GnOxDZP4gkGqi2Z8LtDYN5b vmL7TMUmHdc3B7HXFgCxZeRJ/wGtVCEYh6gWdqG2TuDdPypjWT20tKSF9CZR3piahonwnT bBUFZsC+9F54dUM4hxWMxP/CplbngZbEx3St82edSj5/8ur6EDQzKVJfe8BUm+W3/4PVM2 JWIy7ApMQwimsaF2mlI00z5JdLoKGjN3NqbTPYjwLQ3nc+G3P37JuUPoISmD7g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMXvN4qBPzWq3 for ; Fri, 22 May 2026 17:53:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3997d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:53:36 +0000 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=B8rg?=rav Subject: git: 399f9ca49b6e - main - Revert "import ldns 1.9.0" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 399f9ca49b6ecc7fc9bd8b2a0fd487fea4570a65 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:53:36 +0000 Message-Id: <6a109820.3997d.3ee58a68@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=399f9ca49b6ecc7fc9bd8b2a0fd487fea4570a65 commit 399f9ca49b6ecc7fc9bd8b2a0fd487fea4570a65 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:52:00 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 17:53:26 +0000 Revert "import ldns 1.9.0" Pre-push rebase bungled the metadata This reverts commit 597a090ff2ab868242e4ec1cdec7469edbe41c50. --- contrib/ldns/Changelog | 46 --- contrib/ldns/Makefile.in | 58 +-- contrib/ldns/README | 19 +- contrib/ldns/config.guess | 26 +- contrib/ldns/config.sub | 749 ++++++++++----------------------------- contrib/ldns/configure | 94 +---- contrib/ldns/configure.ac | 41 +-- contrib/ldns/dnssec.c | 4 +- contrib/ldns/dnssec_zone.c | 50 +-- contrib/ldns/drill/drill.c | 2 +- contrib/ldns/drill/securetrace.c | 7 +- contrib/ldns/error.c | 2 - contrib/ldns/host2str.c | 60 ---- contrib/ldns/host2wire.c | 2 +- contrib/ldns/keys.c | 2 - contrib/ldns/ldns/config.h.in | 11 +- contrib/ldns/ldns/dnssec_zone.h | 14 +- contrib/ldns/ldns/edns.h | 6 +- contrib/ldns/ldns/error.h | 3 +- contrib/ldns/ldns/host2str.h | 18 - contrib/ldns/ldns/packet.h | 13 - contrib/ldns/ldns/rdata.h | 10 +- contrib/ldns/ldns/rr.h | 20 +- contrib/ldns/ldns/str2host.h | 10 - contrib/ldns/ldns/util.h.in | 22 -- contrib/ldns/net.c | 2 - contrib/ldns/packet.c | 23 +- contrib/ldns/rdata.c | 6 - contrib/ldns/resolver.c | 18 +- contrib/ldns/rr.c | 129 +------ contrib/ldns/sha1.c | 2 +- contrib/ldns/sha2.c | 18 +- contrib/ldns/str2host.c | 68 +--- contrib/ldns/util.c | 5 - contrib/ldns/wire2host.c | 3 - contrib/ldns/zone.c | 2 +- 36 files changed, 300 insertions(+), 1265 deletions(-) diff --git a/contrib/ldns/Changelog b/contrib/ldns/Changelog index 74e2631af72d..c7f36767b360 100644 --- a/contrib/ldns/Changelog +++ b/contrib/ldns/Changelog @@ -1,49 +1,3 @@ -1.9.0 2025-12-04 - * PR #246: Make ldns_calc_keytag() available for CDNSKEY RR - Thanks tgreenx and pnax - * PR #247: Make ldns_key_rr2ds() available for CDNSKEY RR - Thanks tgreenx - * PR #248: Make ldns_rr_compare_{ds,ds_dnskey}() available for - CDS and CDNSKEY RRs. Thanks tgreenx - * PR #245: Make drill trace use IPv6 when used with -6 - Thanks Paul Radford - * Fix #254: Unquoted "value" rdata for CAA records fail to validate. - Follows the long string unquoted syntax from RFC8659, section 4.1.1. - * Fix #266: ldns-read-zone -u fails if a type is the only type in a - window and the type modulo 256 is equal to zero. - * Fix #271: Intermittent build failure with multi-job - builds (make -j). - * Add ldns-verify-zone -s option. It checks all signature results, - instead of passing by when one RRSIG validates. That prints output - for spurious RRSIGs, the failures for them. - * Fix RR types NSAP-PTR, GPOS and RESINFO to print unquoted strings. - * Fix memory leak when trying to read zones that have equal RRs. - the ldns_dnssec_*_add_rr() functions now return LDNS_STATUS_EQUAL_RR - when an already existing RR is tried to be added. This is a API - change, hence this also bumps the version to 1.9.0 - * PR #282: ensure returning pkt with LDNS_STATUS_OK. Thanks grobian. - * PR #286: Fix RR Type AMTRELAY type nogateway, to print relay '.', - and memory leaks in parsing it. - * DSYNC is no longer a draft RR type and compiled by default - * RFC 9824 support: Compact Denial of Existence in DNSSEC - * The HHIT and BRID draft RR types - * PR #249: If RNG is already seeded, return early. - Thanks crrodriguez - * PR #221: Improve error messages. Thanks jschauma - * PR #256: Use SWIG_AppendOutput to support swig 4.3 - Thanks pemensik - * PR #188: Homogenize paths for source files during compilation - Thanks duthils - * Fix #283: ldns-walk fails after update from 1.8.3 to 1.8.4 - Thanks jschauma - * PR #200: Allow compiled tests to link to ldns statically via - environment variable. Thanks FGasper and pemensik - * PR #220: Optionally exclude ZONEMD RRs in ldns-compare-zone - Thanks gjherbiet - * Fix #285: A WALLET RR breaks TXT signing. Thanks bortzmeyer - * Fix #287: ldns-verify-zone hangs with missing NSEC3 RRs. - Thanks Roy Arends - 1.8.4 2024-07-19 * Fix building documentation in build directory. Thanks Michael Tokarev diff --git a/contrib/ldns/Makefile.in b/contrib/ldns/Makefile.in index b5ca1d3c3adf..32b91576d0d9 100644 --- a/contrib/ldns/Makefile.in +++ b/contrib/ldns/Makefile.in @@ -132,11 +132,11 @@ all: setup-builddir lib linktest manpages @P5_DNS_LDNS@ @PYLDNS@ @DRILL@ @EXAMPL .SUFFIXES: .c .o .a .lo .h .i .c.lo: - $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/$< -o $@ + $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $< -o $@ # Need libtool compile .c.o: - $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/$< -o $@ + $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $< -o $@ $(LDNS_LOBJS) $(LIBLOBJS) $(DRILL_LOBJS) $(EXAMPLE_LOBJS): $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/$(@:.lo=.c) -o $@ @@ -571,9 +571,9 @@ depend: done; \ done for p in $(EXAMPLE_PROGS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS); do \ - echo "$$p: $$p.lo \$$(LIB)" >> $(DEPEND_TMP) ; done + echo "$$p: $$p.lo $$p.o \$$(LIB)" >> $(DEPEND_TMP) ; done echo "$(TESTNS): `for o in $(TESTNS_LOBJS) ; do \ - echo -n "$$o " ; done`\$$(LIB)" \ + echo -n "$$o $${o%lo}o " ; done` \$$(LIB)" \ >> $(DEPEND_TMP) cp $(DEPEND_TARGET) $(DEPEND_TMP2) head -`egrep -n "# Dependencies" $(DEPEND_TARGET) | tail -1 | sed -e 's/:.*$$//'` $(DEPEND_TMP2) > $(DEPEND_TARGET) @@ -1114,28 +1114,28 @@ drill/work.lo drill/work.o: $(srcdir)/drill/work.c $(srcdir)/drill/drill.h ldns/ $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -examples/ldns-chaos: examples/ldns-chaos.lo $(LIB) -examples/ldns-compare-zones: examples/ldns-compare-zones.lo $(LIB) -examples/ldnsd: examples/ldnsd.lo $(LIB) -examples/ldns-gen-zone: examples/ldns-gen-zone.lo $(LIB) -examples/ldns-key2ds: examples/ldns-key2ds.lo $(LIB) -examples/ldns-keyfetcher: examples/ldns-keyfetcher.lo $(LIB) -examples/ldns-keygen: examples/ldns-keygen.lo $(LIB) -examples/ldns-mx: examples/ldns-mx.lo $(LIB) -examples/ldns-notify: examples/ldns-notify.lo $(LIB) -examples/ldns-read-zone: examples/ldns-read-zone.lo $(LIB) -examples/ldns-resolver: examples/ldns-resolver.lo $(LIB) -examples/ldns-rrsig: examples/ldns-rrsig.lo $(LIB) -examples/ldns-test-edns: examples/ldns-test-edns.lo $(LIB) -examples/ldns-update: examples/ldns-update.lo $(LIB) -examples/ldns-version: examples/ldns-version.lo $(LIB) -examples/ldns-walk: examples/ldns-walk.lo $(LIB) -examples/ldns-zcat: examples/ldns-zcat.lo $(LIB) -examples/ldns-zsplit: examples/ldns-zsplit.lo $(LIB) -examples/ldns-dpa: examples/ldns-dpa.lo $(LIB) -examples/ldns-dane: examples/ldns-dane.lo $(LIB) -examples/ldns-nsec3-hash: examples/ldns-nsec3-hash.lo $(LIB) -examples/ldns-revoke: examples/ldns-revoke.lo $(LIB) -examples/ldns-signzone: examples/ldns-signzone.lo $(LIB) -examples/ldns-verify-zone: examples/ldns-verify-zone.lo $(LIB) -examples/ldns-testns: examples/ldns-testns.lo examples/ldns-testpkts.lo $(LIB) +examples/ldns-chaos: examples/ldns-chaos.lo examples/ldns-chaos.o $(LIB) +examples/ldns-compare-zones: examples/ldns-compare-zones.lo examples/ldns-compare-zones.o $(LIB) +examples/ldnsd: examples/ldnsd.lo examples/ldnsd.o $(LIB) +examples/ldns-gen-zone: examples/ldns-gen-zone.lo examples/ldns-gen-zone.o $(LIB) +examples/ldns-key2ds: examples/ldns-key2ds.lo examples/ldns-key2ds.o $(LIB) +examples/ldns-keyfetcher: examples/ldns-keyfetcher.lo examples/ldns-keyfetcher.o $(LIB) +examples/ldns-keygen: examples/ldns-keygen.lo examples/ldns-keygen.o $(LIB) +examples/ldns-mx: examples/ldns-mx.lo examples/ldns-mx.o $(LIB) +examples/ldns-notify: examples/ldns-notify.lo examples/ldns-notify.o $(LIB) +examples/ldns-read-zone: examples/ldns-read-zone.lo examples/ldns-read-zone.o $(LIB) +examples/ldns-resolver: examples/ldns-resolver.lo examples/ldns-resolver.o $(LIB) +examples/ldns-rrsig: examples/ldns-rrsig.lo examples/ldns-rrsig.o $(LIB) +examples/ldns-test-edns: examples/ldns-test-edns.lo examples/ldns-test-edns.o $(LIB) +examples/ldns-update: examples/ldns-update.lo examples/ldns-update.o $(LIB) +examples/ldns-version: examples/ldns-version.lo examples/ldns-version.o $(LIB) +examples/ldns-walk: examples/ldns-walk.lo examples/ldns-walk.o $(LIB) +examples/ldns-zcat: examples/ldns-zcat.lo examples/ldns-zcat.o $(LIB) +examples/ldns-zsplit: examples/ldns-zsplit.lo examples/ldns-zsplit.o $(LIB) +examples/ldns-dpa: examples/ldns-dpa.lo examples/ldns-dpa.o $(LIB) +examples/ldns-dane: examples/ldns-dane.lo examples/ldns-dane.o $(LIB) +examples/ldns-nsec3-hash: examples/ldns-nsec3-hash.lo examples/ldns-nsec3-hash.o $(LIB) +examples/ldns-revoke: examples/ldns-revoke.lo examples/ldns-revoke.o $(LIB) +examples/ldns-signzone: examples/ldns-signzone.lo examples/ldns-signzone.o $(LIB) +examples/ldns-verify-zone: examples/ldns-verify-zone.lo examples/ldns-verify-zone.o $(LIB) +examples/ldns-testns: examples/ldns-testns.lo examples/ldns-testns.o examples/ldns-testpkts.lo examples/ldns-testpkts.o $(LIB) diff --git a/contrib/ldns/README b/contrib/ldns/README index fb588f4da586..e07fdc078aa2 100644 --- a/contrib/ldns/README +++ b/contrib/ldns/README @@ -1,21 +1,3 @@ -DEVELOPMENT VISION - -Note: ldns has been in maintenance mode since 2020, with no plans for major -features. We welcome PRs from contributors who want to add new functionality. -We also actively fix bugs, so users can continue to rely on ldns if its -current features meet their needs. - -We will continue to make occasional use of ldns in an experimental -setting, such as during an IETF Hackathon to build a proof of concept for an -Internet Draft. - -The natural successor to the ldns library is the domain library for Rust: -https://github.com/NLnetLabs/domain - -We offer drop-in replacements for commonly used ldns example tools in dnst: -https://github.com/NLnetLabs/dnst - ---- Contents: REQUIREMENTS @@ -28,6 +10,7 @@ Contents: Solaris KNOWN ISSUES pyldns + Your Support Project page: http://www.nlnetlabs.nl/ldns/ diff --git a/contrib/ldns/config.guess b/contrib/ldns/config.guess index a9d01fde4617..f6d217a49f8f 100755 --- a/contrib/ldns/config.guess +++ b/contrib/ldns/config.guess @@ -1,10 +1,10 @@ #! /bin/sh # Attempt to guess a canonical system name. -# Copyright 1992-2025 Free Software Foundation, Inc. +# Copyright 1992-2024 Free Software Foundation, Inc. # shellcheck disable=SC2006,SC2268 # see below for rationale -timestamp='2025-07-10' +timestamp='2024-01-01' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by @@ -60,7 +60,7 @@ version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. -Copyright 1992-2025 Free Software Foundation, Inc. +Copyright 1992-2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -123,7 +123,7 @@ set_cc_for_build() { dummy=$tmp/dummy case ${CC_FOR_BUILD-},${HOST_CC-},${CC-} in ,,) echo "int x;" > "$dummy.c" - for driver in cc gcc c17 c99 c89 ; do + for driver in cc gcc c89 c99 ; do if ($driver -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD=$driver break @@ -634,8 +634,7 @@ EOF sed 's/^ //' << EOF > "$dummy.c" #include - int - main () + main() { if (!__power_pc()) exit(1); @@ -719,8 +718,7 @@ EOF #include #include - int - main () + int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); @@ -1597,11 +1595,8 @@ EOF *:Unleashed:*:*) GUESS=$UNAME_MACHINE-unknown-unleashed$UNAME_RELEASE ;; - x86_64:[Ii]ronclad:*:*|i?86:[Ii]ronclad:*:*) - GUESS=$UNAME_MACHINE-pc-ironclad-mlibc - ;; - *:[Ii]ronclad:*:*) - GUESS=$UNAME_MACHINE-unknown-ironclad-mlibc + *:Ironclad:*:*) + GUESS=$UNAME_MACHINE-unknown-ironclad ;; esac @@ -1626,7 +1621,6 @@ cat > "$dummy.c" <." version="\ GNU config.sub ($timestamp) -Copyright 1992-2025 Free Software Foundation, Inc. +Copyright 1992-2024 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." @@ -120,6 +120,7 @@ case $# in esac # Split fields of configuration type +# shellcheck disable=SC2162 saved_IFS=$IFS IFS="-" read field1 field2 field3 field4 <; Fri, 22 May 2026 17:53: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMXvQ09r1z4Gpt for ; Fri, 22 May 2026 17:53:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XKuV9vqGFPq5lwTms6ZgZzTlNo9lTWHK6JSGLR6nV4M=; b=OKF5nOAfFycGzShnMk3FDVIHkFX7aS+NrSfm3GO7Jl605kzczwHiRWJwq6lImU6qKa4ZTX KcNw8/Xh7mGWDHHDTNeUeh3W9rK/Iy4nDTjpd9r9E+9ypnAQJXNTgj4eNYXEHIJ5bPCz7t 1g+u/P+R2WVGnbA3Jm2JyZKnrKSNvk4rsi5RjermllbBSzPNU9wWNmvVQSHXDOlw+3pRmp xBDFbMUXFmITS8w883oY8nJxe0XHDCFfZ+aj/O32eOx5lOCMCsAu3SITD7gd2imWYIpiBi LV+TMyuaxGJU2BS1tcdELPcfQg5tyajHee9VbFrieOW3x3xP4ffsum2piJ4BAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779472418; a=rsa-sha256; cv=none; b=BnMD09cQAbMYm2pwEA4F9lULdq1c4+xnZQNrkeeb0Kgp/Lc3TN+P2zqPhtcOohtSaNcPtS qxYbB04C9inCp9hCTRySUcnEUzHeIzSLzcLKinIlz26+igcWlMerGZqhbh8izO60lWG2Ac Gs1FyNpQFICvexB3Z9EM7Y9I+lXFah3Ive3sDaW5kum7sP9ZOpjedqAWKskZxrgYySjBpd QLDfDjOT0b+py6ifIX7i+bpD57bCsf3tXHMZ0oPw2eYfo2n6ntDRtnQsB5SpnAb6VE0Sc9 rO1CG/zXim3doHm3E/tcfyE/TfGyMT1VwZ7M35p4L7K0aiIUhntpvzr5175Rvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472418; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=XKuV9vqGFPq5lwTms6ZgZzTlNo9lTWHK6JSGLR6nV4M=; b=GpAEwrrEl+Shiiic/lU6i1rhvPFu41Rt2Bv5XbARbFOH51EE37A1aC74Vdpt1NwGsOix44 AVPfzb5TVVR7/yHt2iqavdYJzcBokpaBJ2q2VLk2LSR0sGNedHp7S+Z5LtnyF0yVW0iinF U6mdboLHOvNivEBeHMJ4aJUWwlEr4rzrRm/xcnry0Oi79jd+4UlHHu6JnD86V+/IAoLdr7 tHD75G13MAl3I7s8vDT0td2VAi8I4oc6nJhCat21GNdBXk7bnm59JJOftbBwJWGIxTMLvS Wa5L18lrcaoZ1QKsmRbkjfoDXdSf3zalGEoXoJWbR04rYy46cWflXkZIISMYrw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMXvP60Y5zXTV for ; Fri, 22 May 2026 17:53:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39d8c by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:53:37 +0000 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=B8rg?=rav Subject: git: f103898935e1 - main - Revert "import ldns 1.8.3" List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: f103898935e1b709adbdaed5e0b10f99a17b9a4a Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:53:37 +0000 Message-Id: <6a109821.39d8c.2a36a296@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=f103898935e1b709adbdaed5e0b10f99a17b9a4a commit f103898935e1b709adbdaed5e0b10f99a17b9a4a Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:53:11 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 17:53:26 +0000 Revert "import ldns 1.8.3" Pre-push rebase bungled the metadata This reverts commit 2bc6aa3c41d0dc330fefa6363a23d2cfa0253f73. --- contrib/ldns/Changelog | 41 -- contrib/ldns/Makefile.in | 48 +- contrib/ldns/README | 23 + contrib/ldns/README-Travis.md | 274 +++++++++++ contrib/ldns/README.snapshots | 2 +- contrib/ldns/acx_nlnetlabs.m4 | 223 +++------ contrib/ldns/ax_python_devel.m4 | 147 ++---- contrib/ldns/compat/asctime_r.c | 16 - contrib/ldns/config.guess | 70 +-- contrib/ldns/config.sub | 239 ++++------ contrib/ldns/configure | 876 +++++++++-------------------------- contrib/ldns/configure.ac | 150 +++--- contrib/ldns/dane.c | 4 +- contrib/ldns/dnssec.c | 8 +- contrib/ldns/dnssec_sign.c | 9 +- contrib/ldns/dnssec_zone.c | 3 - contrib/ldns/drill/drill.1.in | 2 +- contrib/ldns/drill/drill.c | 2 +- contrib/ldns/drill/root.c | 22 +- contrib/ldns/edns.c | 41 +- contrib/ldns/error.c | 5 - contrib/ldns/host2str.c | 20 +- contrib/ldns/keys.c | 16 +- contrib/ldns/ldns/config.h.in | 28 +- contrib/ldns/ldns/edns.h | 15 - contrib/ldns/ldns/error.h | 4 +- contrib/ldns/ldns/net.h.in | 3 +- contrib/ldns/ldns/parse.h | 26 +- contrib/ldns/ldns/radix.h | 2 +- contrib/ldns/ldns/rdata.h | 2 +- contrib/ldns/ldns/rr.h | 18 +- contrib/ldns/libdns.doxygen.in | 20 +- contrib/ldns/ltmain.sh | 851 +++++++++++++--------------------- contrib/ldns/m4/libtool.m4 | 229 ++++----- contrib/ldns/m4/ltoptions.m4 | 4 +- contrib/ldns/m4/ltsugar.m4 | 2 +- contrib/ldns/m4/ltversion.m4 | 13 +- contrib/ldns/m4/lt~obsolete.m4 | 4 +- contrib/ldns/makewin.sh | 65 +-- contrib/ldns/net.c | 4 +- contrib/ldns/packaging/ldns-config.1 | 2 +- contrib/ldns/packet.c | 4 +- contrib/ldns/rr.c | 14 +- contrib/ldns/util.c | 2 - 44 files changed, 1289 insertions(+), 2264 deletions(-) diff --git a/contrib/ldns/Changelog b/contrib/ldns/Changelog index c7f36767b360..aba41c88c5c8 100644 --- a/contrib/ldns/Changelog +++ b/contrib/ldns/Changelog @@ -1,44 +1,3 @@ -1.8.4 2024-07-19 - * Fix building documentation in build directory. - Thanks Michael Tokarev - * Updated the configure script for split openssl directories. - * Fix for windows compile; asctime_r compat, search for inet_ntop - in ws2_32, avoid double decl of inet_ntop, check for symlink call, - include config.h in edns.c, have socket compare use correct - signedness, add -u repo option to makewin.sh, fix quoting in - makewin.sh and check return value of bind and connect in net.c - for failure instead of a socket type. And fix to install .exe files. - * Fix to compile with OpenSSL 3.2. Update acx_nlnetlabs.m4 to 48. - * Fix to compile DLLs, and pick out of the lib64 dir, and include - libssp-0.dll and ldns-config. - * bugfix #237: Resolver uses nameserver commented out in - /etc/resolv.conf. Thanks grembo. - * Added RESINFO rrtype. - * Added WALLET rrtype. - * PR #241: Fix coverity cited problems. Thanks Enji Cooper. - * PR #233: Several Python SWIG issues. Thanks Florian Weimer. - * PR #231: const ldns_rdf * typemap fixes to support swig-4.2.0 - Thanks William S Fulton - * PR #227: keys.c: fix build with libressl >= 3.8.1 - Thanks Fabrice Fontaine - * PR #224: Portable executable progs don't underlink to libldns - Thanks Ørjan Malde - * PR #216: Update declaration for function with no argument - Thanks Ed Maste - * PR #214: fix the build in FreeBSD's base system - Thanks Pierre Pronchery and Dag-Erling Smørgrav - * PR #206: improve 'next-label' algorithm in ldns-walk - Thanks Jelte Jansen - * PR #205: Add functions to extract RFC 8914 extended errors - Thanks Roland van Rijswijk-Deij - * PR #203: Expand CI: Cygwin, BSDs, musl libc, 32-bit, and big-endian - Thanks Felipe Gasper - * PR #191: 16-unit-tests-edns: Fix leak & warnings - Thanks Felipe Gasper - * Added NXNAME rrtype. - * PR #242: Openssl no engine improved support #242 - Thanks Petr Menšík - 1.8.3 2022-08-15 * bugfix #183: Assertion failure with OPT record without rdata. This caused packet creation with only a DO bit (for DNSSEC OK) diff --git a/contrib/ldns/Makefile.in b/contrib/ldns/Makefile.in index 32b91576d0d9..57957d0844d3 100644 --- a/contrib/ldns/Makefile.in +++ b/contrib/ldns/Makefile.in @@ -20,14 +20,13 @@ p5_dns_ldns_dir = $(srcdir)/contrib/DNS-LDNS PERL = @PERL@ swig = @swig@ swigpy_flags = -python @SWIGPY3@ -python_site = @PYTHON_PLATFORM_SITE_PKG@ +python_site = @PYTHON_SITE_PKG@ pyldns_inst = @PYLDNSINST@ pyldns_uninst = @PYLDNSUNINST@ pyldnsx_inst = @PYLDNSXINST@ pyldnsx_uninst = @PYLDNSXUNINST@ libtool = @libtool@ CONFIG_FILES = @CONFIG_FILES@ -top_builddir = @top_builddir@ LDNS_TRUST_ANCHOR_FILE = @LDNS_TRUST_ANCHOR_FILE@ DEFAULT_CAFILE = @DEFAULT_CAFILE@ @@ -86,7 +85,6 @@ LINTFLAGS += -D"__BEGIN_DECLS=" -D"__ssize_t=ssize_t" -D"__intptr_t=intptr # FreeBSD 9 LINTFLAGS += -D"_RuneLocale=int" DEPFLAG = @DEPFLAG@ -EXEEXT=@EXEEXT@ INSTALL = $(srcdir)/install-sh @@ -152,8 +150,7 @@ setup-builddir: # builddir/ is used by 60-compile-builddir putdown-builddir: - rm -rf include/ldns - rm -f lib config.h + rm -f include/ldns lib config.h test ! -d include || rmdir include || : if test -d examples -a ! -f examples/README; then rmdir examples || : ; fi if test -d drill -a ! -f drill/README ; then rmdir drill || : ; fi @@ -171,7 +168,7 @@ no-drill-config-h: fi drill/drill: $(DRILL_LOBJS) $(LIB) $(LIBLOBJS) - $(LINK_EXE) $(DRILL_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o drill/drill $(top_builddir)/libldns.la + $(LINK_EXE) $(DRILL_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o drill/drill drill/drill.1: $(srcdir)/drill/drill.1.in $(edit) $(srcdir)/drill/drill.1.in > drill/drill.1 @@ -180,16 +177,16 @@ install-drill: drill/drill drill/drill.1 $(INSTALL) -m 755 -d $(DESTDIR)$(bindir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 - $(LIBTOOL) --mode=install cp drill/drill$(EXEEXT) $(DESTDIR)$(bindir) + $(LIBTOOL) --mode=install cp drill/drill $(DESTDIR)$(bindir) $(INSTALL) -m 644 drill/drill.1 $(DESTDIR)$(mandir)/man1/drill.1 uninstall-drill: - rm -f $(DESTDIR)$(bindir)/drill$(EXEEXT) $(DESTDIR)$(mandir)/man1/drill.1 + rm -f $(DESTDIR)$(bindir)/drill $(DESTDIR)$(mandir)/man1/drill.1 test ! -d $(DESTDIR)$(mandir) || rmdir -p $(DESTDIR)$(mandir)/man1 || :; test ! -d $(DESTDIR)$(bindir) || rmdir -p $(DESTDIR)$(bindir) || : ; clean-drill: - $(LIBTOOL) --mode clean rm -f $(DRILL_LOBJS) drill/drill$(EXEEXT) drill/drill.1 + $(LIBTOOL) --mode clean rm -f $(DRILL_LOBJS) drill/drill drill/drill.1 examples: setup-builddir no-examples-config-h $(LIB) $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) examples/ldns-dane.1 examples/ldns-verify-zone.1 no-examples-config-h: @@ -203,23 +200,23 @@ no-examples-config-h: # Need LIBSSL_LIBS $(EXAMPLE_PROGS): - $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ $(top_builddir)/libldns.la + $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ # Need LIBSSL_LIBS $(TESTNS): - $(LINK_EXE) $(TESTNS_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $(TESTNS) $(top_builddir)/libldns.la + $(LINK_EXE) $(TESTNS_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $(TESTNS) # Need LIBSSL_LIBS $(LDNS_DPA): $(LINK_EXE) $(LDNS_DPA_LOBJS) $(LIBLOBJS) $(LIB) $(LIBPCAP_LIBS) $(LIBSSL_LIBS) $(LIBS) \ - -o $(LDNS_DPA) $(top_builddir)/libldns.la + -o $(LDNS_DPA) $(LDNS_DANE): $(LINK_EXE) $(LDNS_DANE_LOBJS) $(LIBLOBJS) $(LIB) $(LIBSSL_SSL_LIBS) $(LIBS) \ - -o $(LDNS_DANE) $(top_builddir)/libldns.la + -o $(LDNS_DANE) $(EX_SSL_PROGS): - $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ $(top_builddir)/libldns.la + $(LINK_EXE) $@.lo $(LIBLOBJS) $(LIB) $(LIBSSL_LIBS) $(LIBS) -o $@ examples/ldns-dane.1: $(srcdir)/examples/ldns-dane.1.in $(edit) $(srcdir)/examples/ldns-dane.1.in > examples/ldns-dane.1 @@ -232,7 +229,7 @@ install-examples: $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_P $(INSTALL) -m 755 -d $(DESTDIR)$(mandir) $(INSTALL) -m 755 -d $(DESTDIR)$(mandir)/man1 for p in $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) ; do \ - $(LIBTOOL) --mode=install cp $$p$(EXEEXT) $(DESTDIR)$(bindir) ; \ + $(LIBTOOL) --mode=install cp $$p $(DESTDIR)$(bindir) ; \ if test -f $$p.1 ; \ then $(INSTALL) -m 644 $$p.1 $(DESTDIR)$(mandir)/man1 ; \ else $(INSTALL) -m 644 $(srcdir)/$$p.1 $(DESTDIR)$(mandir)/man1 ; \ @@ -241,22 +238,20 @@ install-examples: $(EXAMPLE_PROGS) $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_P uninstall-examples: for p in $(EX_PROGS_BASENM) ; do \ - rm -f $(DESTDIR)$(bindir)/$$p$(EXEEXT) $(DESTDIR)$(mandir)/man1/$$p.1 ;\ + rm -f $(DESTDIR)$(bindir)/$$p $(DESTDIR)$(mandir)/man1/$$p.1 ;\ done test ! -d $(DESTDIR)$(mandir) || rmdir -p $(DESTDIR)$(mandir)/man1 || :; test ! -d $(DESTDIR)$(bindir) || rmdir -p $(DESTDIR)$(bindir) || : ; clean-examples: - for p in $(EX_PROGS_BASENM) ; do \ - $(LIBTOOL) --mode clean rm -f $$p$(EXEEXT) ;\ - done + $(LIBTOOL) --mode clean rm -f $(EXAMPLE_PROGS) $(LIBTOOL) --mode clean rm -f $(TESTNS) $(LDNS_DPA) $(LDNS_DANE) $(EX_SSL_PROGS) $(LIBTOOL) --mode clean rm -f $(EXAMPLE_LOBJS) $(LIBTOOL) --mode clean rm -f examples/ldns-dane.1 examples/ldns-verify-zone.1 linktest: $(srcdir)/linktest.c libldns.la $(COMP_LIB) $(LIBSSL_CPPFLAGS) -c $(srcdir)/linktest.c -o linktest.lo - $(LINK_EXE) linktest.lo $(LIB) $(LIBSSL_LIBS) $(LIBS) -o linktest $(top_builddir)/libldns.la + $(LINK_EXE) linktest.lo $(LIB) $(LIBSSL_LIBS) $(LIBS) -o linktest lib: libldns.la @@ -275,7 +270,7 @@ doxygen: @if test ! -e doc/header.html ; then \ $(INSTALL) -c -m 644 $(srcdir)/doc/header.html doc/ ; \ fi ; - $(doxygen) libdns.doxygen + $(doxygen) $(srcdir)/libdns.doxygen doc: manpages $(doxygen) @$(INSTALL) -d doc @@ -646,10 +641,10 @@ dnssec_zone.lo dnssec_zone.o: $(srcdir)/dnssec_zone.c ldns/config.h $(srcdir)/ld $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h duration.lo duration.o: $(srcdir)/duration.c ldns/config.h $(srcdir)/ldns/duration.h -edns.lo edns.o: $(srcdir)/edns.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h \ - $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h \ - $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h \ - $(srcdir)/ldns/zone.h $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ +edns.lo edns.o: $(srcdir)/edns.c $(srcdir)/ldns/ldns.h ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h \ + $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h \ + $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h $(srcdir)/ldns/edns.h $(srcdir)/ldns/keys.h $(srcdir)/ldns/zone.h \ + $(srcdir)/ldns/resolver.h $(srcdir)/ldns/tsig.h $(srcdir)/ldns/dnssec_zone.h $(srcdir)/ldns/rbtree.h \ $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h $(srcdir)/ldns/duration.h \ $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ @@ -812,7 +807,6 @@ zone.lo zone.o: $(srcdir)/zone.c ldns/config.h $(srcdir)/ldns/ldns.h ldns/util.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h \ $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h \ $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h -compat/asctime_r.lo compat/asctime_r.o: $(srcdir)/compat/asctime_r.c ldns/config.h compat/b64_ntop.lo compat/b64_ntop.o: $(srcdir)/compat/b64_ntop.c ldns/config.h compat/b64_pton.lo compat/b64_pton.o: $(srcdir)/compat/b64_pton.c ldns/config.h compat/calloc.lo compat/calloc.o: $(srcdir)/compat/calloc.c ldns/config.h @@ -871,7 +865,7 @@ examples/ldns-dpa.lo examples/ldns-dpa.o: $(srcdir)/examples/ldns-dpa.c ldns/con $(srcdir)/ldns/rbtree.h $(srcdir)/ldns/host2str.h $(srcdir)/ldns/dnssec_verify.h $(srcdir)/ldns/dnssec_sign.h \ $(srcdir)/ldns/duration.h $(srcdir)/ldns/higher.h $(srcdir)/ldns/host2wire.h ldns/net.h \ $(srcdir)/ldns/str2host.h $(srcdir)/ldns/update.h $(srcdir)/ldns/wire2host.h $(srcdir)/ldns/rr_functions.h \ - $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h + $(srcdir)/ldns/parse.h $(srcdir)/ldns/radix.h $(srcdir)/ldns/sha1.h $(srcdir)/ldns/sha2.h $(srcdir)/examples/ldns-dpa.h examples/ldns-gen-zone.lo examples/ldns-gen-zone.o: $(srcdir)/examples/ldns-gen-zone.c ldns/config.h $(srcdir)/ldns/ldns.h \ ldns/util.h ldns/common.h $(srcdir)/ldns/buffer.h $(srcdir)/ldns/error.h $(srcdir)/ldns/dane.h \ $(srcdir)/ldns/rdata.h $(srcdir)/ldns/rr.h $(srcdir)/ldns/dname.h $(srcdir)/ldns/dnssec.h $(srcdir)/ldns/packet.h \ diff --git a/contrib/ldns/README b/contrib/ldns/README index e07fdc078aa2..98575917b448 100644 --- a/contrib/ldns/README +++ b/contrib/ldns/README @@ -106,3 +106,26 @@ Also, when building with SWIG older than 2.0.4, compiling pyldns produces many ``missing initializer'' warnings. Those are harmless too. +Your Support +NLnet Labs offers all of its software products as open source, most +published under a BSD license. You can download them, not only from the +NLnet Labs website but also through the various OS distributions for +which NSD, ldns, and Unbound are packaged. We therefore have little idea +who uses our software in production environments and have no direct ties +with 'our customers'. + +Therefore, we ask you to contact us at users@NLnetLabs.nl and tell us +whether you use one of our products in your production environment, +what that environment looks like, and maybe even share some praise. +We would like to refer to the fact that your organization is using our +products. We will only do that if you explicitly allow us. In all other +cases we will keep the information you share with us to ourselves. + +In addition to the moral support you can also support us +financially. NLnet Labs is a recognized not-for-profit charity foundation +that is chartered to develop open-source software and open-standards +for the Internet. If you use our software to satisfaction please express +that by giving us a donation. For small donations PayPal can be used. For +larger and regular donations please contact us at users@NLnetLabs.nl. Also +see http://www.nlnetlabs.nl/labs/contributors/. + diff --git a/contrib/ldns/README-Travis.md b/contrib/ldns/README-Travis.md new file mode 100644 index 000000000000..faa534353119 --- /dev/null +++ b/contrib/ldns/README-Travis.md @@ -0,0 +1,274 @@ +# Travis Testing + +LDNS 1.7.1 and above leverage Travis CI to increase coverage of compilers and platforms. Compilers include Clang and GCC; while platforms include Android, iOS, Linux, and OS X on AMD64, Aarch64, PowerPC and s390x hardware. + +Android is tested on armv7a, aarch64, x86 and x86_64. The Android recipes build and install OpenSSL, and then builds LDNS. The testing is tailored for Android NDK-r19 and above, and includes NDK-r20 and NDK-r21. Mips and Mips64 are not tested because they are no longer supported under current NDKs. + +iOS is tested for iPhoneOS, WatchOS, AppleTVOS, iPhoneSimulator, AppleTVSimulator and WatchSimulator. The testing uses Xcode 10 on OS X 10.13. + +The LDNS Travis configuration file `.travis.yml` does not use top-level keys like `os:` and `compiler:` so there is no matrix expansion. Instead LDNS specifies the exact job to run under the `jobs:` and `include:` keys. + +## Typical recipe + +A typical recipe tests Clang and GCC on various hardware. The hardware includes AMD64, Aarch64, PowerPC and s390x. PowerPC is a little-endian platform, and s390x is a big-endian platform. There are pairs of recipes that are similar to the following. + +``` +- os: linux + name: GCC on Linux, Aarch64 + compiler: gcc + arch: arm64 + dist: bionic +- os: linux + name: Clang on Linux, Aarch64 + compiler: clang + arch: arm64 + dist: bionic +``` + +OS X provides a single recipe to test Clang. GCC is not tested because GCC is an alias for Clang. + +## Sanitizer builds + +Two sanitizer builds are tested using Clang and GCC, for a total of four builds. The first sanitizer is Undefined Behavior sanitizer (UBsan), and the second is Address sanitizer (Asan). The sanitizers are only run on AMD64 hardware. Note the environment includes `UBSAN=yes` or `ASAN=yes` for the sanitizer builds. + +The recipes are similar to the following. + +``` +- os: linux + name: UBsan, GCC on Linux, Amd64 + compiler: gcc + arch: amd64 + dist: bionic + env: UBSAN=yes +- os: linux + name: UBsan, Clang on Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: UBSAN=yes +``` + +When the Travis script encounters a sanitizer it uses different `CFLAGS` and configuration string. + +``` +if [ "$UBSAN" = "yes" ]; then + export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=undefined -fno-sanitize-recover" + bash test/test_ci.sh +elif [ "$ASAN" = "yes" ]; then + export CFLAGS="-DNDEBUG -g2 -O3 -fsanitize=address" + bash test/test_ci.sh +... +``` + +## Android builds + +Travis tests Android builds for the armv7a, aarch64, x86 and x86_64 architectures. The builds are trickier than other builds for several reasons. The testing requires installation of the Android NDK and SDK, it requires a cross-compile, and requires OpenSSL prerequisites. The Android cross-compiles also require care to set the Autotools triplet, the OpenSSL triplet, the toolchain path, the tool variables, and the sysroot. The discussion below detail the steps of the Android recipes. + +### Android job + +The first step sets environmental variables for the cross-compile using the Travis job. A typical job with variables is shown below. + +``` +- os: linux + name: Android armv7a, Linux, Amd64 + compiler: clang + arch: amd64 + dist: bionic + env: + - ANDROID=yes + - AUTOTOOLS_HOST=armv7a-linux-androideabi + - OPENSSL_HOST=android-arm + - ANDROID_CPU=armv7a + - ANDROID_API=23 + - ANDROID_PREFIX="$HOME/android$ANDROID_API-$ANDROID_CPU" + - ANDROID_SDK_ROOT="$HOME/android-sdk" + - ANDROID_NDK_ROOT="$HOME/android-ndk" +``` + +### ANDROID_NDK_ROOT + +The second step for Android is to set the environmental variables `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT`. This is an important step because the NDK and SDK use the variables internally to locate their own tools. Also see [Recommended NDK Directory?](https://groups.google.com/forum/#!topic/android-ndk/qZjhOaynHXc) on the android-ndk mailing list. (Many folks miss this step, or use incorrect variables like `ANDROID_NDK_HOME` or `ANDROID_SDK_HOME`). + +If you are working from a developer machine you probably already have the necessary tools installed. You should ensure `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT` are set properly. + +### Tool installation + +The second step installs tools needed for OpenSSL, Expat and LDNS. This step is handled in by the script `contrib/android/install_tools.sh`. The tools include curl, tar, zip, unzip and java. + +``` +before_script: + - | + if [ "$ANDROID" = "yes" ]; then + ./contrib/android/install_tools.sh + elif [ "$IOS" = "yes" ]; then + ./contrib/ios/install_tools.sh + fi +``` + +### NDK installation + +The third step installs the NDK and SDK. This step is handled in by the script `contrib/android/install_ndk.sh`. The script uses `ANDROID_NDK_ROOT` and `ANDROID_SDK_ROOT` to place the NDK and SDK in the `$HOME` directory. + +If you are working from a developer machine you probably already have a NDK and SDK installed. + +### Android environment + +The fourth step sets the Android cross-compile environment using the script `contrib/android/setenv_android.sh`. The script is `sourced` so the variables in the script are available to the calling shell. The script sets variables like `CC`, `CXX`, `AS` and `AR`; sets `CFLAGS` and `CXXFLAGS`; sets a `sysroot` so Android headers and libraries are found; and adds the path to the toolchain to `PATH`. + +`contrib/android/setenv_android.sh` knows which toolchain and architecture to select by inspecting environmental variables set by Travis for the job. In particular, the variables `ANDROID_CPU` and `ANDROID_API` tell `contrib/android/setenv_android.sh` which tools and libraries to select. + +The `contrib/android/setenv_android.sh` script specifies the tools in a `case` statement like the following. There is a case for each of the architectures armv7a, aarch64, x86 and x86_64. + +``` +armv8a|aarch64|arm64|arm64-v8a) + CC="aarch64-linux-android$ANDROID_API-clang" + CXX="aarch64-linux-android$ANDROID_API-clang++" + LD="aarch64-linux-android-ld" + AS="aarch64-linux-android-as" + AR="aarch64-linux-android-ar" + RANLIB="aarch64-linux-android-ranlib" + STRIP="aarch64-linux-android-strip" + + CFLAGS="-funwind-tables -fexceptions" + CXXFLAGS="-funwind-tables -fexceptions -frtti" +``` + +### OpenSSL + +The fifth step builds OpenSSL. OpenSSL is built for iOS using the scripts `contrib/android/install_openssl.sh`. The script downloads, configures and installs the latest release version of the OpenSSL libraries. OpenSSL is configured with `--prefix="$ANDROID_PREFIX"` so the headers are placed in `$ANDROID_PREFIX/include` directory, and the libraries are placed in the `$ANDROID_PREFIX/lib` directory. + +`ANDROID_PREFIX` is the value `$HOME/android$ANDROID_API-$ANDROID_CPU`. The libraries will be installed in `$HOME/android23-armv7a`, `$HOME/android23-aarch64`, etc. For Autotools projects, the appropriate `PKG_CONFIG_PATH` is exported. + +`PKG_CONFIG_PATH` is an important variable. It is the userland equivalent to sysroot, and allows Autotools to find non-system headers and libraries for an architecture. Typical `PKG_CONFIG_PATH` are `$HOME/android23-armv7a/lib/pkgconfig` and `$HOME/android23-aarch64/lib/pkgconfig`. + +OpenSSL also uses a custom configuration file called `15-android.conf`. It is a copy of the OpenSSL's project file and located at `contrib/android/15-android.conf`. The LDNS version is copied to the OpenSSL source files after unpacking the OpenSSL distribution. The LDNS version has legacy NDK support removed and some other fixes, like `ANDROID_NDK_ROOT` awareness. The changes mean LDNS's `15-android.conf` will only work with LDNS, with NDK-r19 and above, and a properly set environment. + +OpenSSL is configured with `no-engine`. If you want to include OpenSSL engines then edit `contrib/android/install_openssl.sh` and remove the config option. + +### Android build + +Finally, once OpenSSL are built, then the Travis script configures and builds LDNS. The recipe looks as follows. + +``` +elif [ "$ANDROID" = "yes" ]; then + export AUTOTOOLS_BUILD="$(./config.guess)" + export PKG_CONFIG_PATH="$ANDROID_PREFIX/lib/pkgconfig" + ./contrib/android/install_ndk.sh + source ./contrib/android/setenv_android.sh + ./contrib/android/install_openssl.sh + ./contrib/android/bootstrap_ldns.sh + ./configure \ + --build="$AUTOTOOLS_BUILD" \ + --host="$AUTOTOOLS_HOST" \ + --prefix="$ANDROID_PREFIX" \ + --with-ssl="$ANDROID_PREFIX" \ + --disable-gost \ + --with-drill --with-examples + make -j 2 + make install +``` + +Travis only smoke tests an Android build using a compile, link and install. The self tests are not run. TODO: figure out how to fire up an emulator, push the tests to the device and run them. + +### Android flags + +`contrib/android/setenv_android.sh` uses specific flags for `CFLAGS` and `CXXFLAGS`. They are taken from `ndk-build`, so we consider them the official flag set. It is important to use the same flags across projects to avoid subtle problems due to mixing and matching different flags. + +`CXXFLAGS` includes `-fexceptions` and `-frtti` because exceptions and runtime type info are disabled by default. `CFLAGS` include `-funwind-tables` and `-fexceptions` to ensure C++ exceptions pass through C code, if needed. Also see `docs/CPLUSPLUS-SUPPORT.html` in the NDK docs. + +To inspect the flags used by `ndk-build` for a platform clone ASOP's [ndk-samples](https://github.com/android/ndk-samples/tree/master/hello-jni) and build the `hello-jni` project. Use the `V=1` flag to see the full compiler output from `ndk-build`. + +## iOS builds + +Travis tests iOS builds for the armv7a, armv7s and aarch64 architectures for iPhoneOS, AppleTVOS and WatchOS. iPhoneOS is tested using both 32-bit builds (iPhones) and 64-bit builds (iPads). Travis also tests compiles against the simulators. The builds are trickier than other builds for several reasons. The testing requires a cross-compile, and requires OpenSSL prerequisites. The iOS cross-compiles also require care to set the Autotools triplet, the OpenSSL triplet, the toolchain path, the tool variables, and the sysroot. The discussion below detail the steps of the iOS recipes. + +### iOS job + +The first step sets environmental variables for the cross-compile using the Travis job. A typical job with variables is shown below. + +``` +- os: osx + osx_image: xcode10 + name: Apple iPhone on iOS, armv7 + compiler: clang + env: + - IOS=yes + - AUTOTOOLS_HOST=armv7-apple-ios + - OPENSSL_HOST=ios-cross + - IOS_SDK=iPhoneOS + - IOS_CPU=armv7s + - IOS_PREFIX="$HOME/$IOS_SDK-$IOS_CPU" +``` + +### Tool installation + +The second step installs tools needed for OpenSSL, Expat and LDNS. This step is handled in by the script `contrib/ios/install_tools.sh`. The tools include autotools, curl and perl. The installation happens at the `before_script:` stage of Travis. + +``` +before_script: + - | + if [ "$ANDROID" = "yes" ]; then + ./contrib/android/install_tools.sh + elif [ "$IOS" = "yes" ]; then + ./contrib/ios/install_tools.sh + fi +``` + +### iOS environment + +The third step sets the iOS cross-compile environment using the script `contrib/ios/setenv_ios.sh`. The script is `sourced` so the variables in the script are available to the calling shell. The script sets variables like `CC`, `CXX`, `AS` and `AR`; sets `CFLAGS` and `CXXFLAGS`; sets a `sysroot` so iOS headers and libraries are found; and adds the path to the toolchain to `PATH`. + +`contrib/ios/setenv_ios.sh` knows which toolchain and architecture to select by inspecting environmental variables set by Travis for the job. In particular, the variables `IOS_SDK` and `IOS_CPU` tell `contrib/ios/setenv_ios.sh` which tools and libraries to select. + +The `contrib/ios/setenv_ios.sh` script specifies the tools to use during the cross-compile. For Apple SDKs, the tool names are the same as a desktop. There are no special prefixes for the mobile tools. + +``` +CPP=cpp +CC=clang +CXX=clang++ +LD=ld +AS=as +AR=ar +RANLIB=ranlib +STRIP=strip +``` + +If you are working from a developer machine you probably already have the necessary tools installed. + +### OpenSSL + +The fourth step builds OpenSSL. OpenSSL is built for iOS using the scripts `contrib/ios/install_openssl.sh`. The script downloads, configures and installs the latest release version of the OpenSSL libraries. OpenSSL is configured with `--prefix="$IOS_PREFIX"` so the headers are placed in `$IOS_PREFIX/include` directory, and the libraries are placed in the `$IOS_PREFIX/lib` directory. + +`IOS_PREFIX` is the value `$HOME/$IOS_SDK-$IOS_CPU`. The scheme handles both iOS SDKs and cpu architectures so the pair receives a unique installation directory. The libraries will be installed in `$HOME/iPhoneOS-armv7s`, `$HOME/iPhoneOS-arm64`, `$HOME/iPhoneSimulator-i386`, etc. For Autotools projects, the appropriate `PKG_CONFIG_PATH` is exported. + +`PKG_CONFIG_PATH` is an important variable. It is the userland equivalent to sysroot, and allows Autotools to find non-system headers and libraries for an architecture. Typical `PKG_CONFIG_PATH` are `$HOME/iPhoneOS-armv7s/lib/pkgconfig` and `$HOME/iPhoneOS-arm64/lib/pkgconfig`. + +OpenSSL also uses a custom configuration file called `15-ios.conf`. It is a copy of the OpenSSL's project file and located at `contrib/ios/15-ios.conf`. The LDNS version is copied to the OpenSSL source files after unpacking the OpenSSL distribution. The changes mean LDNS's `15-ios.conf` will only work with LDNS and a properly set environment. + +OpenSSL is configured with `no-engine`. Engines require dynamic loading so engines are disabled permanently in `15-ios.conf`. + +### iOS build + +Finally, once OpenSSL are built, then the Travis script configures and builds LDNS. The full recipe looks as follows. + +``` +elif [ "$IOS" = "yes" ]; then + export AUTOTOOLS_BUILD="$(./config.guess)" + export PKG_CONFIG_PATH="$IOS_PREFIX/lib/pkgconfig" + source ./contrib/ios/setenv_ios.sh + ./contrib/ios/install_openssl.sh + ./contrib/ios/bootstrap_ldns.sh + ./configure \ + --build="$AUTOTOOLS_BUILD" --host="$AUTOTOOLS_HOST" \ + --prefix="$IOS_PREFIX" \ + --with-ssl="$IOS_PREFIX" --disable-gost \ + --with-drill --with-examples + make -j 2 + make install +``` + +Travis only smoke tests an iOS build using a compile, link and install. The self tests are not run. TODO: figure out how to fire up an simulator, push the tests to the device and run them. + +### iOS flags + +`contrib/ios/setenv_ios.sh` uses specific flags for `CFLAGS` and `CXXFLAGS`. They are taken from Xcode, so we consider them the official flag set. It is important to use the same flags across projects to avoid subtle problems due to mixing and matching different flags. diff --git a/contrib/ldns/README.snapshots b/contrib/ldns/README.snapshots index df7ee003cada..891fcca1d6ef 100644 --- a/contrib/ldns/README.snapshots +++ b/contrib/ldns/README.snapshots @@ -3,6 +3,6 @@ ldns - snapshot releases Snapshot releases are not official released. They can be released to interested parties for development. -Snapshots can be recognized from the date in the tar file name. +Snapshots can be recognized from the date in the the tar file name. They should not be used for packaging in distributions. diff --git a/contrib/ldns/acx_nlnetlabs.m4 b/contrib/ldns/acx_nlnetlabs.m4 index 6a01dc5a4769..39e92d875331 100644 --- a/contrib/ldns/acx_nlnetlabs.m4 +++ b/contrib/ldns/acx_nlnetlabs.m4 @@ -2,16 +2,7 @@ # Copyright 2009, Wouter Wijngaards, NLnet Labs. # BSD licensed. # -# Version 48 -# 2024-01-16 fix to add -l:libssp.a to -lcrypto link check. -# and check for getaddrinfo with only header. -# 2024-01-15 fix to add crypt32 to -lcrypto link check when checking for gdi32. -# 2023-05-04 fix to remove unused whitespace. -# 2023-01-26 fix -Wstrict-prototypes. -# 2022-09-01 fix checking if nonblocking sockets work on OpenBSD. -# 2021-08-17 fix sed script in ssldir split handling. -# 2021-08-17 fix for openssl to detect split version, with ssldir_include -# and ssldir_lib output directories. +# Version 41 # 2021-07-30 fix for openssl use of lib64 directory. # 2021-06-14 fix nonblocking test to use host instead of target for mingw test. # 2021-05-17 fix nonblocking socket test from grep on mingw32 to mingw for @@ -192,7 +183,7 @@ dnl cache=`echo $1 | sed 'y%.=/+- %___p__%'` AC_CACHE_VAL(cv_prog_cc_flag_needed_$cache, [ echo '$2' > conftest.c -echo 'void f(void){}' >>conftest.c +echo 'void f(){}' >>conftest.c if test -z "`$CC $CPPFLAGS $CFLAGS $ERRFLAG -c conftest.c 2>&1`"; then eval "cv_prog_cc_flag_needed_$cache=no" else @@ -238,7 +229,7 @@ dnl DEPFLAG: set to flag that generates dependencies. AC_DEFUN([ACX_DEPFLAG], [ AC_MSG_CHECKING([$CC dependency flag]) -echo 'void f(void){}' >conftest.c +echo 'void f(){}' >conftest.c if test "`$CC -MM conftest.c 2>&1`" = "conftest.o: conftest.c"; then DEPFLAG="-MM" else @@ -277,7 +268,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test(void) { +int test() { int a; char **opts = NULL; struct timeval tv; @@ -314,7 +305,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG -D__EXTENSIONS__ -D_BSD_SOURCE -D_DEFAUL #include #endif -int test(void) { +int test() { int a; char **opts = NULL; struct timeval tv; @@ -340,7 +331,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED($C99FLAG, [ #include #include -int test(void) { +int test() { int a = 0; return a; } @@ -350,7 +341,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_BSD_SOURCE -D_DEFAULT_SOURCE, [ #include -int test(void) { +int test() { int a; a = isascii(32); return a; @@ -361,7 +352,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE, [ #include -int test(void) { +int test() { struct in6_pktinfo inf; int a = (int)sizeof(inf); return a; @@ -375,7 +366,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_GNU_SOURCE -D_FRSRESGID, [ #include -int test(void) { +int test() { int a = setresgid(0,0,0); a = setresuid(0,0,0); return a; @@ -390,7 +381,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D_POSIX_C_SOURCE=200112, #endif #include -int test(void) { +int test() { int a = 0; char *t; time_t time = 0; @@ -418,7 +409,7 @@ ACX_CHECK_COMPILER_FLAG_NEEDED(-D__EXTENSIONS__, #include #endif -int test(void) { +int test() { int a; char **opts = NULL; struct timeval tv; @@ -480,7 +471,7 @@ fi dnl Setup ATTR_FORMAT config.h parts. dnl make sure you call ACX_CHECK_FORMAT_ATTRIBUTE also. AC_DEFUN([AHX_CONFIG_FORMAT_ATTRIBUTE], -[ +[ #ifdef HAVE_ATTR_FORMAT # define ATTR_FORMAT(archetype, string_index, first_to_check) \ __attribute__ ((format (archetype, string_index, first_to_check))) @@ -656,30 +647,6 @@ AC_DEFUN([ACX_SSL_CHECKS], [ withval=$1 if test x_$withval != x_no; then AC_MSG_CHECKING(for SSL) - if test -n "$withval"; then - dnl look for openssl install with different version, eg. - dnl in /usr/include/openssl11/openssl/ssl.h - dnl and /usr/lib64/openssl11/libssl.so - dnl with the --with-ssl=/usr/include/openssl11 - if test ! -f "$withval/include/openssl/ssl.h" -a -f "$withval/openssl/ssl.h"; then - ssldir="$withval" - found_ssl="yes" - withval="" - ssldir_include="$ssldir" - dnl find the libdir - ssldir_lib=`echo $ssldir | sed -e 's/include/lib/'` - if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then - : # found here - else - ssldir_lib=`echo $ssldir | sed -e 's/include/lib64/'` - if test -f "$ssldir_lib/libssl.a" -o -f "$ssldir_lib/libssl.so"; then - : # found here - else - AC_MSG_ERROR([Could not find openssl lib file, $ssldir_lib/libssl.[so,a], pass like "/usr/local" or "/usr/include/openssl11"]) - fi - fi - fi - fi if test x_$withval = x_ -o x_$withval = x_yes; then withval="/usr/local/ssl /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr" fi @@ -687,12 +654,12 @@ AC_DEFUN([ACX_SSL_CHECKS], [ ssldir="$dir" if test -f "$dir/include/openssl/ssl.h"; then found_ssl="yes" - ssldir_include="$ssldir/include" - if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then - ssldir_lib="$ssldir/lib64" - else - ssldir_lib="$ssldir/lib" - fi + AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.]) + dnl assume /usr/include is already in the include-path. + if test "$ssldir" != "/usr"; then + CPPFLAGS="$CPPFLAGS -I$ssldir/include" + LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir/include" + fi break; fi done @@ -700,17 +667,20 @@ AC_DEFUN([ACX_SSL_CHECKS], [ AC_MSG_ERROR(Cannot find the SSL libraries in $withval) else AC_MSG_RESULT(found in $ssldir) - AC_DEFINE_UNQUOTED([HAVE_SSL], [], [Define if you have the SSL libraries installed.]) HAVE_SSL=yes - dnl assume /usr is already in the include, lib and dynlib paths. - if test "$ssldir" != "/usr"; then - CPPFLAGS="$CPPFLAGS -I$ssldir_include" - LIBSSL_CPPFLAGS="$LIBSSL_CPPFLAGS -I$ssldir_include" - LDFLAGS="$LDFLAGS -L$ssldir_lib" - LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir_lib" - ACX_RUNTIME_PATH_ADD([$ssldir_lib]) - fi - + dnl assume /usr is already in the lib and dynlib paths. + if test "$ssldir" != "/usr" -a "$ssldir" != ""; then + if test ! -d "$ssldir/lib" -a -d "$ssldir/lib64"; then + LDFLAGS="$LDFLAGS -L$ssldir/lib64" + LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib64" + ACX_RUNTIME_PATH_ADD([$ssldir/lib64]) + else + LDFLAGS="$LDFLAGS -L$ssldir/lib" + LIBSSL_LDFLAGS="$LIBSSL_LDFLAGS -L$ssldir/lib" + ACX_RUNTIME_PATH_ADD([$ssldir/lib]) + fi + fi + AC_MSG_CHECKING([for EVP_sha256 in -lcrypto]) LIBS="$LIBS -lcrypto" LIBSSL_LIBS="$LIBSSL_LIBS -lcrypto" @@ -735,73 +705,40 @@ AC_DEFUN([ACX_SSL_CHECKS], [ ]])],[ AC_DEFINE([HAVE_EVP_SHA256], 1, [If you have EVP_sha256]) - AC_MSG_RESULT(yes) + AC_MSG_RESULT(yes) ],[ AC_MSG_RESULT(no) LIBS="$BAKLIBS" LIBSSL_LIBS="$BAKSSLLIBS" - - LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32" - LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32" - AC_MSG_CHECKING([if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ - int EVP_sha256(void); - (void)EVP_sha256(); - ]])],[ - AC_DEFINE([HAVE_EVP_SHA256], 1, - [If you have EVP_sha256]) - AC_MSG_RESULT(yes) - ],[ - AC_MSG_RESULT(no) - LIBS="$BAKLIBS" - LIBSSL_LIBS="$BAKSSLLIBS" - - LIBS="$LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" - LIBSSL_LIBS="$LIBSSL_LIBS -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a" - AC_MSG_CHECKING([if -lcrypto needs -lgdi32 -lws2_32 -lcrypt32 -l:libssp.a]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ - int EVP_sha256(void); - (void)EVP_sha256(); - ]])],[ - AC_DEFINE([HAVE_EVP_SHA256], 1, - [If you have EVP_sha256]) - AC_MSG_RESULT(yes) - ],[ - AC_MSG_RESULT(no) - LIBS="$BAKLIBS" - LIBSSL_LIBS="$BAKSSLLIBS" - - LIBS="$LIBS -ldl" - LIBSSL_LIBS="$LIBSSL_LIBS -ldl" - AC_MSG_CHECKING([if -lcrypto needs -ldl]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ - int EVP_sha256(void); - (void)EVP_sha256(); - ]])],[ - AC_DEFINE([HAVE_EVP_SHA256], 1, - [If you have EVP_sha256]) - AC_MSG_RESULT(yes) - ],[ - AC_MSG_RESULT(no) - LIBS="$BAKLIBS" - LIBSSL_LIBS="$BAKSSLLIBS" - LIBS="$LIBS -ldl -pthread" - LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread" - AC_MSG_CHECKING([if -lcrypto needs -ldl -pthread]) - AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ - int EVP_sha256(void); - (void)EVP_sha256(); - ]])],[ - AC_DEFINE([HAVE_EVP_SHA256], 1, - [If you have EVP_sha256]) - AC_MSG_RESULT(yes) - ],[ - AC_MSG_RESULT(no) - AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required]) - ]) - ]) + LIBS="$LIBS -ldl" + LIBSSL_LIBS="$LIBSSL_LIBS -ldl" + AC_MSG_CHECKING([if -lcrypto needs -ldl]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + LIBS="$BAKLIBS" + LIBSSL_LIBS="$BAKSSLLIBS" + LIBS="$LIBS -ldl -pthread" + LIBSSL_LIBS="$LIBSSL_LIBS -ldl -pthread" + AC_MSG_CHECKING([if -lcrypto needs -ldl -pthread]) + AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[ + int EVP_sha256(void); + (void)EVP_sha256(); + ]])],[ + AC_DEFINE([HAVE_EVP_SHA256], 1, + [If you have EVP_sha256]) + AC_MSG_RESULT(yes) + ],[ + AC_MSG_RESULT(no) + AC_MSG_ERROR([OpenSSL found in $ssldir, but version 0.9.7 or higher is required]) ]) - ]) + ]) ]) ]) fi @@ -815,13 +752,13 @@ AC_CHECK_HEADERS([openssl/rand.h],,, [AC_INCLUDES_DEFAULT]) dnl Check for SSL, where SSL is mandatory dnl Adds --with-ssl option, searches for openssl and defines HAVE_SSL if found -dnl Setup of CPPFLAGS, CFLAGS. Adds -lcrypto to LIBS. +dnl Setup of CPPFLAGS, CFLAGS. Adds -lcrypto to LIBS. dnl Checks main header files of SSL. dnl AC_DEFUN([ACX_WITH_SSL], [ AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl=pathname],[enable SSL (will check /usr/local/ssl - /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr or specify like /usr/include/openssl11)]),[ + /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[ ],[ withval="yes" ]) @@ -839,7 +776,7 @@ dnl AC_DEFUN([ACX_WITH_SSL_OPTIONAL], [ AC_ARG_WITH(ssl, AS_HELP_STRING([--with-ssl=pathname],[enable SSL (will check /usr/local/ssl - /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr or specify like /usr/include/openssl11)]),[ + /usr/lib/ssl /usr/ssl /usr/pkg /usr/local /opt/local /usr/sfw /usr)]),[ ],[ withval="yes" ]) @@ -872,7 +809,7 @@ dnl try to see if an additional _LARGEFILE_SOURCE 1 is needed to get fseeko ACX_CHECK_COMPILER_FLAG_NEEDED(-D_LARGEFILE_SOURCE=1, [ #include -int test(void) { +int test() { int a = fseeko(stdin, 0, 0); return a; } @@ -897,7 +834,7 @@ char* (*f) () = getaddrinfo; #ifdef __cplusplus } #endif -int main(void) { +int main() { ; return 0; } @@ -908,7 +845,7 @@ dnl see if on windows if test "$ac_cv_header_windows_h" = "yes"; then AC_DEFINE(USE_WINSOCK, 1, [Whether the windows socket API is used]) USE_WINSOCK="1" - if echo "$LIBS" | grep 'lws2_32' >/dev/null; then + if echo $LIBS | grep 'lws2_32' >/dev/null; then : else LIBS="$LIBS -lws2_32" @@ -916,24 +853,6 @@ if test "$ac_cv_header_windows_h" = "yes"; then fi ], dnl no quick getaddrinfo, try mingw32 and winsock2 library. -dnl perhaps getaddrinfo needs only the include -AC_LINK_IFELSE( -[AC_LANG_PROGRAM( -[ -#ifdef HAVE_WS2TCPIP_H -#include -#endif -], -[ - (void)getaddrinfo(NULL, NULL, NULL, NULL); -] -)], -[ -ac_cv_func_getaddrinfo="yes" -AC_DEFINE(USE_WINSOCK, 1, [Whether the windows socket API is used]) -USE_WINSOCK="1" -], - ORIGLIBS="$LIBS" LIBS="$LIBS -lws2_32" *** 6648 LINES SKIPPED *** From nobody Fri May 22 17:55:56 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMXy468tZz6fLJs for ; Fri, 22 May 2026 17:55: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMXy43gxcz4Lpn for ; Fri, 22 May 2026 17:55:56 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GwPg8Bryn8N268e8ZYzJfAwMLO0xEbMbsdSH9vqQIzo=; b=tUM5fGtwp5BsJtqJMPa2XAOyKa7RrPvOuP6SDk0NiZgzQNLe7MBOI5e+P7KKxPWMqpI4HG HDKGYSb6Z+yZStmx4HEg14CKax7psdKHlKklUUEMyc0KGnAtZ5tLZn5NlVGY0KTOyb2cha hnTQI6Xya6aPQoVgvYSmNUQB7o/1+iWYzJjMFa21Hx5YPWLMlaYegrcIYeoltuqKXN0Gen OJeU5PLucNyJpTdTYj9knGrrUc4YwVVrPSc16nkQhTKeFSvNQY3GIcDEpUhTM2qwrY1tNy n2/ZKg9bxXw2zu0JWkPb2Zy2PxI6aqC98lQL5UwqME+LTb6LJWe/ka/8y9sT9Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779472556; a=rsa-sha256; cv=none; b=uodBwfVcTYHnshc1m2MYt+GxdVzlOlSof9mQcBYGbAKo1Fujx5t/dZnppqVwuiTdjVr1bM gWgkQ1vR56l+wStBpRfqTPDDayadMxxdY4gx9LvLMxqEdZ/NkpYpURLJP9ZJj/clS1k879 3JHvmvLAnkOfFR125VH6mKT4fRwYBHVi48LMRxv45+zBvwUFtxHdA9b+qE3ks6ICv/U/58 DblQgDZW5PEKo5d+aYyf+pHtlfmlj7EdqTfggg/4PSzjnrzLE4exFcletemZzVKePKbqmO csWFjC2ck3n5XPH3nsxUPUOuXVmP7iFE8DI4rKyw0peyE/s7QtW5GzU6yMDAxA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472556; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GwPg8Bryn8N268e8ZYzJfAwMLO0xEbMbsdSH9vqQIzo=; b=qC2qEIxXhN+U1wo6OBvSbTA+BOZfJMKad2v7hMH0Vol5sh4WhZf7SIMvDxY7HhnHpZxa/b R5mljp/TzoUXTbpSthLtpY9TuMQme0FPfRV9bZcZUUuzJc6aKGVDBE6Hwb42H9aft2pHXQ tmNdhsMymIuWpjMGjZfpH8n4rjw5uOXRQQuacHjOK/5LQv22LXDuNYpOqZUPQ9riv4ENDB D7Ntl+7XuPqZ1sxXQwJEOSF463lxZzQawdSATGLikuncCwQB0tK4D+LG+e3ensru8sBBBC wQYVguOegR9AxXK/ZFWr84y4LcN/nmONgVpgf3jSEokW/8AmUK1Oy5IYYrhp8g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMXy4352tzXTY for ; Fri, 22 May 2026 17:55:56 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a381 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:55:56 +0000 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=B8rg?=rav Subject: git: 9ed998a81bab - main - ldns: Update to 1.9.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 9ed998a81bab54203604d08293089db875758686 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:55:56 +0000 Message-Id: <6a1098ac.3a381.4bd4ec1e@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=9ed998a81bab54203604d08293089db875758686 commit 9ed998a81bab54203604d08293089db875758686 Merge: d44c9549ef31 5eb18e857646 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:54:58 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 17:54:58 +0000 ldns: Update to 1.9.0 Merge commit '5eb18e8576462f5bb33fbd60fcbd752fe5791f33' MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57170 contrib/ldns/Changelog | 46 +++ contrib/ldns/Makefile.in | 58 +-- contrib/ldns/README | 19 +- contrib/ldns/config.guess | 26 +- contrib/ldns/config.sub | 749 +++++++++++++++++++++++++++++---------- contrib/ldns/configure | 94 ++++- contrib/ldns/configure.ac | 41 ++- contrib/ldns/dnssec.c | 4 +- contrib/ldns/dnssec_zone.c | 50 ++- contrib/ldns/drill/drill.c | 2 +- contrib/ldns/drill/securetrace.c | 7 +- contrib/ldns/error.c | 2 + contrib/ldns/host2str.c | 60 ++++ contrib/ldns/host2wire.c | 2 +- contrib/ldns/keys.c | 2 + contrib/ldns/ldns/config.h.in | 11 +- contrib/ldns/ldns/dnssec_zone.h | 14 +- contrib/ldns/ldns/edns.h | 6 +- contrib/ldns/ldns/error.h | 3 +- contrib/ldns/ldns/host2str.h | 18 + contrib/ldns/ldns/packet.h | 13 + contrib/ldns/ldns/rdata.h | 10 +- contrib/ldns/ldns/rr.h | 20 +- contrib/ldns/ldns/str2host.h | 10 + contrib/ldns/ldns/util.h.in | 22 ++ contrib/ldns/net.c | 2 + contrib/ldns/packet.c | 23 +- contrib/ldns/rdata.c | 6 + contrib/ldns/resolver.c | 18 +- contrib/ldns/rr.c | 129 ++++++- contrib/ldns/sha1.c | 2 +- contrib/ldns/sha2.c | 18 +- contrib/ldns/str2host.c | 68 +++- contrib/ldns/util.c | 5 + contrib/ldns/wire2host.c | 3 + contrib/ldns/zone.c | 2 +- 36 files changed, 1265 insertions(+), 300 deletions(-) diff --cc contrib/ldns/configure index a73dc22ef349,000000000000..b731de6c2933 mode 100755,000000..100755 --- a/contrib/ldns/configure +++ b/contrib/ldns/configure @@@ -1,22094 -1,0 +1,22164 @@@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. - # Generated by GNU Autoconf 2.71 for ldns 1.8.4. ++# Generated by GNU Autoconf 2.71 for ldns 1.9.0. +# +# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else $as_nop + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. +as_nl=' +' +export as_nl +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0
&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi + +# The user is always right. +if ${PATH_SEPARATOR+false} :; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else \$as_nop + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : + +else \$as_nop + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null +then : + as_have_required=yes +else $as_nop + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : + +else $as_nop + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$as_shell as_have_required=yes + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : + break 2 +fi +fi + done;; + esac + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi + + + if test "x$CONFIG_SHELL" != x +then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + else + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and +$0: dns-team@nlnetlabs.nl about your system, including any +$0: error possibly output before this message. Then install +$0: a modern shell, or manually run the script under such a +$0: shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else $as_nop + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else $as_nop + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + printf "%s\n" "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +SHELL=${CONFIG_SHELL-/bin/sh} + + +test -n "$DJDIR" || exec 7<&0
&1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='ldns' +PACKAGE_TARNAME='libdns' - PACKAGE_VERSION='1.8.4' - PACKAGE_STRING='ldns 1.8.4' ++PACKAGE_VERSION='1.9.0' ++PACKAGE_STRING='ldns 1.9.0' +PACKAGE_BUGREPORT='dns-team@nlnetlabs.nl' +PACKAGE_URL='' + +ac_unique_file="packet.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_STDIO_H +# include +#endif +#ifdef HAVE_STDLIB_H +# include +#endif +#ifdef HAVE_STRING_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_header_c_list= +ac_func_c_list= +ac_subst_vars='LTLIBOBJS +CONFIG_FILES +ldns_build_config_have_attr_unused +ldns_build_config_have_attr_format +ldns_build_config_have_ssl +DEFAULT_CAPATH +DEFAULT_CAFILE +LDNS_TRUST_ANCHOR_FILE +WINDRES +ldns_build_config_have_b32_pton +ldns_build_config_have_b32_ntop +LIBOBJS +ldns_build_config_have_socklen_t +LIBPCAP_LIBS +include_unistd_h +include_systypes_h +include_inttypes_h +ldns_build_config_have_inttypes_h +include_sys_socket_h +LIBSSL_SSL_LIBS +LIBSSL_LIBS +LIBSSL_LDFLAGS +LIBSSL_CPPFLAGS +ldns_build_config_use_dane_ta_usage +ldns_build_config_use_dane_verify +ldns_build_config_use_dane +ldns_build_config_use_ed448 +ldns_build_config_use_ed25519 +ldns_build_config_use_dsa +RUNTIME_PATH +HAVE_SSL +libtool +CLEAN_P5_DNS_LDNS +UNINSTALL_P5_DNS_LDNS +INSTALL_P5_DNS_LDNS +TEST_P5_DNS_LDNS +P5_DNS_LDNS +PERL +PYLDNSXUNINST +PYLDNSXINST +PYLDNSUNINST +PYLDNSINST +PYLDNSX +PYTHON_X_CFLAGS +swig +PYLDNS +SWIG_LIB +SWIG +SWIGPY3 +PYTHON_EXTRA_LDFLAGS +PYTHON_EXTRA_LIBS +PYTHON_PLATFORM_SITE_PKG +PYTHON_SITE_PKG +PYTHON_LIBS +PYTHON_CPPFLAGS +PYTHON +PYTHON_VERSION +UNINSTALL_CONFIG_MANPAGE +UNINSTALL_CONFIG +INSTALL_CONFIG_MANPAGE +INSTALL_CONFIG +LINT_EXAMPLES +CLEAN_EXAMPLES +UNINSTALL_EXAMPLES +INSTALL_EXAMPLES +EXAMPLES +LINT_DRILL +CLEAN_DRILL +UNINSTALL_DRILL +INSTALL_DRILL +DRILL +doxygen +LINTFLAGS +SET_MAKE +DEPFLAG +LT_SYS_LIBRARY_PATH +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +AWK +RANLIB +STRIP +ac_ct_AR +AR +DLLTOOL +OBJDUMP +FILECMD +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +LIBTOOL +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +VERSION_INFO +LDNS_VERSION_MICRO +LDNS_VERSION_MINOR +LDNS_VERSION_MAJOR +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_shared +enable_static +with_pic +enable_fast_install +with_aix_soname +with_gnu_ld +with_sysroot +enable_libtool_lock +with_drill +with_examples +enable_ldns_config +enable_stderr_msgs +enable_poll +with_pyldns +with_pyldnsx +with_p5_dns_ldns +with_ssl +enable_sha2 +enable_gost +enable_gost_anyway +enable_ecdsa +enable_dsa +enable_ed25519 +enable_ed448 +enable_dane +enable_dane_verify +enable_dane_ta_usage +enable_full_dane +enable_no_dane_ta_usage +enable_no_dane_verify ++enable_draft_rrtypes +enable_rrtype_ninfo +enable_rrtype_rkey +enable_rrtype_openpgpkey +enable_rrtype_ta +enable_rrtype_avc +enable_rrtype_doa +enable_rrtype_amtrelay +enable_rrtype_svcb_https +enable_rrtype_resinfo ++enable_rrtype_dsync ++enable_rrtypes_cla_ipn ++enable_rrtypes_hhit_brid +enable_rpath +with_xcode_sdk +with_trust_anchor +with_ca_file +with_ca_path +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +LT_SYS_LIBRARY_PATH +PYTHON_VERSION' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. +# Use braces instead of parens because sh, perl, etc. also accept them. +# (The list follows the same order as the GNU Coding Standards.) +bindir='${exec_prefix}/bin' +sbindir='${exec_prefix}/sbin' +libexecdir='${exec_prefix}/libexec' +datarootdir='${prefix}/share' +datadir='${datarootdir}' +sysconfdir='${prefix}/etc' +sharedstatedir='${prefix}/com' +localstatedir='${prefix}/var' +includedir='${prefix}/include' +oldincludedir='/usr/include' *** 23742 LINES SKIPPED *** From nobody Fri May 22 17:55:54 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMXy767Kjz6fLMY for ; Fri, 22 May 2026 17:55: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMXy74b2Dz4Lf3 for ; Fri, 22 May 2026 17:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I3SohlL363JRo4yCYbXX+2ZW5dfsw5yha5WXzJfMAig=; b=fLBrXuvmFJbUMQiKUulKbCKW5J7WnYAgyEGGzmUDE1Veto4MKaIq+03MX7ltr3G5UKw64g DNC+xfB1BtxKRHXUVUHROdSgcqmDRJ/SfiW4jorfyutNNv5VUTK9FVMtXAHJdVeAhjGi9H ksR2aMAqVtlz+MEAn02e9QgmTBISP/38FfpgMt+zpokL4QkeMBWrZCSqWjzFDbxHMYFDR/ 63o/bQZEaX1SZ6/Pn/basiCHez3dPwhkoitP5cPbNmHtPTFi7VL7PR9Oa6LAzPe2lDD4bt nt7f6bmlnKhKD7wJKZTJUTqj54n0XYw2I2VGYbQOCi7RM3q825BgYsxMNJVlvg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779472559; a=rsa-sha256; cv=none; b=HkCPxorZAkaHBHw2z2dgXWMeKG/YvVGUYSbJ9f0gsUHCGsXtePp1Wx29f7BOF2cFhU+AFY A5GBSA/cEfukLmhqkU6lElPazQhXD0yfAb5Ph4WhhiTc3Z0MawsWGLcIDYBwhGmqhLNePw JteJp7hSKLnfIh42j5vvXX1WBE5JGvCoQReRfzWNaSH17N7N6b73EO217fT2og+ucIPNjT v3kp97hFdDsR8T3Rvw++wgn0wrsRY2Vbe9PhemElRu4YsHCV5xHxWEx9NeWtFK2hWHWb39 TkiDqApY7x2X8RdEUDcnJlc5TGRtHDhKzbwQeZ8hhvNV8pA08jwD8pc96MCC8Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472559; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=I3SohlL363JRo4yCYbXX+2ZW5dfsw5yha5WXzJfMAig=; b=sq9LrH+qR+5V/TNUlb5ZLzCU4Yx62cRlY3dXAC0qiq6EGQC8/4ADiJ3YQpc+4TaGrR+XmM pA92zfoV2VGR/StJiZOqB47m5KlQ/gSA508Y2apGKCEYHgc6w82uh1u8SAZJ64nelukZ9R iNRwB937bge1CfaImI9eR4P4w96gMErwh4eOs7/p21DvX2AcXsbcPo3dFYKKGQgTWPjoW5 VcVyOy3qgkKlIie1tXd/nLjhQL1z4F/vPyAAo7mg4bYBRPYIcz4dVJRtpEovGVtDdvuODX MNHMvf5jkmTTpnyXF6TLaGOe/Yz/pPNYQvkDifTXJNU+ex2DnKFuLN05APBajg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMXy73qJNzX2M for ; Fri, 22 May 2026 17:55:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 390b9 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:55:54 +0000 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=B8rg?=rav Subject: git: d44c9549ef31 - main - ldns: Update to 1.8.4 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: d44c9549ef31884ac069b0306bad248a74bb2825 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:55:54 +0000 Message-Id: <6a1098aa.390b9.63838548@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=d44c9549ef31884ac069b0306bad248a74bb2825 commit d44c9549ef31884ac069b0306bad248a74bb2825 Merge: f103898935e1 3dcfa5af4121 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:54:09 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 17:54:09 +0000 ldns: Update to 1.8.4 Merge commit '3dcfa5af412125cd1bad1d383ff7c18c5effbd77' MFC after: 1 week Reviewed by: emaste Differential Revision: https://reviews.freebsd.org/D57169 contrib/ldns/Changelog | 41 ++ contrib/ldns/Makefile.in | 48 +- contrib/ldns/README | 23 - contrib/ldns/README-Travis.md | 274 ----------- contrib/ldns/README.snapshots | 2 +- contrib/ldns/acx_nlnetlabs.m4 | 223 ++++++--- contrib/ldns/ax_python_devel.m4 | 147 ++++-- contrib/ldns/compat/asctime_r.c | 16 + contrib/ldns/config.guess | 70 ++- contrib/ldns/config.sub | 239 ++++++---- contrib/ldns/configure | 876 ++++++++++++++++++++++++++--------- contrib/ldns/configure.ac | 150 +++--- contrib/ldns/dane.c | 4 +- contrib/ldns/dnssec.c | 8 +- contrib/ldns/dnssec_sign.c | 9 +- contrib/ldns/dnssec_zone.c | 3 + contrib/ldns/drill/drill.1.in | 2 +- contrib/ldns/drill/drill.c | 2 +- contrib/ldns/drill/root.c | 22 +- contrib/ldns/edns.c | 41 +- contrib/ldns/error.c | 5 + contrib/ldns/host2str.c | 20 +- contrib/ldns/keys.c | 16 +- contrib/ldns/ldns/config.h.in | 28 +- contrib/ldns/ldns/edns.h | 15 + contrib/ldns/ldns/error.h | 4 +- contrib/ldns/ldns/net.h.in | 3 +- contrib/ldns/ldns/parse.h | 26 +- contrib/ldns/ldns/radix.h | 2 +- contrib/ldns/ldns/rdata.h | 2 +- contrib/ldns/ldns/rr.h | 18 +- contrib/ldns/libdns.doxygen.in | 20 +- contrib/ldns/ltmain.sh | 851 +++++++++++++++++++++------------- contrib/ldns/m4/libtool.m4 | 229 +++++---- contrib/ldns/m4/ltoptions.m4 | 4 +- contrib/ldns/m4/ltsugar.m4 | 2 +- contrib/ldns/m4/ltversion.m4 | 13 +- contrib/ldns/m4/lt~obsolete.m4 | 4 +- contrib/ldns/makewin.sh | 65 ++- contrib/ldns/net.c | 4 +- contrib/ldns/packaging/ldns-config.1 | 2 +- contrib/ldns/packet.c | 4 +- contrib/ldns/rr.c | 14 +- contrib/ldns/util.c | 2 + 44 files changed, 2264 insertions(+), 1289 deletions(-) diff --cc contrib/ldns/compat/asctime_r.c index 000000000000,63e5355f9b56..63e5355f9b56 mode 000000,100644..100644 --- a/contrib/ldns/compat/asctime_r.c +++ b/contrib/ldns/compat/asctime_r.c diff --cc contrib/ldns/configure index 425ac0e02268,000000000000..a73dc22ef349 mode 100755,000000..100755 --- a/contrib/ldns/configure +++ b/contrib/ldns/configure @@@ -1,21632 -1,0 +1,22094 @@@ +#! /bin/sh +# Guess values for system-dependent variables and create Makefiles. - # Generated by GNU Autoconf 2.71 for ldns 1.8.3. ++# Generated by GNU Autoconf 2.71 for ldns 1.8.4. +# - # Report bugs to . ++# Report bugs to . +# +# +# Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, +# Inc. +# +# +# This configure script is free software; the Free Software Foundation +# gives unlimited permission to copy, distribute and modify it. +## -------------------- ## +## M4sh Initialization. ## +## -------------------- ## + +# Be more Bourne compatible +DUALCASE=1; export DUALCASE # for MKS sh +as_nop=: +if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which + # is contrary to our usage. Disable this feature. + alias -g '${1+"$@"}'='"$@"' + setopt NO_GLOB_SUBST +else $as_nop + case `(set -o) 2>/dev/null` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi + + + +# Reset variables that may have inherited troublesome values from +# the environment. + +# IFS needs to be set, to space, tab, and newline, in precisely that order. +# (If _AS_PATH_WALK were called with IFS unset, it would have the +# side effect of setting IFS to empty, thus disabling word splitting.) +# Quoting is to prevent editors from complaining about space-tab. +as_nl=' +' +export as_nl +IFS=" "" $as_nl" + +PS1='$ ' +PS2='> ' +PS4='+ ' + +# Ensure predictable behavior from utilities with locale-dependent output. +LC_ALL=C +export LC_ALL +LANGUAGE=C +export LANGUAGE + +# We cannot yet rely on "unset" to work, but we need these variables +# to be unset--not just set to an empty or harmless value--now, to +# avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct +# also avoids known problems related to "unset" and subshell syntax +# in other old shells (e.g. bash 2.01 and pdksh 5.2.14). +for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH +do eval test \${$as_var+y} \ + && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : +done + +# Ensure that fds 0, 1, and 2 are open. +if (exec 3>&0) 2>/dev/null; then :; else exec 0
&1) 2>/dev/null; then :; else exec 1>/dev/null; fi +if (exec 3>&2) ; then :; else exec 2>/dev/null; fi + +# The user is always right. +if ${PATH_SEPARATOR+false} :; then + PATH_SEPARATOR=: + (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { + (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || + PATH_SEPARATOR=';' + } +fi + + +# Find who we are. Look in the path if we contain no directory separator. +as_myself= +case $0 in #(( + *[\\/]* ) as_myself=$0 ;; + *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + test -r "$as_dir$0" && as_myself=$as_dir$0 && break + done +IFS=$as_save_IFS + + ;; +esac +# We did not find ourselves, most probably we were run as `sh COMMAND' +# in which case we are not to be found in the path. +if test "x$as_myself" = x; then + as_myself=$0 +fi +if test ! -f "$as_myself"; then + printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 + exit 1 +fi + + +# Use a proper internal environment variable to ensure we don't fall + # into an infinite loop, continuously re-executing ourselves. + if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then + _as_can_reexec=no; export _as_can_reexec; + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 + fi + # We don't want this to propagate to other subprocesses. + { _as_can_reexec=; unset _as_can_reexec;} +if test "x$CONFIG_SHELL" = x; then + as_bourne_compatible="as_nop=: +if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 +then : + emulate sh + NULLCMD=: + # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which + # is contrary to our usage. Disable this feature. + alias -g '\${1+\"\$@\"}'='\"\$@\"' + setopt NO_GLOB_SUBST +else \$as_nop + case \`(set -o) 2>/dev/null\` in #( + *posix*) : + set -o posix ;; #( + *) : + ;; +esac +fi +" + as_required="as_fn_return () { (exit \$1); } +as_fn_success () { as_fn_return 0; } +as_fn_failure () { as_fn_return 1; } +as_fn_ret_success () { return 0; } +as_fn_ret_failure () { return 1; } + +exitcode=0 +as_fn_success || { exitcode=1; echo as_fn_success failed.; } +as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } +as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } +as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } +if ( set x; as_fn_ret_success y && test x = \"\$1\" ) +then : + +else \$as_nop + exitcode=1; echo positional parameters were not saved. +fi +test x\$exitcode = x0 || exit 1 +blah=\$(echo \$(echo blah)) +test x\"\$blah\" = xblah || exit 1 +test -x / || exit 1" + as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO + as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO + eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && + test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 + + test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( + ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO + PATH=/empty FPATH=/empty; export PATH FPATH + test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ + || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 +test \$(( 1 + 1 )) = 2 || exit 1" + if (eval "$as_required") 2>/dev/null +then : + as_have_required=yes +else $as_nop + as_have_required=no +fi + if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null +then : + +else $as_nop + as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +as_found=false +for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH +do + IFS=$as_save_IFS + case $as_dir in #((( + '') as_dir=./ ;; + */) ;; + *) as_dir=$as_dir/ ;; + esac + as_found=: + case $as_dir in #( + /*) + for as_base in sh bash ksh sh5; do + # Try only shells that exist, to save several forks. + as_shell=$as_dir$as_base + if { test -f "$as_shell" || test -f "$as_shell.exe"; } && + as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$as_shell as_have_required=yes + if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null +then : + break 2 +fi +fi + done;; + esac + as_found=false +done +IFS=$as_save_IFS +if $as_found +then : + +else $as_nop + if { test -f "$SHELL" || test -f "$SHELL.exe"; } && + as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null +then : + CONFIG_SHELL=$SHELL as_have_required=yes +fi +fi + + + if test "x$CONFIG_SHELL" != x +then : + export CONFIG_SHELL + # We cannot yet assume a decent shell, so we have to provide a +# neutralization value for shells without unset; and this also +# works around shells that cannot unset nonexistent variables. +# Preserve -v and -x to the replacement shell. +BASH_ENV=/dev/null +ENV=/dev/null +(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV +case $- in # (((( + *v*x* | *x*v* ) as_opts=-vx ;; + *v* ) as_opts=-v ;; + *x* ) as_opts=-x ;; + * ) as_opts= ;; +esac +exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} +# Admittedly, this is quite paranoid, since all the known shells bail +# out after a failed `exec'. +printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 +exit 255 +fi + + if test x$as_have_required = xno +then : + printf "%s\n" "$0: This script requires a shell more modern than all" + printf "%s\n" "$0: the shells that I found on your system." + if test ${ZSH_VERSION+y} ; then + printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" + printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." + else + printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and - $0: libdns@nlnetlabs.nl about your system, including any ++$0: dns-team@nlnetlabs.nl about your system, including any +$0: error possibly output before this message. Then install +$0: a modern shell, or manually run the script under such a +$0: shell if you do have one." + fi + exit 1 +fi +fi +fi +SHELL=${CONFIG_SHELL-/bin/sh} +export SHELL +# Unset more variables known to interfere with behavior of common tools. +CLICOLOR_FORCE= GREP_OPTIONS= +unset CLICOLOR_FORCE GREP_OPTIONS + +## --------------------- ## +## M4sh Shell Functions. ## +## --------------------- ## +# as_fn_unset VAR +# --------------- +# Portably unset VAR. +as_fn_unset () +{ + { eval $1=; unset $1;} +} +as_unset=as_fn_unset + + +# as_fn_set_status STATUS +# ----------------------- +# Set $? to STATUS, without forking. +as_fn_set_status () +{ + return $1 +} # as_fn_set_status + +# as_fn_exit STATUS +# ----------------- +# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. +as_fn_exit () +{ + set +e + as_fn_set_status $1 + exit $1 +} # as_fn_exit +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop + +# as_fn_mkdir_p +# ------------- +# Create "$as_dir" as a directory, including parents if necessary. +as_fn_mkdir_p () +{ + + case $as_dir in #( + -*) as_dir=./$as_dir;; + esac + test -d "$as_dir" || eval $as_mkdir_p || { + as_dirs= + while :; do + case $as_dir in #( + *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( + *) as_qdir=$as_dir;; + esac + as_dirs="'$as_qdir' $as_dirs" + as_dir=`$as_dirname -- "$as_dir" || +$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ + X"$as_dir" : 'X\(//\)[^/]' \| \ + X"$as_dir" : 'X\(//\)$' \| \ + X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X"$as_dir" | + sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ + s//\1/ + q + } + /^X\(\/\/\)[^/].*/{ + s//\1/ + q + } + /^X\(\/\/\)$/{ + s//\1/ + q + } + /^X\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + test -d "$as_dir" && break + done + test -z "$as_dirs" || eval "mkdir $as_dirs" + } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" + + +} # as_fn_mkdir_p + +# as_fn_executable_p FILE +# ----------------------- +# Test if FILE is an executable regular file. +as_fn_executable_p () +{ + test -f "$1" && test -x "$1" +} # as_fn_executable_p +# as_fn_append VAR VALUE +# ---------------------- +# Append the text in VALUE to the end of the definition contained in VAR. Take +# advantage of any shell optimizations that allow amortized linear growth over +# repeated appends, instead of the typical quadratic growth present in naive +# implementations. +if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null +then : + eval 'as_fn_append () + { + eval $1+=\$2 + }' +else $as_nop + as_fn_append () + { + eval $1=\$$1\$2 + } +fi # as_fn_append + +# as_fn_arith ARG... +# ------------------ +# Perform arithmetic evaluation on the ARGs, and store the result in the +# global $as_val. Take advantage of shells that can avoid forks. The arguments +# must be portable across $(()) and expr. +if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null +then : + eval 'as_fn_arith () + { + as_val=$(( $* )) + }' +else $as_nop + as_fn_arith () + { + as_val=`expr "$@" || test $? -eq 1` + } +fi # as_fn_arith + +# as_fn_nop +# --------- +# Do nothing but, unlike ":", preserve the value of $?. +as_fn_nop () +{ + return $? +} +as_nop=as_fn_nop + +# as_fn_error STATUS ERROR [LINENO LOG_FD] +# ---------------------------------------- +# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are +# provided, also output the error to LOG_FD, referencing LINENO. Then exit the +# script with STATUS, using 1 if that was 0. +as_fn_error () +{ + as_status=$1; test $as_status -eq 0 && as_status=1 + if test "$4"; then + as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack + printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 + fi + printf "%s\n" "$as_me: error: $2" >&2 + as_fn_exit $as_status +} # as_fn_error + +if expr a : '\(a\)' >/dev/null 2>&1 && + test "X`expr 00001 : '.*\(...\)'`" = X001; then + as_expr=expr +else + as_expr=false +fi + +if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then + as_basename=basename +else + as_basename=false +fi + +if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then + as_dirname=dirname +else + as_dirname=false +fi + +as_me=`$as_basename -- "$0" || +$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ + X"$0" : 'X\(//\)$' \| \ + X"$0" : 'X\(/\)' \| . 2>/dev/null || +printf "%s\n" X/"$0" | + sed '/^.*\/\([^/][^/]*\)\/*$/{ + s//\1/ + q + } + /^X\/\(\/\/\)$/{ + s//\1/ + q + } + /^X\/\(\/\).*/{ + s//\1/ + q + } + s/.*/./; q'` + +# Avoid depending upon Character Ranges. +as_cr_letters='abcdefghijklmnopqrstuvwxyz' +as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' +as_cr_Letters=$as_cr_letters$as_cr_LETTERS +as_cr_digits='0123456789' +as_cr_alnum=$as_cr_Letters$as_cr_digits + + + as_lineno_1=$LINENO as_lineno_1a=$LINENO + as_lineno_2=$LINENO as_lineno_2a=$LINENO + eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && + test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { + # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) + sed -n ' + p + /[$]LINENO/= + ' <$as_myself | + sed ' + s/[$]LINENO.*/&-/ + t lineno + b + :lineno + N + :loop + s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ + t loop + s/-\n.*// + ' >$as_me.lineno && + chmod +x "$as_me.lineno" || + { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } + + # If we had to re-execute with $CONFIG_SHELL, we're ensured to have + # already done that, so ensure we don't try to do so again and fall + # in an infinite loop. This has already happened in practice. + _as_can_reexec=no; export _as_can_reexec + # Don't try to exec as it changes $[0], causing all sort of problems + # (the dirname of $[0] is not the place where we might find the + # original and so on. Autoconf is especially sensitive to this). + . "./$as_me.lineno" + # Exit status is that of the last command. + exit +} + + +# Determine whether it's possible to make 'echo' print without a newline. +# These variables are no longer used directly by Autoconf, but are AC_SUBSTed +# for compatibility with existing Makefiles. +ECHO_C= ECHO_N= ECHO_T= +case `echo -n x` in #((((( +-n*) + case `echo 'xy\c'` in + *c*) ECHO_T=' ';; # ECHO_T is single tab character. + xy) ECHO_C='\c';; + *) echo `echo ksh88 bug on AIX 6.1` > /dev/null + ECHO_T=' ';; + esac;; +*) + ECHO_N='-n';; +esac + +# For backward compatibility with old third-party macros, we provide +# the shell variables $as_echo and $as_echo_n. New code should use +# AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. +as_echo='printf %s\n' +as_echo_n='printf %s' + + +rm -f conf$$ conf$$.exe conf$$.file +if test -d conf$$.dir; then + rm -f conf$$.dir/conf$$.file +else + rm -f conf$$.dir + mkdir conf$$.dir 2>/dev/null +fi +if (echo >conf$$.file) 2>/dev/null; then + if ln -s conf$$.file conf$$ 2>/dev/null; then + as_ln_s='ln -s' + # ... but there are two gotchas: + # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. + # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. + # In both cases, we have to default to `cp -pR'. + ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || + as_ln_s='cp -pR' + elif ln conf$$.file conf$$ 2>/dev/null; then + as_ln_s=ln + else + as_ln_s='cp -pR' + fi +else + as_ln_s='cp -pR' +fi +rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file +rmdir conf$$.dir 2>/dev/null + +if mkdir -p . 2>/dev/null; then + as_mkdir_p='mkdir -p "$as_dir"' +else + test -d ./-p && rmdir ./-p + as_mkdir_p=false +fi + +as_test_x='test -x' +as_executable_p=as_fn_executable_p + +# Sed expression to map a string onto a valid CPP name. +as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" + +# Sed expression to map a string onto a valid variable name. +as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" + +SHELL=${CONFIG_SHELL-/bin/sh} + + +test -n "$DJDIR" || exec 7<&0
&1 + +# Name of the host. +# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, +# so uname gets run too. +ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` + +# +# Initializations. +# +ac_default_prefix=/usr/local +ac_clean_files= +ac_config_libobj_dir=. +LIBOBJS= +cross_compiling=no +subdirs= +MFLAGS= +MAKEFLAGS= + +# Identity of this package. +PACKAGE_NAME='ldns' +PACKAGE_TARNAME='libdns' - PACKAGE_VERSION='1.8.3' - PACKAGE_STRING='ldns 1.8.3' - PACKAGE_BUGREPORT='libdns@nlnetlabs.nl' ++PACKAGE_VERSION='1.8.4' ++PACKAGE_STRING='ldns 1.8.4' ++PACKAGE_BUGREPORT='dns-team@nlnetlabs.nl' +PACKAGE_URL='' + +ac_unique_file="packet.c" +# Factoring default headers for most tests. +ac_includes_default="\ +#include +#ifdef HAVE_STDIO_H +# include +#endif +#ifdef HAVE_STDLIB_H +# include +#endif +#ifdef HAVE_STRING_H +# include +#endif +#ifdef HAVE_INTTYPES_H +# include +#endif +#ifdef HAVE_STDINT_H +# include +#endif +#ifdef HAVE_STRINGS_H +# include +#endif +#ifdef HAVE_SYS_TYPES_H +# include +#endif +#ifdef HAVE_SYS_STAT_H +# include +#endif +#ifdef HAVE_UNISTD_H +# include +#endif" + +ac_header_c_list= +ac_func_c_list= +ac_subst_vars='LTLIBOBJS +CONFIG_FILES +ldns_build_config_have_attr_unused +ldns_build_config_have_attr_format +ldns_build_config_have_ssl +DEFAULT_CAPATH +DEFAULT_CAFILE +LDNS_TRUST_ANCHOR_FILE +WINDRES +ldns_build_config_have_b32_pton +ldns_build_config_have_b32_ntop +LIBOBJS +ldns_build_config_have_socklen_t +LIBPCAP_LIBS +include_unistd_h +include_systypes_h +include_inttypes_h +ldns_build_config_have_inttypes_h +include_sys_socket_h +LIBSSL_SSL_LIBS +LIBSSL_LIBS +LIBSSL_LDFLAGS +LIBSSL_CPPFLAGS +ldns_build_config_use_dane_ta_usage +ldns_build_config_use_dane_verify +ldns_build_config_use_dane +ldns_build_config_use_ed448 +ldns_build_config_use_ed25519 +ldns_build_config_use_dsa +RUNTIME_PATH +HAVE_SSL +libtool +CLEAN_P5_DNS_LDNS +UNINSTALL_P5_DNS_LDNS +INSTALL_P5_DNS_LDNS +TEST_P5_DNS_LDNS +P5_DNS_LDNS +PERL +PYLDNSXUNINST +PYLDNSXINST +PYLDNSUNINST +PYLDNSINST +PYLDNSX +PYTHON_X_CFLAGS +swig +PYLDNS +SWIG_LIB +SWIG +SWIGPY3 +PYTHON_EXTRA_LDFLAGS +PYTHON_EXTRA_LIBS ++PYTHON_PLATFORM_SITE_PKG +PYTHON_SITE_PKG +PYTHON_LIBS +PYTHON_CPPFLAGS +PYTHON +PYTHON_VERSION +UNINSTALL_CONFIG_MANPAGE +UNINSTALL_CONFIG +INSTALL_CONFIG_MANPAGE +INSTALL_CONFIG +LINT_EXAMPLES +CLEAN_EXAMPLES +UNINSTALL_EXAMPLES +INSTALL_EXAMPLES +EXAMPLES +LINT_DRILL +CLEAN_DRILL +UNINSTALL_DRILL +INSTALL_DRILL +DRILL +doxygen +LINTFLAGS +SET_MAKE +DEPFLAG +LT_SYS_LIBRARY_PATH +OTOOL64 +OTOOL +LIPO +NMEDIT +DSYMUTIL +MANIFEST_TOOL +AWK +RANLIB +STRIP +ac_ct_AR +AR +DLLTOOL +OBJDUMP ++FILECMD +LN_S +NM +ac_ct_DUMPBIN +DUMPBIN +LD +FGREP +EGREP +GREP +SED +host_os +host_vendor +host_cpu +host +build_os +build_vendor +build_cpu +build +LIBTOOL +OBJEXT +EXEEXT +ac_ct_CC +CPPFLAGS +LDFLAGS +CFLAGS +CC +VERSION_INFO +LDNS_VERSION_MICRO +LDNS_VERSION_MINOR +LDNS_VERSION_MAJOR +target_alias +host_alias +build_alias +LIBS +ECHO_T +ECHO_N +ECHO_C +DEFS +mandir +localedir +libdir +psdir +pdfdir +dvidir +htmldir +infodir +docdir +oldincludedir +includedir +localstatedir +sharedstatedir +sysconfdir +datadir +datarootdir +libexecdir +sbindir +bindir +program_transform_name +prefix +exec_prefix +PACKAGE_URL +PACKAGE_BUGREPORT +PACKAGE_STRING +PACKAGE_VERSION +PACKAGE_TARNAME +PACKAGE_NAME +PATH_SEPARATOR +SHELL' +ac_subst_files='' +ac_user_opts=' +enable_option_checking +enable_shared +enable_static +with_pic +enable_fast_install +with_aix_soname +with_gnu_ld +with_sysroot +enable_libtool_lock +with_drill +with_examples +enable_ldns_config +enable_stderr_msgs +enable_poll +with_pyldns +with_pyldnsx +with_p5_dns_ldns +with_ssl +enable_sha2 +enable_gost +enable_gost_anyway +enable_ecdsa +enable_dsa +enable_ed25519 +enable_ed448 +enable_dane +enable_dane_verify +enable_dane_ta_usage +enable_full_dane +enable_no_dane_ta_usage +enable_no_dane_verify +enable_rrtype_ninfo +enable_rrtype_rkey +enable_rrtype_openpgpkey +enable_rrtype_ta +enable_rrtype_avc +enable_rrtype_doa +enable_rrtype_amtrelay +enable_rrtype_svcb_https ++enable_rrtype_resinfo +enable_rpath +with_xcode_sdk +with_trust_anchor +with_ca_file +with_ca_path +' + ac_precious_vars='build_alias +host_alias +target_alias +CC +CFLAGS +LDFLAGS +LIBS +CPPFLAGS +LT_SYS_LIBRARY_PATH +PYTHON_VERSION' + + +# Initialize some variables set by options. +ac_init_help= +ac_init_version=false +ac_unrecognized_opts= +ac_unrecognized_sep= +# The variables have the same names as the options, with +# dashes changed to underlines. +cache_file=/dev/null +exec_prefix=NONE +no_create= +no_recursion= +prefix=NONE +program_prefix=NONE +program_suffix=NONE +program_transform_name=s,x,x, +silent= +site= +srcdir= +verbose= +x_includes=NONE +x_libraries=NONE + +# Installation directory options. +# These are left unexpanded so users can "make install exec_prefix=/foo" +# and all the variables that are supposed to be based on exec_prefix +# by default will actually change. *** 24188 LINES SKIPPED *** From nobody Fri May 22 17:58:05 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMY0Y5rDdz6fLsZ for ; Fri, 22 May 2026 17:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMY0Y3jK8z4N05 for ; Fri, 22 May 2026 17:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l1V+wQxBxKB9eLQs/8oHgHOI0DqDknlaMxkh8HvX4jg=; b=lcZTAaAydgDATUXcMEpxSYvb3SZg+Ef1ODGloO0Tmd6+19btwUlNyGm6EP47N6c6OBJMHM 7BDT/g7DHSj912GI5N3q+wW9fkLmyXGvIm5uThL0mjNuK+eJqssjgPeIKSWy+jETdqVjv5 LTkCqd1hYWLZ/okUHO0v7NUEjpE9HUD0SF1Zc8TwV6+hXCNtt/oYeWFcDx9DNx4mEAKnyT gz7yNpXBrr0npGkFNHFaucCYFGBQ93Dv5EYd2IHnwzQaIrMYkAGKFbp+b8gPMQfjqUmLLA 8JvsXNfBW/GUtQu8LjqYgkGRVc7YgAqOJ34juAoxPob4Adb1PqxJmNdcuMXvXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779472685; a=rsa-sha256; cv=none; b=tsJTCdqystfWDIvqDeMTOhgmrYBCnoGZSo1piMcQ+trz4CsYzO4nEE2zSfN/TTsZqQWxrv 8RzTThGpRt6AaCPdeEkKwFMK8ILWNfb9Uc9n7ZTmEkUn3NkIziypJbxjPDHD1xG45nlaBR 0c0IxRFQkpC6h7FkC1pDaGfleHy2f3ZjuWjHKuZ5zgWIEV9JsODlZbuBMeXu/Z9FaJaH78 JxvyXyJjX3//YMbq/aXeqzCxeCgk5wAv4EmzHQza49hicI3m2TAxuM80vF17721QnhT+83 M+9ChcmEteEKa3xfIrDUPfgxWkpc+vZeCjKH7RNxRC228vqXSW/Wemh4rcLYXw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472685; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l1V+wQxBxKB9eLQs/8oHgHOI0DqDknlaMxkh8HvX4jg=; b=XBL5RIstqYVGzb/m2ds3dF5a9IadAHkjC5kvekAuKj6ZhgELyeW1w+ACPta+jjzqQm8uAK M2hPDWvihzhTf5mIEcjZvtUYqc1NsHN0JeDtVnKTzSp2CnapXTf77sFn5BhYq29yK13AwI RKTtrGFUMz7OZJRG8yeod0Fe2DhGg6RgRzvMwANJzlDTYQVbOh7CLEkN986QzVAoKBvTOZ WnRsokGi39qsuu3IEAE0v05hILcwGJaXcAkwJxfx+vR0lWQpFSnkot0f6X1bGL3nF94bKq efBKfq0SFDbfRRS4+fXrp2Yz7KSSU8RgwZP8H4eTn2SWxqPXO0dRRpKyMyMevA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMY0Y2wkzzX2P for ; Fri, 22 May 2026 17:58:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a385 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:58:05 +0000 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=B8rg?=rav Subject: git: a4b175941815 - main - tftp: Simplify URI handling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: a4b17594181502cea38ab0d8b2a9a10782286334 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:58:05 +0000 Message-Id: <6a10992d.3a385.1bfa7822@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a4b17594181502cea38ab0d8b2a9a10782286334 commit a4b17594181502cea38ab0d8b2a9a10782286334 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:08 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 17:57:08 +0000 tftp: Simplify URI handling * No need to copy our argument into a new buffer; it is writeable and will not be reused after we return. * Instead of constructing the string "get path" and then splitting it into an argument vector, just construct the vector directly. This avoid potentially overrunning the buffer. * Call settftpmode() just once, with either the default mode or the user-provided value we already validated. * Use errx() instead of fprintf(stderr) + exit(). Reported by: Moyao, Minghao Fu MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57070 --- usr.bin/tftp/main.c | 32 ++++++++++++-------------------- 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index 8e36c9e04f9b..9b7ea7155d82 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -225,23 +225,18 @@ main(int argc, char *argv[]) static void urihandling(char *URI) { - char uri[ARG_MAX]; + char meth[] = "get"; char *host = NULL; char *path = NULL; char *opts = NULL; const char *tmode = "octet"; char *s; - char line[MAXLINE]; int i; - strlcpy(uri, URI, ARG_MAX); - host = uri + 7; + host = URI + 7; - if ((s = strchr(host, '/')) == NULL) { - fprintf(stderr, - "Invalid URI: Couldn't find / after hostname\n"); - exit(1); - } + if ((s = strchr(host, '/')) == NULL) + errx(1, "Invalid URI: Couldn't find / after hostname"); *s = '\0'; path = s + 1; @@ -253,24 +248,21 @@ urihandling(char *URI) tmode = opts; tmode += 5; - for (i = 0; modes[i].m_name != NULL; i++) { + for (i = 0; modes[i].m_name != NULL; i++) if (strcmp(modes[i].m_name, tmode) == 0) break; - } - if (modes[i].m_name == NULL) { - fprintf(stderr, "Invalid mode: '%s'\n", mode); - exit(1); - } - settftpmode(modes[i].m_mode); + if (modes[i].m_name == NULL) + errx(1, "Invalid mode: '%s'", mode); } - } else { - settftpmode("octet"); } + settftpmode(tmode); setpeer0(host, NULL); - sprintf(line, "get %s", path); - makeargv(line); + margc = 0; + margv[margc++] = meth; + margv[margc++] = path; + margv[margc] = NULL; get(margc, margv); } From nobody Fri May 22 17:58:06 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMY0Z6nw7z6fLnJ for ; Fri, 22 May 2026 17:58: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMY0Z4jzLz4MwF for ; Fri, 22 May 2026 17:58:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1wxPkWA1t/JflsU3O2JSlrLDDzA+xyrmZTScXHPdE0w=; b=S99cLc2MlS/9GWZazgDe1AJ83WYmKi/D4r+6C6WzwPx74RshrduM3KlGcTixvIS82N8FGi o5y2cKTmuRH2Q9rlRhC9Gs23blXrf1DFcBKfuihLmK9rANZUIeyDFmoZevQ7UAy3gus4nT J0Tn+F+V63W+VhdC67YztsqqGnuEudGA2G3jgyI9T54gLX8VbovJiSk1ZiWD6E5SqYnItM UEmZt7vr0n5wX8DmkANyRkoetfXhzea5WnFqm5T/jecALcwtP5pAkJHkqg8llrcruo5IPM sT/NwqwvcpvBU+pH+VGQqbtsc7I8FEMc3VQxYuy4GdQgG/aIjmyHHL0nArHvew== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779472686; a=rsa-sha256; cv=none; b=QOugfBLr/2J6G1va+ln3ZaJr50/VnB3kB4+KMlXI2Mvz4QrT3h9jMHNR2KV60qLXyodcE3 k2DaCpAXFfwul1/uI9q3efY8VhuxlJ766GZFQOYSP9FWadaxLJvI12tbcIY9zG24eXaqTH gcu9jXqqeTVyW5S9Q1sKsHvQZbrrcNTMpNcl/MT9UtUtVYBK/w0y0tyTCBxWICMuG7wjES x7ze0hRNjEP84Jq0/uBrI0Ou7z48pZOCT1r0Fz565MiKxrJXXsCaSfz0nhLJLDdBBu53cJ zV6qrOjGRSnfHW050Dyit6iSq02BtBBN4vybZE+DDjzBM5av8b0tTHUkKcraYQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472686; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1wxPkWA1t/JflsU3O2JSlrLDDzA+xyrmZTScXHPdE0w=; b=GJwMZtFO+CF6tQeIgemcCDUWFDWnB1Uzb4DR/eniuYPYSi7CqAQ6PVC2mZ7PUe+5fO6jKM FqM2uppBtRgIjRBSNNe0C//adh+qWaoctGThR3VLPWJRHQROLS8mBpdc/0A5XsaI9FqSr6 KZODyNzX147kfQJl5GGkceE/f+jxT+/6kt1nQAbkAc8ELjVuux+H23aepkXmeVHIBLslW9 0SEYA1+Ew2l5mlP4Hr/HaC6C2WiORak12PTXS5zioouSwTajuHH3mCLmv+JEMt+T2y3gzU 7Nb8rukPdZHzonuR66M/FPLLzYWF/gsNqxRI9NcsE79oK6YwNzN37tAYV9jrIw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMY0Z3p3SzWHr for ; Fri, 22 May 2026 17:58:06 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3a302 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:58:06 +0000 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=B8rg?=rav Subject: git: 29351335704e - main - tftp: Close files when we're done with them List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 29351335704e39ce3ca09c528d534c7898bbdc2c Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:58:06 +0000 Message-Id: <6a10992e.3a302.1469c66d@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=29351335704e39ce3ca09c528d534c7898bbdc2c commit 29351335704e39ce3ca09c528d534c7898bbdc2c Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:12 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 17:57:12 +0000 tftp: Close files when we're done with them Also, delete the file we created if receiving it failed. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57071 --- usr.bin/tftp/main.c | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index 9b7ea7155d82..a26561eaa982 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -584,8 +584,11 @@ get(int argc, char *argv[]) if (verbose) printf("getting from %s:%s to %s [%s]\n", hostname, src, cp, mode); - if (recvfile(peer, port, fd, src, mode) != 0) + if (recvfile(peer, port, fd, src, mode) != 0) { + (void) unlink(cp); txrx_error = 1; + } + close(fd); break; } cp = tail(src); /* new .. jdg */ @@ -597,8 +600,11 @@ get(int argc, char *argv[]) if (verbose) printf("getting from %s:%s to %s [%s]\n", hostname, src, cp, mode); - if (recvfile(peer, port, fd, src, mode) != 0) + if (recvfile(peer, port, fd, src, mode) != 0) { + (void) unlink(cp); txrx_error = 1; + } + close(fd); } } From nobody Fri May 22 17:58:07 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMY0c12FTz6fLps for ; Fri, 22 May 2026 17:58: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMY0b5LYrz4MtD for ; Fri, 22 May 2026 17:58:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ELZqqGr5tMyv6JYMKZ9oqeuelFp815Z1c4BUBhgROrs=; b=ffKXpjU2V2CNit3By7pUhAzYf3WhD6qF9ZqweCTaxDBDrs7u5UsIcBrdzMtmSNVVfEuf4c vmxtTM/yEl50ctjrqRlWzByv52egfhTgtwN0Tca9TMYrKoOlLTQnb5pvZo8yW+F7c2jAtr UldeZzkRZVsnsHYtpWvTf43QG+YivJ+2fbRBk69oNXm7uZJ+16X2TU8uKcfBvi/c/oz5O/ HTGKIgXHB6v5GuW5upSAiOM6B2S3bistpv4Vv7FMgVm751KhwMoH5BMl9hZe1IbVoTKthC BTaeXBpHxUb15PeDOEGj0f3O9r3t9KKMbx9dNDTWTQRKwg0ETLhoEqgYm7cplA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779472687; a=rsa-sha256; cv=none; b=qoF8ONJ9gKXosurSF4XFiU43Ko2cSegmsfZE/7YylFa0AuEWvCwDYho9QQxNDjzpwvYMav cJrYsgsQvtuoCEzTuRYyqHgf0o9H5fAn00DWwW5TN/5U8f7selCfTIPTdrOrNI2hK8eNKH JPZ3Jg53ykFhCHVlAvGkjpFt1SoDev7MNCRvYSG9eYacK0JrxoOaqgFLkUm89mM9JbrGeN AX5yWWQP+w2CTAOJ8OkCijU+n8VFJhzdQo7Pq/790KUNxH5OOMlEi6WVyK6RNQkMb/sTdE VjgPJXd24S7C8JclKnXuiLVOxDsdcuFXRVJnNhsrNGksbEIrEx6wzsF36ZVPyQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472687; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ELZqqGr5tMyv6JYMKZ9oqeuelFp815Z1c4BUBhgROrs=; b=wEPtAjbF5s8yWgpxT2iM8V25f7ylqJQT+6+aiNV0Z3Ff67eGejQIujdAxiyKQaqzumpm/n uGUFWYNLQ/BmL1cn4Ks2kL1t59obhonu4Uobf3wV1hCw7GBIjbgVSAtogzjfD10pV2SGX0 NHJkTTLqYjop+C8dQ1F+R3jEL3k+db8RVLYzULWgY/61WiPnE1WwlBahqvKJukLY4RG1kg d7N9xIDvdLFjzNbA/2YgTArUZk1kauYZRoCtXaLSxuttlLn+Mg1Nkjs7JYvt+efqFk9FI1 +j6O83hWd6Qk/PSEJICHGpi0b259jPd49J7tyJ9Iah5aqUTnoSermRQZVCHQRw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMY0b4gxkzX2Q for ; Fri, 22 May 2026 17:58:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 37579 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:58:07 +0000 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=B8rg?=rav Subject: git: 47e4571df158 - main - tftp: Fix handling of port name or number List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 47e4571df15804fe2b010a3c82b22691d80ee680 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:58:07 +0000 Message-Id: <6a10992f.37579.3f873412@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=47e4571df15804fe2b010a3c82b22691d80ee680 commit 47e4571df15804fe2b010a3c82b22691d80ee680 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:16 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 17:57:16 +0000 tftp: Fix handling of port name or number MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57105 --- usr.bin/tftp/main.c | 7 ++++--- usr.bin/tftp/tftp.c | 40 ++++++++++++++++++++++------------------ 2 files changed, 26 insertions(+), 21 deletions(-) diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index a26561eaa982..02a84f864071 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -331,6 +331,8 @@ setpeer0(char *host, const char *lport) } freeaddrinfo(res0); + free(port); + port = strdup(lport); } static void @@ -350,10 +352,9 @@ setpeer(int argc, char *argv[]) printf("usage: %s [host [port]]\n", argv[0]); return; } - if (argc == 3) { - port = argv[2]; + if (argc == 3) setpeer0(argv[1], argv[2]); - } else + else setpeer0(argv[1], NULL); } diff --git a/usr.bin/tftp/tftp.c b/usr.bin/tftp/tftp.c index 31a22f416135..e5c307a572fb 100644 --- a/usr.bin/tftp/tftp.c +++ b/usr.bin/tftp/tftp.c @@ -64,8 +64,9 @@ int xmitfile(int peer, char *port, int fd, char *name, char *mode) { struct tftphdr *rp; + struct servent *se; int n, i, ret = 0; - uint16_t block; + uint16_t block, portn; struct sockaddr_storage serv; /* valid server port number */ char recvbuffer[MAXPKTSIZE]; struct tftp_stats tftp_stats; @@ -75,14 +76,15 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) memset(&serv, 0, sizeof(serv)); rp = (struct tftphdr *)recvbuffer; - if (port == NULL) { - struct servent *se; - se = getservbyname("tftp", "udp"); - assert(se != NULL); - ((struct sockaddr_in *)&peer_sock)->sin_port = se->s_port; - } else - ((struct sockaddr_in *)&peer_sock)->sin_port = - htons(atoi(port)); + if ((se = getservbyname(port ? port : "tftp", "udp")) != NULL) + portn = se->s_port; + else + portn = htons(atoi(port)); + if (portn == 0) { + printf("Invalid port '%s'.\n", port ? port : "tftp"); + return -1; + } + ((struct sockaddr_in *)&peer_sock)->sin_port = portn; for (i = 0; i < 12; i++) { struct sockaddr_storage from; @@ -166,7 +168,8 @@ int recvfile(int peer, char *port, int fd, char *name, char *mode) { struct tftphdr *rp; - uint16_t block; + struct servent *se; + uint16_t block, portn; char recvbuffer[MAXPKTSIZE]; int n, i, ret = 0; struct tftp_stats tftp_stats; @@ -175,14 +178,15 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) rp = (struct tftphdr *)recvbuffer; - if (port == NULL) { - struct servent *se; - se = getservbyname("tftp", "udp"); - assert(se != NULL); - ((struct sockaddr_in *)&peer_sock)->sin_port = se->s_port; - } else - ((struct sockaddr_in *)&peer_sock)->sin_port = - htons(atoi(port)); + if ((se = getservbyname(port ? port : "tftp", "udp")) != NULL) + portn = se->s_port; + else + portn = htons(atoi(port)); + if (portn == 0) { + printf("Invalid port '%s'.\n", port ? port : "tftp"); + return (-1); + } + ((struct sockaddr_in *)&peer_sock)->sin_port = portn; for (i = 0; i < 12; i++) { struct sockaddr_storage from; From nobody Fri May 22 17:58:08 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMY0d3KYgz6fLvv for ; Fri, 22 May 2026 17:58: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMY0c64Klz4Mky for ; Fri, 22 May 2026 17:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K0dy9TYYhHlFdYVMydvALD7urkmcSFcbxXLE0rtKQgM=; b=GgJiO8fSuQpGAEEVOEkhFd2zPTEfV1J9ZKgjbexprYEwptXC+KIiACy+hCU10C1kkIgktY Pun5mggpivMJW/5KfR5dwDig0mkoD57nRYDhaWpxyYqBGGe3br7Nr6JddRkRzgPsr1ZSnb 32PtCuVJT0u6Qtb+SgqO6Ipd/FwUOp9frTrcstMirFeJbLbksy3f0nXlvNEZLcULLWeffG CxthMoeg6fM3V0eaxGx2qbHv+c0tRxsa6RNi62Oyk6VVdoK4mvG5xyuDJX7DI1VtQ9UuVT S37V27ci8zk76y2WFKxW60y7tPS8MWnpOJn/pF5UalW+hBAPR+UdO8g7zqMEkQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779472688; a=rsa-sha256; cv=none; b=aCqH81RImu+drtim8pP8AC8qBeGQ0CyVA0O7M9mziPLQSLpB55+CrsSvRTu36uH9Es7wAa 06cxolwdwYhE/aGSsnH2sr1bVNPF81uwPfRUF5Rsf585bgt1zTdmrwRGTkSy9/VvM7UX/a lzxiFwcw/uj5+OY9JcKF5Y8meRpxMXhivOoduYRkv6UlXTab0aAU/IWLBmWp8KDvLOUS3R ZzGiKHLrLlLczPcUP3kI174tTfRnXiB7H7A7oX1BF+fuhGMveAUNJN9tV0JJ1OUMx2K3z2 s2QsCVLLzavDnYP4bkVYuEi0x0/2JbuiAE8BEsdjvWEXxi5O98xLSiTw//e2QA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472688; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=K0dy9TYYhHlFdYVMydvALD7urkmcSFcbxXLE0rtKQgM=; b=Cc+y5TDB7OmMpf2MboYQuEHWyvwRY1Pk+QSk7N+UnhHbc2j0yIi6dRxX94yqFKz/NmCoal FXO4P61GRjy0bHoEDTjL0aRSNSKNCq1Smxtm7I6SneH1CVTzoiaTGk4Tj14tZlo5BWhTmG OKv4z/KQ/aHT+6E9Qf9uoUGHRuGpwZKd+Ri1lkDAi+N8w7NiGho6TXyHYMUzYSFiDVeZ9t 5FecLLERd3j5V6uits+revMO4xPQzD3J70mGL0vKoQmNY1SnSG8wSDB2Jpvz61TVLh8Yx4 FLR8EtwNbor4+PEwqnHfQ4v0Ou8JdyUpcw1nooNNoKBxsAypRJiBKAaJp8xW/A== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMY0c5Y7bzX28 for ; Fri, 22 May 2026 17:58:08 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3939a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:58:08 +0000 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=B8rg?=rav Subject: git: 5fd928cf1cef - main - tftp: Replace fgets with getline List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 5fd928cf1cef21e0fc20ab7c2be156a0eeecdf40 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:58:08 +0000 Message-Id: <6a109930.3939a.454d191e@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5fd928cf1cef21e0fc20ab7c2be156a0eeecdf40 commit 5fd928cf1cef21e0fc20ab7c2be156a0eeecdf40 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:20 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 17:57:20 +0000 tftp: Replace fgets with getline MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57072 --- usr.bin/tftp/main.c | 90 ++++++++++++++++++++++++++--------------------------- 1 file changed, 45 insertions(+), 45 deletions(-) diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index 02a84f864071..849069fa9e8e 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -62,7 +62,6 @@ #include "tftp-options.h" #include "tftp.h" -#define MAXLINE (2 * MAXPATHLEN) #define TIMEOUT 5 /* secs between rexmt's */ typedef struct sockaddr_storage peeraddr; @@ -72,7 +71,7 @@ static jmp_buf toplevel; static int txrx_error; static int peer; -#define MAX_MARGV 20 +#define MAX_MARGV 32 static int margc; static char *margv[MAX_MARGV]; @@ -106,7 +105,7 @@ static const char *command_prompt(void); static void urihandling(char *URI); static void getusage(char *); -static void makeargv(char *line); +static void makeargv(char *argv0, char *line); static void putusage(char *); static void settftpmode(const char *); @@ -338,13 +337,13 @@ setpeer0(char *host, const char *lport) static void setpeer(int argc, char *argv[]) { - char line[MAXLINE]; + static char *line; + static size_t sz; if (argc < 2) { - strcpy(line, "Connect "); printf("(to) "); - fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(line); + getline(&line, &sz, stdin); + makeargv(argv[0], line); argc = margc; argv = margv; } @@ -421,17 +420,16 @@ settftpmode(const char *newmode) static void put(int argc, char *argv[]) { - int fd; - int n; - char *cp, *targ, *path; - char line[MAXLINE]; + static char *line; + static size_t sz; + int fd, n; + char *cp, *targ, *path; struct stat sb; if (argc < 2) { - strcpy(line, "send "); printf("(file) "); - fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(line); + getline(&line, &sz, stdin); + makeargv(argv[0], line); argc = margc; argv = margv; } @@ -531,17 +529,15 @@ putusage(char *s) static void get(int argc, char *argv[]) { - int fd; - int n; - char *cp; - char *src; - char line[MAXLINE]; + static char *line; + static size_t sz; + int fd, n; + char *cp, *src; if (argc < 2) { - strcpy(line, "get "); printf("(files) "); - fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(line); + getline(&line, &sz, stdin); + makeargv(argv[0], line); argc = margc; argv = margv; } @@ -621,14 +617,14 @@ getusage(char *s) static void settimeoutpacket(int argc, char *argv[]) { + static char *line; + static size_t sz; int t; - char line[MAXLINE]; if (argc < 2) { - strcpy(line, "Packet timeout "); printf("(value) "); - fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(line); + getline(&line, &sz, stdin); + makeargv(argv[0], line); argc = margc; argv = margv; } @@ -648,14 +644,14 @@ settimeoutpacket(int argc, char *argv[]) static void settimeoutnetwork(int argc, char *argv[]) { + static char *line; + static size_t sz; int t; - char line[MAXLINE]; if (argc < 2) { - strcpy(line, "Network timeout "); printf("(value) "); - fgets(&line[strlen(line)], sizeof line - strlen(line), stdin); - makeargv(line); + getline(&line, &sz, stdin); + makeargv(argv[0], line); argc = margc; argv = margv; } @@ -731,23 +727,22 @@ command_prompt(void) static void command(bool interactive, EditLine *el, History *hist, HistEvent *hep) { + static char *line; + static size_t sz; const struct cmd *c; const char *bp; - char *cp; - int len, num; - char line[MAXLINE]; + int len; for (;;) { if (interactive) { - if ((bp = el_gets(el, &num)) == NULL || num == 0) + if ((bp = el_gets(el, &len)) == NULL || len == 0) exit(0); - len = MIN(MAXLINE, num); - memcpy(line, bp, len); - line[len - 1] = '\0'; - history(hist, hep, H_ENTER, bp); + if ((size_t)len >= sz) + line = realloc(line, sz = len + 1); + strlcpy(line, bp, sz); + history(hist, hep, H_ENTER, line); } else { - line[0] = 0; - if (fgets(line, sizeof line , stdin) == NULL) { + if ((len = getline(&line, &sz, stdin)) <= 0) { if (feof(stdin)) { exit(txrx_error); } else { @@ -755,11 +750,11 @@ command(bool interactive, EditLine *el, History *hist, HistEvent *hep) } } } - if ((cp = strchr(line, '\n'))) - *cp = '\0'; + if (line[len - 1] == '\n') + line[--len] = '\0'; if (line[0] == 0) continue; - makeargv(line); + makeargv(NULL, line); if (margc == 0) continue; c = getcmd(margv[0]); @@ -808,12 +803,16 @@ getcmd(const char *name) * Slice a string up into argc/argv. */ static void -makeargv(char *line) +makeargv(char *argv0, char *line) { char *cp; char **argp = margv; margc = 0; + if (argv0 != NULL) { + *argp++ = argv0; + margc++; + } if ((cp = strchr(line, '\n')) != NULL) *cp = '\0'; for (cp = line; margc < MAX_MARGV - 1 && *cp != '\0';) { @@ -822,13 +821,14 @@ makeargv(char *line) if (*cp == '\0') break; *argp++ = cp; - margc += 1; + margc++; while (*cp != '\0' && !isspace(*cp)) cp++; if (*cp == '\0') break; *cp++ = '\0'; } + /* XXX warn about truncation if *cp != '\0'? */ *argp++ = 0; } From nobody Fri May 22 17:58:09 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMY0f5m2pz6fLKM for ; Fri, 22 May 2026 17:58: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMY0d70RDz4Mqq for ; Fri, 22 May 2026 17:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KjNDTIpTBZ9LxZTAHT1qDYerkpCL8uyV5ZDfXn+8I9A=; b=Bq8gWij136Tx+drPw7HgV91PcRsdKBc+xCGVFpuuGMlHwtRCfS983teTGo5fPLMqLyOHvs FznjGwRPn8lVnYlUDeM7aw8M32CPPPpSQqBJNjWDhqVZpSFx4zfAFPIyEEdqqPfrMe7DtT 72w11bll/lyRsQbnuGZe4M/ENCAxNCL6vYuwo4dKD+t2sqlOr4VWfYhMvCwYHNg3r2MPOE HJjFHcA4rQe6Axlcah2HJS2SDSYqroWUtJTQccXbseE8NT41NJbU441TDZ9v2sTCNWcK9L Xu+EnEU7vDxbmAaKegV+QOHRvSs2TuAQ1szQkU78gqaO4SVWfyjpYK1b1hs6qQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779472690; a=rsa-sha256; cv=none; b=SIIROJWd0/qwH4WWoW266q42ZGUnkqlAlATpySK9NiKqcD6T7wR9NtdZW9zsrgO99aNvKa h0/gTfR5E67d2EYfkm8E0yPwO0TLaBcJ147muk3XG2NlFu4K+e2gBhbH03D/ZHirtAw8xX VhSpzpKh83RbMXrKNgLIbTXIgL3bR2MfK0nDJ7aeardZtMVrYmqsCExicxaQWU94pvXSG7 OTPRCFRFy2+8rucgItXcTAaIVwdNZHuC+FJPcP/E6seg6JNzGuM1G5y50FX4Kt5mnY5fro F9ZlHvWEsan975VCxZr81aiqrfUONDjW2s/8lqnKib75sCKIi5vIA934fL86Sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472690; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KjNDTIpTBZ9LxZTAHT1qDYerkpCL8uyV5ZDfXn+8I9A=; b=mhuUuDtMMSacsdJ15MzKyZTq7W7T/Vao+mRXG51bwiBY/yOu7wZCov3yd3ijsV+evBCoXb 7p/7Pstn0cwHy+JnvfO0PVZXIyoVTQCrEIrnRRCjtZJAPDCjnBfAfrFIQm7ZtCcEkOJo0n BVq6pPgoZYyAbW27gITbvzeQ/ktbPmzvM9AIR7Xpo1uFMzMri5UFZXu9FdKt8SOwkpL5ce /+v+AjaGcMi31QhxtPA/zcTVAAKuZy5b2v9bwJyrkU3wJNEORfeIOetcxtf24ZZVQJcwCU cyCv8YYZ1NKMUgNhVMGdH31x8GcAfmVzU7B1NbaKPYOHe41vHmRMPPLrwggGPA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMY0d6LwjzWHs for ; Fri, 22 May 2026 17:58:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39b62 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:58:09 +0000 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=B8rg?=rav Subject: git: 29aaaa5e6660 - main - tftp: Style cleanup List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 29aaaa5e6660310311fe443d8792b31181e1dd3c Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:58:09 +0000 Message-Id: <6a109931.39b62.62f8b7f8@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=29aaaa5e6660310311fe443d8792b31181e1dd3c commit 29aaaa5e6660310311fe443d8792b31181e1dd3c Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:23 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 17:57:23 +0000 tftp: Style cleanup MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57073 --- usr.bin/tftp/main.c | 56 +++++++++++++++++++---------------------------------- usr.bin/tftp/tftp.c | 40 +++++++++++++++++++------------------- 2 files changed, 40 insertions(+), 56 deletions(-) diff --git a/usr.bin/tftp/main.c b/usr.bin/tftp/main.c index 849069fa9e8e..3bfee5fc1346 100644 --- a/usr.bin/tftp/main.c +++ b/usr.bin/tftp/main.c @@ -76,7 +76,7 @@ static int margc; static char *margv[MAX_MARGV]; int verbose; -static char *port = NULL; +static char *port; static void get(int, char **); static void help(int, char **); @@ -100,14 +100,14 @@ static void setrollover(int, char **); static void setpacketdrop(int, char **); static void setwindowsize(int, char **); -static void command(bool, EditLine *, History *, HistEvent *) __dead2; +static void command(bool, EditLine *, History *, HistEvent *) __dead2; static const char *command_prompt(void); -static void urihandling(char *URI); -static void getusage(char *); -static void makeargv(char *argv0, char *line); -static void putusage(char *); -static void settftpmode(const char *); +static void urihandling(char *URI); +static void getusage(char *); +static void makeargv(char *argv0, char *line); +static void putusage(char *); +static void settftpmode(const char *); static char *tail(char *); static const struct cmd *getcmd(const char *); @@ -116,7 +116,7 @@ static const struct cmd *getcmd(const char *); struct cmd { const char *name; - void (*handler)(int, char **); + void (*handler)(int, char **); const char *help; }; @@ -224,13 +224,13 @@ main(int argc, char *argv[]) static void urihandling(char *URI) { - char meth[] = "get"; - char *host = NULL; - char *path = NULL; - char *opts = NULL; const char *tmode = "octet"; - char *s; - int i; + char meth[] = "get"; + char *host = NULL; + char *path = NULL; + char *opts = NULL; + char *s; + int i; host = URI + 7; @@ -271,8 +271,8 @@ static void setpeer0(char *host, const char *lport) { struct addrinfo hints, *res0, *res; - int error; const char *cause = "unknown"; + int error; if (connected) { close(peer); @@ -285,7 +285,7 @@ setpeer0(char *host, const char *lport) hints.ai_socktype = SOCK_DGRAM; hints.ai_protocol = IPPROTO_UDP; hints.ai_flags = AI_CANONNAME; - if (!lport) + if (lport == NULL) lport = "tftp"; error = getaddrinfo(host, lport, &hints, &res0); if (error) { @@ -347,7 +347,7 @@ setpeer(int argc, char *argv[]) argc = margc; argv = margv; } - if ((argc < 2) || (argc > 3)) { + if (argc < 2 || argc > 3) { printf("usage: %s [host [port]]\n", argv[0]); return; } @@ -393,21 +393,18 @@ modecmd(int argc, char *argv[]) static void setbinary(int argc __unused, char *argv[] __unused) { - settftpmode("octet"); } static void setascii(int argc __unused, char *argv[] __unused) { - settftpmode("netascii"); } static void settftpmode(const char *newmode) { - strlcpy(mode, newmode, sizeof(mode)); if (verbose) printf("mode set to %s\n", mode); @@ -422,9 +419,9 @@ put(int argc, char *argv[]) { static char *line; static size_t sz; - int fd, n; - char *cp, *targ, *path; struct stat sb; + char *cp, *targ, *path; + int fd, n; if (argc < 2) { printf("(file) "); @@ -517,7 +514,6 @@ put(int argc, char *argv[]) static void putusage(char *s) { - printf("usage: %s file [remotename]\n", s); printf(" %s file host:remotename\n", s); printf(" %s file1 file2 ... fileN [[host:]remote-directory]\n", s); @@ -531,8 +527,8 @@ get(int argc, char *argv[]) { static char *line; static size_t sz; - int fd, n; char *cp, *src; + int fd, n; if (argc < 2) { printf("(files) "); @@ -608,7 +604,6 @@ get(int argc, char *argv[]) static void getusage(char *s) { - printf("usage: %s file [localname]\n", s); printf(" %s [host:]file [localname]\n", s); printf(" %s [host1:]file1 [host2:]file2 ... [hostN:]fileN\n", s); @@ -671,7 +666,6 @@ settimeoutnetwork(int argc, char *argv[]) static void showstatus(int argc __unused, char *argv[] __unused) { - printf("Remote host: %s\n", connected ? hostname : "none specified yet"); printf("RFC2347 Options support: %s\n", @@ -692,7 +686,6 @@ showstatus(int argc __unused, char *argv[] __unused) static void intr(int dummy __unused) { - signal(SIGALRM, SIG_IGN); alarm(0); longjmp(toplevel, -1); @@ -717,7 +710,6 @@ tail(char *filename) static const char * command_prompt(void) { - return ("tftp> "); } @@ -835,7 +827,6 @@ makeargv(char *argv0, char *line) static void quit(int argc __unused, char *argv[] __unused) { - exit(txrx_error); } @@ -873,7 +864,6 @@ help(int argc, char *argv[]) static void setverbose(int argc __unused, char *argv[] __unused) { - verbose = !verbose; printf("Verbose mode %s.\n", verbose ? "on" : "off"); } @@ -881,7 +871,6 @@ setverbose(int argc __unused, char *argv[] __unused) static void setoptions(int argc, char *argv[]) { - if (argc == 2) { if (strcasecmp(argv[1], "enable") == 0 || strcasecmp(argv[1], "on") == 0) { @@ -911,7 +900,6 @@ setoptions(int argc, char *argv[]) static void setrollover(int argc, char *argv[]) { - if (argc == 2) { if (strcasecmp(argv[1], "never") == 0 || strcasecmp(argv[1], "none") == 0) { @@ -962,7 +950,6 @@ setdebug(int argc, char *argv[]) static void setblocksize(int argc, char *argv[]) { - if (!options_rfc_enabled) printf("RFC2347 style options are not enabled " "(but proceeding anyway)\n"); @@ -998,7 +985,6 @@ setblocksize(int argc, char *argv[]) static void setblocksize2(int argc, char *argv[]) { - if (!options_rfc_enabled || !options_extra_enabled) printf( "RFC2347 style or non-RFC defined options are not enabled " @@ -1054,7 +1040,6 @@ setblocksize2(int argc, char *argv[]) static void setpacketdrop(int argc, char *argv[]) { - if (argc != 1) packetdroppercentage = atoi(argv[1]); @@ -1065,7 +1050,6 @@ setpacketdrop(int argc, char *argv[]) static void setwindowsize(int argc, char *argv[]) { - if (!options_rfc_enabled) printf("RFC2347 style options are not enabled " "(but proceeding anyway)\n"); diff --git a/usr.bin/tftp/tftp.c b/usr.bin/tftp/tftp.c index e5c307a572fb..63d4a882e5c8 100644 --- a/usr.bin/tftp/tftp.c +++ b/usr.bin/tftp/tftp.c @@ -63,13 +63,13 @@ int xmitfile(int peer, char *port, int fd, char *name, char *mode) { + char recvbuffer[MAXPKTSIZE]; + struct sockaddr_storage serv; /* valid server port number */ + struct tftp_stats tftp_stats; struct tftphdr *rp; struct servent *se; int n, i, ret = 0; uint16_t block, portn; - struct sockaddr_storage serv; /* valid server port number */ - char recvbuffer[MAXPKTSIZE]; - struct tftp_stats tftp_stats; stats_init(&tftp_stats); @@ -82,7 +82,7 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) portn = htons(atoi(port)); if (portn == 0) { printf("Invalid port '%s'.\n", port ? port : "tftp"); - return -1; + return (-1); } ((struct sockaddr_in *)&peer_sock)->sin_port = portn; @@ -96,7 +96,7 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) n = send_wrq(peer, name, mode); if (n > 0) { printf("Cannot send WRQ packet\n"); - return -1; + return (-1); } /* @@ -125,11 +125,11 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) } if (i == 12) { printf("Transfer timed out.\n"); - return -1; + return (-1); } if (rp->th_opcode == ERROR) { printf("Got ERROR, aborted\n"); - return -1; + return (-1); } /* @@ -140,7 +140,7 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) if (!options_rfc_enabled) { printf("Got OACK while options are not enabled!\n"); send_error(peer, EBADOP); - return -1; + return (-1); } parse_options(peer, rp->th_stuff, n + 2); @@ -148,7 +148,7 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) if (read_init(fd, NULL, mode) < 0) { warn("read_init()"); - return -1; + return (-1); } block = 1; @@ -158,7 +158,7 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) read_close(); if (tftp_stats.amount > 0) printstats("Sent", verbose, &tftp_stats); - return ret; + return (ret); } /* @@ -167,12 +167,12 @@ xmitfile(int peer, char *port, int fd, char *name, char *mode) int recvfile(int peer, char *port, int fd, char *name, char *mode) { + char recvbuffer[MAXPKTSIZE]; + struct tftp_stats tftp_stats; struct tftphdr *rp; struct servent *se; - uint16_t block, portn; - char recvbuffer[MAXPKTSIZE]; int n, i, ret = 0; - struct tftp_stats tftp_stats; + uint16_t block, portn; stats_init(&tftp_stats); @@ -198,7 +198,7 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) n = send_rrq(peer, name, mode); if (n > 0) { printf("Cannot send RRQ packet\n"); - return -1; + return (-1); } /* @@ -227,16 +227,16 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) } if (i == 12) { printf("Transfer timed out.\n"); - return -1; + return (-1); } if (rp->th_opcode == ERROR) { tftp_log(LOG_ERR, "Error code %d: %s", rp->th_code, rp->th_msg); - return -1; + return (-1); } if (write_init(fd, NULL, mode) < 0) { warn("write_init"); - return -1; + return (-1); } /* @@ -247,7 +247,7 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) if (!options_rfc_enabled) { printf("Got OACK while options are not enabled!\n"); send_error(peer, EBADOP); - return -1; + return (-1); } parse_options(peer, rp->th_stuff, n + 2); @@ -255,7 +255,7 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) n = send_ack(peer, 0); if (n > 0) { printf("Cannot send ACK on OACK.\n"); - return -1; + return (-1); } block = 0; if (tftp_receive(peer, &block, &tftp_stats, NULL, 0) != 0) @@ -268,5 +268,5 @@ recvfile(int peer, char *port, int fd, char *name, char *mode) if (tftp_stats.amount > 0) printstats("Received", verbose, &tftp_stats); - return ret; + return (ret); } From nobody Fri May 22 17:58:11 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMY0g2hgJz6fLnT for ; Fri, 22 May 2026 17:58: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMY0g0ZnGz4MtR for ; Fri, 22 May 2026 17:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=if+PIIYL09yfHnjYdgT77yQiPd45X5fFB7PfwYg0B8Y=; b=QuI3z7BYQRn/nUEDnAhIw6tPynU37+vxdcY0tjouw3ItyoCk2tLSMmEzmnFIT7V8pxfq1o spvMpHrBTPaewIl01LrA7xqJPKwsVsr4beTvAGqJHApHvrMejrM+Kp1PTppVpYVvgI0W8p zxgdsMNMc/QYTzwnQeKBUP4quQQurXaGGejAvLXIeU2Pk0r+o9j6HKpPoO/fBHhGWfrsSM bFp/oNOM3cxYJtEaDlYAmeYCy2pNlQzxOsqrnBV8gcVL/R2cMcDLAMELs2lf9RIoHx1yUf jf8zT0pa2ciddZ5D5mlGGdxnjf4j9Hsmd3y1Re2nLs9uZXjLbImswFIPjbL3vQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779472691; a=rsa-sha256; cv=none; b=geBy00CamjktvW4ZpYFGL4IQXJ/m0kJXe1aYM8fyJmQlfezfjKK0gE0xb8TymkzV9kepUJ 6B1X1m/4S+0YH31YX3MMO2e26PL9W0PUQ2RrGS1DMHdJw4FDTsv2ulQ8G1qbbSdCIGEVlw MOUdyS44pEOUplbsXtUReM4qamUwvWOvQFUE2yqzeVNkRcBnEf+Gg2G71EHVbBMgbT/L8p CAbacRbAl1LB/qR65LIunFW0csMv+HqcNhN/W0Nhk3jr/zQkq9M5/FL2HgGgfR9eoyVeac 3Hk4LnqNLdIbes9N6Eie1nLCqlby08uVZDsdL1RsTqmHXQFzAbTQMkEeDpeAGw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472691; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=if+PIIYL09yfHnjYdgT77yQiPd45X5fFB7PfwYg0B8Y=; b=UNu/soWCYEY+SOnOcFFGW3+HWW85u/96GIeKj8ElPf1vyy3Y7BDvw3WPdkVgh8YWyRXhgt +BauuPtHXmqD0c0p2jFI48O4Jm56bI+jMUgfrbcu4S3Mu3uSGlpkVERGfOoopwYq0M3xZK 5ehwl5D3dj1ExWtK3zJVOvwkXi4wosj9k3X8MFunF0SA67+KTSrNBDYs2OHcxHPCUELwXl ErgIhHa6I3elZJt6hsQVO1C5GeKuo7++m/bBu5GI8Zt9IWrYiUlZiOobTOzd18UEUQczE9 ro+03xaDyoczZV1QU26OA4z7L0sekLUsnEBSkk1EMXhQjsbbERZAK6MvZreU/w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMY0g065XzWqG for ; Fri, 22 May 2026 17:58:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3948e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:58:11 +0000 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=B8rg?=rav Subject: git: b94689d036c5 - main - tftp: Add test case with over-long URL List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: b94689d036c5f5bdc04d080ff7dd5d0e9df9b8d4 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:58:11 +0000 Message-Id: <6a109933.3948e.12359126@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=b94689d036c5f5bdc04d080ff7dd5d0e9df9b8d4 commit b94689d036c5f5bdc04d080ff7dd5d0e9df9b8d4 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:27 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 17:57:27 +0000 tftp: Add test case with over-long URL This adds a test case that passes a very long URL on the command line, which would previously have resulted in a benign buffer overflow in urihandling(), detectable only by compiling tftp with ASAN enabled. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57074 --- usr.bin/tftp/tests/tftp_test.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/usr.bin/tftp/tests/tftp_test.sh b/usr.bin/tftp/tests/tftp_test.sh index a4c9f3b898e7..12c008b2c78c 100644 --- a/usr.bin/tftp/tests/tftp_test.sh +++ b/usr.bin/tftp/tests/tftp_test.sh @@ -442,6 +442,29 @@ tftp_url_ipv6_cleanup() { stop_tftpd } +atf_test_case tftp_url_long cleanup +tftp_url_long_head() { + atf_set "descr" "Very long URL" + atf_set "require.user" "root" +} +tftp_url_long_body() { + start_tftpd + mkdir "${tftp_dir}/subdirectory" + local remote_file="${tftp_dir}/hello.txt" + echo "Hello, $$!" >"${remote_file}" + local local_file="${remote_file##*/}" + local d="subdirectory/../" + d="${d}${d}${d}${d}${d}${d}${d}${d}" + d="${d}${d}${d}${d}${d}${d}${d}${d}" + d="${d}${d}${d}${d}${d}${d}${d}${d}" + atf_check -s exit:1 -o match:"Illegal TFTP operation" \ + tftp "tftp://localhost/${d}${remote_file##*/}" + atf_check -s exit:1 test -f "${local_file}" +} +tftp_url_long_cleanup() { + stop_tftpd +} + atf_init_test_cases() { atf_add_test_case tftp_get_big atf_add_test_case tftp_get_host @@ -462,4 +485,5 @@ atf_init_test_cases() { atf_add_test_case tftp_url_host atf_add_test_case tftp_url_ipv4 atf_add_test_case tftp_url_ipv6 + atf_add_test_case tftp_url_long } From nobody Fri May 22 17:58:12 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMY0h3vKZz6fLyQ for ; Fri, 22 May 2026 17:58: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMY0h1P6Lz4N5w for ; Fri, 22 May 2026 17:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CFMfDy87DaRPRsmnERMCtT3mNg55CoOxu0BiEMgJXZs=; b=vn9i7+FFEks/BBIS8s0wvPfeGI/8vakfURNpz/l/iu7gsuGDjrVYBux7uW3nqXTUaS5e1x KEthkTtL69IZcCaofKt0igg99FnX2FQFBK4W11nsAQb7k+cC7a4EL+N2IcxgEiGRay7WZh CtXO91ziwl4GZJ6OegyVawJUQoysyvgsKq7zPr+SGtb7F+cEVvAiKGAeQKF4iSgYYhJUyW JjuUhf+9rCQPGRqQslszk45ygm1hmAHRff/E4HXH6Cl1Klaz6oXXhPWM2jj5L39iUgEudT Awb/n5NPaLIRtDER6UAmQFB0SCGL8BS8UKFF/ckJQ+tjANAOlXGZwIkHRq585g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779472692; a=rsa-sha256; cv=none; b=ffvV9QzdEdTjd8uyRmsBec+3HMoRkFyJCAKqRdGtH3UNFrxB3+Mp+jVufEmZYa16za+alk Za1tWiRhye5Z/8BvIYugONX6BstRQW/0h3En43D/VwUMNhE9KC3007DXikI4KtKyh3d4qQ 0uTRu67CS/uCwSc8XAwrHrX2KK7Qkz0IKbILlaBEAk5u43LsarThaW4PO1ajmOcs2eQT6c lUBWfIMsHX3kTIbdeXJQm5jPOz5HrEQGLWpNE6GW9GGi6wdCF82f2EWShPcwQ6DJzfLn6e PU2+idrieB7crd7Wo4kEqTpkRi6JrjmyBgG8iwg8xD36vPX3VfeB0ituDJW1MA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472692; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CFMfDy87DaRPRsmnERMCtT3mNg55CoOxu0BiEMgJXZs=; b=t7n5JQKlxQnGmtbKiirfTKe19kD8+eubt2UyyqQ6/JoX6Xrww0wRP19Rl42dMpEgJwlH4o hBEIoP9rfqMz22wY+AkLDi4Y0Ia+mnQ2qQUlDFlfu1642lmYaRl5uwdtVPtPNMtajilOZ4 yJsPVN5a/6UJ1shpvggJzYAN+Q4gEIo5EZbgT3cyw624avok1byOdJv5t6mmytNdC7Vrtk acm6CXYiEjxF/nw+R31VcV7A8R8PvFJTiCT7CIwZQ2V/62KYkz/wUA001cW81rrIBezN74 2pubFvts9Ig4ptE9QIHfOEqsFrN6tTjwex4zzaGeaqFVydYStqr8BUb0hKtHCw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMY0h0yd6zX2D for ; Fri, 22 May 2026 17:58:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 39235 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:58:12 +0000 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=B8rg?=rav Subject: git: 933893771344 - main - tftpd: Add missing bounds checks List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 933893771344e1647eeda152016b938fdc30ccdc Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:58:12 +0000 Message-Id: <6a109934.39235.25ca255c@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=933893771344e1647eeda152016b938fdc30ccdc commit 933893771344e1647eeda152016b938fdc30ccdc Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:31 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 17:57:31 +0000 tftpd: Add missing bounds checks In send_[rw]rq(), we were using strlcpy() to avoid overflowing our packet buffer, then failing to check the result and blithely advancing our pointer by the full length. Luckily, this code is only ever used by tftp(1), not tftpd(8). MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57075 --- libexec/tftpd/tftp-io.c | 62 +++++++++++++++++++++++++++---------------------- 1 file changed, 34 insertions(+), 28 deletions(-) diff --git a/libexec/tftpd/tftp-io.c b/libexec/tftpd/tftp-io.c index 50102e652d2f..3384071d6df2 100644 --- a/libexec/tftpd/tftp-io.c +++ b/libexec/tftpd/tftp-io.c @@ -173,11 +173,11 @@ send_error(int peer, int error) int send_wrq(int peer, char *filename, char *mode) { - int n; + char buf[MAXPKTSIZE]; struct tftphdr *tp; char *bp; - char buf[MAXPKTSIZE]; - int size; + size_t len; + int n, size; if (debug & DEBUG_PACKETS) tftp_log(LOG_DEBUG, "Sending WRQ: filename: '%s', mode '%s'", @@ -191,17 +191,17 @@ send_wrq(int peer, char *filename, char *mode) size = offsetof(struct tftphdr, th_stuff); bp = tp->th_stuff; - strlcpy(bp, filename, sizeof(buf) - size); - bp += strlen(filename); - *bp = 0; - bp++; - size += strlen(filename) + 1; - - strlcpy(bp, mode, sizeof(buf) - size); - bp += strlen(mode); - *bp = 0; - bp++; - size += strlen(mode) + 1; + len = strlcpy(bp, filename, sizeof(buf) - size); + if (len >= sizeof(buf) - size) + goto overflow; + bp += len + 1; + size += len + 1; + + len = strlcpy(bp, mode, sizeof(buf) - size); + if (len >= sizeof(buf) - size) + goto overflow; + bp += len + 1; + size += len + 1; if (options_rfc_enabled) size += make_options(peer, bp, sizeof(buf) - size); @@ -213,6 +213,9 @@ send_wrq(int peer, char *filename, char *mode) return (1); } return (0); +overflow: + tftp_log(LOG_ERR, "%s: file name too long", __func__); + return (1); } /* @@ -221,11 +224,11 @@ send_wrq(int peer, char *filename, char *mode) int send_rrq(int peer, char *filename, char *mode) { - int n; + char buf[MAXPKTSIZE]; struct tftphdr *tp; char *bp; - char buf[MAXPKTSIZE]; - int size; + size_t len; + int n, size; if (debug & DEBUG_PACKETS) tftp_log(LOG_DEBUG, "Sending RRQ: filename: '%s', mode '%s'", @@ -239,17 +242,17 @@ send_rrq(int peer, char *filename, char *mode) size = offsetof(struct tftphdr, th_stuff); bp = tp->th_stuff; - strlcpy(bp, filename, sizeof(buf) - size); - bp += strlen(filename); - *bp = 0; - bp++; - size += strlen(filename) + 1; - - strlcpy(bp, mode, sizeof(buf) - size); - bp += strlen(mode); - *bp = 0; - bp++; - size += strlen(mode) + 1; + len = strlcpy(bp, filename, sizeof(buf) - size); + if (len >= sizeof(buf) - size) + goto overflow; + bp += len + 1; + size += len + 1; + + len = strlcpy(bp, mode, sizeof(buf) - size); + if (len >= sizeof(buf) - size) + goto overflow; + bp += len + 1; + size += len + 1; if (options_rfc_enabled) { options_set_request(OPT_TSIZE, "0"); @@ -263,6 +266,9 @@ send_rrq(int peer, char *filename, char *mode) return (1); } return (0); +overflow: + tftp_log(LOG_ERR, "%s: file name too long", __func__); + return (1); } /* From nobody Fri May 22 17:58:13 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMY0j57sFz6fLyS for ; Fri, 22 May 2026 17: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMY0j2GwMz4NFQ for ; Fri, 22 May 2026 17: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=1779472693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hw42YQHquJaO9kT9hkAf+DFJi8/BgkTQ5A9K4oEEhIg=; b=oi7rrXh7Q8EomGmxoQkt5qNf/Vy/E9PW/YtfQdFMYIporHEhNE90dkSs+Sp2Hy6mMDinQz NwfPi3yc5Ef8ug9X4ut1n6Qiiu/AYVlDwczlNLH3/4wuQAhfmoMvfJDTFjA1uaFQ3mme7s HjJpbQZZ2eW0qcp7AJVjHc1RJ2ufhZwDX1txjCszqJDEL9ujLCosc30RYRnSk5oB43We1f ARUHytSiIQlxQbIGh533eOgE26uT6yiPq9U/dYRo+FftPYSjQYcE23xvPCe3j9z+D/2TXy Ohj9LDoqjzDkV6Gsx5oBMLkRqqhvQBN0pmA8rTxLfN3Zl0xcSzsMNH4XP950nQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779472693; a=rsa-sha256; cv=none; b=gRmCCNBahSZABs+r2NOu+jOdfbFD+SX1wMPu/LQmo6E8tlnS5QsZmOR7WjpAK1QnSoHz6M SQhyso/mAub7kEXkPymPAw9dzHBHey1XsrV+EtIXmaqP2gAWPdNnM0PeamAZlyaeeZh7kp qeW6LwYd2ellm+y5FIvcIm8cZQRPA28ykP5bmCLjaZs8soZOuK7yD+DGvLk6CG7RFqw/Ii 67KCSCcRzdFSPzrS9I5YP/jA7U7jlI+GbrbSSlNnZ0OaWOW9uHIgl6HAR6ZX/9/KeSlLXj 6ko35VXhAcPRMqIzs1OzrE/WeNEh8C+fRRkWrqtMELlkMK41oayYqvRof6anRQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779472693; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=hw42YQHquJaO9kT9hkAf+DFJi8/BgkTQ5A9K4oEEhIg=; b=GU8Hj3YEUk9iP0SIhhwbuF4SGEp5y8O3hiNpeEpjAHhM4wrTCzkyW2+LHvSLXnJuyh0Mjc EwrJdWl5QGRKeyI+UYQOghFPUhymesaCANVB0ZyJyHwOOZ2x9kkzU8s7I+Ty/JDeysNK1R uA61yF5kWk15jDFf+PNG5tRA8aEL2P10Csgj87g1lN41WIkB7SANXsHGyso4sRqwu/sju4 nr8svuWKJPe966F4oILSCyUQmZ0Xif0UtGdRudq9l5LG53RwjtHs7WH2lZVMyLDDTWZHLt LFqd+QgeVc1fqzGGSUIk8XSGLr2dZLOC+zo20aqkawk/ySgIQsmWf17n1egODQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMY0j1c0jzXTd for ; Fri, 22 May 2026 17:58:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 395b1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 17:58:13 +0000 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=B8rg?=rav Subject: git: 76c3387024b4 - main - tftpd: Simplify packet drop macro List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 76c3387024b40c2e28ed2d1bb64b3a14371c3c0b Auto-Submitted: auto-generated Date: Fri, 22 May 2026 17:58:13 +0000 Message-Id: <6a109935.395b1.372b3ce8@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=76c3387024b40c2e28ed2d1bb64b3a14371c3c0b commit 76c3387024b40c2e28ed2d1bb64b3a14371c3c0b Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 17:57:35 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 17:57:35 +0000 tftpd: Simplify packet drop macro The first argument is always the function name, for which we can simply use __func__. This leaves only the optional return value, so we can use a single variadic macro instead of two nearly-identical copies. MFC after: 1 week Reviewed by: markj Differential Revision: https://reviews.freebsd.org/D57076 --- libexec/tftpd/tftp-io.c | 51 ++++++++++++++++++++++--------------------------- 1 file changed, 23 insertions(+), 28 deletions(-) diff --git a/libexec/tftpd/tftp-io.c b/libexec/tftpd/tftp-io.c index 3384071d6df2..3697c13f358f 100644 --- a/libexec/tftpd/tftp-io.c +++ b/libexec/tftpd/tftp-io.c @@ -69,17 +69,12 @@ static struct errmsg { { -1, NULL } }; -#define DROPPACKET(s) \ +#define DROPPACKET(...) \ if (packetdroppercentage != 0 && \ - arc4random()%100 < packetdroppercentage) { \ - tftp_log(LOG_DEBUG, "Artificial packet drop in %s", s); \ - return; \ - } -#define DROPPACKETn(s,n) \ - if (packetdroppercentage != 0 && \ - arc4random()%100 < packetdroppercentage) { \ - tftp_log(LOG_DEBUG, "Artificial packet drop in %s", s); \ - return (n); \ + arc4random() % 100 < packetdroppercentage) { \ + tftp_log(LOG_DEBUG, "Artificial packet drop in %s", \ + __func__); \ + return __VA_ARGS__; \ } const char * @@ -104,7 +99,7 @@ send_packet(int peer, uint16_t block, char *pkt, int size) int t = 1; for (i = 0; i < 12 ; i++) { - DROPPACKETn("send_packet", 0); + DROPPACKET(0); if (sendto(peer, pkt, size, 0, (struct sockaddr *)&peer_sock, peer_sock.ss_len) == size) { @@ -144,7 +139,7 @@ send_error(int peer, int error) if (debug & DEBUG_PACKETS) tftp_log(LOG_DEBUG, "Sending ERROR %d", error); - DROPPACKET("send_error"); + DROPPACKET(); tp = (struct tftphdr *)buf; tp->th_opcode = htons((u_short)ERROR); @@ -179,12 +174,12 @@ send_wrq(int peer, char *filename, char *mode) size_t len; int n, size; - if (debug & DEBUG_PACKETS) + if (debug & DEBUG_PACKETS) { tftp_log(LOG_DEBUG, "Sending WRQ: filename: '%s', mode '%s'", - filename, mode - ); + filename, mode); + } - DROPPACKETn("send_wrq", 0); + DROPPACKET(0); tp = (struct tftphdr *)buf; tp->th_opcode = htons((u_short)WRQ); @@ -209,7 +204,7 @@ send_wrq(int peer, char *filename, char *mode) n = sendto(peer, buf, size, 0, (struct sockaddr *)&peer_sock, peer_sock.ss_len); if (n != size) { - tftp_log(LOG_ERR, "send_wrq: %s", strerror(errno)); + tftp_log(LOG_ERR, "%s: %m", __func__); return (1); } return (0); @@ -230,12 +225,12 @@ send_rrq(int peer, char *filename, char *mode) size_t len; int n, size; - if (debug & DEBUG_PACKETS) + if (debug & DEBUG_PACKETS) { tftp_log(LOG_DEBUG, "Sending RRQ: filename: '%s', mode '%s'", - filename, mode - ); + filename, mode); + } - DROPPACKETn("send_rrq", 0); + DROPPACKET(0); tp = (struct tftphdr *)buf; tp->th_opcode = htons((u_short)RRQ); @@ -262,7 +257,7 @@ send_rrq(int peer, char *filename, char *mode) n = sendto(peer, buf, size, 0, (struct sockaddr *)&peer_sock, peer_sock.ss_len); if (n != size) { - tftp_log(LOG_ERR, "send_rrq: %d %s", n, strerror(errno)); + tftp_log(LOG_ERR, "%s: %m", __func__); return (1); } return (0); @@ -285,7 +280,7 @@ send_oack(int peer) if (debug & DEBUG_PACKETS) tftp_log(LOG_DEBUG, "Sending OACK"); - DROPPACKETn("send_oack", 0); + DROPPACKET(0); /* * Send back an options acknowledgement (only the ones with @@ -299,8 +294,8 @@ send_oack(int peer) if (options[i].o_reply != NULL) { n = snprintf(bp, size, "%s%c%s", options[i].o_type, 0, options[i].o_reply); - bp += n+1; - size -= n+1; + bp += n + 1; + size -= n + 1; if (size < 0) { tftp_log(LOG_ERR, "oack: buffer overflow"); exit(1); @@ -331,7 +326,7 @@ send_ack(int fp, uint16_t block) if (debug & DEBUG_PACKETS) tftp_log(LOG_DEBUG, "Sending ACK for block %d", block); - DROPPACKETn("send_ack", 0); + DROPPACKET(0); tp = (struct tftphdr *)buf; tp->th_opcode = htons((u_short)ACK); @@ -361,7 +356,7 @@ send_data(int peer, uint16_t block, char *data, int size) tftp_log(LOG_DEBUG, "Sending DATA packet %d of %d bytes", block, size); - DROPPACKETn("send_data", 0); + DROPPACKET(0); pkt = (struct tftphdr *)buf; @@ -408,7 +403,7 @@ receive_packet(int peer, char *data, int size, struct sockaddr_storage *from, fromlen = sizeof(*pfrom); n = recvfrom(peer, data, size, 0, (struct sockaddr *)pfrom, &fromlen); - DROPPACKETn("receive_packet", RP_TIMEOUT); + DROPPACKET(RP_TIMEOUT); if (n < 0) { /* No idea what could have happened if it isn't a timeout */ From nobody Fri May 22 18:13:35 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMYLS0r97z6fN0X for ; Fri, 22 May 2026 18:13: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMYLS0195z3DcW for ; Fri, 22 May 2026 18:13:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779473616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2xvacCR18bZLSEWH7JyVIVLBNCS8rYfU36pM2dZWDhA=; b=gqdxKe/8m8ihQx0vNjRMAfCoe4qFK0C/zBrZDzRXSX3miYqrmxr9mPQzW66+R1IA2hiBkT eJNsumuUZWq9icpS6AXptTAUOldRoAo/+/gwgNWUEJS6J/BMqppGrCKuJ/o3IeqjmtA3xx 7e+Bk3gkGo+A/fupaXDy7oVXjzPO5OAXB3u3Nt+BmBfFpItjyq9dzr1J2PEk1Hz4no9iyJ h19yeE5EW+YmF1tk4cAUosgdKkyY4SPoTEllqvKIoTfAa9ZE/0u6SDLN760LzJpLm9dmrS 1DWD8F1wZwUj6cI7D01vk48+lie/dch4/JrMe25kDzR8D8zGRUgwPChfcEdKSQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779473616; a=rsa-sha256; cv=none; b=ZyJ8Me97/XhLr5bPPTwkFcHB1//ZL21qN1sFTi8QVSiXwXmNm1pp6kiccp+x56GezDSy5R 0i6Arrze4z2i26PNwaICcGQixHHcpgEmDeXHbdaa+7/e3UtlcMDirQjMxHgwCXUhUObkfI JrT6d8+YD0VV/43kXjEvzB4viTExCj7pEkdiv45qvI6Vq41htGLttTOb88qC4r1C5uA0lU NYOs4bDvFIcAjMrSqgvKo7/Dig2k34NXupYv6forK8TBF0YncAetI5vsOBPJ8pn+P3nkw5 e5QR37itZ0LOKzwMyCmYsTkH1o9ZyQmi3xUDHAVcWBx5XgFzd6mzVMcFTBky1A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779473616; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=2xvacCR18bZLSEWH7JyVIVLBNCS8rYfU36pM2dZWDhA=; b=yU1v9DdvA4OPzen57XOhSII5uQY5THiiLHYhVPl8PbrM5qpl5mXRXifjbHNVSnpQu8wiQJ 1+P0vSud/k5n5EAumTaBST4No2mzdXqIkgx8B8yWy9nlDJagJuSrc7INwob/ZR8UgvkDqn kD5vYWyCrrS4MFo7XAec/uHFqKgDc9XsPr/PZikwJ1kI8F7MhUbXqWN56vMsSMCIgMdEt5 g5PWPBdwwcq4FmQZNz6hmZRQw5anlpTLB0WrO35C6v9O/XNaSIAjjIhLNMGh1tRCbKPHgp 2Esd7BTG42qj58RI4qRWL4ELnu3JJq/+cnq8NYgnSkiSiMSW3mzRJ8zr1OwKrg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMYLR6g2QzY4s for ; Fri, 22 May 2026 18:13:35 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b790 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 18:13:35 +0000 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=B8rg?=rav Subject: git: 70739f3499b0 - main - ldns: Regenerate configuration after update List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 70739f3499b03cfff6bdd985db0d81cde76be15a Auto-Submitted: auto-generated Date: Fri, 22 May 2026 18:13:35 +0000 Message-Id: <6a109ccf.3b790.4b7573c8@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=70739f3499b03cfff6bdd985db0d81cde76be15a commit 70739f3499b03cfff6bdd985db0d81cde76be15a Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 18:12:26 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 18:12:26 +0000 ldns: Regenerate configuration after update MFC after: 1 week Fixes: d44c9549ef31 ("ldns: Update to 1.8.4") Fixes: 9ed998a81bab ("ldns: Update to 1.9.0") --- contrib/ldns/ldns/config.h | 47 +++++++++++++++++++++++++++++++++++++--------- contrib/ldns/ldns/net.h | 3 +-- contrib/ldns/ldns/util.h | 26 +++++++++++++++++++++++-- 3 files changed, 63 insertions(+), 13 deletions(-) diff --git a/contrib/ldns/ldns/config.h b/contrib/ldns/ldns/config.h index 0fe9f2c3dbce..c8a1a4291a57 100644 --- a/contrib/ldns/ldns/config.h +++ b/contrib/ldns/ldns/config.h @@ -7,6 +7,9 @@ /* Define to 1 if you have the header file. */ #define HAVE_ARPA_INET_H 1 +/* Define to 1 if you have the `asctime_r' function. */ +#define HAVE_ASCTIME_R 1 + /* Whether the C compiler accepts the "format" attribute */ #define HAVE_ATTR_FORMAT 1 @@ -53,6 +56,14 @@ you don't. */ #define HAVE_DECL_EVP_PKEY_BASE_ID 1 +/* Define to 1 if you have the declaration of `inet_ntop', and to 0 if you + don't. */ +#define HAVE_DECL_INET_NTOP 1 + +/* Define to 1 if you have the declaration of `inet_pton', and to 0 if you + don't. */ +#define HAVE_DECL_INET_PTON 1 + /* Define to 1 if you have the declaration of `NID_ED25519', and to 0 if you don't. */ #define HAVE_DECL_NID_ED25519 1 @@ -297,6 +308,9 @@ /* Define if you have SWIG libraries and header files. */ /* #undef HAVE_SWIG */ +/* Define to 1 if you have the `symlink' function. */ +#define HAVE_SYMLINK 1 + /* Define to 1 if you have the header file. */ #define HAVE_SYS_MOUNT_H 1 @@ -358,13 +372,13 @@ #define LT_OBJDIR ".libs/" /* Define to the address where bug reports for this package should be sent. */ -#define PACKAGE_BUGREPORT "libdns@nlnetlabs.nl" +#define PACKAGE_BUGREPORT "dns-team@nlnetlabs.nl" /* Define to the full name of this package. */ #define PACKAGE_NAME "ldns" /* Define to the full name and version of this package. */ -#define PACKAGE_STRING "ldns 1.8.3" +#define PACKAGE_STRING "ldns 1.9.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "libdns" @@ -373,23 +387,35 @@ #define PACKAGE_URL "" /* Define to the version of this package. */ -#define PACKAGE_VERSION "1.8.3" +#define PACKAGE_VERSION "1.9.0" /* Define this to enable RR type AMTRELAY. */ -/* #undef RRTYPE_AMTRELAY */ +#define RRTYPE_AMTRELAY /**/ /* Define this to enable RR type AVC. */ /* #undef RRTYPE_AVC */ +/* Define this to enable RR types CLA and IPN. */ +/* #undef RRTYPE_CLA_IPN */ + /* Define this to enable RR type DOA. */ /* #undef RRTYPE_DOA */ +/* Define this to enable RR type DSYNC. */ +#define RRTYPE_DSYNC /**/ + +/* Define this to enable RR types HHIT and BRID. */ +/* #undef RRTYPE_HHIT_BRID */ + /* Define this to enable RR type NINFO. */ /* #undef RRTYPE_NINFO */ /* Define this to enable RR type OPENPGPKEY. */ #define RRTYPE_OPENPGPKEY /**/ +/* Define this to enable RR type RESINFO. */ +#define RRTYPE_RESINFO /**/ + /* Define this to enable RR type RKEY. */ /* #undef RRTYPE_RKEY */ @@ -665,7 +691,7 @@ #ifdef HAVE_WINSOCK2_H #define FD_SET_T (u_int) #else -#define FD_SET_T +#define FD_SET_T #endif @@ -718,6 +744,9 @@ time_t timegm (struct tm *tm); #ifndef HAVE_GMTIME_R struct tm *gmtime_r(const time_t *timep, struct tm *result); #endif +#ifndef HAVE_ASCTIME_R +char *asctime_r(const struct tm *tm, char *buf); +#endif #ifndef HAVE_LOCALTIME_R struct tm *localtime_r(const time_t *timep, struct tm *result); #endif @@ -732,10 +761,10 @@ int isascii(int c); int snprintf (char *str, size_t count, const char *fmt, ...); int vsnprintf (char *str, size_t count, const char *fmt, va_list arg); #endif /* HAVE_SNPRINTF */ -#ifndef HAVE_INET_PTON +#if !defined(HAVE_INET_PTON) && !HAVE_DECL_INET_PTON int inet_pton(int af, const char* src, void* dst); #endif /* HAVE_INET_PTON */ -#ifndef HAVE_INET_NTOP +#if !defined(HAVE_INET_NTOP) && !HAVE_DECL_INET_NTOP const char *inet_ntop(int af, const void *src, char *dst, size_t size); #endif #ifndef HAVE_INET_ATON @@ -749,11 +778,11 @@ size_t strlcpy(char *dst, const char *src, size_t siz); #endif #ifdef USE_WINSOCK -#define SOCK_INVALID INVALID_SOCKET +#define SOCK_INVALID ((INT_PTR)INVALID_SOCKET) #define close_socket(_s) do { if (_s != SOCK_INVALID) {closesocket(_s); _s = -1;} } while(0) #else #define SOCK_INVALID -1 -#define close_socket(_s) do { if (_s != SOCK_INVALID) {close(_s); _s = -1;} } while(0) +#define close_socket(_s) do { if (_s != SOCK_INVALID) {close(_s >= -1 ? _s : -1); _s = -1;} } while(0) #endif #ifdef __cplusplus diff --git a/contrib/ldns/ldns/net.h b/contrib/ldns/ldns/net.h index 0fbf1544d5e9..b9fb2ca3b04a 100644 --- a/contrib/ldns/ldns/net.h +++ b/contrib/ldns/ldns/net.h @@ -91,13 +91,12 @@ int ldns_tcp_bgsend(ldns_buffer *qbin, const struct sockaddr_storage *to, sockle /** * Sends a buffer to an ip using tcp and return the response as a ldns_pkt - * \param[in] qbin the ldns_buffer to be send + * \param[out] result packet with the answer * \param[in] qbin the ldns_buffer to be send * \param[in] to the ip addr to send to * \param[in] tolen length of the ip addr * \param[in] timeout the timeout value for the network * \param[out] answersize size of the packet - * \param[out] result packet with the answer * \return status */ ldns_status ldns_tcp_send(uint8_t **result, ldns_buffer *qbin, const struct sockaddr_storage *to, socklen_t tolen, struct timeval timeout, size_t *answersize); diff --git a/contrib/ldns/ldns/util.h b/contrib/ldns/ldns/util.h index 1d8fa8836a33..aaa34a072fda 100644 --- a/contrib/ldns/ldns/util.h +++ b/contrib/ldns/ldns/util.h @@ -27,8 +27,8 @@ extern "C" { #define dprintf(X,Y) fprintf(stderr, (X), (Y)) /* #define dprintf(X, Y) */ -#define LDNS_VERSION "1.8.3" -#define LDNS_REVISION ((1<<16)|(8<<8)|(3)) +#define LDNS_VERSION "1.9.0" +#define LDNS_REVISION ((1<<16)|(9<<8)|(0)) /** * splint static inline workaround @@ -72,8 +72,10 @@ ldns_read_uint16(const void *src) #ifdef ALLOW_UNALIGNED_ACCESSES return ntohs(*(const uint16_t *) src); #else +# ifndef __clang_analyzer__ const uint8_t *p = (const uint8_t *) src; return ((uint16_t) p[0] << 8) | (uint16_t) p[1]; +# endif #endif } @@ -91,6 +93,26 @@ ldns_read_uint32(const void *src) #endif } +INLINE uint64_t +ldns_read_uint64(const void *src) +{ +#ifdef ALLOW_UNALIGNED_ACCESSES + const uint32_t *p = (const uint32_t *) src; + return ( ((uint64_t) ntohl(src[0]) << 32) + | (uint64_t) ntohl(src[1])); +#else + const uint8_t *p = (const uint8_t *) src; + return ( ((uint64_t) p[0] << 56) + | ((uint64_t) p[1] << 48) + | ((uint64_t) p[2] << 40) + | ((uint64_t) p[3] << 32) + | ((uint64_t) p[4] << 24) + | ((uint64_t) p[5] << 16) + | ((uint64_t) p[6] << 8) + | (uint64_t) p[7]); +#endif +} + /* * Copy data allowing for unaligned accesses in network byte order * (big endian). From nobody Fri May 22 18:32:09 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMYls5SB2z6fPpj for ; Fri, 22 May 2026 18:32: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMYls397Fz3HBH for ; Fri, 22 May 2026 18:32:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779474729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MQAgF2OcTsEikOFhIURCEOh0+GWrABDhhrlm3fkvWg0=; b=DuJPeV7HpsB+2PNQyWRZ4+vtC98wJvB76VWyMDN2DxMc5Buf5TABqs0jiVRmx5FKZ9r+WQ 28B1K3Mw3h6/6jiu24RFjCKKXqIqd2v5k4yfu4glk4hpICxsbQZw+CCvAK5sg9gYLAF4T9 3L3lvzgW6ACHhkOANM85j6XwmCi/mNHiA7GAUCWYD/k/4RyxhtJ6mGYrokAv2fS6N+yibo nkB+uIuz4owvUTMDWytEqIRat4BTL95VngRA+xEgbv12LOSWyiJV4p5NUpwdDOVlLMdD+Z KYKd0NXT4GDq7XugwxFB1dGCKZ/mN2YNxRlvdDPRN+1oZndV47iIcZhdgRIU9w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779474729; a=rsa-sha256; cv=none; b=x5LUIJXuppB+qjjz/oayGz9vpy9+ApqGHePj9q56a5rI49n2objaDGooUw6F+A5hzYgA6Z gZ/M4usV+xycIHD5wGelqx1/6HnjV+197r4GssQlVyAgcl8G6IDkfA9F0/rFtZlvhB0Acm R3AM5MWWJjI+kqjJoS30Pzb5TwyN7wCYgZNT834uP4UiNWGX+5/rm3ex4mPgjgiPOD2lVB o01OnFsGAnb79UTl3SgkAs174Cl9lSgRv71Tx+eKohHTvpSB24wKbZ0g1MQfblk5y0x745 IVAGQTFSVu5w7GJBPC3xUAP7CXuupm11PCWsiNRXdig4LoSzpbU0XrQgysh/LQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779474729; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=MQAgF2OcTsEikOFhIURCEOh0+GWrABDhhrlm3fkvWg0=; b=rSm1A4l5GmslVTXaI6uq1r+RKf4Piaxh+0iPcq2bqtEf1cuuP+AgBLVKSzti5cJAIgxyif zj3jXSUv9WsXIrqbs2rDrssdMVY7jTdqGVO0/GuAoCHHUHNDG2X2umnP97Mnxqglh14sfZ vraT+Nm4ff14qEoqlyt1x57JG6+bUUfO1MGa7lbXiFEQYGlizFBikdWlSDqJr5gL5O6ORX 6AM+tQdK1tijcF8oKJFWzAxERjOpHf3oRuJis1U4hvSluRKFPuyKtYFzG2LQj+x90J3GGA ksT3/tGwhJQkStk4lQndodmnX0P0eP9RGWjRH/nTcifqLeCfnQP7/jWnYdRekg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMYls2TyhzYs4 for ; Fri, 22 May 2026 18:32:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3c43d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 18:32:09 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Alexander Ziaee Subject: git: 4e2bf6e90a65 - main - mdoc.7: Revert upstream changes to Lb/LIBRARY List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 4e2bf6e90a65bee317e4dd379e098ba2eb5d8c0d Auto-Submitted: auto-generated Date: Fri, 22 May 2026 18:32:09 +0000 Message-Id: <6a10a129.3c43d.3ecb4774@gitrepo.freebsd.org> The branch main has been updated by ziaee: URL: https://cgit.FreeBSD.org/src/commit/?id=4e2bf6e90a65bee317e4dd379e098ba2eb5d8c0d commit 4e2bf6e90a65bee317e4dd379e098ba2eb5d8c0d Author: Alexander Ziaee AuthorDate: 2026-05-22 18:09:23 +0000 Commit: Alexander Ziaee CommitDate: 2026-05-22 18:31:54 +0000 mdoc.7: Revert upstream changes to Lb/LIBRARY Since this manual describes the mdoc syntax throughout the ecosystem, I had to blend what we had before with what upstream is doing now. Thanks: adrian MFC after: 3 days (we shipped this doc in 15.0/14.4) Reviewed by: ivy, mhorne, des, adrian Discussed with: arch@ Differential Revision: https://reviews.freebsd.org/D56153 --- contrib/mandoc/mdoc.7 | 37 +++++++++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/contrib/mandoc/mdoc.7 b/contrib/mandoc/mdoc.7 index 90f5600c59a7..7346cf25da65 100644 --- a/contrib/mandoc/mdoc.7 +++ b/contrib/mandoc/mdoc.7 @@ -196,8 +196,14 @@ and .Ic \&Nd . .It Em LIBRARY The name of the library containing the documented functions. -Using this section is no longer recommended. -If any +The syntax for this is as follows: +.Bd -literal -offset indent +\&.Lb libm +.Ed +.Pp +Using this section is no longer recommended outside +.Fx . +If writing for other operating systems, and any .Ic \&Lb macro is needed, put it at the beginning of the .Em SYNOPSIS @@ -223,7 +229,7 @@ Commands should be ordered alphabetically. .Pp For the second, function calls (sections 2, 3, 9): .Bd -literal -offset indent -\&.Lb libname \e" unless the functions are in libc +\&.Lb libname \e" unless on FreeBSD or the functions are in libc \&.In header.h \&.Vt extern const char *global; \&.Ft char * @@ -1880,7 +1886,30 @@ See also .Tg Lb .It Ic \&Lb Cm lib Ns Ar name Op Cm lib Ns Ar name ... Specify one or more libraries to link against. -Putting this macro at the beginning of the +.Pp +If used in the +.Em LIBRARY +section, the +.Ar name +parameter may be a system library, such as +.Cm z +or +.Cm pam , +in which case a small library description is printed next to the linker +invocation; or a custom library, in which case the library name is +printed in quotes. +This is most commonly used in the +.Em LIBRARY +or +.Em SYNOPSIS +sections, as described in +.Sx MANUAL STRUCTURE. +.Pp +Examples: +.Dl \&.Lb libz +.Dl \&.Lb libmandoc +.Pp +In other operating systems, putting this macro at the beginning of the .Em SYNOPSIS section is recommended, in which case it prints this comment: .D1 /* Fl l Ns Ar name Oo Fl l Ns Ar name ... Oc */ From nobody Fri May 22 18:33:57 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMYny0yHfz6fQ1R for ; Fri, 22 May 2026 18:33: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMYny0HHWz3Hwq for ; Fri, 22 May 2026 18:33:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779474838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HHpdUuI4jyCgvJIg0nF3c6qPbBrmy1x5el+YUiyE1fc=; b=B12K8lDOuzF6VY6ZGlr5MSo2Qk4YeDh9fad9BabU461Z13eBGURRo1+T9eZIXF19FbHxH5 K8lcjZ1E9dfF6G5HOPRg+No7nepb+/bvxZSk/J51nCSpjG3rMbQqV2sTEZAt02fnPr/g89 2Rj9/oKPlnOwBfYcPaC66M2kh7ihwtjUUSAHQq2SUkoLPGzN1FitjS9N/GXKT7plaNS/Ny xsOc22ssJXhLpogWD+6tj2aa7KWftLNIsL90PL5wd/dIcOH+rUuIsh8gP8SgW8NkP3GiEe M+76Fi8Y9kggDzkETcRzRxqazaZ6v2QYcTi4xHBH7G6IBT+QuIUjeg0DhAzrfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779474838; a=rsa-sha256; cv=none; b=JzzFcBo7f5JKxw17xFqysEIiYHGhhc4pdaUm8GEICm6ajwLJUAj4C6Z3H0ZpAOW+y/vpVT n3y4WEeS1r5cVPtuBDhFZ7l29p15O7bSiJEZ95GB8OLvp7NTJV/ivCgVGa+JxRxS3yNoWE TFCZ6GY4bNxnt5pG5Vn0dg0pNEvPz+DUtmCg2+snuy1q5P31GA/Z598pJqiKvzdFXRFBOO R19JBHcbrpszOLZapMTtnb8v2b42d73HpcsYBhx1rvy2Pj2VZ07NX7osi6L8X8jioyecGh nHFOZ3O36TuvUcoug5YV64aW/DUbCpMn5r7L0rklWT278gVxe3RT/8Y9MsI4Sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779474838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=HHpdUuI4jyCgvJIg0nF3c6qPbBrmy1x5el+YUiyE1fc=; b=iUEzq5zorpQWaxKmfm2M3CfrpjkxP2t6vfpB1xYhaonwRoFP06dioKCxpCDA0m5T/kzfSc 6VBmmiba9P7s95WODOttJib6cfw6qfmVwXRPJN9+TPHZAbZ3H7ngHXBalw9XUK3x/x74wl UP+uPn0AALhA8EJmj6w6QfL/8U7zk+zBMaROJX9NL4SRaezmlzMSOQvktL4IAkFxTS6/Ta 5lbg4fdFBNmwANBB/bXE4bV7CfCPT2in6ZU8ZoG345kppuG7/Q9UxDLkfFUld9VRdzMfKP YAw3qthI5iT7A+MgXqUOnYKshi5W8oExBjZjjcBIpra2YlrkU4tVYiJZs3V7RQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMYnx6lCCzZ6S for ; Fri, 22 May 2026 18:33:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3db1a by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 18:33:57 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Andrew Gallatin Subject: git: fd9af1e7084c - main - sendfile: Fix bug when using headers with SW KTLS offload List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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/main X-Git-Reftype: branch X-Git-Commit: fd9af1e7084c550358d9598407f9ee7583e6a53f Auto-Submitted: auto-generated Date: Fri, 22 May 2026 18:33:57 +0000 Message-Id: <6a10a195.3db1a.b58a602@gitrepo.freebsd.org> The branch main has been updated by gallatin: URL: https://cgit.FreeBSD.org/src/commit/?id=fd9af1e7084c550358d9598407f9ee7583e6a53f commit fd9af1e7084c550358d9598407f9ee7583e6a53f Author: Andrew Gallatin AuthorDate: 2026-05-22 17:57:54 +0000 Commit: Andrew Gallatin CommitDate: 2026-05-22 18:33:41 +0000 sendfile: Fix bug when using headers with SW KTLS offload When using SW KTLS, we must account for the headers in sf_iodone() in terms of either freeing or enqueuing them for TLS work. Not doing so can lead to a situation where we enqueue only the payload, and not the header, for encryption. Rather than leaking the header, the socket is left "hung" with the header marked M_NOTREADY. Sponsored by: Netflix Reviewed by: glebius, kib Differential Revision: https://reviews.freebsd.org/D57134 MFC After: 14 days --- sys/kern/kern_sendfile.c | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/sys/kern/kern_sendfile.c b/sys/kern/kern_sendfile.c index 9992b83ad6a8..cf9716560c07 100644 --- a/sys/kern/kern_sendfile.c +++ b/sys/kern/kern_sendfile.c @@ -95,6 +95,8 @@ struct sf_io { vm_pindex_t pindex0; #ifdef KERN_TLS struct ktls_session *tls; + struct mbuf *tls_m; + int tls_enq_cnt; #endif vm_page_t pa[]; }; @@ -338,7 +340,12 @@ sendfile_iodone(void *arg, vm_page_t *pa, int count, int error) so->so_proto->pr_abort(so); so->so_error = EIO; - mb_free_notready(sfio->m, sfio->npages); +#ifdef KERN_TLS + if (sfio->tls_m != NULL) + mb_free_notready(sfio->tls_m, sfio->tls_enq_cnt); + else +#endif + mb_free_notready(sfio->m, sfio->npages); #ifdef KERN_TLS } else if (sfio->tls != NULL && sfio->tls->mode == TCP_TLS_MODE_SW) { /* @@ -350,7 +357,10 @@ sendfile_iodone(void *arg, vm_page_t *pa, int count, int error) * Donate the socket reference from sfio to rather * than explicitly invoking soref(). */ - ktls_enqueue(sfio->m, so, sfio->npages); + if (sfio->tls_m != NULL) + ktls_enqueue(sfio->tls_m, so, sfio->tls_enq_cnt); + else + ktls_enqueue(sfio->m, so, sfio->npages); goto out_with_ref; #endif } else @@ -897,6 +907,8 @@ vn_sendfile(struct file *fp, int sockfd, struct uio *hdr_uio, * for all of sfio's lifetime. */ sfio->tls = tls; + sfio->tls_m = NULL; + sfio->tls_enq_cnt = 0; #endif vm_object_pip_add(obj, 1); error = sendfile_swapin(obj, sfio, &nios, off, space, rhpages, @@ -1125,6 +1137,13 @@ prepend_header: } else { sfio->so = so; sfio->m = m0; +#ifdef KERN_TLS + if (hdrlen != 0 && tls != NULL && + tls->mode == TCP_TLS_MODE_SW) { + sfio->tls_m = m; + sfio->tls_enq_cnt = tls_enq_cnt; + } +#endif soref(so); error = pr->pr_send(so, PRUS_NOTREADY, m, NULL, NULL, td); From nobody Fri May 22 18:34:23 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMYpS0sTmz6fQQH for ; Fri, 22 May 2026 18:34: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMYpR71sDz3JH9 for ; Fri, 22 May 2026 18:34:23 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779474864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IpdkV44nUh67lH7bxUPTEN3N22AbRNmpQQZ0Bhw1Eos=; b=UYcyUWCypdO4BhtS7hxCN86M1kY1I2eRaCGBmj7txaUJmJR6tkUldM7BdOAa5zc9K1XQtU GSkiAQrL3c1U9zWrjX7SppXim2gUVnCa2EKBuMIBXYZ6uYIRayvhw4eEEwZ33oS864N1Ee zgzPss+VPX37vn9tiMo4+yWjZ4E2dcM+jQqBPHb+gu4p/MoLBOClRHjjN9vU4tDlWX3SZf 5WlGL3bsGAr48tN1pRDys9Xqm6x+pDBIEJacSRB7LWU30WBihE2w7lU+09DsVclUsfROTM lanm7EwQA3IA2Zv5Cb/kzCp2IXpTPaDV4OCUGNuKaeZrF4fg4ED1j6/K5oI/8w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779474864; a=rsa-sha256; cv=none; b=DjnIxqDXulkmPwWlzaSWePtfIq7gnEZ3QjxhI06p3wsG74cvAez2bV3eJ5t4TYGT3IAkwy aZJd2plFygq6Y5HnIpyfi1tX5ajybcVvLWB9/KEbImF16UVAvJDLXJdD2+Ubp/2wyF86zS kBU0JhdNZM1Rxbppey5zr9up/IvNJq93YlNr5En9DAOhDLBCuR2vYr/CQutZLbD672N1yD 0FApX4LrIIadlA9v9b3YTN+O1UhlkFWhlC2St37kGeBRijkMQmMIXOeCMKtxZmGxBYSjB0 sOGDJrIA/SRota7WMlWb6IAJJg4c15b3HSz9w1NzcMZxiUcoD5CL7WtzAUEQng== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779474864; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=IpdkV44nUh67lH7bxUPTEN3N22AbRNmpQQZ0Bhw1Eos=; b=QBbDWMMMtgN95gThbjplUDWWdzoecBQgsWDVse5Pdgb0R01ZpPlzlc82v16nkvq0b3udjp 8DC+cHMh0cjm2SoorcgSgTCK5Enz0x+XwrQkCyioZTlRoPPyc7g+mnc5hESJEmQMPvTPgT rBC64vq0CGbbl9CJq5tfFtvPIIElxtoP/hKuWtxgVhkBcvJHwvn9Hi/C19GuQrhtUHKnOL 0R5AAJkZcjsObDttqzVxY0k/ncChiZSU1J0SuQeh/+p0j/5sT+9GTLqZZQvnJEzUYizAqw vBFRvr7Yf0A9QTQiXHhH/NZLutwvRFNLMsBGfK0yi94Vetul7FsMMDX+gS+7UA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMYpR6PhMzZGv for ; Fri, 22 May 2026 18:34:23 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3d3c6 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 18:34:23 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: eff5f220c379 - main - netlink: Fix interface type match List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: eff5f220c379d4173fdc0e5ec00380888bf7649a Auto-Submitted: auto-generated Date: Fri, 22 May 2026 18:34:23 +0000 Message-Id: <6a10a1af.3d3c6.1c075cec@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=eff5f220c379d4173fdc0e5ec00380888bf7649a commit eff5f220c379d4173fdc0e5ec00380888bf7649a Author: Ed Maste AuthorDate: 2026-05-22 13:35:52 +0000 Commit: Ed Maste CommitDate: 2026-05-22 18:34:13 +0000 netlink: Fix interface type match Reviewed by: bz, glebius, pouria Fixes: 7e5bf68495cc ("netlink: add netlink support") Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57167 --- sys/netlink/route/iface.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netlink/route/iface.c b/sys/netlink/route/iface.c index d449e4114f24..5b6e58a598aa 100644 --- a/sys/netlink/route/iface.c +++ b/sys/netlink/route/iface.c @@ -428,7 +428,7 @@ match_iface(if_t ifp, void *_arg) if (attrs->ifi_index != 0 && attrs->ifi_index != if_getindex(ifp)) return (false); - if (attrs->ifi_type != 0 && attrs->ifi_index != if_gettype(ifp)) + if (attrs->ifi_type != 0 && attrs->ifi_type != if_gettype(ifp)) return (false); if (attrs->ifla_ifname != NULL && strcmp(attrs->ifla_ifname, if_name(ifp))) return (false); From nobody Fri May 22 19:50:21 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMbV610Sdz6fYxs for ; Fri, 22 May 2026 19:50: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMbV55FcXz3TVj for ; Fri, 22 May 2026 19:50:21 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779479421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pWyQWaN6N3eLs62J/FTsjMFDcbfToaVeLm/NFxcnuAU=; b=UCDZycvw0LDEGUrK7bcGFQgWZ235SQtqWL6o+qREvGPaMsVz0tU1BU79fpTC42TiLTG+VB Z/QbFl0VGcEhxDS1M37XqgSPsgPb0h3i051WphMWVOXarnHM8OOt/TXAj1Geu6NXtjK+KN e62BUFqYzyl8+ETo24tLonZc2/r2lV/mD8WTeCWgDpt2Z5/aZ250Pi2UOnvOqL4+VhCM3m ROepv8Ip5nKrpNJlOBS7KH2X6J2ckWTU/kDw77KtwwJcqffrxhJzm6S0KMN+7d/OuhLWa9 5jGthA18MEC/JWB0e4Q5bzuUVs0ggm8Rzm9hI2iwVOglhZ5eNTKGycGwpXIBig== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779479421; a=rsa-sha256; cv=none; b=OIz6YXQ4N07DJiIbSjbzZSZHFrNL41yRzaXc6GibrpbUmeoA+nDgmOEs5iFhY7elcW6R8E 9LlRdi7yxPkTw8ikHswgRSsibz4be6RTfCXgAvmoooCgXQOFyBuT7KBf2qpNj/12+IHbX0 ZCdxm+DGcSX+0pGaXAQfUtnjK06Wx1Dup/7xs9mf84NVR3yVKcRFUnPf0tMTQrwP7315HF 9kZqYk+0ZEI4hjrw8SR9PWCN7iNtxu6b8Azo7q9Ld3jZlm0WYD57s4PSH9pKZ3kZy6soEN tylQfLgZCK5DcN1eEKB0I9YRpd6jaZ3nt6Z/4UkDKGn16ak6B43Y2s27PHi9jQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779479421; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=pWyQWaN6N3eLs62J/FTsjMFDcbfToaVeLm/NFxcnuAU=; b=SvWwmFl64jEKxTlgyP5X2p/pjad2c/4Mabvd0lj1+FYDCG9SIFowqkpsVRDhKdz8J5wkZp i/sMQyOGeiTP5TyohqXOYVunFRyrNwIfJv1mmmZqd8PmwAtESadyuhpZyEDMSry1Qb966J zuvp3vdNWPCh/DjdLHGInTlGyUFA5tl5PDH7wdOhps7n/XvuCU+jsHeenhDzT2zm5Q6ccn anYOd2ShntAkarCq9T4W62aqVQo61PtFMhX2L23Df/hLabg0qMWsUHvswFHkuBVJ4e9waQ GkryCGztHsaGofE6J65i2/1msKl/JYliNw1Xrz46CP8dLsRAX7OHF60wt9CBTg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMbV54D5tzc4S for ; Fri, 22 May 2026 19:50:21 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 441d2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 19:50:21 +0000 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=B8rg?=rav Subject: git: dd6415536784 - main - ldns: Fix unused variable on big-endian List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: dd64155367840a3747d812577457a7ed7c8e9acb Auto-Submitted: auto-generated Date: Fri, 22 May 2026 19:50:21 +0000 Message-Id: <6a10b37d.441d2.67dac116@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=dd64155367840a3747d812577457a7ed7c8e9acb commit dd64155367840a3747d812577457a7ed7c8e9acb Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 19:38:34 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 19:38:34 +0000 ldns: Fix unused variable on big-endian MFC after: 1 week Fixes: 9ed998a81bab ("ldns: Update to 1.9.0") --- contrib/ldns/sha2.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contrib/ldns/sha2.c b/contrib/ldns/sha2.c index 59a6b9d30fc6..dcd7d5dbf69b 100644 --- a/contrib/ldns/sha2.c +++ b/contrib/ldns/sha2.c @@ -738,7 +738,9 @@ static void ldns_sha512_Transform(ldns_sha512_CTX* context, sha2_word64 a, b, c, d, e, f, g, h, s0, s1; sha2_word64 T1, T2, *W512 = (sha2_word64*)context->buffer; int j; +#if BYTE_ORDER == LITTLE_ENDIAN sha2_word64 aligned; +#endif /* BYTE_ORDER == LITTLE_ENDIAN */ /* initialize registers with the prev. intermediate value */ a = context->state[0]; From nobody Fri May 22 19:58:07 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMbg351Yhz6fZrS for ; Fri, 22 May 2026 19:58: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMbg34LhJz3VHx for ; Fri, 22 May 2026 19:58:07 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779479887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=100MLMlan48Qd2/0LKMc4yq71ZQV2Lh7UgCnLw9c6gQ=; b=D58YUOP3PIG/G+Q4fAaBoz0XrLRQElSW/cLfWxcV4aVVSxqNGsiVjMJRV+8Dg+kVeGcuTK MOUNH+Wf83KCV7LCXSQ9swGtmTFUfanZZMa6OfcpnEzqjmjyc8+ELmc5h1HARkqPIlvVJB XnIq+ixdyA8+sTFKaa4WkB7wfOE01q1lXrE0aKPghfQoAuxj52FpcGtzfQSQruXoZnE1BA OaU/NIItGhxfm9/nggyDvFsLnrorXnMV6myT7IWufavVHo3Hr+en8fBAarkuDeTZzdNyJP BblK6ACuDdajpSyGWfkbZ8srNFY96eFuyYQADx3f0twXo7I428PGrm9xZQQUtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779479887; a=rsa-sha256; cv=none; b=IqlNHo9+DBz2SzVAW8/xRUjtS4/ZSzAEAPO3Gmn1sErn5ve1J8SAW5MMh0Bk3D0xQHG6+U 85KVd5pbIQ7DvF6cA4/hKyulos74T9OKcbMVK0MzagDsetiFbe4sJ68bHMPwx93NSdYZ3G pZn5UckgxUjKSCCWtw4SToW6ij+9bYPqCq9JPY+yPsQpXvvv2Q6akYVWGehgMLHJa/Me9g v9zz778cL+7Rj0acSCRTg3uIEs5+TV8pOZYFBDeFa2r4BeSdhTHGS8ZZ2l56nm6e5Aidty ksNtJZ+jUgKaBYZ0vSUAYyyvRAVx7F2R9aDVPAAld3XALZn8tFTwxYC2f509tw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779479887; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=100MLMlan48Qd2/0LKMc4yq71ZQV2Lh7UgCnLw9c6gQ=; b=u0d3A3uNBLWf5wc3Aa0xmpnMkrJodk2VpWd1CzRyZjvjxRi75+dIzqsIXjmd4eVL08QnBq GMybZC58ingSiqduiupUx9v3gAaq2stC1SNUW1T48fHWA+g6sleT9jdkgQlDCl5HQQ8SeN 7ZVcGnZ0rxwvgWtat0UkCaB06HuR9VfM2/SnUF4oiQibs0dqIhuGC4Ua5hyQOOpfNYmaKl JYWb9IRoNumoH8Xkks41lDiWBMEHGfDdFvPOP9dWRKiXHcUsYT07OAVYXOrKYgKCrf+ecE DzXv/2TsOLDSyUctbnF6axTtciLjmVm0wFUZlZHdPmTX5en0boeL3u0SHrTFkQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMbg33cLMzbns for ; Fri, 22 May 2026 19:58:07 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45e6d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 19:58:07 +0000 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=B8rg?=rav Subject: git: cd69bc03cf67 - main - unbound: Tweak freebsd-configure script List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: cd69bc03cf67b958e08206d49562903c57b5bd28 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 19:58:07 +0000 Message-Id: <6a10b54f.45e6d.2b0bdd44@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=cd69bc03cf67b958e08206d49562903c57b5bd28 commit cd69bc03cf67b958e08206d49562903c57b5bd28 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 19:55:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 19:55:22 +0000 unbound: Tweak freebsd-configure script Regenerating the configure script is optional and can introduce noise if the installed versions of autoconf, automake, and libtool do not match those used upstream. Tweak our script slightly so it will skip this step if libtoolize is not found. --- contrib/unbound/freebsd-configure.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/unbound/freebsd-configure.sh b/contrib/unbound/freebsd-configure.sh index cd45d4716320..a22428948574 100755 --- a/contrib/unbound/freebsd-configure.sh +++ b/contrib/unbound/freebsd-configure.sh @@ -14,7 +14,7 @@ unbound=$(dirname $(realpath $0)) cd $unbound # Run autotools before we drop LOCALBASE out of PATH -(cd $unbound && libtoolize --copy && autoheader && autoconf) +libtoolize --copy && autoheader && autoconf # Ensure we use the correct toolchain and clean our environment export CC=$(echo ".include " | make -f /dev/stdin -VCC) From nobody Fri May 22 20:52:52 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMctD5vBDz6fhYn for ; Fri, 22 May 2026 20:52: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMctD4GmKz3bj3 for ; Fri, 22 May 2026 20:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779483172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/YE+GU/JOfPsmijWzKrX/nHb7s7u7R/Jf5CQG8Noguo=; b=cdK+2zNxyjKaCHfXzghJPTKB6QZB6HqYbm6TsyYDs46Eyx5yukWsSSn9MWs7puTBd6ypHS bU7H0HyNQfkwTNHEnFhBwU//NpCOeRDQ3l0bF+nNEjg7Hz7QIt0r76CLAZXrDbTMcgBBqS RRGHeU16Yrd/0IDh2oQOQ/eSfmnXAkJtMHIkJ24nIM5Bme7smHXRStXBCCd0hpsNzb6OD7 Db1hXRcjVfdRAri44H3ODqapUvRDX7Kk/GUYk+Tuh+Cr187F/nuDepi+PteW1mrWhqg2lt YP9y6qYO45v510jjLD/qvFB4nzDmVLUkqcMK49KgXeNq18OSVMX+0UkIU9qikQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779483172; a=rsa-sha256; cv=none; b=XCSHVPRhLi+J0NiH4qi/Isic0UzIsENB1vW8qqL7kukxVIl0RjoSqOUoKgtV5aD1Tjx6tE KDR6vcfKww6KkLf0QrH2m89xlJGQetVprtR66WUzSvHJ2FNRZW/eB77cQ2rZxzyCEkigqy 4mEsgWJzi2R3TMdZhDLBYfyuihgXQOG3WZYXrsoNY5zKxszcNHBjweW2dubjysFS3xVIqs 4GO3F/U8J7neQRPju2eBOJiZoyoZmZM+cry6Z5Pb6m9FVxLYgvfduJN6SEIx6O1XTnFlTw uahHdBt6vR0+/0y6cRBsUAv9lCBKzoIJL3CpS266PMx+CGQrJhGAIHjYMX2Dfw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779483172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/YE+GU/JOfPsmijWzKrX/nHb7s7u7R/Jf5CQG8Noguo=; b=dGngGeiLxrq+MbZ8COsEn/QAEYljo/FPkjhEC09dhML6hdjgcmCuxesouqognSHO+Hpt31 1DFSefOcfPPUKI+AQffys/4UzJ5F+ppnhzRItkAG9damIJFUKATBnAUcilzzma3MgtbCFJ prfIyNkBM9nwJStVWhk7Oue5lsD7YYTIwvIFrvbvJeyrjlr7fVsOxjeN7A1BbcXsfrJPfy LeEeh4wNZeQkeLTVBYw27/Kg2c9Hl06Cz0+CFAuQcunXi6fnLV8821Di+I0OteYdO/or2n nuoH2bhaGQtBlsXpO74QbI4mPTf4TkUuzP2BNN3aZe5AZqo+KXANhiVmujJR4w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMctD3tLwzdkt for ; Fri, 22 May 2026 20:52:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 190d3 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 20:52:52 +0000 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=B8rg?=rav Subject: git: 290190b26c09 - main - unbound: Regenerate for 1.24.1 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 290190b26c09c307a9cd70703fa20ad2b2b600a6 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 20:52:52 +0000 Message-Id: <6a10c224.190d3.7930a324@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=290190b26c09c307a9cd70703fa20ad2b2b600a6 commit 290190b26c09c307a9cd70703fa20ad2b2b600a6 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 20:04:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 20:14:47 +0000 unbound: Regenerate for 1.24.1 No functional changes intended. Fixes: 8b29c373e6ab ("unbound: Vendor import 1.24.1") --- contrib/unbound/doc/example.conf | 14 +- contrib/unbound/doc/libunbound.3 | 675 ++- contrib/unbound/doc/unbound-anchor.8 | 383 +- contrib/unbound/doc/unbound-checkconf.8 | 121 +- contrib/unbound/doc/unbound-control.8 | 2038 +++++--- contrib/unbound/doc/unbound-host.1 | 242 +- contrib/unbound/doc/unbound.8 | 169 +- contrib/unbound/doc/unbound.conf.5 | 8152 ++++++++++++++++++++----------- lib/libunbound/config.h | 24 +- 9 files changed, 7568 insertions(+), 4250 deletions(-) diff --git a/contrib/unbound/doc/example.conf b/contrib/unbound/doc/example.conf index 3a5188f00477..56bb3247b20e 100644 --- a/contrib/unbound/doc/example.conf +++ b/contrib/unbound/doc/example.conf @@ -1,7 +1,7 @@ # # Example configuration file. # -# See unbound.conf(5) man page, version 1.23.1. +# See unbound.conf(5) man page, version 1.24.1. # # this is a comment. @@ -116,8 +116,8 @@ server: # so-rcvbuf: 0 # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option). - # 0 is system default. Use 4m to handle spikes on very busy servers. - # so-sndbuf: 0 + # 0 is system default. Set larger to handle spikes on very busy servers. + # so-sndbuf: 4m # use SO_REUSEPORT to distribute queries over threads. # at extreme load it could be better to turn it off to distribute even. @@ -163,7 +163,7 @@ server: # msg-cache-slabs: 4 # the number of queries that a thread gets to service. - # num-queries-per-thread: 1024 + # num-queries-per-thread: 2048 # if very busy, 50% queries run to completion, 50% get timeout in msec # jostle-timeout: 200 @@ -196,6 +196,10 @@ server: # Limit on upstream queries for an incoming query and its recursion. # max-global-quota: 200 + # Should the scrubber remove promiscuous NS from positive answers, + # protects against poison attempts. + # iter-scrub-promiscuous: yes + # msec for waiting for an unknown server to reply. Increase if you # are behind a slow satellite link, to eg. 1128. # unknown-server-time-limit: 376 @@ -279,7 +283,7 @@ server: # do-ip6: yes # If running unbound on an IPv6-only host, domains that only have - # IPv4 servers would become unresolveable. If NAT64 is available in + # IPv4 servers would become unresolvable. If NAT64 is available in # the network, unbound can use NAT64 to reach these servers with # the following option. This is NOT needed for enabling DNS64 on a # system that has IPv4 connectivity. diff --git a/contrib/unbound/doc/libunbound.3 b/contrib/unbound/doc/libunbound.3 index 8ef33b0998a2..681c141fcd76 100644 --- a/contrib/unbound/doc/libunbound.3 +++ b/contrib/unbound/doc/libunbound.3 @@ -1,335 +1,306 @@ -.TH "libunbound" "3" "Jul 16, 2025" "NLnet Labs" "unbound 1.23.1" -.\" -.\" libunbound.3 -- unbound library functions manual -.\" -.\" Copyright (c) 2007, NLnet Labs. All rights reserved. -.\" -.\" See LICENSE for the license. -.\" -.\" -.SH "NAME" -.B libunbound, -.B unbound.h, -.B ub_ctx, -.B ub_result, -.B ub_callback_type, -.B ub_ctx_create, -.B ub_ctx_delete, -.B ub_ctx_set_option, -.B ub_ctx_get_option, -.B ub_ctx_config, -.B ub_ctx_set_fwd, -.B ub_ctx_set_stub, -.B ub_ctx_set_tls, -.B ub_ctx_resolvconf, -.B ub_ctx_hosts, -.B ub_ctx_add_ta, -.B ub_ctx_add_ta_autr, -.B ub_ctx_add_ta_file, -.B ub_ctx_trustedkeys, -.B ub_ctx_debugout, -.B ub_ctx_debuglevel, -.B ub_ctx_async, -.B ub_poll, -.B ub_wait, -.B ub_fd, -.B ub_process, -.B ub_resolve, -.B ub_resolve_async, -.B ub_cancel, -.B ub_resolve_free, -.B ub_strerror, -.B ub_ctx_print_local_zones, -.B ub_ctx_zone_add, -.B ub_ctx_zone_remove, -.B ub_ctx_data_add, -.B ub_ctx_data_remove -\- Unbound DNS validating resolver 1.23.1 functions. -.SH "SYNOPSIS" -.B #include -.LP -\fIstruct ub_ctx *\fR -\fBub_ctx_create\fR(\fIvoid\fR); -.LP -\fIvoid\fR -\fBub_ctx_delete\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_ctx_set_option\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR opt, \fIchar*\fR val); -.LP -\fIint\fR -\fBub_ctx_get_option\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR opt, \fIchar**\fR val); -.LP -\fIint\fR -\fBub_ctx_config\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_set_fwd\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR addr); -.LP -\fIint\fR -\fBub_ctx_set_stub\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR zone, -\fIchar*\fR addr, -.br - \fIint\fR isprime); -.LP -\fIint\fR -\fBub_ctx_set_tls\fR(\fIstruct ub_ctx*\fR ctx, \fIint\fR tls); -.LP -\fIint\fR -\fBub_ctx_resolvconf\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_hosts\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_add_ta\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR ta); -.LP -\fIint\fR -\fBub_ctx_add_ta_autr\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_add_ta_file\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_trustedkeys\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR fname); -.LP -\fIint\fR -\fBub_ctx_debugout\fR(\fIstruct ub_ctx*\fR ctx, \fIFILE*\fR out); -.LP -\fIint\fR -\fBub_ctx_debuglevel\fR(\fIstruct ub_ctx*\fR ctx, \fIint\fR d); -.LP -\fIint\fR -\fBub_ctx_async\fR(\fIstruct ub_ctx*\fR ctx, \fIint\fR dothread); -.LP -\fIint\fR -\fBub_poll\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_wait\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_fd\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_process\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_resolve\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR name, -.br - \fIint\fR rrtype, \fIint\fR rrclass, \fIstruct ub_result**\fR result); -.LP -\fIint\fR -\fBub_resolve_async\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR name, -.br - \fIint\fR rrtype, \fIint\fR rrclass, \fIvoid*\fR mydata, -.br - \fIub_callback_type\fR callback, \fIint*\fR async_id); -.LP -\fIint\fR -\fBub_cancel\fR(\fIstruct ub_ctx*\fR ctx, \fIint\fR async_id); -.LP -\fIvoid\fR -\fBub_resolve_free\fR(\fIstruct ub_result*\fR result); -.LP -\fIconst char *\fR -\fBub_strerror\fR(\fIint\fR err); -.LP -\fIint\fR -\fBub_ctx_print_local_zones\fR(\fIstruct ub_ctx*\fR ctx); -.LP -\fIint\fR -\fBub_ctx_zone_add\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR zone_name, \fIchar*\fR zone_type); -.LP -\fIint\fR -\fBub_ctx_zone_remove\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR zone_name); -.LP -\fIint\fR -\fBub_ctx_data_add\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR data); -.LP -\fIint\fR -\fBub_ctx_data_remove\fR(\fIstruct ub_ctx*\fR ctx, \fIchar*\fR data); -.SH "DESCRIPTION" -.B Unbound -is an implementation of a DNS resolver, that does caching and -DNSSEC validation. This is the library API, for using the \-lunbound library. -The server daemon is described in \fIunbound\fR(8). -The library works independent from a running unbound server, and -can be used to convert hostnames to ip addresses, and back, -and obtain other information from the DNS. The library performs public\-key -validation of results with DNSSEC. -.P -The library uses a variable of type \fIstruct ub_ctx\fR to keep context -between calls. The user must maintain it, creating it with -.B ub_ctx_create -and deleting it with -.B ub_ctx_delete\fR. -It can be created and deleted at any time. Creating it anew removes any -previous configuration (such as trusted keys) and clears any cached results. -.P -The functions are thread\-safe, and a context can be used in a threaded (as -well as in a non\-threaded) environment. Also resolution (and validation) -can be performed blocking and non\-blocking (also called asynchronous). -The async method returns from the call immediately, so that processing -can go on, while the results become available later. -.P +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "LIBUNBOUND" "3" "Oct 22, 2025" "1.24.1" "Unbound" +.SH NAME +libunbound \- Unbound DNS validating resolver 1.24.1 functions. +.SH SYNOPSIS +.sp +\fB#include \fP +.sp +struct ub_ctx * \fBub_ctx_create\fP(void); +.sp +void \fBub_ctx_delete\fP(struct ub_ctx* ctx); +.sp +int \fBub_ctx_set_option\fP(struct ub_ctx* ctx, char* opt, char* val); +.sp +int \fBub_ctx_get_option\fP(struct ub_ctx* ctx, char* opt, char** val); +.sp +int \fBub_ctx_config\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_set_fwd\fP(struct ub_ctx* ctx, char* addr); +.INDENT 0.0 +.TP +int \fBub_ctx_set_stub\fP(struct ub_ctx* ctx, char* zone, char* addr, +int isprime); +.UNINDENT +.sp +int \fBub_ctx_set_tls\fP(struct ub_ctx* ctx, int tls); +.sp +int \fBub_ctx_resolvconf\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_hosts\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_add_ta\fP(struct ub_ctx* ctx, char* ta); +.sp +int \fBub_ctx_add_ta_autr\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_add_ta_file\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_trustedkeys\fP(struct ub_ctx* ctx, char* fname); +.sp +int \fBub_ctx_debugout\fP(struct ub_ctx* ctx, FILE* out); +.sp +int \fBub_ctx_debuglevel\fP(struct ub_ctx* ctx, int d); +.sp +int \fBub_ctx_async\fP(struct ub_ctx* ctx, int dothread); +.sp +int \fBub_poll\fP(struct ub_ctx* ctx); +.sp +int \fBub_wait\fP(struct ub_ctx* ctx); +.sp +int \fBub_fd\fP(struct ub_ctx* ctx); +.sp +int \fBub_process\fP(struct ub_ctx* ctx); +.INDENT 0.0 +.TP +int \fBub_resolve\fP(struct ub_ctx* ctx, char* name, +int rrtype, int rrclass, struct ub_result** result); +.TP +int \fBub_resolve_async\fP(struct ub_ctx* ctx, char* name, +int rrtype, int rrclass, void* mydata, +ub_callback_type* callback, int* async_id); +.UNINDENT +.sp +int \fBub_cancel\fP(struct ub_ctx* ctx, int async_id); +.sp +void \fBub_resolve_free\fP(struct ub_result* result); +.sp +const char * \fBub_strerror\fP(int err); +.sp +int \fBub_ctx_print_local_zones\fP(struct ub_ctx* ctx); +.sp +int \fBub_ctx_zone_add\fP(struct ub_ctx* ctx, char* zone_name, char* zone_type); +.sp +int \fBub_ctx_zone_remove\fP(struct ub_ctx* ctx, char* zone_name); +.sp +int \fBub_ctx_data_add\fP(struct ub_ctx* ctx, char* data); +.sp +int \fBub_ctx_data_remove\fP(struct ub_ctx* ctx, char* data); +.SH DESCRIPTION +.sp +Unbound is an implementation of a DNS resolver, that does caching and DNSSEC +validation. +This is the library API, for using the \fB\-lunbound\fP library. +The server daemon is described in \fI\%unbound(8)\fP\&. +The library works independent from a running unbound server, and can be used to +convert hostnames to ip addresses, and back, and obtain other information from +the DNS. +The library performs public\-key validation of results with DNSSEC. +.sp +The library uses a variable of type \fIstruct ub_ctx\fP to keep context between +calls. +The user must maintain it, creating it with \fBub_ctx_create\fP and deleting it +with \fBub_ctx_delete\fP\&. +It can be created and deleted at any time. +Creating it anew removes any previous configuration (such as trusted keys) and +clears any cached results. +.sp +The functions are thread\-safe, and a context can be used in a threaded (as well +as in a non\-threaded) environment. +Also resolution (and validation) can be performed blocking and non\-blocking +(also called asynchronous). +The async method returns from the call immediately, so that processing can go +on, while the results become available later. +.sp The functions are discussed in turn below. -.SH "FUNCTIONS" -.TP +.SH FUNCTIONS +.INDENT 0.0 +.TP .B ub_ctx_create Create a new context, initialised with defaults. -The information from /etc/resolv.conf and /etc/hosts is not utilised -by default. Use -.B ub_ctx_resolvconf -and -.B ub_ctx_hosts -to read them. -Before you call this, use the openssl functions CRYPTO_set_id_callback and -CRYPTO_set_locking_callback to set up asynchronous operation if you use -lib openssl (the application calls these functions once for initialisation). -Openssl 1.0.0 or later uses the CRYPTO_THREADID_set_callback function. +The information from \fB/etc/resolv.conf\fP and \fB/etc/hosts\fP is +not utilised by default. +Use \fBub_ctx_resolvconf\fP and \fBub_ctx_hosts\fP to read them. +Before you call this, use the openssl functions +\fBCRYPTO_set_id_callback\fP and \fBCRYPTO_set_locking_callback\fP to set +up asynchronous operation if you use lib openssl (the application calls +these functions once for initialisation). +Openssl 1.0.0 or later uses the \fBCRYPTO_THREADID_set_callback\fP +function. .TP .B ub_ctx_delete Delete validation context and free associated resources. -Outstanding async queries are killed and callbacks are not called for them. +Outstanding async queries are killed and callbacks are not called for +them. .TP .B ub_ctx_set_option -A power\-user interface that lets you specify one of the options from the -config file format, see \fIunbound.conf\fR(5). Not all options are -relevant. For some specific options, such as adding trust anchors, special -routines exist. Pass the option name with the trailing ':'. +A power\-user interface that lets you specify one of the options from +the config file format, see \fI\%unbound.conf(5)\fP\&. +Not all options are relevant. +For some specific options, such as adding trust anchors, special +routines exist. +Pass the option name with the trailing \fB\(aq:\(aq\fP\&. .TP .B ub_ctx_get_option -A power\-user interface that gets an option value. Some options cannot be -gotten, and others return a newline separated list. Pass the option name -without trailing ':'. The returned value must be free(2)d by the caller. +A power\-user interface that gets an option value. +Some options cannot be gotten, and others return a newline separated +list. +Pass the option name without trailing \fB\(aq:\(aq\fP\&. +The returned value must be free(2)d by the caller. .TP .B ub_ctx_config -A power\-user interface that lets you specify an unbound config file, see -\fIunbound.conf\fR(5), which is read for configuration. Not all options are -relevant. For some specific options, such as adding trust anchors, special -routines exist. This function is thread\-safe only if a single instance of -ub_ctx* exists in the application. If several instances exist the -application has to ensure that ub_ctx_config is not called in parallel by -the different instances. +A power\-user interface that lets you specify an unbound config file, +see \fI\%unbound.conf(5)\fP, which is read for +configuration. +Not all options are relevant. +For some specific options, such as adding trust anchors, special +routines exist. +This function is thread\-safe only if a single instance of \fBub_ctx\fP* +exists in the application. +If several instances exist the application has to ensure that +\fBub_ctx_config\fP is not called in parallel by the different instances. .TP .B ub_ctx_set_fwd -Set machine to forward DNS queries to, the caching resolver to use. -IP4 or IP6 address. Forwards all DNS requests to that machine, which -is expected to run a recursive resolver. If the proxy is not -DNSSEC capable, validation may fail. Can be called several times, in -that case the addresses are used as backup servers. -At this time it is only possible to set configuration before the -first resolve is done. +Set machine to forward DNS queries to, the caching resolver to use. +IP4 or IP6 address. +Forwards all DNS requests to that machine, which is expected to run a +recursive resolver. +If the proxy is not DNSSEC capable, validation may fail. +Can be called several times, in that case the addresses are used as +backup servers. +At this time it is only possible to set configuration before the first +resolve is done. .TP .B ub_ctx_set_stub -Set a stub zone, authoritative dns servers to use for a particular zone. -IP4 or IP6 address. If the address is NULL the stub entry is removed. -Set isprime true if you configure root hints with it. Otherwise similar to -the stub zone item from unbound's config file. Can be called several times, -for different zones, or to add multiple addresses for a particular zone. -At this time it is only possible to set configuration before the -first resolve is done. +Set a stub zone, authoritative dns servers to use for a particular +zone. +IP4 or IP6 address. +If the address is NULL the stub entry is removed. +Set isprime true if you configure root hints with it. +Otherwise similar to the stub zone item from unbound\(aqs config file. +Can be called several times, for different zones, or to add multiple +addresses for a particular zone. +At this time it is only possible to set configuration before the first +resolve is done. .TP .B ub_ctx_set_tls -Enable DNS over TLS (DoT) for machines set with -.B ub_ctx_set_fwd. -At this time it is only possible to set configuration before the -first resolve is done. +Enable DNS over TLS (DoT) for machines set with \fBub_ctx_set_fwd\fP\&. +At this time it is only possible to set configuration before the first +resolve is done. .TP .B ub_ctx_resolvconf -By default the root servers are queried and full resolver mode is used, but -you can use this call to read the list of nameservers to use from the -filename given. -Usually "/etc/resolv.conf". Uses those nameservers as caching proxies. +By default the root servers are queried and full resolver mode is used, +but you can use this call to read the list of nameservers to use from +the filename given. +Usually \fB\(dq/etc/resolv.conf\(dq\fP\&. +Uses those nameservers as caching proxies. If they do not support DNSSEC, validation may fail. Only nameservers are picked up, the searchdomain, ndots and other -settings from \fIresolv.conf\fR(5) are ignored. -If fname NULL is passed, "/etc/resolv.conf" is used (if on Windows, -the system\-wide configured nameserver is picked instead). -At this time it is only possible to set configuration before the -first resolve is done. +settings from \fIresolv.conf(5)\fP are ignored. +If fname NULL is passed, \fB\(dq/etc/resolv.conf\(dq\fP is used (if on +Windows, the system\-wide configured nameserver is picked instead). +At this time it is only possible to set configuration before the first +resolve is done. .TP .B ub_ctx_hosts Read list of hosts from the filename given. -Usually "/etc/hosts". When queried for, these addresses are not marked -DNSSEC secure. If fname NULL is passed, "/etc/hosts" is used -(if on Windows, etc/hosts from WINDIR is picked instead). -At this time it is only possible to set configuration before the -first resolve is done. -.TP -.B -ub_ctx_add_ta +Usually \fB\(dq/etc/hosts\(dq\fP\&. +When queried for, these addresses are not marked DNSSEC secure. +If fname NULL is passed, \fB\(dq/etc/hosts\(dq\fP is used (if on Windows, +\fBetc/hosts\fP from WINDIR is picked instead). +At this time it is only possible to set configuration before the first +resolve is done. +.TP +.B ub_ctx_add_ta Add a trust anchor to the given context. -At this time it is only possible to add trusted keys before the -first resolve is done. +At this time it is only possible to add trusted keys before the first +resolve is done. The format is a string, similar to the zone\-file format, -[domainname] [type] [rdata contents]. Both DS and DNSKEY records are accepted. +\fB[domainname]\fP \fB[type]\fP \fB[rdata contents]\fP\&. +Both DS and DNSKEY records are accepted. .TP .B ub_ctx_add_ta_autr -Add filename with automatically tracked trust anchor to the given context. -Pass name of a file with the managed trust anchor. You can create this -file with \fIunbound\-anchor\fR(8) for the root anchor. You can also -create it with an initial file with one line with a DNSKEY or DS record. +Add filename with automatically tracked trust anchor to the given +context. +Pass name of a file with the managed trust anchor. +You can create this file with +\fI\%unbound\-anchor(8)\fP for the root anchor. +You can also create it with an initial file with one line with a DNSKEY +or DS record. If the file is writable, it is updated when the trust anchor changes. -At this time it is only possible to add trusted keys before the -first resolve is done. +At this time it is only possible to add trusted keys before the first +resolve is done. .TP .B ub_ctx_add_ta_file Add trust anchors to the given context. Pass name of a file with DS and DNSKEY records in zone file format. -At this time it is only possible to add trusted keys before the -first resolve is done. +At this time it is only possible to add trusted keys before the first +resolve is done. .TP .B ub_ctx_trustedkeys Add trust anchors to the given context. -Pass the name of a bind\-style config file with trusted\-keys{}. -At this time it is only possible to add trusted keys before the -first resolve is done. +Pass the name of a bind\-style config file with \fBtrusted\-keys{}\fP\&. +At this time it is only possible to add trusted keys before the first +resolve is done. .TP .B ub_ctx_debugout -Set debug and error log output to the given stream. Pass NULL to disable -output. Default is stderr. File\-names or using syslog can be enabled -using config options, this routine is for using your own stream. +Set debug and error log output to the given stream. +Pass NULL to disable output. +Default is stderr. +File\-names or using syslog can be enabled using config options, this +routine is for using your own stream. .TP .B ub_ctx_debuglevel -Set debug verbosity for the context. Output is directed to stderr. +Set debug verbosity for the context. +Output is directed to stderr. Higher debug level gives more output. .TP .B ub_ctx_async Set a context behaviour for asynchronous action. -if set to true, enables threading and a call to -.B ub_resolve_async +if set to true, enables threading and a call to \fBub_resolve_async\fP creates a thread to handle work in the background. If false, a process is forked to handle work in the background. -Changes to this setting after -.B ub_resolve_async -calls have been made have no effect (delete and re\-create the context -to change). +Changes to this setting after \fBub_resolve_async\fP calls have been made +have no effect (delete and re\-create the context to change). .TP .B ub_poll Poll a context to see if it has any new results. -Do not poll in a loop, instead extract the fd below to poll for readiness, -and then check, or wait using the wait routine. +Do not poll in a loop, instead extract the \fBfd\fP below to poll for +readiness, and then check, or wait using the wait routine. Returns 0 if nothing to read, or nonzero if a result is available. -If nonzero, call -.B ub_process -to do callbacks. +If nonzero, call \fBub_process\fP to do callbacks. .TP .B ub_wait -Wait for a context to finish with results. Calls -.B ub_process -after the wait for you. After the wait, there are no more outstanding -asynchronous queries. +Wait for a context to finish with results. +Calls \fBub_process\fP after the wait for you. +After the wait, there are no more outstanding asynchronous queries. .TP .B ub_fd -Get file descriptor. Wait for it to become readable, at this point -answers are returned from the asynchronous validating resolver. -Then call the \fBub_process\fR to continue processing. +Get file descriptor. +Wait for it to become readable, at this point answers are returned from +the asynchronous validating resolver. +Then call the \fBub_process\fP to continue processing. .TP .B ub_process Call this routine to continue processing results from the validating -resolver (when the fd becomes readable). +resolver (when the \fBfd\fP becomes readable). Will perform necessary callbacks. .TP .B ub_resolve @@ -340,95 +311,111 @@ The result structure is newly allocated with the resulting data. .TP .B ub_resolve_async Perform asynchronous resolution and validation of the target name. -Arguments mean the same as for \fBub_resolve\fR except no -data is returned immediately, instead a callback is called later. -The callback receives a copy of the mydata pointer, that you can use to pass -information to the callback. The callback type is a function pointer to -a function declared as -.IP -void my_callback_function(void* my_arg, int err, -.br - struct ub_result* result); -.IP -The async_id is returned so you can (at your option) decide to track it -and cancel the request if needed. If you pass a NULL pointer the async_id -is not returned. +Arguments mean the same as for \fBub_resolve\fP except no data is +returned immediately, instead a callback is called later. +The callback receives a copy of the mydata pointer, that you can use to +pass information to the callback. +The callback type is a function pointer to a function declared as: +.INDENT 7.0 +.INDENT 3.5 +.sp +.nf +.ft C +void my_callback_function(void* my_arg, int err, + struct ub_result* result); +.ft P +.fi +.UNINDENT +.UNINDENT +.sp +The \fBasync_id\fP is returned so you can (at your option) decide to +track it and cancel the request if needed. +If you pass a NULL pointer the \fBasync_id\fP is not returned. .TP .B ub_cancel -Cancel an async query in progress. This may return an error if the query -does not exist, or the query is already being delivered, in that case you -may still get a callback for the query. +Cancel an async query in progress. +This may return an error if the query does not exist, or the query is +already being delivered, in that case you may still get a callback for +the query. .TP .B ub_resolve_free -Free struct ub_result contents after use. +Free struct \fBub_result\fP contents after use. .TP .B ub_strerror -Convert error value from one of the unbound library functions -to a human readable string. +Convert error value from one of the unbound library functions to a +human readable string. .TP .B ub_ctx_print_local_zones Debug printout the local authority information to debug output. .TP .B ub_ctx_zone_add -Add new zone to local authority info, like local\-zone \fIunbound.conf\fR(5) -statement. +Add new zone to local authority info, like local\-zone +\fI\%unbound.conf(5)\fP statement. .TP .B ub_ctx_zone_remove Delete zone from local authority info. .TP .B ub_ctx_data_add Add resource record data to local authority info, like local\-data -\fIunbound.conf\fR(5) statement. +\fI\%unbound.conf(5)\fP statement. .TP .B ub_ctx_data_remove Delete local authority data from the name given. -.SH "RESULT DATA STRUCTURE" -The result of the DNS resolution and validation is returned as -\fIstruct ub_result\fR. The result structure contains the following entries. -.P +.UNINDENT +.SH RESULT DATA STRUCTURE +.sp +The result of the DNS resolution and validation is returned as \fIstruct +ub_result\fP\&. +The result structure contains the following entries: +.INDENT 0.0 +.INDENT 3.5 +.sp .nf - struct ub_result { - char* qname; /* text string, original question */ - int qtype; /* type code asked for */ - int qclass; /* class code asked for */ - char** data; /* array of rdata items, NULL terminated*/ - int* len; /* array with lengths of rdata items */ - char* canonname; /* canonical name of result */ - int rcode; /* additional error code in case of no data */ - void* answer_packet; /* full network format answer packet */ - int answer_len; /* length of packet in octets */ - int havedata; /* true if there is data */ - int nxdomain; /* true if nodata because name does not exist */ - int secure; /* true if result is secure */ - int bogus; /* true if a security failure happened */ - char* why_bogus; /* string with error if bogus */ - int was_ratelimited; /* true if the query was ratelimited (SERVFAIL) by unbound */ - int ttl; /* number of seconds the result is valid */ - }; +.ft C +struct ub_result { + char* qname; /* text string, original question */ + int qtype; /* type code asked for */ + int qclass; /* class code asked for */ + char** data; /* array of rdata items, NULL terminated*/ + int* len; /* array with lengths of rdata items */ + char* canonname; /* canonical name of result */ + int rcode; /* additional error code in case of no data */ + void* answer_packet; /* full network format answer packet */ + int answer_len; /* length of packet in octets */ + int havedata; /* true if there is data */ + int nxdomain; /* true if nodata because name does not exist */ + int secure; /* true if result is secure */ + int bogus; /* true if a security failure happened */ + char* why_bogus; /* string with error if bogus */ + int was_ratelimited; /* true if the query was ratelimited (SERVFAIL) by unbound */ + int ttl; /* number of seconds the result is valid */ +}; +.ft P .fi -.P -If both secure and bogus are false, security was not enabled for the -domain of the query. Else, they are not both true, one of them is true. -.SH "RETURN VALUES" -Many routines return an error code. The value 0 (zero) denotes no error -happened. Other values can be passed to -.B ub_strerror -to obtain a readable error string. -.B ub_strerror -returns a zero terminated string. -.B ub_ctx_create -returns NULL on an error (a malloc failure). -.B ub_poll -returns true if some information may be available, false otherwise. -.B ub_fd -returns a file descriptor or \-1 on error. -.B ub_ctx_config -and -.B ub_ctx_resolvconf -attempt to leave errno informative on a function return with file read failure. -.SH "SEE ALSO" -\fIunbound.conf\fR(5), -\fIunbound\fR(8). -.SH "AUTHORS" -.B Unbound -developers are mentioned in the CREDITS file in the distribution. +.UNINDENT +.UNINDENT +.sp +If both secure and bogus are false, security was not enabled for the domain of +the query. +Else, they are not both true, one of them is true. +.SH RETURN VALUES +.sp +Many routines return an error code. +The value 0 (zero) denotes no error happened. +Other values can be passed to \fBub_strerror\fP to obtain a readable error +string. +\fBub_strerror\fP returns a zero terminated string. +\fBub_ctx_create\fP returns NULL on an error (a malloc failure). +\fBub_poll\fP returns true if some information may be available, false otherwise. +\fBub_fd\fP returns a file descriptor or \-1 on error. +\fBub_ctx_config\fP and \fBub_ctx_resolvconf\fP attempt to leave errno informative +on a function return with file read failure. +.SH SEE ALSO +.sp +\fI\%unbound.conf(5)\fP, \fI\%unbound(8)\fP\&. +.SH AUTHOR +Unbound developers are mentioned in the CREDITS file in the distribution. +.SH COPYRIGHT +1999-2025, NLnet Labs +.\" Generated by docutils manpage writer. +. diff --git a/contrib/unbound/doc/unbound-anchor.8 b/contrib/unbound/doc/unbound-anchor.8 index 23c1dd4b060f..ba8bd843a67c 100644 --- a/contrib/unbound/doc/unbound-anchor.8 +++ b/contrib/unbound/doc/unbound-anchor.8 @@ -1,189 +1,300 @@ -.TH "unbound-anchor" "8" "Jul 16, 2025" "NLnet Labs" "unbound 1.23.1" -.\" -.\" unbound-anchor.8 -- unbound anchor maintenance utility manual -.\" -.\" Copyright (c) 2008, NLnet Labs. All rights reserved. -.\" -.\" See LICENSE for the license. -.\" -.\" -.SH "NAME" -.B unbound\-anchor -\- Unbound anchor utility. -.SH "SYNOPSIS" -.B unbound\-anchor -.RB [ opts ] -.SH "DESCRIPTION" -.B Unbound\-anchor -performs setup or update of the root trust anchor for DNSSEC validation. -The program fetches the trust anchor with the method from RFC7958 when -regular RFC5011 update fails to bring it up to date. +.\" Man page generated from reStructuredText. +. +. +.nr rst2man-indent-level 0 +. +.de1 rstReportMargin +\\$1 \\n[an-margin] +level \\n[rst2man-indent-level] +level margin: \\n[rst2man-indent\\n[rst2man-indent-level]] +- +\\n[rst2man-indent0] +\\n[rst2man-indent1] +\\n[rst2man-indent2] +.. +.de1 INDENT +.\" .rstReportMargin pre: +. RS \\$1 +. nr rst2man-indent\\n[rst2man-indent-level] \\n[an-margin] +. nr rst2man-indent-level +1 +.\" .rstReportMargin post: +.. +.de UNINDENT +. RE +.\" indent \\n[an-margin] +.\" old: \\n[rst2man-indent\\n[rst2man-indent-level]] +.nr rst2man-indent-level -1 +.\" new: \\n[rst2man-indent\\n[rst2man-indent-level]] +.in \\n[rst2man-indent\\n[rst2man-indent-level]]u +.. +.TH "UNBOUND-ANCHOR" "8" "Oct 22, 2025" "1.24.1" "Unbound" +.SH NAME +unbound-anchor \- Unbound 1.24.1 anchor utility. +.SH SYNOPSIS +.sp +\fBunbound\-anchor\fP [\fBopts\fP] +.SH DESCRIPTION +.sp +\fBunbound\-anchor\fP performs setup or update of the root trust anchor for DNSSEC +validation. +The program fetches the trust anchor with the method from \fI\%RFC 7958\fP when +regular \fI\%RFC 5011\fP update fails to bring it up to date. It can be run (as root) from the commandline, or run as part of startup -scripts. Before you start the \fIunbound\fR(8) DNS server. -.P +scripts. +Before you start the \fI\%unbound(8)\fP DNS server. +.sp Suggested usage: -.P +.INDENT 0.0 +.INDENT 3.5 +.sp .nf - # in the init scripts. - # provide or update the root anchor (if necessary) - unbound-anchor \-a "/var/unbound/root.key" - # Please note usage of this root anchor is at your own risk - # and under the terms of our LICENSE (see source). - # - # start validating resolver - # the unbound.conf contains: - # auto-trust-anchor-file: "/var/unbound/root.key" - unbound \-c unbound.conf +.ft C +# in the init scripts. +# provide or update the root anchor (if necessary) +unbound\-anchor \-a \(dq/var/unbound/root.key\(dq +# Please note usage of this root anchor is at your own risk +# and under the terms of our LICENSE (see source). +# +# start validating resolver +# the unbound.conf contains: +# auto\-trust\-anchor\-file: \(dq/var/unbound/root.key\(dq +unbound \-c unbound.conf +.ft P .fi -.P -This tool provides builtin default contents for the root anchor and root -update certificate files. -.P +.UNINDENT +.UNINDENT +.sp +This tool provides builtin default contents for the root anchor and root update +certificate files. +.sp It tests if the root anchor file works, and if not, and an update is possible, attempts to update the root anchor using the root update certificate. -It performs a https fetch of root-anchors.xml and checks the results (RFC7958), -if all checks are successful, it updates the root anchor file. Otherwise -the root anchor file is unchanged. It performs RFC5011 tracking if the -DNSSEC information available via the DNS makes that possible. -.P -It does not perform an update if the certificate is expired, if the network -is down or other errors occur. -.P +It performs a https fetch of +\fI\%root\-anchors.xml\fP +and checks the results (\fI\%RFC 7958\fP); if all checks are successful, it updates +the root anchor file. +Otherwise the root anchor file is unchanged. +It performs \fI\%RFC 5011\fP tracking if the DNSSEC information available via the +DNS makes that possible. +.sp +It does not perform an update if the certificate is expired, if the network is +down or other errors occur. +.sp The available options are: +.INDENT 0.0 .TP -.B \-a \fIfile +.B \-a The root anchor key file, that is read in and written out. -Default is /var/unbound/root.key. -If the file does not exist, or is empty, a builtin root key is written to it. *** 11839 LINES SKIPPED *** From nobody Fri May 22 20:52:54 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMctG6lQdz6fhQr for ; Fri, 22 May 2026 20:52: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMctG2qQtz3bQg for ; Fri, 22 May 2026 20:52:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779483174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RE4GxZ7vSb1rDoA1G5zDb+4TwEewNzQAW7KwXApokcM=; b=m74YR0WU7/z0tP32IlgoongDhJVHRVg+7Z42MoE6oCxAFFZ6jb7ACpDeRSNP988j3OWr2j FxAhqrGyWeilmbeqVaVkh5J66+qL3qRpdPFy48uUF9DOnFrBg4CUo0dW0nY9zrxWh4uANm X6BzMkYP0KUlRTse0lDwuzn+HxV7+b9X8t84srbFqmKf0TbpmlUmaUuCO7BYZ5UMojmYLe +o1KWkrY+IPBwhAx8+he/YX39M0iqnY0vdE4DMLFBCLkSuPfczE2I/0AlB95zz0Zz9j9F7 pVm31AeFS+HkQdUlN/P1hyRjblk71RbhPtrJPWMSSGbUbsaj+xCOybE9mhvbyg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779483174; a=rsa-sha256; cv=none; b=DNfE+UyPRzoTtYD5WoDuy415xVnwCvH2sJIPgf8SyeUA9Mr/8YZZPey4R3GjdWF7SrqysS Kf2hTfQxhDnHWXq/q6VJQC5iQAj2hMPy3Ns1DvqFWbQ0LFz6dSyzjRILdWYGTR0I1aTx8j S2gOclNanaB/Sshhs2jRK01p9GAbkjlcKEQ6kBsm8Sz2wX5Q4RoZXc3HM59bX7F3jRNF8+ Q3p9wxRVXODTKZEhI2gEmOXTNy1V8Fp/F7TToPMTywj3iDnyAlJoj4DgAlKdzSh147VTEJ 59A0Luy2NKthgZtoneJw7/Q2fdp8NeQGw/Rms4tkv0a0IfGegd1FU5YcqXOptg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779483174; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=RE4GxZ7vSb1rDoA1G5zDb+4TwEewNzQAW7KwXApokcM=; b=GR7BZQxR7nX1BjVrUY4sLbUH95P+UUN0YIalrqI3bq7NFV9cWo7/AROvSpy52qxKpFK1MC 4eClSPd1PVc+URN7tmAA5QXhzesYOowNDgr6EWw8DpEGBjW1yBHIrkfoNNGiA8A3MAfAYH dbjYuTKiM8MsxLP80OjDpJgHojGtlbV9xk3t9CedCBs8x4Ix1miEMrr51T05OhQ6YhiDng IWpZ+mrrCdx0uR/prkizkNhOqn1IndogQ/up+z3+YHKWJhqcGIdbyW4dGdZX7jolUO0a/b AkOsNJpOBSr2nasSqc+/Xdm5eP6GJIbu2cwMddJznnFiT6zhIJ2V/5OJIQpZYA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMctG2KS2zdW8 for ; Fri, 22 May 2026 20:52:54 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1cf19 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 20:52:54 +0000 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=B8rg?=rav Subject: git: 22fa41b4e81a - main - unbound: Update to 1.24.2 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 22fa41b4e81ad91d11e28f1837764730d744d4e4 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 20:52:54 +0000 Message-Id: <6a10c226.1cf19.1b9ad872@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=22fa41b4e81ad91d11e28f1837764730d744d4e4 commit 22fa41b4e81ad91d11e28f1837764730d744d4e4 Merge: 290190b26c09 ec5b94f552d7 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-22 20:16:26 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-22 20:16:26 +0000 unbound: Update to 1.24.2 Merge commit 'ec5b94f552d7cb2a9d456c67e9941bcf5e3698bf' This is purely cosmetic as we already had the functional changes. MFC after: 1 week contrib/unbound/config.h.in | 10 +- contrib/unbound/configure | 4673 ++++++++++++++++------------ contrib/unbound/configure.ac | 3 +- contrib/unbound/doc/README | 2 +- contrib/unbound/doc/example.conf | 2 +- contrib/unbound/doc/example.conf.in | 2 +- contrib/unbound/doc/libunbound.3 | 4 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8 | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 4 +- contrib/unbound/doc/unbound-checkconf.8 | 4 +- contrib/unbound/doc/unbound-checkconf.8.in | 4 +- contrib/unbound/doc/unbound-control.8 | 4 +- contrib/unbound/doc/unbound-control.8.in | 4 +- contrib/unbound/doc/unbound-host.1 | 4 +- contrib/unbound/doc/unbound-host.1.in | 4 +- contrib/unbound/doc/unbound.8 | 4 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5 | 4 +- contrib/unbound/doc/unbound.conf.5.in | 4 +- lib/libunbound/config.h | 16 +- 21 files changed, 2774 insertions(+), 1990 deletions(-) diff --cc contrib/unbound/doc/example.conf index 56bb3247b20e,000000000000..ba9fee412d7b mode 100644,000000..100644 --- a/contrib/unbound/doc/example.conf +++ b/contrib/unbound/doc/example.conf @@@ -1,1424 -1,0 +1,1424 @@@ +# +# Example configuration file. +# - # See unbound.conf(5) man page, version 1.24.1. ++# See unbound.conf(5) man page, version 1.24.2. +# +# this is a comment. + +# Use this anywhere in the file to include other text into this file. +#include: "otherfile.conf" + +# Use this anywhere in the file to include other text, that explicitly starts a +# clause, into this file. Text after this directive needs to start a clause. +#include-toplevel: "otherfile.conf" + +# The server clause sets the main parameters. +server: + # whitespace is not necessary, but looks cleaner. + + # verbosity number, 0 is least verbose. 1 is default. + # verbosity: 1 + + # print statistics to the log (for every thread) every N seconds. + # Set to "" or 0 to disable. Default is disabled. + # statistics-interval: 0 + + # enable shm for stats, default no. if you enable also enable + # statistics-interval, every time it also writes stats to the + # shared memory segment keyed with shm-key. + # shm-enable: no + + # shm for stats uses this key, and key+1 for the shared mem segment. + # shm-key: 11777 + + # enable cumulative statistics, without clearing them after printing. + # statistics-cumulative: no + + # enable extended statistics (query types, answer codes, status) + # printed from unbound-control. Default off, because of speed. + # extended-statistics: no + + # Inhibits selected extended statistics (qtype, qclass, qopcode, rcode, + # rpz-actions) from printing if their value is 0. + # Default on. + # statistics-inhibit-zero: yes + + # number of threads to create. 1 disables threading. + # num-threads: 1 + + # specify the interfaces to answer queries from by ip-address. + # The default is to listen to localhost (127.0.0.1 and ::1). + # specify 0.0.0.0 and ::0 to bind to all available interfaces. + # specify every interface[@port] on a new 'interface:' labelled line. + # The listen interfaces are not changed on reload, only on restart. + # interface: 192.0.2.153 + # interface: 192.0.2.154 + # interface: 192.0.2.154@5003 + # interface: 2001:DB8::5 + # interface: eth0@5003 + + # enable this feature to copy the source address of queries to reply. + # Socket options are not supported on all platforms. experimental. + # interface-automatic: no + + # instead of the default port, open additional ports separated by + # spaces when interface-automatic is enabled, by listing them here. + # interface-automatic-ports: "" + + # port to answer queries from + # port: 53 + + # specify the interfaces to send outgoing queries to authoritative + # server from by ip-address. If none, the default (all) interface + # is used. Specify every interface on a 'outgoing-interface:' line. + # outgoing-interface: 192.0.2.153 + # outgoing-interface: 2001:DB8::5 + # outgoing-interface: 2001:DB8::6 + + # Specify a netblock to use remainder 64 bits as random bits for + # upstream queries. Uses freebind option (Linux). + # outgoing-interface: 2001:DB8::/64 + # Also (Linux:) ip -6 addr add 2001:db8::/64 dev lo + # And: ip -6 route add local 2001:db8::/64 dev lo + # And set prefer-ip6: yes to use the ip6 randomness from a netblock. + # Set this to yes to prefer ipv6 upstream servers over ipv4. + # prefer-ip6: no + + # Prefer ipv4 upstream servers, even if ipv6 is available. + # prefer-ip4: no + + # number of ports to allocate per thread, determines the size of the + # port range that can be open simultaneously. About double the + # num-queries-per-thread, or, use as many as the OS will allow you. + # outgoing-range: 4096 + + # permit Unbound to use this port number or port range for + # making outgoing queries, using an outgoing interface. + # outgoing-port-permit: 32768 + + # deny Unbound the use this of port number or port range for + # making outgoing queries, using an outgoing interface. + # Use this to make sure Unbound does not grab a UDP port that some + # other server on this computer needs. The default is to avoid + # IANA-assigned port numbers. + # If multiple outgoing-port-permit and outgoing-port-avoid options + # are present, they are processed in order. + # outgoing-port-avoid: "3200-3208" + + # number of outgoing simultaneous tcp buffers to hold per thread. + # outgoing-num-tcp: 10 + + # number of incoming simultaneous tcp buffers to hold per thread. + # incoming-num-tcp: 10 + + # buffer size for UDP port 53 incoming (SO_RCVBUF socket option). + # 0 is system default. Use 4m to catch query spikes for busy servers. + # so-rcvbuf: 0 + + # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option). + # 0 is system default. Set larger to handle spikes on very busy servers. + # so-sndbuf: 4m + + # use SO_REUSEPORT to distribute queries over threads. + # at extreme load it could be better to turn it off to distribute even. + # so-reuseport: yes + + # use IP_TRANSPARENT so the interface: addresses can be non-local + # and you can config non-existing IPs that are going to work later on + # (uses IP_BINDANY on FreeBSD). + # ip-transparent: no + + # use IP_FREEBIND so the interface: addresses can be non-local + # and you can bind to nonexisting IPs and interfaces that are down. + # Linux only. On Linux you also have ip-transparent that is similar. + # ip-freebind: no + + # the value of the Differentiated Services Codepoint (DSCP) + # in the differentiated services field (DS) of the outgoing + # IP packets + # ip-dscp: 0 + + # EDNS reassembly buffer to advertise to UDP peers (the actual buffer + # is set with msg-buffer-size). + # edns-buffer-size: 1232 + + # Maximum UDP response size (not applied to TCP response). + # Suggested values are 512 to 4096. Default is 1232. 65536 disables it. + # max-udp-size: 1232 + + # max memory to use for stream(tcp and tls) waiting result buffers. + # stream-wait-size: 4m + + # buffer size for handling DNS data. No messages larger than this + # size can be sent or received, by UDP or TCP. In bytes. + # msg-buffer-size: 65552 + + # the amount of memory to use for the message cache. + # plain value in bytes or you can append k, m or G. default is "4Mb". + # msg-cache-size: 4m + + # the number of slabs to use for the message cache. + # the number of slabs must be a power of 2. + # more slabs reduce lock contention, but fragment memory usage. + # msg-cache-slabs: 4 + + # the number of queries that a thread gets to service. + # num-queries-per-thread: 2048 + + # if very busy, 50% queries run to completion, 50% get timeout in msec + # jostle-timeout: 200 + + # msec to wait before close of port on timeout UDP. 0 disables. + # delay-close: 0 + + # perform connect for UDP sockets to mitigate ICMP side channel. + # udp-connect: yes + + # The number of retries, per upstream nameserver in a delegation, when + # a throwaway response (also timeouts) is received. + # outbound-msg-retry: 5 + + # Hard limit on the number of outgoing queries Unbound will make while + # resolving a name, making sure large NS sets do not loop. + # It resets on query restarts (e.g., CNAME) and referrals. + # max-sent-count: 32 + + # Hard limit on the number of times Unbound is allowed to restart a + # query upon encountering a CNAME record. + # max-query-restarts: 11 + + # Limit on number of NS records in NS RRset for incoming packets. + # iter-scrub-ns: 20 + + # Limit on number of CNAME, DNAME records for incoming packets. + # iter-scrub-cname: 11 + + # Limit on upstream queries for an incoming query and its recursion. + # max-global-quota: 200 + + # Should the scrubber remove promiscuous NS from positive answers, + # protects against poison attempts. + # iter-scrub-promiscuous: yes + + # msec for waiting for an unknown server to reply. Increase if you + # are behind a slow satellite link, to eg. 1128. + # unknown-server-time-limit: 376 + + # msec before recursion replies are dropped. The work item continues. + # discard-timeout: 1900 + + # Max number of replies waiting for recursion per IP address. + # wait-limit: 1000 + + # Max replies waiting for recursion for IP address with cookie. + # wait-limit-cookie: 10000 + + # Apart from the default, the wait limit can be set for a netblock. + # wait-limit-netblock: 192.0.2.0/24 50000 + + # Apart from the default, the wait limit with cookie can be adjusted. + # wait-limit-cookie-netblock: 192.0.2.0/24 50000 + + # Defaults for loopback, it has no wait limit. + # wait-limit-netblock: 127.0.0.0/8 -1 + # wait-limit-netblock: ::1/128 -1 + # wait-limit-cookie-netblock: 127.0.0.0/8 -1 + # wait-limit-cookie-netblock: ::1/128 -1 + + # the amount of memory to use for the RRset cache. + # plain value in bytes or you can append k, m or G. default is "4Mb". + # rrset-cache-size: 4m + + # the number of slabs to use for the RRset cache. + # the number of slabs must be a power of 2. + # more slabs reduce lock contention, but fragment memory usage. + # rrset-cache-slabs: 4 + + # the time to live (TTL) value lower bound, in seconds. Default 0. + # If more than an hour could easily give trouble due to stale data. + # cache-min-ttl: 0 + + # the time to live (TTL) value cap for RRsets and messages in the + # cache. Items are not cached for longer. In seconds. + # cache-max-ttl: 86400 + + # the time to live (TTL) value cap for negative responses in the cache + # cache-max-negative-ttl: 3600 + + # the time to live (TTL) value lower bound, in seconds. Default 0. + # For negative responses in the cache. If disabled, default, + # cache-min-ttl applies if configured. + # cache-min-negative-ttl: 0 + + # the time to live (TTL) value for cached roundtrip times, lameness and + # EDNS version information for hosts. In seconds. + # infra-host-ttl: 900 + + # minimum wait time for responses, increase if uplink is long. In msec. + # infra-cache-min-rtt: 50 + + # maximum wait time for responses. In msec. + # infra-cache-max-rtt: 120000 + + # enable to make server probe down hosts more frequently. + # infra-keep-probing: no + + # the number of slabs to use for the Infrastructure cache. + # the number of slabs must be a power of 2. + # more slabs reduce lock contention, but fragment memory usage. + # infra-cache-slabs: 4 + + # the maximum number of hosts that are cached (roundtrip, EDNS, lame). + # infra-cache-numhosts: 10000 + + # define a number of tags here, use with local-zone, access-control, + # interface-*. + # repeat the define-tag statement to add additional tags. + # define-tag: "tag1 tag2 tag3" + + # Enable IPv4, "yes" or "no". + # do-ip4: yes + + # Enable IPv6, "yes" or "no". + # do-ip6: yes + + # If running unbound on an IPv6-only host, domains that only have + # IPv4 servers would become unresolvable. If NAT64 is available in + # the network, unbound can use NAT64 to reach these servers with + # the following option. This is NOT needed for enabling DNS64 on a + # system that has IPv4 connectivity. + # Consider also enabling prefer-ip6 to prefer native IPv6 connections + # to nameservers. + # do-nat64: no + + # NAT64 prefix. Defaults to using dns64-prefix value. + # nat64-prefix: 64:ff9b::0/96 + + # Enable UDP, "yes" or "no". + # do-udp: yes + + # Enable TCP, "yes" or "no". + # do-tcp: yes + + # upstream connections use TCP only (and no UDP), "yes" or "no" + # useful for tunneling scenarios, default no. + # tcp-upstream: no + + # upstream connections also use UDP (even if do-udp is no). + # useful if if you want UDP upstream, but don't provide UDP downstream. + # udp-upstream-without-downstream: no + + # Maximum segment size (MSS) of TCP socket on which the server + # responds to queries. Default is 0, system default MSS. + # tcp-mss: 0 + + # Maximum segment size (MSS) of TCP socket for outgoing queries. + # Default is 0, system default MSS. + # outgoing-tcp-mss: 0 + + # Idle TCP timeout, connection closed in milliseconds + # tcp-idle-timeout: 30000 + + # Enable EDNS TCP keepalive option. + # edns-tcp-keepalive: no + + # Timeout for EDNS TCP keepalive, in msec. Overrides tcp-idle-timeout + # if edns-tcp-keepalive is set. + # edns-tcp-keepalive-timeout: 120000 + + # UDP queries that have waited in the socket buffer for a long time + # can be dropped. Default is 0, disabled. In seconds, such as 3. + # sock-queue-timeout: 0 + + # Use systemd socket activation for UDP, TCP, and control sockets. + # use-systemd: no + + # Detach from the terminal, run in background, "yes" or "no". + # Set the value to "no" when Unbound runs as systemd service. + # do-daemonize: yes + + # control which clients are allowed to make (recursive) queries + # to this server. Specify classless netblocks with /size and action. + # By default everything is refused, except for localhost. + # Choose deny (drop message), refuse (polite error reply), + # allow (recursive ok), allow_setrd (recursive ok, rd bit is forced on), + # allow_snoop (recursive and nonrecursive ok) + # allow_cookie (allow UDP with valid cookie or stateful transport) + # deny_non_local (drop queries unless can be answered from local-data) + # refuse_non_local (like deny_non_local but polite error reply). + # access-control: 127.0.0.0/8 allow + # access-control: ::1 allow + # access-control: ::ffff:127.0.0.1 allow + + # tag access-control with list of tags (in "" with spaces between) + # Clients using this access control element use localzones that + # are tagged with one of these tags. + # access-control-tag: 192.0.2.0/24 "tag2 tag3" + + # set action for particular tag for given access control element. + # if you have multiple tag values, the tag used to lookup the action + # is the first tag match between access-control-tag and local-zone-tag + # where "first" comes from the order of the define-tag values. + # access-control-tag-action: 192.0.2.0/24 tag3 refuse + + # set redirect data for particular tag for access control element + # access-control-tag-data: 192.0.2.0/24 tag2 "A 127.0.0.1" + + # Set view for access control element + # access-control-view: 192.0.2.0/24 viewname + + # Similar to 'access-control:' but for interfaces. + # Control which listening interfaces are allowed to accept (recursive) + # queries for this server. + # The specified interfaces should be the same as the ones specified in + # 'interface:' followed by the action. + # The actions are the same as 'access-control:' above. + # By default all the interfaces configured are refused. + # Note: any 'access-control*:' setting overrides all 'interface-*:' + # settings for targeted clients. + # interface-action: 192.0.2.153 allow + # interface-action: 192.0.2.154 allow + # interface-action: 192.0.2.154@5003 allow + # interface-action: 2001:DB8::5 allow + # interface-action: eth0@5003 allow + + # Similar to 'access-control-tag:' but for interfaces. + # Tag interfaces with a list of tags (in "" with spaces between). + # Interfaces using these tags use localzones that are tagged with one + # of these tags. + # The specified interfaces should be the same as the ones specified in + # 'interface:' followed by the list of tags. + # Note: any 'access-control*:' setting overrides all 'interface-*:' + # settings for targeted clients. + # interface-tag: eth0@5003 "tag2 tag3" + + # Similar to 'access-control-tag-action:' but for interfaces. + # Set action for particular tag for a given interface element. + # If you have multiple tag values, the tag used to lookup the action + # is the first tag match between interface-tag and local-zone-tag + # where "first" comes from the order of the define-tag values. + # The specified interfaces should be the same as the ones specified in + # 'interface:' followed by the tag and action. + # Note: any 'access-control*:' setting overrides all 'interface-*:' + # settings for targeted clients. + # interface-tag-action: eth0@5003 tag3 refuse + + # Similar to 'access-control-tag-data:' but for interfaces. + # Set redirect data for a particular tag for an interface element. + # The specified interfaces should be the same as the ones specified in + # 'interface:' followed by the tag and the redirect data. + # Note: any 'access-control*:' setting overrides all 'interface-*:' + # settings for targeted clients. + # interface-tag-data: eth0@5003 tag2 "A 127.0.0.1" + + # Similar to 'access-control-view:' but for interfaces. + # Set view for an interface element. + # The specified interfaces should be the same as the ones specified in + # 'interface:' followed by the view name. + # Note: any 'access-control*:' setting overrides all 'interface-*:' + # settings for targeted clients. + # interface-view: eth0@5003 viewname + + # if given, a chroot(2) is done to the given directory. + # i.e. you can chroot to the working directory, for example, + # for extra security, but make sure all files are in that directory. + # + # If chroot is enabled, you should pass the configfile (from the + # commandline) as a full path from the original root. After the + # chroot has been performed the now defunct portion of the config + # file path is removed to be able to reread the config after a reload. + # + # All other file paths (working dir, logfile, roothints, and + # key files) can be specified in several ways: + # o as an absolute path relative to the new root. + # o as a relative path to the working directory. + # o as an absolute path relative to the original root. + # In the last case the path is adjusted to remove the unused portion. + # + # The pid file can be absolute and outside of the chroot, it is + # written just prior to performing the chroot and dropping permissions. + # + # Additionally, Unbound may need to access /dev/urandom (for entropy). + # How to do this is specific to your OS. + # + # If you give "" no chroot is performed. The path must not end in a /. + # chroot: "/var/unbound" + + # if given, user privileges are dropped (after binding port), + # and the given username is assumed. Default is user "unbound". + # If you give "" no privileges are dropped. + # username: "unbound" + + # the working directory. The relative files in this config are + # relative to this directory. If you give "" the working directory + # is not changed. + # If you give a server: directory: dir before include: file statements + # then those includes can be relative to the working directory. + # directory: "/var/unbound" + + # the log file, "" means log to stderr. + # Use of this option sets use-syslog to "no". + # logfile: "" + + # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to + # log to. If yes, it overrides the logfile. + # use-syslog: yes + + # Log identity to report. if empty, defaults to the name of argv[0] + # (usually "unbound"). + # log-identity: "" + + # print UTC timestamp in ascii to logfile, default is epoch in seconds. + # log-time-ascii: no + + # log timestamp in ISO8601 format if also log-time-ascii is enabled. + # (y-m-dTh:m:s.msec[+-]tzhours:tzminutes) + # log-time-iso: no + + # print one line with time, IP, name, type, class for every query. + # log-queries: no + + # print one line per reply, with time, IP, name, type, class, rcode, + # timetoresolve, fromcache and responsesize. + # log-replies: no + + # log with tag 'query' and 'reply' instead of 'info' for + # filtering log-queries and log-replies from the log. + # log-tag-queryreply: no + + # log with destination address, port and type for log-replies. + # log-destaddr: no + + # log the local-zone actions, like local-zone type inform is enabled + # also for the other local zone types. + # log-local-actions: no + + # print log lines that say why queries return SERVFAIL to clients. + # log-servfail: no + + # the pid file. Can be an absolute path outside of chroot/work dir. + # pidfile: "/var/unbound/unbound.pid" + + # file to read root hints from. + # get one from https://www.internic.net/domain/named.cache + # root-hints: "" + + # enable to not answer id.server and hostname.bind queries. + # hide-identity: no + + # enable to not answer version.server and version.bind queries. + # hide-version: no + + # enable to not answer trustanchor.unbound queries. + # hide-trustanchor: no + + # enable to not set the User-Agent HTTP header. + # hide-http-user-agent: no + + # the identity to report. Leave "" or default to return hostname. + # identity: "" + + # the version to report. Leave "" or default to return package version. + # version: "" + + # NSID identity (hex string, or "ascii_somestring"). default disabled. + # nsid: "aabbccdd" + + # User-Agent HTTP header to use. Leave "" or default to use package name + # and version. + # http-user-agent: "" + + # the target fetch policy. + # series of integers describing the policy per dependency depth. + # The number of values in the list determines the maximum dependency + # depth the recursor will pursue before giving up. Each integer means: + # -1 : fetch all targets opportunistically, + # 0: fetch on demand, + # positive value: fetch that many targets opportunistically. + # Enclose the list of numbers between quotes (""). + # target-fetch-policy: "3 2 1 0 0" + + # Harden against very small EDNS buffer sizes. + # harden-short-bufsize: yes + + # Harden against unseemly large queries. + # harden-large-queries: no + + # Harden against out of zone rrsets, to avoid spoofing attempts. + # harden-glue: yes + + # Harden against unverified (outside-zone, including sibling zone) glue rrsets + # harden-unverified-glue: no + + # Harden against receiving dnssec-stripped data. If you turn it + # off, failing to validate dnskey data for a trustanchor will + # trigger insecure mode for that zone (like without a trustanchor). + # Default on, which insists on dnssec data for trust-anchored zones. + # harden-dnssec-stripped: yes + + # Harden against queries that fall under dnssec-signed nxdomain names. + # harden-below-nxdomain: yes + + # Harden the referral path by performing additional queries for + # infrastructure data. Validates the replies (if possible). + # Default off, because the lookups burden the server. Experimental + # implementation of draft-wijngaards-dnsext-resolver-side-mitigation. + # harden-referral-path: no + + # Harden against algorithm downgrade when multiple algorithms are + # advertised in the DS record. If no, allows any algorithm + # to validate the zone which is the standard behavior for validators. + # Check the manpage for detailed information. + # harden-algo-downgrade: no + + # Harden against unknown records in the authority section and the + # additional section. + # harden-unknown-additional: no + + # Sent minimum amount of information to upstream servers to enhance + # privacy. Only sent minimum required labels of the QNAME and set QTYPE + # to A when possible. + # qname-minimisation: yes + + # QNAME minimisation in strict mode. Do not fall-back to sending full + # QNAME to potentially broken nameservers. A lot of domains will not be + # resolvable when this option in enabled. + # This option only has effect when qname-minimisation is enabled. + # qname-minimisation-strict: no + + # Aggressive NSEC uses the DNSSEC NSEC chain to synthesize NXDOMAIN + # and other denials, using information from previous NXDOMAINs answers. + # aggressive-nsec: yes + + # Use 0x20-encoded random bits in the query to foil spoof attempts. + # This feature is an experimental implementation of draft dns-0x20. + # use-caps-for-id: no + + # Domains (and domains in them) without support for dns-0x20 and + # the fallback fails because they keep sending different answers. + # caps-exempt: "licdn.com" + # caps-exempt: "senderbase.org" + + # Enforce privacy of these addresses. Strips them away from answers. + # It may cause DNSSEC validation to additionally mark it as bogus. + # Protects against 'DNS Rebinding' (uses browser as network proxy). + # Only 'private-domain' and 'local-data' names are allowed to have + # these private addresses. No default. + # private-address: 10.0.0.0/8 + # private-address: 172.16.0.0/12 + # private-address: 192.168.0.0/16 + # private-address: 169.254.0.0/16 + # private-address: fd00::/8 + # private-address: fe80::/10 + # private-address: ::ffff:0:0/96 + + # Allow the domain (and its subdomains) to contain private addresses. + # local-data statements are allowed to contain private addresses too. + # private-domain: "example.com" + + # If nonzero, unwanted replies are not only reported in statistics, + # but also a running total is kept per thread. If it reaches the + # threshold, a warning is printed and a defensive action is taken, + # the cache is cleared to flush potential poison out of it. + # A suggested value is 10000000, the default is 0 (turned off). + # unwanted-reply-threshold: 0 + + # Do not query the following addresses. No DNS queries are sent there. + # List one address per entry. List classless netblocks with /size, + # do-not-query-address: 127.0.0.1/8 + # do-not-query-address: ::1 + + # if yes, the above default do-not-query-address entries are present. + # if no, localhost can be queried (for testing and debugging). + # do-not-query-localhost: yes + + # if yes, perform prefetching of almost expired message cache entries. + # prefetch: no + + # if yes, perform key lookups adjacent to normal lookups. + # prefetch-key: no + + # deny queries of type ANY with an empty response. + # deny-any: no + + # if yes, Unbound rotates RRSet order in response. + # rrset-roundrobin: yes + + # if yes, Unbound doesn't insert authority/additional sections + # into response messages when those sections are not required. + # minimal-responses: yes + + # true to disable DNSSEC lameness check in iterator. + # disable-dnssec-lame-check: no + + # module configuration of the server. A string with identifiers + # separated by spaces. Syntax: "[dns64] [validator] iterator" + # most modules have to be listed at the beginning of the line, + # except cachedb(just before iterator), and python (at the beginning, + # or, just before the iterator). + # module-config: "validator iterator" + + # File with trusted keys, kept uptodate using RFC5011 probes, + # initial file like trust-anchor-file, then it stores metadata. + # Use several entries, one per domain name, to track multiple zones. + # + # If you want to perform DNSSEC validation, run unbound-anchor before + # you start Unbound (i.e. in the system boot scripts). + # And then enable the auto-trust-anchor-file config item. + # Please note usage of unbound-anchor root anchor is at your own risk + # and under the terms of our LICENSE (see that file in the source). + # auto-trust-anchor-file: "/var/unbound/root.key" + + # trust anchor signaling sends a RFC8145 key tag query after priming. + # trust-anchor-signaling: yes + + # Root key trust anchor sentinel (draft-ietf-dnsop-kskroll-sentinel) + # root-key-sentinel: yes + + # File with trusted keys for validation. Specify more than one file + # with several entries, one file per entry. + # Zone file format, with DS and DNSKEY entries. + # Note this gets out of date, use auto-trust-anchor-file please. + # trust-anchor-file: "" + + # Trusted key for validation. DS or DNSKEY. specify the RR on a + # single line, surrounded by "". TTL is ignored. class is IN default. + # Note this gets out of date, use auto-trust-anchor-file please. + # (These examples are from August 2007 and may not be valid anymore). + # trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ==" + # trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A" + + # File with trusted keys for validation. Specify more than one file + # with several entries, one file per entry. Like trust-anchor-file + # but has a different file format. Format is BIND-9 style format, + # the trusted-keys { name flag proto algo "key"; }; clauses are read. + # you need external update procedures to track changes in keys. + # trusted-keys-file: "" + + # Ignore chain of trust. Domain is treated as insecure. + # domain-insecure: "example.com" + + # Override the date for validation with a specific fixed date. + # Do not set this unless you are debugging signature inception + # and expiration. "" or "0" turns the feature off. -1 ignores date. + # val-override-date: "" + + # The time to live for bogus data, rrsets and messages. This avoids + # some of the revalidation, until the time interval expires. in secs. + # val-bogus-ttl: 60 + + # The signature inception and expiration dates are allowed to be off + # by 10% of the signature lifetime (expir-incep) from our local clock. + # This leeway is capped with a minimum and a maximum. In seconds. + # val-sig-skew-min: 3600 + # val-sig-skew-max: 86400 + + # The maximum number the validator should restart validation with + # another authority in case of failed validation. + # val-max-restart: 5 + + # Should additional section of secure message also be kept clean of + # unsecure data. Useful to shield the users of this validator from + # potential bogus data in the additional section. All unsigned data + # in the additional section is removed from secure messages. + # val-clean-additional: yes + + # Turn permissive mode on to permit bogus messages. Thus, messages + # for which security checks failed will be returned to clients, + # instead of SERVFAIL. It still performs the security checks, which + # result in interesting log files and possibly the AD bit in + # replies if the message is found secure. The default is off. + # val-permissive-mode: no + + # Ignore the CD flag in incoming queries and refuse them bogus data. + # Enable it if the only clients of Unbound are legacy servers (w2008) + # that set CD but cannot validate themselves. + # ignore-cd-flag: no + + # Disable the DO flag in outgoing requests. It is helpful for upstream + # devices that cannot handle DNSSEC information. But do not enable it + # otherwise, because it would stop DNSSEC validation. + # disable-edns-do: no + + # Serve expired responses from cache, with serve-expired-reply-ttl in + # the response. By default it first tries to refresh an expired answer. + # Can be configured with serve-expired-client-timeout. + # serve-expired: no + # + # Limit serving of expired responses to configured seconds after + # expiration. 0 disables the limit. + # serve-expired-ttl: 86400 + # + # Set the TTL of expired records to the serve-expired-ttl value after a + # failed attempt to retrieve the record from upstream. This makes sure + # that the expired records will be served as long as there are queries + # for it. + # serve-expired-ttl-reset: no + # + # TTL value to use when replying with expired data. + # serve-expired-reply-ttl: 30 + # + # Time in milliseconds before replying to the client with expired data. + # This essentially enables the serve-stale behavior as specified in + # RFC 8767 that first tries to resolve before immediately responding + # with expired data. 0 disables this behavior. + # serve-expired-client-timeout: 1800 + + # Return the original TTL as received from the upstream name server rather + # than the decrementing TTL as stored in the cache. Enabling this feature + # does not impact cache expiry, it only changes the TTL Unbound embeds in + # responses to queries. Note that enabling this feature implicitly disables + # enforcement of the configured minimum and maximum TTL. + # serve-original-ttl: no + + # Have the validator log failed validations for your diagnosis. + # 0: off. 1: A line per failed user query. 2: With reason and bad IP. + # val-log-level: 0 + + # It is possible to configure NSEC3 maximum iteration counts per + # keysize. Keep this table very short, as linear search is done. + # A message with an NSEC3 with larger count is marked insecure. + # List in ascending order the keysize and count values. + # val-nsec3-keysize-iterations: "1024 150 2048 150 4096 150" + + # if enabled, ZONEMD verification failures do not block the zone. + # zonemd-permissive-mode: no + + # instruct the auto-trust-anchor-file probing to add anchors after ttl. + # add-holddown: 2592000 # 30 days + + # instruct the auto-trust-anchor-file probing to del anchors after ttl. + # del-holddown: 2592000 # 30 days + + # auto-trust-anchor-file probing removes missing anchors after ttl. + # If the value 0 is given, missing anchors are not removed. + # keep-missing: 31622400 # 366 days + + # debug option that allows very small holddown times for key rollover, + # otherwise the RFC mandates probe intervals must be at least 1 hour. + # permit-small-holddown: no + + # the amount of memory to use for the key cache. + # plain value in bytes or you can append k, m or G. default is "4Mb". + # key-cache-size: 4m + + # the number of slabs to use for the key cache. + # the number of slabs must be a power of 2. + # more slabs reduce lock contention, but fragment memory usage. + # key-cache-slabs: 4 + + # the amount of memory to use for the negative cache. + # plain value in bytes or you can append k, m or G. default is "1Mb". + # neg-cache-size: 1m + + # By default, for a number of zones a small default 'nothing here' + # reply is built-in. Query traffic is thus blocked. If you + # wish to serve such zone you can unblock them by uncommenting one + # of the nodefault statements below. + # You may also have to use domain-insecure: zone to make DNSSEC work, + # unless you have your own trust anchors for this zone. + # local-zone: "localhost." nodefault + # local-zone: "127.in-addr.arpa." nodefault + # local-zone: "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." nodefault + # local-zone: "home.arpa." nodefault + # local-zone: "resolver.arpa." nodefault + # local-zone: "service.arpa." nodefault + # local-zone: "onion." nodefault + # local-zone: "test." nodefault + # local-zone: "invalid." nodefault + # local-zone: "10.in-addr.arpa." nodefault + # local-zone: "16.172.in-addr.arpa." nodefault + # local-zone: "17.172.in-addr.arpa." nodefault + # local-zone: "18.172.in-addr.arpa." nodefault + # local-zone: "19.172.in-addr.arpa." nodefault + # local-zone: "20.172.in-addr.arpa." nodefault + # local-zone: "21.172.in-addr.arpa." nodefault + # local-zone: "22.172.in-addr.arpa." nodefault + # local-zone: "23.172.in-addr.arpa." nodefault + # local-zone: "24.172.in-addr.arpa." nodefault + # local-zone: "25.172.in-addr.arpa." nodefault + # local-zone: "26.172.in-addr.arpa." nodefault + # local-zone: "27.172.in-addr.arpa." nodefault + # local-zone: "28.172.in-addr.arpa." nodefault + # local-zone: "29.172.in-addr.arpa." nodefault + # local-zone: "30.172.in-addr.arpa." nodefault + # local-zone: "31.172.in-addr.arpa." nodefault + # local-zone: "168.192.in-addr.arpa." nodefault + # local-zone: "0.in-addr.arpa." nodefault + # local-zone: "254.169.in-addr.arpa." nodefault + # local-zone: "2.0.192.in-addr.arpa." nodefault + # local-zone: "100.51.198.in-addr.arpa." nodefault + # local-zone: "113.0.203.in-addr.arpa." nodefault + # local-zone: "255.255.255.255.in-addr.arpa." nodefault + # local-zone: "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." nodefault + # local-zone: "d.f.ip6.arpa." nodefault + # local-zone: "8.e.f.ip6.arpa." nodefault + # local-zone: "9.e.f.ip6.arpa." nodefault + # local-zone: "a.e.f.ip6.arpa." nodefault + # local-zone: "b.e.f.ip6.arpa." nodefault + # local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault + # And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa. + + # Add example.com into ipset + # local-zone: "example.com" ipset + + # If Unbound is running service for the local host then it is useful + # to perform lan-wide lookups to the upstream, and unblock the + # long list of local-zones above. If this Unbound is a dns server + # for a network of computers, disabled is better and stops information + # leakage of local lan information. + # unblock-lan-zones: no + + # The insecure-lan-zones option disables validation for + # these zones, as if they were all listed as domain-insecure. + # insecure-lan-zones: no + + # a number of locally served zones can be configured. + # local-zone: + # local-data: "" + # o deny serves local data (if any), else, drops queries. + # o refuse serves local data (if any), else, replies with error. + # o static serves local data, else, nxdomain or nodata answer. + # o transparent gives local data, but resolves normally for other names + # o redirect serves the zone data for any subdomain in the zone. + # o nodefault can be used to normally resolve AS112 zones. + # o typetransparent resolves normally for other types and other names + # o inform acts like transparent, but logs client IP address + # o inform_deny drops queries and logs client IP address + # o inform_redirect redirects queries and logs client IP address + # o always_transparent, always_refuse, always_nxdomain, always_nodata, + # always_deny resolve in that way but ignore local data for + # that name + # o block_a resolves all records normally but returns + # NODATA for A queries and ignores local data for that name + # o always_null returns 0.0.0.0 or ::0 for any name in the zone. + # o noview breaks out of that view towards global local-zones. + # + # defaults are localhost address, reverse for 127.0.0.1 and ::1 + # and nxdomain for AS112 zones. If you configure one of these zones + # the default content is omitted, or you can omit it with 'nodefault'. + # + # If you configure local-data without specifying local-zone, by + # default a transparent local-zone is created for the data. + # + # You can add locally served data with + # local-zone: "local." static + # local-data: "mycomputer.local. IN A 192.0.2.51" + # local-data: 'mytext.local TXT "content of text record"' + # + # You can override certain queries with + # local-data: "adserver.example.com A 127.0.0.1" + # + # You can redirect a domain to a fixed address with + # (this makes example.com, www.example.com, etc, all go to 192.0.2.3) + # local-zone: "example.com" redirect + # local-data: "example.com A 192.0.2.3" + # + # Shorthand to make PTR records, "IPv4 name" or "IPv6 name". + # You can also add PTR records using local-data directly, but then + # you need to do the reverse notation yourself. + # local-data-ptr: "192.0.2.3 www.example.com" + + # tag a localzone with a list of tag names (in "" with spaces between) + # local-zone-tag: "example.com" "tag2 tag3" + + # add a netblock specific override to a localzone, with zone type + # local-zone-override: "example.com" 192.0.2.0/24 refuse + + # service clients over TLS (on the TCP sockets) with plain DNS inside + # the TLS stream, and over HTTPS using HTTP/2 as specified in RFC8484. + # Give the certificate to use and private key. + # default is "" (disabled). requires restart to take effect. + # tls-service-key: "path/to/privatekeyfile.key" + # tls-service-pem: "path/to/publiccertfile.pem" + # tls-port: 853 + # https-port: 443 + # quic-port: 853 + + # cipher setting for TLSv1.2 *** 10617 LINES SKIPPED *** From nobody Fri May 22 21:34:48 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMdpt3FyBz6fmmV for ; Fri, 22 May 2026 21:35:02 +0000 (UTC) (envelope-from marklmi@yahoo.com) Received: from sonic302-22.consmr.mail.gq1.yahoo.com (sonic302-22.consmr.mail.gq1.yahoo.com [98.137.68.148]) (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) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMdps4Ym9z3htM for ; Fri, 22 May 2026 21:35:01 +0000 (UTC) (envelope-from marklmi@yahoo.com) Authentication-Results: mx1.freebsd.org; none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1779485693; bh=LEa5e/mtloao15c8JDCoGJsl0/AMbzoAUDAkYdIX5H4=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From:Subject:Reply-To; b=oCIa+OBMxjgmDZa4El3/dKxY5EZY0nubPeA7pRFDx5aKpG0evbze47n4uD1TOOkcNdzb8fyNcDColkIppwZhyyhk4y5LsGpH9iwQgZRNSoeBeChA/5x+PY83zvEHm6HRVk2cbiUWNInhduTSd48K+794R+bvS7w/FdC5TaP4dLkcQsQ5sf/i5Y6K7FhKEX+QJ3shVOjY7IldoGNv+u5N53gGq9Sc8aGgsjjkANb2M88sZhyi8DfwJvEiBozagXrtWznojhPran1jEn0Jn9wd3KF0T1rHAgg21KMKcUkjd6kDTyAPzJtoZ2DqXOzJDSYdJXFqn5CFkj8Progl4DyNmQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1779485693; bh=pJOVdFrkt7mGGPYfxN55G9tVj491GluWhGXF+XIUBef=; h=X-Sonic-MF:Date:Subject:To:From:From:Subject; b=qlODc89ipGgGmGhhvEkpnKA5KP00wS+FUi0jtR76WXNarfep9GjnUEewV4i2l/MbtU0woroRsXm1pEL8dgoFna5HKDwLv036QUtEYufYuH394M2yshQIo2gR81xL8u7ec9/tQHojhwIlGMRXi+0oOq04GogY+noJbRkgD/ZHpYejh8tVW7iztxov1ZduNw1dEjhhYIw4H7QlpEKn6uZ8HWwOgFvNGEXb6Gozv0YQmc2MbXOsXII0WXfOtAcbe1GebQRsM7WBGs7XrUiaeeZB569I/oqaI1fndfd5c0mpjB+HOApAVtqOsSp1PJlexe3zTC9yVHGw1Oiw+O+mhrP98Q== X-YMail-OSG: EC2gV8AVM1lCUOVFhXkbW.8XvhIFYZTzgQh26yxDZV6iWn5sFYSHhvvzg5L9fmq muTZ6g6RRY_e5iFe.0Lq2_GInL7plI3LSHG13jU.SHF7FvOl6uVtFQfF7mpLBT0QcP7B2dbKB_LV XOk.alShGl7QzSzk8EI01TNLKS9tXAVECcVO9n74H6oulCyhxG..3COejBUnKZuiyjR8eWY4upKB bn4hTkf8yVHrRfNR8Bc6uNg5s7P5hcWTCu_j3lAqMnt32wYGIFl9yPlBGLFqEW5buu4CZ8YoWBhW 6wsd5PXj1QeFAZd8R2Qd11gk9mFKgZ405clkEM6xSjvEmSu0O.bhjCCA0T0D2iLFiztuETUCmS7U ag7cq6rL__2lwafkzgkhrOj85vABBRewHMN7TxEa8GtG1mWZ.6Ew8zhWMSjsAJEfqqB4n5Jzurg8 LDyNGaxe7j9vUmEo8GJPI5iGfstyOfzuwAKoojCgZycxkl9IvOgNtlBzBAvn2P5JeSI.R0Jd_mx2 8lKOZxfMgqOcmpl4FJLjcVnrFFwbFulQ.CECugWu3DVsfY7B98.XlHjqBEhUHCUXk3lr9PwjifAb UVfaRUOD3fXhnavp6FqixOUEM_5fXHy10Nx3C8oMQiuJMfhql2KIwJ_qC2yeh7TB7lfcxMAgchC4 mrx55l0mMAxyEf5gm0IARI.K2N_aMwBRTrKLbFucNnNN.8Y3PEw4CoHoIb.nZ93c8ckOBegYhmJO .uRnn9nB14ZA2K.4R_ijwLZ9STUqkMTaHszyDlVEvv51tBmLTF11gIdOlt1W73C1W7g4nx.0nSXv i1dQyDcdIwe61Yrh4yBEu2HfdK.OOAFq5xUY69cZvpjHANCStCubg3kScanG4llf3NO1tJyIkjF2 fwXXoIS11gfO3KKcVyclhOtoVgxX8rzw6M4ILd3YB40yH8xqM3UKPuT2vXnpTOuN1je31TouM_pH vp5c8mdr17iXCoqdfQWq4QQi_Zah1QJ8mWH.L5E8nM0bJXqTXQzhl7ajDX_wd3n0ovD3snvrWEQ5 Rza2GRO_fKjkxXKt6ZsRS3h3Dpt5gp4kqY4Utqxs8C9LyCUsYAPWjQplkEPQoXN.TkMD8kkQZIlc ryROyv8VBPPv3yViW4O7VXOon7UVhVvVYL7ND8qfyff7Di1j8M5OtiOq1PtnMhBZ1c2HdzXadYeF _e5iZp38799N6YcRwNb_eHgxY5zGkzaKB0ZtZo0UTG3uRqbWRjaHQ_ZeatFJzss.RvepqElg_Nri dmqPwmOOZnumaNn08vV9nCTJRxY_kCt6E3l89AiJnR7GpJqUQtzHVgC1UDZ5qRGv0dBUgELuAqgB Za6UH_ehzlTtcoxdC_IqnG.HzNCyRthbvQbE3xBYqkDbv9ha4FreaX4iSUvRaK.e_b_JtKXVDXVJ ONQCv5cIhHs.WCTxBbW6EqwibaGfUDvfwCPWJAp8JwHhxh0iDO9K8AOAi8VOiltMXfmmp3MW2ooR JNaIwTYl4pOWXkdbX2YnrO3a3oVgJY2PdiVq_M441eSVtxMGdvNtR2wqJZQB_tw8LpyujttDeyvK gVLJUg67mxIWXv19m0GkpYAatqe7j1JeuDhH.D6G086KltRqB2UO4DVG8niNRp9oO.yqOOfcqxaK ZazxkIYo4WPX_xEz1nF7bna6TooiyvcBZiAQuS5ZEeovMq1IuDsJ69NOsMQvIFWHdShnvtFyrq9n dA0TWxUOuMTiDWTpamjUiZ9qTYhnfaQ25nlfQSYx1ySLNJ8kDiEBb_Sy_abQS3QS4dUFYGR2qDAP YLje7lJudmQBkdc6VlCiWEHb77JsRlgMFrMUJ8i3G7wnh3kphhKdNx1ufkjmb7wFGJ3P7bgczSAQ R2gfT_hLlBB7zCy0iP5.v.k9iUonz8_8WtmqaKN8BUaExrzSgt2Yx3_qXQRTxg5uUXw1Q3RigbFZ rA2bwFJq0a0kRFln8y6HqPKgRdyqvdIz3HSonpPtXahayuqep3RNlamfj_c9kOU2JSzT7g0sbFk6 A69QHICMrkAtFUWmGr1HUjO_d6Gn2UYLAPsRAwSEasFG6mP9hXJey96e4Ol7vUBsDmIq1UlAbT0H d6lXo2paQ.jA4JMxI3k6OJDpG0zoIB4qpvRhHQM4C3DfOdLZPltJeIc1BhaTvyiHfauBycmDHzbY ni.kIVNDLXCChw6H7vmYlqvnuKHEeo.dJVj3_YROHqExE4JBlLdei9PKvJdmpYXKjHf_T0PmKyqv 7xACWXmi9uZICxkQLQCQfTMT3jRNZDAg1SonlzzGIrfyvJIao9YHHGYDLoqI3rdOrZJm.vHTxZua TlSVt3SYFBsRW0K__awDSWezDhaU4sRZlhwGuQD4JiRfpJVs4K30CYOMXOSI1AS9irJXf2Wbz1Ny 6uA-- X-Sonic-MF: X-Sonic-ID: d2af5719-8f96-4d5a-b983-dfbac5cb5d36 Received: from sonic.gate.mail.ne1.yahoo.com by sonic302.consmr.mail.gq1.yahoo.com with HTTP; Fri, 22 May 2026 21:34:53 +0000 Received: by hermes--production-gq1-7bb7df5c46-2fd46 (Yahoo Inc. Hermes SMTP Server) with ESMTPA ID 1fc4c00cc540404c1c7dc6c51e5361eb; Fri, 22 May 2026 21:34:49 +0000 (UTC) Message-ID: <6bc46845-abee-4393-a5a8-bce292b94b6e@yahoo.com> Date: Fri, 22 May 2026 14:34:48 -0700 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: git: 700637cbb5e5 - main - Merge llvm-project main llvmorg-21-init-19288-gface93e724f4 To: Slawa Olhovchenkov , Dimitry Andric Cc: dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org References: <69eccd4e.36ab8.fd16100@gitrepo.freebsd.org> <20260522163423.GA39748@zxy.spb.ru> Content-Language: en-US From: Mark Millard In-Reply-To: <20260522163423.GA39748@zxy.spb.ru> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Mailer: WebService/1.1.25725 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.yahoo X-Spamd-Result: default: False [-4.00 / 15.00]; REPLY(-4.00)[]; ASN(0.00)[asn:36647, ipnet:98.137.64.0/20, country:US] X-Rspamd-Queue-Id: 4gMdps4Ym9z3htM X-Spamd-Bar: ---- X-Rspamd-Pre-Result: action=no action; module=replies; Message is reply to one we originated On 5/22/26 09:34, Slawa Olhovchenkov wrote: > On Sat, Apr 25, 2026 at 02:18:54PM +0000, Dimitry Andric wrote: > >> The branch main has been updated by dim: >> >> URL: https://cgit.FreeBSD.org/src/commit/?id=700637cbb5e582861067a11aaca4d053546871d2 >> >> commit 700637cbb5e582861067a11aaca4d053546871d2 >> Merge: 6243d755fb82 3f709e42e3be >> Author: Dimitry Andric >> AuthorDate: 2025-12-07 15:15:22 +0000 >> Commit: Dimitry Andric >> CommitDate: 2026-04-25 14:08:55 +0000 >> >> Merge llvm-project main llvmorg-21-init-19288-gface93e724f4 >> >> This updates llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and >> openmp to llvm-project main llvmorg-21-init-19288-gface93e724f4, the >> last commit before the upstream release/21.x branch was created. >> >> PR: 292067 >> MFC after: 1 month > > This is broke at least graphics/krita > I mean __type_traits/is_integral.h is incorrect now: template _Tp> struct __libcpp_is_integral defined only for > !__has_builtin(__is_integral) > > Well, use of non-public LLVM lib++ types are subject to upstream removal or redesign at any LLVM update: QUOTE In file included from /wrkdirs/usr/ports/graphics/krita/work/.build/libs/pigment/kritapigment_autogen/EWIEGA46WW/../../../../../krita-5.2.14/libs/pigment/KoColorSpaceMaths.h:109: /wrkdirs/usr/ports/graphics/krita/work/krita-5.2.14/libs/global/KisHalfTraits.h:33:10: error: no template named '__libcpp_is_integral'; did you mean '__libcpp_is_final'? 33 | struct __libcpp_is_integral | ^~~~~~~~~~~~~~~~~~~~ | __libcpp_is_final /usr/include/c++/v1/__type_traits/is_final.h:22:8: note: '__libcpp_is_final' declared here 22 | struct __libcpp_is_final : integral_constant {}; | ^ 1 error generated. END QUOTE Where: work/krita-5.2.14/libs/global/KisHalfTraits.h has: QUOTE #elif defined _LIBCPP_VERSION template<> struct __libcpp_is_integral : public false_type { }; END QUOTE That __ prefix in the __libcpp_is_integral name indicates it is only for internal LLVM libc++ use and is subject to removal or incompatible-redesign updates or such between any 2 libc++ updates. graphics/krita can not validly expect to be portable across LLVM releases as written. It is actually in violation of the C++ standards relative to its use of names with __ prefixes. -- === Mark Millard marklmi at yahoo.com From nobody Fri May 22 21:46:24 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMf460vRPz6fp1b for ; Fri, 22 May 2026 21:46: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMf460G2Tz3kQq for ; Fri, 22 May 2026 21:46:30 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779486390; 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; bh=WDSEDEzdxSN8arHVrcWPorBZMEnQUgUNded3VoaCUXs=; b=Bo+y4dhfXjNnxqnQQ+ONCseimKHiAlB9992AAgYG4oMxS9isqNObU3l8hV9+aMRqwD5nBm lsZOLTYm5Kh0R5L9VNlMiWQOQbIUUyanmVW+ik+nBT32qDnYLgsG33XY9XtcRbKj/Mbm/r 1K3CM0SplRBoPewhRTMxm+/ad3d//jOKYTq39JsTO+NSBN9s5TY7NZNfR4gMDciKGw/xOx +VxILNwK3DVkjdT2wiiCzgUdempiDbwfL0WVXZ7PyrayS9oRsALs+d8QP7E0IShQW7j0Qp P0R/c1+6mm3HQrzatvMYzTpyxmErR9UWpBTmKwZppCiuzqruf54+hmF6phOaiA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779486390; a=rsa-sha256; cv=none; b=saYvJ8XROZ7dW8MmU69/HrSCLmkhASFwBx7RBDZSEKh7zzhOqmmFtfVHBSsgz2AUOqFR0+ qp0iPNi/y8w03rVDI8engokQB2sv/qom0Bm5gmpP7BnO/R7VFc40eJq0k71Mg3h+7PQZYM VF7+DfpMyn1S4wf8rY2Z8ZvFAdxSbf9XwTL3TjTNyss17Tx4hPGlVwCV7tsLWO+UZJL7H3 2QprF+5iNeQvH80NkX7piHIQuQuKFbRdxwP9b8uIkcjR6E8i+CYxj2En11/nV3Hdqxjygm jgXLFH97ljREpcvIfI2lWqU998a2I4rgX58vfA93yZN6ceHr1gQrdB/zNAiTOw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779486390; 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; bh=WDSEDEzdxSN8arHVrcWPorBZMEnQUgUNded3VoaCUXs=; b=tFvouYTHCodaoLQPcMr8Fvv3IwwKjkxiWqXDO6nVl7rE7u1b6wNua6m8AfAueXAtRAbefS ThARR0BoWX/ePPBd0IwcrxV3WiVHfWHT7dGTfTWEViHu1aNjImLl+qLWmti4F70/C+d1ws lNCkXLOBAaLdOYrltjz/tG26iGW7tc0lEIDJOTcuHrDPPLeyy6MJXYa6dvwPBSexPU+7zx /gVDmrQ3ElqcqP3HxQ2uMToIVnC48zUXRkh50N286vOTobxO3Kt15W4EFFo6uhyLa6o/04 uMhQfyQtili9jtg3tiJhoOut2AzWR3KyOPDPZTrsxCDh1HMNQfwkOfGF+EBkvg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMf456tczzg0M for ; Fri, 22 May 2026 21:46:29 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 20638 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 21:46:24 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Pat Maddox From: Dave Cottlehuber Subject: git: c783d7181d6a - main - syslogd: fix memory leak in casper_ttymsg() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dch X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c783d7181d6a71cb2453f06e40c08c892510c2f2 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 21:46:24 +0000 Message-Id: <6a10ceb0.20638.75cedd6c@gitrepo.freebsd.org> The branch main has been updated by dch: URL: https://cgit.FreeBSD.org/src/commit/?id=c783d7181d6a71cb2453f06e40c08c892510c2f2 commit c783d7181d6a71cb2453f06e40c08c892510c2f2 Author: Pat Maddox AuthorDate: 2026-05-22 21:45:30 +0000 Commit: Dave Cottlehuber CommitDate: 2026-05-22 21:45:30 +0000 syslogd: fix memory leak in casper_ttymsg() nvlist_take_string_array(9) takes ownership of the array and its strings. casper_ttymsg() freed neither, leaking memory on every F_CONSOLE and F_TTY message. On long-running systems with high error-rate syslog traffic routed to /dev/console, syslogd.casper grew to hundreds of MB. Use nvlist_get_string_array(9) to borrow the array instead. Update casper_wallmsg() similarly. Approved by: src (des) Closes: https://github.com/freebsd/freebsd-src/pull/2222 Fixes: 61a29eca550b ("syslogd: Log messages using libcasper") MFC after: 3 days MFC to: stable/15 PR: 295488 Reported by: Pat Maddox Reviewed by: markj Tested by: dch --- usr.sbin/syslogd/syslogd_cap_log.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/usr.sbin/syslogd/syslogd_cap_log.c b/usr.sbin/syslogd/syslogd_cap_log.c index 0156cc6f6b6c..5e2034abd9eb 100644 --- a/usr.sbin/syslogd/syslogd_cap_log.c +++ b/usr.sbin/syslogd/syslogd_cap_log.c @@ -128,19 +128,19 @@ cap_ttymsg(cap_channel_t *chan, struct iovec *iov, int iovcnt, int casper_ttymsg(nvlist_t *nvlin, nvlist_t *nvlout) { - char **nvlstrs; + const char * const *nvlstrs; struct iovec *iov; size_t iovcnt; int tmout; const char *line; - nvlstrs = nvlist_take_string_array(nvlin, "iov_strs", &iovcnt); + nvlstrs = nvlist_get_string_array(nvlin, "iov_strs", &iovcnt); assert(iovcnt <= TTYMSG_IOV_MAX); iov = calloc(iovcnt, sizeof(*iov)); if (iov == NULL) err(EXIT_FAILURE, "calloc"); for (size_t i = 0; i < iovcnt; ++i) { - iov[i].iov_base = nvlstrs[i]; + iov[i].iov_base = __DECONST(char *, nvlstrs[i]); iov[i].iov_len = strlen(nvlstrs[i]); } line = nvlist_get_string(nvlin, "line"); @@ -187,25 +187,23 @@ int casper_wallmsg(nvlist_t *nvlin) { const struct filed *f; - char **nvlstrs; + const char * const *nvlstrs; struct iovec *iov; size_t sz; f = nvlist_get_binary(nvlin, "filed", &sz); assert(sz == sizeof(*f)); - nvlstrs = nvlist_take_string_array(nvlin, "iov_strs", &sz); + nvlstrs = nvlist_get_string_array(nvlin, "iov_strs", &sz); assert(sz <= TTYMSG_IOV_MAX); iov = calloc(sz, sizeof(*iov)); if (iov == NULL) err(EXIT_FAILURE, "calloc"); for (size_t i = 0; i < sz; ++i) { - iov[i].iov_base = nvlstrs[i]; + iov[i].iov_base = __DECONST(char *, nvlstrs[i]); iov[i].iov_len = strlen(nvlstrs[i]); } wallmsg(f, iov, sz); - for (size_t i = 0; i < sz; ++i) - free(iov[i].iov_base); free(iov); return (0); } From nobody Fri May 22 21:47:01 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMf4k6b07z6fp1k; Fri, 22 May 2026 21:47:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMf4k5rGtz3kd7; Fri, 22 May 2026 21:47:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779486422; 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=j15Z3LoG6j8u28FPVbxUmYvSDRS14M5S+KaATKj/m9Y=; b=yWAgRe7NL8aggiDBSTWYvwppQ7tuQaomJ6s63og6QjCjWnaxyKMDMpnlR0gYEYwVLRh2lQ Jm0bAayB1lm/AHoLdAzCSVRMCT2LZ9J2TY69bFtnLuRrT9NJ45DaOPLMwIhCdOT/HHh4WJ 1/7iyHMbJTO7BY1njiFiEfQSq9Sy9bzFMEr3wfmt0rZ3wvqn77ocSBobw7YNJjng/Uq7// E/fKP+S7UHUH08HBPfJfql4xlMWH5D4DV98Z/turAi+4MkC9h+v2kIqbBmhg+xayGd4nZk pB/zsarGoqj9Tiu/mroBeR0AEFfuVy5s8P8yev0KC1auYeChUWo5RlnC+UTtxw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779486422; a=rsa-sha256; cv=none; b=x2CupZq/j8tPqxlnhKmIVsR2f0vXgJfMI1QbEC9VwiezaV9TCebkxBChIq/ZqaqP2VbAHa LJL42U927eu7Z/1bRREjl4wI2EwGjhWWj6v/j1lx1aPP/wJrhlAUfyPhh5f2NWhfAbpKjM zWa5nk44LnhxKEdTGtMZR+veCAffmTm+dmtb09tbVaExpKQgEhoVlVOHzhPwrr/o6eySHD JvQT99EtzNnlhRQXq8OnkVgrNbXg9hU0NYGT5YPC0/TcsNuVmJP5SPhGXXBgt56MfUWbSx SwHrdijIy5kzSKW55fc4kgJVRSQTuebLea6dM0ITYFxfgZfCzf4Hv58wr8w3nA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779486422; 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=j15Z3LoG6j8u28FPVbxUmYvSDRS14M5S+KaATKj/m9Y=; b=eXHprguCBfK7A7xd+i+/VichXji7+JTNKefOvf4sAVCYqCiIHapsbj4/YTZdzPIVWTCrJs farMV8fNL6jkycmBFjR2dLl82D8pXtJezkXAHDWkSbKUDUxCgU/tZz/AxWGQ21F/zEvWlW bG/2Gp4SSCOWSJ6bIxU5puqH+6dvkD7s6EJ70JJ3GQESu/k6Oy8Ee43O6mrdnyJyQDXkZz Z0Cfqt0e4HkV3051LHfLC6cnL9QF5KWYoWNnLVx7zko1cLqGl+QPd0BEpThwAA2TzvTQY+ UT8wdY+3EJSnsce616CJYwSnt388B9AUWZXRUOcMyFdlkjCBV0ttL04aDDkD+g== Received: from tensor.andric.com (tensor.andric.com [87.251.56.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "tensor.andric.com", Issuer "E7" (not verified)) (Authenticated sender: dim) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gMf4k4HLfz3P4; Fri, 22 May 2026 21:47:02 +0000 (UTC) (envelope-from dim@FreeBSD.org) Received: from smtpclient.apple (bladnoch.home.andric.com [192.168.0.20]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by tensor.andric.com (Postfix) with ESMTPSA id ABC022A89C; Fri, 22 May 2026 23:47:01 +0200 (CEST) Content-Type: text/plain; charset=us-ascii List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3826.700.81.1.8\)) Subject: Re: git: 700637cbb5e5 - main - Merge llvm-project main llvmorg-21-init-19288-gface93e724f4 From: Dimitry Andric In-Reply-To: <20260522163423.GA39748@zxy.spb.ru> Date: Fri, 22 May 2026 23:47:01 +0200 Cc: "src-committers@freebsd.org" , "dev-commits-src-all@freebsd.org" , "dev-commits-src-main@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <4C91123F-5F4A-4ED0-B798-E474B8E219A2@FreeBSD.org> References: <69eccd4e.36ab8.fd16100@gitrepo.freebsd.org> <20260522163423.GA39748@zxy.spb.ru> To: Slawa Olhovchenkov X-Mailer: Apple Mail (2.3826.700.81.1.8) On 22 May 2026, at 18:34, Slawa Olhovchenkov wrote: >=20 > On Sat, Apr 25, 2026 at 02:18:54PM +0000, Dimitry Andric wrote: >=20 >> The branch main has been updated by dim: >>=20 >> URL: = https://cgit.FreeBSD.org/src/commit/?id=3D700637cbb5e582861067a11aaca4d053= 546871d2 >>=20 >> commit 700637cbb5e582861067a11aaca4d053546871d2 >> Merge: 6243d755fb82 3f709e42e3be >> Author: Dimitry Andric >> AuthorDate: 2025-12-07 15:15:22 +0000 >> Commit: Dimitry Andric >> CommitDate: 2026-04-25 14:08:55 +0000 >>=20 >> Merge llvm-project main llvmorg-21-init-19288-gface93e724f4 >>=20 >> This updates llvm, clang, compiler-rt, libc++, libunwind, lld, = lldb and >> openmp to llvm-project main llvmorg-21-init-19288-gface93e724f4, = the >> last commit before the upstream release/21.x branch was created. >>=20 >> PR: 292067 >> MFC after: 1 month >=20 > This is broke at least graphics/krita > I mean __type_traits/is_integral.h is incorrect now: template _Tp> struct __libcpp_is_integral defined only for > !__has_builtin(__is_integral) Please try the patch in . -Dimitry From nobody Fri May 22 22:07:56 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMfY91q4Hz6fr4v for ; Fri, 22 May 2026 22:08:13 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-ed1-f47.google.com (mail-ed1-f47.google.com [209.85.208.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 4gMfY73qXGz3mn7 for ; Fri, 22 May 2026 22:08:11 +0000 (UTC) (envelope-from asomers@gmail.com) Authentication-Results: mx1.freebsd.org; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=freebsd.org (policy=none); spf=pass (mx1.freebsd.org: domain of asomers@gmail.com designates 209.85.208.47 as permitted sender) smtp.mailfrom=asomers@gmail.com; arc=pass ("google.com:s=arc-20240605:i=1") Received: by mail-ed1-f47.google.com with SMTP id 4fb4d7f45d1cf-67c4aaf76ecso12571760a12.3 for ; Fri, 22 May 2026 15:08:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1779487689; cv=none; d=google.com; s=arc-20240605; b=V4h3kw0jtYq8txBuJklXoOaJEjf/FxzxzUei8Qw8z1gBfgbJX2TYLu1seV7bIxcylw n7zp3mUh+OtcgK0OHeob/WmEMh3WnSCw8WpWLpbQDWItg2JLGqEuiFbbPbHoOZ75/8ef jWoIbEN0312NeBxiCcSCss7Ym/xoYUp8oRmG7qDrrD1GJOghH//+QjiJxuwlkZQjLQ26 ujAuacpdV+F54Vzqbg9dqTpswbEftohyqJlKc9TiL6KLI5KqMOv4NXi6FIZDonb8Zvzh 3RTyCYQR60HXgCEgG4BvinDQJKVSDD3/xUKr38TEes7HuaF7j/T8wORLqnjeQJeDHbM3 KlNQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version; bh=AJy4pmjFuiYV0JXnGPDNSPwqxssU5y6oUQ/GlR0ruoE=; fh=SN0IwP+bC4h0OBWiYMCHOeJsBZroTOiO32oOmJmKvEw=; b=ZhsCoX4hJ2EyOSifTEUNsH/Y6eYhpKtiq6TbAQWLkII2YEMebTOkgWIaubsML/UBIo E23/FrzDEf1ucSgQ4NSh0K9p2dN/MHgTS2r9fxCaYHvy8/yn2/z58n9+KZQcHBRWhRgv wvsr3uJJwBL1LapSuP3Hg01U9oChMGl0lwxjeapXHnAbwaZvOrwnuoQMRb0/3eBLkGJH pnSlm1Fqgev7OsyrEeJ6gekSycvNYBc0a+mg9oK9JVOcOXI2F+QjNX5YH/ktSUINaUDt KaFsRCbNaW0J26figtnmbDH7zvziy+ZTqUYxyVT77sDN9tEFnbIJcz/GHANyv3bcoiTl 7LJQ==; darn=freebsd.org ARC-Authentication-Results: i=1; mx.google.com; arc=none X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1779487689; x=1780092489; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=AJy4pmjFuiYV0JXnGPDNSPwqxssU5y6oUQ/GlR0ruoE=; b=fmq0tCEzk7b+B1RsXjwavYyIuS8SIOYYoHe4QYycDNQiqFWD7GII2CC+5R5t7BYgZY 1HIglzfAU5eylSrVQiztCY40GhgULLAEtJt00XG+sVPtGcm4miPDbk2ln7cS1EnZtb4l wibaXfJaUwR5HBdPMpLUVbOWErmQQ3x1PdB+dzSHcxAB4yq6T9Ujr/lVSNDfcVoNx3mc c4zx/PYWF23se1c6bp4ak8bVGiiQQ3atncrvgIxwmoV1H7N03MUikL5foGysj1GQn12S fa4xzU1azzVJmSesm8xlGMWJakDBvWSxQA2LEMuh3PsUbXyoL59CAFJmxXyj09Mq2CQ4 5Bog== X-Forwarded-Encrypted: i=1; AFNElJ+fRHjQ47s62bsv2cZHqyUHh/oqu8rfMriM8ibQW0lavXKEuqhw3fEvrOpppyGzB65Mwo3W/ROKiQczwBhz1UH5cLXzbw==@freebsd.org X-Gm-Message-State: AOJu0YwPNQsQxliMEs7TmuXF+Scxf+obtrAVa/RO4IfnmeF6dIIYaYKU 44yI6bYYfrCYCzLvQD1UeH5TSk6BfY1KAc5vE3XJTNAL5g2ytEHJHPsIkSR//bvgfdA7hNLfClB dbxPfXWle+Bz559Pfd/BqvZWvxd034uv2Ew== X-Gm-Gg: Acq92OHEh/cr2RJmW1hLyRLLvrlm2RwYGlCYjRosc81huSU5QXRh2An0IWGvdmlSmLe yymIjQA6Ufbq4fXub3sdnYuEAd8J1gDoZPY09go1XOvhf9eSYndKw95CHDiwT5bREeBMNJRu+wS hfhU9ASlU+HktxwXnU54Ps6K9kl7twoWu9lNXB3wZcr3IlvK5x9b3HN2ZJO95jv3fdfEoK2vmGr vKbQ27E6S7FHcQCsOd3n2I/OXPQLA/9ZCp0ZwKof4SqZooHWkfhMVfE9qGLJ+Ox33c0QMxIzlQH p4YfLVaGfCi2UHrVpXEuN1q2HJAVD9j2d4KpLgS7pDWq+9GZVQXjpCsTBonVGmc+elF9tRndiAw jxkMEQp/U4yppkw== X-Received: by 2002:a05:6402:43c5:b0:676:9c6d:5c59 with SMTP id 4fb4d7f45d1cf-6889c406c91mr2941569a12.2.1779487689385; Fri, 22 May 2026 15:08:09 -0700 (PDT) List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 References: <202510232317.59NNHQMC088762@gitrepo.freebsd.org> In-Reply-To: From: Alan Somers Date: Fri, 22 May 2026 16:07:56 -0600 X-Gm-Features: AVHnY4KVugAqLWa16fd4DhatX-3iHKfKd6QJxQq3z0k-PBvb1lfoO0W0MPiNsJQ Message-ID: Subject: Re: git: d1ca01059d5d - main - padlock(4)/nehemiah: move i386-only entropy source to MD files To: Konstantin Belousov Cc: "David E. O'Brien" , 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-Spamd-Result: default: False [-3.89 / 15.00]; ARC_ALLOW(-1.00)[google.com:s=arc-20240605:i=1]; NEURAL_HAM_MEDIUM(-1.00)[-1.000]; NEURAL_HAM_SHORT(-0.99)[-0.995]; NEURAL_HAM_LONG(-0.99)[-0.994]; FORGED_SENDER(0.30)[asomers@freebsd.org,asomers@gmail.com]; R_SPF_ALLOW(-0.20)[+ip4:209.85.128.0/17:c]; DMARC_POLICY_SOFTFAIL(0.10)[freebsd.org : SPF not aligned (relaxed), No valid DKIM,none]; MIME_GOOD(-0.10)[text/plain]; RCVD_TLS_LAST(0.00)[]; FROM_HAS_DN(0.00)[]; FREEMAIL_TO(0.00)[gmail.com]; TO_DN_SOME(0.00)[]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; MISSING_XM_UA(0.00)[]; ASN(0.00)[asn:15169, ipnet:209.85.128.0/17, country:US]; FREEFALL_USER(0.00)[asomers]; PREVIOUSLY_DELIVERED(0.00)[dev-commits-src-main@freebsd.org]; TO_MATCH_ENVRCPT_SOME(0.00)[]; FROM_NEQ_ENVFROM(0.00)[asomers@freebsd.org,asomers@gmail.com]; RCVD_COUNT_ONE(0.00)[1]; MLMMJ_DEST(0.00)[dev-commits-src-main@freebsd.org]; RWL_MAILSPIKE_POSSIBLE(0.00)[209.85.208.47:from]; R_DKIM_NA(0.00)[]; RCVD_IN_DNSWL_NONE(0.00)[209.85.208.47:from]; RCPT_COUNT_FIVE(0.00)[5] X-Spamd-Bar: --- X-Rspamd-Queue-Id: 4gMfY73qXGz3mn7 On Fri, Oct 24, 2025 at 2:18=E2=80=AFAM Konstantin Belousov wrote: > > On Thu, Oct 23, 2025 at 11:17:26PM +0000, David E. O'Brien wrote: > > The branch main has been updated by obrien: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=3Dd1ca01059d5d756a4aef09d9= 55e98aa59a284344 > > > > commit d1ca01059d5d756a4aef09d955e98aa59a284344 > > Author: David E. O'Brien > > AuthorDate: 2025-10-23 22:27:06 +0000 > > Commit: David E. O'Brien > > CommitDate: 2025-10-23 23:17:19 +0000 > > > > padlock(4)/nehemiah: move i386-only entropy source to MD files > Why do you think that padlock was implemented on 32bit only VIA CPUs? > I believe that VIA NANO supported both x86-64 and padlock. > And wikipedia (sorry) seems to confirm this > https://en.wikipedia.org/wiki/VIA_Nano I still have a Via Nano X2 in the closet. Would you like for me to test? From nobody Fri May 22 22:13:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMfgV6XkDz6frmP; Fri, 22 May 2026 22:13:42 +0000 (UTC) (envelope-from bz@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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMfgV5THTz3nD2; Fri, 22 May 2026 22:13:42 +0000 (UTC) (envelope-from bz@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779488022; 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=w1skYhojM89BTJ9o4CiOr8AMt/kWVXn1QhzbetS2JA8=; b=lfhdpIKVlLAULC+71FfhnESwsmdSijvlHxY//mqDoVryudd8cTdpL2UL+qCZ90awLqDDE3 LqlYdTY/zHGg62fBtLCbOp/lthrpRQKzsReQCw5wEnxekhT5Yb1o8ULw8bPZ/BEJvbLhR/ XXYWA1SHVZ3P19yhXWFP95BlBXl1vjHMPJn1ewgjTpA14ioBoJ/hnX1FFEki9C0g3dEoiO lvvtX92gt1iKr2lCNZcKlFZ1Y+td58nd4WkkLuuxlkMsGfTLT/wpjBsyvoCQie7IAZfCLw X6s1HvwfMKtvRONYBE4TSUaxtirTZw2nWQSfJA5bYbfK+juwiqKH05zRcNi6Tw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779488022; a=rsa-sha256; cv=none; b=AokK5lJmzbAhf3VQS88p+ANvANJqyZysMkZhmdhL4jgmTQXtlRLSAicGFJbM/bqSnzgxDQ jgp4CZIx74XhmyKHUk3PI0Vy/LqEFlJXzCd+hD21ubyiDx1IbFloWqJ87IDX3uawNKRLPq B48YjxmzbzHzR6ftR2o33Y/xrqaBYYD+Gf+VZflBI7GkB4EOMn/AoCn0JQBIkBn62LplFf jotUarORQ0ODNFaK+eCmbHP/6LCOaGz2f0ZavigSmh4itj1A8vBzbJBATbG9lC5QsBRr4f dtqmT13GlFk7hlJ42Hl4eAZ56M9PXBzBj7TUcVbTqjnsTa/3GI0XErqbIB2ThA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779488022; 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=w1skYhojM89BTJ9o4CiOr8AMt/kWVXn1QhzbetS2JA8=; b=DC5K7bpsOi+Br4qrymOFeOwQRi6mZo/X8fvl7Q+73c0hFiGtwPOxBZ94zZQhQeQi7p01gS RJ+vhmzIYKpR1w7nmpe+8yJg/Vh7dV9iY5xqh0jSjyhGuMyxIKkSBb+48hcwPTXPu+Yes2 ZC9rw7WMQs1w2DnsaZBQDg9rFGNfxlrsyrqpaW2WXEJrpxnCCbou3LAR2teHPG43j5e2pJ AVk5InMZdIZ6sVB/ZMvD9SHkprvVWEcu8e59tEY9hnsDXM2HeBSXcnZ1q4ean98G5ozxz2 GRDSl4IdqtkhFwHg36T4dlwnJ8t2lDgnf3hNSPPRvxcRZC0lpZGxKHQ8zOM9Pg== Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E7" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gMfgV3qhhz4GG; Fri, 22 May 2026 22:13:42 +0000 (UTC) (envelope-from bz@FreeBSD.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id 4D1EEA64805; Fri, 22 May 2026 22:13:16 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id D35EF2D029E9; Fri, 22 May 2026 22:13:40 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id IKLcv0Fsr-mN; Fri, 22 May 2026 22:13:39 +0000 (UTC) Received: from nv.t4-02.sbone.de (nv.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id 21BC62D029D8; Fri, 22 May 2026 22:13:39 +0000 (UTC) Date: Fri, 22 May 2026 22:13:38 +0000 (UTC) From: "Bjoern A. Zeeb" To: Mark Johnston cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 36b855f18925 - main - amd64/vmm: Lock global PCI passthrough structures In-Reply-To: <69860b30.3f83f.acb567e@gitrepo.freebsd.org> Message-ID: <21416977-p363-rs27-90n6-qq2o931r4ps5@mnoonqbm.arg> References: <69860b30.3f83f.acb567e@gitrepo.freebsd.org> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Fri, 6 Feb 2026, Mark Johnston wrote: > The branch main has been updated by markj: > > URL: https://cgit.FreeBSD.org/src/commit/?id=36b855f1892575cbfe1cd5455b989bfc8ae07502 > > commit 36b855f1892575cbfe1cd5455b989bfc8ae07502 > Author: Mark Johnston > AuthorDate: 2026-02-06 15:29:22 +0000 > Commit: Mark Johnston > CommitDate: 2026-02-06 15:38:51 +0000 > > amd64/vmm: Lock global PCI passthrough structures > > There is a global list of ppt-claimed devices, accessed via several > vmm ioctls. The ioctls are locked by per-VM locks, but this isn't > sufficient to prevent multiple VMs from trying to bind a given device. > > Add a sleepable lock and use that to synchronize all access to ppt > devices. > > Reviewed by: corvink, jhb > MFC after: 2 weeks > Differential Revision: https://reviews.freebsd.org/D55065 > --- > sys/amd64/vmm/io/ppt.c | 162 +++++++++++++++++++++++++++++++++---------------- > 1 file changed, 111 insertions(+), 51 deletions(-) > > diff --git a/sys/amd64/vmm/io/ppt.c b/sys/amd64/vmm/io/ppt.c > index 6feac5dcbbed..b522e18e3b24 100644 > --- a/sys/amd64/vmm/io/ppt.c > +++ b/sys/amd64/vmm/io/ppt.c ... > int > @@ -529,10 +558,12 @@ ppt_unmap_mmio(struct vm *vm, int bus, int slot, int func, > struct pptseg *seg; > struct pptdev *ppt; > > + PPT_LOCK(); > error = ppt_find(vm, bus, slot, func, &ppt); > if (error) > - return (error); > + goto out; > > + error = ENOENT; > for (i = 0; i < MAX_MMIOSEGS; i++) { > seg = &ppt->mmio[i]; > if (seg->gpa == gpa && seg->len == len) { > @@ -541,9 +572,11 @@ ppt_unmap_mmio(struct vm *vm, int bus, int slot, int func, > seg->gpa = 0; > seg->len = 0; > } > - return (error); > + break; > } > } > +out: > + PPT_UNLOCK(); > return (ENOENT); > } There's a bug here. That should be return (error). That's been breaking pci passthru since February. I cannot imagine how no one noticed this in 3 months? /bz -- Bjoern A. Zeeb r15:7 From nobody Fri May 22 22:19:01 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMfnd325Wz6fs77 for ; Fri, 22 May 2026 22:19:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMfnd2Nghz3psQ for ; Fri, 22 May 2026 22:19:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779488341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iKzBKtf4Qqb1l+jX7yZJKgKzJgKMKoCzqxLlhlbYP+Y=; b=Te+1oaAPvgNoqJHkZrUFwwCY5YDJUL+5klwChv7+yYVW7mOCq5E6uzGsXPpkCytDOb3XVI ZUK1u3ivJMpPzP9g1wClXKkeaJplopwkHfWRmwpcPQbZX2vDMbxbTcojFon41oXZvdvrlO vN0JHk3L5fZmZB8IGhAxCRUUDNETIl+4V7m0f/xCrUpTDnoB5+1Rep8izeSMJ0Pa8/Ffgw ziKDbitmIp0Z0grXGilD0Cic8b1HcJZFQv5lq9TK9NwV0B1S10Q5a/bjdy9ZJR0tgIcEPH KRHthMKDrmz5emU1NxaFlj4rkm2bd+H1aVAJ5zexSbnhs2Rib7AqB/rfmkyjtA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779488341; a=rsa-sha256; cv=none; b=ESwuAA2pMphKDAk0gPpBmJYsztqCQVkEfU1j8JlB2Znf5FdVoKXVSb5lYZpf94sli1qL4s JUjfGAh2DaEBRds6Peszge0iDflgTdj/GGJu4bjrpB2TImd0AC7WWxT/I0YHvPJXwbq3EX QXYQHbaJuY8GG7qXebGUvUbI8rUfN1VGRVIKsHiH7m1FH658uqc5JYJ8b8ADCj/gXWCYMf bU9jqktFioEhY4BJWgmYShK5kssHzcCHQrkkVhH2QDNSfbLpu2STR08I0eK9y8sEwrmHFb Z7HM3pfNbv1uiePLqD+HWiVgBx0vRlI35uHb06JGLYa9G4Gfm/uQtgEXccPpwQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779488341; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=iKzBKtf4Qqb1l+jX7yZJKgKzJgKMKoCzqxLlhlbYP+Y=; b=BuRM4sUHwqLkpD3Vsosd4cp+uPYPIN5qgCLRp5TJ499cs1eJK1iGa/DgHxPGkgcQhenqWD e7r2BMhJQXv3pwkO+DY9kvQHudzOrrkWeVkeTYwTSDo81KjKFWa+10tsOzflF1bMh3rKyu MxB9IaRQw3jQo2vWPa79TtVuPButjmzUGxBJDX/xFD1DDVnCaqirTqYaTE/tm4oTzl2DSo 1ElWx9xwFE7l55+PFoyOQ0l06+W5NL8A7ziAIJe0S6oVSRPcoOSmbKOntsfxhax6F+zOVl Yv2Sibvn8aHmC8rDqQV4l8CZCJ9++VGJqBjbMri1Nr4L93t64sA+VPqPf9Zv8w== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMfnd1dKvzgZ4 for ; Fri, 22 May 2026 22:19:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 258f2 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 22 May 2026 22:19:01 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mark Johnston Subject: git: b13335331092 - main - amd64/vmm: Fix ppt_unmap_mmio() after commit 36b855f18925 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: b133353310920aa823b1b5f83a308d0762f3bba3 Auto-Submitted: auto-generated Date: Fri, 22 May 2026 22:19:01 +0000 Message-Id: <6a10d655.258f2.18fdbab@gitrepo.freebsd.org> The branch main has been updated by markj: URL: https://cgit.FreeBSD.org/src/commit/?id=b133353310920aa823b1b5f83a308d0762f3bba3 commit b133353310920aa823b1b5f83a308d0762f3bba3 Author: Mark Johnston AuthorDate: 2026-05-22 22:18:05 +0000 Commit: Mark Johnston CommitDate: 2026-05-22 22:18:48 +0000 amd64/vmm: Fix ppt_unmap_mmio() after commit 36b855f18925 Fixes: 36b855f18925 ("amd64/vmm: Lock global PCI passthrough structures") MFC after: 3 days Reported by: bz --- sys/amd64/vmm/io/ppt.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/amd64/vmm/io/ppt.c b/sys/amd64/vmm/io/ppt.c index b522e18e3b24..162f26796b33 100644 --- a/sys/amd64/vmm/io/ppt.c +++ b/sys/amd64/vmm/io/ppt.c @@ -577,7 +577,7 @@ ppt_unmap_mmio(struct vm *vm, int bus, int slot, int func, } out: PPT_UNLOCK(); - return (ENOENT); + return (error); } static int From nobody Fri May 22 22:27:55 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMfzx3dHYz6ddp7; Fri, 22 May 2026 22:27:57 +0000 (UTC) (envelope-from markj@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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMfzx2Wxtz3qt9; Fri, 22 May 2026 22:27:57 +0000 (UTC) (envelope-from markj@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779488877; 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=UToU7gFyzkOgKOdKyOnrB3WhtuXhIRapg2m46mX3qeY=; b=WokES+648uzo2bWi48ES1JoQdUZOOCi7H4OAr9jnOUrEo5NTdpBNBi7YruSMZQkURZLOlF KW3/hbJzy3CmoUPijrkZ4iIclvtyRK3sEZoEEWgV6Ci99TEzpYjqDU6ZkWBOBPVsbJWrhS e1Y+iikgtIydZh9OUHFPGbIXCnbGb9O+7XTU4+I3S6KtOz7JJDtgUosjbJaFZdwBbnuy1X MMpCQgAkRf/VhUrfaPQaffzCoCPrfxxVQLRj2NhmsxAcITxhLSIGX5rEHmYNo8ecT2NQiq CxFaDqutju6ZaX6eAuKASma5RagHHOfCKKW2Lz/irWl8sr7fbFzr4lL/uMHBEg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779488877; a=rsa-sha256; cv=none; b=fSpFNvx72CME4LtpqOnjxoDsACAP0tEPS75OyPhOtH1fOVeAm25OXBx6Es/G8y3Dq4CnWK S9nAu1GyY9gXOrlJQv9GhCGwcrJKIUS43YAfT20/pfVFWkjJ8Qf2oACy18LrqeB1gIFDQ8 SjS53cx2dlbhQiNjWRxRlTnaP9GsGw6xo0j+pAVoEnW0fg6xnpcELa349pwEHa66VvDrr0 Y1NggNC0A2vp3v/0WRgGwARPpOd364EFeyLNPYqazxoDjEHP+YfS1gzcHtQvgtE3k5tAD5 Fr/p5ewDSDU7S6FFmKqLFnu1dVqEf+S1Cb+WWOgMX4C+pu8/OeDeYQLyJ1Mgag== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779488877; 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=UToU7gFyzkOgKOdKyOnrB3WhtuXhIRapg2m46mX3qeY=; b=T/dl8JZBOs453gWSalXtzjo6IGHWC0Kb1GF3AJ3u2kawFzR4NJjppSXc6v3A5Fvci2Qa5q SbSdGCDOMSW3+uA6EWb9B+33eS9dZN7FIVxslqfOxRJscQKQZSpM6DcofK45phEU28lTQs ZnUZkiP9+H23KyxzFx5IStZhtRXYnsE4PkEDaNOS37hgS6zykYbOL+BuifAoFgKtljy3Sl Rgcv6FCkdjFU04+bEp4zBk/mFZd9uVye7e8u61hz13zLMN6DWbPXxVEpjnv9Y1+1/ecShV pVlZOqf1g0hf3MjmcFTmATQ1HvUxRSDcF6GjgWDjE7m9wyawE6JFr0vlo78bhg== Received: from nuc (192-0-220-237.cpe.teksavvy.com [192.0.220.237]) (using TLSv1.3 with cipher TLS_AES_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: markj) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gMfzx0b4Hz3Ph; Fri, 22 May 2026 22:27:57 +0000 (UTC) (envelope-from markj@freebsd.org) Date: Fri, 22 May 2026 18:27:55 -0400 From: Mark Johnston To: "Bjoern A. Zeeb" Cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 36b855f18925 - main - amd64/vmm: Lock global PCI passthrough structures Message-ID: References: <69860b30.3f83f.acb567e@gitrepo.freebsd.org> <21416977-p363-rs27-90n6-qq2o931r4ps5@mnoonqbm.arg> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <21416977-p363-rs27-90n6-qq2o931r4ps5@mnoonqbm.arg> On Fri, May 22, 2026 at 10:13:38PM +0000, Bjoern A. Zeeb wrote: > On Fri, 6 Feb 2026, Mark Johnston wrote: > > > The branch main has been updated by markj: > > > > URL: https://cgit.FreeBSD.org/src/commit/?id=36b855f1892575cbfe1cd5455b989bfc8ae07502 > > > > commit 36b855f1892575cbfe1cd5455b989bfc8ae07502 > > Author: Mark Johnston > > AuthorDate: 2026-02-06 15:29:22 +0000 > > Commit: Mark Johnston > > CommitDate: 2026-02-06 15:38:51 +0000 > > > > amd64/vmm: Lock global PCI passthrough structures > > > > There is a global list of ppt-claimed devices, accessed via several > > vmm ioctls. The ioctls are locked by per-VM locks, but this isn't > > sufficient to prevent multiple VMs from trying to bind a given device. > > > > Add a sleepable lock and use that to synchronize all access to ppt > > devices. > > > > Reviewed by: corvink, jhb > > MFC after: 2 weeks > > Differential Revision: https://reviews.freebsd.org/D55065 > > --- > > sys/amd64/vmm/io/ppt.c | 162 +++++++++++++++++++++++++++++++++---------------- > > 1 file changed, 111 insertions(+), 51 deletions(-) > > > > diff --git a/sys/amd64/vmm/io/ppt.c b/sys/amd64/vmm/io/ppt.c > > index 6feac5dcbbed..b522e18e3b24 100644 > > --- a/sys/amd64/vmm/io/ppt.c > > +++ b/sys/amd64/vmm/io/ppt.c > ... > > int > > @@ -529,10 +558,12 @@ ppt_unmap_mmio(struct vm *vm, int bus, int slot, int func, > > struct pptseg *seg; > > struct pptdev *ppt; > > > > + PPT_LOCK(); > > error = ppt_find(vm, bus, slot, func, &ppt); > > if (error) > > - return (error); > > + goto out; > > > > + error = ENOENT; > > for (i = 0; i < MAX_MMIOSEGS; i++) { > > seg = &ppt->mmio[i]; > > if (seg->gpa == gpa && seg->len == len) { > > @@ -541,9 +572,11 @@ ppt_unmap_mmio(struct vm *vm, int bus, int slot, int func, > > seg->gpa = 0; > > seg->len = 0; > > } > > - return (error); > > + break; > > } > > } > > +out: > > + PPT_UNLOCK(); > > return (ENOENT); > > } > > There's a bug here. That should be return (error). That's been breaking > pci passthru since February. I cannot imagine how no one noticed this in > 3 months? Fixed in commit b13335331092, thanks. If I'm reading the bhyve code correctly, this is "cosmetic": the libvmmapi wrapper for this operation is vm_unmap_pptdev_mmio(), called in bhyve's passthru_mmio_map(). When the ioctl fails, passthru_mmio_map() prints that warning and returns an error to the caller... and all callers ignore it. I think that was true even before my refactoring in commit 86150ed98b790. How exactly is passthru broken for you? From nobody Fri May 22 22:35:07 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMg8G6myqz6dfrH; Fri, 22 May 2026 22:35:10 +0000 (UTC) (envelope-from bz@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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMg8G5QBLz3rWB; Fri, 22 May 2026 22:35:10 +0000 (UTC) (envelope-from bz@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779489310; 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=gp2puj9Jhwz8PZLmihEH0BP6PmBEgQpE3g/yJc6chTY=; b=m6rsjQ0wS4tuXPcGtZz2JXc+7A7a5NUiSwc6ObuFCpaQBbPxnPAnOcvYWzqo/eS0nGkbTr PwxYBW+5UHtivu3b41p0wFEKWg4usMwKurWm66ib5lVxIHDR2vY5osXdXQw4Rh6dTBZwjh 4PeIP0rFEY4a1eXsg3+ZatRxKAHDjfWcvVS/mV2RKO5LFxqS58qt9Yrgae/cmD0wphbtM/ JiSUXetlx4JhMUq29syZdrEEcGLoVuMFDZlAwNt5t2HXbrOowvbaIxGAZZLXGFmAcUjOgr sTkTAJahFzDIQ0DIUrLUN6PlyLr7LhwNroJ7LR0hNp7M8jBnBfXXA4UQYcU4Cg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779489310; a=rsa-sha256; cv=none; b=JwIYsogPHejM6qQFgBaQqtYhOjypg55yPpMbFWQ/RegnfMjwvIFzJ/uL8hn1JOpEfVvQBb JhkjPUOxEK0Xshpfl+7qs3t8gfkw4g2GPg0uX9Jx/N+WIZFs/7rUDIiltC5oB8Jp/xSQkh Xr3/899HxE/6XDARvJyuRA8Wgy6t870ZN27Y5aOt1I7RyO+fhFw3erXOb2lWj4/TldrVl4 gaSir6yMSI+K8vBeC3FfJ8HJsXEYmZuf69yt82qLlje33bZNkyFMSLE7SaeKqcfVm2xCK6 O3QPpQ4YaMGXsLfmkp1538/u+SGKdMBg/0WTm6GLo1xLUBl8Olzb3m3jbe4R8A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779489310; 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=gp2puj9Jhwz8PZLmihEH0BP6PmBEgQpE3g/yJc6chTY=; b=mup96aTCJXgLXYYGW6Hvk5X6v460z/zs+6ta/Z2pqjaaen5c6+iisVK4VATDxjYDeIvxFl w1ylal6T6H6QwPJVPyYv8Eo8P9M2HW77BAxGceiQjm6GKm/MGdt8nQnqWQBIhSHMkiTjin qPUkgoVTT4/kcKxoo60nVCGZIwi0fgHj3jLg5LQ8ywP6CXOtYsynS/A6vfKCBUvcbNPl3z xY5QgJiYswKYPUdxzdaNxlKAP3lyj3nEkH9j/jBf0+HJhkY6rf6277fF+JOryy+uvLiUv9 AAToX9/eleVvqLCaRq/5Clok7t3Tt7XTOaIdWpNb0KeqOB6ej/rKo7g7rrf9VA== Received: from mx-01.divo.sbone.de (mx-01.divo.sbone.de [IPv6:2003:a:140a:2200:6:594:fffe:19]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature ECDSA (prime256v1) client-digest SHA256) (Client CN "mx-01.divo.sbone.de", Issuer "E7" (not verified)) (Authenticated sender: bz/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gMg8G3xY1z4fb; Fri, 22 May 2026 22:35:10 +0000 (UTC) (envelope-from bz@freebsd.org) Received: from mail.sbone.de (mail.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by mx-01.divo.sbone.de (Postfix) with ESMTPS id 51222A64805; Fri, 22 May 2026 22:34:44 +0000 (UTC) Received: from content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPS id DF35A2D029E9; Fri, 22 May 2026 22:35:08 +0000 (UTC) X-Virus-Scanned: amavisd-new at sbone.de Received: from mail.sbone.de ([IPv6:fde9:577b:c1a9:4902:0:7404:2:1025]) by content-filter.t4-02.sbone.de (content-filter.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:2742]) (amavisd-new, port 10024) with ESMTP id XXltETHnsvPT; Fri, 22 May 2026 22:35:07 +0000 (UTC) Received: from nv.t4-02.sbone.de (nv.t4-02.sbone.de [IPv6:fde9:577b:c1a9:4902:0:7404:2:22]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mail.sbone.de (Postfix) with ESMTPSA id CA97C2D029D8; Fri, 22 May 2026 22:35:07 +0000 (UTC) Date: Fri, 22 May 2026 22:35:07 +0000 (UTC) From: "Bjoern A. Zeeb" To: Mark Johnston cc: src-committers@freebsd.org, dev-commits-src-all@freebsd.org, dev-commits-src-main@freebsd.org Subject: Re: git: 36b855f18925 - main - amd64/vmm: Lock global PCI passthrough structures In-Reply-To: Message-ID: <55o37qso-91n9-8rns-s584-3o2pp736105p@serrofq.bet> References: <69860b30.3f83f.acb567e@gitrepo.freebsd.org> <21416977-p363-rs27-90n6-qq2o931r4ps5@mnoonqbm.arg> X-OpenPGP-Key-Id: 0x14003F198FEFA3E77207EE8D2B58B8F83CCF1842 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed On Fri, 22 May 2026, Mark Johnston wrote: >> There's a bug here. That should be return (error). That's been breaking >> pci passthru since February. I cannot imagine how no one noticed this in >> 3 months? > > Fixed in commit b13335331092, thanks. > > If I'm reading the bhyve code correctly, this is "cosmetic": the > libvmmapi wrapper for this operation is vm_unmap_pptdev_mmio(), called > in bhyve's passthru_mmio_map(). When the ioctl fails, > passthru_mmio_map() prints that warning and returns an error to the > caller... and all callers ignore it. I think that was true even before > my refactoring in commit 86150ed98b790. > > How exactly is passthru broken for you? Was goingt o say see virtualization@ but maybe it's not broken as such as I am fighting the next issue. After fixing the ENOENT locally and the errors (or warnings as you say) being gone, which I thought may be the cause preventing the next bit, I am still not getting a virtio-net device to netboot the guest. The tap interface is there and also gets connected but EFI says there is no device to boot from. I am still trying to debug that. Help will be appreciated :) -- Bjoern A. Zeeb r15:7 From nobody Sat May 23 01:57:16 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMldS6L63z6f4bT for ; Sat, 23 May 2026 01:57: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMldS4SH6z3F47 for ; Sat, 23 May 2026 01:57:16 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779501436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OqiUahhIV9XoGkB/GFveVsQx6R2+GKhl3SML1oopTCk=; b=Jm2bBeG+RFyJyX+AgmvcrdL9BpQBQi+zpHnvTUsgtvh74rGqEqdJ1zXv5Q8TCzJqBE7pCE 4ObaZpwDajY5BvSzRR5DEEtrQU9NMtsCh6cVERcwypanD72IvWZhCnv5DnQIUjaIG/fXOa PHYSGxNGI7xv06EG3e36ajCmVR+wAGTGZkBbjdVunnf2bj6QxGxhnCJKZH5Xmqy97BcljT FJCUBUcmvfUDE8+eL3uajNqrtMCmP1ESU6MbAFvhdYn6Uyc8WQs1Lj1IiPWUy2Y8CPenwI rzeeuB2YXCEMCazv/wndFTOSiHTpoD7zOCuRca66p0bk5pErlF2bcydkCrGFBg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779501436; a=rsa-sha256; cv=none; b=UisD1MxLa/oIM7P2jvVN0bo4cm1XyqDPNOKE5WxtxLUZSH9Ntxer5Cnf0FSTSolN8gyibh OZoiQT9x55CMPhHI9KN010hdh2jwI8AggaNwtkWKGvuGnk3d76YD6cdPgwFZTvNYThKXoS RZrB+pZiT2kqkUKkoC8snQm0QXsB2ElZJXZw64Gc6aBdVsF8LQlYCI/CIX52vJVETBDay5 DpcY//iogt33NYOlS/yh209nH+ApL/Zx0P0BXL5lI4aaOQ9Cm2esawvOrC0UJHwjiv/XxU nNzJ+UDI3cmKm6tLFgVomRkZlSW3IR9fnxPUOroC6kwU5TyGgI/PIdiskdq6pQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779501436; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=OqiUahhIV9XoGkB/GFveVsQx6R2+GKhl3SML1oopTCk=; b=Gk3pR7G6+e4WjIBnsRtLk+Lcmki13f0MHUldcQTOwlWzq5A9tRH4UKShNtCJaFInL/6kN5 YZhfElvWOJ8RHYdtDnFbGKEkhPoTsMq3llTXHvxQZssdkf3cfQFyT9M5EbblLJHOH41H1n /AlEvGwuAC0l79JbXHg+2+TgWYf4l+abOpSGHNOrrUHkGCksePjG76Um5/t5vni/HWUmBL MyOFYb2RVgZs8icrEXrcis5qcx0K+bvS6Tsz3i1QGx8rZNFqHT+JBwwMd5beLDXGY9CoVW YkXJCJbRZL3Mpbsap1WizIWSfzc6mSsmbWBtjDq2hngAJ1a0scVDJWP3SG/Qog== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMldS3sGxznBH for ; Sat, 23 May 2026 01:57:16 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 4421f by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 23 May 2026 01:57:16 +0000 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=B8rg?=rav Subject: git: 5fa84c6ec176 - main - unbound: Update to 1.25.0 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 5fa84c6ec176d186ddad25d31f8760e50f48157f Auto-Submitted: auto-generated Date: Sat, 23 May 2026 01:57:16 +0000 Message-Id: <6a11097c.4421f.70704597@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=5fa84c6ec176d186ddad25d31f8760e50f48157f commit 5fa84c6ec176d186ddad25d31f8760e50f48157f Merge: b13335331092 4dd0a17edce6 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-23 01:54:22 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-23 01:54:22 +0000 unbound: Update to 1.25.0 Release notes at https://nlnetlabs.nl/news/2026/Apr/29/unbound-1.25.0-released/ Merge commit '4dd0a17edce60370304a45f2c40251e09e193bd6' MFC after: 1 week contrib/unbound/README.md | 21 +- contrib/unbound/aclocal.m4 | 857 +- contrib/unbound/acx_nlnetlabs.m4 | 77 +- contrib/unbound/cachedb/cachedb.c | 108 +- contrib/unbound/cachedb/redis.c | 6 + contrib/unbound/compat/arc4random.c | 7 + contrib/unbound/compat/chacha_private.h | 4 +- contrib/unbound/compat/getentropy_linux.c | 20 + contrib/unbound/compat/gmtime_r.c | 5 +- contrib/unbound/config.h.in | 397 +- contrib/unbound/configure | 6522 ++++++--------- contrib/unbound/configure.ac | 123 +- contrib/unbound/contrib/README | 2 + contrib/unbound/contrib/gost12.patch | 325 + contrib/unbound/contrib/ios/install_openssl.sh | 12 +- contrib/unbound/contrib/ios/setenv_ios.sh | 5 + contrib/unbound/contrib/unbound.service.in | 2 +- .../unbound/contrib/unbound_portable.service.in | 2 +- contrib/unbound/daemon/daemon.c | 326 +- contrib/unbound/daemon/daemon.h | 41 + contrib/unbound/daemon/remote.c | 315 +- contrib/unbound/daemon/remote.h | 8 + contrib/unbound/daemon/stats.c | 6 + contrib/unbound/daemon/unbound.c | 51 +- contrib/unbound/daemon/worker.c | 258 +- contrib/unbound/dns64/dns64.c | 23 +- contrib/unbound/dnstap/dtstream.c | 16 +- contrib/unbound/dnstap/dtstream.h | 6 + contrib/unbound/dnstap/unbound-dnstap-socket.c | 28 +- contrib/unbound/doc/Changelog | 484 ++ contrib/unbound/doc/README | 2 +- contrib/unbound/doc/README.DNS64 | 6 +- contrib/unbound/doc/README.man | 11 +- contrib/unbound/doc/example.conf | 75 +- contrib/unbound/doc/example.conf.in | 75 +- contrib/unbound/doc/libunbound.3 | 6 +- contrib/unbound/doc/libunbound.3.in | 6 +- contrib/unbound/doc/unbound-anchor.8 | 21 +- contrib/unbound/doc/unbound-anchor.8.in | 21 +- contrib/unbound/doc/unbound-anchor.rst | 15 +- contrib/unbound/doc/unbound-checkconf.8 | 6 +- contrib/unbound/doc/unbound-checkconf.8.in | 6 +- contrib/unbound/doc/unbound-control.8 | 45 +- contrib/unbound/doc/unbound-control.8.in | 45 +- contrib/unbound/doc/unbound-control.rst | 34 + contrib/unbound/doc/unbound-host.1 | 6 +- contrib/unbound/doc/unbound-host.1.in | 6 +- contrib/unbound/doc/unbound.8 | 8 +- contrib/unbound/doc/unbound.8.in | 8 +- contrib/unbound/doc/unbound.conf.5 | 558 +- contrib/unbound/doc/unbound.conf.5.in | 558 +- contrib/unbound/doc/unbound.conf.rst | 524 +- contrib/unbound/doc/unbound.rst | 2 +- contrib/unbound/edns-subnet/subnetmod.c | 108 +- contrib/unbound/edns-subnet/subnetmod.h | 10 + contrib/unbound/install-sh | 178 +- contrib/unbound/ipsecmod/ipsecmod.c | 2 +- contrib/unbound/iterator/iter_fwd.c | 5 + contrib/unbound/iterator/iter_hints.c | 5 + contrib/unbound/iterator/iter_priv.c | 168 +- contrib/unbound/iterator/iter_scrub.c | 70 +- contrib/unbound/iterator/iter_utils.c | 50 +- contrib/unbound/iterator/iter_utils.h | 1 + contrib/unbound/iterator/iterator.c | 43 +- contrib/unbound/libunbound/unbound.h | 4 + contrib/unbound/ltmain.sh | 1566 ++-- contrib/unbound/pythonmod/interface.i | 1857 ----- contrib/unbound/pythonmod/pythonmod_utils.c | 201 - contrib/unbound/respip/respip.c | 9 +- contrib/unbound/services/authzone.c | 150 +- contrib/unbound/services/cache/dns.c | 110 +- contrib/unbound/services/cache/dns.h | 2 +- contrib/unbound/services/cache/infra.c | 3 +- contrib/unbound/services/cache/rrset.c | 37 +- contrib/unbound/services/listen_dnsport.c | 40 +- contrib/unbound/services/localzone.c | 179 +- contrib/unbound/services/localzone.h | 12 +- contrib/unbound/services/mesh.c | 130 +- contrib/unbound/services/mesh.h | 13 +- contrib/unbound/services/modstack.c | 7 +- contrib/unbound/services/outside_network.c | 65 +- contrib/unbound/services/outside_network.h | 7 + contrib/unbound/services/rpz.c | 1 + contrib/unbound/sldns/rrdef.h | 4 +- contrib/unbound/sldns/wire2str.c | 3 + contrib/unbound/smallapp/unbound-anchor.c | 12 +- contrib/unbound/smallapp/unbound-checkconf.c | 48 +- contrib/unbound/smallapp/unbound-control.c | 15 +- contrib/unbound/smallapp/unbound-host.c | 12 +- contrib/unbound/testcode/checklocks.c | 916 --- contrib/unbound/testcode/do-tests.sh | 76 - contrib/unbound/testcode/doqclient.c | 2764 ------- contrib/unbound/testcode/fake_event.c | 2044 ----- contrib/unbound/testcode/testbound.c | 788 -- contrib/unbound/testcode/unitdname.c | 1314 --- contrib/unbound/testcode/unitinfra.c | 210 - contrib/unbound/testcode/unitldns.c | 284 - contrib/unbound/testcode/unitmain.c | 1401 ---- contrib/unbound/testcode/unitmain.h | 92 - contrib/unbound/testcode/unitneg.c | 545 -- contrib/unbound/testcode/unitverify.c | 706 -- contrib/unbound/testcode/unitzonemd.c | 542 -- contrib/unbound/util/alloc.c | 2 +- contrib/unbound/util/config_file.c | 116 + contrib/unbound/util/config_file.h | 32 + contrib/unbound/util/configlexer.c | 8521 ++++++++++---------- contrib/unbound/util/configlexer.lex | 4 +- contrib/unbound/util/configparser.c | 4650 +++++------ contrib/unbound/util/configparser.h | 184 +- contrib/unbound/util/configparser.y | 53 +- contrib/unbound/util/data/msgencode.c | 58 +- contrib/unbound/util/data/msgencode.h | 4 +- contrib/unbound/util/data/msgparse.c | 12 + contrib/unbound/util/data/msgparse.h | 25 + contrib/unbound/util/data/msgreply.c | 72 +- contrib/unbound/util/data/msgreply.h | 28 +- contrib/unbound/util/data/packed_rrset.c | 36 +- contrib/unbound/util/data/packed_rrset.h | 3 + contrib/unbound/util/fptr_wlist.c | 7 +- contrib/unbound/util/fptr_wlist.h | 8 +- contrib/unbound/util/iana_ports.inc | 9 +- contrib/unbound/util/locks.h | 27 + contrib/unbound/util/log.c | 32 +- contrib/unbound/util/module.h | 19 +- contrib/unbound/util/net_help.c | 54 +- contrib/unbound/util/net_help.h | 12 +- contrib/unbound/util/netevent.c | 27 +- contrib/unbound/util/shm_side/shm_main.c | 219 +- contrib/unbound/util/shm_side/shm_main.h | 15 + contrib/unbound/util/timehist.h | 4 + contrib/unbound/validator/val_neg.c | 14 +- contrib/unbound/validator/val_sigcrypt.c | 12 + contrib/unbound/validator/val_sigcrypt.h | 2 +- contrib/unbound/validator/val_utils.c | 25 + contrib/unbound/validator/val_utils.h | 11 + contrib/unbound/validator/validator.c | 95 +- contrib/unbound/winrc/win_svc.c | 6 +- lib/libunbound/config.h | 403 +- 138 files changed, 16189 insertions(+), 27522 deletions(-) diff --cc contrib/unbound/README.md index 3bbd38b3b78b,000000000000..d805e4d0a3d7 mode 100644,000000..100644 --- a/contrib/unbound/README.md +++ b/contrib/unbound/README.md @@@ -1,42 -1,0 +1,45 @@@ +# Unbound + +[![Github Build Status](https://github.com/NLnetLabs/unbound/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/NLnetLabs/unbound/actions) +[![Packaging status](https://repology.org/badge/tiny-repos/unbound.svg)](https://repology.org/project/unbound/versions) +[![Fuzzing Status](https://oss-fuzz-build-logs.storage.googleapis.com/badges/unbound.svg)](https://bugs.chromium.org/p/oss-fuzz/issues/list?sort=-opened&can=1&q=proj:unbound) +[![Documentation Status](https://readthedocs.org/projects/unbound/badge/?version=latest)](https://unbound.readthedocs.io/en/latest/?badge=latest) - [![Mastodon Follow](https://img.shields.io/mastodon/follow/109262826617293067?domain=https%3A%2F%2Ffosstodon.org&style=social)](https://fosstodon.org/@nlnetlabs) ++[![Mastodon Follow](https://img.shields.io/mastodon/follow/114692612288811644?domain=social.nlnetlabs.nl&style=social)](https://social.nlnetlabs.nl/@nlnetlabs) + +Unbound is a validating, recursive, caching DNS resolver. It is designed to be +fast and lean and incorporates modern features based on open standards. If you +have any feedback, we would love to hear from you. Don’t hesitate to +[create an issue on Github](https://github.com/NLnetLabs/unbound/issues/new) +or post a message on the [Unbound mailing list](https://lists.nlnetlabs.nl/mailman/listinfo/unbound-users). +You can learn more about Unbound by reading our +[documentation](https://unbound.docs.nlnetlabs.nl/). + +## Compiling + +Make sure you have the C toolchain, OpenSSL and its include files, and libexpat +installed. +If building from the repository source you also need flex and bison installed. +Unbound can be compiled and installed using: + +``` +./configure && make && make install +``` + - You can use libevent if you want. libevent is useful when using many (10000) - outgoing ports. By default max 256 ports are opened at the same time and the - builtin alternative is equally capable and a little faster. - ++You can use libevent if you want. libevent is useful when using many (e.g., ++10000) outgoing ports. +Use the `--with-libevent` configure option to compile Unbound with libevent +support. + ++If not, the default builtin alternative opens max 256 ports at the same time ++and is equally capable and a little faster. ++ ++ +## Unbound configuration + - All of Unbound's configuration options are described in the man pages, which - will be installed and are available on the Unbound - [documentation page](https://unbound.docs.nlnetlabs.nl/). ++All of Unbound's configuration options are described in the `unbound.conf(5)` ++man page, which will be installed and is also available on the Unbound ++[documentation page](https://unbound.docs.nlnetlabs.nl/en/latest/manpages/unbound.conf.html) ++for the latest version. + - An example configuration file is located in ++An example configuration file, with minimal documentation, is located in +[doc/example.conf](https://github.com/NLnetLabs/unbound/blob/master/doc/example.conf.in). diff --cc contrib/unbound/contrib/gost12.patch index 000000000000,c8df071666aa..c8df071666aa mode 000000,100644..100644 --- a/contrib/unbound/contrib/gost12.patch +++ b/contrib/unbound/contrib/gost12.patch diff --cc contrib/unbound/doc/example.conf index ba9fee412d7b,000000000000..8820e4ae6058 mode 100644,000000..100644 --- a/contrib/unbound/doc/example.conf +++ b/contrib/unbound/doc/example.conf @@@ -1,1424 -1,0 +1,1455 @@@ +# +# Example configuration file. +# - # See unbound.conf(5) man page, version 1.24.2. ++# See unbound.conf(5) man page, version 1.25.0. +# +# this is a comment. + +# Use this anywhere in the file to include other text into this file. +#include: "otherfile.conf" + +# Use this anywhere in the file to include other text, that explicitly starts a +# clause, into this file. Text after this directive needs to start a clause. +#include-toplevel: "otherfile.conf" + +# The server clause sets the main parameters. +server: + # whitespace is not necessary, but looks cleaner. + + # verbosity number, 0 is least verbose. 1 is default. + # verbosity: 1 + + # print statistics to the log (for every thread) every N seconds. + # Set to "" or 0 to disable. Default is disabled. + # statistics-interval: 0 + + # enable shm for stats, default no. if you enable also enable + # statistics-interval, every time it also writes stats to the + # shared memory segment keyed with shm-key. + # shm-enable: no + + # shm for stats uses this key, and key+1 for the shared mem segment. + # shm-key: 11777 + + # enable cumulative statistics, without clearing them after printing. + # statistics-cumulative: no + + # enable extended statistics (query types, answer codes, status) + # printed from unbound-control. Default off, because of speed. + # extended-statistics: no + + # Inhibits selected extended statistics (qtype, qclass, qopcode, rcode, + # rpz-actions) from printing if their value is 0. + # Default on. + # statistics-inhibit-zero: yes + + # number of threads to create. 1 disables threading. + # num-threads: 1 + + # specify the interfaces to answer queries from by ip-address. + # The default is to listen to localhost (127.0.0.1 and ::1). + # specify 0.0.0.0 and ::0 to bind to all available interfaces. + # specify every interface[@port] on a new 'interface:' labelled line. + # The listen interfaces are not changed on reload, only on restart. + # interface: 192.0.2.153 + # interface: 192.0.2.154 + # interface: 192.0.2.154@5003 - # interface: 2001:DB8::5 ++ # interface: 2001:db8::5 + # interface: eth0@5003 + + # enable this feature to copy the source address of queries to reply. + # Socket options are not supported on all platforms. experimental. + # interface-automatic: no + + # instead of the default port, open additional ports separated by + # spaces when interface-automatic is enabled, by listing them here. + # interface-automatic-ports: "" + + # port to answer queries from + # port: 53 + + # specify the interfaces to send outgoing queries to authoritative + # server from by ip-address. If none, the default (all) interface + # is used. Specify every interface on a 'outgoing-interface:' line. + # outgoing-interface: 192.0.2.153 - # outgoing-interface: 2001:DB8::5 - # outgoing-interface: 2001:DB8::6 ++ # outgoing-interface: 2001:db8::5 ++ # outgoing-interface: 2001:db8::6 + + # Specify a netblock to use remainder 64 bits as random bits for + # upstream queries. Uses freebind option (Linux). - # outgoing-interface: 2001:DB8::/64 ++ # outgoing-interface: 2001:db8::/64 + # Also (Linux:) ip -6 addr add 2001:db8::/64 dev lo + # And: ip -6 route add local 2001:db8::/64 dev lo + # And set prefer-ip6: yes to use the ip6 randomness from a netblock. + # Set this to yes to prefer ipv6 upstream servers over ipv4. + # prefer-ip6: no + + # Prefer ipv4 upstream servers, even if ipv6 is available. + # prefer-ip4: no + + # number of ports to allocate per thread, determines the size of the + # port range that can be open simultaneously. About double the + # num-queries-per-thread, or, use as many as the OS will allow you. + # outgoing-range: 4096 + + # permit Unbound to use this port number or port range for + # making outgoing queries, using an outgoing interface. + # outgoing-port-permit: 32768 + + # deny Unbound the use this of port number or port range for + # making outgoing queries, using an outgoing interface. + # Use this to make sure Unbound does not grab a UDP port that some + # other server on this computer needs. The default is to avoid + # IANA-assigned port numbers. + # If multiple outgoing-port-permit and outgoing-port-avoid options + # are present, they are processed in order. + # outgoing-port-avoid: "3200-3208" + + # number of outgoing simultaneous tcp buffers to hold per thread. + # outgoing-num-tcp: 10 + + # number of incoming simultaneous tcp buffers to hold per thread. + # incoming-num-tcp: 10 + + # buffer size for UDP port 53 incoming (SO_RCVBUF socket option). + # 0 is system default. Use 4m to catch query spikes for busy servers. + # so-rcvbuf: 0 + + # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option). + # 0 is system default. Set larger to handle spikes on very busy servers. + # so-sndbuf: 4m + + # use SO_REUSEPORT to distribute queries over threads. + # at extreme load it could be better to turn it off to distribute even. + # so-reuseport: yes + + # use IP_TRANSPARENT so the interface: addresses can be non-local + # and you can config non-existing IPs that are going to work later on + # (uses IP_BINDANY on FreeBSD). + # ip-transparent: no + + # use IP_FREEBIND so the interface: addresses can be non-local + # and you can bind to nonexisting IPs and interfaces that are down. + # Linux only. On Linux you also have ip-transparent that is similar. + # ip-freebind: no + + # the value of the Differentiated Services Codepoint (DSCP) + # in the differentiated services field (DS) of the outgoing + # IP packets + # ip-dscp: 0 + + # EDNS reassembly buffer to advertise to UDP peers (the actual buffer + # is set with msg-buffer-size). + # edns-buffer-size: 1232 + + # Maximum UDP response size (not applied to TCP response). + # Suggested values are 512 to 4096. Default is 1232. 65536 disables it. + # max-udp-size: 1232 + + # max memory to use for stream(tcp and tls) waiting result buffers. + # stream-wait-size: 4m + + # buffer size for handling DNS data. No messages larger than this + # size can be sent or received, by UDP or TCP. In bytes. + # msg-buffer-size: 65552 + + # the amount of memory to use for the message cache. + # plain value in bytes or you can append k, m or G. default is "4Mb". + # msg-cache-size: 4m + + # the number of slabs to use for the message cache. + # the number of slabs must be a power of 2. + # more slabs reduce lock contention, but fragment memory usage. + # msg-cache-slabs: 4 + + # the number of queries that a thread gets to service. + # num-queries-per-thread: 2048 + + # if very busy, 50% queries run to completion, 50% get timeout in msec + # jostle-timeout: 200 + + # msec to wait before close of port on timeout UDP. 0 disables. + # delay-close: 0 + + # perform connect for UDP sockets to mitigate ICMP side channel. + # udp-connect: yes + + # The number of retries, per upstream nameserver in a delegation, when + # a throwaway response (also timeouts) is received. + # outbound-msg-retry: 5 + + # Hard limit on the number of outgoing queries Unbound will make while + # resolving a name, making sure large NS sets do not loop. + # It resets on query restarts (e.g., CNAME) and referrals. + # max-sent-count: 32 + + # Hard limit on the number of times Unbound is allowed to restart a + # query upon encountering a CNAME record. + # max-query-restarts: 11 + + # Limit on number of NS records in NS RRset for incoming packets. + # iter-scrub-ns: 20 + + # Limit on number of CNAME, DNAME records for incoming packets. + # iter-scrub-cname: 11 + ++ # Limit on number of RRSIGs for an RRset for incoming packets. ++ # iter-scrub-rrsig: 8 ++ + # Limit on upstream queries for an incoming query and its recursion. + # max-global-quota: 200 + + # Should the scrubber remove promiscuous NS from positive answers, + # protects against poison attempts. + # iter-scrub-promiscuous: yes + + # msec for waiting for an unknown server to reply. Increase if you + # are behind a slow satellite link, to eg. 1128. + # unknown-server-time-limit: 376 + + # msec before recursion replies are dropped. The work item continues. + # discard-timeout: 1900 + + # Max number of replies waiting for recursion per IP address. + # wait-limit: 1000 + + # Max replies waiting for recursion for IP address with cookie. + # wait-limit-cookie: 10000 + + # Apart from the default, the wait limit can be set for a netblock. + # wait-limit-netblock: 192.0.2.0/24 50000 + + # Apart from the default, the wait limit with cookie can be adjusted. + # wait-limit-cookie-netblock: 192.0.2.0/24 50000 + + # Defaults for loopback, it has no wait limit. + # wait-limit-netblock: 127.0.0.0/8 -1 + # wait-limit-netblock: ::1/128 -1 + # wait-limit-cookie-netblock: 127.0.0.0/8 -1 + # wait-limit-cookie-netblock: ::1/128 -1 + + # the amount of memory to use for the RRset cache. + # plain value in bytes or you can append k, m or G. default is "4Mb". + # rrset-cache-size: 4m + + # the number of slabs to use for the RRset cache. + # the number of slabs must be a power of 2. + # more slabs reduce lock contention, but fragment memory usage. + # rrset-cache-slabs: 4 + + # the time to live (TTL) value lower bound, in seconds. Default 0. + # If more than an hour could easily give trouble due to stale data. + # cache-min-ttl: 0 + + # the time to live (TTL) value cap for RRsets and messages in the + # cache. Items are not cached for longer. In seconds. + # cache-max-ttl: 86400 + + # the time to live (TTL) value cap for negative responses in the cache + # cache-max-negative-ttl: 3600 + + # the time to live (TTL) value lower bound, in seconds. Default 0. + # For negative responses in the cache. If disabled, default, + # cache-min-ttl applies if configured. + # cache-min-negative-ttl: 0 + + # the time to live (TTL) value for cached roundtrip times, lameness and + # EDNS version information for hosts. In seconds. + # infra-host-ttl: 900 + + # minimum wait time for responses, increase if uplink is long. In msec. + # infra-cache-min-rtt: 50 + + # maximum wait time for responses. In msec. + # infra-cache-max-rtt: 120000 + + # enable to make server probe down hosts more frequently. + # infra-keep-probing: no + + # the number of slabs to use for the Infrastructure cache. + # the number of slabs must be a power of 2. + # more slabs reduce lock contention, but fragment memory usage. + # infra-cache-slabs: 4 + + # the maximum number of hosts that are cached (roundtrip, EDNS, lame). + # infra-cache-numhosts: 10000 + + # define a number of tags here, use with local-zone, access-control, + # interface-*. + # repeat the define-tag statement to add additional tags. + # define-tag: "tag1 tag2 tag3" + + # Enable IPv4, "yes" or "no". + # do-ip4: yes + + # Enable IPv6, "yes" or "no". + # do-ip6: yes + + # If running unbound on an IPv6-only host, domains that only have + # IPv4 servers would become unresolvable. If NAT64 is available in + # the network, unbound can use NAT64 to reach these servers with + # the following option. This is NOT needed for enabling DNS64 on a + # system that has IPv4 connectivity. + # Consider also enabling prefer-ip6 to prefer native IPv6 connections + # to nameservers. + # do-nat64: no + + # NAT64 prefix. Defaults to using dns64-prefix value. + # nat64-prefix: 64:ff9b::0/96 + + # Enable UDP, "yes" or "no". + # do-udp: yes + + # Enable TCP, "yes" or "no". + # do-tcp: yes + + # upstream connections use TCP only (and no UDP), "yes" or "no" + # useful for tunneling scenarios, default no. + # tcp-upstream: no + + # upstream connections also use UDP (even if do-udp is no). + # useful if if you want UDP upstream, but don't provide UDP downstream. + # udp-upstream-without-downstream: no + + # Maximum segment size (MSS) of TCP socket on which the server + # responds to queries. Default is 0, system default MSS. + # tcp-mss: 0 + + # Maximum segment size (MSS) of TCP socket for outgoing queries. + # Default is 0, system default MSS. + # outgoing-tcp-mss: 0 + + # Idle TCP timeout, connection closed in milliseconds + # tcp-idle-timeout: 30000 + + # Enable EDNS TCP keepalive option. + # edns-tcp-keepalive: no + + # Timeout for EDNS TCP keepalive, in msec. Overrides tcp-idle-timeout + # if edns-tcp-keepalive is set. + # edns-tcp-keepalive-timeout: 120000 + + # UDP queries that have waited in the socket buffer for a long time + # can be dropped. Default is 0, disabled. In seconds, such as 3. + # sock-queue-timeout: 0 + + # Use systemd socket activation for UDP, TCP, and control sockets. + # use-systemd: no + + # Detach from the terminal, run in background, "yes" or "no". + # Set the value to "no" when Unbound runs as systemd service. + # do-daemonize: yes + + # control which clients are allowed to make (recursive) queries + # to this server. Specify classless netblocks with /size and action. + # By default everything is refused, except for localhost. + # Choose deny (drop message), refuse (polite error reply), + # allow (recursive ok), allow_setrd (recursive ok, rd bit is forced on), + # allow_snoop (recursive and nonrecursive ok) + # allow_cookie (allow UDP with valid cookie or stateful transport) + # deny_non_local (drop queries unless can be answered from local-data) + # refuse_non_local (like deny_non_local but polite error reply). + # access-control: 127.0.0.0/8 allow + # access-control: ::1 allow + # access-control: ::ffff:127.0.0.1 allow + + # tag access-control with list of tags (in "" with spaces between) + # Clients using this access control element use localzones that + # are tagged with one of these tags. + # access-control-tag: 192.0.2.0/24 "tag2 tag3" + + # set action for particular tag for given access control element. + # if you have multiple tag values, the tag used to lookup the action + # is the first tag match between access-control-tag and local-zone-tag + # where "first" comes from the order of the define-tag values. + # access-control-tag-action: 192.0.2.0/24 tag3 refuse + + # set redirect data for particular tag for access control element + # access-control-tag-data: 192.0.2.0/24 tag2 "A 127.0.0.1" + + # Set view for access control element + # access-control-view: 192.0.2.0/24 viewname + + # Similar to 'access-control:' but for interfaces. + # Control which listening interfaces are allowed to accept (recursive) + # queries for this server. + # The specified interfaces should be the same as the ones specified in + # 'interface:' followed by the action. + # The actions are the same as 'access-control:' above. + # By default all the interfaces configured are refused. + # Note: any 'access-control*:' setting overrides all 'interface-*:' + # settings for targeted clients. + # interface-action: 192.0.2.153 allow + # interface-action: 192.0.2.154 allow + # interface-action: 192.0.2.154@5003 allow - # interface-action: 2001:DB8::5 allow ++ # interface-action: 2001:db8::5 allow + # interface-action: eth0@5003 allow + + # Similar to 'access-control-tag:' but for interfaces. + # Tag interfaces with a list of tags (in "" with spaces between). + # Interfaces using these tags use localzones that are tagged with one + # of these tags. + # The specified interfaces should be the same as the ones specified in + # 'interface:' followed by the list of tags. + # Note: any 'access-control*:' setting overrides all 'interface-*:' + # settings for targeted clients. + # interface-tag: eth0@5003 "tag2 tag3" + + # Similar to 'access-control-tag-action:' but for interfaces. + # Set action for particular tag for a given interface element. + # If you have multiple tag values, the tag used to lookup the action + # is the first tag match between interface-tag and local-zone-tag + # where "first" comes from the order of the define-tag values. + # The specified interfaces should be the same as the ones specified in + # 'interface:' followed by the tag and action. + # Note: any 'access-control*:' setting overrides all 'interface-*:' + # settings for targeted clients. + # interface-tag-action: eth0@5003 tag3 refuse + + # Similar to 'access-control-tag-data:' but for interfaces. + # Set redirect data for a particular tag for an interface element. + # The specified interfaces should be the same as the ones specified in + # 'interface:' followed by the tag and the redirect data. + # Note: any 'access-control*:' setting overrides all 'interface-*:' + # settings for targeted clients. + # interface-tag-data: eth0@5003 tag2 "A 127.0.0.1" + + # Similar to 'access-control-view:' but for interfaces. + # Set view for an interface element. + # The specified interfaces should be the same as the ones specified in + # 'interface:' followed by the view name. + # Note: any 'access-control*:' setting overrides all 'interface-*:' + # settings for targeted clients. + # interface-view: eth0@5003 viewname + + # if given, a chroot(2) is done to the given directory. + # i.e. you can chroot to the working directory, for example, + # for extra security, but make sure all files are in that directory. + # + # If chroot is enabled, you should pass the configfile (from the + # commandline) as a full path from the original root. After the + # chroot has been performed the now defunct portion of the config + # file path is removed to be able to reread the config after a reload. + # + # All other file paths (working dir, logfile, roothints, and + # key files) can be specified in several ways: + # o as an absolute path relative to the new root. + # o as a relative path to the working directory. + # o as an absolute path relative to the original root. + # In the last case the path is adjusted to remove the unused portion. + # + # The pid file can be absolute and outside of the chroot, it is + # written just prior to performing the chroot and dropping permissions. + # + # Additionally, Unbound may need to access /dev/urandom (for entropy). + # How to do this is specific to your OS. + # + # If you give "" no chroot is performed. The path must not end in a /. + # chroot: "/var/unbound" + + # if given, user privileges are dropped (after binding port), + # and the given username is assumed. Default is user "unbound". + # If you give "" no privileges are dropped. + # username: "unbound" + + # the working directory. The relative files in this config are + # relative to this directory. If you give "" the working directory + # is not changed. + # If you give a server: directory: dir before include: file statements + # then those includes can be relative to the working directory. + # directory: "/var/unbound" + + # the log file, "" means log to stderr. + # Use of this option sets use-syslog to "no". + # logfile: "" + + # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to + # log to. If yes, it overrides the logfile. + # use-syslog: yes + + # Log identity to report. if empty, defaults to the name of argv[0] + # (usually "unbound"). + # log-identity: "" + + # print UTC timestamp in ascii to logfile, default is epoch in seconds. + # log-time-ascii: no + + # log timestamp in ISO8601 format if also log-time-ascii is enabled. + # (y-m-dTh:m:s.msec[+-]tzhours:tzminutes) + # log-time-iso: no + + # print one line with time, IP, name, type, class for every query. + # log-queries: no + + # print one line per reply, with time, IP, name, type, class, rcode, + # timetoresolve, fromcache and responsesize. + # log-replies: no + + # log with tag 'query' and 'reply' instead of 'info' for + # filtering log-queries and log-replies from the log. + # log-tag-queryreply: no + + # log with destination address, port and type for log-replies. + # log-destaddr: no + + # log the local-zone actions, like local-zone type inform is enabled + # also for the other local zone types. + # log-local-actions: no + + # print log lines that say why queries return SERVFAIL to clients. + # log-servfail: no + ++ # log system-wide Linux thread ID, insted of Unbound's internal thread ++ # counter. Only on Linux and only when threads are available. ++ # log-thread-id: no ++ + # the pid file. Can be an absolute path outside of chroot/work dir. + # pidfile: "/var/unbound/unbound.pid" + + # file to read root hints from. + # get one from https://www.internic.net/domain/named.cache + # root-hints: "" + + # enable to not answer id.server and hostname.bind queries. + # hide-identity: no + + # enable to not answer version.server and version.bind queries. + # hide-version: no + + # enable to not answer trustanchor.unbound queries. + # hide-trustanchor: no + + # enable to not set the User-Agent HTTP header. + # hide-http-user-agent: no + + # the identity to report. Leave "" or default to return hostname. + # identity: "" + + # the version to report. Leave "" or default to return package version. + # version: "" + + # NSID identity (hex string, or "ascii_somestring"). default disabled. + # nsid: "aabbccdd" + + # User-Agent HTTP header to use. Leave "" or default to use package name + # and version. + # http-user-agent: "" + + # the target fetch policy. + # series of integers describing the policy per dependency depth. + # The number of values in the list determines the maximum dependency + # depth the recursor will pursue before giving up. Each integer means: + # -1 : fetch all targets opportunistically, + # 0: fetch on demand, + # positive value: fetch that many targets opportunistically. + # Enclose the list of numbers between quotes (""). + # target-fetch-policy: "3 2 1 0 0" + + # Harden against very small EDNS buffer sizes. + # harden-short-bufsize: yes + + # Harden against unseemly large queries. + # harden-large-queries: no + + # Harden against out of zone rrsets, to avoid spoofing attempts. + # harden-glue: yes + + # Harden against unverified (outside-zone, including sibling zone) glue rrsets + # harden-unverified-glue: no + + # Harden against receiving dnssec-stripped data. If you turn it + # off, failing to validate dnskey data for a trustanchor will + # trigger insecure mode for that zone (like without a trustanchor). + # Default on, which insists on dnssec data for trust-anchored zones. + # harden-dnssec-stripped: yes + + # Harden against queries that fall under dnssec-signed nxdomain names. + # harden-below-nxdomain: yes + + # Harden the referral path by performing additional queries for + # infrastructure data. Validates the replies (if possible). + # Default off, because the lookups burden the server. Experimental + # implementation of draft-wijngaards-dnsext-resolver-side-mitigation. + # harden-referral-path: no + + # Harden against algorithm downgrade when multiple algorithms are + # advertised in the DS record. If no, allows any algorithm + # to validate the zone which is the standard behavior for validators. + # Check the manpage for detailed information. + # harden-algo-downgrade: no + + # Harden against unknown records in the authority section and the + # additional section. + # harden-unknown-additional: no + + # Sent minimum amount of information to upstream servers to enhance + # privacy. Only sent minimum required labels of the QNAME and set QTYPE + # to A when possible. + # qname-minimisation: yes + + # QNAME minimisation in strict mode. Do not fall-back to sending full + # QNAME to potentially broken nameservers. A lot of domains will not be + # resolvable when this option in enabled. + # This option only has effect when qname-minimisation is enabled. + # qname-minimisation-strict: no + + # Aggressive NSEC uses the DNSSEC NSEC chain to synthesize NXDOMAIN + # and other denials, using information from previous NXDOMAINs answers. + # aggressive-nsec: yes + + # Use 0x20-encoded random bits in the query to foil spoof attempts. + # This feature is an experimental implementation of draft dns-0x20. + # use-caps-for-id: no + + # Domains (and domains in them) without support for dns-0x20 and + # the fallback fails because they keep sending different answers. + # caps-exempt: "licdn.com" + # caps-exempt: "senderbase.org" + + # Enforce privacy of these addresses. Strips them away from answers. + # It may cause DNSSEC validation to additionally mark it as bogus. + # Protects against 'DNS Rebinding' (uses browser as network proxy). + # Only 'private-domain' and 'local-data' names are allowed to have + # these private addresses. No default. + # private-address: 10.0.0.0/8 + # private-address: 172.16.0.0/12 + # private-address: 192.168.0.0/16 + # private-address: 169.254.0.0/16 + # private-address: fd00::/8 + # private-address: fe80::/10 + # private-address: ::ffff:0:0/96 + + # Allow the domain (and its subdomains) to contain private addresses. + # local-data statements are allowed to contain private addresses too. + # private-domain: "example.com" + + # If nonzero, unwanted replies are not only reported in statistics, + # but also a running total is kept per thread. If it reaches the + # threshold, a warning is printed and a defensive action is taken, + # the cache is cleared to flush potential poison out of it. + # A suggested value is 10000000, the default is 0 (turned off). + # unwanted-reply-threshold: 0 + + # Do not query the following addresses. No DNS queries are sent there. + # List one address per entry. List classless netblocks with /size, + # do-not-query-address: 127.0.0.1/8 + # do-not-query-address: ::1 + + # if yes, the above default do-not-query-address entries are present. + # if no, localhost can be queried (for testing and debugging). + # do-not-query-localhost: yes + + # if yes, perform prefetching of almost expired message cache entries. + # prefetch: no + + # if yes, perform key lookups adjacent to normal lookups. + # prefetch-key: no + + # deny queries of type ANY with an empty response. + # deny-any: no + + # if yes, Unbound rotates RRSet order in response. + # rrset-roundrobin: yes + + # if yes, Unbound doesn't insert authority/additional sections + # into response messages when those sections are not required. + # minimal-responses: yes + + # true to disable DNSSEC lameness check in iterator. + # disable-dnssec-lame-check: no + + # module configuration of the server. A string with identifiers + # separated by spaces. Syntax: "[dns64] [validator] iterator" + # most modules have to be listed at the beginning of the line, + # except cachedb(just before iterator), and python (at the beginning, + # or, just before the iterator). + # module-config: "validator iterator" + - # File with trusted keys, kept uptodate using RFC5011 probes, ++ # File with trusted keys, kept up-to-date using RFC5011 probes, + # initial file like trust-anchor-file, then it stores metadata. + # Use several entries, one per domain name, to track multiple zones. + # + # If you want to perform DNSSEC validation, run unbound-anchor before + # you start Unbound (i.e. in the system boot scripts). + # And then enable the auto-trust-anchor-file config item. + # Please note usage of unbound-anchor root anchor is at your own risk + # and under the terms of our LICENSE (see that file in the source). + # auto-trust-anchor-file: "/var/unbound/root.key" + + # trust anchor signaling sends a RFC8145 key tag query after priming. + # trust-anchor-signaling: yes + + # Root key trust anchor sentinel (draft-ietf-dnsop-kskroll-sentinel) + # root-key-sentinel: yes + + # File with trusted keys for validation. Specify more than one file + # with several entries, one file per entry. + # Zone file format, with DS and DNSKEY entries. + # Note this gets out of date, use auto-trust-anchor-file please. + # trust-anchor-file: "" + + # Trusted key for validation. DS or DNSKEY. specify the RR on a + # single line, surrounded by "". TTL is ignored. class is IN default. + # Note this gets out of date, use auto-trust-anchor-file please. + # (These examples are from August 2007 and may not be valid anymore). + # trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ==" + # trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A" + + # File with trusted keys for validation. Specify more than one file + # with several entries, one file per entry. Like trust-anchor-file + # but has a different file format. Format is BIND-9 style format, + # the trusted-keys { name flag proto algo "key"; }; clauses are read. + # you need external update procedures to track changes in keys. + # trusted-keys-file: "" + + # Ignore chain of trust. Domain is treated as insecure. + # domain-insecure: "example.com" + + # Override the date for validation with a specific fixed date. + # Do not set this unless you are debugging signature inception + # and expiration. "" or "0" turns the feature off. -1 ignores date. + # val-override-date: "" + + # The time to live for bogus data, rrsets and messages. This avoids + # some of the revalidation, until the time interval expires. in secs. + # val-bogus-ttl: 60 + + # The signature inception and expiration dates are allowed to be off + # by 10% of the signature lifetime (expir-incep) from our local clock. + # This leeway is capped with a minimum and a maximum. In seconds. + # val-sig-skew-min: 3600 + # val-sig-skew-max: 86400 + + # The maximum number the validator should restart validation with + # another authority in case of failed validation. + # val-max-restart: 5 + + # Should additional section of secure message also be kept clean of - # unsecure data. Useful to shield the users of this validator from ++ # non-secure data. Useful to shield the users of this validator from + # potential bogus data in the additional section. All unsigned data + # in the additional section is removed from secure messages. + # val-clean-additional: yes + + # Turn permissive mode on to permit bogus messages. Thus, messages + # for which security checks failed will be returned to clients, + # instead of SERVFAIL. It still performs the security checks, which + # result in interesting log files and possibly the AD bit in + # replies if the message is found secure. The default is off. + # val-permissive-mode: no + + # Ignore the CD flag in incoming queries and refuse them bogus data. + # Enable it if the only clients of Unbound are legacy servers (w2008) + # that set CD but cannot validate themselves. + # ignore-cd-flag: no + + # Disable the DO flag in outgoing requests. It is helpful for upstream + # devices that cannot handle DNSSEC information. But do not enable it + # otherwise, because it would stop DNSSEC validation. + # disable-edns-do: no *** 14597 LINES SKIPPED *** From nobody Sat May 23 01:59:05 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gMlgZ1DGCz6f5JQ for ; Sat, 23 May 2026 01:59: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gMlgZ0JXkz3FYw for ; Sat, 23 May 2026 01:59:06 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779501546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kjkUUC+I4wxMsTa9UiNat8I2ME/uXoUDCCC1WxUFCSw=; b=TLZ1Hje8tCRkJeXnaj4z7vFpWNpRoH4RFnNvRR/kdphTRR3whlohNvh7s4ei0XgKJ2lNe/ 5ZIn6mG2MZwIP23ejZtwy1DGRa4Vj//SyDDAZT+l+/RYW0alSv6K2sC3YYqOYxQxqGWdn4 /nrPzCeDmzNgb9f4Eyl1Pj0/NXrhx5MwHL245QSDfApRA17Ea/965BPfp4PESSM9lGgFZR FGyaMOcOzfDHxbcijV1yRBQx2qcqU2Kg5aRi3v/y70JBviWmwza6hOWMjZ5kpVtfe0UZo3 z9yZ2juUEUtiUUAHsTEHA5YmapmHLv4w7UyV6OOSQOa7VomVPyctO6y2CZ6bDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779501546; a=rsa-sha256; cv=none; b=LTZk4KlBPHKd/gj95u0l4G5Fvtf8HqkpIIsELFPIQKps9Nh4cjjb2vw5q7764mkHdb1tG5 5ato0yl7hCO9tp1FDILhTML6o/7A/zs/Y52d063Hrm53gMxbhtXUuJew9Qr2sewTuj4j3I JB/VXo9cxcl7P/bFxxww7J7PE3J5aeaCXTA10ib69RPBoTCCOh/6rwbBETJEMxs4aTufht 1wUYBAFHkvd2NoR56vXT9r4v5sRpKaFJy5CVFo6Q286h9NtTP3SjhKdZ2ATdkuP6zuMNzN v7HQvrXGTnaRwNElHPgmKVYhbLjkkRDh/TTHBdeBVC7rclSr0VgidcKg6uEEIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779501546; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kjkUUC+I4wxMsTa9UiNat8I2ME/uXoUDCCC1WxUFCSw=; b=qiZFe/Lrri3e/Z0JF5BUQ41mvKNnOfI1SaCUhzCOJ6fLwBZp+n+WjHMxGHwQpHT5rChlOs JVSIh0eVlIzCKjKGNSzm6h8noabhacN1VOhSgYtcA8dUW9aaBOX9pkYp06ggSE4bBc3fF1 0/vrY28ZXQRPMs4O1QHNP0ONgECSCMd/Rsf3Qm3G7E9VkYbaycD4qvIZueqRzUcJizQvBr qW3X8cBshGkC5JWW/BbW83KxWZe1E7/2qsfKQTHRt1KkkIfeIa52TYnY9Uqzc9dKD+/B0o 16P6/8hPtQpeTnOooxW0RiRrBAcNwNArF4u5AopC+WQX3zYguOpv6CpyekOrgw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gMlgY6Vrhzn76 for ; Sat, 23 May 2026 01:59:05 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 424d7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 23 May 2026 01:59:05 +0000 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=B8rg?=rav Subject: git: 50caa0ea0c16 - main - unbound: Update to 1.25.1 List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 50caa0ea0c16499c40e785b5aa37053b180b2830 Auto-Submitted: auto-generated Date: Sat, 23 May 2026 01:59:05 +0000 Message-Id: <6a1109e9.424d7.3aeb96fb@gitrepo.freebsd.org> The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=50caa0ea0c16499c40e785b5aa37053b180b2830 commit 50caa0ea0c16499c40e785b5aa37053b180b2830 Merge: 5fa84c6ec176 22e58f330a15 Author: Dag-Erling Smørgrav AuthorDate: 2026-05-23 01:57:43 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2026-05-23 01:57:43 +0000 unbound: Update to 1.25.1 Release notes at https://nlnetlabs.nl/news/2026/May/20/unbound-1.25.1-released/ Merge commit '22e58f330a151944c24e010d23ec3881df6681b6' Security: CVE-2026-33278 Security: CVE-2026-42944 Security: CVE-2026-42959 Security: CVE-2026-32792 Security: CVE-2026-40622 Security: CVE-2026-41292 Security: CVE-2026-42534 Security: CVE-2026-42923 Security: CVE-2026-42960 Security: CVE-2026-44390 Security: CVE-2026-44608 MFC after: 1 week contrib/unbound/aclocal.m4 | 857 +++++++----- contrib/unbound/configure | 1929 +++++++++++++++++++--------- contrib/unbound/configure.ac | 5 +- contrib/unbound/dnscrypt/dnscrypt.c | 2 +- contrib/unbound/doc/Changelog | 30 + contrib/unbound/doc/README | 2 +- contrib/unbound/doc/example.conf | 2 +- contrib/unbound/doc/example.conf.in | 2 +- contrib/unbound/doc/libunbound.3 | 4 +- contrib/unbound/doc/libunbound.3.in | 4 +- contrib/unbound/doc/unbound-anchor.8 | 4 +- contrib/unbound/doc/unbound-anchor.8.in | 4 +- contrib/unbound/doc/unbound-checkconf.8 | 4 +- contrib/unbound/doc/unbound-checkconf.8.in | 4 +- contrib/unbound/doc/unbound-control.8 | 4 +- contrib/unbound/doc/unbound-control.8.in | 4 +- contrib/unbound/doc/unbound-host.1 | 4 +- contrib/unbound/doc/unbound-host.1.in | 4 +- contrib/unbound/doc/unbound.8 | 4 +- contrib/unbound/doc/unbound.8.in | 4 +- contrib/unbound/doc/unbound.conf.5 | 4 +- contrib/unbound/doc/unbound.conf.5.in | 4 +- contrib/unbound/install-sh | 178 ++- contrib/unbound/iterator/iter_scrub.c | 8 +- contrib/unbound/ltmain.sh | 1566 +++++++++++++--------- contrib/unbound/services/cache/dns.c | 8 +- contrib/unbound/services/cache/rrset.c | 10 + contrib/unbound/services/mesh.c | 14 +- contrib/unbound/services/mesh.h | 6 + contrib/unbound/services/rpz.c | 10 +- contrib/unbound/util/configparser.c | 896 ++++++------- contrib/unbound/util/configparser.h | 4 +- contrib/unbound/util/data/msgencode.c | 38 +- contrib/unbound/util/data/msgencode.h | 4 +- contrib/unbound/util/data/msgparse.c | 19 +- contrib/unbound/validator/val_neg.c | 28 +- contrib/unbound/validator/val_nsec3.c | 76 +- contrib/unbound/validator/val_nsec3.h | 6 + contrib/unbound/validator/val_utils.c | 4 +- lib/libunbound/config.h | 6 +- 40 files changed, 3619 insertions(+), 2147 deletions(-) diff --cc contrib/unbound/doc/example.conf index 8820e4ae6058,000000000000..82fd100dbbe9 mode 100644,000000..100644 --- a/contrib/unbound/doc/example.conf +++ b/contrib/unbound/doc/example.conf @@@ -1,1455 -1,0 +1,1455 @@@ +# +# Example configuration file. +# - # See unbound.conf(5) man page, version 1.25.0. ++# See unbound.conf(5) man page, version 1.25.1. +# +# this is a comment. + +# Use this anywhere in the file to include other text into this file. +#include: "otherfile.conf" + +# Use this anywhere in the file to include other text, that explicitly starts a +# clause, into this file. Text after this directive needs to start a clause. +#include-toplevel: "otherfile.conf" + +# The server clause sets the main parameters. +server: + # whitespace is not necessary, but looks cleaner. + + # verbosity number, 0 is least verbose. 1 is default. + # verbosity: 1 + + # print statistics to the log (for every thread) every N seconds. + # Set to "" or 0 to disable. Default is disabled. + # statistics-interval: 0 + + # enable shm for stats, default no. if you enable also enable + # statistics-interval, every time it also writes stats to the + # shared memory segment keyed with shm-key. + # shm-enable: no + + # shm for stats uses this key, and key+1 for the shared mem segment. + # shm-key: 11777 + + # enable cumulative statistics, without clearing them after printing. + # statistics-cumulative: no + + # enable extended statistics (query types, answer codes, status) + # printed from unbound-control. Default off, because of speed. + # extended-statistics: no + + # Inhibits selected extended statistics (qtype, qclass, qopcode, rcode, + # rpz-actions) from printing if their value is 0. + # Default on. + # statistics-inhibit-zero: yes + + # number of threads to create. 1 disables threading. + # num-threads: 1 + + # specify the interfaces to answer queries from by ip-address. + # The default is to listen to localhost (127.0.0.1 and ::1). + # specify 0.0.0.0 and ::0 to bind to all available interfaces. + # specify every interface[@port] on a new 'interface:' labelled line. + # The listen interfaces are not changed on reload, only on restart. + # interface: 192.0.2.153 + # interface: 192.0.2.154 + # interface: 192.0.2.154@5003 + # interface: 2001:db8::5 + # interface: eth0@5003 + + # enable this feature to copy the source address of queries to reply. + # Socket options are not supported on all platforms. experimental. + # interface-automatic: no + + # instead of the default port, open additional ports separated by + # spaces when interface-automatic is enabled, by listing them here. + # interface-automatic-ports: "" + + # port to answer queries from + # port: 53 + + # specify the interfaces to send outgoing queries to authoritative + # server from by ip-address. If none, the default (all) interface + # is used. Specify every interface on a 'outgoing-interface:' line. + # outgoing-interface: 192.0.2.153 + # outgoing-interface: 2001:db8::5 + # outgoing-interface: 2001:db8::6 + + # Specify a netblock to use remainder 64 bits as random bits for + # upstream queries. Uses freebind option (Linux). + # outgoing-interface: 2001:db8::/64 + # Also (Linux:) ip -6 addr add 2001:db8::/64 dev lo + # And: ip -6 route add local 2001:db8::/64 dev lo + # And set prefer-ip6: yes to use the ip6 randomness from a netblock. + # Set this to yes to prefer ipv6 upstream servers over ipv4. + # prefer-ip6: no + + # Prefer ipv4 upstream servers, even if ipv6 is available. + # prefer-ip4: no + + # number of ports to allocate per thread, determines the size of the + # port range that can be open simultaneously. About double the + # num-queries-per-thread, or, use as many as the OS will allow you. + # outgoing-range: 4096 + + # permit Unbound to use this port number or port range for + # making outgoing queries, using an outgoing interface. + # outgoing-port-permit: 32768 + + # deny Unbound the use this of port number or port range for + # making outgoing queries, using an outgoing interface. + # Use this to make sure Unbound does not grab a UDP port that some + # other server on this computer needs. The default is to avoid + # IANA-assigned port numbers. + # If multiple outgoing-port-permit and outgoing-port-avoid options + # are present, they are processed in order. + # outgoing-port-avoid: "3200-3208" + + # number of outgoing simultaneous tcp buffers to hold per thread. + # outgoing-num-tcp: 10 + + # number of incoming simultaneous tcp buffers to hold per thread. + # incoming-num-tcp: 10 + + # buffer size for UDP port 53 incoming (SO_RCVBUF socket option). + # 0 is system default. Use 4m to catch query spikes for busy servers. + # so-rcvbuf: 0 + + # buffer size for UDP port 53 outgoing (SO_SNDBUF socket option). + # 0 is system default. Set larger to handle spikes on very busy servers. + # so-sndbuf: 4m + + # use SO_REUSEPORT to distribute queries over threads. + # at extreme load it could be better to turn it off to distribute even. + # so-reuseport: yes + + # use IP_TRANSPARENT so the interface: addresses can be non-local + # and you can config non-existing IPs that are going to work later on + # (uses IP_BINDANY on FreeBSD). + # ip-transparent: no + + # use IP_FREEBIND so the interface: addresses can be non-local + # and you can bind to nonexisting IPs and interfaces that are down. + # Linux only. On Linux you also have ip-transparent that is similar. + # ip-freebind: no + + # the value of the Differentiated Services Codepoint (DSCP) + # in the differentiated services field (DS) of the outgoing + # IP packets + # ip-dscp: 0 + + # EDNS reassembly buffer to advertise to UDP peers (the actual buffer + # is set with msg-buffer-size). + # edns-buffer-size: 1232 + + # Maximum UDP response size (not applied to TCP response). + # Suggested values are 512 to 4096. Default is 1232. 65536 disables it. + # max-udp-size: 1232 + + # max memory to use for stream(tcp and tls) waiting result buffers. + # stream-wait-size: 4m + + # buffer size for handling DNS data. No messages larger than this + # size can be sent or received, by UDP or TCP. In bytes. + # msg-buffer-size: 65552 + + # the amount of memory to use for the message cache. + # plain value in bytes or you can append k, m or G. default is "4Mb". + # msg-cache-size: 4m + + # the number of slabs to use for the message cache. + # the number of slabs must be a power of 2. + # more slabs reduce lock contention, but fragment memory usage. + # msg-cache-slabs: 4 + + # the number of queries that a thread gets to service. + # num-queries-per-thread: 2048 + + # if very busy, 50% queries run to completion, 50% get timeout in msec + # jostle-timeout: 200 + + # msec to wait before close of port on timeout UDP. 0 disables. + # delay-close: 0 + + # perform connect for UDP sockets to mitigate ICMP side channel. + # udp-connect: yes + + # The number of retries, per upstream nameserver in a delegation, when + # a throwaway response (also timeouts) is received. + # outbound-msg-retry: 5 + + # Hard limit on the number of outgoing queries Unbound will make while + # resolving a name, making sure large NS sets do not loop. + # It resets on query restarts (e.g., CNAME) and referrals. + # max-sent-count: 32 + + # Hard limit on the number of times Unbound is allowed to restart a + # query upon encountering a CNAME record. + # max-query-restarts: 11 + + # Limit on number of NS records in NS RRset for incoming packets. + # iter-scrub-ns: 20 + + # Limit on number of CNAME, DNAME records for incoming packets. + # iter-scrub-cname: 11 + + # Limit on number of RRSIGs for an RRset for incoming packets. + # iter-scrub-rrsig: 8 + + # Limit on upstream queries for an incoming query and its recursion. + # max-global-quota: 200 + + # Should the scrubber remove promiscuous NS from positive answers, + # protects against poison attempts. + # iter-scrub-promiscuous: yes + + # msec for waiting for an unknown server to reply. Increase if you + # are behind a slow satellite link, to eg. 1128. + # unknown-server-time-limit: 376 + + # msec before recursion replies are dropped. The work item continues. + # discard-timeout: 1900 + + # Max number of replies waiting for recursion per IP address. + # wait-limit: 1000 + + # Max replies waiting for recursion for IP address with cookie. + # wait-limit-cookie: 10000 + + # Apart from the default, the wait limit can be set for a netblock. + # wait-limit-netblock: 192.0.2.0/24 50000 + + # Apart from the default, the wait limit with cookie can be adjusted. + # wait-limit-cookie-netblock: 192.0.2.0/24 50000 + + # Defaults for loopback, it has no wait limit. + # wait-limit-netblock: 127.0.0.0/8 -1 + # wait-limit-netblock: ::1/128 -1 + # wait-limit-cookie-netblock: 127.0.0.0/8 -1 + # wait-limit-cookie-netblock: ::1/128 -1 + + # the amount of memory to use for the RRset cache. + # plain value in bytes or you can append k, m or G. default is "4Mb". + # rrset-cache-size: 4m + + # the number of slabs to use for the RRset cache. + # the number of slabs must be a power of 2. + # more slabs reduce lock contention, but fragment memory usage. + # rrset-cache-slabs: 4 + + # the time to live (TTL) value lower bound, in seconds. Default 0. + # If more than an hour could easily give trouble due to stale data. + # cache-min-ttl: 0 + + # the time to live (TTL) value cap for RRsets and messages in the + # cache. Items are not cached for longer. In seconds. + # cache-max-ttl: 86400 + + # the time to live (TTL) value cap for negative responses in the cache + # cache-max-negative-ttl: 3600 + + # the time to live (TTL) value lower bound, in seconds. Default 0. + # For negative responses in the cache. If disabled, default, + # cache-min-ttl applies if configured. + # cache-min-negative-ttl: 0 + + # the time to live (TTL) value for cached roundtrip times, lameness and + # EDNS version information for hosts. In seconds. + # infra-host-ttl: 900 + + # minimum wait time for responses, increase if uplink is long. In msec. + # infra-cache-min-rtt: 50 + + # maximum wait time for responses. In msec. + # infra-cache-max-rtt: 120000 + + # enable to make server probe down hosts more frequently. + # infra-keep-probing: no + + # the number of slabs to use for the Infrastructure cache. + # the number of slabs must be a power of 2. + # more slabs reduce lock contention, but fragment memory usage. + # infra-cache-slabs: 4 + + # the maximum number of hosts that are cached (roundtrip, EDNS, lame). + # infra-cache-numhosts: 10000 + + # define a number of tags here, use with local-zone, access-control, + # interface-*. + # repeat the define-tag statement to add additional tags. + # define-tag: "tag1 tag2 tag3" + + # Enable IPv4, "yes" or "no". + # do-ip4: yes + + # Enable IPv6, "yes" or "no". + # do-ip6: yes + + # If running unbound on an IPv6-only host, domains that only have + # IPv4 servers would become unresolvable. If NAT64 is available in + # the network, unbound can use NAT64 to reach these servers with + # the following option. This is NOT needed for enabling DNS64 on a + # system that has IPv4 connectivity. + # Consider also enabling prefer-ip6 to prefer native IPv6 connections + # to nameservers. + # do-nat64: no + + # NAT64 prefix. Defaults to using dns64-prefix value. + # nat64-prefix: 64:ff9b::0/96 + + # Enable UDP, "yes" or "no". + # do-udp: yes + + # Enable TCP, "yes" or "no". + # do-tcp: yes + + # upstream connections use TCP only (and no UDP), "yes" or "no" + # useful for tunneling scenarios, default no. + # tcp-upstream: no + + # upstream connections also use UDP (even if do-udp is no). + # useful if if you want UDP upstream, but don't provide UDP downstream. + # udp-upstream-without-downstream: no + + # Maximum segment size (MSS) of TCP socket on which the server + # responds to queries. Default is 0, system default MSS. + # tcp-mss: 0 + + # Maximum segment size (MSS) of TCP socket for outgoing queries. + # Default is 0, system default MSS. + # outgoing-tcp-mss: 0 + + # Idle TCP timeout, connection closed in milliseconds + # tcp-idle-timeout: 30000 + + # Enable EDNS TCP keepalive option. + # edns-tcp-keepalive: no + + # Timeout for EDNS TCP keepalive, in msec. Overrides tcp-idle-timeout + # if edns-tcp-keepalive is set. + # edns-tcp-keepalive-timeout: 120000 + + # UDP queries that have waited in the socket buffer for a long time + # can be dropped. Default is 0, disabled. In seconds, such as 3. + # sock-queue-timeout: 0 + + # Use systemd socket activation for UDP, TCP, and control sockets. + # use-systemd: no + + # Detach from the terminal, run in background, "yes" or "no". + # Set the value to "no" when Unbound runs as systemd service. + # do-daemonize: yes + + # control which clients are allowed to make (recursive) queries + # to this server. Specify classless netblocks with /size and action. + # By default everything is refused, except for localhost. + # Choose deny (drop message), refuse (polite error reply), + # allow (recursive ok), allow_setrd (recursive ok, rd bit is forced on), + # allow_snoop (recursive and nonrecursive ok) + # allow_cookie (allow UDP with valid cookie or stateful transport) + # deny_non_local (drop queries unless can be answered from local-data) + # refuse_non_local (like deny_non_local but polite error reply). + # access-control: 127.0.0.0/8 allow + # access-control: ::1 allow + # access-control: ::ffff:127.0.0.1 allow + + # tag access-control with list of tags (in "" with spaces between) + # Clients using this access control element use localzones that + # are tagged with one of these tags. + # access-control-tag: 192.0.2.0/24 "tag2 tag3" + + # set action for particular tag for given access control element. + # if you have multiple tag values, the tag used to lookup the action + # is the first tag match between access-control-tag and local-zone-tag + # where "first" comes from the order of the define-tag values. + # access-control-tag-action: 192.0.2.0/24 tag3 refuse + + # set redirect data for particular tag for access control element + # access-control-tag-data: 192.0.2.0/24 tag2 "A 127.0.0.1" + + # Set view for access control element + # access-control-view: 192.0.2.0/24 viewname + + # Similar to 'access-control:' but for interfaces. + # Control which listening interfaces are allowed to accept (recursive) + # queries for this server. + # The specified interfaces should be the same as the ones specified in + # 'interface:' followed by the action. + # The actions are the same as 'access-control:' above. + # By default all the interfaces configured are refused. + # Note: any 'access-control*:' setting overrides all 'interface-*:' + # settings for targeted clients. + # interface-action: 192.0.2.153 allow + # interface-action: 192.0.2.154 allow + # interface-action: 192.0.2.154@5003 allow + # interface-action: 2001:db8::5 allow + # interface-action: eth0@5003 allow + + # Similar to 'access-control-tag:' but for interfaces. + # Tag interfaces with a list of tags (in "" with spaces between). + # Interfaces using these tags use localzones that are tagged with one + # of these tags. + # The specified interfaces should be the same as the ones specified in + # 'interface:' followed by the list of tags. + # Note: any 'access-control*:' setting overrides all 'interface-*:' + # settings for targeted clients. + # interface-tag: eth0@5003 "tag2 tag3" + + # Similar to 'access-control-tag-action:' but for interfaces. + # Set action for particular tag for a given interface element. + # If you have multiple tag values, the tag used to lookup the action + # is the first tag match between interface-tag and local-zone-tag + # where "first" comes from the order of the define-tag values. + # The specified interfaces should be the same as the ones specified in + # 'interface:' followed by the tag and action. + # Note: any 'access-control*:' setting overrides all 'interface-*:' + # settings for targeted clients. + # interface-tag-action: eth0@5003 tag3 refuse + + # Similar to 'access-control-tag-data:' but for interfaces. + # Set redirect data for a particular tag for an interface element. + # The specified interfaces should be the same as the ones specified in + # 'interface:' followed by the tag and the redirect data. + # Note: any 'access-control*:' setting overrides all 'interface-*:' + # settings for targeted clients. + # interface-tag-data: eth0@5003 tag2 "A 127.0.0.1" + + # Similar to 'access-control-view:' but for interfaces. + # Set view for an interface element. + # The specified interfaces should be the same as the ones specified in + # 'interface:' followed by the view name. + # Note: any 'access-control*:' setting overrides all 'interface-*:' + # settings for targeted clients. + # interface-view: eth0@5003 viewname + + # if given, a chroot(2) is done to the given directory. + # i.e. you can chroot to the working directory, for example, + # for extra security, but make sure all files are in that directory. + # + # If chroot is enabled, you should pass the configfile (from the + # commandline) as a full path from the original root. After the + # chroot has been performed the now defunct portion of the config + # file path is removed to be able to reread the config after a reload. + # + # All other file paths (working dir, logfile, roothints, and + # key files) can be specified in several ways: + # o as an absolute path relative to the new root. + # o as a relative path to the working directory. + # o as an absolute path relative to the original root. + # In the last case the path is adjusted to remove the unused portion. + # + # The pid file can be absolute and outside of the chroot, it is + # written just prior to performing the chroot and dropping permissions. + # + # Additionally, Unbound may need to access /dev/urandom (for entropy). + # How to do this is specific to your OS. + # + # If you give "" no chroot is performed. The path must not end in a /. + # chroot: "/var/unbound" + + # if given, user privileges are dropped (after binding port), + # and the given username is assumed. Default is user "unbound". + # If you give "" no privileges are dropped. + # username: "unbound" + + # the working directory. The relative files in this config are + # relative to this directory. If you give "" the working directory + # is not changed. + # If you give a server: directory: dir before include: file statements + # then those includes can be relative to the working directory. + # directory: "/var/unbound" + + # the log file, "" means log to stderr. + # Use of this option sets use-syslog to "no". + # logfile: "" + + # Log to syslog(3) if yes. The log facility LOG_DAEMON is used to + # log to. If yes, it overrides the logfile. + # use-syslog: yes + + # Log identity to report. if empty, defaults to the name of argv[0] + # (usually "unbound"). + # log-identity: "" + + # print UTC timestamp in ascii to logfile, default is epoch in seconds. + # log-time-ascii: no + + # log timestamp in ISO8601 format if also log-time-ascii is enabled. + # (y-m-dTh:m:s.msec[+-]tzhours:tzminutes) + # log-time-iso: no + + # print one line with time, IP, name, type, class for every query. + # log-queries: no + + # print one line per reply, with time, IP, name, type, class, rcode, + # timetoresolve, fromcache and responsesize. + # log-replies: no + + # log with tag 'query' and 'reply' instead of 'info' for + # filtering log-queries and log-replies from the log. + # log-tag-queryreply: no + + # log with destination address, port and type for log-replies. + # log-destaddr: no + + # log the local-zone actions, like local-zone type inform is enabled + # also for the other local zone types. + # log-local-actions: no + + # print log lines that say why queries return SERVFAIL to clients. + # log-servfail: no + + # log system-wide Linux thread ID, insted of Unbound's internal thread + # counter. Only on Linux and only when threads are available. + # log-thread-id: no + + # the pid file. Can be an absolute path outside of chroot/work dir. + # pidfile: "/var/unbound/unbound.pid" + + # file to read root hints from. + # get one from https://www.internic.net/domain/named.cache + # root-hints: "" + + # enable to not answer id.server and hostname.bind queries. + # hide-identity: no + + # enable to not answer version.server and version.bind queries. + # hide-version: no + + # enable to not answer trustanchor.unbound queries. + # hide-trustanchor: no + + # enable to not set the User-Agent HTTP header. + # hide-http-user-agent: no + + # the identity to report. Leave "" or default to return hostname. + # identity: "" + + # the version to report. Leave "" or default to return package version. + # version: "" + + # NSID identity (hex string, or "ascii_somestring"). default disabled. + # nsid: "aabbccdd" + + # User-Agent HTTP header to use. Leave "" or default to use package name + # and version. + # http-user-agent: "" + + # the target fetch policy. + # series of integers describing the policy per dependency depth. + # The number of values in the list determines the maximum dependency + # depth the recursor will pursue before giving up. Each integer means: + # -1 : fetch all targets opportunistically, + # 0: fetch on demand, + # positive value: fetch that many targets opportunistically. + # Enclose the list of numbers between quotes (""). + # target-fetch-policy: "3 2 1 0 0" + + # Harden against very small EDNS buffer sizes. + # harden-short-bufsize: yes + + # Harden against unseemly large queries. + # harden-large-queries: no + + # Harden against out of zone rrsets, to avoid spoofing attempts. + # harden-glue: yes + + # Harden against unverified (outside-zone, including sibling zone) glue rrsets + # harden-unverified-glue: no + + # Harden against receiving dnssec-stripped data. If you turn it + # off, failing to validate dnskey data for a trustanchor will + # trigger insecure mode for that zone (like without a trustanchor). + # Default on, which insists on dnssec data for trust-anchored zones. + # harden-dnssec-stripped: yes + + # Harden against queries that fall under dnssec-signed nxdomain names. + # harden-below-nxdomain: yes + + # Harden the referral path by performing additional queries for + # infrastructure data. Validates the replies (if possible). + # Default off, because the lookups burden the server. Experimental + # implementation of draft-wijngaards-dnsext-resolver-side-mitigation. + # harden-referral-path: no + + # Harden against algorithm downgrade when multiple algorithms are + # advertised in the DS record. If no, allows any algorithm + # to validate the zone which is the standard behavior for validators. + # Check the manpage for detailed information. + # harden-algo-downgrade: no + + # Harden against unknown records in the authority section and the + # additional section. + # harden-unknown-additional: no + + # Sent minimum amount of information to upstream servers to enhance + # privacy. Only sent minimum required labels of the QNAME and set QTYPE + # to A when possible. + # qname-minimisation: yes + + # QNAME minimisation in strict mode. Do not fall-back to sending full + # QNAME to potentially broken nameservers. A lot of domains will not be + # resolvable when this option in enabled. + # This option only has effect when qname-minimisation is enabled. + # qname-minimisation-strict: no + + # Aggressive NSEC uses the DNSSEC NSEC chain to synthesize NXDOMAIN + # and other denials, using information from previous NXDOMAINs answers. + # aggressive-nsec: yes + + # Use 0x20-encoded random bits in the query to foil spoof attempts. + # This feature is an experimental implementation of draft dns-0x20. + # use-caps-for-id: no + + # Domains (and domains in them) without support for dns-0x20 and + # the fallback fails because they keep sending different answers. + # caps-exempt: "licdn.com" + # caps-exempt: "senderbase.org" + + # Enforce privacy of these addresses. Strips them away from answers. + # It may cause DNSSEC validation to additionally mark it as bogus. + # Protects against 'DNS Rebinding' (uses browser as network proxy). + # Only 'private-domain' and 'local-data' names are allowed to have + # these private addresses. No default. + # private-address: 10.0.0.0/8 + # private-address: 172.16.0.0/12 + # private-address: 192.168.0.0/16 + # private-address: 169.254.0.0/16 + # private-address: fd00::/8 + # private-address: fe80::/10 + # private-address: ::ffff:0:0/96 + + # Allow the domain (and its subdomains) to contain private addresses. + # local-data statements are allowed to contain private addresses too. + # private-domain: "example.com" + + # If nonzero, unwanted replies are not only reported in statistics, + # but also a running total is kept per thread. If it reaches the + # threshold, a warning is printed and a defensive action is taken, + # the cache is cleared to flush potential poison out of it. + # A suggested value is 10000000, the default is 0 (turned off). + # unwanted-reply-threshold: 0 + + # Do not query the following addresses. No DNS queries are sent there. + # List one address per entry. List classless netblocks with /size, + # do-not-query-address: 127.0.0.1/8 + # do-not-query-address: ::1 + + # if yes, the above default do-not-query-address entries are present. + # if no, localhost can be queried (for testing and debugging). + # do-not-query-localhost: yes + + # if yes, perform prefetching of almost expired message cache entries. + # prefetch: no + + # if yes, perform key lookups adjacent to normal lookups. + # prefetch-key: no + + # deny queries of type ANY with an empty response. + # deny-any: no + + # if yes, Unbound rotates RRSet order in response. + # rrset-roundrobin: yes + + # if yes, Unbound doesn't insert authority/additional sections + # into response messages when those sections are not required. + # minimal-responses: yes + + # true to disable DNSSEC lameness check in iterator. + # disable-dnssec-lame-check: no + + # module configuration of the server. A string with identifiers + # separated by spaces. Syntax: "[dns64] [validator] iterator" + # most modules have to be listed at the beginning of the line, + # except cachedb(just before iterator), and python (at the beginning, + # or, just before the iterator). + # module-config: "validator iterator" + + # File with trusted keys, kept up-to-date using RFC5011 probes, + # initial file like trust-anchor-file, then it stores metadata. + # Use several entries, one per domain name, to track multiple zones. + # + # If you want to perform DNSSEC validation, run unbound-anchor before + # you start Unbound (i.e. in the system boot scripts). + # And then enable the auto-trust-anchor-file config item. + # Please note usage of unbound-anchor root anchor is at your own risk + # and under the terms of our LICENSE (see that file in the source). + # auto-trust-anchor-file: "/var/unbound/root.key" + + # trust anchor signaling sends a RFC8145 key tag query after priming. + # trust-anchor-signaling: yes + + # Root key trust anchor sentinel (draft-ietf-dnsop-kskroll-sentinel) + # root-key-sentinel: yes + + # File with trusted keys for validation. Specify more than one file + # with several entries, one file per entry. + # Zone file format, with DS and DNSKEY entries. + # Note this gets out of date, use auto-trust-anchor-file please. + # trust-anchor-file: "" + + # Trusted key for validation. DS or DNSKEY. specify the RR on a + # single line, surrounded by "". TTL is ignored. class is IN default. + # Note this gets out of date, use auto-trust-anchor-file please. + # (These examples are from August 2007 and may not be valid anymore). + # trust-anchor: "nlnetlabs.nl. DNSKEY 257 3 5 AQPzzTWMz8qSWIQlfRnPckx2BiVmkVN6LPupO3mbz7FhLSnm26n6iG9N Lby97Ji453aWZY3M5/xJBSOS2vWtco2t8C0+xeO1bc/d6ZTy32DHchpW 6rDH1vp86Ll+ha0tmwyy9QP7y2bVw5zSbFCrefk8qCUBgfHm9bHzMG1U BYtEIQ==" + # trust-anchor: "jelte.nlnetlabs.nl. DS 42860 5 1 14D739EB566D2B1A5E216A0BA4D17FA9B038BE4A" + + # File with trusted keys for validation. Specify more than one file + # with several entries, one file per entry. Like trust-anchor-file + # but has a different file format. Format is BIND-9 style format, + # the trusted-keys { name flag proto algo "key"; }; clauses are read. + # you need external update procedures to track changes in keys. + # trusted-keys-file: "" + + # Ignore chain of trust. Domain is treated as insecure. + # domain-insecure: "example.com" + + # Override the date for validation with a specific fixed date. + # Do not set this unless you are debugging signature inception + # and expiration. "" or "0" turns the feature off. -1 ignores date. + # val-override-date: "" + + # The time to live for bogus data, rrsets and messages. This avoids + # some of the revalidation, until the time interval expires. in secs. + # val-bogus-ttl: 60 + + # The signature inception and expiration dates are allowed to be off + # by 10% of the signature lifetime (expir-incep) from our local clock. + # This leeway is capped with a minimum and a maximum. In seconds. + # val-sig-skew-min: 3600 + # val-sig-skew-max: 86400 + + # The maximum number the validator should restart validation with + # another authority in case of failed validation. + # val-max-restart: 5 + + # Should additional section of secure message also be kept clean of + # non-secure data. Useful to shield the users of this validator from + # potential bogus data in the additional section. All unsigned data + # in the additional section is removed from secure messages. + # val-clean-additional: yes + + # Turn permissive mode on to permit bogus messages. Thus, messages + # for which security checks failed will be returned to clients, + # instead of SERVFAIL. It still performs the security checks, which + # result in interesting log files and possibly the AD bit in + # replies if the message is found secure. The default is off. + # val-permissive-mode: no + + # Ignore the CD flag in incoming queries and refuse them bogus data. + # Enable it if the only clients of Unbound are legacy servers (w2008) + # that set CD but cannot validate themselves. + # ignore-cd-flag: no + + # Disable the DO flag in outgoing requests. It is helpful for upstream + # devices that cannot handle DNSSEC information. But do not enable it + # otherwise, because it would stop DNSSEC validation. + # disable-edns-do: no + + # Serve expired responses from cache, with serve-expired-reply-ttl in + # the response. By default it first tries to refresh an expired answer. + # Can be configured with serve-expired-client-timeout. + # serve-expired: no + # + # Limit serving of expired responses to configured seconds after + # expiration. 0 disables the limit. + # serve-expired-ttl: 86400 + # + # Set the TTL of expired records to the serve-expired-ttl value after a + # failed attempt to retrieve the record from upstream. This makes sure + # that the expired records will be served as long as there are queries + # for it. + # serve-expired-ttl-reset: no + # + # TTL value to use when replying with expired data. + # Capped by the original TTL of the record. + # serve-expired-reply-ttl: 30 + # + # Time in milliseconds before replying to the client with expired data. + # This essentially enables the serve-stale behavior as specified in + # RFC 8767 that first tries to resolve before immediately responding + # with expired data. 0 disables this behavior. + # serve-expired-client-timeout: 1800 + + # Return the original TTL as received from the upstream name server rather + # than the decrementing TTL as stored in the cache. Enabling this feature + # does not impact cache expiry, it only changes the TTL Unbound embeds in + # responses to queries. Note that enabling this feature implicitly disables + # enforcement of the configured minimum and maximum TTL. + # serve-original-ttl: no + + # Have the validator log failed validations for your diagnosis. + # 0: off. 1: A line per failed user query. 2: With reason and bad IP. + # val-log-level: 0 + + # It is possible to configure NSEC3 maximum iteration counts per + # keysize. Keep this table very short, as linear search is done. + # A message with an NSEC3 with larger count is marked insecure. + # List in ascending order the keysize and count values. + # val-nsec3-keysize-iterations: "1024 150 2048 150 4096 150" + + # if enabled, ZONEMD verification failures do not block the zone. + # zonemd-permissive-mode: no + + # instruct the auto-trust-anchor-file probing to add anchors after ttl. + # add-holddown: 2592000 # 30 days + + # instruct the auto-trust-anchor-file probing to del anchors after ttl. + # del-holddown: 2592000 # 30 days + + # auto-trust-anchor-file probing removes missing anchors after ttl. + # If the value 0 is given, missing anchors are not removed. + # keep-missing: 31622400 # 366 days + + # debug option that allows very small holddown times for key rollover, + # otherwise the RFC mandates probe intervals must be at least 1 hour. + # permit-small-holddown: no + + # the amount of memory to use for the key cache. + # plain value in bytes or you can append k, m or G. default is "4Mb". + # key-cache-size: 4m + + # the number of slabs to use for the key cache. + # the number of slabs must be a power of 2. + # more slabs reduce lock contention, but fragment memory usage. + # key-cache-slabs: 4 + + # the amount of memory to use for the negative cache. + # plain value in bytes or you can append k, m or G. default is "1Mb". + # neg-cache-size: 1m + + # By default, for a number of zones a small default 'nothing here' + # reply is built-in. Query traffic is thus blocked. If you + # wish to serve such zone you can unblock them by uncommenting one + # of the nodefault statements below. + # You may also have to use domain-insecure: zone to make DNSSEC work, + # unless you have your own trust anchors for this zone. + # local-zone: "localhost." nodefault + # local-zone: "127.in-addr.arpa." nodefault + # local-zone: "1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." nodefault + # local-zone: "home.arpa." nodefault + # local-zone: "resolver.arpa." nodefault + # local-zone: "service.arpa." nodefault + # local-zone: "onion." nodefault + # local-zone: "test." nodefault + # local-zone: "invalid." nodefault + # local-zone: "10.in-addr.arpa." nodefault + # local-zone: "16.172.in-addr.arpa." nodefault + # local-zone: "17.172.in-addr.arpa." nodefault + # local-zone: "18.172.in-addr.arpa." nodefault + # local-zone: "19.172.in-addr.arpa." nodefault + # local-zone: "20.172.in-addr.arpa." nodefault + # local-zone: "21.172.in-addr.arpa." nodefault + # local-zone: "22.172.in-addr.arpa." nodefault + # local-zone: "23.172.in-addr.arpa." nodefault + # local-zone: "24.172.in-addr.arpa." nodefault + # local-zone: "25.172.in-addr.arpa." nodefault + # local-zone: "26.172.in-addr.arpa." nodefault + # local-zone: "27.172.in-addr.arpa." nodefault + # local-zone: "28.172.in-addr.arpa." nodefault + # local-zone: "29.172.in-addr.arpa." nodefault + # local-zone: "30.172.in-addr.arpa." nodefault + # local-zone: "31.172.in-addr.arpa." nodefault + # local-zone: "168.192.in-addr.arpa." nodefault + # local-zone: "0.in-addr.arpa." nodefault + # local-zone: "254.169.in-addr.arpa." nodefault + # local-zone: "2.0.192.in-addr.arpa." nodefault + # local-zone: "100.51.198.in-addr.arpa." nodefault + # local-zone: "113.0.203.in-addr.arpa." nodefault + # local-zone: "255.255.255.255.in-addr.arpa." nodefault + # local-zone: "0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.ip6.arpa." nodefault + # local-zone: "d.f.ip6.arpa." nodefault + # local-zone: "8.e.f.ip6.arpa." nodefault + # local-zone: "9.e.f.ip6.arpa." nodefault + # local-zone: "a.e.f.ip6.arpa." nodefault + # local-zone: "b.e.f.ip6.arpa." nodefault + # local-zone: "8.b.d.0.1.0.0.2.ip6.arpa." nodefault + # And for 64.100.in-addr.arpa. to 127.100.in-addr.arpa. + + # Add example.com into ipset + # local-zone: "example.com" ipset + + # If Unbound is running service for the local host then it is useful + # to perform lan-wide lookups to the upstream, and unblock the + # long list of local-zones above. If this Unbound is a dns server + # for a network of computers, disabled is better and stops information + # leakage of local lan information. + # unblock-lan-zones: no + + # The insecure-lan-zones option disables validation for + # these zones, as if they were all listed as domain-insecure. + # insecure-lan-zones: no + + # a number of locally served zones can be configured. + # local-zone: + # local-data: "" + # o deny serves local data (if any), else, drops queries. + # o refuse serves local data (if any), else, replies with error. + # o static serves local data, else, nxdomain or nodata answer. + # o transparent gives local data, but resolves normally for other names + # o redirect serves the zone data for any subdomain in the zone. + # o nodefault can be used to normally resolve AS112 zones. + # o typetransparent resolves normally for other types and other names + # o inform acts like transparent, but logs client IP address + # o inform_deny drops queries and logs client IP address + # o inform_redirect redirects queries and logs client IP address + # o always_transparent, always_refuse, always_nxdomain, always_nodata, + # always_deny resolve in that way but ignore local data for + # that name + # o block_a resolves all records normally but returns + # NODATA for A queries and ignores local data for that name + # o always_null returns 0.0.0.0 or ::0 for any name in the zone. + # o noview breaks out of that view towards global local-zones. + # + # defaults are localhost address, reverse for 127.0.0.1 and ::1 + # and nxdomain for AS112 zones. If you configure one of these zones + # the default content is omitted, or you can omit it with 'nodefault'. *** 11011 LINES SKIPPED *** From nobody Sat May 23 16:23:18 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gN6rk3JP3z6fpdr for ; Sat, 23 May 2026 16:23: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gN6rk2c25z437Q for ; Sat, 23 May 2026 16:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779553398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4KarMJoTgDKKEI/hNCY2QvEbq/iM4q4dIVqTdahAzLs=; b=Q5fn1YOxhdqPC5HDCTbot/PpbNDJFl1vz1mNeAJLT+JZ1Vez3eFGYqqV2OQ8jlZSEGJndP ZN6ZSJDX7/U4rCNc+hyxKrSq8uKUp8axSwOIqka/uanAthSkFaQ8QIWWglGR9wmsOSNRU/ kJ+VDItgFs940CypF6zZlnfBiMl3Fr7HA7wVM19dSGW0aOD0rYn6b46D3xQ9iY9yQ+dYZP 3WbtSc+xsV0+BT5343fkfxAjtqQ/xSmPJCz3vbsdt2YyqOOQ8g5yTMUfOMwAoaWx4QT88U POH8V61lm+MKzygnHz2096/8J9VZ/WjWNmFeAd0pbmq+/H5j/fh43msOWUmyNA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779553398; a=rsa-sha256; cv=none; b=xIIufbV2AmEXdtGEU/H1d2aLqcRN3acMgcC3N69ZOnVqvtiB/Pzq0/Jjb9rqjK3dWEUp9S 4nrrf6kUzLX7zVBROmRNmu0BhNGg+Z8I8YuKIR1+R8r972uzTYF1Qp6kR3XQKnKfMiLOef ogBBcQP1Pad6hNti3YMC0cLvmA85CEMiTrRkwyI7u5Fvdb7IPa4wmeedIg0sMERf0h6STO XgUI4qKCxWWP6pqF+sC0XaokV8JqUS5GN1WKtjF4r2Mxt6A00kAesy89+Pd1LjQPDvAcG9 QCLzK9O3/+wQbef5HecqOKWFJSO9eJ0JMcLrDGOso5I1ng69JVD3rW9ljnDDzA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779553398; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=4KarMJoTgDKKEI/hNCY2QvEbq/iM4q4dIVqTdahAzLs=; b=acH3xEB/vDg7kVKs9qqE0VY+6tXW2iU3q6KLX6seci5gRgCtWXbNTkDgbGxPX7CmZLpwRt /c0RlfSA/WMBqly6GdFzRcxHeQKqTlJMY9O6/WVXVTL3xaxcUhnSwLlcDlfDhwvZD8mWGu XqzN+srEhrBsvnVNWK8WojffhErRcJR8wzAJ5Lnop0XDMRg51bDfY9EgUa3ebrUScRy3DV E1WpRPPMHd2TLlvpBEb7KGGUoexwf+Uhycg+rh4qYer6+RubRn5hAG00GgE9AFDGzU3PxE +RC5rK6JII416fkh+vIDBWAsaleUNvcv9tUHiB6uQIq6aDPGg1GVqVwhXYqvhg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gN6rk1ZKHzkl for ; Sat, 23 May 2026 16:23:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 31313 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 23 May 2026 16:23:18 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 1dbc10414884 - main - netlink: Check for NULL return from npt_alloc() List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 1dbc104148845434575d1931d47876ae0ca1542f Auto-Submitted: auto-generated Date: Sat, 23 May 2026 16:23:18 +0000 Message-Id: <6a11d476.31313.25b20a45@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=1dbc104148845434575d1931d47876ae0ca1542f commit 1dbc104148845434575d1931d47876ae0ca1542f Author: Ed Maste AuthorDate: 2026-05-22 14:41:16 +0000 Commit: Ed Maste CommitDate: 2026-05-23 16:22:36 +0000 netlink: Check for NULL return from npt_alloc() Reviewed by: glebius, pouria Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57171 --- sys/netlink/netlink_message_parser.c | 2 ++ sys/netlink/route/iface_drivers.c | 3 +++ sys/netlink/route/rt.c | 4 ++++ 3 files changed, 9 insertions(+) diff --git a/sys/netlink/netlink_message_parser.c b/sys/netlink/netlink_message_parser.c index 54aceb660a98..65de7cc645a0 100644 --- a/sys/netlink/netlink_message_parser.c +++ b/sys/netlink/netlink_message_parser.c @@ -122,6 +122,8 @@ nlmsg_report_cookie_u32(struct nl_pstate *npt, uint32_t val) { struct nlattr *nla = npt_alloc(npt, sizeof(*nla) + sizeof(uint32_t)); + if (nla == NULL) + return; nla->nla_type = NLMSGERR_ATTR_COOKIE; nla->nla_len = sizeof(*nla) + sizeof(uint32_t); memcpy(nla + 1, &val, sizeof(uint32_t)); diff --git a/sys/netlink/route/iface_drivers.c b/sys/netlink/route/iface_drivers.c index 4f1540740ead..31d2523a479b 100644 --- a/sys/netlink/route/iface_drivers.c +++ b/sys/netlink/route/iface_drivers.c @@ -155,6 +155,9 @@ _nl_store_ifp_cookie(struct nl_pstate *npt, struct ifnet *ifp) sizeof(ifindex) + NL_ITEM_ALIGN(ifname_len + 1); struct nlattr *nla_cookie = npt_alloc(npt, nla_len); + if (nla_cookie == NULL) + return; + /* Nested TLV */ nla_cookie->nla_len = nla_len; nla_cookie->nla_type = NLMSGERR_ATTR_COOKIE; diff --git a/sys/netlink/route/rt.c b/sys/netlink/route/rt.c index 09717c976021..8159409c9f67 100644 --- a/sys/netlink/route/rt.c +++ b/sys/netlink/route/rt.c @@ -896,6 +896,10 @@ create_nexthop_from_attrs(struct nl_parsed_route *attrs, int num_nhops = attrs->rta_multipath->num_nhops; struct weightened_nhop *wn = npt_alloc(npt, sizeof(*wn) * num_nhops); + if (wn == NULL) { + *perror = ENOMEM; + return (NULL); + } for (int i = 0; i < num_nhops; i++) { struct rta_mpath_nh *mpnh = &attrs->rta_multipath->nhops[i]; From nobody Sat May 23 19:55:17 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gNCYL0glvz6dhrv for ; Sat, 23 May 2026 19:55: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gNCYK6hxdz3R1F for ; Sat, 23 May 2026 19:55:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779566118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1HGOhtqmXALuPduMEAz9ELFnmtsbR5Ligma4TPBJBVY=; b=mJWMeCGhemrfXbSIBuTobBQL3ERJxDBHnMQIFLQCqNvC4tT0M526Gqf2upeF9A67Vmnl4N aynTpm6ahqfPY87TGN5MiOI2xMlodId0Lw9JpgnWdsr4vfT9eL3Ea3PCSkm0dKVtu1TaQj /+EW0Io1r1z3aMgAnMBYtE9EoMjEQi6jYsr60zyXy/mK06SIYl7Tg6N4yGWyTiVr77cOGX Ahzhf0OOGZtujxLfTfj4GTtAYVzVys7m/4/gJ2hZj6ZKSK8NmnD8lKX32Yc4b00uaTagiw GxcFeaQ0ZL5EDpHvd9yZNbX03UvZgb8ErlSxxQnGZ8X3viiVvWQCYmbRqh6Lmw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779566118; a=rsa-sha256; cv=none; b=tIVCpueAVlDFQ9aITd52jy+cWzEFp0Ph6Khckef3aMVj/5YWgSWdonhvUa44ag9pDYBhdJ fPezaaL62t6z1bOh+lOlFtJiLbDcoLa5aJjUDb7pnvhwzdyu7+o5+9cy8BWBoMKSRSUfmT nG4Hb3BEIL5f8QkmmMM5EqpqS6ewYNVJfnuujPwAtq0ldH13j+pFOML+7eyCm6QiaK+Hkn 3lf2kmUHAIMrj6RxakQM9o6NNARDHV+f+RsTlXZq4aqv+WYNxJsAXqS5NXvPFIfGND6btm HFW5Ihvkys/u/xz5eIFsEf3L7y/GTbGnr2v4Yb69xKMPHMqHGDg/oXr96YLkvg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779566118; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=1HGOhtqmXALuPduMEAz9ELFnmtsbR5Ligma4TPBJBVY=; b=p+12Zrfu5zZNcdD1zb8VTWre5cuURgZA5jIx1tsHLmF3xbO0dBd+/eTCxmOsVEqKmEeh7D 0dgHKUlbupQRfYQqSDHesTHpaX3Y70W8XuTl9rhGJElEqzfcJv9B+HoKkTXITFYdJ2lRci hI09KyBo8A/vAqoZy4JgVtvWml6KLslzd0uGuQjvJQtfy/Bta1bbVDqxhcV57KWcVUjBlV 2dYEsagtP8XCZNWB6P+zhlxf7HVlar4Anbjapfm3BHwBDTGcJM8Hshddbne7a7eGrU5GXG WmotooVTGW71tzwiHQP+n2M9b7LXg9af3Cb87SqC8kKeQ/N7atHdRkHCRk0fHg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gNCYK5tqsz6b4 for ; Sat, 23 May 2026 19:55:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 45836 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 23 May 2026 19:55:17 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jilles Tjoelker Subject: git: 1df431576f99 - main - sh/tests: Cut down builtins/read12.0 by 2 seconds List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jilles X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1df431576f99c3cc26dd4ceb1a6eda864cc9f196 Auto-Submitted: auto-generated Date: Sat, 23 May 2026 19:55:17 +0000 Message-Id: <6a120625.45836.5e8588e2@gitrepo.freebsd.org> The branch main has been updated by jilles: URL: https://cgit.FreeBSD.org/src/commit/?id=1df431576f99c3cc26dd4ceb1a6eda864cc9f196 commit 1df431576f99c3cc26dd4ceb1a6eda864cc9f196 Author: Jilles Tjoelker AuthorDate: 2026-05-23 19:47:15 +0000 Commit: Jilles Tjoelker CommitDate: 2026-05-23 19:47:15 +0000 sh/tests: Cut down builtins/read12.0 by 2 seconds Since the test assumes a 250 ms response time, there is no need to delay for 3 seconds. Instead, delay for the minimum possible 1 second. Also, fix some assertions in builtins/read11.0 and builtins/read12.0. If `set -e` is in effect, `foo` in `foo && bar` is considered tested and therefore a failure does not cause the shell to exit. Reviewed by: bdrewery Differential Revision: https://reviews.freebsd.org/D55191 --- bin/sh/tests/builtins/read11.0 | 3 ++- bin/sh/tests/builtins/read12.0 | 14 ++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/bin/sh/tests/builtins/read11.0 b/bin/sh/tests/builtins/read11.0 index 07bd3e70644c..e57dfdbc0ea4 100644 --- a/bin/sh/tests/builtins/read11.0 +++ b/bin/sh/tests/builtins/read11.0 @@ -27,6 +27,7 @@ ts=$(date +%s%3N) read -t 0 v <&3 || r=$? te=$(date +%s%3N) kill -TERM "$!" || : -[ "$r" -gt 128 ] && [ "$(kill -l "$r")" = ALRM ] +[ "$r" -gt 128 ] +[ "$(kill -l "$r")" = ALRM ] [ $((te-ts)) -lt 250 ] [ -z "$v" ] diff --git a/bin/sh/tests/builtins/read12.0 b/bin/sh/tests/builtins/read12.0 index 4551555adfed..3b501a56392b 100644 --- a/bin/sh/tests/builtins/read12.0 +++ b/bin/sh/tests/builtins/read12.0 @@ -1,5 +1,5 @@ -# Verify that `read -t 3 v` succeeds immediately if input is available -# and times out after 3 s if not +# Verify that `read -t 1 v` succeeds immediately if input is available +# and times out after 1 s if not set -e @@ -15,7 +15,7 @@ exec 3; Sat, 23 May 2026 20:11:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gNCvz5dDYz3Sk5 for ; Sat, 23 May 2026 20:11:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779567087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e3ztbZs/CFjxJoseNb1/4uFVW9YEKvT9wJPbPwbt+y0=; b=dCy6AgkJlkhV6c+LPmPkgBUqOoCA9GsD20it4T1DPfwIOTF/2o1O7ArLjmd9PqZUSSmqvd 8M5zjdiIujx9omwH3/8XRHo84V+xRUek7fT5CtJJA4DvppyLnetHIv7+vAtM2YQwBMsRn/ BWjL8FrIzxUGYVPTSxqQom1HuUL+fbJW+WJLd/pMbTjlyhj1Ghjs/CZgQb0Tsq8YGOiTdY ZkQI6neHPbnTWe2x0Glc8py2fIkqxCxNj+7guKXyGeqEiV5aGW3Z6lICFMSLi90wZ3iJKw B0BxVbr/jOxbsDMaUWUPBlS4YIPybCXctEyxKC97xzPg/33UdIkByHmqfXKJyQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779567087; a=rsa-sha256; cv=none; b=Y5dn8+wIsS8IK1QQuRbmqVae9x99Z6btQQeBxeQT+9NWId75qeReSGOTvws00vmMfOu87D bRmQUyjAaZR9QoUL7VSGEoZuz8DzwzKFUeuxxupfcdDAwHBmpu1AErTOA70b001p3yU8hM sJjSXniZ//w+2AUP9YCOIlKWjYmN0xfSv5qjeJsylD/BYIIEOw5vExhomzCIpI7oIRrAh1 YqwFerT4d08uNxZzXSmmx77EkTQvK8Nbx1MI+Oh6tXMgNu1YeF/wk2CZpPeejgGQd0f4/m VhNbFD02wWBAKMYl7JzAmNEVmq3ydoMBUGWnITj+xC6RzkFlMbjMKkzcpc54Fg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779567087; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=e3ztbZs/CFjxJoseNb1/4uFVW9YEKvT9wJPbPwbt+y0=; b=BHfWfxlQ2kennhwQwlSFP4QXbU+q5hPtcLKhTJW0z2JC9MXuH2wbcRMNb2yKZ7CrYcZe/n eoVK93PoddUrDnWvveggIMrN2893Phy6HZdVuiag81A8BI8oFAARJmWsBntiUJjm0StCCQ D0bR89O6PlDkCTUmfHOr3+dVjyG2r+gIeSgvSG5UdQDgu1gDcGLUqKaJBbxv8MrDoGJ6kw FmoxEcbzrfNMPqdx6JTIMT88ZOj/TAMe2QC8xcszRsnfF54cQec/KjnbzfU03VtqRUwghA 8iwK4fSQ+nVyickBN0yQrnLQb+KoZ7S+scD2lQYmMVcDMCmHQQR/X94sJAm9iA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gNCvz59tBz6bj for ; Sat, 23 May 2026 20:11:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 18dc4 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 23 May 2026 20:11:27 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Osipov Subject: git: f30b1df048f0 - main - mrsas.4: Use Broadcom/LSI consistently List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f30b1df048f00cd84f46b798c67234e7c3009962 Auto-Submitted: auto-generated Date: Sat, 23 May 2026 20:11:27 +0000 Message-Id: <6a1209ef.18dc4.66c79dc4@gitrepo.freebsd.org> The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=f30b1df048f00cd84f46b798c67234e7c3009962 commit f30b1df048f00cd84f46b798c67234e7c3009962 Author: Michael Osipov AuthorDate: 2026-05-23 19:02:51 +0000 Commit: Michael Osipov CommitDate: 2026-05-23 20:11:16 +0000 mrsas.4: Use Broadcom/LSI consistently Reviewed by: ziaee (via IRC) MFC after: immediately Differential Revision: https://reviews.freebsd.org/D57211 --- share/man/man4/mrsas.4 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/man/man4/mrsas.4 b/share/man/man4/mrsas.4 index 6645835d0bb2..1b72b446466c 100644 --- a/share/man/man4/mrsas.4 +++ b/share/man/man4/mrsas.4 @@ -35,7 +35,7 @@ .\" are those of the authors and should not be interpreted as representing .\" official policies, either expressed or implied, of the FreeBSD Project. .\" -.Dd January 6, 2026 +.Dd May 23, 2026 .Dt MRSAS 4 .Os .Sh NAME @@ -125,7 +125,7 @@ rather then JBOD virtual mode. .Sh HARDWARE The .Nm -driver supports the following LSI/Broadcom SATA/SAS RAID controllers: +driver supports the following Broadcom/LSI SATA/SAS RAID controllers: .Pp .Bl -column -compact "LSI MegaRAID SAS 9380" "Invader/Fury" "12Gb/s" .It Controller Ta Chip Ta Speed From nobody Sat May 23 20:12:51 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gNCxb4MBjz6dkv7 for ; Sat, 23 May 2026 20:12: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gNCxb2BbRz3TTY for ; Sat, 23 May 2026 20:12:51 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779567171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vjE7bCutbMav1MrzM0hrDKSwectwRfGh7kyGUZM5UV8=; b=YRv1oD3a18X9jEQu8vvlKfRWORuKTccdDZ8RUOV10hsDT/MqLH6ipUR5bJxelx/HMdiqk/ kWQtBmRR02U4dV59km+NYqe/L41XsSAGmPqV7XmmilMsYMWCNfJDGOkMdZXqil4tq03YQ2 c5ltGGbIAQM1/FrYvC0AsOOL0wHg6DCQ3DZ1FJ1UrbBx9zMGjS9JglNvRA8JoKbb2TADuV +AtRGSKfImBQ6hhNQwT+2I3fXTz2Xodxfo25NkbKjFf2xSbw0R03iaoUKgvMZ+sR2U/uHP /SMQI7A4OdgGLHkYlCwhGQHEn+hujL9pyamPL9kwP7dwwA0CiRiwenk0Rchh5Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779567171; a=rsa-sha256; cv=none; b=CtmKte0YGOK/6j88zSj4UvWVxmrc7sGGgo/DATRTqYvUkt+D8LSiC/DeT3G9vjHduMTCAo MwRTo1N/CurVOt0B5y6v60ukUwo45lVJjrR4rSyvGgiQD+y/iCKhIBeVdQbB25Od5Up6Z8 iUTymdX2RQj95zBmhJsWNBZtmmKPEvo2m5vnuYYEJ3vlS+RH+Vd/LiYnjbsDP2IUvlZUWP VL//3RyilTBsMBB9eQVWrMsFVLHLUnzDEP887wfBOVKwnzP3M6acZQRs1o0aEuEfEjPPDG hhzvLXv15999T47zrkdu7HF9RmDJTLnVKj95km6IQcnv8SILM6VSC/uZB1V+sw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779567171; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=vjE7bCutbMav1MrzM0hrDKSwectwRfGh7kyGUZM5UV8=; b=GjS5Zi3WaRbL5e6zmdKXj3mzYNhZ+sLCVUGVlc7VUeVMjvfBy9SXVWy6l4S+TqF/8uHlpk uMAS+TICdchpv2qEpCbjwmbTqtpir8zgjqW5sO4UtBFhmT+j1qK+Ia16Wv1B84ipedqQKq PyPkiCXh9TIjc6vzcvlDVLfu7HUhULj3uh2iHswjpBUV7NCR68dQl8Rgd49nGQXxb6MVhB 3eHLCs0OQYfelKUtndrbrvi+btq0KPJccomQXyYEQZsSVNe6HAAH533qYYJc8knGXsOEU4 WyANyWfAy1lS67S1UFTZqqmKf1rJRqjz8TfZw4Wc/q0+5CwaKpI/ESwwC3EhHw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gNCxb1mGWz77v for ; Sat, 23 May 2026 20:12:51 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 472d7 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 23 May 2026 20:12:51 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Michael Osipov Subject: git: c74645b0c8df - main - mfiutil.8/mrsasutil.8: Use Broadcom/LSI consistently List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: michaelo X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: c74645b0c8df1307cb6f13d835012f88883dff3a Auto-Submitted: auto-generated Date: Sat, 23 May 2026 20:12:51 +0000 Message-Id: <6a120a43.472d7.51be2018@gitrepo.freebsd.org> The branch main has been updated by michaelo: URL: https://cgit.FreeBSD.org/src/commit/?id=c74645b0c8df1307cb6f13d835012f88883dff3a commit c74645b0c8df1307cb6f13d835012f88883dff3a Author: Michael Osipov AuthorDate: 2026-05-23 19:08:09 +0000 Commit: Michael Osipov CommitDate: 2026-05-23 20:12:43 +0000 mfiutil.8/mrsasutil.8: Use Broadcom/LSI consistently Both tools support controllers from both companies, so document it. Reviewed by: ziaee (via IRC) MFC after: immediately Differential Revision: https://reviews.freebsd.org/D57212 --- usr.sbin/mfiutil/mfiutil.8 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/mfiutil/mfiutil.8 b/usr.sbin/mfiutil/mfiutil.8 index 5d0e425872be..25c2dfe4eb66 100644 --- a/usr.sbin/mfiutil/mfiutil.8 +++ b/usr.sbin/mfiutil/mfiutil.8 @@ -25,13 +25,13 @@ .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF .\" SUCH DAMAGE. .\" -.Dd September 2, 2011 +.Dd May 23, 2026 .Dt MFIUTIL 8 .Os .Sh NAME .Nm mfiutil , .Nm mrsasutil -.Nd Utility for managing LSI MegaRAID SAS controllers +.Nd manage Broadcom/LSI MegaRAID SAS controllers .Sh SYNOPSIS .Nm .Cm version @@ -258,7 +258,7 @@ .Sh DESCRIPTION The .Nm -utility can be used to display or modify various parameters on LSI +utility can be used to display or modify various parameters on Broadcom/LSI MegaRAID SAS RAID controllers. Each invocation of .Nm From nobody Sat May 23 23:10:38 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gNHtk2yQBz6f47c for ; Sat, 23 May 2026 23:10:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gNHtk16M7z3npJ for ; Sat, 23 May 2026 23:10:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779577838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BWsFrwSJ7FPHyNZO9x09iAFTaEdOBJy3F7aj0TJivv8=; b=ypNbSL8KMn4HMrCLq2GBzC3ue7Z/jAT2S4cc5s4jyFKsB6AUoDM89gV7Xn5qSwZoikcYGE EsjcqUPcqgXue4EMq1rpAnjnmCkFvsXQcFEFQEG8rYdIR+XyekrrsNP3qGJNeCVIlZa9g5 SigVSxbdUM+1Q1Sa2fnThWT6tWMAjtZPhLGscH5ZhOeULku4FfFPcBMqGUPNLWEVUsu0xJ UxF3QCsavjRZDjGaw2RfeEd0smzmI+LXrTy9ZoYxC2Z+J9TKVKk2ckrqnMK5zonmusKCRq 8GXBD1kPBd+Qvj6cl3gQ57oM7mJ0Mf+6HZXRi67pIloDIp2LSPJz2GLMp7gUDw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779577838; a=rsa-sha256; cv=none; b=psWTvggQvccLYs6rp0XZqEZLOREKPQWtOWozFTkWBJQDT/qAgBAwaK8UqTlA63KzC2lOOd 3hoJ125WK8i0XEEHf1BHfOfLJq//78fgGbbhoeQzN6rwQgz3XDg6Bc0eb/HWcmZaCmXbOd gUmD5cvtcQfbxUBpTn3rxSj3W5RQum7k9DSxbuuyBttv/7BB2EZhporLKQH3QSeat5BkKR 1EKFG3WcmpEOtIn8vppJjQYxhYCiHcu7u7rhZJCg72V4klrb0tR8U9+ZgIm0YI4AJwrj1z sjAwYEyDEvGbBPaVV8zS1e4WJQ2g5l2ZJx6zq/FAg6EB6UQKNwYZU6px6QN0xQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779577838; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=BWsFrwSJ7FPHyNZO9x09iAFTaEdOBJy3F7aj0TJivv8=; b=X+6ljZvxNgFME40DIkpEjTxWsVGqF+yDLnp3fatcrIbFdWp83nJSeU1IUH4/5E+CZ2tlE/ +qLZPy42IKkse94c+l8hSuxu9eBVaP6Bv8kJHuR1XwmyMADz9brOA7kuoUi9t6wZUQBLsR JiPzpuBRGQcxYvm6wq8RkwToWSKEcpkaNyY4++HD/xrQphZ1PgeIm2IzouY5XSBaAQ6X/I tqDRjlO7FXCPNGknu7grSw0yQOLx3XmqdFmGziKoTnN2qrVzbxmZklPkDTp4QSfTojR2nS wBQsZnUyUOQdZNRPsuYjdIW8zk5GRXCcciv0OWyreVDC50kz2Dfg3dGulsZDxQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gNHtk0gvXzCBQ for ; Sat, 23 May 2026 23:10:38 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34292 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 23 May 2026 23:10:38 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ed Maste Subject: git: 4d125ed6e7d4 - main - netlink: Avoid potential undefined behaviour List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: 4d125ed6e7d445d574c11dc35c40ec3013559806 Auto-Submitted: auto-generated Date: Sat, 23 May 2026 23:10:38 +0000 Message-Id: <6a1233ee.34292.4ff5cb12@gitrepo.freebsd.org> The branch main has been updated by emaste: URL: https://cgit.FreeBSD.org/src/commit/?id=4d125ed6e7d445d574c11dc35c40ec3013559806 commit 4d125ed6e7d445d574c11dc35c40ec3013559806 Author: Ed Maste AuthorDate: 2026-05-22 14:55:49 +0000 Commit: Ed Maste CommitDate: 2026-05-23 20:59:52 +0000 netlink: Avoid potential undefined behaviour Taking the address of an OOB array element is UB, even if not dereferenced. Reviewed by: des, bz Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D57172 --- sys/netlink/netlink_generic.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/sys/netlink/netlink_generic.c b/sys/netlink/netlink_generic.c index c2f82eed5656..50c12175e14e 100644 --- a/sys/netlink/netlink_generic.c +++ b/sys/netlink/netlink_generic.c @@ -93,12 +93,10 @@ static struct genl_group { static inline struct genl_family * genl_family(uint16_t family_id) { - struct genl_family *gf; - - gf = &families[family_id - GENL_MIN_ID]; KASSERT(family_id - GENL_MIN_ID < MAX_FAMILIES && - gf->family_name != NULL, ("family %u does not exist", family_id)); - return (gf); + families[family_id - GENL_MIN_ID].family_name != NULL, + ("family %u does not exist", family_id)); + return (&families[family_id - GENL_MIN_ID]); } static inline uint16_t From nobody Sat May 23 23:20:20 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gNJ5x58rPz6f592; Sat, 23 May 2026 23:20:21 +0000 (UTC) (envelope-from des@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 "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gNJ5x4FDTz3qqT; Sat, 23 May 2026 23:20:21 +0000 (UTC) (envelope-from des@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779578421; 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=OrsAc1WcVxfny/+geXJr0zGVuwrsARk7D/qxdirObn8=; b=BhYe5oZbV1WgcicVxYoTcAcQ1pnQGauMbOr64tKfxSqFE64feY5hYqjjoSByxXMJHn/lEq umUasobMEgPS7DYIGOy0paGnGVkUNwlLfaULyyoz3GFhmLScRB+XZr1yIEFbduKURrTy6J xP13TzYy7WwwrjNWrFgJD2Uq2Wkn2vd/YgoaULNRAovycbhgOYUQaUO+d37PBFniynKLHZ yC3r4YFU9cGcqEpHWchqkjHblSQEngPeJG9sItKTspLoBudHY7VybIQE8mOwgGiN0VM81o x9MiVOh4aZ0DdsrdUrw1WmDKmAdxkduA9OemtU2ENi3aWNxBma3WNHz1l0KiAQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779578421; a=rsa-sha256; cv=none; b=p+jJWbW24rL+uIcaMENB8M7gnRsz2Rjrh7GofdPzv411oobhHjSavPcWcybHUB1snpzQRj 3kjQ7BgL3iogymtzzymb9y73HX92rOpiBVh2KrzpYT2Tmu3OMV58FNcU3BSGvL77yRPnAp kyydS2DF3cdBtz9gppEHI+QC4sg6R14UStJcnGNyKROY50rgXIvDz2GPs0J9oZgWLtikNW KGnfJhE7tsp3nYbI20XcXWFFE8lI3oAJgbASYrK7pDqlGf/I4bLbhX0Yzn9D2PJVtPuZAU hennZYALcdHrf9/ETNlbn63imIhvmsKkIaYz/tzZn7yxgoTzRAnQLHFAk5GpIA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779578421; 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=OrsAc1WcVxfny/+geXJr0zGVuwrsARk7D/qxdirObn8=; b=sXzFWzWeLevP2raCtgIa5zBan1woxikoMelmJxwjGFOjjtHKlWcDNJZFjfUDIiEkVezdmC uME+FDJXDedAzID89XIE+xIb+BNjC4OWZ37Q3xfyufMinalBVqF6IHS/Xez7yqq7IxbZqs 5zzwXhSkmEL8VrhFMQkPVQw+ixppGeiQNz8TnUJQJG8WzLYxE4TwN7RiEMSsgUhyUgk1v8 KXy9iSHAOuTyqvdlRfOzAHWL1hgLAkc0jpoTyPwx9/V9SlfXkZIXxydbj4mqCS9K2n/7qz qAT5ZUzu5DZmG1amkmMGvRX0PMJXk/7UgY58DCSRE5mP29dutHqqUDRGcZ30Sw== Received: from ltc.des.dev (unknown [92.183.12.56]) (using TLSv1.3 with cipher TLS_AES_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: des/mail) by smtp.freebsd.org (Postfix) with ESMTPSA id 4gNJ5x2vFDzsV4; Sat, 23 May 2026 23:20:21 +0000 (UTC) (envelope-from des@freebsd.org) Received: by ltc.des.dev (Postfix, from userid 1001) id 370BF7273B; Sun, 24 May 2026 01:20:20 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: Jilles Tjoelker Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 1df431576f99 - main - sh/tests: Cut down builtins/read12.0 by 2 seconds In-Reply-To: <6a120625.45836.5e8588e2@gitrepo.freebsd.org> (Jilles Tjoelker's message of "Sat, 23 May 2026 19:55:17 +0000") References: <6a120625.45836.5e8588e2@gitrepo.freebsd.org> User-Agent: Gnus/5.13 (Gnus v5.13) Date: Sun, 24 May 2026 01:20:20 +0200 Message-ID: <86h5nx3e8b.fsf@ltc.des.dev> List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Jilles Tjoelker writes: > commit 1df431576f99c3cc26dd4ceb1a6eda864cc9f196 > Author: Jilles Tjoelker > AuthorDate: 2026-05-23 19:47:15 +0000 > Commit: Jilles Tjoelker > CommitDate: 2026-05-23 19:47:15 +0000 > > sh/tests: Cut down builtins/read12.0 by 2 seconds >=20=20=20=20=20 > Since the test assumes a 250 ms response time, there is no need to de= lay > for 3 seconds. Instead, delay for the minimum possible 1 second. >=20=20=20=20=20 > Also, fix some assertions in builtins/read11.0 and builtins/read12.0.= If > `set -e` is in effect, `foo` in `foo && bar` is considered tested and > therefore a failure does not cause the shell to exit. >=20=20=20=20=20 > Reviewed by: bdrewery > Differential Revision: https://reviews.freebsd.org/D55191 I said no, several times. I also showed you how to speed up your tests by much more than thte two seconds you save here. Furthermore, I asked you several times to explain the login in this sentence: > Since the test assumes a 250 ms response time, there is no need to de= lay > for 3 seconds. Instead, delay for the minimum possible 1 second. and you were unable to. Please revert the non-functional parts of this change. DES --=20 Dag-Erling Sm=C3=B8rgrav - des@FreeBSD.org From nobody Sun May 24 14:26:26 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gNhCR1wWjz6fxND for ; Sun, 24 May 2026 14:26: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gNhCR1JjRz4P6g for ; Sun, 24 May 2026 14:26:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779632787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DahBNwh1Erk0azZeYmGAClhaknMo/AzA04r3tCbm1aY=; b=KRzj1getnSLMFqBzQQSsYtemKcKkkmEooqc/3W+yI4YkO9T0xLsiMMqqgiygMGQNQcCXLB zJuGbtVUytKA7DSr6lhDJKlvFVugX7hqQy6+47G1YwRrPmyii6EY7aDlDTgxcvA7XAXipT QcHkbHNwJjyKpwAWuL9LVX+KyYp+zpJswOIOU7PpqLsP1m0nDXDr4AhLAsynCYZRWkqern uYg3WsZUbE47rpJrqWinlA2bHyIPsglJEU/b8J5afkklZMAoqf3H8w63bItDdZD4SIWceG 0DKzor1TXU8I+bR9HH66KTJ523EaBqLQJozUPlwIJHMVCZ9bEC0e3OXL0yx7ow== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779632787; a=rsa-sha256; cv=none; b=WVG9rAR7HPEuAWCCz/hTjygKLvvGuN3Qt0Eepua8Ak7yb3jR5Rptd+SZOWg538eWxhE77w ZAn5YQRf4o2COsaGzaEE+QMRJcSQtLfpHNDv/MqHJchpI7Qtvjm2X4LsNgJ/VSlRnaHHa+ yD+iqVcv+p0pApUsJuldvpB6ll3oaeHiIKb1vKkkK+4EA/SCcCK9txUimgp5F9iY+gHZwq UQFmuCAGSgFpgp0XGArCVmN1as394W2C/jeBv482czSmZxdmf2CjTGPe3KUdDX1hxYXMNZ s4GfjQfiNIYwmZrBL8jv3xEc94XtvNsyMvbwukJRir0RYLdw2nUUxMa8L7j2CQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779632787; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=DahBNwh1Erk0azZeYmGAClhaknMo/AzA04r3tCbm1aY=; b=v9lKqZFeLDnahjkmQBYkgn18leMIJf6eN77yhn6peNyP6K0lwA4r32sAKgvmxYwZAsAKgM CSPuurk2ZH6OzyvVZh9cpDFhfBZxhEFkA1oSj23lW5KOt2NloA/X5IomIYF30Atq9sDzxT C2m/qd4hgGVUp39bPWwbdgAPobqZf1liIQ6y2fWZON1fR6zMCIPcHy7QZgZFkISfqNxKN/ Nk68ILqWjDLKd/+K8zMMVxwbwnlqSvPWJB8qiyBmG/zk+RPEG65pJlVJP9MATo1oBEA63+ nesON1b+2wdXi6lGjPgEWTGwbP+HyKS6qaUK3NbGlpb3cugkvY1gi5lwpM4njg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gNhCR017dzyDf for ; Sun, 24 May 2026 14:26:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1dc0e by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 24 May 2026 14:26:26 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 8ead19207e56 - main - LinuxKPI: 802.11: reset chanctx when recycling List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8ead19207e56790bd4c64dba4ddbf2e0eb6922f7 Auto-Submitted: auto-generated Date: Sun, 24 May 2026 14:26:26 +0000 Message-Id: <6a130a92.1dc0e.52a5a676@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=8ead19207e56790bd4c64dba4ddbf2e0eb6922f7 commit 8ead19207e56790bd4c64dba4ddbf2e0eb6922f7 Author: Bjoern A. Zeeb AuthorDate: 2026-05-23 21:06:32 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-05-23 23:54:30 +0000 LinuxKPI: 802.11: reset chanctx when recycling When we no longer need a channel context and put it back on the reserved list, zero it for all but the vif so that we get the same state as if it was freshly allocated. Sponsored by: The FreeBSD Foundation Fixes: e62c92c0a5cf, 88cb1e17f471 MFC after: 3 days --- sys/compat/linuxkpi/common/src/linux_80211.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index b9528295ad8e..efd1d9bae3cc 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -2426,6 +2426,8 @@ lkpi_set_chanctx_conf(struct ieee80211_hw *hw, struct ieee80211_vif *vif, rcu_assign_pointer(vif->bss_conf.chanctx_conf, NULL); lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); list_del(&lchanctx->entry); + memset(lchanctx, 0, sizeof(*lchanctx)); + lchanctx->lvif = VIF_TO_LVIF(vif); list_add_rcu(&lchanctx->entry, &lhw->lchanctx_list_reserved); } @@ -2460,6 +2462,8 @@ lkpi_remove_chanctx(struct ieee80211_hw *hw, struct ieee80211_vif *vif) lchanctx = CHANCTX_CONF_TO_LCHANCTX(chanctx_conf); list_del(&lchanctx->entry); lhw = HW_TO_LHW(hw); + memset(lchanctx, 0, sizeof(*lchanctx)); + lchanctx->lvif = VIF_TO_LVIF(vif); list_add_rcu(&lchanctx->entry, &lhw->lchanctx_list_reserved); } @@ -6806,6 +6810,7 @@ linuxkpi_ieee80211_iffree(struct ieee80211_hw *hw) lkpi_80211_mo_remove_chanctx(hw, chanctx_conf); } list_del(&lchanctx->entry); + /* No need to reset the lchanctx here as we will free it below. */ list_add_rcu(&lchanctx->entry, &lhw->lchanctx_list_reserved); } } From nobody Sun May 24 14:26:28 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gNhCS21sVz6fxlB for ; Sun, 24 May 2026 14:26:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gNhCS1Ws5z4PQY for ; Sun, 24 May 2026 14:26:28 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779632788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5daS0+FfeL/QE64W+NUgzbapeFxGo+Ng2MMjIkFX26c=; b=FsbaAzKsbmSiL3nGYTb24vsV6vfT0FmU6t0IMgXBlq75RlVoShbP5dzUU/6xUefD1ICVJg 2fk3KPs1hoXUs+uLhb4oyWjKYivqnemeWAr/P81DL4t7wmlRGwzcWQ+hkfF9HJSRbFmveE cvDMTqzJTUI0sJzpusPGTl+jyrYxdJf2J7JKK6ERiON987wV45OiL/RvvH2RA/n6ef2T0s 5z84OBx80YkQ4oN1pj4bhcJwV7rsF6rSrDOoojCJuIi76lMguazat1qNA1LWJitlrPlFbq +AMUJhUXUenecB+TjdwCJWXmXyr23ElzaC30hPdfkS+p06VFYTFPJqRk040PXA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779632788; a=rsa-sha256; cv=none; b=FS2ZDvt+2IsUkLE8EOGMVCwX7PFsjAO/sTo4bc3nVe3EW8P/4GKMen/Spm8BfJ6rROhwYz KiLn0d8uriZH+ZYYO2vL9P5KkFJDcRSU5C8BI8tpy+TKu0iZjTaw+0zFZoGl6q7yX88FAT bRIU7IVpBJQiLARa7dH2zsELgahv/9dad/0IVjgLgc20l/0kiTmK0WLGAddFM7XKcLjU10 oWOj4XA1G4jKJOUs641djoWtk13m16w2nxTutt90jg1kBddl39vFLkCNfYODENFyoDiquc wAXwOyBq0WJN7NpHz9LU6KvUjPGm2nhfUeNd0pK/SvtuIDPxC1O2+aQSWeYzEw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779632788; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=5daS0+FfeL/QE64W+NUgzbapeFxGo+Ng2MMjIkFX26c=; b=EMvyAp9GIMlOm+jNmPhQrOe8tn+sH+OeoPT8a/iTrb+fVXZoSmvXtX1PogtJ/gQOAopbJN +ETBCUFyCvPIc3t+uDYXrXEkfIFZ/U6KmlB25LvLqSCGpM54eZUIcOVvq7dDuAGVveueq8 Lwj9fP4kXX4uHbLrASBxFKrollaXyRcp9GCBtRYzzUJ/3NlAbbXG6E1LdH1/TbYj5OAb4T wpDAwBXV9EFTHmyXm2cRJIczRtvTwYcWQ22zmf7y+uuIGqW+2ikF4FX93ANWZylw2pYUcf MXV47qFOSeYcnXA885VhS5mhzpBAIyKvAfine0rt6S8jCO6az7gkgd8gUq1Lcw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gNhCS0vmFzxgb for ; Sun, 24 May 2026 14:26:28 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 1c630 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 24 May 2026 14:26:28 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Bjoern A. Zeeb Subject: git: 11d69a4558de - main - LinuxKPI: 802.11: add support for suspend/resume List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bz X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 11d69a4558de2a5427d8191caed315c5f7e9a5d6 Auto-Submitted: auto-generated Date: Sun, 24 May 2026 14:26:28 +0000 Message-Id: <6a130a94.1c630.6dcfa76a@gitrepo.freebsd.org> The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=11d69a4558de2a5427d8191caed315c5f7e9a5d6 commit 11d69a4558de2a5427d8191caed315c5f7e9a5d6 Author: Bjoern A. Zeeb AuthorDate: 2025-04-09 18:00:20 +0000 Commit: Bjoern A. Zeeb CommitDate: 2026-05-24 01:15:02 +0000 LinuxKPI: 802.11: add support for suspend/resume Add support for automatic suspend/resume as we know it for wireless. The problem is that the PCI driver which would normally gets the code is the LinuxKPI PCI framework/Linux wireless driver, which we cannot ammend or generally add extra suspend/resume code to. A further problem is that with growing support, the LinuxKPI 802.11 (mac80211) layer also is involved in suspend/resume for WoWLAN (not yet supported) meaning that we need to hook the suspend/resume framework into that as well. Unlike Linux we do not have a general suspend/resume "hook" we can hang into and we need to tie this one to the hardware so cannot indepedently (after the driver one) run it. The solution for FreeBSD, in order to not mangle the Linux native drivers and get extra maintanace overhead, is to add a bus child which inherits the general framework and thus is 2 lines + #includes for each driver extra to add to. The general suspend/resume framework lives in LinuxKPI (linuxkpi_80211_pm) and imitates the normal suspend/resume path overloading it (there is a slight code/logic duplication from the PCI code). Given we are passed the LinuxKPI p(ci)dev, we can go and peel out the net80211 ic from the native bsddev and that way get access to the wireless stack. We then call into LinuxKPI 802.11 in order to do the suspend/resume dance there, and, if needed also call the official suspend/resume routine from the device driver after (reverse for resume). If any in this fails, suspend will be blocked as we will return the error (no different to any native driver could do). The LinuxKPI 802.11 suspend/resume code has the initial code for doing a WoWLAN suspend (one could change the sysctl) but other bits like access to ifnet flags etc. has to be sorted out before we can go and support that. The default code path calles into net80211 to clear everything like native wireless drivers do. The one thing we need to do in addition is to remove the vif devices from the firmware and restore them prior to net80211 resume. We also check for a possible HW SCAN to still be runinng on resume and warn as that may cause problems though the scan should be stopped before suspend (we may still get a callback). You can easily see these problems if you suspend/resume without stopping the wlan. Enable the PM framework for iwlwifi in the module Makefile to be able to use all this; others can follow as tested. In case anyone has problems with this, they can change the sysctl back to 0 until we can figure out any further problems. The linuxkpi_wlan.4 man page got adjusted to document this. Sponsored by: The FreeBSD Foundation Tested on: Dell XPS 13 (AX200), Lenovo TP X270 (AX210) MFC after: 3 days PR: 263632 --- share/man/man4/linuxkpi_wlan.4 | 8 +- sys/compat/linuxkpi/common/src/linux_80211.c | 137 +++++++++++++ sys/compat/linuxkpi/common/src/linux_80211.h | 16 +- .../linuxkpi/common/src/linux_80211_macops.c | 116 +++++++++++ sys/compat/linuxkpi/common/src/linuxkpi_80211_pm.c | 214 +++++++++++++++++++++ sys/conf/files | 2 + sys/contrib/dev/iwlwifi/lkpi_iwlwifi_pm.c | 8 + sys/contrib/dev/rtw88/lkpi_rtw88_pm.c | 8 + sys/contrib/dev/rtw89/lkpi_rtw89_pm.c | 8 + sys/modules/iwlwifi/Makefile | 3 +- sys/modules/linuxkpi_wlan/Makefile | 1 + sys/modules/rtw88/Makefile | 1 + sys/modules/rtw89/Makefile | 3 +- 13 files changed, 521 insertions(+), 4 deletions(-) diff --git a/share/man/man4/linuxkpi_wlan.4 b/share/man/man4/linuxkpi_wlan.4 index 65c77d8d7631..fa0b15b5e0b1 100644 --- a/share/man/man4/linuxkpi_wlan.4 +++ b/share/man/man4/linuxkpi_wlan.4 @@ -6,7 +6,7 @@ .\" This documentation was written by Bj\xc3\xb6rn Zeeb under sponsorship from .\" the FreeBSD Foundation. .\" -.Dd December 28, 2025 +.Dd May 23, 2026 .Dt LINUXKPI_WLAN 4 .Os .Sh NAME @@ -107,6 +107,12 @@ debug messages. See .Pa sys/compat/linuxkpi/common/src/linux_80211.h for details. +.It Va compat.linuxkpi.80211.suspend_type +For the time being this variable allows suspend/resume to be +enabled/disabled. +The default is 1 which enables normal suspend/resume. +To disable any suspend/resume set it to 0. +Other values may enable specific features in the future. .It Va compat.linuxkpi.80211.IF.dump_stas Print statistics for a given, associated .Xr wlan 4 diff --git a/sys/compat/linuxkpi/common/src/linux_80211.c b/sys/compat/linuxkpi/common/src/linux_80211.c index efd1d9bae3cc..cade61e8446f 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.c +++ b/sys/compat/linuxkpi/common/src/linux_80211.c @@ -105,6 +105,11 @@ SYSCTL_DECL(_compat_linuxkpi); SYSCTL_NODE(_compat_linuxkpi, OID_AUTO, 80211, CTLFLAG_RW | CTLFLAG_MPSAFE, 0, "LinuxKPI 802.11 compatibility layer"); +static int lkpi_suspend_type = 1; +SYSCTL_INT(_compat_linuxkpi_80211, OID_AUTO, suspend_type, CTLFLAG_RW, + &lkpi_suspend_type, 0, + "LinuxKPI 802.11 suspend type bitmask (0=off, 1=net80211, 2=wowlan"); + static bool lkpi_order_scanlist = false; SYSCTL_BOOL(_compat_linuxkpi_80211, OID_AUTO, order_scanlist, CTLFLAG_RW, &lkpi_order_scanlist, 0, "Enable LinuxKPI 802.11 scan list shuffeling"); @@ -6859,10 +6864,19 @@ linuxkpi_set_ieee80211_dev(struct ieee80211_hw *hw) /* * Set a proper name before ieee80211_ifattach() if dev is set. * ath1xk also unset the dev so we need to check. + * Also we will (ab)use this opportunity to register the + * power management sub-children if thay exist (for suspend/resume). */ dev = wiphy_dev(hw->wiphy); if (dev != NULL) { ic->ic_name = dev_name(dev); + if (dev->bsddev != NULL) { + bus_identify_children(dev->bsddev); + bus_enumerate_hinted_children(dev->bsddev); + bus_topo_lock(); + bus_attach_children(dev->bsddev); + bus_topo_unlock(); + } } else { TODO("adjust arguments to still have the old dev or go through " "the hoops of getting the bsddev from hw and detach; " @@ -9538,7 +9552,130 @@ ieee80211_emulate_switch_vif_chanctx(struct ieee80211_hw *hw, } /* -------------------------------------------------------------------------- */ +/* LinuxKPI 802.11 PM. */ +int +lkpi_80211_suspend(struct ieee80211com *ic, pm_message_t state) +{ + struct lkpi_hw *lhw; + struct ieee80211_hw *hw; + int error; + + lhw = ic->ic_softc; + hw = LHW_TO_HW(lhw); + error = 0; + + /* Check: + * - device_set_wakeup_capable() / device_can_wakeup() + * - hw->wiphy->wowlan to be non-NULL, if so contents. + * - hw->wiphy->max_sched_scan_ssids (rtw88) + */ + if ((lkpi_suspend_type & 0x2) != 0) { + struct cfg80211_wowlan wowlan; + + IMPROVE("various options for WoWLAN"); + memset(&wowlan, 0, sizeof(wowlan)); + wiphy_lock(hw->wiphy); + error = lkpi_80211_mo_suspend(hw, &wowlan); + wiphy_unlock(hw->wiphy); + if (error == EOPNOTSUPP) + error = 0; + } + if ((lkpi_suspend_type & 0x1) != 0) { + struct lkpi_vif *lvif; + + ieee80211_suspend_all(ic); + wiphy_lock(hw->wiphy); + /* + * At the end of this net80211 will run a task to call + * (*ic_parent)() which is entirely unhelpful as we do not + * know when it will happen. So deal with it here. + */ + TAILQ_FOREACH(lvif, &lhw->lvif_head, lvif_entry) { + lkpi_80211_mo_remove_interface(hw, LVIF_TO_VIF(lvif)); + } + + if ((lhw->sc_flags & LKPI_MAC80211_DRV_STARTED) != 0) + lkpi_80211_mo_stop(hw, true); + wiphy_unlock(hw->wiphy); + } + + if (error < 0) + error = -error; + + if (error != 0) + ic_printf(ic, "%s: SUSPEND FAILED: %d\n", __func__, error); + + return (error); +} + +int +lkpi_80211_resume(struct ieee80211com *ic) +{ + struct lkpi_hw *lhw; + struct ieee80211_hw *hw; + int error; + bool hw_scan_running; + + lhw = ic->ic_softc; + hw = LHW_TO_HW(lhw); + error = 0; + + /* + * Ongoing HW scans during suspend are a problem on resume. + * Be verbose about that. + */ + LKPI_80211_LHW_SCAN_LOCK(lhw); + hw_scan_running = (lhw->scan_flags & (LKPI_LHW_SCAN_RUNNING|LKPI_LHW_SCAN_HW)) != 0; + LKPI_80211_LHW_SCAN_UNLOCK(lhw); + if (hw_scan_running) + ic_printf(ic, "%s: WARNING: ongoing hw scan on resume!\n", __func__); + + if ((lkpi_suspend_type & 0x1) != 0) { + struct lkpi_vif *lvif; + + wiphy_lock(hw->wiphy); + error = lkpi_80211_mo_start(hw); + if (error != 0 && error != EEXIST) { + ic_printf(ic, "%s: mo_start failed: %d\n", + __func__, error); + wiphy_unlock(hw->wiphy); + goto err; + } + + TAILQ_FOREACH(lvif, &lhw->lvif_head, lvif_entry) { + error = lkpi_80211_mo_add_interface(hw, LVIF_TO_VIF(lvif)); + if (error != 0) { + struct ieee80211vap *vap; + + vap = LVIF_TO_VAP(lvif); + ic_printf(ic, "%s: mo_add_interface %s failed: %d\n", + __func__, if_name(vap->iv_ifp), error); + wiphy_unlock(hw->wiphy); + goto err; + } + } + wiphy_unlock(hw->wiphy); + + ieee80211_resume_all(ic); + } + + if ((lkpi_suspend_type & 0x2) != 0) { + wiphy_lock(hw->wiphy); + error = lkpi_80211_mo_resume(hw); + wiphy_unlock(hw->wiphy); + if (error == EOPNOTSUPP) + error = 0; + } + +err: + if (error < 0) + error = -error; + + return (error); +} + +/* -------------------------------------------------------------------------- */ MODULE_VERSION(linuxkpi_wlan, 1); MODULE_DEPEND(linuxkpi_wlan, linuxkpi, 1, 1, 1); MODULE_DEPEND(linuxkpi_wlan, wlan, 1, 1, 1); diff --git a/sys/compat/linuxkpi/common/src/linux_80211.h b/sys/compat/linuxkpi/common/src/linux_80211.h index 569c4f12f6d6..89416edfae73 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211.h +++ b/sys/compat/linuxkpi/common/src/linux_80211.h @@ -1,6 +1,6 @@ /*- * Copyright (c) 2020-2026 The FreeBSD Foundation - * Copyright (c) 2020-2021 Bjoern A. Zeeb + * Copyright (c) 2020-2025 Bjoern A. Zeeb * * This software was developed by Björn Zeeb under sponsorship from * the FreeBSD Foundation. @@ -44,6 +44,9 @@ #include "opt_wlan.h" +#include +#include + #if defined(IEEE80211_DEBUG) && !defined(LINUXKPI_DEBUG_80211) #define LINUXKPI_DEBUG_80211 #endif @@ -504,5 +507,16 @@ int lkpi_80211_mo_ampdu_action(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_ampdu_params *); int lkpi_80211_mo_sta_statistics(struct ieee80211_hw *, struct ieee80211_vif *, struct ieee80211_sta *, struct station_info *); +int lkpi_80211_mo_suspend(struct ieee80211_hw *, struct cfg80211_wowlan *); +int lkpi_80211_mo_resume(struct ieee80211_hw *); +int lkpi_80211_mo_set_wakeup(struct ieee80211_hw *, bool); +int lkpi_80211_mo_set_rekey_data(struct ieee80211_hw *, + struct ieee80211_vif *, struct cfg80211_gtk_rekey_data *); +int lkpi_80211_mo_set_default_unicast_key(struct ieee80211_hw *, + struct ieee80211_vif *, int); + +/* LinuxKPI 802.11 PM. */ +int lkpi_80211_suspend(struct ieee80211com *, pm_message_t); +int lkpi_80211_resume(struct ieee80211com *); #endif /* _LKPI_SRC_LINUX_80211_H */ diff --git a/sys/compat/linuxkpi/common/src/linux_80211_macops.c b/sys/compat/linuxkpi/common/src/linux_80211_macops.c index 42067e36c953..aa6b158b70a7 100644 --- a/sys/compat/linuxkpi/common/src/linux_80211_macops.c +++ b/sys/compat/linuxkpi/common/src/linux_80211_macops.c @@ -819,3 +819,119 @@ lkpi_80211_mo_sta_statistics(struct ieee80211_hw *hw, struct ieee80211_vif *vif, out: return (error); } + +int +lkpi_80211_mo_suspend(struct ieee80211_hw *hw, struct cfg80211_wowlan *wowlan) +{ + struct lkpi_hw *lhw; + int error; + + might_sleep(); + lockdep_assert_wiphy(hw->wiphy); + + lhw = HW_TO_LHW(hw); + if (lhw->ops->suspend == NULL) { + error = EOPNOTSUPP; + goto out; + } + + LKPI_80211_TRACE_MO("hw %p wowlan %p", hw, wowlan); + error = lhw->ops->suspend(hw, wowlan); + +out: + return (error); +} + +int +lkpi_80211_mo_resume(struct ieee80211_hw *hw) +{ + struct lkpi_hw *lhw; + int error; + + might_sleep(); + lockdep_assert_wiphy(hw->wiphy); + + lhw = HW_TO_LHW(hw); + if (lhw->ops->resume == NULL) { + error = EOPNOTSUPP; + goto out; + } + + LKPI_80211_TRACE_MO("hw %p", hw); + error = lhw->ops->resume(hw); + +out: + return (error); +} + +int +lkpi_80211_mo_set_wakeup(struct ieee80211_hw *hw, bool enable) +{ + struct lkpi_hw *lhw; + int error; + + might_sleep(); + lockdep_assert_wiphy(hw->wiphy); + + lhw = HW_TO_LHW(hw); + if (lhw->ops->set_wakeup == NULL) { + error = EOPNOTSUPP; + goto out; + } + + LKPI_80211_TRACE_MO("hw %p enable %d", hw, enable); + lhw->ops->set_wakeup(hw, enable); + error = 0; + +out: + return (error); +} + +int +lkpi_80211_mo_set_rekey_data(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, struct cfg80211_gtk_rekey_data *grd) +{ + struct lkpi_hw *lhw; + int error; + + might_sleep(); + lockdep_assert_wiphy(hw->wiphy); + + lhw = HW_TO_LHW(hw); + if (lhw->ops->set_rekey_data == NULL) { + error = EOPNOTSUPP; + goto out; + } + + LKPI_80211_TRACE_MO("hw %p vif %p grd %p", hw, vif, grd); + lhw->ops->set_rekey_data(hw, vif, grd); + error = 0; + +out: + return (error); +} + +int +lkpi_80211_mo_set_default_unicast_key(struct ieee80211_hw *hw, + struct ieee80211_vif *vif, int idx) +{ + struct lkpi_hw *lhw; + int error; + + might_sleep(); + lockdep_assert_wiphy(hw->wiphy); + + lhw = HW_TO_LHW(hw); + if (lhw->ops->set_default_unicast_key == NULL) { + error = EOPNOTSUPP; + goto out; + } + + LKPI_80211_TRACE_MO("hw %p vif %p idx %d", hw, vif, idx); + lhw->ops->set_default_unicast_key(hw, vif, idx); + error = 0; + +out: + return (error); +} + diff --git a/sys/compat/linuxkpi/common/src/linuxkpi_80211_pm.c b/sys/compat/linuxkpi/common/src/linuxkpi_80211_pm.c new file mode 100644 index 000000000000..c69288bd5886 --- /dev/null +++ b/sys/compat/linuxkpi/common/src/linuxkpi_80211_pm.c @@ -0,0 +1,214 @@ +/* + * Copyright (c) 2025 The FreeBSD Foundation + * + * This software was developed by Björn Zeeb under sponsorship from + * the FreeBSD Foundation. + * + * SPDX-License-Identifier: BSD-2-Clause + */ + +#include +#include +#include +#include + +#include +#include "linux_80211.h" + +#include + +struct lkpi_80211_pm_softc { + /* PCI */ + int (*suspend) (struct pci_dev *pdev, pm_message_t state); + int (*resume) (struct pci_dev *pdev); +}; + +static int +lkpi_80211_pm_suspend(struct pci_dev *pdev, pm_message_t state) +{ + const struct dev_pm_ops *pmops; + struct lkpi_80211_pm_softc *sc; + struct ieee80211com *ic; + device_t dev; + int error; + + dev = device_find_child(pdev->dev.bsddev, "lkpi80211_pm", + DEVICE_UNIT_ANY); + if (dev == NULL) { + /* Must not happen, so abort suspend if it does. */ + device_printf(pdev->dev.bsddev, + "%s: cannot find lkpi80211_pm child for %s\n", + __func__, device_get_name(pdev->dev.bsddev)); + return (ENXIO); + } + sc = device_get_softc(dev); + error = 0; + + /* Call order: wireless then pdev. */ + + ic = ieee80211_find_com(device_get_nameunit(pdev->dev.bsddev)); + if (ic != NULL) { + error = lkpi_80211_suspend(ic, state); + } else { + device_printf(pdev->dev.bsddev, + "%s: WARNING: wireless device not found\n", __func__); + } + if (error != 0) + goto err; + + /* Logic duplicated from linux_pci_suspend(). */ + pmops = pdev->pdrv->driver.pm; + if (sc->suspend != NULL) + error = sc->suspend(pdev, state); + else if (pmops != NULL && pmops->suspend != NULL) { + error = -pmops->suspend(&pdev->dev); + if (error == 0 && pmops->suspend_late != NULL) + error = -pmops->suspend_late(&pdev->dev); + if (error == 0 && pmops->suspend_noirq != NULL) + error = -pmops->suspend_noirq(&pdev->dev); + } + +err: + if (error < 0) + error = -error; + + if (error != 0) + device_printf(pdev->dev.bsddev, + "%s: WARNING: SUSPEND FAILED: %d\n", __func__, error); + + return (error); +} + +static int +lkpi_80211_pm_resume(struct pci_dev *pdev) +{ + const struct dev_pm_ops *pmops; + struct lkpi_80211_pm_softc *sc; + struct ieee80211com *ic; + device_t dev; + int error; + + dev = device_find_child(pdev->dev.bsddev, "lkpi80211_pm", + DEVICE_UNIT_ANY); + if (dev == NULL) { + /* Must not happen, so abort suspend if it does. */ + device_printf(pdev->dev.bsddev, + "%s: cannot find lkpi80211_pm child\n", __func__); + return (ENXIO); + } + sc = device_get_softc(dev); + error = 0; + + /* Call order: pdev then wireless. */ + + /* Logic duplicated from linux_pci_resume(). */ + pmops = pdev->pdrv->driver.pm; + if (sc->resume != NULL) { + error = sc->resume(pdev); + } else if (pmops != NULL && pmops->resume != NULL) { + if (pmops->resume_early != NULL) + error = -pmops->resume_early(&pdev->dev); + if (error == 0 && pmops->resume != NULL) + error = -pmops->resume(&pdev->dev); + } + if (error != 0) + device_printf(pdev->dev.bsddev, "%s: resume failed!\n", __func__); + /* Do not error out but give wireless also a chance. */ + + ic = ieee80211_find_com(device_get_nameunit(pdev->dev.bsddev)); + if (ic != NULL) { + error = lkpi_80211_resume(ic); + } else { + device_printf(pdev->dev.bsddev, + "%s: WARNING: wireless device not found\n", __func__); + } + + if (error < 0) + error = -error; + + return (error); +} + +/* -------------------------------------------------------------------------- */ +static void +lkpi_80211_pm_identify(driver_t *driver, device_t parent) +{ + + /* Make sure we're not being doubly invoked per parent. */ + if (device_find_child(parent, driver->name, DEVICE_UNIT_ANY) != NULL) + return; + + /* Make sure this is PCI for now. */ + if (device_get_devclass(parent) == devclass_find("pci")) + return; + + if (BUS_ADD_CHILD(parent, 0, driver->name, DEVICE_UNIT_ANY) == NULL) + device_printf(parent, "%s: failed to add child\n", __func__); +} + +static int +lkpi_80211_pm_probe(device_t dev) +{ + device_set_descf(dev, "LinuxKPI 802.11 %s mac80211 PM", + device_get_nameunit(device_get_parent(dev))); + return (BUS_PROBE_DEFAULT); +} + +static int +lkpi_80211_pm_attach(device_t dev) +{ + struct lkpi_80211_pm_softc *sc; + struct pci_dev *pdev; + + sc = device_get_softc(dev); + pdev = device_get_softc(device_get_parent(dev)); + + /* Intercept the driver suspend/resume calls. */ + sc->suspend = pdev->pdrv->suspend; + pdev->pdrv->suspend = lkpi_80211_pm_suspend; + sc->resume = pdev->pdrv->resume; + pdev->pdrv->resume = lkpi_80211_pm_resume; + + return (0); +} + +static int +lkpi_80211_pm_detach(device_t dev) +{ + struct lkpi_80211_pm_softc *sc; + struct pci_dev *pdev; + + sc = device_get_softc(dev); + pdev = device_get_softc(device_get_parent(dev)); + + /* Restore the original notifications. */ + pdev->pdrv->suspend = sc->suspend; + pdev->pdrv->resume = sc->resume; + + return (0); +} + +static device_method_t lkpi_80211_pm_methods[] = { + /* Device interface */ + DEVMETHOD(device_identify, lkpi_80211_pm_identify), + DEVMETHOD(device_probe, lkpi_80211_pm_probe), + DEVMETHOD(device_attach, lkpi_80211_pm_attach), + DEVMETHOD(device_detach, lkpi_80211_pm_detach), + /* + * Do not think about device_suspend/resume here. + * We are not a PCI device and LinuxKPI PCI linux_pci_suspend/resume + * are getting the notifications so we have to hijack the + * LinuxKPI upcalls. + */ + + DEVMETHOD_END +}; + +driver_t lkpi_80211_pm_driver = { + "lkpi80211_pm", + lkpi_80211_pm_methods, + sizeof(struct lkpi_80211_pm_softc), +}; + +MODULE_DEPEND(lkpi80211_pm, linuxkpi_wlan, 1, 1, 1); +MODULE_VERSION(lkpi80211_pm, 1); diff --git a/sys/conf/files b/sys/conf/files index fac94252a362..379685d83713 100644 --- a/sys/conf/files +++ b/sys/conf/files @@ -4665,6 +4665,8 @@ compat/linuxkpi/common/src/linux_80211.c optional compat_linuxkpi wlan \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_80211_macops.c optional compat_linuxkpi wlan \ compile-with "${LINUXKPI_C}" +compat/linuxkpi/common/src/linuxkpi_80211_pm.c optional compat_linuxkpi wlan \ + compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_kmod.c optional compat_linuxkpi \ compile-with "${LINUXKPI_C}" compat/linuxkpi/common/src/linux_acpi.c optional compat_linuxkpi acpi \ diff --git a/sys/contrib/dev/iwlwifi/lkpi_iwlwifi_pm.c b/sys/contrib/dev/iwlwifi/lkpi_iwlwifi_pm.c new file mode 100644 index 000000000000..7843e27d559c --- /dev/null +++ b/sys/contrib/dev/iwlwifi/lkpi_iwlwifi_pm.c @@ -0,0 +1,8 @@ +#include +#include +#include +#include + +extern driver_t lkpi_80211_pm_driver; +DRIVER_MODULE(lkpi80211_pm, iwlwifi, lkpi_80211_pm_driver, 0, 0); + diff --git a/sys/contrib/dev/rtw88/lkpi_rtw88_pm.c b/sys/contrib/dev/rtw88/lkpi_rtw88_pm.c new file mode 100644 index 000000000000..53da7b2ea715 --- /dev/null +++ b/sys/contrib/dev/rtw88/lkpi_rtw88_pm.c @@ -0,0 +1,8 @@ +#include +#include +#include +#include + +extern driver_t lkpi_80211_pm_driver; +DRIVER_MODULE(lkpi80211_pm, rtw88, lkpi_80211_pm_driver, 0, 0); + diff --git a/sys/contrib/dev/rtw89/lkpi_rtw89_pm.c b/sys/contrib/dev/rtw89/lkpi_rtw89_pm.c new file mode 100644 index 000000000000..6f75557fa7ca --- /dev/null +++ b/sys/contrib/dev/rtw89/lkpi_rtw89_pm.c @@ -0,0 +1,8 @@ +#include +#include +#include +#include + +extern driver_t lkpi_80211_pm_driver; +DRIVER_MODULE(lkpi80211_pm, rtw89, lkpi_80211_pm_driver, 0, 0); + diff --git a/sys/modules/iwlwifi/Makefile b/sys/modules/iwlwifi/Makefile index 471509c2bb1c..0212830835df 100644 --- a/sys/modules/iwlwifi/Makefile +++ b/sys/modules/iwlwifi/Makefile @@ -4,7 +4,7 @@ DEVIWLWIFIDIR= ${SRCTOP}/sys/contrib/dev/iwlwifi .PATH: ${DEVIWLWIFIDIR} -IWLWIFI_CONFIG_PM= 0 +IWLWIFI_CONFIG_PM= 1 IWLWIFI_DEBUGFS= 0 .if ${KERN_OPTS:MDEV_ACPI} IWLWIFI_CONFIG_ACPI= 1 @@ -59,6 +59,7 @@ CFLAGS+= -DCONFIG_MAC80211_DEBUGFS .if defined(IWLWIFI_CONFIG_PM) && ${IWLWIFI_CONFIG_PM} > 0 SRCS+= mvm/d3.c SRCS+= mld/d3.c +SRCS+= lkpi_iwlwifi_pm.c CFLAGS+= -DCONFIG_PM CFLAGS+= -DCONFIG_PM_SLEEP .endif diff --git a/sys/modules/linuxkpi_wlan/Makefile b/sys/modules/linuxkpi_wlan/Makefile index bafeb2d5d22a..a8dd06f06bc0 100644 --- a/sys/modules/linuxkpi_wlan/Makefile +++ b/sys/modules/linuxkpi_wlan/Makefile @@ -3,6 +3,7 @@ KMOD= linuxkpi_wlan SRCS= linux_80211.c \ linux_80211_macops.c +SRCS+= linuxkpi_80211_pm.c # QCA ath11k support. SRCS+= linux_mhi.c diff --git a/sys/modules/rtw88/Makefile b/sys/modules/rtw88/Makefile index 1978e2392da9..d9dfd5c2efb1 100644 --- a/sys/modules/rtw88/Makefile +++ b/sys/modules/rtw88/Makefile @@ -66,6 +66,7 @@ CFLAGS+= -DCONFIG_RTW88_USB .if defined(RTW88_CONFIG_PM) && ${RTW88_CONFIG_PM} > 0 SRCS+= wow.c +SRCS+= lkpi_rtw88_pm.c CFLAGS+= -DCONFIG_PM=${RTW88_CONFIG_PM} .endif diff --git a/sys/modules/rtw89/Makefile b/sys/modules/rtw89/Makefile index b7f8dc7a2c6e..682bd2ed9b53 100644 --- a/sys/modules/rtw89/Makefile +++ b/sys/modules/rtw89/Makefile @@ -54,8 +54,9 @@ SRCS+= rtw8852cu.c .endif .if defined(RTW89_CONFIG_PM) && ${RTW89_CONFIG_PM} > 0 -CFLAGS+= -DCONFIG_PM=${RTW89_CONFIG_PM} SRCS+= wow.c +SRCS+= lkpi_rtw89_pm.c +CFLAGS+= -DCONFIG_PM=${RTW89_CONFIG_PM} .endif .if defined(RTW89_DEBUGFS) && ${RTW89_DEBUGFS} > 0 From nobody Sun May 24 15:44:11 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gNjx73W22z6g516 for ; Sun, 24 May 2026 15:44: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gNjx72mxDz3JWS for ; Sun, 24 May 2026 15:44:11 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779637451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ebEfz9MdtyJW3IJ54ekGQhjEI8LDuXS8VAXsXoj/Nkk=; b=D+YqzQlQKXRrKDRrupMpS+x194E84BgON+6GnPqILmYmZAHizE50Yo9U10EJGGFjAMmd6/ lV9nXJe0yxBmTNUMspW6qtyfnUCQXfE232CphsfUODm8leaBbd7vMYudZqFZgD8Q37V9lL zP1/RrxE2cc0C2z5i8oUlr//lbRCPtHmLWwRf39Msb89anvtKtTIMv5vZVBj/9yx9hB+iN TXqhlxK9qN59NMvKriWBv+K9aCxfNx0tlQ4Dq41fw5RTtlJFO9DS4rKv1BTsB+1+SgAkq9 8z+23wvCcnZQOdtB/HSKPSx2mdFrIwePufbCcMCVH5uyn63SoBXxKdqIMK/sZw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779637451; a=rsa-sha256; cv=none; b=t9R8YbM13IOUEtdu3GqovWnMnnkh5k86Pnx/a75FwnKsi4gAiZohVJ3FHaRF8K5CPDWL5Z KZ/5K/8roScaeC/Bz/X67ospbjrNoaRFPOEhSzAWWjqFsykvFrLAvDvqgT4LAFQKPxS4Mo M8gWaDudk25WZV81dVbrGKsXF0Ilct8egLF1LOV6Z0rQsjbZoWM3J4Z67M5iTSVGw+Hunr vTZzvlfWhdBrfUJOCkB4AwSH0af/rzShUDDB0/o9lMPsosPk8f95wHjoW7w6UeZZSe5HFx FGphlT6+Z0px6wKBJq6/SbGRn3rNXUEEGlj3+rwSHplfHVwynFwr5wTt07MpPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779637451; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ebEfz9MdtyJW3IJ54ekGQhjEI8LDuXS8VAXsXoj/Nkk=; b=mngC5wVQUSz7yqS1m9Arawf6QEYkhyHm9XkaR4GLNlDd0pnRT0eqh3hJa+bt+v5WVot/fE 1pX6UIS7T/s8wZBh3PYGy5dqQJQHrjzO7BDK/ebW+YWH715uPSn0zfDhzPpVHQcyrZ92n9 sX4kvteu5pC2xFaPgaWp6VAlrSR/8Vw937gpXKP1iYFTZpKxiHUwJ+vb3MJwNqfrbtYhPM GQvlJ/s0hsBHMgb8u0OWkCnDS3NXrOn5DdjU9iD8ml0nEJh16fkH2yzUSdgmDP/uBmDcyz 36Fn3E63fz7x+Cl7aVl6TS1qJPDmwWUoRLz8IfNnbys+YmcbWqcGXlOn0WQdGg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gNjx72NJHz10jh for ; Sun, 24 May 2026 15:44:11 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 262a1 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 24 May 2026 15:44:11 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Martin Cracauer Subject: git: d2c21935e866 - main - pxeboot: warn and abort on TCP-only NFS server, which doesn't work for pxeboot List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: cracauer X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: d2c21935e8666f5e9a38e27701445f5acc82465d Auto-Submitted: auto-generated Date: Sun, 24 May 2026 15:44:11 +0000 Message-Id: <6a131ccb.262a1.1bf2c54a@gitrepo.freebsd.org> The branch main has been updated by cracauer: URL: https://cgit.FreeBSD.org/src/commit/?id=d2c21935e8666f5e9a38e27701445f5acc82465d commit d2c21935e8666f5e9a38e27701445f5acc82465d Author: Martin Cracauer AuthorDate: 2026-05-24 15:43:00 +0000 Commit: Martin Cracauer CommitDate: 2026-05-24 15:43:00 +0000 pxeboot: warn and abort on TCP-only NFS server, which doesn't work for pxeboot When pxeboot gets a 0 as a port number from portmapper (indicating an error), it currently happily sends NFS packets to the server's port 0 in an endless loop. Change this to instead bail out with a useful message. This happens, for example, with recent Linux NFS servers as many distributions switched to TCP only NFS serving by default. FreeBSD's pxeboot must have UDP. In this situation pxeboot asks the server's portmapper for the UDP NFS port and since there is none gets 0. Also add a hint to the manpage explaining this and how to fix it. Reviewed by: ziaee, kevans, imp --- stand/i386/pxeldr/pxeboot.8 | 8 ++++++++ stand/libsa/rpc.c | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/stand/i386/pxeldr/pxeboot.8 b/stand/i386/pxeldr/pxeboot.8 index 496b244cf00f..aa6a5d5c5f7f 100644 --- a/stand/i386/pxeldr/pxeboot.8 +++ b/stand/i386/pxeldr/pxeboot.8 @@ -130,6 +130,14 @@ In all other respects, acts just like .Xr loader 8 . .Pp +.Nm +requires NFS over UDP. +Many recent distributions of Linux only serve NFS over TCP. +Enable UDP in some distributions by uncommenting +.Ql udp=y +in +.Pa /etc/nfs.conf . +.Pp For further information on Intel's PXE specifications and Wired for Management (WfM) systems, see .Li http://www.pix.net/software/pxeboot/archive/pxespec.pdf . diff --git a/stand/libsa/rpc.c b/stand/libsa/rpc.c index 6b11282a10be..bc5412f1efeb 100644 --- a/stand/libsa/rpc.c +++ b/stand/libsa/rpc.c @@ -415,6 +415,11 @@ rpc_getport(struct iodesc *d, n_long prog, n_long vers) return (-1); } port = (int)ntohl(res->port); + if (port == 0) { + printf("Portmapper returned 0. TCP-only NFS server?\n"); + free(pkt); + return (-1); + } free(pkt); rpc_pmap_putcache(d->destip, prog, vers, port); From nobody Sun May 24 17:02:47 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gNlgw4KDkz6dkw7 for ; Sun, 24 May 2026 17:02: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gNlgw36wLz3RQ6 for ; Sun, 24 May 2026 17:02:52 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779642172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tpM6l7I5sZf8yXuR0nNgt6EgnDr95pCcv72I0+SqFY8=; b=u8309VoSXy2q5hHYF7cZsZDKfUlWd/P1eRfPuxqY9cqkqoaizZFfqBtuZzfmTCTB3XAYdC wpqeTAbU1oi4k9tw+BHpnFFyk4XdHlZjIFuHz/8AP7PeEIyRaORePLpHWjZaRax2xlLpSu sjR4hLY+rBmEs8zSkmsDZUg2I80KwEayRFa5GhLbyz7LZRasmEbINalg+WxyFgv4gePZov sbfzalx/UdxVQ0+Dk+7cHn4nF25xm5+x8eFFofJS1LfGMhkzLI9tUcfuvU4f98DZI3frck P/nqyYMUpiSuzPkx3Rkw+sxovk96UAH0jnnqDJhBX/p/S/nPAXVahzRBi9Vt1w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779642172; a=rsa-sha256; cv=none; b=I4uy3s5G2ZkeAvD0+LIbKTTXXSQjv8DAHLNfSzcbpFtb+g4rENAb4gTZ16dNnKv712aWpu b6uFvCB50oNa3EvATaeND+HLv1ZT8QMD7Pwg2XWgnIu91wgwkhm9I4cLUhz9SelqNnhriv YXj5u5NPGL3tMdL9bQYS0CIxRurP4bGcCImGu4gmUltJSjBnNFDHix/i6vPwFYSWKYFfd2 HFxhXsj022iW6rcX0MadnRjUY9YhG+yWq0+MamPlRTU8FhVnjgmgkcPkFNZnAfm+J1iNs8 SHCRDXnJq++J5GJBrxb1mZVdZhAjQb84fjdOxT3KpTml/5vlT3ynU/NETvSR7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779642172; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tpM6l7I5sZf8yXuR0nNgt6EgnDr95pCcv72I0+SqFY8=; b=wKW6AW+SBejZ/EstUIZvDJrYd0o3qnktT2IsBg8opxBcraimV8EVdoHxinEFjXW5zIR5aD zlKHBaTm+WUQn7/IkhcVm40ZyMTI+UK8fPEXxUhAJCVnDoO4hbL1Ed3KfFwC5FG9c/NEEo 8XacxHRSB0ulZsH/fgA49zYTVUiHfiv5DlPM4YXEF84uOQf3ZJ+75FrvinA6jCnwIZzXEN ner+7YM1OWVuLBycF9gJpxpL1osTtnkQHC1oHfvTIiZRxoWhk1+H2Kz8xDxU1w6WRCXNwP ECf1Lw+eKdatmjyLSbMUy8XRKxfIDLHKbE1EiM+yMX5AVH7s3CJVnCDNL216qQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gNlgw2j6qz12K5 for ; Sun, 24 May 2026 17:02:52 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3681d by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 24 May 2026 17:02:47 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: db513f3a55d5 - main - fcntl.2: clarify arg use for F_SETFD List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list 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: db513f3a55d59339055e6033829964738b879501 Auto-Submitted: auto-generated Date: Sun, 24 May 2026 17:02:47 +0000 Message-Id: <6a132f37.3681d.14afe2b@gitrepo.freebsd.org> The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=db513f3a55d59339055e6033829964738b879501 commit db513f3a55d59339055e6033829964738b879501 Author: Konstantin Belousov AuthorDate: 2026-05-22 04:01:20 +0000 Commit: Konstantin Belousov CommitDate: 2026-05-24 17:02:06 +0000 fcntl.2: clarify arg use for F_SETFD Sponsored by: The FreeBSD Foundation MFC after: 3 days Differential revision: https://reviews.freebsd.org/D57162 --- lib/libsys/fcntl.2 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/libsys/fcntl.2 b/lib/libsys/fcntl.2 index d67c38cfbc6c..b919e1b8674b 100644 --- a/lib/libsys/fcntl.2 +++ b/lib/libsys/fcntl.2 @@ -176,7 +176,9 @@ descriptor to also have the flag set. .El .It Dv F_SETFD Set flags associated with -.Fa fd . +.Fa fd +to +.Fa arg . The available flags are .Dv FD_CLOEXEC , .Dv FD_CLOFORK From nobody Sun May 24 17:09:41 2026 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4gNlqn202bz6dlgj for ; Sun, 24 May 2026 17:09:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gNlqn1FBXz3VN3 for ; Sun, 24 May 2026 17:09:41 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779642581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eUTUvUMZefpuX4CV4YJqUPsoA8x3RcB1OneZvZR49Ak=; b=Auta++Ehb0of2cSlz956LQrbGqjadhEe7UleD16Q5Vs6GNoyRzCUXeeHwW+4vAs21K2jCr j8dqK/gu2FUHcrFDl6mMC7SujUJ9dy2y6f/v96MrUyA0aYvBPYS1w5aZ+CMcOqm6I//Caz ZUMAi/1ejoqBxNKITzNdMnh4+6qkWPDFaYVzxsgYkFptwQmWAoXnbhw1mMx6UgYDsLsnld NyVIRnQdkTbDKRWWAUF47N5BEthmSmHMxQMLwOCuzI4eLVMsPnPakZiNS+0UACFk2mKJtG HpGjEXnJ17MpdOUN5GoHtobSmT6ZzUcWJUsv8ZN2cRBlSUzYUYWmnilnqTqP+w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779642581; a=rsa-sha256; cv=none; b=G/6juzn4iU11u8zUG+WYoj6+T1Hfc2zlLKM/Q9kBClHj0qxOIDsjxrab5uonESnwOrqEno uhJW68GZ3Nroo2JPG/IpOA/AFl4q7EnRMfwDiqucnbRrRqcGNgrP8e2sDlnpRfk5GfEHIj ktf93jeQC+xcVLJI+Zbelei0CW3zo+dcHAbasVqGeDTdGpaUiaT7Dx9KBGkN2QA1rGRQp2 1mwjMZz/i11NEO0ekgWH6gliy2ELAUmrk5EDa0+f6Glfc8GogunsdhVxlGnRvt2yBKWNRy /dFdsxeN+UzrK8xFhBMBxmQhCwHk5dDinZv5utO7VVaadFhSr5w5wtnvQFFdyA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779642581; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=eUTUvUMZefpuX4CV4YJqUPsoA8x3RcB1OneZvZR49Ak=; b=EdsCdKs+mOg7jnygemWmhJ3/gZROsWbZ2+GzvLKUGSMGLQizNLp5untEKT/6A2jhjfyNFd IspqyGprPR9q1aSQC60DUY27JmQ4G/MZYcTIVEjXR9JYa5IBUKBm3Fn2RDe3meEbm7GUEA sBHHWzbV56MdLqvRuYiPtp2g1/PM9MZclyjgfRbl/V7skn+Xy+ymbXTJjdcRo1c1QSOfY1 beKntOyxfY8fEnXF/FR6j2z2Il8BG9sIxUw5BIZM2AdyKa0pmkM21A4o8cFiD/8V7/N226 wJnFpaUXFTfiFMi9p0ye9xmRUpURiTHB5GW3uJnxFK5608zxKJB21IOJpNfQZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gNlqn0YwDz12hp for ; Sun, 24 May 2026 17:09:41 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 361dd by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 24 May 2026 17:09:41 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Jilles Tjoelker Subject: git: cc145f5d8425 - main - sh/tests: Add a test for long line in history List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jilles X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc145f5d8425f19fbe07110fed89ecde8d70ce78 Auto-Submitted: auto-generated Date: Sun, 24 May 2026 17:09:41 +0000 Message-Id: <6a1330d5.361dd.14e85c09@gitrepo.freebsd.org> The branch main has been updated by jilles: URL: https://cgit.FreeBSD.org/src/commit/?id=cc145f5d8425f19fbe07110fed89ecde8d70ce78 commit cc145f5d8425f19fbe07110fed89ecde8d70ce78 Author: Jilles Tjoelker AuthorDate: 2026-05-22 14:07:20 +0000 Commit: Jilles Tjoelker CommitDate: 2026-05-24 17:06:08 +0000 sh/tests: Add a test for long line in history --- bin/sh/tests/builtins/Makefile | 1 + bin/sh/tests/builtins/fc4.0 | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+) diff --git a/bin/sh/tests/builtins/Makefile b/bin/sh/tests/builtins/Makefile index 0246009cce81..9e9ee098e90a 100644 --- a/bin/sh/tests/builtins/Makefile +++ b/bin/sh/tests/builtins/Makefile @@ -94,6 +94,7 @@ ${PACKAGE}FILES+= export1.0 ${PACKAGE}FILES+= fc1.0 ${PACKAGE}FILES+= fc2.0 ${PACKAGE}FILES+= fc3.0 fc3.0.stdout fc3.0.stderr +${PACKAGE}FILES+= fc4.0 ${PACKAGE}FILES+= for1.0 ${PACKAGE}FILES+= for2.0 ${PACKAGE}FILES+= for3.0 diff --git a/bin/sh/tests/builtins/fc4.0 b/bin/sh/tests/builtins/fc4.0 new file mode 100644 index 000000000000..5213289fcd11 --- /dev/null +++ b/bin/sh/tests/builtins/fc4.0 @@ -0,0 +1,27 @@ +v=1234 +v=$v$v$v$v +v=$v$v$v$v +v=$v$v$v$v +#v=$v$v$v$v +v=beginlong$v$v$v${v}endlong +result=$(ENV= HISTFILE=/dev/null script -q /dev/null ${SH} +m -i -o emacs <; Sun, 24 May 2026 17:09: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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gNlqs2vm5z3VTp for ; Sun, 24 May 2026 17:09:45 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779642585; 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; bh=932OorAtduHoXDyGKbF6xEOplmfalWiGpKduf5Qahhw=; b=mnIrCj12LqeEhb1KoLr+h/gIUjBSkzPgHC++ozVBNF81ZObZuPbDz4LujXATtyedxr/US3 TIcIU/2RiAVPYXx+pn/kjue30xEuZRDCp7u/DZJfTqW1rWx4VBzYvFL/rNzcu1fMuVc0wj tKbyXX100LTtQyv9YPB6zZOqiFhs2r/xr40DvVf4ILVPq+49R96ORb4fYQBVKFQpQVkSPy +hDosoonJeGESTHZhcYj5SvGk09OHHNZH9INMqkibLcbBcug4aqro+x6BdoXk+Prkg4wz4 fpFnaepAjx+tDELAxPd+GOoLlhL7Ww9V7KSW3nqZHAHLmVF76r+emSXtNNC0rg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1779642585; a=rsa-sha256; cv=none; b=Tmfdz8nVz/wob6sJ9dtRmBipcXFZSW+EAa4m2OhHWrjESb3veXW3/xmMfhvOwYZcZxxqyL xsaBWPTAKKeO8+Er7CCPuIqFBXVzpozpx/Eozv4DNA7aPt9a/53mTvqC7bH8/Ev2C+ycXl EuxplJX2JOPwevcJ+PNOODpxZcmr/Kf09ym3ihoDX1QpNVnccKhLOxZCgoYauCOZgkKsKd LfdzmAWN8l75TzAG/U0xhtvf0fx2Az2c9s6q8YnQ3poWrVNyUWWRe8iAJLTvkzWqRS7CVZ hwUS9Bmzkf505Tkd7tUx12gty241R4lOv3w9nNi8EBZaoKkVaWkCSziFw7aOGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1779642585; 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; bh=932OorAtduHoXDyGKbF6xEOplmfalWiGpKduf5Qahhw=; b=PfLbpC84lka97rydKy1roFEfB2JKkRuXpaDdkUqwMvmUQphTNztkuczDbEGhURCWN/LgJY sFlaWtVQHcjCAF0HFZDQjZKhp3XbifmIPdNokzJTEkObre229Rh0wF9sG147+jT9G1uFI2 +G0ux1xFElxQCr4fcl4m+aXX1+h3zh2jpV9IV6D851GTIuNr1js7FUZcMQx/YzWV7JeLD9 9mROkmqlpkk4fsfdy5jSSgSeUYzhOuG0Mr7sw+BPLFitTJTP2yiLceGE9WscZdjn1rvxw9 +xbGVqCK4Fjks6QDcw+sV1RlmFVzMrsFrr5/oZHkm1oxQdxdxjlhLAbNlWdMZA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gNlqs0wDSz12hr for ; Sun, 24 May 2026 17:09:45 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34a57 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sun, 24 May 2026 17:09:39 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Cc: Kristofer Peterson From: Jilles Tjoelker Subject: git: 95e4fce8f0c4 - main - bin/sh: Fix history long line truncation/corruption List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jilles X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 95e4fce8f0c4fc6bf828288b1d63faf0f1300198 Auto-Submitted: auto-generated Date: Sun, 24 May 2026 17:09:39 +0000 Message-Id: <6a1330d3.34a57.67807dd0@gitrepo.freebsd.org> The branch main has been updated by jilles: URL: https://cgit.FreeBSD.org/src/commit/?id=95e4fce8f0c4fc6bf828288b1d63faf0f1300198 commit 95e4fce8f0c4fc6bf828288b1d63faf0f1300198 Author: Kristofer Peterson AuthorDate: 2026-02-16 15:53:47 +0000 Commit: Jilles Tjoelker CommitDate: 2026-05-24 17:06:07 +0000 bin/sh: Fix history long line truncation/corruption When reading from standard input with editline history enabled, increase buffer size to accomodate long lines so that history is recorded correctly. Cleanup el_gets() handling avoiding potentially dangerous retention of pointers to editline buffers across calls. Ensure struct parsefile objects are properly zero initialised when created. Remove push argument from setinputstring() and simplify logic as it was always called with a value of one and as was written was potentially dangerous if ever called with a value of zero. This commit does not fix long lines when history is enabled but editing is not (e.g. if there is no terminal). MFC after: 3 weeks Pull Request: https://github.com/freebsd/freebsd-src/pull/2028 Signed-off-by: Kristofer Peterson --- bin/sh/eval.c | 2 +- bin/sh/input.c | 146 ++++++++++++++++++++++++++++---------------------------- bin/sh/input.h | 2 +- bin/sh/parser.c | 4 +- 4 files changed, 76 insertions(+), 78 deletions(-) diff --git a/bin/sh/eval.c b/bin/sh/eval.c index 0c41c5e69eea..b4c1924f04ad 100644 --- a/bin/sh/eval.c +++ b/bin/sh/eval.c @@ -154,7 +154,7 @@ evalstring(const char *s, int flags) flags &= ~EV_EXIT; any = 0; setstackmark(&smark); - setinputstring(s, 1); + setinputstring(s); while ((n = parsecmd(0)) != NEOF) { if (n != NULL && !nflag) { if (flags_exit && preadateof()) diff --git a/bin/sh/input.c b/bin/sh/input.c index e88d31be12be..c916fb29178b 100644 --- a/bin/sh/input.c +++ b/bin/sh/input.c @@ -81,6 +81,7 @@ struct parsefile { int lleft; /* number of lines left in this buffer */ const char *nextc; /* next char in buffer */ char *buf; /* input buffer */ + size_t bufsize; /* input buffer size */ struct strpush *strpush; /* for pushing strings at this level */ struct strpush basestrpush; /* so pushing one is fast */ }; @@ -93,7 +94,8 @@ const char *parsenextc; /* copy of parsefile->nextc */ static char basebuf[BUFSIZ + 1];/* buffer for top level input file */ static struct parsefile basepf = { /* top level input file */ .nextc = basebuf, - .buf = basebuf + .buf = basebuf, + .bufsize = sizeof(basebuf), }; static struct parsefile *parsefile = &basepf; /* current input file */ int whichprompt; /* 1 == PS1, 2 == PS2 */ @@ -127,52 +129,61 @@ static int preadfd(void) { int nr; - parsenextc = parsefile->buf; retry: #ifndef NO_HISTORY if (parsefile->fd == 0 && el) { - static const char *rl_cp; - static int el_len; - - if (rl_cp == NULL) { - el_resize(el); - rl_cp = el_gets(el, &el_len); - } - if (rl_cp == NULL) - nr = el_len == 0 ? 0 : -1; - else { - nr = el_len; - if (nr > BUFSIZ) - nr = BUFSIZ; - memcpy(parsefile->buf, rl_cp, nr); - if (nr != el_len) { - el_len -= nr; - rl_cp += nr; - } else - rl_cp = NULL; + const char *line; + + el_resize(el); + line = el_gets(el, &nr); + if (nr > 0 && parsefile->bufsize < (size_t)nr + 1) { + size_t bufsize; + + INTOFF; + if (parsefile->buf != basebuf) { + ckfree(parsefile->buf); + parsefile->buf = NULL; + parsefile->bufsize = 0; + } + bufsize = (size_t)nr + BUFSIZ + 1; + bufsize -= bufsize % BUFSIZ; + parsefile->buf = ckmalloc(bufsize); + parsefile->bufsize = bufsize; + INTON; } + if (nr > 0 && line != NULL) + memcpy(parsefile->buf, line, nr); + else + nr = nr ? -1 : 0; } else #endif - nr = read(parsefile->fd, parsefile->buf, BUFSIZ); - - if (nr <= 0) { - if (nr < 0) { - if (errno == EINTR) - goto retry; - if (parsefile->fd == 0 && errno == EWOULDBLOCK) { - int flags = fcntl(0, F_GETFL, 0); - if (flags >= 0 && flags & O_NONBLOCK) { - flags &=~ O_NONBLOCK; - if (fcntl(0, F_SETFL, flags) >= 0) { - out2fmt_flush("sh: turning off NDELAY mode\n"); - goto retry; - } - } - } + nr = read(parsefile->fd, parsefile->buf, parsefile->bufsize - 1); + + if (nr < 0) + switch (errno) { + int flags; + + case EINTR: + goto retry; + case EWOULDBLOCK: + if (parsefile->fd != 0) + break; + if ((flags = fcntl(0, F_GETFL, 0)) < 0) + break; + if (!(flags & O_NONBLOCK)) + break; + if (fcntl(0, F_SETFL, flags & ~O_NONBLOCK) < 0) + break; + out2fmt_flush("sh: turning off NDELAY mode\n"); + goto retry; } - nr = -1; - } + else if (nr > 0) + parsefile->buf[nr] = '\0'; + else + nr = -1; + + parsenextc = parsefile->buf; return nr; } @@ -189,7 +200,8 @@ retry: int preadbuffer(void) { - char *p, *q, *r, *end; + const char *end; + char *q, *r; char savec; while (parsefile->strpush) { @@ -208,31 +220,22 @@ preadbuffer(void) return PEOF; again: - if (parselleft <= 0) { - if ((parselleft = preadfd()) == -1) { - parselleft = parsenleft = EOF_NLEFT; - return PEOF; - } + if (parselleft <= 0 && (parselleft = preadfd()) == -1) { + parselleft = parsenleft = EOF_NLEFT; + return (PEOF); } - - p = parsefile->buf + (parsenextc - parsefile->buf); - end = p + parselleft; - *end = '\0'; - q = strchrnul(p, '\n'); - if (q != end && *q == '\0') { + end = parsenextc + parselleft; + q = strchrnul(parsenextc, '\n'); + if (*q == '\0' && q != end) { /* delete nul characters */ - for (r = q; q != end; q++) { + for (r = q++; q != end; q++) if (*q != '\0') *r++ = *q; - } - parselleft -= end - r; - if (parselleft == 0) - goto again; - end = p + parselleft; - *end = '\0'; - q = strchrnul(p, '\n'); + *r = '\0'; + parselleft = r - parsenextc; + goto again; } - if (q == end) { + if (*q == '\0') { parsenleft = parselleft; parselleft = 0; } else /* *q == '\n' */ { @@ -307,7 +310,7 @@ pushstring(const char *s, int len, struct alias *ap) INTOFF; /*out2fmt_flush("*** calling pushstring: %s, %d\n", s, len);*/ if (parsefile->strpush) { - sp = ckmalloc(sizeof (struct strpush)); + sp = ckmalloc(sizeof(struct strpush)); sp->prev = parsefile->strpush; parsefile->strpush = sp; } else @@ -391,15 +394,15 @@ setinputfile(const char *fname, int push, int verify) void setinputfd(int fd, int push) { - if (push) { + if (push) pushfile(); - parsefile->buf = ckmalloc(BUFSIZ + 1); - } if (parsefile->fd > 0) close(parsefile->fd); parsefile->fd = fd; - if (parsefile->buf == NULL) + if (parsefile->buf == NULL) { parsefile->buf = ckmalloc(BUFSIZ + 1); + parsefile->bufsize = BUFSIZ + 1; + } parselleft = parsenleft = 0; plinno = 1; } @@ -410,14 +413,12 @@ setinputfd(int fd, int push) */ void -setinputstring(const char *string, int push) +setinputstring(const char *string) { INTOFF; - if (push) - pushfile(); + pushfile(); parsenextc = string; parselleft = parsenleft = strlen(string); - parsefile->buf = NULL; plinno = 1; INTON; } @@ -434,15 +435,12 @@ pushfile(void) { struct parsefile *pf; + pf = (struct parsefile *)ckmalloc(sizeof(struct parsefile)); + *pf = (struct parsefile){ .prev = parsefile, .fd = -1 }; parsefile->nleft = parsenleft; parsefile->lleft = parselleft; parsefile->nextc = parsenextc; parsefile->linno = plinno; - pf = (struct parsefile *)ckmalloc(sizeof (struct parsefile)); - pf->prev = parsefile; - pf->fd = -1; - pf->strpush = NULL; - pf->basestrpush.prev = NULL; parsefile = pf; } diff --git a/bin/sh/input.h b/bin/sh/input.h index 70e6b06c72da..4e8992a5bf60 100644 --- a/bin/sh/input.h +++ b/bin/sh/input.h @@ -54,7 +54,7 @@ void pungetc(void); void pushstring(const char *, int, struct alias *); void setinputfile(const char *, int, int); void setinputfd(int, int); -void setinputstring(const char *, int); +void setinputstring(const char *); void popfile(void); struct parsefile *getcurrentfile(void); void popfilesupto(struct parsefile *); diff --git a/bin/sh/parser.c b/bin/sh/parser.c index 3e42d41caec4..f6ef8d807704 100644 --- a/bin/sh/parser.c +++ b/bin/sh/parser.c @@ -1167,7 +1167,7 @@ parsebackq(char *out, struct nodelist **pbqlist, INTOFF; ostr = ckmalloc(olen); memcpy(ostr, stackblock(), olen); - setinputstring(ostr, 1); + setinputstring(ostr); INTON; } nlpp = pbqlist; @@ -2368,7 +2368,7 @@ expandstr(const char *ps) if (!setjmp(jmploc.loc)) { handler = &jmploc; parser_temp = NULL; - setinputstring(ps, 1); + setinputstring(ps); doprompt = 0; readtoken1(pgetc(), DQSYNTAX, NOEOFMARK, 0); if (backquotelist != NULL)